From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 00:49:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7B576699A5; Mon, 16 Aug 2021 00:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GnwY74d21z4wBr; Mon, 16 Aug 2021 00:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 832B620126; Mon, 16 Aug 2021 00:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G0nlX9099598; Mon, 16 Aug 2021 00:49:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G0nluW099597; Mon, 16 Aug 2021 00:49:47 GMT (envelope-from git) Date: Mon, 16 Aug 2021 00:49:47 GMT Message-Id: <202108160049.17G0nluW099597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 094860333aaf - stable/13 - iichid(4): disable interrupt on suspend MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 094860333aaf63c922319f112601091af0c65ac9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 00:49:48 -0000 The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=094860333aaf63c922319f112601091af0c65ac9 commit 094860333aaf63c922319f112601091af0c65ac9 Author: J.R. Oldroyd AuthorDate: 2021-05-31 19:33:07 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-08-16 00:45:44 +0000 iichid(4): disable interrupt on suspend Commit message of the identical change in Linux driver says: "When an I2C HID device is powered off during system sleep, as a result of removing its power resources (by the ACPI core) the interrupt line might go low as well. This results inadvertent interrupts." This change fixes suspend/resume on Asus S510UQ laptops. While here add a couple of typo fixes as well as a slight change to the iichid_attach() code to have the power_on flag set properly. Submitted by: J.R. Oldroyd Reviewed by: wulf (cherry picked from commit 5236888db77194c194706b122675af7355fe7ceb) --- sys/dev/iicbus/iichid.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 7c51a697c4c7..68d7cfd9090f 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -573,7 +573,7 @@ iichid_intr(void *context) * not allowed and often returns a garbage. If a HOST needs to * communicate with the DEVICE it MUST issue a SET POWER command * (to ON) before any other command. As some hardware requires reads to - * acknoledge interrupts we fetch only length header and discard it. + * acknowledge interrupts we fetch only length header and discard it. */ maxlen = sc->power_on ? sc->intr_bufsize : 0; error = iichid_cmd_read(sc, sc->intr_buf, maxlen, &actual); @@ -1069,14 +1069,16 @@ iichid_attach(device_t dev) error = iichid_reset(sc); if (error) { device_printf(dev, "failed to reset hardware: %d\n", error); - return (ENXIO); + error = ENXIO; + goto done; } - sc->power_on = false; + sc->power_on = true; + #ifdef IICHID_SAMPLING TASK_INIT(&sc->event_task, 0, iichid_event_task, sc); /* taskqueue_create can't fail with M_WAITOK mflag passed. */ - sc->taskqueue = taskqueue_create("hmt_tq", M_WAITOK | M_ZERO, + sc->taskqueue = taskqueue_create("iichid_tq", M_WAITOK | M_ZERO, taskqueue_thread_enqueue, &sc->taskqueue); TIMEOUT_TASK_INIT(sc->taskqueue, &sc->periodic_task, 0, iichid_event_task, sc); @@ -1144,8 +1146,10 @@ iichid_attach(device_t dev) device_printf(dev, "failed to attach child: error %d\n", error); iichid_detach(dev); } + done: (void)iichid_set_power(sc, I2C_HID_POWER_OFF); + sc->power_on = false; return (error); } @@ -1178,21 +1182,27 @@ iichid_suspend(device_t dev) int error; sc = device_get_softc(dev); - DPRINTF(sc, "Suspend called, setting device to power_state 1\n"); (void)bus_generic_suspend(dev); +#ifdef IICHID_SAMPLING + if (sc->sampling_rate_slow < 0) +#endif + (void)bus_generic_suspend_intr(device_get_parent(dev), dev, + sc->irq_res); + /* * 8.2 - The HOST is going into a deep power optimized state and wishes * to put all the devices into a low power state also. The HOST * is recommended to issue a HIPO command to the DEVICE to force * the DEVICE in to a lower power state. */ + DPRINTF(sc, "Suspend called, setting device to power_state 1\n"); error = iichid_set_power_state(sc, IICHID_PS_NULL, IICHID_PS_OFF); if (error != 0) DPRINTF(sc, "Could not set power_state, error: %d\n", error); else DPRINTF(sc, "Successfully set power_state\n"); - return (0); + return (0); } static int @@ -1209,6 +1219,11 @@ iichid_resume(device_t dev) else DPRINTF(sc, "Successfully set power_state\n"); (void)bus_generic_resume(dev); +#ifdef IICHID_SAMPLING + if (sc->sampling_rate_slow < 0) +#endif + (void)bus_generic_resume_intr(device_get_parent(dev), dev, + sc->irq_res); return (0); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 00:49:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE39C669369; Mon, 16 Aug 2021 00:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GnwY85Hysz4vyq; Mon, 16 Aug 2021 00:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CC8020191; Mon, 16 Aug 2021 00:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G0nmsp099622; Mon, 16 Aug 2021 00:49:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G0nmIW099621; Mon, 16 Aug 2021 00:49:48 GMT (envelope-from git) Date: Mon, 16 Aug 2021 00:49:48 GMT Message-Id: <202108160049.17G0nmIW099621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: c3bccba63d0d - stable/13 - iichid(4): Perform bus_teardown_intr/bus_setup_intr to disable interrupts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3bccba63d0d2beb105bfc7b7c6db5ecc977ccfa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 00:49:48 -0000 The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c3bccba63d0d2beb105bfc7b7c6db5ecc977ccfa commit c3bccba63d0d2beb105bfc7b7c6db5ecc977ccfa Author: Vladimir Kondratyev AuthorDate: 2021-07-09 19:32:59 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-08-16 00:46:18 +0000 iichid(4): Perform bus_teardown_intr/bus_setup_intr to disable interrupts during suspend/resume cycle. Previously used bus_generic_suspend_intr and bus_generic_resume_intr may cause interrupt storm because of missed interrupt acknowledges caused by blocking of intr handler. Reported by: J.R. Oldroyd (cherry picked from commit 82626fef6253a9172163df137097f54e93e3c209) --- sys/dev/iicbus/iichid.c | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 68d7cfd9090f..d95ffb8add88 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -177,6 +177,7 @@ struct iichid_softc { struct task event_task; #endif + struct task suspend_task; bool open; /* iicbus lock */ bool suspend; /* iicbus lock */ bool power_on; /* iicbus lock */ @@ -188,6 +189,8 @@ static device_detach_t iichid_detach; static device_resume_t iichid_resume; static device_suspend_t iichid_suspend; +static void iichid_suspend_task(void *, int); + #ifdef IICHID_SAMPLING static int iichid_setup_callout(struct iichid_softc *); static int iichid_reset_callout(struct iichid_softc *); @@ -1075,6 +1078,7 @@ iichid_attach(device_t dev) sc->power_on = true; + TASK_INIT(&sc->suspend_task, 0, iichid_suspend_task, sc); #ifdef IICHID_SAMPLING TASK_INIT(&sc->event_task, 0, iichid_event_task, sc); /* taskqueue_create can't fail with M_WAITOK mflag passed. */ @@ -1146,7 +1150,6 @@ iichid_attach(device_t dev) device_printf(dev, "failed to attach child: error %d\n", error); iichid_detach(dev); } - done: (void)iichid_set_power(sc, I2C_HID_POWER_OFF); sc->power_on = false; @@ -1175,6 +1178,14 @@ iichid_detach(device_t dev) return (0); } +static void +iichid_suspend_task(void *context, int pending) +{ + struct iichid_softc *sc = context; + + iichid_teardown_interrupt(sc); +} + static int iichid_suspend(device_t dev) { @@ -1183,12 +1194,6 @@ iichid_suspend(device_t dev) sc = device_get_softc(dev); (void)bus_generic_suspend(dev); -#ifdef IICHID_SAMPLING - if (sc->sampling_rate_slow < 0) -#endif - (void)bus_generic_suspend_intr(device_get_parent(dev), dev, - sc->irq_res); - /* * 8.2 - The HOST is going into a deep power optimized state and wishes * to put all the devices into a low power state also. The HOST @@ -1202,6 +1207,24 @@ iichid_suspend(device_t dev) else DPRINTF(sc, "Successfully set power_state\n"); +#ifdef IICHID_SAMPLING + if (sc->sampling_rate_slow < 0) +#endif + { + /* + * bus_teardown_intr can not be executed right here as it wants + * to run on certain CPU to interacts with LAPIC while suspend + * thread is bound to CPU0. So run it from taskqueue context. + */ +#ifdef IICHID_SAMPLING +#define suspend_thread sc->taskqueue +#else +#define suspend_thread taskqueue_thread +#endif + taskqueue_enqueue(suspend_thread, &sc->suspend_task); + taskqueue_drain(suspend_thread, &sc->suspend_task); + } + return (0); } @@ -1212,6 +1235,11 @@ iichid_resume(device_t dev) int error; sc = device_get_softc(dev); +#ifdef IICHID_SAMPLING + if (sc->sampling_rate_slow < 0) +#endif + iichid_setup_interrupt(sc); + DPRINTF(sc, "Resume called, setting device to power_state 0\n"); error = iichid_set_power_state(sc, IICHID_PS_NULL, IICHID_PS_ON); if (error != 0) @@ -1219,11 +1247,6 @@ iichid_resume(device_t dev) else DPRINTF(sc, "Successfully set power_state\n"); (void)bus_generic_resume(dev); -#ifdef IICHID_SAMPLING - if (sc->sampling_rate_slow < 0) -#endif - (void)bus_generic_resume_intr(device_get_parent(dev), dev, - sc->irq_res); return (0); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 00:49:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF587669B11; Mon, 16 Aug 2021 00:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GnwY96MbPz4vt6; Mon, 16 Aug 2021 00:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C16791FE29; Mon, 16 Aug 2021 00:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G0nndK099646; Mon, 16 Aug 2021 00:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G0nnfb099645; Mon, 16 Aug 2021 00:49:49 GMT (envelope-from git) Date: Mon, 16 Aug 2021 00:49:49 GMT Message-Id: <202108160049.17G0nnfb099645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: f2f52fbfdb28 - stable/13 - psm(4): Probe Synaptics touchpad with active multiplexing mode enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f2f52fbfdb282d740c02a92a47737c2c3f975791 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 00:49:50 -0000 The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=f2f52fbfdb282d740c02a92a47737c2c3f975791 commit f2f52fbfdb282d740c02a92a47737c2c3f975791 Author: Vladimir Kondratyev AuthorDate: 2021-07-14 10:30:26 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-08-16 00:47:18 +0000 psm(4): Probe Synaptics touchpad with active multiplexing mode enabled if it is only multiplexed device. Also enable syncbit checks for them. This fixes touchpad recognition on Panasonic Toughbook CF-MX4 laptop. Reported by: Tomasz "CeDeROM" CEDRO PR: 253279 Differential revision: https://reviews.freebsd.org/D28502 (cherry picked from commit f5998d20ed80fdc1cb3ba0c245cae5f179e22fe2) --- sys/dev/atkbdc/psm.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 43d19b5174d3..f6276ae847aa 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -466,6 +466,7 @@ struct psm_softc { /* Driver status information */ int muxtpbuttons; /* Touchpad button state */ int muxmsbuttons; /* Mouse (trackpoint) button state */ struct timeval muxmidtimeout; /* middle button supression timeout */ + int muxsinglesyna; /* Probe result of single Synaptics */ #ifdef EVDEV_SUPPORT struct evdev_dev *evdev_a; /* Absolute reporting device */ struct evdev_dev *evdev_r; /* Relative reporting device */ @@ -666,6 +667,7 @@ static probefunc_t enable_4dplus; static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; static probefunc_t enable_synaptics_mux; +static probefunc_t enable_single_synaptics_mux; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; static probefunc_t enable_elantech; @@ -686,8 +688,10 @@ static struct { * WARNING: the order of probe is very important. Don't mess it * unless you know what you are doing. */ - { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad on Active Mux */ + { MOUSE_MODEL_SYNAPTICS, /* Synaptics + mouse on Active Mux */ 0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux }, + { MOUSE_MODEL_SYNAPTICS, /* Single Synaptics on Active Mux */ + 0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_single_synaptics_mux }, { MOUSE_MODEL_NET, /* Genius NetMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse }, { MOUSE_MODEL_NETSCROLL, /* Genius NetScroll */ @@ -6292,6 +6296,8 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) int active_ports_count = 0; int active_ports_mask = 0; + sc->muxsinglesyna = FALSE; + if (mux_disabled == 1 || (mux_disabled == -1 && (kbdc->quirks & KBDC_QUIRK_DISABLE_MUX_PROBE) != 0)) return (FALSE); @@ -6315,18 +6321,16 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) active_ports_count); /* psm has a special support for GenMouse + SynTouchpad combination */ - if (active_ports_count >= 2) { - for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { - if ((active_ports_mask & 1 << port) == 0) - continue; - VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); - set_active_aux_mux_port(kbdc, port); - probe = enable_synaptics(sc, arg); - if (probe) { - if (arg == PROBE) - sc->muxport = port; - break; - } + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + if ((active_ports_mask & 1 << port) == 0) + continue; + VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + probe = enable_synaptics(sc, arg); + if (probe) { + if (arg == PROBE) + sc->muxport = port; + break; } } @@ -6348,7 +6352,17 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) } empty_both_buffers(kbdc, 10); /* remove stray data if any */ - return (probe); + /* Don't disable syncbit checks if Synaptics is only device on MUX */ + if (active_ports_count == 1) + sc->muxsinglesyna = probe; + return (active_ports_count != 1 ? probe : FALSE); +} + +static int +enable_single_synaptics_mux(struct psm_softc *sc, enum probearg arg) +{ + /* Synaptics device is already initialized in enable_synaptics_mux */ + return (sc->muxsinglesyna); } static int From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 00:57:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 409576698FF; Mon, 16 Aug 2021 00:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gnwjw0svwz4wSB; Mon, 16 Aug 2021 00:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1E7E20047; Mon, 16 Aug 2021 00:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G0vNno012562; Mon, 16 Aug 2021 00:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G0vN9D012561; Mon, 16 Aug 2021 00:57:23 GMT (envelope-from git) Date: Mon, 16 Aug 2021 00:57:23 GMT Message-Id: <202108160057.17G0vN9D012561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 0d0726a769a1 - stable/13 - e1000: Fix lem/em UDP rx csum offload MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0d0726a769a176be699b2ceeb5a417ffe88b0e64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 00:57:24 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0d0726a769a176be699b2ceeb5a417ffe88b0e64 commit 0d0726a769a176be699b2ceeb5a417ffe88b0e64 Author: Kevin Bowling AuthorDate: 2021-08-09 21:29:31 +0000 Commit: Kevin Bowling CommitDate: 2021-08-16 00:56:45 +0000 e1000: Fix lem/em UDP rx csum offload Rebase on igb code and unify lem/em implementations. PR: 257642 Reported by: Nick Reilly Reviewed by: karels, emaste Tested by: Nick Reilly Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31449 (cherry picked from commit 015075f383489fcbedbe8aae7c1c64a3d55ca75e) --- sys/dev/e1000/em_txrx.c | 67 ++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 46 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 458de96a7b9d..11f6662c5b79 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -62,8 +62,7 @@ static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget); static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); -static void lem_receive_checksum(int status, int errors, if_rxd_info_t ri); -static void em_receive_checksum(uint32_t status, if_rxd_info_t ri); +static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t); static int em_determine_rsstype(u32 pkt_info); extern int em_intr(void *arg); @@ -646,8 +645,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) } while (!eop); /* XXX add a faster way to look this up */ - if (adapter->hw.mac.type >= e1000_82543 && !(status & E1000_RXD_STAT_IXSM)) - lem_receive_checksum(status, errors, ri); + if (adapter->hw.mac.type >= e1000_82543) + em_receive_checksum(status, errors, ri); if (status & E1000_RXD_STAT_VP) { ri->iri_vtag = le16toh(rxd->special); @@ -707,9 +706,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); - /* XXX add a faster way to look this up */ - if (adapter->hw.mac.type >= e1000_82543) - em_receive_checksum(staterr, ri); + em_receive_checksum(staterr, staterr >> 24, ri); if (staterr & E1000_RXD_STAT_VP) { vtag = le16toh(rxd->wb.upper.vlan); @@ -734,19 +731,24 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) * *********************************************************************/ static void -lem_receive_checksum(int status, int errors, if_rxd_info_t ri) +em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) { - /* Did it pass? */ - if (status & E1000_RXD_STAT_IPCS && !(errors & E1000_RXD_ERR_IPE)) - ri->iri_csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); - - if (status & E1000_RXD_STAT_TCPCS) { - /* Did it pass? */ - if (!(errors & E1000_RXD_ERR_TCPE)) { - ri->iri_csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } + if (__predict_false(status & E1000_RXD_STAT_IXSM)) + return; + + /* If there is a layer 3 or 4 error we are done */ + if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + return; + + /* IP Checksum Good */ + if (status & E1000_RXD_STAT_IPCS) + ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); + + /* Valid L4E checksum */ + if (__predict_true(status & + (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))) { + ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_data = htons(0xffff); } } @@ -775,30 +777,3 @@ em_determine_rsstype(u32 pkt_info) return M_HASHTYPE_OPAQUE; } } - -static void -em_receive_checksum(uint32_t status, if_rxd_info_t ri) -{ - ri->iri_csum_flags = 0; - - /* Ignore Checksum bit is set */ - if (status & E1000_RXD_STAT_IXSM) - return; - - /* If the IP checksum exists and there is no IP Checksum error */ - if ((status & (E1000_RXD_STAT_IPCS | E1000_RXDEXT_STATERR_IPE)) == - E1000_RXD_STAT_IPCS) { - ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); - } - - /* TCP or UDP checksum */ - if ((status & (E1000_RXD_STAT_TCPCS | E1000_RXDEXT_STATERR_TCPE)) == - E1000_RXD_STAT_TCPCS) { - ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } - if (status & E1000_RXD_STAT_UDPCS) { - ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } -} From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 00:58:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FFD5669C62; Mon, 16 Aug 2021 00:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GnwlX1PZhz4wxw; Mon, 16 Aug 2021 00:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 186131FEE6; Mon, 16 Aug 2021 00:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G0wmuZ012771; Mon, 16 Aug 2021 00:58:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G0wlsN012770; Mon, 16 Aug 2021 00:58:47 GMT (envelope-from git) Date: Mon, 16 Aug 2021 00:58:47 GMT Message-Id: <202108160058.17G0wlsN012770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: ec56aaca91b2 - stable/12 - e1000: Fix lem/em UDP rx csum offload MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ec56aaca91b243be590fdb3b8f0e6ee3b0b2e9f0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 00:58:48 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ec56aaca91b243be590fdb3b8f0e6ee3b0b2e9f0 commit ec56aaca91b243be590fdb3b8f0e6ee3b0b2e9f0 Author: Kevin Bowling AuthorDate: 2021-08-09 21:29:31 +0000 Commit: Kevin Bowling CommitDate: 2021-08-16 00:58:11 +0000 e1000: Fix lem/em UDP rx csum offload Rebase on igb code and unify lem/em implementations. PR: 257642 Reported by: Nick Reilly Reviewed by: karels, emaste Tested by: Nick Reilly Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31449 (cherry picked from commit 015075f383489fcbedbe8aae7c1c64a3d55ca75e) --- sys/dev/e1000/em_txrx.c | 67 ++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 46 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 458de96a7b9d..11f6662c5b79 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -62,8 +62,7 @@ static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget); static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); -static void lem_receive_checksum(int status, int errors, if_rxd_info_t ri); -static void em_receive_checksum(uint32_t status, if_rxd_info_t ri); +static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t); static int em_determine_rsstype(u32 pkt_info); extern int em_intr(void *arg); @@ -646,8 +645,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) } while (!eop); /* XXX add a faster way to look this up */ - if (adapter->hw.mac.type >= e1000_82543 && !(status & E1000_RXD_STAT_IXSM)) - lem_receive_checksum(status, errors, ri); + if (adapter->hw.mac.type >= e1000_82543) + em_receive_checksum(status, errors, ri); if (status & E1000_RXD_STAT_VP) { ri->iri_vtag = le16toh(rxd->special); @@ -707,9 +706,7 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) i++; } while (!eop); - /* XXX add a faster way to look this up */ - if (adapter->hw.mac.type >= e1000_82543) - em_receive_checksum(staterr, ri); + em_receive_checksum(staterr, staterr >> 24, ri); if (staterr & E1000_RXD_STAT_VP) { vtag = le16toh(rxd->wb.upper.vlan); @@ -734,19 +731,24 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) * *********************************************************************/ static void -lem_receive_checksum(int status, int errors, if_rxd_info_t ri) +em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) { - /* Did it pass? */ - if (status & E1000_RXD_STAT_IPCS && !(errors & E1000_RXD_ERR_IPE)) - ri->iri_csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); - - if (status & E1000_RXD_STAT_TCPCS) { - /* Did it pass? */ - if (!(errors & E1000_RXD_ERR_TCPE)) { - ri->iri_csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } + if (__predict_false(status & E1000_RXD_STAT_IXSM)) + return; + + /* If there is a layer 3 or 4 error we are done */ + if (__predict_false(errors & (E1000_RXD_ERR_IPE | E1000_RXD_ERR_TCPE))) + return; + + /* IP Checksum Good */ + if (status & E1000_RXD_STAT_IPCS) + ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); + + /* Valid L4E checksum */ + if (__predict_true(status & + (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))) { + ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_data = htons(0xffff); } } @@ -775,30 +777,3 @@ em_determine_rsstype(u32 pkt_info) return M_HASHTYPE_OPAQUE; } } - -static void -em_receive_checksum(uint32_t status, if_rxd_info_t ri) -{ - ri->iri_csum_flags = 0; - - /* Ignore Checksum bit is set */ - if (status & E1000_RXD_STAT_IXSM) - return; - - /* If the IP checksum exists and there is no IP Checksum error */ - if ((status & (E1000_RXD_STAT_IPCS | E1000_RXDEXT_STATERR_IPE)) == - E1000_RXD_STAT_IPCS) { - ri->iri_csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); - } - - /* TCP or UDP checksum */ - if ((status & (E1000_RXD_STAT_TCPCS | E1000_RXDEXT_STATERR_TCPE)) == - E1000_RXD_STAT_TCPCS) { - ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } - if (status & E1000_RXD_STAT_UDPCS) { - ri->iri_csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - ri->iri_csum_data = htons(0xffff); - } -} From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 01:00:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 151EC669BDB; Mon, 16 Aug 2021 01:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GnwnB01H9z4xRY; Mon, 16 Aug 2021 01:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD82920049; Mon, 16 Aug 2021 01:00:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G10Dgw018450; Mon, 16 Aug 2021 01:00:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G10DXu018442; Mon, 16 Aug 2021 01:00:13 GMT (envelope-from git) Date: Mon, 16 Aug 2021 01:00:13 GMT Message-Id: <202108160100.17G10DXu018442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: e57850820d47 - stable/12 - psm(4): Probe Synaptics touchpad with active multiplexing mode enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e57850820d4732b248458007cad2e70c43156a90 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 01:00:14 -0000 The branch stable/12 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e57850820d4732b248458007cad2e70c43156a90 commit e57850820d4732b248458007cad2e70c43156a90 Author: Vladimir Kondratyev AuthorDate: 2021-07-14 10:30:26 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-08-16 00:58:41 +0000 psm(4): Probe Synaptics touchpad with active multiplexing mode enabled if it is only multiplexed device. Also enable syncbit checks for them. This fixes touchpad recognition on Panasonic Toughbook CF-MX4 laptop. Reported by: Tomasz "CeDeROM" CEDRO PR: 253279 Differential revision: https://reviews.freebsd.org/D28502 (cherry picked from commit f5998d20ed80fdc1cb3ba0c245cae5f179e22fe2) --- sys/dev/atkbdc/psm.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index f9b8b098ea87..cae4ac41fb32 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -465,6 +465,7 @@ struct psm_softc { /* Driver status information */ int muxtpbuttons; /* Touchpad button state */ int muxmsbuttons; /* Mouse (trackpoint) button state */ struct timeval muxmidtimeout; /* middle button supression timeout */ + int muxsinglesyna; /* Probe result of single Synaptics */ #ifdef EVDEV_SUPPORT struct evdev_dev *evdev_a; /* Absolute reporting device */ struct evdev_dev *evdev_r; /* Relative reporting device */ @@ -665,6 +666,7 @@ static probefunc_t enable_4dplus; static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; static probefunc_t enable_synaptics_mux; +static probefunc_t enable_single_synaptics_mux; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; static probefunc_t enable_elantech; @@ -685,8 +687,10 @@ static struct { * WARNING: the order of probe is very important. Don't mess it * unless you know what you are doing. */ - { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad on Active Mux */ + { MOUSE_MODEL_SYNAPTICS, /* Synaptics + mouse on Active Mux */ 0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux }, + { MOUSE_MODEL_SYNAPTICS, /* Single Synaptics on Active Mux */ + 0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_single_synaptics_mux }, { MOUSE_MODEL_NET, /* Genius NetMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse }, { MOUSE_MODEL_NETSCROLL, /* Genius NetScroll */ @@ -6256,6 +6260,8 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) int active_ports_count = 0; int active_ports_mask = 0; + sc->muxsinglesyna = FALSE; + if (mux_disabled == 1 || (mux_disabled == -1 && (kbdcp(kbdc)->quirks & KBDC_QUIRK_DISABLE_MUX_PROBE) != 0)) return (FALSE); @@ -6279,18 +6285,16 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) active_ports_count); /* psm has a special support for GenMouse + SynTouchpad combination */ - if (active_ports_count >= 2) { - for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { - if ((active_ports_mask & 1 << port) == 0) - continue; - VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); - set_active_aux_mux_port(kbdc, port); - probe = enable_synaptics(sc, arg); - if (probe) { - if (arg == PROBE) - sc->muxport = port; - break; - } + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + if ((active_ports_mask & 1 << port) == 0) + continue; + VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + probe = enable_synaptics(sc, arg); + if (probe) { + if (arg == PROBE) + sc->muxport = port; + break; } } @@ -6312,7 +6316,17 @@ enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) } empty_both_buffers(kbdc, 10); /* remove stray data if any */ - return (probe); + /* Don't disable syncbit checks if Synaptics is only device on MUX */ + if (active_ports_count == 1) + sc->muxsinglesyna = probe; + return (active_ports_count != 1 ? probe : FALSE); +} + +static int +enable_single_synaptics_mux(struct psm_softc *sc, enum probearg arg) +{ + /* Synaptics device is already initialized in enable_synaptics_mux */ + return (sc->muxsinglesyna); } static int From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 05:20:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA03966CEA1; Mon, 16 Aug 2021 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp2YD4bJfz3CWy; Mon, 16 Aug 2021 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8540C238D0; Mon, 16 Aug 2021 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G5KGBf065512; Mon, 16 Aug 2021 05:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G5KGfm065508; Mon, 16 Aug 2021 05:20:16 GMT (envelope-from git) Date: Mon, 16 Aug 2021 05:20:16 GMT Message-Id: <202108160520.17G5KGfm065508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: bb151177614a - stable/13 - iscontrol(8): Fix a typo in a struct MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb151177614a7187a489baff49f6a05e5400a95f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 05:20:16 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bb151177614a7187a489baff49f6a05e5400a95f commit bb151177614a7187a489baff49f6a05e5400a95f Author: Gordon Bergling AuthorDate: 2021-08-11 07:55:08 +0000 Commit: Gordon Bergling CommitDate: 2021-08-16 05:20:00 +0000 iscontrol(8): Fix a typo in a struct - s/suport/support/ (cherry picked from commit 1e1fbf3b47d7296896593b1e477141263b0c555f) --- sbin/iscontrol/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/iscontrol/login.c b/sbin/iscontrol/login.c index 7cb990029047..c4fbc46548e9 100644 --- a/sbin/iscontrol/login.c +++ b/sbin/iscontrol/login.c @@ -59,7 +59,7 @@ static char *status_class1[] = { "Too many connections", "Missing parameter", "Can't include in session", - "Session type not suported", + "Session type not supported", "Session does not exist", "Invalid during login", }; From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 05:20:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A41366CC2B; Mon, 16 Aug 2021 05:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp2Ym6ZYJz3Cc5; Mon, 16 Aug 2021 05:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAB13238D4; Mon, 16 Aug 2021 05:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G5Ki4K068182; Mon, 16 Aug 2021 05:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G5KiTp068181; Mon, 16 Aug 2021 05:20:44 GMT (envelope-from git) Date: Mon, 16 Aug 2021 05:20:44 GMT Message-Id: <202108160520.17G5KiTp068181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 71a74e216830 - stable/13 - ipfw(8): Fix a typo in an error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 71a74e21683025b1e69a0a2c6936a2b189bf8b76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 05:20:45 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=71a74e21683025b1e69a0a2c6936a2b189bf8b76 commit 71a74e21683025b1e69a0a2c6936a2b189bf8b76 Author: Gordon Bergling AuthorDate: 2021-08-11 07:53:01 +0000 Commit: Gordon Bergling CommitDate: 2021-08-16 05:20:31 +0000 ipfw(8): Fix a typo in an error message - s/suport/support/ (cherry picked from commit 809ad8170aa97e570ef5e1e414b4c25e4b58044c) --- sbin/ipfw/ipfw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index fb1d9a4a180b..deb46fc64e00 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -4127,7 +4127,7 @@ chkarg: action->arg1 = strtoul(*av, NULL, 10); if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) - errx(EX_DATAERR, "fibs not suported.\n"); + errx(EX_DATAERR, "fibs not supported.\n"); if (action->arg1 >= numfibs) /* Temporary */ errx(EX_DATAERR, "fib too large.\n"); /* Add high-order bit to fib to make room for tablearg*/ From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 05:21:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8D6566C7D9; Mon, 16 Aug 2021 05:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp2ZK5YHPz3ClR; Mon, 16 Aug 2021 05:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6CE82354E; Mon, 16 Aug 2021 05:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G5LDD1068339; Mon, 16 Aug 2021 05:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G5LDtB068338; Mon, 16 Aug 2021 05:21:13 GMT (envelope-from git) Date: Mon, 16 Aug 2021 05:21:13 GMT Message-Id: <202108160521.17G5LDtB068338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ae69c3104e35 - stable/12 - iscontrol(8): Fix a typo in a struct MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ae69c3104e35d890014ce0d826beeff9e5527929 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 05:21:13 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ae69c3104e35d890014ce0d826beeff9e5527929 commit ae69c3104e35d890014ce0d826beeff9e5527929 Author: Gordon Bergling AuthorDate: 2021-08-11 07:55:08 +0000 Commit: Gordon Bergling CommitDate: 2021-08-16 05:20:57 +0000 iscontrol(8): Fix a typo in a struct - s/suport/support/ (cherry picked from commit 1e1fbf3b47d7296896593b1e477141263b0c555f) --- sbin/iscontrol/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/iscontrol/login.c b/sbin/iscontrol/login.c index 7cb990029047..c4fbc46548e9 100644 --- a/sbin/iscontrol/login.c +++ b/sbin/iscontrol/login.c @@ -59,7 +59,7 @@ static char *status_class1[] = { "Too many connections", "Missing parameter", "Can't include in session", - "Session type not suported", + "Session type not supported", "Session does not exist", "Invalid during login", }; From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 05:21:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5499366D14C; Mon, 16 Aug 2021 05:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp2Zp1zD7z3Cw5; Mon, 16 Aug 2021 05:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21B34238F0; Mon, 16 Aug 2021 05:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G5Lc7i069329; Mon, 16 Aug 2021 05:21:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G5LcDK069327; Mon, 16 Aug 2021 05:21:38 GMT (envelope-from git) Date: Mon, 16 Aug 2021 05:21:38 GMT Message-Id: <202108160521.17G5LcDK069327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 9cb0382ada88 - stable/12 - ipfw(8): Fix a typo in an error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9cb0382ada8835bb3bb94ea4fb54e4a649662c01 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 05:21:38 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=9cb0382ada8835bb3bb94ea4fb54e4a649662c01 commit 9cb0382ada8835bb3bb94ea4fb54e4a649662c01 Author: Gordon Bergling AuthorDate: 2021-08-11 07:53:01 +0000 Commit: Gordon Bergling CommitDate: 2021-08-16 05:21:21 +0000 ipfw(8): Fix a typo in an error message - s/suport/support/ (cherry picked from commit 809ad8170aa97e570ef5e1e414b4c25e4b58044c) --- sbin/ipfw/ipfw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 8f06563d61a8..feb55b403f0a 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -4127,7 +4127,7 @@ chkarg: action->arg1 = strtoul(*av, NULL, 10); if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) - errx(EX_DATAERR, "fibs not suported.\n"); + errx(EX_DATAERR, "fibs not supported.\n"); if (action->arg1 >= numfibs) /* Temporary */ errx(EX_DATAERR, "fib too large.\n"); /* Add high-order bit to fib to make room for tablearg*/ From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FA3F66FE46; Mon, 16 Aug 2021 09:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WF3xBjz3QwP; Mon, 16 Aug 2021 09:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FF4226C0A; Mon, 16 Aug 2021 09:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93r8k069043; Mon, 16 Aug 2021 09:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93rWu069042; Mon, 16 Aug 2021 09:03:53 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:53 GMT Message-Id: <202108160903.17G93rWu069042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 312b46348c52 - stable/13 - bhyve.8: Make synopsis more readable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 312b46348c5225343c3c42cbcb05051ff3004e3e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:03:53 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=312b46348c5225343c3c42cbcb05051ff3004e3e commit 312b46348c5225343c3c42cbcb05051ff3004e3e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 17:54:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:13:23 +0000 bhyve.8: Make synopsis more readable There is no need to squeeze all the possible options into one synopsis entry. Let "-l help" and "-s help" be listed separately. While here, keep -s and its arguments on the same line. MFC after: 2 weeks (cherry picked from commit bfe40b692d087cdd5fdeea69e18496ab2a7f67ac) --- usr.sbin/bhyve/bhyve.8 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 04e22302d9d7..367a3306786e 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2021 +.Dd April 18, 2021 .Dt BHYVE 8 .Os .Sh NAME @@ -49,7 +49,7 @@ .Op Fl k Ar file .Oo Fl l .Sm off -.Cm help | Ar lpcdev Op Cm \&, Ar conf +.Ar lpcdev Op Cm \&, Ar conf .Sm on .Oc .Oo Fl m @@ -63,13 +63,17 @@ .Op Fl o Ar var Ns Cm = Ns Ar value .Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu .Op Fl r Ar file -.Oo Fl s .Sm off -.Cm help | Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf +.Oo Fl s\~ +.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf .Sm on .Oc .Op Fl U Ar uuid .Ar vmname +.Nm +.Fl l Cm help +.Nm +.Fl s Cm help .Sh DESCRIPTION .Nm is a hypervisor that runs guest operating systems inside a From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B49A766F874; Mon, 16 Aug 2021 09:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WG4phPz3Qnb; Mon, 16 Aug 2021 09:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CB77262ED; Mon, 16 Aug 2021 09:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93scn069069; Mon, 16 Aug 2021 09:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93saW069068; Mon, 16 Aug 2021 09:03:54 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:54 GMT Message-Id: <202108160903.17G93saW069068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 661550f32bbb - stable/13 - bhyve: Fix synopsis in the usage message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 661550f32bbb0d02f907245c1c35ef71c8e2c705 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:03:54 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=661550f32bbb0d02f907245c1c35ef71c8e2c705 commit 661550f32bbb0d02f907245c1c35ef71c8e2c705 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:04:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:13:49 +0000 bhyve: Fix synopsis in the usage message In particular: - Sort short options to align with style(9) - Add two missing flags: -G and -r - Drop unnecessary angle brackets for consistency - Rename the "vm" argument to vmname for consistency with the manual page MFC after: 2 weeks (cherry picked from commit 03c3e5e40d6497afa33df1d0b43857157c086729) --- usr.sbin/bhyve/bhyverun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index a3e6ef3c4724..8c87a0e7328e 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -222,10 +222,10 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-aehuwxACDHPSWY]\n" + "Usage: %s [-AaCDeHhPSuWwxY]\n" " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" - " %*s [-k ] [-l ] [-m mem] [-o =]\n" - " %*s [-p vcpu:hostcpu] [-s ] [-U uuid] []\n" + " %*s [-G port] [-k file] [-l lpc] [-m mem] [-o var=value]\n" + " %*s [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname\n" " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" " -c: number of cpus and/or topology specification\n" From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F9D2670104; Mon, 16 Aug 2021 09:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WJ029gz3QrD; Mon, 16 Aug 2021 09:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B266F262EE; Mon, 16 Aug 2021 09:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93tYx069093; Mon, 16 Aug 2021 09:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93ts4069092; Mon, 16 Aug 2021 09:03:55 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:55 GMT Message-Id: <202108160903.17G93ts4069092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 12ad3e2b41cc - stable/13 - bhyve: Improve the option description in the usage message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 12ad3e2b41cc82fa4896f6719c688d4182e61509 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:03:56 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=12ad3e2b41cc82fa4896f6719c688d4182e61509 commit 12ad3e2b41cc82fa4896f6719c688d4182e61509 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:13:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:14:58 +0000 bhyve: Improve the option description in the usage message - Sort options as suggested by style(9) - Capitalize some words like CPU and HLT - Add a missing description for the -G flag MFC after: 2 weeks (cherry picked from commit b6a572d03f654236b929b91d376ad1a6dfaa2e9a) --- usr.sbin/bhyve/bhyverun.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 8c87a0e7328e..d14219bbef65 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -226,30 +226,31 @@ usage(int code) " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" " %*s [-G port] [-k file] [-l lpc] [-m mem] [-o var=value]\n" " %*s [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname\n" - " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" - " -c: number of cpus and/or topology specification\n" + " -a: local apic is in xAPIC mode (deprecated)\n" " -C: include guest memory in core file\n" + " -c: number of CPUs and/or topology specification\n" " -D: destroy on power-off\n" " -e: exit on unhandled I/O access\n" + " -G: start a debug server\n" + " -H: vmexit from the guest on HLT\n" " -h: help\n" - " -H: vmexit from the guest on hlt\n" " -k: key=value flat config file\n" " -l: LPC device configuration\n" " -m: memory size in MB\n" " -o: set config 'var' to 'value'\n" - " -p: pin 'vcpu' to 'hostcpu'\n" " -P: vmexit from the guest on pause\n" + " -p: pin 'vcpu' to 'hostcpu'\n" #ifdef BHYVE_SNAPSHOT " -r: path to checkpoint file\n" #endif - " -s: PCI slot config\n" " -S: guest memory cannot be swapped\n" + " -s: PCI slot config\n" + " -U: UUID\n" " -u: RTC keeps UTC time\n" - " -U: uuid\n" - " -w: ignore unimplemented MSRs\n" " -W: force virtio to use single-vector MSI\n" - " -x: local apic is in x2APIC mode\n" + " -w: ignore unimplemented MSRs\n" + " -x: local APIC is in x2APIC mode\n" " -Y: disable MPtable generation\n", progname, (int)strlen(progname), "", (int)strlen(progname), "", (int)strlen(progname), ""); From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78DB966FC6B; Mon, 16 Aug 2021 09:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WK0hpXz3QrM; Mon, 16 Aug 2021 09:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4A50266FE; Mon, 16 Aug 2021 09:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93ulu069123; Mon, 16 Aug 2021 09:03:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93u9o069122; Mon, 16 Aug 2021 09:03:56 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:56 GMT Message-Id: <202108160903.17G93u9o069122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: da4c8aec04eb - stable/13 - bhyve.8: Sort the options in the OPTIONS section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da4c8aec04ebfcc6a80e5b05a3776fb1e8050571 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:03:57 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=da4c8aec04ebfcc6a80e5b05a3776fb1e8050571 commit da4c8aec04ebfcc6a80e5b05a3776fb1e8050571 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:26:04 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:15:25 +0000 bhyve.8: Sort the options in the OPTIONS section No content change intended. Just moving the option descriptions around to follow the order suggested by style(9). MFC after: 2 weeks (cherry picked from commit ccb1c87a6aa563a927a98a6f9175d95929535b21) --- usr.sbin/bhyve/bhyve.8 | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 367a3306786e..d38a9487abef 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -95,15 +95,17 @@ runs until the guest operating system reboots or an unhandled hypervisor exit is detected. .Sh OPTIONS .Bl -tag -width 10n -.It Fl a -The guest's local APIC is configured in xAPIC mode. -The xAPIC mode is the default setting so this option is redundant. -It will be deprecated in a future version. .It Fl A Generate ACPI tables. Required for .Fx Ns /amd64 guests. +.It Fl a +The guest's local APIC is configured in xAPIC mode. +The xAPIC mode is the default setting so this option is redundant. +It will be deprecated in a future version. +.It Fl C +Include guest memory in core file. .It Fl c Op Ar setting ... Number of guest virtual CPUs and/or the CPU topology. @@ -128,8 +130,6 @@ and If a .Ar setting is specified more than once the last one has precedence. -.It Fl C -Include guest memory in core file. .It Fl D Destroy the VM on guest initiated power-off. .It Fl e @@ -150,11 +150,11 @@ begins with .Sq w , .Nm will pause execution at the first instruction waiting for a debugger to attach. -.It Fl h -Print help message and exit. .It Fl H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. +.It Fl h +Print help message and exit. .It Fl k Ar file Set configuration variables from a simple, key-value config file. Each line of the config file is expected to consist of a config variable @@ -196,13 +196,13 @@ Set the configuration variable .Ar var to .Ar value . +.It Fl P +Force the guest virtual CPU to exit when a PAUSE instruction is detected. .It Fl p Ar vcpu:hostcpu Pin guest's virtual CPU .Em vcpu to .Em hostcpu . -.It Fl P -Force the guest virtual CPU to exit when a PAUSE instruction is detected. .It Fl r Ar file Resume a guest from a snapshot. The guest memory contents are restored from @@ -218,6 +218,8 @@ and .Op Fl l options. The count of vCPUs and memory configuration are read from the snapshot. +.It Fl S +Wire guest memory. .It Fl s Op Ar help|slot,emulation Ns Op , Ns Ar conf Configure a virtual PCI slot and function. .Pp @@ -591,22 +593,20 @@ Recording device, typically .Ar /dev/dsp0 . .El .El -.It Fl S -Wire guest memory. -.It Fl u -RTC keeps UTC time. .It Fl U Ar uuid Set the universally unique identifier .Pq UUID in the guest's System Management BIOS System Information structure. By default a UUID is generated from the host's hostname and .Ar vmname . -.It Fl w -Ignore accesses to unimplemented Model Specific Registers (MSRs). -This is intended for debug purposes. +.It Fl u +RTC keeps UTC time. .It Fl W Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts. +.It Fl w +Ignore accesses to unimplemented Model Specific Registers (MSRs). +This is intended for debug purposes. .It Fl x The guest's local APIC is configured in x2APIC mode. .It Fl Y From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E02566FC6D; Mon, 16 Aug 2021 09:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WN2xNcz3QtB; Mon, 16 Aug 2021 09:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3342F269B5; Mon, 16 Aug 2021 09:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G940cl069196; Mon, 16 Aug 2021 09:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G9409X069195; Mon, 16 Aug 2021 09:04:00 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:00 GMT Message-Id: <202108160904.17G9409X069195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ff8c945e9ac2 - stable/13 - bhyve.8: Fix the synopsis of -p MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ff8c945e9ac28301ba6d646f432911a0e6a45403 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:00 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ff8c945e9ac28301ba6d646f432911a0e6a45403 commit ff8c945e9ac28301ba6d646f432911a0e6a45403 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:01:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:55:36 +0000 bhyve.8: Fix the synopsis of -p Use appropriate mdoc macros. MFC after: 2 weeks (cherry picked from commit 90df54374f1ce1b94c10c34c2a5b06be0353ebae) --- usr.sbin/bhyve/bhyve.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 051ca05d85e5..eaef0548e209 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -211,7 +211,7 @@ to .Ar value . .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. -.It Fl p Ar vcpu:hostcpu +.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu Pin guest's virtual CPU .Em vcpu to From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD34067011F; Mon, 16 Aug 2021 09:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WP3X9Lz3R7h; Mon, 16 Aug 2021 09:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AA4E26B9E; Mon, 16 Aug 2021 09:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G941OQ069220; Mon, 16 Aug 2021 09:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G941nZ069219; Mon, 16 Aug 2021 09:04:01 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:01 GMT Message-Id: <202108160904.17G941nZ069219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e08e2c7c1882 - stable/13 - bhyve.8: Clean up description of -r MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e08e2c7c1882818aeda954e7c3372a0a08530a57 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:01 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e08e2c7c1882818aeda954e7c3372a0a08530a57 commit e08e2c7c1882818aeda954e7c3372a0a08530a57 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:03:40 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:55:56 +0000 bhyve.8: Clean up description of -r There is no need to wrap those flags in Op macros. MFC after: 2 weeks (cherry picked from commit b24eea8c7a2ff2bf19b1bdbb2838d185e578581a) --- usr.sbin/bhyve/bhyve.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index eaef0548e209..7147e203640f 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -226,9 +226,9 @@ and the guest device and vCPU state are restored from the file Note that the current snapshot file format requires that the configuration of devices in the new VM match the VM from which the snapshot was taken by specifying the same -.Op Fl s +.Fl s and -.Op Fl l +.Fl l options. The count of vCPUs and memory configuration are read from the snapshot. .It Fl S From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 384E966F87E; Mon, 16 Aug 2021 09:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WL1045z3RD4; Mon, 16 Aug 2021 09:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 015B0269B4; Mon, 16 Aug 2021 09:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93v6V069148; Mon, 16 Aug 2021 09:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93va2069147; Mon, 16 Aug 2021 09:03:57 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:57 GMT Message-Id: <202108160903.17G93va2069147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1103bc026f72 - stable/13 - bhyve.8: Improve the description and synopsis of -l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1103bc026f729f0c0f1a30259a2b3d343a064035 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:03:58 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1103bc026f729f0c0f1a30259a2b3d343a064035 commit 1103bc026f729f0c0f1a30259a2b3d343a064035 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 19:41:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:15:44 +0000 bhyve.8: Improve the description and synopsis of -l - Describe "-l help" separately for readability. - List all the supported comX devices explicitly - Use Cm instead of Ar for command modifiers (i.e., literal values a user can specify as an argument to the command). - Explain where to get more information about the possible values of the conf argument. MFC after: 2 weeks (cherry picked from commit 4c08b978b276f8cfc25f72715e97898f629f7f89) --- usr.sbin/bhyve/bhyve.8 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index d38a9487abef..3105dbca016a 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -166,19 +166,24 @@ value. Blank lines and lines starting with .Sq # are ignored. -.It Fl l Op Ar help|lpcdev Ns Op , Ns Ar conf +.It Fl l Cm help +Print a list of supported LPC devices. +.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices -.Ar com1 -through -.Ar com4 , +.Cm com1 , com2 , com3 , +and +.Cm com4 , the boot ROM device -.Ar bootrom , +.Cm bootrom , and the debug/test device -.Ar pc-testdev . +.Cm pc-testdev . .Pp -.Ar help -print a list of supported LPC devices. +The possible values for the +.Ar conf +argument are listed in the +.Fl s +flag description. .It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t Guest physical memory size in bytes. This must be the same size that was given to From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:03:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE63766FC6C; Mon, 16 Aug 2021 09:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WM1p0Rz3Qnw; Mon, 16 Aug 2021 09:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15E3226B9D; Mon, 16 Aug 2021 09:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G93wCh069172; Mon, 16 Aug 2021 09:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G93wod069171; Mon, 16 Aug 2021 09:03:58 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:03:58 GMT Message-Id: <202108160903.17G93wod069171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a6dca2ecb4f2 - stable/13 - bhyve.8: Improve the description of the -m flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6dca2ecb4f2410d63f1859dcc3237bb07a2c5bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:00 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a6dca2ecb4f2410d63f1859dcc3237bb07a2c5bb commit a6dca2ecb4f2410d63f1859dcc3237bb07a2c5bb Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 19:56:13 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:29:50 +0000 bhyve.8: Improve the description of the -m flag - Stylize the synopsis with proper mdoc macros - Do some wordsmithing on the description for consistency. MFC after: 2 weeks (cherry picked from commit 7e0cb3df687695212ae20cc90d5f2f48bd42eba7) --- usr.sbin/bhyve/bhyve.8 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 3105dbca016a..051ca05d85e5 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -184,18 +184,26 @@ The possible values for the argument are listed in the .Fl s flag description. -.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t -Guest physical memory size in bytes. +.It Xo +.Fl m Ar memsize Ns Oo +.Sm off +.Cm K | k | M | m | G | g | T | t +.Sm on +.Oc +.Xc +Set the guest physical memory size This must be the same size that was given to .Xr bhyveload 8 . .Pp -The size argument may be suffixed with one of K, M, G or T (either upper -or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes, -or terabytes. +The size argument may be suffixed with one of +.Cm K , M , G +or +.Cm T +(either upper or lower case) +to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. If no suffix is given, the value is assumed to be in megabytes. .Pp -.Ar memsize -defaults to 256M. +The default is 256M. .It Fl o Ar var Ns Cm = Ns Ar value Set the configuration variable .Ar var From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03B04670183; Mon, 16 Aug 2021 09:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WQ4tYSz3Qrq; Mon, 16 Aug 2021 09:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8304C269B6; Mon, 16 Aug 2021 09:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G942nL069244; Mon, 16 Aug 2021 09:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G942PE069243; Mon, 16 Aug 2021 09:04:02 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:02 GMT Message-Id: <202108160904.17G942PE069243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b473a7a9e2f0 - stable/13 - bhyve.8: Fix indention in the signals table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b473a7a9e2f0ce47ddd00a82cb8230ca303a4665 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:03 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b473a7a9e2f0ce47ddd00a82cb8230ca303a4665 commit b473a7a9e2f0ce47ddd00a82cb8230ca303a4665 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:06:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:56:10 +0000 bhyve.8: Fix indention in the signals table MFC after: 2 weeks (cherry picked from commit 3357e9482fe8a0ee153ec62d4bd8cb96966bbf26) --- usr.sbin/bhyve/bhyve.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 7147e203640f..d3d44a5a6232 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -680,7 +680,7 @@ stepping over the breakpoint. .Nm deals with the following signals: .Pp -.Bl -tag -width indent -compact +.Bl -tag -width SIGTERM -compact .It SIGTERM Trigger ACPI poweroff for a VM .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAC7666FE55; Mon, 16 Aug 2021 09:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WR5jXXz3R7n; Mon, 16 Aug 2021 09:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA32526B9F; Mon, 16 Aug 2021 09:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G943NF069274; Mon, 16 Aug 2021 09:04:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G943Et069273; Mon, 16 Aug 2021 09:04:03 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:03 GMT Message-Id: <202108160904.17G943Et069273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f5329137c9ea - stable/13 - bhyve.8: Clean-up synopsis of -s MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5329137c9eaf90d901105e608ba15284dfc8993 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:04 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f5329137c9eaf90d901105e608ba15284dfc8993 commit f5329137c9eaf90d901105e608ba15284dfc8993 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:28:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:56:25 +0000 bhyve.8: Clean-up synopsis of -s - Document "-s help" separately for readability. - Use appropriate mdoc macros. MFC after: 2 weeks (cherry picked from commit 449f0e48e902ed36ec0de31279eefad9e6200cdc) --- usr.sbin/bhyve/bhyve.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index d3d44a5a6232..e58c877dacbe 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -233,7 +233,9 @@ options. The count of vCPUs and memory configuration are read from the snapshot. .It Fl S Wire guest memory. -.It Fl s Op Ar help|slot,emulation Ns Op , Ns Ar conf +.It Fl s Cm help +Print a list of supported PCI devices. +.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf Configure a virtual PCI slot and function. .Pp .Nm @@ -242,8 +244,6 @@ slots on the bus. There are 32 available slots, with the option of providing up to 8 functions per slot. .Bl -tag -width 10n -.It Ar help -print a list of supported PCI devices. .It Ar slot .Ar pcislot[:function] .Ar bus:pcislot:function From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:05 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6705667012D; Mon, 16 Aug 2021 09:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WS6vN1z3RDl; Mon, 16 Aug 2021 09:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D20E0269B7; Mon, 16 Aug 2021 09:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G944PO069298; Mon, 16 Aug 2021 09:04:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G944iF069297; Mon, 16 Aug 2021 09:04:04 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:04 GMT Message-Id: <202108160904.17G944iF069297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 7dcc31c9b790 - stable/13 - bhyve.8: Clean up the slot description of -s MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7dcc31c9b790a8b3a7e9d00b22e41740d18dddea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:05 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7dcc31c9b790a8b3a7e9d00b22e41740d18dddea commit 7dcc31c9b790a8b3a7e9d00b22e41740d18dddea Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:56:19 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:56:50 +0000 bhyve.8: Clean up the slot description of -s Also, remove the macros of the nested list which contained slot, emulation and conf. This decreases the indention of the -s description. It was necessary to clean up the slot description. MFC after: 2 weeks (cherry picked from commit 234d8c470b44160fe0cbce49b972b3b19f246a89) --- usr.sbin/bhyve/bhyve.8 | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index e58c877dacbe..8e1a33ea4b42 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -243,10 +243,23 @@ provides PCI bus emulation and virtual devices that can be attached to slots on the bus. There are 32 available slots, with the option of providing up to 8 functions per slot. -.Bl -tag -width 10n -.It Ar slot -.Ar pcislot[:function] -.Ar bus:pcislot:function +.Pp +The +.Ar slot +can be specified in one of the following formats: +.Pp +.Bl -bullet -compact +.It +.Ar pcislot +.It +.Sm off +.Ar pcislot Cm \&: Ar function +.Sm on +.It +.Sm off +.Ar bus Cm \&: Ar pcislot Cm \&: Ar function +.Sm on +.El .Pp The .Ar pcislot @@ -263,7 +276,11 @@ value defaults to 0. If not specified, the .Ar bus value defaults to 0. -.It Ar emulation +.Pp +The +.Ar emulation +argument +can be one of the following: .Bl -tag -width 10n .It Li hostbridge | Li amd_hostbridge .Pp @@ -313,8 +330,10 @@ NVM Express (NVMe) controller. .It Li hda High Definition Audio Controller. .El -.It Op Ar conf -This optional parameter describes the backend for device emulations. +.Pp +The optional parameter +.Ar conf +describes the backend for device emulations. If .Ar conf is not specified, the device emulation has no backend and can be From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4802666FC7F; Mon, 16 Aug 2021 09:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WV0tHHz3RG9; Mon, 16 Aug 2021 09:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECA2526BA0; Mon, 16 Aug 2021 09:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G945pu069322; Mon, 16 Aug 2021 09:04:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G945pF069321; Mon, 16 Aug 2021 09:04:05 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:05 GMT Message-Id: <202108160904.17G945pF069321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: d314e354755a - stable/13 - bhyve.8: Improve emulation description of the -s flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d314e354755a221390364435378be0fbb30f9963 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:06 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d314e354755a221390364435378be0fbb30f9963 commit d314e354755a221390364435378be0fbb30f9963 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:08:39 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:57:12 +0000 bhyve.8: Improve emulation description of the -s flag - Set width of the list to the longest key word for readability. - Separate descriptions of amd_hostbridge and hostbridge emulations. Also, wordsmith their descriptions for consistency with other entries. - Use Cm instead of Li for command modifiers. - Do not stylize AMD with Li, there's no need to do it. - Mention COM3 and COM4 in the definition of lpc. - Fix a typo in the definition of ahci-hd ("hard drive" instead of "hard-drive"). MFC after: 2 weeks (cherry picked from commit 7014cb2393594ee4a8389c65d507afacf729c041) --- usr.sbin/bhyve/bhyve.8 | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 8e1a33ea4b42..6db14afa07c3 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -281,53 +281,53 @@ The .Ar emulation argument can be one of the following: -.Bl -tag -width 10n -.It Li hostbridge | Li amd_hostbridge -.Pp -Provide a simple host bridge. +.Bl -tag -width "amd_hostbridge" +.It Cm hostbridge +A simple host bridge. This is usually configured at slot 0, and is required by most guest operating systems. -The -.Li amd_hostbridge -emulation is identical but uses a PCI vendor ID of -.Li AMD . -.It Li passthru +.It Cm amd_hostbridge +Emulation identical to +.Cm hostbridge +using a PCI vendor ID of AMD. +.It Cm passthru PCI pass-through device. -.It Li virtio-net +.It Cm virtio-net Virtio network interface. -.It Li virtio-blk +.It Cm virtio-blk Virtio block storage interface. -.It Li virtio-scsi +.It Cm virtio-scsi Virtio SCSI interface. -.It Li virtio-9p +.It Cm virtio-9p Virtio 9p (VirtFS) interface. -.It Li virtio-rnd +.It Cm virtio-rnd Virtio RNG interface. -.It Li virtio-console +.It Cm virtio-console Virtio console interface, which exposes multiple ports to the guest in the form of simple char devices for simple IO between the guest and host userspaces. -.It Li ahci +.It Cm ahci AHCI controller attached to arbitrary devices. -.It Li ahci-cd +.It Cm ahci-cd AHCI controller attached to an ATAPI CD/DVD. -.It Li ahci-hd -AHCI controller attached to a SATA hard-drive. -.It Li e1000 +.It Cm ahci-hd +AHCI controller attached to a SATA hard drive. +.It Cm e1000 Intel e82545 network interface. -.It Li uart +.It Cm uart PCI 16550 serial device. -.It Li lpc -LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports, a boot ROM, and, +.It Cm lpc +LPC PCI-ISA bridge with COM1, COM2, COM3, and COM4 16550 serial ports, +a boot ROM, and, optionally, the debug/test device. The LPC bridge emulation can only be configured on bus 0. -.It Li fbuf +.It Cm fbuf Raw framebuffer device attached to VNC server. -.It Li xhci +.It Cm xhci eXtensible Host Controller Interface (xHCI) USB controller. -.It Li nvme +.It Cm nvme NVM Express (NVMe) controller. -.It Li hda +.It Cm hda High Definition Audio Controller. .El .Pp From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9A59670305; Mon, 16 Aug 2021 09:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WW2mjtz3QxP; Mon, 16 Aug 2021 09:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B89426B14; Mon, 16 Aug 2021 09:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G9472U069346; Mon, 16 Aug 2021 09:04:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G947oT069345; Mon, 16 Aug 2021 09:04:07 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:07 GMT Message-Id: <202108160904.17G947oT069345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 63b55e8312dc - stable/13 - bhyve.8: Clean up network backends section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 63b55e8312dc6a8b42e9e6ca52c74a4fe4cadd0e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:07 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=63b55e8312dc6a8b42e9e6ca52c74a4fe4cadd0e commit 63b55e8312dc6a8b42e9e6ca52c74a4fe4cadd0e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:29:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:57:50 +0000 bhyve.8: Clean up network backends section - Reformat the format lists, use appropriate mdoc macros for readability. - Add a missing Oxford comma. MFC after: 2 weeks (cherry picked from commit 7fb22729816ef6c9e65e5c544047e669edd2f06d) --- usr.sbin/bhyve/bhyve.8 | 55 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 6db14afa07c3..4eba24455b69 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -339,14 +339,34 @@ If is not specified, the device emulation has no backend and can be considered unconnected. .Pp -Network backends: -.Bl -tag -width 10n -.It Ar tapN Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc -.It Ar vmnetN Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc -.It Ar netgraph,path=ADDRESS,peerhook=HOOK Ns Oo , Ns Ar socket=NAME Oc Ns Oo , Ns Ar hook=HOOK Oc Ns Oo , Ns Ar mac=xx:xx:xx:xx:xx:xx Oc Ns Oo , Ns Ar mtu=N Oc -.Pp +Network backends formats for +.Ar conf : +.Sm off +.Bl -bullet +.It +.Xo +.Cm tap Ar N +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N +.Xc +.It +.Xo +.Cm vmnet Ar N +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N +.Xc +.It +.Xo +.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK +.Op Cm \&,socket= Ar NAME +.Op Cm \&,hook= Ar HOOK +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N +.Xc +.El +.Sm on If -.Ar mac +.Cm mac is not specified, the MAC address is derived from a fixed OUI and the remaining bytes from an MD5 hash of the slot and function numbers and the device name. @@ -355,32 +375,35 @@ The MAC address is an ASCII string in .Xr ethers 5 format. .Pp -With virtio-net devices, the -.Ar mtu +With +.Cm virtio-net +devices, the +.Cm mtu parameter can be specified to inform the guest about the largest MTU that should be allowed, expressed in bytes. .Pp -With netgraph backend, the -.Ar path +With +.Cm netgraph +backend, the +.Cm path and -.Ar peerhook +.Cm peerhook parameters must be specified to set the destination node and corresponding hook. The optional parameters -.Ar socket +.Cm socket and -.Ar hook +.Cm hook may be used to set the .Xr ng_socket 4 node name and source hook. The .Ar ADDRESS , -.Ar HOOK +.Ar HOOK , and .Ar NAME must comply with .Xr netgraph 4 addressing rules. -.El .Pp Block storage devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DD26670317; Mon, 16 Aug 2021 09:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WZ6pG9z3QpQ; Mon, 16 Aug 2021 09:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BAD426BA1; Mon, 16 Aug 2021 09:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94A3s069424; Mon, 16 Aug 2021 09:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94A5o069423; Mon, 16 Aug 2021 09:04:10 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:10 GMT Message-Id: <202108160904.17G94A5o069423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5789e28b214f - stable/13 - bhyve.8: Clean up 9P device backends section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5789e28b214f3652f3969b00ea2ae1c97807b879 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:11 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5789e28b214f3652f3969b00ea2ae1c97807b879 commit 5789e28b214f3652f3969b00ea2ae1c97807b879 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:52:48 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:59:10 +0000 bhyve.8: Clean up 9P device backends section MFC after: 2 weeks (cherry picked from commit 2d00b57022f09561706afef9050e0b527c41314a) --- usr.sbin/bhyve/bhyve.8 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index f0109fa3d969..1410769d8a37 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -454,16 +454,19 @@ Initiator ID to use when sending requests to specified CTL port. The default value is 0. .El .Pp -9P devices: -.Bl -tag -width 10n -.It Pa sharename=/path/to/share[,9p-device-options] +9P device backends: +.Sm off +.Bl -bullet +.It +.Ar sharename Cm = Ar /path/to/share Op Cm \&, Ar 9p-device-options .El +.Sm on .Pp The .Ar 9p-device-options are: .Bl -tag -width 10n -.It Li ro +.It Cm ro Expose the share in read-only mode. .El .Pp From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD964670199; Mon, 16 Aug 2021 09:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WX4Rysz3RB8; Mon, 16 Aug 2021 09:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 467F126B15; Mon, 16 Aug 2021 09:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G948Ud069370; Mon, 16 Aug 2021 09:04:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G948w9069369; Mon, 16 Aug 2021 09:04:08 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:08 GMT Message-Id: <202108160904.17G948w9069369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c66d332730bf - stable/13 - bhyve.8: Clean up block storage device backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c66d332730bfe5c13e45ed48768c8a9d994485bd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:09 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c66d332730bfe5c13e45ed48768c8a9d994485bd commit c66d332730bfe5c13e45ed48768c8a9d994485bd Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:39:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:58:26 +0000 bhyve.8: Clean up block storage device backends description MFC after: 2 weeks (cherry picked from commit 5232a35f1ed7b8fa4f378897598438c2056ef60e) --- usr.sbin/bhyve/bhyve.8 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 4eba24455b69..5c73852b422c 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -405,29 +405,33 @@ must comply with .Xr netgraph 4 addressing rules. .Pp -Block storage devices: -.Bl -tag -width 10n -.It Pa /filename Ns Oo , Ns Ar block-device-options Oc -.It Pa /dev/xxx Ns Oo , Ns Ar block-device-options Oc +Block storage device backends: +.Sm off +.Bl -bullet +.It +.Ar /filename Op Cm \&, Ar block-device-options +.It +.Ar /dev/xxx Op Cm \&, Ar block-device-options .El +.Sm on .Pp The .Ar block-device-options are: -.Bl -tag -width 8n -.It Li nocache +.Bl -tag -width 10n +.It Cm nocache Open the file with .Dv O_DIRECT . -.It Li direct +.It Cm direct Open the file using .Dv O_SYNC . -.It Li ro +.It Cm ro Force the file to be opened read-only. -.It Li sectorsize= Ns Ar logical Ns Oo / Ns Ar physical Oc +.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc Specify the logical and physical sector sizes of the emulated disk. The physical sector size is optional and is equal to the logical sector size if not explicitly specified. -.It Li nodelete +.It Cm nodelete Disable emulation of guest trim requests via .Dv DIOCGDELETE requests. @@ -647,7 +651,6 @@ Playback device, typically Recording device, typically .Ar /dev/dsp0 . .El -.El .It Fl U Ar uuid Set the universally unique identifier .Pq UUID From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B663670132; Mon, 16 Aug 2021 09:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7WY5CRJz3QpH; Mon, 16 Aug 2021 09:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CAD226C0B; Mon, 16 Aug 2021 09:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G949Fj069400; Mon, 16 Aug 2021 09:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G949rr069399; Mon, 16 Aug 2021 09:04:09 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:09 GMT Message-Id: <202108160904.17G949rr069399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 78863cd50bb6 - stable/13 - bhyve.8: Clean up SCSI device backends section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78863cd50bb6fc107a740bbb5538a173a5803032 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:10 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=78863cd50bb6fc107a740bbb5538a173a5803032 commit 78863cd50bb6fc107a740bbb5538a173a5803032 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:49:18 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:58:41 +0000 bhyve.8: Clean up SCSI device backends section MFC after: 2 weeks (cherry picked from commit 7c5829c942822561688c9b8239900773c6d82db4) --- usr.sbin/bhyve/bhyve.8 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 5c73852b422c..f0109fa3d969 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -437,16 +437,19 @@ Disable emulation of guest trim requests via requests. .El .Pp -SCSI devices: -.Bl -tag -width 10n -.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar scsi-device-options Oc +SCSI device backends: +.Sm off +.Bl -bullet +.It +.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc .El +.Sm on .Pp The .Ar scsi-device-options are: .Bl -tag -width 10n -.It Li iid= Ns Ar IID +.It Cm iid= Ns Ar IID Initiator ID to use when sending requests to specified CTL port. The default value is 0. .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBFDB6701A5; Mon, 16 Aug 2021 09:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wd3H1Qz3Qxq; Mon, 16 Aug 2021 09:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5DCC26C84; Mon, 16 Aug 2021 09:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94CFx069472; Mon, 16 Aug 2021 09:04:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94CER069471; Mon, 16 Aug 2021 09:04:12 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:12 GMT Message-Id: <202108160904.17G94CER069471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 34b945ccf636 - stable/13 - bhyve.8: Clean up virtio console device backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 34b945ccf636386478a63bc3913ac044db671426 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:14 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=34b945ccf636386478a63bc3913ac044db671426 commit 34b945ccf636386478a63bc3913ac044db671426 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:23:26 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:59:48 +0000 bhyve.8: Clean up virtio console device backends description MFC after: 2 weeks (cherry picked from commit 3f4c771f64e816750de08ab6fd7e7bf29398f5fb) --- usr.sbin/bhyve/bhyve.8 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 06356a64f596..88be882039c4 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -509,9 +509,14 @@ The host device must have been reserved at boot-time using the loader variable as described in .Xr vmm 4 . .Pp -Virtio console devices: -.Bl -tag -width 10n -.It Li port1= Ns Pa /path/to/port1.sock Ns ,anotherport= Ns Pa ... +Virtio console device backends: +.Bl -bullet +.Sm off +.It +.Cm port1= Ns Ar /path/to/port1.sock Ns Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ... +.Sm on +.El +.Pp A maximum of 16 ports per device can be created. Every port is named and corresponds to a Unix domain socket created by .Nm . @@ -519,7 +524,7 @@ Every port is named and corresponds to a Unix domain socket created by accepts at most one connection per port at a time. .Pp Limitations: -.Bl -bullet -offset 2n +.Bl -bullet -offset .It Due to lack of destructors in .Nm , @@ -527,12 +532,13 @@ sockets on the filesystem must be cleaned up manually after .Nm exits. .It -There is no way to use the "console port" feature, nor the console port +There is no way to use the +.Dq console port +feature, nor the console port resize at present. .It Emergency write is advertised, but no-op at present. .El -.El .Pp Framebuffer devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCFAE6701A9; Mon, 16 Aug 2021 09:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wf2RBgz3RFT; Mon, 16 Aug 2021 09:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 033C3266FF; Mon, 16 Aug 2021 09:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94DoX069496; Mon, 16 Aug 2021 09:04:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94DQN069495; Mon, 16 Aug 2021 09:04:13 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:13 GMT Message-Id: <202108160904.17G94DQN069495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5f8dd688e0a9 - stable/13 - bhyve.8: Improve framebuffer backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f8dd688e0a99d4ca16aff40ac61cf8643835b80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:15 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5f8dd688e0a99d4ca16aff40ac61cf8643835b80 commit 5f8dd688e0a99d4ca16aff40ac61cf8643835b80 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:59:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:00:02 +0000 bhyve.8: Improve framebuffer backends description - Use appropriate mdoc macros - Document that tcp= is a synonym to rfb= (tcp is used in the examples, but never mentioned) - Clarify the IP address specification MFC after: 2 weeks (cherry picked from commit 8b97e97548bdc74cf3b4939a0b21cfdd27d8c11c) --- usr.sbin/bhyve/bhyve.8 | 62 +++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 88be882039c4..afc3a5c615c8 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -540,35 +540,52 @@ resize at present. Emergency write is advertised, but no-op at present. .El .Pp -Framebuffer devices: +Framebuffer devices backends: +.Bl -bullet +.Sm off +.It +.Op Cm rfb= Ar ip-and-port +.Op Cm ,w= Ar width +.Op Cm ,h= Ar height +.Op Cm ,vga= Ar vgaconf +.Op Cm ,wait +.Op Cm ,password= Ar password +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Xo -.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns -.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns -.Ar password Oc -.Xc -.Bl -tag -width 8n -.It Ar IPv4:port No or Ar [IPv6%zone]:port -An -.Ar IP -address and a +.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port +An IP address and a port VNC should listen on. +There are two formats: +.Pp +.Bl -bullet -compact +.It IPv4 +.Sm off +.Op Ar IPv4 Cm \&: .Ar port -VNC should listen on. +.Sm on +.It IPv6 +.Sm off +.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port +.Sm on +.El +.Pp The default is to listen on localhost IPv4 address and default VNC port 5900. An IPv6 address must be enclosed in square brackets and may contain an optional zone identifier. -.It Ar width No and Ar height +.It Cm w= Ns Ar width No and Cm h= Ns Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. Minimal supported resolution is 640x480 pixels, and maximum is 1920x1200 pixels. -.It Ar vgaconf +.It Cm vga= Ns Ar vgaconf Possible values for this option are -.Dq io +.Cm io (default), -.Dq on +.Cm on , and -.Dq off . +.Cm off . PCI graphics cards have a dual personality in that they are standard PCI devices with BAR addressing, but may also implicitly decode legacy VGA I/O space @@ -576,18 +593,18 @@ implicitly decode legacy VGA I/O space and memory space .Pq 64KB at Ad 0xA0000 . The default -.Dq io +.Cm io option should be used for guests that attempt to issue BIOS calls which result in I/O port queries, and fail to boot if I/O decode is disabled. .Pp The -.Dq on +.Cm on option should be used along with the CSM BIOS capability in UEFI to boot traditional BIOS guests that require the legacy VGA I/O and memory regions to be available. .Pp The -.Dq off +.Cm off option should be used for the UEFI guests that assume that VGA adapter is present if they detect the I/O ports. An example of such a guest is @@ -600,19 +617,18 @@ Please refer to the wiki page .Pq Lk https://wiki.freebsd.org/bhyve for configuration notes of particular guests. -.It wait +.It Cm wait Instruct .Nm to only boot upon the initiation of a VNC connection, simplifying the installation of operating systems that require immediate keyboard input. This can be removed for post-installation use. -.It password +.It Cm password= Ns Ar password This type of authentication is known to be cryptographically weak and is not intended for use on untrusted networks. Many implementations will want to use stronger security, such as running the session over an encrypted channel provided by IPsec or SSH. .El -.El .Pp xHCI USB devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE67566FE76; Mon, 16 Aug 2021 09:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wc2MZgz3RBP; Mon, 16 Aug 2021 09:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2C94269B8; Mon, 16 Aug 2021 09:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94B7H069448; Mon, 16 Aug 2021 09:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94BR3069447; Mon, 16 Aug 2021 09:04:11 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:11 GMT Message-Id: <202108160904.17G94BR3069447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 689d66d30af7 - stable/13 - bhyve.8: Clean up TTY, boot ROM, and pass-through descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 689d66d30af7d6693a9d8c6efb15ea6494edd71f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:12 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=689d66d30af7d6693a9d8c6efb15ea6494edd71f commit 689d66d30af7d6693a9d8c6efb15ea6494edd71f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:09:22 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 08:59:33 +0000 bhyve.8: Clean up TTY, boot ROM, and pass-through descriptions MFC after: 2 weeks (cherry picked from commit 2fda01a1b7e958e6cfffda512954b8d6c40a064e) --- usr.sbin/bhyve/bhyve.8 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 1410769d8a37..06356a64f596 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -470,28 +470,28 @@ are: Expose the share in read-only mode. .El .Pp -TTY devices: +TTY device backends: .Bl -tag -width 10n -.It Li stdio +.It Cm stdio Connect the serial port to the standard input and output of the .Nm process. -.It Pa /dev/xxx +.It Ar /dev/xxx Use the host TTY device for serial port I/O. .El .Pp -Boot ROM device: +Boot ROM device backends: .Bl -tag -width 10n -.It Pa romfile +.It Ar romfile Map .Ar romfile in the guest address space reserved for boot firmware. .El .Pp -Pass-through devices: +Pass-through device backends: .Bl -tag -width 10n -.It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function +.It Ns Ar slot Ns Cm \&/ Ns Ar bus Ns Cm \&/ Ns Ar function Connect to a PCI device on the host at the selector described by .Ar slot , .Ar bus , From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0853C670387; Mon, 16 Aug 2021 09:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wg2scYz3R8R; Mon, 16 Aug 2021 09:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 300BE269B9; Mon, 16 Aug 2021 09:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94FUj069526; Mon, 16 Aug 2021 09:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94FKa069525; Mon, 16 Aug 2021 09:04:15 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:15 GMT Message-Id: <202108160904.17G94FKa069525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a157ddbccada - stable/13 - bhyve.8: Improve documentation of NVME backend MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a157ddbccada17ed021cb3dd5566a8af604ebffd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:16 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a157ddbccada17ed021cb3dd5566a8af604ebffd commit a157ddbccada17ed021cb3dd5566a8af604ebffd Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:16:51 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:00:20 +0000 bhyve.8: Improve documentation of NVME backend - Document the configuration format. - Document two additional configuration options: eui64 and dsm. MFC after: 2 weeks (cherry picked from commit 6eff58acc776d8308863f49b89664997d4642a4e) --- usr.sbin/bhyve/bhyve.8 | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index afc3a5c615c8..e5eec5288204 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -630,32 +630,55 @@ Many implementations will want to use stronger security, such as running the session over an encrypted channel provided by IPsec or SSH. .El .Pp -xHCI USB devices: +xHCI USB device backends: .Bl -tag -width 10n -.It Li tablet +.It Cm tablet A USB tablet device which provides precise cursor synchronization when using VNC. .El .Pp -NVMe devices: +NVMe device backends: +.Bl -bullet +.Sm off +.It +.Ar devpath +.Op Cm ,maxq= Ar # +.Op Cm ,qsz= Ar # +.Op Cm ,ioslots= Ar # +.Op Cm ,sectsz= Ar # +.Op Cm ,ser= Ar # +.Op Cm ,eui64= Ar # +.Op Cm ,dsm= Ar opt +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li devpath +.It Ar devpath Accepted device paths are: .Ar /dev/blockdev or .Ar /path/to/image or -.Ar ram=size_in_MiB . -.It Li maxq +.Cm ram= Ns Ar size_in_MiB . +.It Cm maxq Max number of queues. -.It Li qsz +.It Cm qsz Max elements in each queue. -.It Li ioslots +.It Cm ioslots Max number of concurrent I/O requests. -.It Li sectsz +.It Cm sectsz Sector size (defaults to blockif sector size). -.It Li ser +.It Cm ser Serial number with maximum 20 characters. +.It Cm eui64 +IEEE Extended Unique Identifier (8 byte value). +.It Cm dsm +DataSet Management support. +Supported values are: +.Cm auto , enable , +and +.Cm disable . .El .Pp AHCI devices: From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C11B670246; Mon, 16 Aug 2021 09:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wh4NJ2z3RJq; Mon, 16 Aug 2021 09:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50723262EF; Mon, 16 Aug 2021 09:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94GMt069550; Mon, 16 Aug 2021 09:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94G3S069549; Mon, 16 Aug 2021 09:04:16 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:16 GMT Message-Id: <202108160904.17G94G3S069549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fe7ce1f3b80a - stable/13 - bhyve.8: Improve AHCI backends documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fe7ce1f3b80a63ddfffc7b840069b08abb0afd0c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:17 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fe7ce1f3b80a63ddfffc7b840069b08abb0afd0c commit fe7ce1f3b80a63ddfffc7b840069b08abb0afd0c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:44:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:00:27 +0000 bhyve.8: Improve AHCI backends documentation - Document the backend format. MFC after: 2 weeks (cherry picked from commit d5fcc4b6066e878ed70bce7a52d6aca605befde5) --- usr.sbin/bhyve/bhyve.8 | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index e5eec5288204..7bbb663665d7 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -681,15 +681,29 @@ and .Cm disable . .El .Pp -AHCI devices: +AHCI device backends: +.Bl -bullet +.It +.Sm off +.Op Oo Cm hd\&: | cd\&: Oc Ar path +.Op Cm ,nmrr= Ar nmrr +.Op Cm ,ser= Ar # +.Op Cm ,rev= Ar # +.Op Cm ,model= Ar # +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li nmrr -Nominal Media Rotation Rate, known as RPM. value 1 will indicate device as Solid State Disk. default value is 0, not report. -.It Li ser +.It Cm nmrr +Nominal Media Rotation Rate, known as RPM. +Value 1 will indicate device as Solid State Disk. +Default value is 0, not report. +.It Cm ser Serial Number with maximum 20 characters. -.It Li rev +.It Cm rev Revision Number with maximum 8 characters. -.It Li model +.It Cm model Model Number with maximum 40 characters. .El .Pp From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA5FC670334; Mon, 16 Aug 2021 09:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wk6Ltbz3RFw; Mon, 16 Aug 2021 09:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F244269BA; Mon, 16 Aug 2021 09:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94IpM069598; Mon, 16 Aug 2021 09:04:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94IbV069597; Mon, 16 Aug 2021 09:04:18 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:18 GMT Message-Id: <202108160904.17G94IbV069597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: f1297ee6459a - stable/13 - bhyve.8: Fix mandoc -Tlint issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1297ee6459a8091c3b5a23e72fa499455f5a7eb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:19 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f1297ee6459a8091c3b5a23e72fa499455f5a7eb commit f1297ee6459a8091c3b5a23e72fa499455f5a7eb Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:53:06 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:00:54 +0000 bhyve.8: Fix mandoc -Tlint issues While here, keep network backends section consistent with other sections. MFC after: 2 weeks (cherry picked from commit 8d9fefe64334818a27812658bf9efd0371fbc77c) --- usr.sbin/bhyve/bhyve.8 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index bf3c792dd235..79b6d9bfb240 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -56,7 +56,7 @@ .Sm off .Ar memsize .Oo -.Cm K No | Cm k No | Cm M No | Cm m No | Cm G No | Cm g No | Cm T No | Cm t +.Cm K | Cm k | Cm M | Cm m | Cm G | Cm g | Cm T | Cm t .Oc .Sm on .Oc @@ -339,8 +339,7 @@ If is not specified, the device emulation has no backend and can be considered unconnected. .Pp -Network backends formats for -.Ar conf : +Network device backends: .Sm off .Bl -bullet .It @@ -524,7 +523,7 @@ Every port is named and corresponds to a Unix domain socket created by accepts at most one connection per port at a time. .Pp Limitations: -.Bl -bullet -offset +.Bl -bullet .It Due to lack of destructors in .Nm , @@ -560,12 +559,12 @@ An IP address and a port VNC should listen on. There are two formats: .Pp .Bl -bullet -compact -.It IPv4 +.It .Sm off .Op Ar IPv4 Cm \&: .Ar port .Sm on -.It IPv6 +.It .Sm off .Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port .Sm on From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:04:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83DA96702CD; Mon, 16 Aug 2021 09:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7Wk287vz3R0t; Mon, 16 Aug 2021 09:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77DF726C85; Mon, 16 Aug 2021 09:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G94HWn069574; Mon, 16 Aug 2021 09:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G94HYp069573; Mon, 16 Aug 2021 09:04:17 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:04:17 GMT Message-Id: <202108160904.17G94HYp069573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a3dcec67d1e9 - stable/13 - bhyve: Document the format for HD audio backends MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a3dcec67d1e94d13602812dde9b74f100851cc09 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:04:18 -0000 The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a3dcec67d1e94d13602812dde9b74f100851cc09 commit a3dcec67d1e94d13602812dde9b74f100851cc09 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:50:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:00:38 +0000 bhyve: Document the format for HD audio backends - This change is done for consistency with other backend definitions. MFC after: 2 weeks (cherry picked from commit 061f37d280976e0f79f823c732fa80825ce48ded) --- usr.sbin/bhyve/bhyve.8 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 7bbb663665d7..bf3c792dd235 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -707,12 +707,21 @@ Revision Number with maximum 8 characters. Model Number with maximum 40 characters. .El .Pp -HD Audio devices: +HD Audio device backends: +.Bl -bullet +.It +.Sm off +.Op Cm play= Ar playback +.Op Cm ,rec= Ar recording +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li play +.It Cm play Playback device, typically .Ar /dev/dsp0 . -.It Li rec +.It Cm rec Recording device, typically .Ar /dev/dsp0 . .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:23:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7733E671183; Mon, 16 Aug 2021 09:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7xw2vGwz3jGp; Mon, 16 Aug 2021 09:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4710026BF8; Mon, 16 Aug 2021 09:23:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G9NWG6096608; Mon, 16 Aug 2021 09:23:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G9NWrV096607; Mon, 16 Aug 2021 09:23:32 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:23:32 GMT Message-Id: <202108160923.17G9NWrV096607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e6ff640738b5 - stable/13 - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6ff640738b5a158fa7de33349ca51d278609dc1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:23:32 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ff640738b5a158fa7de33349ca51d278609dc1 commit e6ff640738b5a158fa7de33349ca51d278609dc1 Author: Konstantin Belousov AuthorDate: 2021-01-22 21:47:06 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-16 09:23:12 +0000 nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write (cherry picked from commit aa8c1f8d84d2638a354e71f9593e978d00878243) --- sys/fs/nfsclient/nfs_clbio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 67bc3b7ce4d5..f4b0855f7dda 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -903,7 +903,7 @@ ncl_write(struct vop_write_args *ap) struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; int bcount, noncontig_write, obcount; - int bp_cached, n, on, error = 0, error1, wouldcommit; + int bp_cached, n, on, error = 0, error1, save2, wouldcommit; size_t orig_resid, local_resid; off_t orig_size, tmp_off; @@ -995,6 +995,7 @@ ncl_write(struct vop_write_args *ap) if (vn_rlimit_fsize(vp, uio, td)) return (EFBIG); + save2 = curthread_pflags2_set(TDP2_SBPAGES); biosize = vp->v_bufobj.bo_bsize; /* * Find all of this file's B_NEEDCOMMIT buffers. If our writes @@ -1033,7 +1034,7 @@ ncl_write(struct vop_write_args *ap) error = ncl_vinvalbuf(vp, V_SAVE | ((ioflag & IO_VMIO) != 0 ? V_VMIO : 0), td, 1); if (error != 0) - return (error); + goto out; wouldcommit = biosize; } } @@ -1073,6 +1074,7 @@ again: NFSLOCKNODE(np); np->n_size = uio->uio_offset + n; np->n_flag |= NMODIFIED; + np->n_flag &= ~NVNSETSZSKIP; vnode_pager_setsize(vp, np->n_size); NFSUNLOCKNODE(np); @@ -1102,6 +1104,7 @@ again: if (uio->uio_offset + n > np->n_size) { np->n_size = uio->uio_offset + n; np->n_flag |= NMODIFIED; + np->n_flag &= ~NVNSETSZSKIP; vnode_pager_setsize(vp, np->n_size); } NFSUNLOCKNODE(np); @@ -1291,6 +1294,13 @@ again: } } +out: + curthread_pflags2_restore(save2); + if ((curthread->td_pflags2 & TDP2_SBPAGES) == 0) { + NFSLOCKNODE(np); + ncl_pager_setsize(vp, NULL); + } + return (error); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 09:23:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F4B66710D0; Mon, 16 Aug 2021 09:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gp7xx3ppKz3jfR; Mon, 16 Aug 2021 09:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68F2B27024; Mon, 16 Aug 2021 09:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17G9NXJa096632; Mon, 16 Aug 2021 09:23:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17G9NXvj096631; Mon, 16 Aug 2021 09:23:33 GMT (envelope-from git) Date: Mon, 16 Aug 2021 09:23:33 GMT Message-Id: <202108160923.17G9NXvj096631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f8cb59615252 - stable/13 - nfs_write(): do not call ncl_pager_setsize() after clearing TDP2_SBPAGES MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f8cb59615252f38ad0855abfcd01fd564a7c4862 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 09:23:33 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f8cb59615252f38ad0855abfcd01fd564a7c4862 commit f8cb59615252f38ad0855abfcd01fd564a7c4862 Author: Konstantin Belousov AuthorDate: 2021-01-23 21:40:07 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-16 09:23:12 +0000 nfs_write(): do not call ncl_pager_setsize() after clearing TDP2_SBPAGES (cherry picked from commit bd01a69f4836994b50b492883fb5367db41fb506) --- sys/fs/nfsclient/nfs_clbio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index f4b0855f7dda..ff9f446ff1ef 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1296,11 +1296,6 @@ again: out: curthread_pflags2_restore(save2); - if ((curthread->td_pflags2 & TDP2_SBPAGES) == 0) { - NFSLOCKNODE(np); - ncl_pager_setsize(vp, NULL); - } - return (error); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:52 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FF096728D8; Mon, 16 Aug 2021 11:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQN1rvMz3qqG; Mon, 16 Aug 2021 11:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23B6E712; Mon, 16 Aug 2021 11:14:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEq07043906; Mon, 16 Aug 2021 11:14:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEqwZ043905; Mon, 16 Aug 2021 11:14:52 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:52 GMT Message-Id: <202108161114.17GBEqwZ043905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2b3a36e9f026 - stable/12 - bhyve.8: Make synopsis more readable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2b3a36e9f0263988d947c107095f9b8676fd432e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:52 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2b3a36e9f0263988d947c107095f9b8676fd432e commit 2b3a36e9f0263988d947c107095f9b8676fd432e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 17:54:45 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:21:48 +0000 bhyve.8: Make synopsis more readable There is no need to squeeze all the possible options into one synopsis entry. Let "-l help" and "-s help" be listed separately. While here, keep -s and its arguments on the same line. MFC after: 2 weeks (cherry picked from commit bfe40b692d087cdd5fdeea69e18496ab2a7f67ac) --- usr.sbin/bhyve/bhyve.8 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index a104a60ab21f..e99782bc22b8 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2020 +.Dd April 18, 2021 .Dt BHYVE 8 .Os .Sh NAME @@ -49,7 +49,7 @@ .Op Fl g Ar gdbport .Oo Fl l .Sm off -.Cm help | Ar lpcdev Op Cm \&, Ar conf +.Ar lpcdev Op Cm \&, Ar conf .Sm on .Oc .Oo Fl m @@ -61,13 +61,17 @@ .Sm on .Oc .Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu -.Oo Fl s .Sm off -.Cm help | Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf +.Oo Fl s\~ +.Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf .Sm on .Oc .Op Fl U Ar uuid .Ar vmname +.Nm +.Fl l Cm help +.Nm +.Fl s Cm help .Sh DESCRIPTION .Nm is a hypervisor that runs guest operating systems inside a From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 957476725F1; Mon, 16 Aug 2021 11:14:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQP36JXz3qh3; Mon, 16 Aug 2021 11:14:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40E1B713; Mon, 16 Aug 2021 11:14:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBErUW043930; Mon, 16 Aug 2021 11:14:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBErHJ043929; Mon, 16 Aug 2021 11:14:53 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:53 GMT Message-Id: <202108161114.17GBErHJ043929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 10afb2770bb9 - stable/12 - bhyve: Fix synopsis in the usage message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 10afb2770bb99a4e3cc4e1c8ddbe32d9f5b80f0a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:53 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=10afb2770bb99a4e3cc4e1c8ddbe32d9f5b80f0a commit 10afb2770bb99a4e3cc4e1c8ddbe32d9f5b80f0a Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:04:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:24:56 +0000 bhyve: Fix synopsis in the usage message In particular: - Sort short options to align with style(9) - Add two missing flags: -G and -r - Drop unnecessary angle brackets for consistency - Rename the "vm" argument to vmname for consistency with the manual page MFC after: 2 weeks (cherry picked from commit 03c3e5e40d6497afa33df1d0b43857157c086729) Note: the -r flag is not present on branch stable/12. --- usr.sbin/bhyve/bhyverun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index c2990d480808..fb7c0357c9f9 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -213,10 +213,10 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-abehuwxACDHPSWY]\n" + "Usage: %s [-AaCDeHhPSuWwxY]\n" " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" - " %*s [-g ] [-l ]\n" - " %*s [-m mem] [-p vcpu:hostcpu] [-s ] [-U uuid] \n" + " %*s [-G port] [-k file] [-l lpc] [-m mem] [-o var=value]\n" + " %*s [-p vcpu:hostcpu] [-s pci] [-U uuid] vmname\n" " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" " -c: number of cpus and/or topology specification\n" From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:54 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8788A6728DB; Mon, 16 Aug 2021 11:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQQ3L0mz3qn0; Mon, 16 Aug 2021 11:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B95E832; Mon, 16 Aug 2021 11:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEsYs043961; Mon, 16 Aug 2021 11:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEs6O043960; Mon, 16 Aug 2021 11:14:54 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:54 GMT Message-Id: <202108161114.17GBEs6O043960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 91ee8dc8a654 - stable/12 - bhyve: Improve the option description in the usage message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 91ee8dc8a654702c431d1dd9c3ec348e1e8acc6b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:54 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=91ee8dc8a654702c431d1dd9c3ec348e1e8acc6b commit 91ee8dc8a654702c431d1dd9c3ec348e1e8acc6b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:13:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:25:34 +0000 bhyve: Improve the option description in the usage message - Sort options as suggested by style(9) - Capitalize some words like CPU and HLT - Add a missing description for the -G flag MFC after: 2 weeks (cherry picked from commit b6a572d03f654236b929b91d376ad1a6dfaa2e9a) --- usr.sbin/bhyve/bhyverun.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index fb7c0357c9f9..74d239704388 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -217,26 +217,28 @@ usage(int code) " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" " %*s [-G port] [-k file] [-l lpc] [-m mem] [-o var=value]\n" " %*s [-p vcpu:hostcpu] [-s pci] [-U uuid] vmname\n" - " -a: local apic is in xAPIC mode (deprecated)\n" " -A: create ACPI tables\n" - " -c: number of cpus and/or topology specification\n" + " -a: local apic is in xAPIC mode (deprecated)\n" " -C: include guest memory in core file\n" + " -c: number of CPUs and/or topology specification\n" " -D: destroy on power-off\n" " -e: exit on unhandled I/O access\n" - " -g: gdb port\n" + " -G: start a debug server\n" + " -H: vmexit from the guest on HLT\n" " -h: help\n" - " -H: vmexit from the guest on hlt\n" + " -k: key=value flat config file\n" " -l: LPC device configuration\n" " -m: memory size in MB\n" - " -p: pin 'vcpu' to 'hostcpu'\n" + " -o: set config 'var' to 'value'\n" " -P: vmexit from the guest on pause\n" - " -s: PCI slot config\n" + " -p: pin 'vcpu' to 'hostcpu'\n" " -S: guest memory cannot be swapped\n" + " -s: PCI slot config\n" + " -U: UUID\n" " -u: RTC keeps UTC time\n" - " -U: uuid\n" - " -w: ignore unimplemented MSRs\n" " -W: force virtio to use single-vector MSI\n" - " -x: local apic is in x2APIC mode\n" + " -w: ignore unimplemented MSRs\n" + " -x: local APIC is in x2APIC mode\n" " -Y: disable MPtable generation\n", progname, (int)strlen(progname), "", (int)strlen(progname), "", (int)strlen(progname), ""); From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C00A9672743; Mon, 16 Aug 2021 11:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQR4RmRz3ql1; Mon, 16 Aug 2021 11:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EFD0714; Mon, 16 Aug 2021 11:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEtVn043985; Mon, 16 Aug 2021 11:14:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEtx5043984; Mon, 16 Aug 2021 11:14:55 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:55 GMT Message-Id: <202108161114.17GBEtx5043984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2eb1963a95d7 - stable/12 - bhyve.8: Sort the options in the OPTIONS section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2eb1963a95d7a29c82f63a5f19b9de645e8ef64e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:55 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2eb1963a95d7a29c82f63a5f19b9de645e8ef64e commit 2eb1963a95d7a29c82f63a5f19b9de645e8ef64e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 18:26:04 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:40:03 +0000 bhyve.8: Sort the options in the OPTIONS section No content change intended. Just moving the option descriptions around to follow the order suggested by style(9). MFC after: 2 weeks (cherry picked from commit ccb1c87a6aa563a927a98a6f9175d95929535b21) --- usr.sbin/bhyve/bhyve.8 | 67 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index e99782bc22b8..9cdb0ec48323 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -93,15 +93,15 @@ runs until the guest operating system reboots or an unhandled hypervisor exit is detected. .Sh OPTIONS .Bl -tag -width 10n -.It Fl a -The guest's local APIC is configured in xAPIC mode. -The xAPIC mode is the default setting so this option is redundant. -It will be deprecated in a future version. .It Fl A Generate ACPI tables. Required for .Fx Ns /amd64 guests. +.It Fl a +The guest's local APIC is configured in xAPIC mode. +The xAPIC mode is the default setting so this option is redundant. +It will be deprecated in a future version. .It Fl b Enable a low-level console device supported by .Fx @@ -109,6 +109,8 @@ kernels compiled with .Cd "device bvmconsole" . This option is deprecated and will be removed in .Fx 13.0 . +.It Fl C +Include guest memory in core file. .It Fl c Op Ar setting ... Number of guest virtual CPUs and/or the CPU topology. @@ -133,8 +135,6 @@ and If a .Ar setting is specified more than once the last one has precedence. -.It Fl C -Include guest memory in core file. .It Fl D Destroy the VM on guest initiated power-off. .It Fl e @@ -142,15 +142,6 @@ Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. This is intended for debug purposes. -.It Fl g Ar gdbport -For -.Fx -kernels compiled with -.Cd "device bvmdebug" , -allow a remote kernel kgdb to be relayed to the guest kernel gdb stub -via a local IPv4 address and this port. -This option is deprecated and will be removed in -.Fx 13.0 . .It Fl G Ar port Start a debug server that uses the GDB protocol to export guest state to a debugger. @@ -164,11 +155,31 @@ begins with .Sq w , .Nm will pause execution at the first instruction waiting for a debugger to attach. -.It Fl h -Print help message and exit. +.It Fl g Ar gdbport +For +.Fx +kernels compiled with +.Cd "device bvmdebug" , +allow a remote kernel kgdb to be relayed to the guest kernel gdb stub +via a local IPv4 address and this port. +This option is deprecated and will be removed in +.Fx 13.0 . .It Fl H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. +.It Fl h +Print help message and exit. +.It Fl k Ar file +Set configuration variables from a simple, key-value config file. +Each line of the config file is expected to consist of a config variable +name, an equals sign +.Pq Sq = , +and a value. +No spaces are permitted between the variable name, equals sign, or +value. +Blank lines and lines starting with +.Sq # +are ignored. .It Fl l Op Ar help|lpcdev Ns Op , Ns Ar conf Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices @@ -194,6 +205,13 @@ If no suffix is given, the value is assumed to be in megabytes. .Pp .Ar memsize defaults to 256M. +.It Fl o Ar var Ns Cm = Ns Ar value +Set the configuration variable +.Ar var +to +.Ar value . +.It Fl P +Force the guest virtual CPU to exit when a PAUSE instruction is detected. .It Fl p Ar vcpu:hostcpu Pin guest's virtual CPU .Em vcpu @@ -201,6 +219,8 @@ to .Em hostcpu . .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. +.It Fl S +Wire guest memory. .It Fl s Op Ar help|slot,emulation Ns Op , Ns Ar conf Configure a virtual PCI slot and function. .Pp @@ -525,22 +545,21 @@ Playback device, typically Recording device, typically .Ar /dev/dsp0 . .El -.It Fl S -Wire guest memory. -.It Fl u -RTC keeps UTC time. +.El .It Fl U Ar uuid Set the universally unique identifier .Pq UUID in the guest's System Management BIOS System Information structure. By default a UUID is generated from the host's hostname and .Ar vmname . -.It Fl w -Ignore accesses to unimplemented Model Specific Registers (MSRs). -This is intended for debug purposes. +.It Fl u +RTC keeps UTC time. .It Fl W Force virtio PCI device emulations to use MSI interrupts instead of MSI-X interrupts. +.It Fl w +Ignore accesses to unimplemented Model Specific Registers (MSRs). +This is intended for debug purposes. .It Fl x The guest's local APIC is configured in x2APIC mode. .It Fl Y From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38B326727E9; Mon, 16 Aug 2021 11:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQS6BF9z3qTK; Mon, 16 Aug 2021 11:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99E60833; Mon, 16 Aug 2021 11:14:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEuTa044009; Mon, 16 Aug 2021 11:14:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEu2c044008; Mon, 16 Aug 2021 11:14:56 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:56 GMT Message-Id: <202108161114.17GBEu2c044008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a226b3b4e28b - stable/12 - bhyve.8: Improve the description and synopsis of -l MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a226b3b4e28b0c2e93f14febf46ba01d0a5bd685 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:57 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a226b3b4e28b0c2e93f14febf46ba01d0a5bd685 commit a226b3b4e28b0c2e93f14febf46ba01d0a5bd685 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 19:41:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:42:27 +0000 bhyve.8: Improve the description and synopsis of -l - Describe "-l help" separately for readability. - List all the supported comX devices explicitly - Use Cm instead of Ar for command modifiers (i.e., literal values a user can specify as an argument to the command). - Explain where to get more information about the possible values of the conf argument. MFC after: 2 weeks (cherry picked from commit 4c08b978b276f8cfc25f72715e97898f629f7f89) --- usr.sbin/bhyve/bhyve.8 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 9cdb0ec48323..c5761844d22a 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -180,19 +180,24 @@ value. Blank lines and lines starting with .Sq # are ignored. -.It Fl l Op Ar help|lpcdev Ns Op , Ns Ar conf +.It Fl l Cm help +Print a list of supported LPC devices. +.It Fl l Ar lpcdev Ns Op Cm \&, Ns Ar conf Allow devices behind the LPC PCI-ISA bridge to be configured. The only supported devices are the TTY-class devices .Ar com1 and .Ar com2 , the boot ROM device -.Ar bootrom , +.Cm bootrom , and the debug/test device -.Ar pc-testdev . +.Cm pc-testdev . .Pp -.Ar help -print a list of supported LPC devices. +The possible values for the +.Ar conf +argument are listed in the +.Fl s +flag description. .It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t Guest physical memory size in bytes. This must be the same size that was given to From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62E6D67292A; Mon, 16 Aug 2021 11:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQV0stFz3qf3; Mon, 16 Aug 2021 11:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5FCF834; Mon, 16 Aug 2021 11:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEv1d044033; Mon, 16 Aug 2021 11:14:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEvWT044032; Mon, 16 Aug 2021 11:14:57 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:57 GMT Message-Id: <202108161114.17GBEvWT044032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1df561c26845 - stable/12 - bhyve.8: Improve the description of the -m flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1df561c2684506cd2eb90bea5b51619819a181c3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:58 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1df561c2684506cd2eb90bea5b51619819a181c3 commit 1df561c2684506cd2eb90bea5b51619819a181c3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 19:56:13 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:42:40 +0000 bhyve.8: Improve the description of the -m flag - Stylize the synopsis with proper mdoc macros - Do some wordsmithing on the description for consistency. MFC after: 2 weeks (cherry picked from commit 7e0cb3df687695212ae20cc90d5f2f48bd42eba7) --- usr.sbin/bhyve/bhyve.8 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index c5761844d22a..9f2ab5defbbf 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -198,18 +198,26 @@ The possible values for the argument are listed in the .Fl s flag description. -.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t -Guest physical memory size in bytes. +.It Xo +.Fl m Ar memsize Ns Oo +.Sm off +.Cm K | k | M | m | G | g | T | t +.Sm on +.Oc +.Xc +Set the guest physical memory size This must be the same size that was given to .Xr bhyveload 8 . .Pp -The size argument may be suffixed with one of K, M, G or T (either upper -or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes, -or terabytes. +The size argument may be suffixed with one of +.Cm K , M , G +or +.Cm T +(either upper or lower case) +to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. If no suffix is given, the value is assumed to be in megabytes. .Pp -.Ar memsize -defaults to 256M. +The default is 256M. .It Fl o Ar var Ns Cm = Ns Ar value Set the configuration variable .Ar var From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:14:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4B58672A82; Mon, 16 Aug 2021 11:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQW1m4Hz3qf9; Mon, 16 Aug 2021 11:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1A5B697; Mon, 16 Aug 2021 11:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBEwSB044057; Mon, 16 Aug 2021 11:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBEw9r044056; Mon, 16 Aug 2021 11:14:58 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:58 GMT Message-Id: <202108161114.17GBEw9r044056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 96bf53430abb - stable/12 - bhyve.8: Fix the synopsis of -p MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 96bf53430abb0bd60acef50515634eacef8ee955 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:14:59 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=96bf53430abb0bd60acef50515634eacef8ee955 commit 96bf53430abb0bd60acef50515634eacef8ee955 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:01:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:42:53 +0000 bhyve.8: Fix the synopsis of -p Use appropriate mdoc macros. MFC after: 2 weeks (cherry picked from commit 90df54374f1ce1b94c10c34c2a5b06be0353ebae) --- usr.sbin/bhyve/bhyve.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 9f2ab5defbbf..c65da7f1de54 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -225,7 +225,7 @@ to .Ar value . .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. -.It Fl p Ar vcpu:hostcpu +.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu Pin guest's virtual CPU .Em vcpu to From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:00 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8C736728E9; Mon, 16 Aug 2021 11:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQX1Z5Mz3qcm; Mon, 16 Aug 2021 11:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19136835; Mon, 16 Aug 2021 11:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBExcw044087; Mon, 16 Aug 2021 11:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBExGN044086; Mon, 16 Aug 2021 11:14:59 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:14:59 GMT Message-Id: <202108161114.17GBExGN044086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fbd3d1419865 - stable/12 - bhyve.8: Fix indention in the signals table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fbd3d141986589739d10ea233026b448406029e2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:00 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fbd3d141986589739d10ea233026b448406029e2 commit fbd3d141986589739d10ea233026b448406029e2 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:06:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:43:33 +0000 bhyve.8: Fix indention in the signals table MFC after: 2 weeks (cherry picked from commit 3357e9482fe8a0ee153ec62d4bd8cb96966bbf26) --- usr.sbin/bhyve/bhyve.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index c65da7f1de54..ed2686a2c429 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -608,7 +608,7 @@ stepping over the breakpoint. .Nm deals with the following signals: .Pp -.Bl -tag -width indent -compact +.Bl -tag -width SIGTERM -compact .It SIGTERM Trigger ACPI poweroff for a VM .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:04 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 352E1672854; Mon, 16 Aug 2021 11:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQc02RLz3qlT; Mon, 16 Aug 2021 11:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C713698; Mon, 16 Aug 2021 11:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF3xb044165; Mon, 16 Aug 2021 11:15:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF3fv044164; Mon, 16 Aug 2021 11:15:03 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:03 GMT Message-Id: <202108161115.17GBF3fv044164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2e9958431f7b - stable/12 - bhyve.8: Improve emulation description of the -s flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2e9958431f7bad48d10b3b2531bca23b714643c3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:04 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2e9958431f7bad48d10b3b2531bca23b714643c3 commit 2e9958431f7bad48d10b3b2531bca23b714643c3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:08:39 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:48:56 +0000 bhyve.8: Improve emulation description of the -s flag - Set width of the list to the longest key word for readability. - Separate descriptions of amd_hostbridge and hostbridge emulations. Also, wordsmith their descriptions for consistency with other entries. - Use Cm instead of Li for command modifiers. - Do not stylize AMD with Li, there's no need to do it. - Fix a typo in the definition of ahci-hd ("hard drive" instead of "hard-drive"). MFC after: 2 weeks (cherry picked from commit 7014cb2393594ee4a8389c65d507afacf729c041) --- usr.sbin/bhyve/bhyve.8 | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index f4519e676f95..20eafd1858cd 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -282,49 +282,49 @@ The .Ar emulation argument can be one of the following: -.Bl -tag -width 10n -.It Li hostbridge | Li amd_hostbridge -.Pp -Provide a simple host bridge. +.Bl -tag -width "amd_hostbridge" +.It Cm hostbridge +A simple host bridge. This is usually configured at slot 0, and is required by most guest operating systems. -The -.Li amd_hostbridge -emulation is identical but uses a PCI vendor ID of -.Li AMD . -.It Li passthru +.It Cm amd_hostbridge +Emulation identical to +.Cm hostbridge +using a PCI vendor ID of AMD. +.It Cm passthru PCI pass-through device. -.It Li virtio-net +.It Cm virtio-net Virtio network interface. -.It Li virtio-blk +.It Cm virtio-blk Virtio block storage interface. -.It Li virtio-scsi +.It Cm virtio-scsi Virtio SCSI interface. -.It Li virtio-rnd +.It Cm virtio-rnd Virtio RNG interface. -.It Li virtio-console +.It Cm virtio-console Virtio console interface, which exposes multiple ports to the guest in the form of simple char devices for simple IO between the guest and host userspaces. -.It Li ahci +.It Cm ahci AHCI controller attached to arbitrary devices. -.It Li ahci-cd +.It Cm ahci-cd AHCI controller attached to an ATAPI CD/DVD. -.It Li ahci-hd -AHCI controller attached to a SATA hard-drive. -.It Li e1000 +.It Cm ahci-hd +AHCI controller attached to a SATA hard drive. +.It Cm e1000 Intel e82545 network interface. -.It Li uart +.It Cm uart PCI 16550 serial device. -.It Li lpc -LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports, a boot ROM, and, +.It Cm lpc +LPC PCI-ISA bridge with COM1, COM2, and 16550 serial ports, +a boot ROM, and, optionally, the debug/test device. The LPC bridge emulation can only be configured on bus 0. -.It Li fbuf +.It Cm fbuf Raw framebuffer device attached to VNC server. -.It Li xhci +.It Cm xhci eXtensible Host Controller Interface (xHCI) USB controller. -.It Li nvme +.It Cm nvme NVM Express (NVMe) controller. .El .Pp From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C9B3672B00; Mon, 16 Aug 2021 11:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQd13fQz3qrF; Mon, 16 Aug 2021 11:15:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1CB3699; Mon, 16 Aug 2021 11:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF4Pl044189; Mon, 16 Aug 2021 11:15:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF4E5044188; Mon, 16 Aug 2021 11:15:04 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:04 GMT Message-Id: <202108161115.17GBF4E5044188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 932129b612b5 - stable/12 - bhyve.8: Clean up network backends section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 932129b612b5557ac07a3ec2aa5d170ad02c418b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:06 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=932129b612b5557ac07a3ec2aa5d170ad02c418b commit 932129b612b5557ac07a3ec2aa5d170ad02c418b Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:29:30 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:09:00 +0000 bhyve.8: Clean up network backends section - Reformat the format lists, use appropriate mdoc macros for readability. - Add a missing Oxford comma. MFC after: 2 weeks (cherry picked from commit 7fb22729816ef6c9e65e5c544047e669edd2f06d) --- usr.sbin/bhyve/bhyve.8 | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 20eafd1858cd..bd8827dcd246 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -336,21 +336,31 @@ If is not specified, the device emulation has no backend and can be considered unconnected. .Pp -Network devices: -.Bl -tag -width 10n -.It Ar tapN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx -.It Ar vmnetN Ns Op , Ns Ar mac=xx:xx:xx:xx:xx:xx -.Pp -If -.Ar mac -is not specified, the MAC address is derived from a fixed OUI and the -remaining bytes from an MD5 hash of the slot and function numbers and -the device name. -.Pp -The MAC address is an ASCII string in -.Xr ethers 5 -format. +Network backends formats for +.Ar conf : +.Sm off +.Bl -bullet +.It +.Xo +.Cm tap Ar N +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N +.Xc +.It +.Xo +.Cm vmnet Ar N +.Op Cm \&,mac= Ar xx:xx:xx:xx:xx:xx +.Op Cm \&,mtu= Ar N +.Xc .El +.Sm on +.Pp +With +.Cm virtio-net +devices, the +.Cm mtu +parameter can be specified to inform the guest about the largest MTU +that should be allowed, expressed in bytes. .Pp Block storage devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E444A67293E; Mon, 16 Aug 2021 11:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQY34lZz3qTc; Mon, 16 Aug 2021 11:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E630836; Mon, 16 Aug 2021 11:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF1Hj044117; Mon, 16 Aug 2021 11:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF1xx044116; Mon, 16 Aug 2021 11:15:01 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:01 GMT Message-Id: <202108161115.17GBF1xx044116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1b248e820c7b - stable/12 - bhyve.8: Clean-up synopsis of -s MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1b248e820c7b3fbf3afe1091ad6b5feee1277bb4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:02 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1b248e820c7b3fbf3afe1091ad6b5feee1277bb4 commit 1b248e820c7b3fbf3afe1091ad6b5feee1277bb4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:28:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:43:54 +0000 bhyve.8: Clean-up synopsis of -s - Document "-s help" separately for readability. - Use appropriate mdoc macros. MFC after: 2 weeks (cherry picked from commit 449f0e48e902ed36ec0de31279eefad9e6200cdc) --- usr.sbin/bhyve/bhyve.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index ed2686a2c429..69fec13f554b 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -234,7 +234,9 @@ to Force the guest virtual CPU to exit when a PAUSE instruction is detected. .It Fl S Wire guest memory. -.It Fl s Op Ar help|slot,emulation Ns Op , Ns Ar conf +.It Fl s Cm help +Print a list of supported PCI devices. +.It Fl s Ar slot Ns Cm \&, Ns Ar emulation Ns Op Cm \&, Ns Ar conf Configure a virtual PCI slot and function. .Pp .Nm @@ -243,8 +245,6 @@ slots on the bus. There are 32 available slots, with the option of providing up to 8 functions per slot. .Bl -tag -width 10n -.It Ar help -print a list of supported PCI devices. .It Ar slot .Ar pcislot[:function] .Ar bus:pcislot:function From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:03 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 977F26729CB; Mon, 16 Aug 2021 11:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQb02KDz3qlM; Mon, 16 Aug 2021 11:15:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 584EA837; Mon, 16 Aug 2021 11:15:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF2Xd044141; Mon, 16 Aug 2021 11:15:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF24p044140; Mon, 16 Aug 2021 11:15:02 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:02 GMT Message-Id: <202108161115.17GBF24p044140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 833b06052416 - stable/12 - bhyve.8: Clean up the slot description of -s MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 833b06052416c18d8f21be9550a9d84edb042538 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:04 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=833b06052416c18d8f21be9550a9d84edb042538 commit 833b06052416c18d8f21be9550a9d84edb042538 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 20:56:19 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 09:44:12 +0000 bhyve.8: Clean up the slot description of -s Also, remove the macros of the nested list which contained slot, emulation and conf. This decreases the indention of the -s description. It was necessary to clean up the slot description. MFC after: 2 weeks (cherry picked from commit 234d8c470b44160fe0cbce49b972b3b19f246a89) --- usr.sbin/bhyve/bhyve.8 | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 69fec13f554b..f4519e676f95 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -244,10 +244,23 @@ provides PCI bus emulation and virtual devices that can be attached to slots on the bus. There are 32 available slots, with the option of providing up to 8 functions per slot. -.Bl -tag -width 10n -.It Ar slot -.Ar pcislot[:function] -.Ar bus:pcislot:function +.Pp +The +.Ar slot +can be specified in one of the following formats: +.Pp +.Bl -bullet -compact +.It +.Ar pcislot +.It +.Sm off +.Ar pcislot Cm \&: Ar function +.Sm on +.It +.Sm off +.Ar bus Cm \&: Ar pcislot Cm \&: Ar function +.Sm on +.El .Pp The .Ar pcislot @@ -264,7 +277,11 @@ value defaults to 0. If not specified, the .Ar bus value defaults to 0. -.It Ar emulation +.Pp +The +.Ar emulation +argument +can be one of the following: .Bl -tag -width 10n .It Li hostbridge | Li amd_hostbridge .Pp @@ -310,8 +327,10 @@ eXtensible Host Controller Interface (xHCI) USB controller. .It Li nvme NVM Express (NVMe) controller. .El -.It Op Ar conf -This optional parameter describes the backend for device emulations. +.Pp +The optional parameter +.Ar conf +describes the backend for device emulations. If .Ar conf is not specified, the device emulation has no backend and can be From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEA2E672A3C; Mon, 16 Aug 2021 11:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQg2Kwsz3qfV; Mon, 16 Aug 2021 11:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4F56595; Mon, 16 Aug 2021 11:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF654044243; Mon, 16 Aug 2021 11:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF6PP044242; Mon, 16 Aug 2021 11:15:06 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:06 GMT Message-Id: <202108161115.17GBF6PP044242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5eb600a27ec3 - stable/12 - bhyve.8: Clean up SCSI device backends section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5eb600a27ec3ff8f2e6e129d86fd0da6bacb2ead Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:08 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5eb600a27ec3ff8f2e6e129d86fd0da6bacb2ead commit 5eb600a27ec3ff8f2e6e129d86fd0da6bacb2ead Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:49:18 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:11:01 +0000 bhyve.8: Clean up SCSI device backends section MFC after: 2 weeks (cherry picked from commit 7c5829c942822561688c9b8239900773c6d82db4) --- usr.sbin/bhyve/bhyve.8 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index c07ec7a1b307..1c2b8429377a 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -390,16 +390,19 @@ The physical sector size is optional and is equal to the logical sector size if not explicitly specified. .El .Pp -SCSI devices: -.Bl -tag -width 10n -.It Pa /dev/cam/ctl Ns Oo Ar pp . Ns Ar vp Oc Ns Oo , Ns Ar scsi-device-options Oc +SCSI device backends: +.Sm off +.Bl -bullet +.It +.Pa /dev/cam/ctl Oo Ar pp Cm \&. Ar vp Oc Oo Cm \&, Ar scsi-device-options Oc .El +.Sm on .Pp The .Ar scsi-device-options are: .Bl -tag -width 10n -.It Li iid= Ns Ar IID +.It Cm iid= Ns Ar IID Initiator ID to use when sending requests to specified CTL port. The default value is 0. .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5383267294E; Mon, 16 Aug 2021 11:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQf0lhNz3qwS; Mon, 16 Aug 2021 11:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE4A827E7C; Mon, 16 Aug 2021 11:15:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF5fc044219; Mon, 16 Aug 2021 11:15:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF5bB044218; Mon, 16 Aug 2021 11:15:05 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:05 GMT Message-Id: <202108161115.17GBF5bB044218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: dcdcff9278c1 - stable/12 - bhyve.8: Clean up block storage device backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dcdcff9278c175a01becd7d261556a2b10d0fcea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:09 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=dcdcff9278c175a01becd7d261556a2b10d0fcea commit dcdcff9278c175a01becd7d261556a2b10d0fcea Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 21:39:53 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:10:49 +0000 bhyve.8: Clean up block storage device backends description MFC after: 2 weeks (cherry picked from commit 5232a35f1ed7b8fa4f378897598438c2056ef60e) --- usr.sbin/bhyve/bhyve.8 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index bd8827dcd246..c07ec7a1b307 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -362,25 +362,29 @@ devices, the parameter can be specified to inform the guest about the largest MTU that should be allowed, expressed in bytes. .Pp -Block storage devices: -.Bl -tag -width 10n -.It Pa /filename Ns Oo , Ns Ar block-device-options Oc -.It Pa /dev/xxx Ns Oo , Ns Ar block-device-options Oc +Block storage device backends: +.Sm off +.Bl -bullet +.It +.Ar /filename Op Cm \&, Ar block-device-options +.It +.Ar /dev/xxx Op Cm \&, Ar block-device-options .El +.Sm on .Pp The .Ar block-device-options are: -.Bl -tag -width 8n -.It Li nocache +.Bl -tag -width 10n +.It Cm nocache Open the file with .Dv O_DIRECT . -.It Li direct +.It Cm direct Open the file using .Dv O_SYNC . -.It Li ro +.It Cm ro Force the file to be opened read-only. -.It Li sectorsize= Ns Ar logical Ns Oo / Ns Ar physical Oc +.It Cm sectorsize= Ns Ar logical Ns Oo Cm \&/ Ns Ar physical Oc Specify the logical and physical sector sizes of the emulated disk. The physical sector size is optional and is equal to the logical sector size if not explicitly specified. @@ -587,7 +591,6 @@ Playback device, typically Recording device, typically .Ar /dev/dsp0 . .El -.El .It Fl U Ar uuid Set the universally unique identifier .Pq UUID From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CD9E672AA4; Mon, 16 Aug 2021 11:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQh6BBZz3qtB; Mon, 16 Aug 2021 11:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11968537; Mon, 16 Aug 2021 11:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF7ZQ044267; Mon, 16 Aug 2021 11:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF7mt044266; Mon, 16 Aug 2021 11:15:07 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:07 GMT Message-Id: <202108161115.17GBF7mt044266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: b9bf593b54fd - stable/12 - bhyve.8: Clean up TTY, boot ROM, and pass-through descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b9bf593b54fd45ec59069bcb9dab97c2f670dbbd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:09 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b9bf593b54fd45ec59069bcb9dab97c2f670dbbd commit b9bf593b54fd45ec59069bcb9dab97c2f670dbbd Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:09:22 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:12:26 +0000 bhyve.8: Clean up TTY, boot ROM, and pass-through descriptions MFC after: 2 weeks (cherry picked from commit 2fda01a1b7e958e6cfffda512954b8d6c40a064e) --- usr.sbin/bhyve/bhyve.8 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 1c2b8429377a..dff1dabee57a 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -407,28 +407,28 @@ Initiator ID to use when sending requests to specified CTL port. The default value is 0. .El .Pp -TTY devices: +TTY device backends: .Bl -tag -width 10n -.It Li stdio +.It Cm stdio Connect the serial port to the standard input and output of the .Nm process. -.It Pa /dev/xxx +.It Ar /dev/xxx Use the host TTY device for serial port I/O. .El .Pp -Boot ROM device: +Boot ROM device backends: .Bl -tag -width 10n -.It Pa romfile +.It Ar romfile Map .Ar romfile in the guest address space reserved for boot firmware. .El .Pp -Pass-through devices: +Pass-through device backends: .Bl -tag -width 10n -.It Ns Ar slot Ns / Ns Ar bus Ns / Ns Ar function +.It Ns Ar slot Ns Cm \&/ Ns Ar bus Ns Cm \&/ Ns Ar function Connect to a PCI device on the host at the selector described by .Ar slot , .Ar bus , From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E7CA672764; Mon, 16 Aug 2021 11:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQj4sDzz3qfX; Mon, 16 Aug 2021 11:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3067C69B; Mon, 16 Aug 2021 11:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBF9rV044291; Mon, 16 Aug 2021 11:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBF9ZT044290; Mon, 16 Aug 2021 11:15:09 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:09 GMT Message-Id: <202108161115.17GBF9ZT044290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: a59984e2fcd0 - stable/12 - bhyve.8: Clean up virtio console device backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a59984e2fcd0ab425dd155d38c2f812b9686c9ea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:10 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a59984e2fcd0ab425dd155d38c2f812b9686c9ea commit a59984e2fcd0ab425dd155d38c2f812b9686c9ea Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:23:26 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:12:37 +0000 bhyve.8: Clean up virtio console device backends description MFC after: 2 weeks (cherry picked from commit 3f4c771f64e816750de08ab6fd7e7bf29398f5fb) --- usr.sbin/bhyve/bhyve.8 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index dff1dabee57a..89cf4c074905 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -446,9 +446,14 @@ The host device must have been reserved at boot-time using the loader variable as described in .Xr vmm 4 . .Pp -Virtio console devices: -.Bl -tag -width 10n -.It Li port1= Ns Pa /path/to/port1.sock Ns ,anotherport= Ns Pa ... +Virtio console device backends: +.Bl -bullet +.Sm off +.It +.Cm port1= Ns Ar /path/to/port1.sock Ns Op Cm ,port Ns Ar N Cm \&= Ns Ar /path/to/port2.sock No \~ Ar ... +.Sm on +.El +.Pp A maximum of 16 ports per device can be created. Every port is named and corresponds to a Unix domain socket created by .Nm . @@ -456,7 +461,7 @@ Every port is named and corresponds to a Unix domain socket created by accepts at most one connection per port at a time. .Pp Limitations: -.Bl -bullet -offset 2n +.Bl -bullet -offset .It Due to lack of destructors in .Nm , @@ -464,12 +469,13 @@ sockets on the filesystem must be cleaned up manually after .Nm exits. .It -There is no way to use the "console port" feature, nor the console port +There is no way to use the +.Dq console port +feature, nor the console port resize at present. .It Emergency write is advertised, but no-op at present. .El -.El .Pp Framebuffer devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDF67672A45; Mon, 16 Aug 2021 11:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQl3YTkz3qj0; Mon, 16 Aug 2021 11:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48E3F69C; Mon, 16 Aug 2021 11:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBFAnV044315; Mon, 16 Aug 2021 11:15:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBFARZ044314; Mon, 16 Aug 2021 11:15:10 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:10 GMT Message-Id: <202108161115.17GBFARZ044314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6229dc283db8 - stable/12 - bhyve.8: Improve framebuffer backends description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6229dc283db8f7d860ed9e2d29aa8a4c3b1f01bc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:12 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6229dc283db8f7d860ed9e2d29aa8a4c3b1f01bc commit 6229dc283db8f7d860ed9e2d29aa8a4c3b1f01bc Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 22:59:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:12:50 +0000 bhyve.8: Improve framebuffer backends description - Use appropriate mdoc macros - Document that tcp= is a synonym to rfb= (tcp is used in the examples, but never mentioned) - Clarify the IP address specification MFC after: 2 weeks (cherry picked from commit 8b97e97548bdc74cf3b4939a0b21cfdd27d8c11c) --- usr.sbin/bhyve/bhyve.8 | 62 +++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 89cf4c074905..f9cc11341836 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -477,35 +477,52 @@ resize at present. Emergency write is advertised, but no-op at present. .El .Pp -Framebuffer devices: +Framebuffer devices backends: +.Bl -bullet +.Sm off +.It +.Op Cm rfb= Ar ip-and-port +.Op Cm ,w= Ar width +.Op Cm ,h= Ar height +.Op Cm ,vga= Ar vgaconf +.Op Cm ,wait +.Op Cm ,password= Ar password +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Xo -.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns -.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns -.Ar password Oc -.Xc -.Bl -tag -width 8n -.It Ar IPv4:port No or Ar [IPv6%zone]:port -An -.Ar IP -address and a +.It Cm rfb= Ns Ar ip-and-port Pq or Cm tcp= Ns Ar ip-and-port +An IP address and a port VNC should listen on. +There are two formats: +.Pp +.Bl -bullet -compact +.It IPv4 +.Sm off +.Op Ar IPv4 Cm \&: .Ar port -VNC should listen on. +.Sm on +.It IPv6 +.Sm off +.Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port +.Sm on +.El +.Pp The default is to listen on localhost IPv4 address and default VNC port 5900. An IPv6 address must be enclosed in square brackets and may contain an optional zone identifier. -.It Ar width No and Ar height +.It Cm w= Ns Ar width No and Cm h= Ns Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. Minimal supported resolution is 640x480 pixels, and maximum is 1920x1200 pixels. -.It Ar vgaconf +.It Cm vga= Ns Ar vgaconf Possible values for this option are -.Dq io +.Cm io (default), -.Dq on +.Cm on , and -.Dq off . +.Cm off . PCI graphics cards have a dual personality in that they are standard PCI devices with BAR addressing, but may also implicitly decode legacy VGA I/O space @@ -513,18 +530,18 @@ implicitly decode legacy VGA I/O space and memory space .Pq 64KB at Ad 0xA0000 . The default -.Dq io +.Cm io option should be used for guests that attempt to issue BIOS calls which result in I/O port queries, and fail to boot if I/O decode is disabled. .Pp The -.Dq on +.Cm on option should be used along with the CSM BIOS capability in UEFI to boot traditional BIOS guests that require the legacy VGA I/O and memory regions to be available. .Pp The -.Dq off +.Cm off option should be used for the UEFI guests that assume that VGA adapter is present if they detect the I/O ports. An example of such a guest is @@ -537,19 +554,18 @@ Please refer to the wiki page .Pq Lk https://wiki.freebsd.org/bhyve for configuration notes of particular guests. -.It wait +.It Cm wait Instruct .Nm to only boot upon the initiation of a VNC connection, simplifying the installation of operating systems that require immediate keyboard input. This can be removed for post-installation use. -.It password +.It Cm password= Ns Ar password This type of authentication is known to be cryptographically weak and is not intended for use on untrusted networks. Many implementations will want to use stronger security, such as running the session over an encrypted channel provided by IPsec or SSH. .El -.El .Pp xHCI USB devices: .Bl -tag -width 10n From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC05E672876; Mon, 16 Aug 2021 11:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQm4Jfjz3qln; Mon, 16 Aug 2021 11:15:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79AB927E7D; Mon, 16 Aug 2021 11:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBFBku044345; Mon, 16 Aug 2021 11:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBFB2Q044344; Mon, 16 Aug 2021 11:15:11 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:11 GMT Message-Id: <202108161115.17GBFB2Q044344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6d6e520fee64 - stable/12 - bhyve.8: Improve documentation of NVME backend MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6d6e520fee648291e345394140a4108a9403fce2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:14 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6d6e520fee648291e345394140a4108a9403fce2 commit 6d6e520fee648291e345394140a4108a9403fce2 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:16:51 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:13:05 +0000 bhyve.8: Improve documentation of NVME backend - Document the configuration format. - Document two additional configuration options: eui64 and dsm. MFC after: 2 weeks (cherry picked from commit 6eff58acc776d8308863f49b89664997d4642a4e) --- usr.sbin/bhyve/bhyve.8 | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index f9cc11341836..3cc3a2c0ad3e 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -567,32 +567,55 @@ Many implementations will want to use stronger security, such as running the session over an encrypted channel provided by IPsec or SSH. .El .Pp -xHCI USB devices: +xHCI USB device backends: .Bl -tag -width 10n -.It Li tablet +.It Cm tablet A USB tablet device which provides precise cursor synchronization when using VNC. .El .Pp -NVMe devices: +NVMe device backends: +.Bl -bullet +.Sm off +.It +.Ar devpath +.Op Cm ,maxq= Ar # +.Op Cm ,qsz= Ar # +.Op Cm ,ioslots= Ar # +.Op Cm ,sectsz= Ar # +.Op Cm ,ser= Ar # +.Op Cm ,eui64= Ar # +.Op Cm ,dsm= Ar opt +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li devpath +.It Ar devpath Accepted device paths are: .Ar /dev/blockdev or .Ar /path/to/image or -.Ar ram=size_in_MiB . -.It Li maxq +.Cm ram= Ns Ar size_in_MiB . +.It Cm maxq Max number of queues. -.It Li qsz +.It Cm qsz Max elements in each queue. -.It Li ioslots +.It Cm ioslots Max number of concurrent I/O requests. -.It Li sectsz +.It Cm sectsz Sector size (defaults to blockif sector size). -.It Li ser +.It Cm ser Serial number with maximum 20 characters. +.It Cm eui64 +IEEE Extended Unique Identifier (8 byte value). +.It Cm dsm +DataSet Management support. +Supported values are: +.Cm auto , enable , +and +.Cm disable . .El .Pp AHCI devices: From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90D73672AAF; Mon, 16 Aug 2021 11:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQn3kRfz3qtS; Mon, 16 Aug 2021 11:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AFF2715; Mon, 16 Aug 2021 11:15:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBFCfn044369; Mon, 16 Aug 2021 11:15:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBFCmK044368; Mon, 16 Aug 2021 11:15:12 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:12 GMT Message-Id: <202108161115.17GBFCmK044368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 880d73822d19 - stable/12 - bhyve.8: Improve AHCI backends documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 880d73822d19307ce827a9d6ffeb2c0cc692fe0c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:15 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=880d73822d19307ce827a9d6ffeb2c0cc692fe0c commit 880d73822d19307ce827a9d6ffeb2c0cc692fe0c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:44:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:13:15 +0000 bhyve.8: Improve AHCI backends documentation - Document the backend format. MFC after: 2 weeks (cherry picked from commit d5fcc4b6066e878ed70bce7a52d6aca605befde5) --- usr.sbin/bhyve/bhyve.8 | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 3cc3a2c0ad3e..4fdca7d2e28d 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -618,15 +618,29 @@ and .Cm disable . .El .Pp -AHCI devices: +AHCI device backends: +.Bl -bullet +.It +.Sm off +.Op Oo Cm hd\&: | cd\&: Oc Ar path +.Op Cm ,nmrr= Ar nmrr +.Op Cm ,ser= Ar # +.Op Cm ,rev= Ar # +.Op Cm ,model= Ar # +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li nmrr -Nominal Media Rotation Rate, known as RPM. value 1 will indicate device as Solid State Disk. default value is 0, not report. -.It Li ser +.It Cm nmrr +Nominal Media Rotation Rate, known as RPM. +Value 1 will indicate device as Solid State Disk. +Default value is 0, not report. +.It Cm ser Serial Number with maximum 20 characters. -.It Li rev +.It Cm rev Revision Number with maximum 8 characters. -.It Li model +.It Cm model Model Number with maximum 40 characters. .El .Pp From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5D016729E9; Mon, 16 Aug 2021 11:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQp4C8Wz3qws; Mon, 16 Aug 2021 11:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D27716; Mon, 16 Aug 2021 11:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBFD4i044393; Mon, 16 Aug 2021 11:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBFDeD044392; Mon, 16 Aug 2021 11:15:13 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:13 GMT Message-Id: <202108161115.17GBFDeD044392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 1807f353197c - stable/12 - bhyve: Document the format for HD audio backends MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1807f353197c91e328a2898192f3539b1b967ca3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:16 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1807f353197c91e328a2898192f3539b1b967ca3 commit 1807f353197c91e328a2898192f3539b1b967ca3 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:50:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:13:31 +0000 bhyve: Document the format for HD audio backends - This change is done for consistency with other backend definitions. MFC after: 2 weeks (cherry picked from commit 061f37d280976e0f79f823c732fa80825ce48ded) --- usr.sbin/bhyve/bhyve.8 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 4fdca7d2e28d..308ec972c2f3 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -644,12 +644,21 @@ Revision Number with maximum 8 characters. Model Number with maximum 40 characters. .El .Pp -HD Audio devices: +HD Audio device backends: +.Bl -bullet +.It +.Sm off +.Op Cm play= Ar playback +.Op Cm ,rec= Ar recording +.Sm on +.El +.Pp +Configuration options are defined as follows: .Bl -tag -width 10n -.It Li play +.It Cm play Playback device, typically .Ar /dev/dsp0 . -.It Li rec +.It Cm rec Recording device, typically .Ar /dev/dsp0 . .El From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 11:15:16 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52A0F672D03; Mon, 16 Aug 2021 11:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpBQq4sVQz3qtc; Mon, 16 Aug 2021 11:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFBAF596; Mon, 16 Aug 2021 11:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GBFELM044417; Mon, 16 Aug 2021 11:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GBFE34044416; Mon, 16 Aug 2021 11:15:14 GMT (envelope-from git) Date: Mon, 16 Aug 2021 11:15:14 GMT Message-Id: <202108161115.17GBFE34044416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: ece209b70fce - stable/12 - bhyve.8: Fix mandoc -Tlint issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ece209b70fcee35642338e5e42bb29d4a5762def Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:15:17 -0000 The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ece209b70fcee35642338e5e42bb29d4a5762def commit ece209b70fcee35642338e5e42bb29d4a5762def Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-04-18 23:53:06 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-08-16 11:13:46 +0000 bhyve.8: Fix mandoc -Tlint issues While here, keep network backends section consistent with other sections. MFC after: 2 weeks (cherry picked from commit 8d9fefe64334818a27812658bf9efd0371fbc77c) --- usr.sbin/bhyve/bhyve.8 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 308ec972c2f3..0738a00d5878 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -56,7 +56,7 @@ .Sm off .Ar memsize .Oo -.Cm K No | Cm k No | Cm M No | Cm m No | Cm G No | Cm g No | Cm T No | Cm t +.Cm K | Cm k | Cm M | Cm m | Cm G | Cm g | Cm T | Cm t .Oc .Sm on .Oc @@ -336,8 +336,7 @@ If is not specified, the device emulation has no backend and can be considered unconnected. .Pp -Network backends formats for -.Ar conf : +Network device backends: .Sm off .Bl -bullet .It @@ -461,7 +460,7 @@ Every port is named and corresponds to a Unix domain socket created by accepts at most one connection per port at a time. .Pp Limitations: -.Bl -bullet -offset +.Bl -bullet .It Due to lack of destructors in .Nm , @@ -497,12 +496,12 @@ An IP address and a port VNC should listen on. There are two formats: .Pp .Bl -bullet -compact -.It IPv4 +.It .Sm off .Op Ar IPv4 Cm \&: .Ar port .Sm on -.It IPv6 +.It .Sm off .Cm \&[ Ar IPv6%zone Cm \&] Cm \&: Ar port .Sm on From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 13:02:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CE846749D3; Mon, 16 Aug 2021 13:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpDpS0ZK6z4R83; Mon, 16 Aug 2021 13:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0B171F9C; Mon, 16 Aug 2021 13:02:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GD2NUD092775; Mon, 16 Aug 2021 13:02:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GD2Nva092774; Mon, 16 Aug 2021 13:02:23 GMT (envelope-from git) Date: Mon, 16 Aug 2021 13:02:23 GMT Message-Id: <202108161302.17GD2Nva092774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 75c0e1a8e073 - stable/13 - nd6: Mark several callouts as MPSAFE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75c0e1a8e073f1d5a89b863c84f4db3ccd042b64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 13:02:24 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=75c0e1a8e073f1d5a89b863c84f4db3ccd042b64 commit 75c0e1a8e073f1d5a89b863c84f4db3ccd042b64 Author: Mark Johnston AuthorDate: 2021-08-09 17:21:43 +0000 Commit: Mark Johnston CommitDate: 2021-08-16 13:01:11 +0000 nd6: Mark several callouts as MPSAFE The use of Giant here is vestigal and does not provide any useful synchronization. Furthermore, non-MPSAFE callouts can cause the softclock threads to block waiting for long-running newbus operations to complete. Reported by: mav Reviewed by: bz Sponsored by: The FreeBSD Foundation (cherry picked from commit 663428ea17e3a81f4c514d2571b90a13c065b1e8) --- sys/netinet6/in6_ifattach.c | 2 +- sys/netinet6/nd6.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 02d6a2b230b4..8d027e2fb1d9 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -887,7 +887,7 @@ in6_ifattach_init(void *dummy) { /* Timer for regeneranation of temporary addresses randomize ID. */ - callout_init(&V_in6_tmpaddrtimer_ch, 0); + callout_init(&V_in6_tmpaddrtimer_ch, 1); callout_reset(&V_in6_tmpaddrtimer_ch, (V_ip6_temp_preferred_lifetime - V_ip6_desync_factor - V_ip6_temp_regen_advance) * hz, diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 62f0ac733a23..8dc5495d3ad9 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -225,11 +225,11 @@ nd6_init(void) nd6_defrouter_init(); /* Start timers. */ - callout_init(&V_nd6_slowtimo_ch, 0); + callout_init(&V_nd6_slowtimo_ch, 1); callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, nd6_slowtimo, curvnet); - callout_init(&V_nd6_timer_ch, 0); + callout_init(&V_nd6_timer_ch, 1); callout_reset(&V_nd6_timer_ch, hz, nd6_timer, curvnet); nd6_dad_init(); From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 13:02:26 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D143674A0B; Mon, 16 Aug 2021 13:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpDpV2s2Sz4RZq; Mon, 16 Aug 2021 13:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EBF11D2A; Mon, 16 Aug 2021 13:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GD2QEZ092830; Mon, 16 Aug 2021 13:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GD2Qqs092829; Mon, 16 Aug 2021 13:02:26 GMT (envelope-from git) Date: Mon, 16 Aug 2021 13:02:26 GMT Message-Id: <202108161302.17GD2Qqs092829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ed03d0582498 - stable/13 - amd64: Fix output operand specs for the stmxcsr and vmread intrinsics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed03d05824982738335ea8273b0e5a5f020ba100 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 13:02:26 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ed03d05824982738335ea8273b0e5a5f020ba100 commit ed03d05824982738335ea8273b0e5a5f020ba100 Author: Mark Johnston AuthorDate: 2021-08-09 17:28:08 +0000 Commit: Mark Johnston CommitDate: 2021-08-16 13:01:29 +0000 amd64: Fix output operand specs for the stmxcsr and vmread intrinsics This does not appear to affect code generation, at least with the default toolchain. Noticed because incorrect output specifications lead to false positives from KMSAN, as the instrumentation uses them to update shadow state for output operands. Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit e54ae8258d6433ad2f2411dbeaa1fde6b817d5ef) --- sys/amd64/amd64/fpu.c | 2 +- sys/amd64/vmm/intel/vmx_cpufunc.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 20e3dd34405d..d7936b3b1922 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$"); #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) -#define stmxcsr(addr) __asm __volatile("stmxcsr %0" : : "m" (*(addr))) +#define stmxcsr(addr) __asm __volatile("stmxcsr %0" : "=m" (*(addr))) static __inline void xrstor32(char *addr, uint64_t mask) diff --git a/sys/amd64/vmm/intel/vmx_cpufunc.h b/sys/amd64/vmm/intel/vmx_cpufunc.h index 09d6d25a18e0..05ac56290cb9 100644 --- a/sys/amd64/vmm/intel/vmx_cpufunc.h +++ b/sys/amd64/vmm/intel/vmx_cpufunc.h @@ -137,10 +137,9 @@ vmread(uint64_t r, uint64_t *addr) __asm __volatile("vmread %[r], %[addr];" VMX_SET_ERROR_CODE - : [error] "=r" (error) - : [r] "r" (r), [addr] "m" (*addr) + : [error] "=r" (error), [addr] "=m" (*addr) + : [r] "r" (r) : "memory"); - return (error); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 13:02:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EC2B6749DC; Mon, 16 Aug 2021 13:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpDpW31VSz4RXg; Mon, 16 Aug 2021 13:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E3B61BD5; Mon, 16 Aug 2021 13:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GD2RTo092854; Mon, 16 Aug 2021 13:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GD2Rot092853; Mon, 16 Aug 2021 13:02:27 GMT (envelope-from git) Date: Mon, 16 Aug 2021 13:02:27 GMT Message-Id: <202108161302.17GD2Rot092853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3c785b12e096 - stable/13 - in6: Enter the net epoch in in6_tmpaddrtimer() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3c785b12e09612f100462e8f960236865cd47a88 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 13:02:27 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3c785b12e09612f100462e8f960236865cd47a88 commit 3c785b12e09612f100462e8f960236865cd47a88 Author: Mark Johnston AuthorDate: 2021-08-09 17:14:23 +0000 Commit: Mark Johnston CommitDate: 2021-08-16 13:01:39 +0000 in6: Enter the net epoch in in6_tmpaddrtimer() We need to do so to safely traverse the ifnet list. Reviewed by: bz Sponsored by: The FreeBSD Foundation (cherry picked from commit 8ee0826f75136f6ac6443f32c582882bc31abd73) --- sys/netinet6/in6_ifattach.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 8d027e2fb1d9..629509f61ac1 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -828,6 +828,7 @@ void in6_tmpaddrtimer(void *arg) { CURVNET_SET((struct vnet *) arg); + struct epoch_tracker et; struct nd_ifinfo *ndi; u_int8_t nullbuf[8]; struct ifnet *ifp; @@ -837,6 +838,7 @@ in6_tmpaddrtimer(void *arg) V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); bzero(nullbuf, sizeof(nullbuf)); + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (ifp->if_afdata[AF_INET6] == NULL) continue; @@ -850,7 +852,7 @@ in6_tmpaddrtimer(void *arg) ndi->randomseed1, ndi->randomid); } } - + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); } From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 13:02:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 566C2674B74; Mon, 16 Aug 2021 13:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpDpT1fWPz4RGb; Mon, 16 Aug 2021 13:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 204C51BD3; Mon, 16 Aug 2021 13:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GD2PJf092801; Mon, 16 Aug 2021 13:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GD2PHn092800; Mon, 16 Aug 2021 13:02:25 GMT (envelope-from git) Date: Mon, 16 Aug 2021 13:02:25 GMT Message-Id: <202108161302.17GD2PHn092800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 034eea1ee5dd - stable/13 - vmm: Make iommu ops tables const MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 034eea1ee5dd25c6a3ff2ce544a990fdd04458fb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 13:02:25 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=034eea1ee5dd25c6a3ff2ce544a990fdd04458fb commit 034eea1ee5dd25c6a3ff2ce544a990fdd04458fb Author: Mark Johnston AuthorDate: 2021-08-09 17:28:27 +0000 Commit: Mark Johnston CommitDate: 2021-08-16 13:01:20 +0000 vmm: Make iommu ops tables const While here, use designated initializers and rename some AMD iommu method implementations to match the corresponding op names. No functional change intended. Reviewed by: grehan Sponsored by: The FreeBSD Foundation (cherry picked from commit 41335c6b7f636f9ca59d0afba5728cf90020d6b1) --- sys/amd64/vmm/amd/amdvi_hw.c | 28 ++++++++++++++-------------- sys/amd64/vmm/intel/vtd.c | 24 ++++++++++++------------ sys/amd64/vmm/io/iommu.c | 2 +- sys/amd64/vmm/io/iommu.h | 4 ++-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index e488c5fd5f6a..57386b6bea88 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -1181,7 +1181,7 @@ amdvi_create_mapping(void *arg, vm_paddr_t gpa, vm_paddr_t hpa, } static uint64_t -amdvi_destroy_mapping(void *arg, vm_paddr_t gpa, uint64_t len) +amdvi_remove_mapping(void *arg, vm_paddr_t gpa, uint64_t len) { struct amdvi_domain *domain; @@ -1360,7 +1360,7 @@ amdvi_disable(void) } static void -amdvi_inv_tlb(void *arg) +amdvi_invalidate_tlb(void *arg) { struct amdvi_domain *domain; @@ -1369,16 +1369,16 @@ amdvi_inv_tlb(void *arg) amdvi_do_inv_domain(domain->id, false); } -struct iommu_ops iommu_ops_amd = { - amdvi_init, - amdvi_cleanup, - amdvi_enable, - amdvi_disable, - amdvi_create_domain, - amdvi_destroy_domain, - amdvi_create_mapping, - amdvi_destroy_mapping, - amdvi_add_device, - amdvi_remove_device, - amdvi_inv_tlb +const struct iommu_ops iommu_ops_amd = { + .init = amdvi_init, + .cleanup = amdvi_cleanup, + .enable = amdvi_enable, + .disable = amdvi_disable, + .create_domain = amdvi_create_domain, + .destroy_domain = amdvi_destroy_domain, + .create_mapping = amdvi_create_mapping, + .remove_mapping = amdvi_remove_mapping, + .add_device = amdvi_add_device, + .remove_device = amdvi_remove_device, + .invalidate_tlb = amdvi_invalidate_tlb }; diff --git a/sys/amd64/vmm/intel/vtd.c b/sys/amd64/vmm/intel/vtd.c index f47e2b56bdce..8f06dc823364 100644 --- a/sys/amd64/vmm/intel/vtd.c +++ b/sys/amd64/vmm/intel/vtd.c @@ -761,16 +761,16 @@ vtd_destroy_domain(void *arg) free(dom, M_VTD); } -struct iommu_ops iommu_ops_intel = { - vtd_init, - vtd_cleanup, - vtd_enable, - vtd_disable, - vtd_create_domain, - vtd_destroy_domain, - vtd_create_mapping, - vtd_remove_mapping, - vtd_add_device, - vtd_remove_device, - vtd_invalidate_tlb, +const struct iommu_ops iommu_ops_intel = { + .init = vtd_init, + .cleanup = vtd_cleanup, + .enable = vtd_enable, + .disable = vtd_disable, + .create_domain = vtd_create_domain, + .destroy_domain = vtd_destroy_domain, + .create_mapping = vtd_create_mapping, + .remove_mapping = vtd_remove_mapping, + .add_device = vtd_add_device, + .remove_device = vtd_remove_device, + .invalidate_tlb = vtd_invalidate_tlb, }; diff --git a/sys/amd64/vmm/io/iommu.c b/sys/amd64/vmm/io/iommu.c index 3fe4d299a497..6a589f153815 100644 --- a/sys/amd64/vmm/io/iommu.c +++ b/sys/amd64/vmm/io/iommu.c @@ -59,7 +59,7 @@ static int iommu_enable = 1; SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, enable, CTLFLAG_RDTUN, &iommu_enable, 0, "Enable use of I/O MMU (required for PCI passthrough)."); -static struct iommu_ops *ops; +static const struct iommu_ops *ops; static void *host_domain; static eventhandler_tag add_tag, delete_tag; diff --git a/sys/amd64/vmm/io/iommu.h b/sys/amd64/vmm/io/iommu.h index f8003a5d4552..090415b57505 100644 --- a/sys/amd64/vmm/io/iommu.h +++ b/sys/amd64/vmm/io/iommu.h @@ -60,8 +60,8 @@ struct iommu_ops { iommu_invalidate_tlb_t invalidate_tlb; }; -extern struct iommu_ops iommu_ops_intel; -extern struct iommu_ops iommu_ops_amd; +extern const struct iommu_ops iommu_ops_intel; +extern const struct iommu_ops iommu_ops_amd; void iommu_cleanup(void); void *iommu_host_domain(void); From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 13:02:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6223D6749E1; Mon, 16 Aug 2021 13:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpDpX66DFz4RVr; Mon, 16 Aug 2021 13:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B8D01BD6; Mon, 16 Aug 2021 13:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GD2SVK092878; Mon, 16 Aug 2021 13:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GD2SRE092877; Mon, 16 Aug 2021 13:02:28 GMT (envelope-from git) Date: Mon, 16 Aug 2021 13:02:28 GMT Message-Id: <202108161302.17GD2SRE092877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 29d25561813f - stable/13 - vfs: Avoid a comparison with an uninitialized field in setutimes() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 29d25561813fd040e41d6588243eb4f32a39b57f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 13:02:29 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=29d25561813fd040e41d6588243eb4f32a39b57f commit 29d25561813fd040e41d6588243eb4f32a39b57f Author: Mark Johnston AuthorDate: 2021-08-09 17:27:20 +0000 Commit: Mark Johnston CommitDate: 2021-08-16 13:01:49 +0000 vfs: Avoid a comparison with an uninitialized field in setutimes() Some filesystems, e.g., devfs, do not populate va_birthtime in their GETATTR implementations. To handle this, make sure that va_birthtime is initialized to the quasi-standard value of { VNOVAL, 0 } before calling VOP_GETATTR. Reported by: KMSAN Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit eca9ac5a32e432313b1c7f52f43dd11504fceef4) --- sys/kern/vfs_syscalls.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 80bcc0cb4d41..855943adecef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3161,15 +3161,19 @@ setutimes(struct thread *td, struct vnode *vp, const struct timespec *ts, { struct mount *mp; struct vattr vattr; - int error, setbirthtime; + int error; + bool setbirthtime; + + setbirthtime = false; + vattr.va_birthtime.tv_sec = VNOVAL; + vattr.va_birthtime.tv_nsec = 0; if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - setbirthtime = 0; - if (numtimes < 3 && !VOP_GETATTR(vp, &vattr, td->td_ucred) && + if (numtimes < 3 && VOP_GETATTR(vp, &vattr, td->td_ucred) == 0 && timespeccmp(&ts[1], &vattr.va_birthtime, < )) - setbirthtime = 1; + setbirthtime = true; VATTR_NULL(&vattr); vattr.va_atime = ts[0]; vattr.va_mtime = ts[1]; From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 16:11:31 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30C8065031A; Mon, 16 Aug 2021 16:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpK0g0dqsz4kqX; Mon, 16 Aug 2021 16:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F273F484D; Mon, 16 Aug 2021 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GGBUlf045775; Mon, 16 Aug 2021 16:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GGBUbW045774; Mon, 16 Aug 2021 16:11:30 GMT (envelope-from git) Date: Mon, 16 Aug 2021 16:11:30 GMT Message-Id: <202108161611.17GGBUbW045774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 5c010b3aa7c7 - stable/13 - arm64: Check dtb version against the one we're expecting to find MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c010b3aa7c775a1e8b1a41b59e923e1d0ccdba6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 16:11:31 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5c010b3aa7c775a1e8b1a41b59e923e1d0ccdba6 commit 5c010b3aa7c775a1e8b1a41b59e923e1d0ccdba6 Author: Emmanuel Vadot AuthorDate: 2021-03-23 14:24:14 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-16 16:07:53 +0000 arm64: Check dtb version against the one we're expecting to find Do for arm64 what was done for armv7 in e63faa9ba832b6 (cherry picked from commit 63f344024a0d336b116f3563a1604fbd9b4253c7) --- sys/arm64/arm64/machdep.c | 16 ++++++++++++++++ sys/conf/Makefile.arm64 | 3 +++ 2 files changed, 19 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 071bf3e51ab2..3c77300f6f2b 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -1244,6 +1244,8 @@ initarm(struct arm64_bootparams *abp) #ifdef FDT struct mem_region mem_regions[FDT_MEM_REGIONS]; int mem_regions_sz; + phandle_t root; + char dts_version[255]; #endif vm_offset_t lastaddr; caddr_t kmdp; @@ -1356,6 +1358,20 @@ initarm(struct arm64_bootparams *abp) if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); +#ifdef FDT + root = OF_finddevice("/"); + if (OF_getprop(root, "freebsd,dts-version", dts_version, sizeof(dts_version)) > 0) { + if (strcmp(LINUX_DTS_VERSION, dts_version) != 0) + printf("WARNING: DTB version is %s while kernel expects %s, " + "please update the DTB in the ESP\n", + dts_version, + LINUX_DTS_VERSION); + } else { + printf("WARNING: Cannot find freebsd,dts-version property, " + "cannot check DTB compliance\n"); + } +#endif + if (boothowto & RB_VERBOSE) { if (efihdr != NULL) print_efi_map_entries(efihdr); diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index c7951872ca2d..2e404664708c 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -27,6 +27,9 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include +LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts +CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" + # Use a custom SYSTEM_LD command to generate the elf kernel, so we can # set the text segment start address, and also strip the "arm mapping # symbols" which have names like $a.0 and $d.2; see the document From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 16:11:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98628650221; Mon, 16 Aug 2021 16:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpK0h1gnsz4l4W; Mon, 16 Aug 2021 16:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 161974665; Mon, 16 Aug 2021 16:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GGBW4Z045799; Mon, 16 Aug 2021 16:11:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GGBWU2045798; Mon, 16 Aug 2021 16:11:32 GMT (envelope-from git) Date: Mon, 16 Aug 2021 16:11:32 GMT Message-Id: <202108161611.17GGBWU2045798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 920a66c0a3b8 - stable/13 - arm64: Only check for freebsd, dts-version if we are booted in FDT mode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 920a66c0a3b879418b5ff0393b0bf07b87758999 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 16:11:32 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=920a66c0a3b879418b5ff0393b0bf07b87758999 commit 920a66c0a3b879418b5ff0393b0bf07b87758999 Author: Emmanuel Vadot AuthorDate: 2021-03-23 15:37:25 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-16 16:07:54 +0000 arm64: Only check for freebsd,dts-version if we are booted in FDT mode. Reported by: andrew (cherry picked from commit 6bcba8dac9a4ddaeabf84ad8d31b1113a9dcf8c2) --- sys/arm64/arm64/machdep.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 3c77300f6f2b..6b7e4be7c9d1 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -1359,16 +1359,18 @@ initarm(struct arm64_bootparams *abp) strlcpy(kernelname, env, sizeof(kernelname)); #ifdef FDT - root = OF_finddevice("/"); - if (OF_getprop(root, "freebsd,dts-version", dts_version, sizeof(dts_version)) > 0) { - if (strcmp(LINUX_DTS_VERSION, dts_version) != 0) - printf("WARNING: DTB version is %s while kernel expects %s, " - "please update the DTB in the ESP\n", - dts_version, - LINUX_DTS_VERSION); - } else { - printf("WARNING: Cannot find freebsd,dts-version property, " - "cannot check DTB compliance\n"); + if (arm64_bus_method == ARM64_BUS_FDT) { + root = OF_finddevice("/"); + if (OF_getprop(root, "freebsd,dts-version", dts_version, sizeof(dts_version)) > 0) { + if (strcmp(LINUX_DTS_VERSION, dts_version) != 0) + printf("WARNING: DTB version is %s while kernel expects %s, " + "please update the DTB in the ESP\n", + dts_version, + LINUX_DTS_VERSION); + } else { + printf("WARNING: Cannot find freebsd,dts-version property, " + "cannot check DTB compliance\n"); + } } #endif From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 16:14:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66989650263; Mon, 16 Aug 2021 16:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpK3t2QjJz4lRx; Mon, 16 Aug 2021 16:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B2F644D5; Mon, 16 Aug 2021 16:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GGEIcS048602; Mon, 16 Aug 2021 16:14:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GGEIbF048601; Mon, 16 Aug 2021 16:14:18 GMT (envelope-from git) Date: Mon, 16 Aug 2021 16:14:18 GMT Message-Id: <202108161614.17GGEIbF048601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: e99783747e49 - stable/13 - pkgbase: Add an src.conf option for splitting man pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e99783747e49d0df4c9bccbc33907333e2d77a1e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 16:14:18 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e99783747e49d0df4c9bccbc33907333e2d77a1e commit e99783747e49d0df4c9bccbc33907333e2d77a1e Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:11:56 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-16 16:13:51 +0000 pkgbase: Add an src.conf option for splitting man pages Man pages can be big in total, add an options to split man pages in -man packages so we produce smaller packages. This is useful for small jails or mfsroot produced of pkgbase. The option is off by default. Reviewed by: bapt, Mina Galić Differential Revision: https://reviews.freebsd.org/D29169 MFC after: 2 weeks (cherry picked from commit c7e6cb9e08d6b51e677a9f5546b8e36d678687d0) --- release/packages/generate-ucl.sh | 5 +++++ share/man/man5/src.conf.5 | 2 ++ share/mk/bsd.man.mk | 9 +++++++++ share/mk/src.opts.mk | 1 + tools/build/options/WITH_MANSPLITPKG | 2 ++ 5 files changed, 19 insertions(+) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index e900f9991912..67c10e485eb7 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -71,6 +71,11 @@ main() { _descr="Debugging Symbols" pkgdeps="${outname}" ;; + *_man) + outname="${outname%%_man}" + _descr="Manual Pages" + pkgdeps="${outname}" + ;; ${origname}) pkgdeps="runtime" ;; diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a0c1b4bb8b8a..f118471c2770 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1099,6 +1099,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Set to not to install compressed man pages. Only the uncompressed versions will be installed. +.It Va WITH_MANSPLITPKG +Set to split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Set to not build utilities for manual pages, .Xr apropos 1 , diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 1e67928a2754..21c5fe4f2424 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -50,7 +50,11 @@ .error bsd.man.mk cannot be included directly. .endif +.if ${MK_MANSPLITPKG} == "no" MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.else +MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.endif CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat @@ -226,8 +230,13 @@ maninstall: ${MAN} .endif # ${MK_MANCOMPRESS} == "no" .endif .for l t in ${_MANLINKS} +.if ${MK_MANSPLITPKG} == "no" rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.else + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ + ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.endif .endfor manlint: diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 77c60aef0bc4..7d08b6a1da89 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FIREWIRE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ + MANSPLITPKG \ OFED_EXTRA \ OPENLDAP \ OPENSSL_KTLS \ diff --git a/tools/build/options/WITH_MANSPLITPKG b/tools/build/options/WITH_MANSPLITPKG new file mode 100644 index 000000000000..122da24e0bb4 --- /dev/null +++ b/tools/build/options/WITH_MANSPLITPKG @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to split man pages into their own packages during make package. From owner-dev-commits-src-branches@freebsd.org Mon Aug 16 16:16:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23A56650694; Mon, 16 Aug 2021 16:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpK6305KDz4lSb; Mon, 16 Aug 2021 16:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEEEC4670; Mon, 16 Aug 2021 16:16:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GGGAWH048958; Mon, 16 Aug 2021 16:16:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GGGAeY048957; Mon, 16 Aug 2021 16:16:10 GMT (envelope-from git) Date: Mon, 16 Aug 2021 16:16:10 GMT Message-Id: <202108161616.17GGGAeY048957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 1516cd873510 - stable/13 - pkgbase: make only vital packages vital, not their sub-packages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1516cd873510126a9d588ede3ea523d39bb30517 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 16:16:11 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1516cd873510126a9d588ede3ea523d39bb30517 commit 1516cd873510126a9d588ede3ea523d39bb30517 Author: Mina Igalic AuthorDate: 2021-03-28 10:16:45 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-16 16:15:46 +0000 pkgbase: make only vital packages vital, not their sub-packages make "vital" a replaceable, which defaults to "false" and only set it for the main clib, utilities and runtime packages, not their sub-packages PR: 254174 Differential Revision: https://reviews.freebsd.org/D29224 (cherry picked from commit 1c1ff7979571bf07c05a48e857b7b285b037410f) --- release/packages/generate-ucl.sh | 10 +++++++++- release/packages/jail.ucl | 2 +- release/packages/runtime.ucl | 2 +- release/packages/template.ucl | 1 + release/packages/utilities.ucl | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index 67c10e485eb7..10d9d3162f9c 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -32,19 +32,25 @@ main() { shift $(( ${OPTIND} - 1 )) outname="$(echo ${outname} | tr '-' '_')" + vital="false" case "${outname}" in clibs) + vital="true" # clibs should not have any dependencies or anything # else imposed on it. ;; caroot) pkgdeps="utilities" ;; + utilities) + uclfile="${uclfile}" + vital="true" + ;; runtime) outname="runtime" - uclfile="${uclfile}" _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" + vital="true" ;; *_lib32_dev) outname="${outname%%_lib32_dev}" @@ -108,6 +114,7 @@ main() { echo "uclfile=${uclfile}" echo "desc=${desc}" echo "comment=${comment}" + echo "vital=${vital}" echo "cp ${uclsource} -> ${uclfile}" echo "===============================================================" echo "" @@ -135,6 +142,7 @@ EOF -e "s/%PKGNAME%/${origname}/" \ -e "s/%COMMENT%/${comment}/" \ -e "s/%DESC%/${desc}/" \ + -e "s/%VITAL%/${vital}/" \ -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \ -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ -e "s|%PKG_WWW%|${PKG_WWW}|" \ diff --git a/release/packages/jail.ucl b/release/packages/jail.ucl index 8448a15ebf7b..cc22cf042a76 100644 --- a/release/packages/jail.ucl +++ b/release/packages/jail.ucl @@ -10,7 +10,7 @@ categories = [ base ] maintainer = "%PKG_MAINTAINER%" www = "%PKG_WWW%" prefix = "/" -vital = true +vital = %VITAL% licenselogic = "single" licenses = [ BSD2CLAUSE ] desc = < Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45B4D650275; Mon, 16 Aug 2021 16:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpK641CPhz4lZj; Mon, 16 Aug 2021 16:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DB0746D3; Mon, 16 Aug 2021 16:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17GGGB4k048982; Mon, 16 Aug 2021 16:16:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17GGGBrD048981; Mon, 16 Aug 2021 16:16:11 GMT (envelope-from git) Date: Mon, 16 Aug 2021 16:16:11 GMT Message-Id: <202108161616.17GGGBrD048981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: e6a32ddf3ff9 - stable/13 - pkgbase: Add nfsiod to the FreeBSD-nfs package MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6a32ddf3ff9e0d12f5221b477bf71e7a926afc8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 16:16:12 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e6a32ddf3ff9e0d12f5221b477bf71e7a926afc8 commit e6a32ddf3ff9e0d12f5221b477bf71e7a926afc8 Author: Emmanuel Vadot AuthorDate: 2021-08-05 16:17:34 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-16 16:15:47 +0000 pkgbase: Add nfsiod to the FreeBSD-nfs package Missed in 081fb644925f (cherry picked from commit e06b8f11280397d7fdaa27d8d6f8eec9e4c707b3) --- sbin/nfsiod/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/nfsiod/Makefile b/sbin/nfsiod/Makefile index 47cd290ec78e..912dd19e25cb 100644 --- a/sbin/nfsiod/Makefile +++ b/sbin/nfsiod/Makefile @@ -4,4 +4,6 @@ PROG= nfsiod MAN= nfsiod.8 +PACKAGE= nfs + .include From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:36:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09D3E659D81; Tue, 17 Aug 2021 01:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYXL6rdHz4cCv; Tue, 17 Aug 2021 01:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D300114784; Tue, 17 Aug 2021 01:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1aImu095935; Tue, 17 Aug 2021 01:36:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1aIBg095934; Tue, 17 Aug 2021 01:36:18 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:36:18 GMT Message-Id: <202108170136.17H1aIBg095934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b761f264926a - stable/13 - e1000: consistently use the hw variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b761f264926a80c87ea3d9f3e7de37fc9bf2c2ec Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:36:19 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b761f264926a80c87ea3d9f3e7de37fc9bf2c2ec commit b761f264926a80c87ea3d9f3e7de37fc9bf2c2ec Author: Marius Strobl AuthorDate: 2021-01-23 18:18:28 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:29:19 +0000 e1000: consistently use the hw variables It's rather confusing when adapter->hw and hw are mixed and matched within a particular function. Some of this was missed in cd1cf2fc1d49c509ded05dcd41b7600a5957fb9a and r353778 respectively. (cherry picked from commit c1655b0f8998f9e842a004f33e7c9c01c5d9e879) --- sys/dev/e1000/if_em.c | 152 ++++++++++++++++++++++++-------------------------- 1 file changed, 73 insertions(+), 79 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index c9a6648b34a0..b2d563dbe796 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -837,7 +837,7 @@ em_if_attach_pre(if_ctx_t ctx) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); @@ -849,7 +849,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS; scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - if (adapter->hw.mac.type != e1000_82575) + if (hw.mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; /* ** Some new devices, as with ixgbe, now may @@ -857,7 +857,7 @@ em_if_attach_pre(if_ctx_t ctx) ** track of which is used. */ scctx->isc_msix_bar = pci_msix_table_bar(dev); - } else if (adapter->hw.mac.type >= em_mac_min) { + } else if (hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); @@ -889,7 +889,7 @@ em_if_attach_pre(if_ctx_t ctx) * We support MSI-X with 82574 only, but indicate to iflib(4) * that it shall give MSI at least a try with other devices. */ - if (adapter->hw.mac.type == e1000_82574) { + if (hw.mac.type == e1000_82574) { scctx->isc_msix_bar = pci_msix_table_bar(dev);; } else { scctx->isc_msix_bar = -1; @@ -903,7 +903,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP; scctx->isc_txrx = &lem_txrx; scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; - if (adapter->hw.mac.type < e1000_82543) + if (hw.mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); /* INTx only */ scctx->isc_msix_bar = 0; @@ -996,9 +996,9 @@ em_if_attach_pre(if_ctx_t ctx) hw->phy.autoneg_wait_to_complete = FALSE; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - if (adapter->hw.mac.type < em_mac_min) { - e1000_init_script_state_82541(&adapter->hw, TRUE); - e1000_set_tbi_compatibility_82543(&adapter->hw, TRUE); + if (hw.mac.type < em_mac_min) { + e1000_init_script_state_82541(hw, TRUE); + e1000_set_tbi_compatibility_82543(hw, TRUE); } /* Copper options */ if (hw->phy.media_type == e1000_media_type_copper) { @@ -1011,7 +1011,7 @@ em_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = + scctx->isc_max_frame_size = hw.mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* @@ -1221,7 +1221,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu) struct adapter *adapter = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); + IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); switch (adapter->hw.mac.type) { case e1000_82571: @@ -1808,7 +1808,7 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); - link_check = adapter->hw.mac.serdes_has_link; + link_check = hw.mac.serdes_has_link; break; /* VF device is type_unknown */ case e1000_media_type_unknown: @@ -1855,8 +1855,8 @@ em_if_update_admin_status(if_ctx_t ctx) (hw->phy.id == I210_I_PHY_ID)) msec_delay(I210_LINK_DELAY); /* Reset if the media type changed. */ - if ((hw->dev_spec._82575.media_changed) && - (adapter->hw.mac.type >= igb_mac_min)) { + if (hw->dev_spec._82575.media_changed && + hw.mac.type >= igb_mac_min) { hw->dev_spec._82575.media_changed = false; adapter->flags |= IGB_MEDIA_RESET; em_reset(ctx); @@ -2117,13 +2117,13 @@ igb_configure_queues(struct adapter *adapter) u32 tmp, ivar = 0, newitr = 0; /* First turn on RSS capability */ - if (adapter->hw.mac.type != e1000_82575) + if (hw.mac.type != e1000_82575) E1000_WRITE_REG(hw, E1000_GPIE, E1000_GPIE_MSIX_MODE | E1000_GPIE_EIAME | E1000_GPIE_PBA | E1000_GPIE_NSICR); /* Turn on MSI-X */ - switch (adapter->hw.mac.type) { + switch (hw.mac.type) { case e1000_82580: case e1000_i350: case e1000_i354: @@ -2531,7 +2531,7 @@ em_reset(if_ctx_t ctx) case e1000_ich9lan: case e1000_ich10lan: /* Boost Receive side for jumbo frames */ - if (adapter->hw.mac.max_frame_size > 4096) + if (hw.mac.max_frame_size > 4096) pba = E1000_PBA_14K; else pba = E1000_PBA_10K; @@ -2579,11 +2579,11 @@ em_reset(if_ctx_t ctx) pba = E1000_READ_REG(hw, E1000_PBA); tx_space = pba >> 16; pba &= 0xffff; - min_tx = (adapter->hw.mac.max_frame_size + + min_tx = (hw.mac.max_frame_size + sizeof(struct e1000_tx_desc) - ETHERNET_FCS_SIZE) * 2; min_tx = roundup2(min_tx, 1024); min_tx >>= 10; - min_rx = adapter->hw.mac.max_frame_size; + min_rx = hw.mac.max_frame_size; min_rx = roundup2(min_rx, 1024); min_rx >>= 10; if (tx_space < min_tx && @@ -2600,7 +2600,7 @@ em_reset(if_ctx_t ctx) } if (hw->mac.type < igb_mac_min) - E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba); + E1000_WRITE_REG(hw, E1000_PBA, pba); INIT_DEBUGOUT1("em_reset: pba=%dK",pba); @@ -2620,7 +2620,7 @@ em_reset(if_ctx_t ctx) */ rx_buffer_size = (pba & 0xffff) << 10; hw->fc.high_water = rx_buffer_size - - roundup2(adapter->hw.mac.max_frame_size, 1024); + roundup2(hw.mac.max_frame_size, 1024); hw->fc.low_water = hw->fc.high_water - 1500; if (adapter->fc) /* locally set flow control value? */ @@ -2698,7 +2698,7 @@ em_reset(if_ctx_t ctx) /* Issue a global reset */ e1000_reset_hw(hw); - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { E1000_WRITE_REG(hw, E1000_WUC, 0); } else { E1000_WRITE_REG(hw, E1000_WUFC, 0); @@ -2714,7 +2714,7 @@ em_reset(if_ctx_t ctx) device_printf(dev, "Hardware Initialization Failed\n"); return; } - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) igb_init_dmac(adapter, pba); E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); @@ -2779,7 +2779,7 @@ igb_initialize_rss_mapping(struct adapter *adapter) u32 rss_key[10], mrqc, shift = 0; /* XXX? */ - if (adapter->hw.mac.type == e1000_82575) + if (hw.mac.type == e1000_82575) shift = 6; /* @@ -2888,11 +2888,11 @@ em_setup_interface(if_ctx_t ctx) * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || - (adapter->hw.phy.media_type == e1000_media_type_internal_serdes)) { + if (hw.phy.media_type == e1000_media_type_fiber || + hw.phy.media_type == e1000_media_type_internal_serdes) { u_char fiber_type = IFM_1000_SX; /* default type */ - if (adapter->hw.mac.type == e1000_82545) + if (hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; ifmedia_add(adapter->media, IFM_ETHER | fiber_type | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | fiber_type, 0, NULL); @@ -2901,7 +2901,7 @@ em_setup_interface(if_ctx_t ctx) ifmedia_add(adapter->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - if (adapter->hw.phy.type != e1000_phy_ife) { + if (hw.phy.type != e1000_phy_ife) { ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL); } @@ -3070,8 +3070,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TDH(i), 0); HW_DEBUGOUT2("Base = %x, Length = %x\n", - E1000_READ_REG(&adapter->hw, E1000_TDBAL(i)), - E1000_READ_REG(&adapter->hw, E1000_TDLEN(i))); + E1000_READ_REG(hw, E1000_TDBAL(i)), + E1000_READ_REG(hw, E1000_TDLEN(i))); txdctl = 0; /* clear txdctl */ txdctl |= 0x1f; /* PTHRESH */ @@ -3085,7 +3085,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) } /* Set the default values for the Tx Inter Packet Gap timer */ - switch (adapter->hw.mac.type) { + switch (hw.mac.type) { case e1000_80003es2lan: tipg = DEFAULT_82543_TIPG_IPGR1; tipg |= DEFAULT_80003ES2LAN_TIPG_IPGR2 << @@ -3097,9 +3097,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; break; default: - if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || - (adapter->hw.phy.media_type == - e1000_media_type_internal_serdes)) + if (hw.phy.media_type == e1000_media_type_fiber || + hw.phy.media_type == e1000_media_type_internal_serdes) tipg = DEFAULT_82543_TIPG_IPGT_FIBER; else tipg = DEFAULT_82543_TIPG_IPGT_COPPER; @@ -3107,51 +3106,50 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; } - E1000_WRITE_REG(&adapter->hw, E1000_TIPG, tipg); - E1000_WRITE_REG(&adapter->hw, E1000_TIDV, adapter->tx_int_delay.value); + E1000_WRITE_REG(hw, E1000_TIPG, tipg); + E1000_WRITE_REG(hw, E1000_TIDV, adapter->tx_int_delay.value); - if(adapter->hw.mac.type >= e1000_82540) - E1000_WRITE_REG(&adapter->hw, E1000_TADV, + if(hw.mac.type >= e1000_82540) + E1000_WRITE_REG(hw, E1000_TADV, adapter->tx_abs_int_delay.value); - if ((adapter->hw.mac.type == e1000_82571) || - (adapter->hw.mac.type == e1000_82572)) { - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + if (hw.mac.type == e1000_82571 || hw.mac.type == e1000_82572) { + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_SPEED_MODE_BIT; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - } else if (adapter->hw.mac.type == e1000_80003es2lan) { + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + } else if (hw.mac.type == e1000_80003es2lan) { /* errata: program both queues to unweighted RR */ - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= 1; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(1)); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + tarc = E1000_READ_REG(hw, E1000_TARC(1)); tarc |= 1; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); - } else if (adapter->hw.mac.type == e1000_82574) { - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + E1000_WRITE_REG(hw, E1000_TARC(1), tarc); + } else if (hw.mac.type == e1000_82574) { + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_ERRATA_BIT; if ( adapter->tx_num_queues > 1) { tarc |= (TARC_COMPENSATION_MODE | TARC_MQ_FIX); - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + E1000_WRITE_REG(hw, E1000_TARC(1), tarc); } else - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); } if (adapter->tx_int_delay.value > 0) adapter->txd_cmd |= E1000_TXD_CMD_IDE; /* Program the Transmit Control Register */ - tctl = E1000_READ_REG(&adapter->hw, E1000_TCTL); + tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (adapter->hw.mac.type >= e1000_82571) + if (hw.mac.type >= e1000_82571) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ - E1000_WRITE_REG(&adapter->hw, E1000_TCTL, tctl); + E1000_WRITE_REG(hw, E1000_TCTL, tctl); /* SPT and KBL errata workarounds */ if (hw->mac.type == e1000_pch_spt) { @@ -3214,9 +3212,9 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (adapter->hw.mac.type >= e1000_82540) { - E1000_WRITE_REG(&adapter->hw, E1000_RADV, - adapter->rx_abs_int_delay.value); + if (hw.mac.type >= e1000_82540) { + E1000_WRITE_REG(hw, E1000_RADV, + adapter->rx_abs_int_delay.value); /* * Set the interrupt throttling rate. Value is calculated @@ -3224,8 +3222,7 @@ em_initialize_receive_unit(if_ctx_t ctx) */ E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); } - E1000_WRITE_REG(&adapter->hw, E1000_RDTR, - adapter->rx_int_delay.value); + E1000_WRITE_REG(hw, E1000_RDTR, adapter->rx_int_delay.value); /* Use extended rx descriptor formats */ rfctl = E1000_READ_REG(hw, E1000_RFCTL); @@ -3245,9 +3242,9 @@ em_initialize_receive_unit(if_ctx_t ctx) rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && - adapter->hw.mac.type >= e1000_82543) { + hw.mac.type >= e1000_82543) { if (adapter->tx_num_queues > 1) { - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { rxcsum |= E1000_RXCSUM_PCSD; if (hw->mac.type != e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; @@ -3256,11 +3253,11 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_RXCSUM_IPOFL | E1000_RXCSUM_PCSD; } else { - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) rxcsum |= E1000_RXCSUM_IPPCSE; else rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL; - if (adapter->hw.mac.type > e1000_82575) + if (hw.mac.type > e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; } } else @@ -3269,7 +3266,7 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); if (adapter->rx_num_queues > 1) { - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) igb_initialize_rss_mapping(adapter); else em_initialize_rss_mapping(adapter); @@ -3309,14 +3306,11 @@ em_initialize_receive_unit(if_ctx_t ctx) * Only write to RXDCTL(1) if there is a need for different * settings. */ - - if (((adapter->hw.mac.type == e1000_ich9lan) || - (adapter->hw.mac.type == e1000_pch2lan) || - (adapter->hw.mac.type == e1000_ich10lan)) && - (if_getmtu(ifp) > ETHERMTU)) { + if ((hw.mac.type == e1000_ich9lan || hw.mac.type == e1000_pch2lan || + hw.mac.type == e1000_ich10lan) && (if_getmtu(ifp) > ETHERMTU)) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3); - } else if (adapter->hw.mac.type == e1000_82574) { + } else if (hw.mac.type == e1000_82574) { for (int i = 0; i < adapter->rx_num_queues; i++) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(i)); rxdctl |= 0x20; /* PTHRESH */ @@ -3325,7 +3319,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= 1 << 24; /* Switch to granularity */ E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (adapter->hw.mac.type >= igb_mac_min) { + } else if (hw.mac.type >= igb_mac_min) { u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { @@ -3341,7 +3335,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* are we on a vlan? */ if (ifp->if_vlantrunk != NULL) psize += VLAN_TAG_SIZE; - E1000_WRITE_REG(&adapter->hw, E1000_RLPML, psize); + E1000_WRITE_REG(hw, E1000_RLPML, psize); } else { srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT; rctl |= E1000_RCTL_SZ_2048; @@ -3387,7 +3381,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= IGB_RX_WTHRESH << 16; E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (adapter->hw.mac.type >= e1000_pch2lan) { + } else if (hw.mac.type >= e1000_pch2lan) { if (if_getmtu(ifp) > ETHERMTU) e1000_lv_jumbo_workaround_ich8lan(hw, TRUE); else @@ -3397,7 +3391,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; - if (adapter->hw.mac.type < igb_mac_min) { + if (hw.mac.type < igb_mac_min) { if (adapter->rx_mbuf_sz == MCLBYTES) rctl |= E1000_RCTL_SZ_2048; else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) @@ -3860,7 +3854,7 @@ em_enable_phy_wakeup(struct adapter *adapter) e1000_copy_rx_addrs_to_phy_ich8lan(hw); /* copy MAC MTA to PHY MTA */ - for (int i = 0; i < adapter->hw.mac.mta_reg_count; i++) { + for (int i = 0; i < hw.mac.mta_reg_count; i++) { mreg = E1000_READ_REG_ARRAY(hw, E1000_MTA, i); e1000_write_phy_reg(hw, BM_MTA(i), (u16)(mreg & 0xFFFF)); e1000_write_phy_reg(hw, BM_MTA(i) + 1, @@ -3868,7 +3862,7 @@ em_enable_phy_wakeup(struct adapter *adapter) } /* configure PHY Rx Control register */ - e1000_read_phy_reg(&adapter->hw, BM_RCTL, &preg); + e1000_read_phy_reg(hw, BM_RCTL, &preg); mreg = E1000_READ_REG(hw, E1000_RCTL); if (mreg & E1000_RCTL_UPE) preg |= BM_RCTL_UPE; @@ -3885,7 +3879,7 @@ em_enable_phy_wakeup(struct adapter *adapter) mreg = E1000_READ_REG(hw, E1000_CTRL); if (mreg & E1000_CTRL_RFCE) preg |= BM_RCTL_RFCE; - e1000_write_phy_reg(&adapter->hw, BM_RCTL, preg); + e1000_write_phy_reg(hw, BM_RCTL, preg); /* enable PHY wakeup in MAC register */ E1000_WRITE_REG(hw, E1000_WUC, @@ -3893,8 +3887,8 @@ em_enable_phy_wakeup(struct adapter *adapter) E1000_WRITE_REG(hw, E1000_WUFC, adapter->wol); /* configure and enable PHY wakeup in PHY registers */ - e1000_write_phy_reg(&adapter->hw, BM_WUFC, adapter->wol); - e1000_write_phy_reg(&adapter->hw, BM_WUC, E1000_WUC_PME_EN); + e1000_write_phy_reg(hw, BM_WUFC, adapter->wol); + e1000_write_phy_reg(hw, BM_WUC, E1000_WUC_PME_EN); /* activate PHY wakeup */ ret = hw->phy.ops.acquire(hw); From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:36:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 261CE6597E5; Tue, 17 Aug 2021 01:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYXN0Lpvz4bxG; Tue, 17 Aug 2021 01:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E817E141E8; Tue, 17 Aug 2021 01:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1aJZX095966; Tue, 17 Aug 2021 01:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1aJRp095965; Tue, 17 Aug 2021 01:36:19 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:36:19 GMT Message-Id: <202108170136.17H1aJRp095965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 5dd1d72e5b3b - stable/13 - e1000: fix build after b761f264926a (orig c1655b0f) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5dd1d72e5b3bbdcfdc70facc940f42cd036ad626 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:36:20 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5dd1d72e5b3bbdcfdc70facc940f42cd036ad626 commit 5dd1d72e5b3bbdcfdc70facc940f42cd036ad626 Author: Marius Strobl AuthorDate: 2021-01-27 14:28:25 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:31:43 +0000 e1000: fix build after b761f264926a (orig c1655b0f) (cherry picked from commit c262e8e87e7b59b768c717c1779ef1ba28507f44) --- sys/dev/e1000/if_em.c | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b2d563dbe796..52d20e57519a 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -837,7 +837,7 @@ em_if_attach_pre(if_ctx_t ctx) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); @@ -849,7 +849,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS; scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - if (hw.mac.type != e1000_82575) + if (hw->mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; /* ** Some new devices, as with ixgbe, now may @@ -857,7 +857,7 @@ em_if_attach_pre(if_ctx_t ctx) ** track of which is used. */ scctx->isc_msix_bar = pci_msix_table_bar(dev); - } else if (hw.mac.type >= em_mac_min) { + } else if (hw->mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); @@ -889,7 +889,7 @@ em_if_attach_pre(if_ctx_t ctx) * We support MSI-X with 82574 only, but indicate to iflib(4) * that it shall give MSI at least a try with other devices. */ - if (hw.mac.type == e1000_82574) { + if (hw->mac.type == e1000_82574) { scctx->isc_msix_bar = pci_msix_table_bar(dev);; } else { scctx->isc_msix_bar = -1; @@ -903,7 +903,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP; scctx->isc_txrx = &lem_txrx; scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; - if (hw.mac.type < e1000_82543) + if (hw->mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); /* INTx only */ scctx->isc_msix_bar = 0; @@ -996,7 +996,7 @@ em_if_attach_pre(if_ctx_t ctx) hw->phy.autoneg_wait_to_complete = FALSE; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - if (hw.mac.type < em_mac_min) { + if (hw->mac.type < em_mac_min) { e1000_init_script_state_82541(hw, TRUE); e1000_set_tbi_compatibility_82543(hw, TRUE); } @@ -1011,7 +1011,7 @@ em_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - scctx->isc_max_frame_size = hw.mac.max_frame_size = + scctx->isc_max_frame_size = hw->mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* @@ -1808,7 +1808,7 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); - link_check = hw.mac.serdes_has_link; + link_check = hw->mac.serdes_has_link; break; /* VF device is type_unknown */ case e1000_media_type_unknown: @@ -1856,7 +1856,7 @@ em_if_update_admin_status(if_ctx_t ctx) msec_delay(I210_LINK_DELAY); /* Reset if the media type changed. */ if (hw->dev_spec._82575.media_changed && - hw.mac.type >= igb_mac_min) { + hw->mac.type >= igb_mac_min) { hw->dev_spec._82575.media_changed = false; adapter->flags |= IGB_MEDIA_RESET; em_reset(ctx); @@ -2117,13 +2117,13 @@ igb_configure_queues(struct adapter *adapter) u32 tmp, ivar = 0, newitr = 0; /* First turn on RSS capability */ - if (hw.mac.type != e1000_82575) + if (hw->mac.type != e1000_82575) E1000_WRITE_REG(hw, E1000_GPIE, E1000_GPIE_MSIX_MODE | E1000_GPIE_EIAME | E1000_GPIE_PBA | E1000_GPIE_NSICR); /* Turn on MSI-X */ - switch (hw.mac.type) { + switch (hw->mac.type) { case e1000_82580: case e1000_i350: case e1000_i354: @@ -2531,7 +2531,7 @@ em_reset(if_ctx_t ctx) case e1000_ich9lan: case e1000_ich10lan: /* Boost Receive side for jumbo frames */ - if (hw.mac.max_frame_size > 4096) + if (hw->mac.max_frame_size > 4096) pba = E1000_PBA_14K; else pba = E1000_PBA_10K; @@ -2579,11 +2579,11 @@ em_reset(if_ctx_t ctx) pba = E1000_READ_REG(hw, E1000_PBA); tx_space = pba >> 16; pba &= 0xffff; - min_tx = (hw.mac.max_frame_size + + min_tx = (hw->mac.max_frame_size + sizeof(struct e1000_tx_desc) - ETHERNET_FCS_SIZE) * 2; min_tx = roundup2(min_tx, 1024); min_tx >>= 10; - min_rx = hw.mac.max_frame_size; + min_rx = hw->mac.max_frame_size; min_rx = roundup2(min_rx, 1024); min_rx >>= 10; if (tx_space < min_tx && @@ -2620,7 +2620,7 @@ em_reset(if_ctx_t ctx) */ rx_buffer_size = (pba & 0xffff) << 10; hw->fc.high_water = rx_buffer_size - - roundup2(hw.mac.max_frame_size, 1024); + roundup2(hw->mac.max_frame_size, 1024); hw->fc.low_water = hw->fc.high_water - 1500; if (adapter->fc) /* locally set flow control value? */ @@ -2698,7 +2698,7 @@ em_reset(if_ctx_t ctx) /* Issue a global reset */ e1000_reset_hw(hw); - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { E1000_WRITE_REG(hw, E1000_WUC, 0); } else { E1000_WRITE_REG(hw, E1000_WUFC, 0); @@ -2714,7 +2714,7 @@ em_reset(if_ctx_t ctx) device_printf(dev, "Hardware Initialization Failed\n"); return; } - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) igb_init_dmac(adapter, pba); E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); @@ -2779,7 +2779,7 @@ igb_initialize_rss_mapping(struct adapter *adapter) u32 rss_key[10], mrqc, shift = 0; /* XXX? */ - if (hw.mac.type == e1000_82575) + if (hw->mac.type == e1000_82575) shift = 6; /* @@ -2888,11 +2888,11 @@ em_setup_interface(if_ctx_t ctx) * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - if (hw.phy.media_type == e1000_media_type_fiber || - hw.phy.media_type == e1000_media_type_internal_serdes) { + if (adapter->hw.phy.media_type == e1000_media_type_fiber || + adapter->hw.phy.media_type == e1000_media_type_internal_serdes) { u_char fiber_type = IFM_1000_SX; /* default type */ - if (hw.mac.type == e1000_82545) + if (adapter->hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; ifmedia_add(adapter->media, IFM_ETHER | fiber_type | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | fiber_type, 0, NULL); @@ -2901,7 +2901,7 @@ em_setup_interface(if_ctx_t ctx) ifmedia_add(adapter->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - if (hw.phy.type != e1000_phy_ife) { + if (adapter->hw.phy.type != e1000_phy_ife) { ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL); } @@ -3085,7 +3085,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) } /* Set the default values for the Tx Inter Packet Gap timer */ - switch (hw.mac.type) { + switch (hw->mac.type) { case e1000_80003es2lan: tipg = DEFAULT_82543_TIPG_IPGR1; tipg |= DEFAULT_80003ES2LAN_TIPG_IPGR2 << @@ -3097,8 +3097,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; break; default: - if (hw.phy.media_type == e1000_media_type_fiber || - hw.phy.media_type == e1000_media_type_internal_serdes) + if (hw->phy.media_type == e1000_media_type_fiber || + hw->phy.media_type == e1000_media_type_internal_serdes) tipg = DEFAULT_82543_TIPG_IPGT_FIBER; else tipg = DEFAULT_82543_TIPG_IPGT_COPPER; @@ -3109,15 +3109,15 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TIPG, tipg); E1000_WRITE_REG(hw, E1000_TIDV, adapter->tx_int_delay.value); - if(hw.mac.type >= e1000_82540) + if(hw->mac.type >= e1000_82540) E1000_WRITE_REG(hw, E1000_TADV, adapter->tx_abs_int_delay.value); - if (hw.mac.type == e1000_82571 || hw.mac.type == e1000_82572) { + if (hw->mac.type == e1000_82571 || hw->mac.type == e1000_82572) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_SPEED_MODE_BIT; E1000_WRITE_REG(hw, E1000_TARC(0), tarc); - } else if (hw.mac.type == e1000_80003es2lan) { + } else if (hw->mac.type == e1000_80003es2lan) { /* errata: program both queues to unweighted RR */ tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= 1; @@ -3125,7 +3125,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) tarc = E1000_READ_REG(hw, E1000_TARC(1)); tarc |= 1; E1000_WRITE_REG(hw, E1000_TARC(1), tarc); - } else if (hw.mac.type == e1000_82574) { + } else if (hw->mac.type == e1000_82574) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_ERRATA_BIT; if ( adapter->tx_num_queues > 1) { @@ -3145,7 +3145,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (hw.mac.type >= e1000_82571) + if (hw->mac.type >= e1000_82571) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ @@ -3212,7 +3212,7 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (hw.mac.type >= e1000_82540) { + if (hw->mac.type >= e1000_82540) { E1000_WRITE_REG(hw, E1000_RADV, adapter->rx_abs_int_delay.value); @@ -3242,9 +3242,9 @@ em_initialize_receive_unit(if_ctx_t ctx) rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && - hw.mac.type >= e1000_82543) { + hw->mac.type >= e1000_82543) { if (adapter->tx_num_queues > 1) { - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { rxcsum |= E1000_RXCSUM_PCSD; if (hw->mac.type != e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; @@ -3253,11 +3253,11 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_RXCSUM_IPOFL | E1000_RXCSUM_PCSD; } else { - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) rxcsum |= E1000_RXCSUM_IPPCSE; else rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL; - if (hw.mac.type > e1000_82575) + if (hw->mac.type > e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; } } else @@ -3266,7 +3266,7 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); if (adapter->rx_num_queues > 1) { - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) igb_initialize_rss_mapping(adapter); else em_initialize_rss_mapping(adapter); @@ -3306,11 +3306,11 @@ em_initialize_receive_unit(if_ctx_t ctx) * Only write to RXDCTL(1) if there is a need for different * settings. */ - if ((hw.mac.type == e1000_ich9lan || hw.mac.type == e1000_pch2lan || - hw.mac.type == e1000_ich10lan) && (if_getmtu(ifp) > ETHERMTU)) { + if ((hw->mac.type == e1000_ich9lan || hw->mac.type == e1000_pch2lan || + hw->mac.type == e1000_ich10lan) && if_getmtu(ifp) > ETHERMTU) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3); - } else if (hw.mac.type == e1000_82574) { + } else if (hw->mac.type == e1000_82574) { for (int i = 0; i < adapter->rx_num_queues; i++) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(i)); rxdctl |= 0x20; /* PTHRESH */ @@ -3319,7 +3319,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= 1 << 24; /* Switch to granularity */ E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (hw.mac.type >= igb_mac_min) { + } else if (hw->mac.type >= igb_mac_min) { u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { @@ -3381,7 +3381,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= IGB_RX_WTHRESH << 16; E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (hw.mac.type >= e1000_pch2lan) { + } else if (hw->mac.type >= e1000_pch2lan) { if (if_getmtu(ifp) > ETHERMTU) e1000_lv_jumbo_workaround_ich8lan(hw, TRUE); else @@ -3391,7 +3391,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; - if (hw.mac.type < igb_mac_min) { + if (hw->mac.type < igb_mac_min) { if (adapter->rx_mbuf_sz == MCLBYTES) rctl |= E1000_RCTL_SZ_2048; else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) @@ -3854,7 +3854,7 @@ em_enable_phy_wakeup(struct adapter *adapter) e1000_copy_rx_addrs_to_phy_ich8lan(hw); /* copy MAC MTA to PHY MTA */ - for (int i = 0; i < hw.mac.mta_reg_count; i++) { + for (int i = 0; i < hw->mac.mta_reg_count; i++) { mreg = E1000_READ_REG_ARRAY(hw, E1000_MTA, i); e1000_write_phy_reg(hw, BM_MTA(i), (u16)(mreg & 0xFFFF)); e1000_write_phy_reg(hw, BM_MTA(i) + 1, From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:36:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5334B659BC4; Tue, 17 Aug 2021 01:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYXP1cr9z4cB9; Tue, 17 Aug 2021 01:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19690141E9; Tue, 17 Aug 2021 01:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1aKkw095990; Tue, 17 Aug 2021 01:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1aKBh095989; Tue, 17 Aug 2021 01:36:20 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:36:20 GMT Message-Id: <202108170136.17H1aKBh095989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 15b57cbfde4d - stable/13 - e1000: rctl/srrctl buffer size init, rfctl fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 15b57cbfde4d5b5933d9280c4b718dd1f2c9f27c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:36:21 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=15b57cbfde4d5b5933d9280c4b718dd1f2c9f27c commit 15b57cbfde4d5b5933d9280c4b718dd1f2c9f27c Author: Kevin Bowling AuthorDate: 2021-08-10 19:47:22 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:35:04 +0000 e1000: rctl/srrctl buffer size init, rfctl fix Simplify the setup of srrctl.BSIZEPKT on igb class NICs. Improve the setup of rctl.BSIZE on lem and em class NICs. Don't try to touch rfctl on lem class NICs. Manipulate rctl.BSEX correctly on lem and em class NICs. Approved by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31457 (cherry picked from commit 12e8addd320df995bfb2b00f51c233541f741ae4) --- sys/dev/e1000/if_em.c | 76 +++++++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 52d20e57519a..33d5341ed8ce 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3170,6 +3170,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) * Enable receive unit. * **********************************************************************/ +#define BSIZEPKT_ROUNDUP ((1<hw; struct em_rx_queue *que; int i; - u32 rctl, rxcsum, rfctl; + uint32_t rctl, rxcsum; INIT_DEBUGOUT("em_initialize_receive_units: begin"); @@ -3224,21 +3225,25 @@ em_initialize_receive_unit(if_ctx_t ctx) } E1000_WRITE_REG(hw, E1000_RDTR, adapter->rx_int_delay.value); - /* Use extended rx descriptor formats */ - rfctl = E1000_READ_REG(hw, E1000_RFCTL); - rfctl |= E1000_RFCTL_EXTEN; - /* - * When using MSI-X interrupts we need to throttle - * using the EITR register (82574 only) - */ - if (hw->mac.type == e1000_82574) { - for (int i = 0; i < 4; i++) - E1000_WRITE_REG(hw, E1000_EITR_82574(i), - DEFAULT_ITR); - /* Disable accelerated acknowledge */ - rfctl |= E1000_RFCTL_ACK_DIS; + if (hw->mac.type >= em_mac_min) { + uint32_t rfctl; + /* Use extended rx descriptor formats */ + rfctl = E1000_READ_REG(hw, E1000_RFCTL); + rfctl |= E1000_RFCTL_EXTEN; + + /* + * When using MSI-X interrupts we need to throttle + * using the EITR register (82574 only) + */ + if (hw->mac.type == e1000_82574) { + for (int i = 0; i < 4; i++) + E1000_WRITE_REG(hw, E1000_EITR_82574(i), + DEFAULT_ITR); + /* Disable accelerated acknowledge */ + rfctl |= E1000_RFCTL_ACK_DIS; + } + E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); } - E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && @@ -3323,24 +3328,17 @@ em_initialize_receive_unit(if_ctx_t ctx) u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { - /* Set maximum packet len */ - if (adapter->rx_mbuf_sz <= 4096) { - srrctl |= 4096 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; - } else if (adapter->rx_mbuf_sz > 4096) { - srrctl |= 8192 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; - } psize = scctx->isc_max_frame_size; /* are we on a vlan? */ if (ifp->if_vlantrunk != NULL) psize += VLAN_TAG_SIZE; E1000_WRITE_REG(hw, E1000_RLPML, psize); - } else { - srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_2048; } + /* Set maximum packet buffer len */ + srrctl |= (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >> + E1000_SRRCTL_BSIZEPKT_SHIFT; + /* * If TX flow control is disabled and there's >1 queue defined, * enable DROP. @@ -3391,17 +3389,29 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; + /* Set up packet buffer size, overridden by per queue srrctl on igb */ if (hw->mac.type < igb_mac_min) { - if (adapter->rx_mbuf_sz == MCLBYTES) - rctl |= E1000_RCTL_SZ_2048; - else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) + if (adapter->rx_mbuf_sz > 2048 && adapter->rx_mbuf_sz <= 4096) rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; - else if (adapter->rx_mbuf_sz > MJUMPAGESIZE) + else if (adapter->rx_mbuf_sz > 4096 && adapter->rx_mbuf_sz <= 8192) rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; + else if (adapter->rx_mbuf_sz > 8192) + rctl |= E1000_RCTL_SZ_16384 | E1000_RCTL_BSEX; + else { + rctl |= E1000_RCTL_SZ_2048; + rctl &= ~E1000_RCTL_BSEX; + } + } else + rctl |= E1000_RCTL_SZ_2048; - /* ensure we clear use DTYPE of 00 here */ - rctl &= ~0x00000C00; - } + /* + * rctl bits 11:10 are as follows + * lem: reserved + * em: DTYPE + * igb: reserved + * and should be 00 on all of the above + */ + rctl &= ~0x00000C00; /* Write out the settings */ E1000_WRITE_REG(hw, E1000_RCTL, rctl); From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:56:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65C5D65A319; Tue, 17 Aug 2021 01:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYzk2Pgyz4fC2; Tue, 17 Aug 2021 01:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AACF14AF2; Tue, 17 Aug 2021 01:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1uY3s022704; Tue, 17 Aug 2021 01:56:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1uYke022703; Tue, 17 Aug 2021 01:56:34 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:56:34 GMT Message-Id: <202108170156.17H1uYke022703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 35fa46ffd17e - stable/12 - e1000: consistently use the hw variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 35fa46ffd17e9b9c424b822e235c5db0ae5d21b3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:56:34 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=35fa46ffd17e9b9c424b822e235c5db0ae5d21b3 commit 35fa46ffd17e9b9c424b822e235c5db0ae5d21b3 Author: Marius Strobl AuthorDate: 2021-01-23 18:18:28 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:56:20 +0000 e1000: consistently use the hw variables It's rather confusing when adapter->hw and hw are mixed and matched within a particular function. Some of this was missed in cd1cf2fc1d49c509ded05dcd41b7600a5957fb9a and r353778 respectively. (cherry picked from commit c1655b0f8998f9e842a004f33e7c9c01c5d9e879) --- sys/dev/e1000/if_em.c | 152 ++++++++++++++++++++++++-------------------------- 1 file changed, 73 insertions(+), 79 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index afafeed7602f..eeb52de497a9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -838,7 +838,7 @@ em_if_attach_pre(if_ctx_t ctx) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); @@ -850,7 +850,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS; scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - if (adapter->hw.mac.type != e1000_82575) + if (hw.mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; /* ** Some new devices, as with ixgbe, now may @@ -860,7 +860,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); if (pci_read_config(dev, scctx->isc_msix_bar, 4) == 0) scctx->isc_msix_bar += 4; - } else if (adapter->hw.mac.type >= em_mac_min) { + } else if (hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); @@ -892,7 +892,7 @@ em_if_attach_pre(if_ctx_t ctx) * We support MSI-X with 82574 only, but indicate to iflib(4) * that it shall give MSI at least a try with other devices. */ - if (adapter->hw.mac.type == e1000_82574) { + if (hw.mac.type == e1000_82574) { scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); } else { scctx->isc_msix_bar = -1; @@ -906,7 +906,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP; scctx->isc_txrx = &lem_txrx; scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; - if (adapter->hw.mac.type < e1000_82543) + if (hw.mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); /* INTx only */ scctx->isc_msix_bar = 0; @@ -999,9 +999,9 @@ em_if_attach_pre(if_ctx_t ctx) hw->phy.autoneg_wait_to_complete = FALSE; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - if (adapter->hw.mac.type < em_mac_min) { - e1000_init_script_state_82541(&adapter->hw, TRUE); - e1000_set_tbi_compatibility_82543(&adapter->hw, TRUE); + if (hw.mac.type < em_mac_min) { + e1000_init_script_state_82541(hw, TRUE); + e1000_set_tbi_compatibility_82543(hw, TRUE); } /* Copper options */ if (hw->phy.media_type == e1000_media_type_copper) { @@ -1014,7 +1014,7 @@ em_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - scctx->isc_max_frame_size = adapter->hw.mac.max_frame_size = + scctx->isc_max_frame_size = hw.mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* @@ -1224,7 +1224,7 @@ em_if_mtu_set(if_ctx_t ctx, uint32_t mtu) struct adapter *adapter = iflib_get_softc(ctx); if_softc_ctx_t scctx = iflib_get_softc_ctx(ctx); - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); + IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); switch (adapter->hw.mac.type) { case e1000_82571: @@ -1798,7 +1798,7 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); - link_check = adapter->hw.mac.serdes_has_link; + link_check = hw.mac.serdes_has_link; break; /* VF device is type_unknown */ case e1000_media_type_unknown: @@ -1845,8 +1845,8 @@ em_if_update_admin_status(if_ctx_t ctx) (hw->phy.id == I210_I_PHY_ID)) msec_delay(I210_LINK_DELAY); /* Reset if the media type changed. */ - if ((hw->dev_spec._82575.media_changed) && - (adapter->hw.mac.type >= igb_mac_min)) { + if (hw->dev_spec._82575.media_changed && + hw.mac.type >= igb_mac_min) { hw->dev_spec._82575.media_changed = false; adapter->flags |= IGB_MEDIA_RESET; em_reset(ctx); @@ -2107,13 +2107,13 @@ igb_configure_queues(struct adapter *adapter) u32 tmp, ivar = 0, newitr = 0; /* First turn on RSS capability */ - if (adapter->hw.mac.type != e1000_82575) + if (hw.mac.type != e1000_82575) E1000_WRITE_REG(hw, E1000_GPIE, E1000_GPIE_MSIX_MODE | E1000_GPIE_EIAME | E1000_GPIE_PBA | E1000_GPIE_NSICR); /* Turn on MSI-X */ - switch (adapter->hw.mac.type) { + switch (hw.mac.type) { case e1000_82580: case e1000_i350: case e1000_i354: @@ -2521,7 +2521,7 @@ em_reset(if_ctx_t ctx) case e1000_ich9lan: case e1000_ich10lan: /* Boost Receive side for jumbo frames */ - if (adapter->hw.mac.max_frame_size > 4096) + if (hw.mac.max_frame_size > 4096) pba = E1000_PBA_14K; else pba = E1000_PBA_10K; @@ -2569,11 +2569,11 @@ em_reset(if_ctx_t ctx) pba = E1000_READ_REG(hw, E1000_PBA); tx_space = pba >> 16; pba &= 0xffff; - min_tx = (adapter->hw.mac.max_frame_size + + min_tx = (hw.mac.max_frame_size + sizeof(struct e1000_tx_desc) - ETHERNET_FCS_SIZE) * 2; min_tx = roundup2(min_tx, 1024); min_tx >>= 10; - min_rx = adapter->hw.mac.max_frame_size; + min_rx = hw.mac.max_frame_size; min_rx = roundup2(min_rx, 1024); min_rx >>= 10; if (tx_space < min_tx && @@ -2590,7 +2590,7 @@ em_reset(if_ctx_t ctx) } if (hw->mac.type < igb_mac_min) - E1000_WRITE_REG(&adapter->hw, E1000_PBA, pba); + E1000_WRITE_REG(hw, E1000_PBA, pba); INIT_DEBUGOUT1("em_reset: pba=%dK",pba); @@ -2610,7 +2610,7 @@ em_reset(if_ctx_t ctx) */ rx_buffer_size = (pba & 0xffff) << 10; hw->fc.high_water = rx_buffer_size - - roundup2(adapter->hw.mac.max_frame_size, 1024); + roundup2(hw.mac.max_frame_size, 1024); hw->fc.low_water = hw->fc.high_water - 1500; if (adapter->fc) /* locally set flow control value? */ @@ -2688,7 +2688,7 @@ em_reset(if_ctx_t ctx) /* Issue a global reset */ e1000_reset_hw(hw); - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { E1000_WRITE_REG(hw, E1000_WUC, 0); } else { E1000_WRITE_REG(hw, E1000_WUFC, 0); @@ -2704,7 +2704,7 @@ em_reset(if_ctx_t ctx) device_printf(dev, "Hardware Initialization Failed\n"); return; } - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) igb_init_dmac(adapter, pba); E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); @@ -2769,7 +2769,7 @@ igb_initialize_rss_mapping(struct adapter *adapter) u32 rss_key[10], mrqc, shift = 0; /* XXX? */ - if (adapter->hw.mac.type == e1000_82575) + if (hw.mac.type == e1000_82575) shift = 6; /* @@ -2878,11 +2878,11 @@ em_setup_interface(if_ctx_t ctx) * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || - (adapter->hw.phy.media_type == e1000_media_type_internal_serdes)) { + if (hw.phy.media_type == e1000_media_type_fiber || + hw.phy.media_type == e1000_media_type_internal_serdes) { u_char fiber_type = IFM_1000_SX; /* default type */ - if (adapter->hw.mac.type == e1000_82545) + if (hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; ifmedia_add(adapter->media, IFM_ETHER | fiber_type | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | fiber_type, 0, NULL); @@ -2891,7 +2891,7 @@ em_setup_interface(if_ctx_t ctx) ifmedia_add(adapter->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - if (adapter->hw.phy.type != e1000_phy_ife) { + if (hw.phy.type != e1000_phy_ife) { ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL); } @@ -3066,8 +3066,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TDH(i), 0); HW_DEBUGOUT2("Base = %x, Length = %x\n", - E1000_READ_REG(&adapter->hw, E1000_TDBAL(i)), - E1000_READ_REG(&adapter->hw, E1000_TDLEN(i))); + E1000_READ_REG(hw, E1000_TDBAL(i)), + E1000_READ_REG(hw, E1000_TDLEN(i))); txdctl = 0; /* clear txdctl */ txdctl |= 0x1f; /* PTHRESH */ @@ -3081,7 +3081,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) } /* Set the default values for the Tx Inter Packet Gap timer */ - switch (adapter->hw.mac.type) { + switch (hw.mac.type) { case e1000_80003es2lan: tipg = DEFAULT_82543_TIPG_IPGR1; tipg |= DEFAULT_80003ES2LAN_TIPG_IPGR2 << @@ -3093,9 +3093,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; break; default: - if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || - (adapter->hw.phy.media_type == - e1000_media_type_internal_serdes)) + if (hw.phy.media_type == e1000_media_type_fiber || + hw.phy.media_type == e1000_media_type_internal_serdes) tipg = DEFAULT_82543_TIPG_IPGT_FIBER; else tipg = DEFAULT_82543_TIPG_IPGT_COPPER; @@ -3103,51 +3102,50 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; } - E1000_WRITE_REG(&adapter->hw, E1000_TIPG, tipg); - E1000_WRITE_REG(&adapter->hw, E1000_TIDV, adapter->tx_int_delay.value); + E1000_WRITE_REG(hw, E1000_TIPG, tipg); + E1000_WRITE_REG(hw, E1000_TIDV, adapter->tx_int_delay.value); - if(adapter->hw.mac.type >= e1000_82540) - E1000_WRITE_REG(&adapter->hw, E1000_TADV, + if(hw.mac.type >= e1000_82540) + E1000_WRITE_REG(hw, E1000_TADV, adapter->tx_abs_int_delay.value); - if ((adapter->hw.mac.type == e1000_82571) || - (adapter->hw.mac.type == e1000_82572)) { - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + if (hw.mac.type == e1000_82571 || hw.mac.type == e1000_82572) { + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_SPEED_MODE_BIT; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - } else if (adapter->hw.mac.type == e1000_80003es2lan) { + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + } else if (hw.mac.type == e1000_80003es2lan) { /* errata: program both queues to unweighted RR */ - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= 1; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(1)); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + tarc = E1000_READ_REG(hw, E1000_TARC(1)); tarc |= 1; - E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); - } else if (adapter->hw.mac.type == e1000_82574) { - tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + E1000_WRITE_REG(hw, E1000_TARC(1), tarc); + } else if (hw.mac.type == e1000_82574) { + tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_ERRATA_BIT; if ( adapter->tx_num_queues > 1) { tarc |= (TARC_COMPENSATION_MODE | TARC_MQ_FIX); - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); - E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); + E1000_WRITE_REG(hw, E1000_TARC(1), tarc); } else - E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); + E1000_WRITE_REG(hw, E1000_TARC(0), tarc); } if (adapter->tx_int_delay.value > 0) adapter->txd_cmd |= E1000_TXD_CMD_IDE; /* Program the Transmit Control Register */ - tctl = E1000_READ_REG(&adapter->hw, E1000_TCTL); + tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (adapter->hw.mac.type >= e1000_82571) + if (hw.mac.type >= e1000_82571) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ - E1000_WRITE_REG(&adapter->hw, E1000_TCTL, tctl); + E1000_WRITE_REG(hw, E1000_TCTL, tctl); /* SPT and KBL errata workarounds */ if (hw->mac.type == e1000_pch_spt) { @@ -3210,9 +3208,9 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (adapter->hw.mac.type >= e1000_82540) { - E1000_WRITE_REG(&adapter->hw, E1000_RADV, - adapter->rx_abs_int_delay.value); + if (hw.mac.type >= e1000_82540) { + E1000_WRITE_REG(hw, E1000_RADV, + adapter->rx_abs_int_delay.value); /* * Set the interrupt throttling rate. Value is calculated @@ -3220,8 +3218,7 @@ em_initialize_receive_unit(if_ctx_t ctx) */ E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); } - E1000_WRITE_REG(&adapter->hw, E1000_RDTR, - adapter->rx_int_delay.value); + E1000_WRITE_REG(hw, E1000_RDTR, adapter->rx_int_delay.value); /* Use extended rx descriptor formats */ rfctl = E1000_READ_REG(hw, E1000_RFCTL); @@ -3241,9 +3238,9 @@ em_initialize_receive_unit(if_ctx_t ctx) rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && - adapter->hw.mac.type >= e1000_82543) { + hw.mac.type >= e1000_82543) { if (adapter->tx_num_queues > 1) { - if (adapter->hw.mac.type >= igb_mac_min) { + if (hw.mac.type >= igb_mac_min) { rxcsum |= E1000_RXCSUM_PCSD; if (hw->mac.type != e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; @@ -3252,11 +3249,11 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_RXCSUM_IPOFL | E1000_RXCSUM_PCSD; } else { - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) rxcsum |= E1000_RXCSUM_IPPCSE; else rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL; - if (adapter->hw.mac.type > e1000_82575) + if (hw.mac.type > e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; } } else @@ -3265,7 +3262,7 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); if (adapter->rx_num_queues > 1) { - if (adapter->hw.mac.type >= igb_mac_min) + if (hw.mac.type >= igb_mac_min) igb_initialize_rss_mapping(adapter); else em_initialize_rss_mapping(adapter); @@ -3305,14 +3302,11 @@ em_initialize_receive_unit(if_ctx_t ctx) * Only write to RXDCTL(1) if there is a need for different * settings. */ - - if (((adapter->hw.mac.type == e1000_ich9lan) || - (adapter->hw.mac.type == e1000_pch2lan) || - (adapter->hw.mac.type == e1000_ich10lan)) && - (if_getmtu(ifp) > ETHERMTU)) { + if ((hw.mac.type == e1000_ich9lan || hw.mac.type == e1000_pch2lan || + hw.mac.type == e1000_ich10lan) && (if_getmtu(ifp) > ETHERMTU)) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3); - } else if (adapter->hw.mac.type == e1000_82574) { + } else if (hw.mac.type == e1000_82574) { for (int i = 0; i < adapter->rx_num_queues; i++) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(i)); rxdctl |= 0x20; /* PTHRESH */ @@ -3321,7 +3315,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= 1 << 24; /* Switch to granularity */ E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (adapter->hw.mac.type >= igb_mac_min) { + } else if (hw.mac.type >= igb_mac_min) { u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { @@ -3337,7 +3331,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* are we on a vlan? */ if (ifp->if_vlantrunk != NULL) psize += VLAN_TAG_SIZE; - E1000_WRITE_REG(&adapter->hw, E1000_RLPML, psize); + E1000_WRITE_REG(hw, E1000_RLPML, psize); } else { srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT; rctl |= E1000_RCTL_SZ_2048; @@ -3383,7 +3377,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= IGB_RX_WTHRESH << 16; E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (adapter->hw.mac.type >= e1000_pch2lan) { + } else if (hw.mac.type >= e1000_pch2lan) { if (if_getmtu(ifp) > ETHERMTU) e1000_lv_jumbo_workaround_ich8lan(hw, TRUE); else @@ -3393,7 +3387,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; - if (adapter->hw.mac.type < igb_mac_min) { + if (hw.mac.type < igb_mac_min) { if (adapter->rx_mbuf_sz == MCLBYTES) rctl |= E1000_RCTL_SZ_2048; else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) @@ -3856,7 +3850,7 @@ em_enable_phy_wakeup(struct adapter *adapter) e1000_copy_rx_addrs_to_phy_ich8lan(hw); /* copy MAC MTA to PHY MTA */ - for (int i = 0; i < adapter->hw.mac.mta_reg_count; i++) { + for (int i = 0; i < hw.mac.mta_reg_count; i++) { mreg = E1000_READ_REG_ARRAY(hw, E1000_MTA, i); e1000_write_phy_reg(hw, BM_MTA(i), (u16)(mreg & 0xFFFF)); e1000_write_phy_reg(hw, BM_MTA(i) + 1, @@ -3864,7 +3858,7 @@ em_enable_phy_wakeup(struct adapter *adapter) } /* configure PHY Rx Control register */ - e1000_read_phy_reg(&adapter->hw, BM_RCTL, &preg); + e1000_read_phy_reg(hw, BM_RCTL, &preg); mreg = E1000_READ_REG(hw, E1000_RCTL); if (mreg & E1000_RCTL_UPE) preg |= BM_RCTL_UPE; @@ -3881,7 +3875,7 @@ em_enable_phy_wakeup(struct adapter *adapter) mreg = E1000_READ_REG(hw, E1000_CTRL); if (mreg & E1000_CTRL_RFCE) preg |= BM_RCTL_RFCE; - e1000_write_phy_reg(&adapter->hw, BM_RCTL, preg); + e1000_write_phy_reg(hw, BM_RCTL, preg); /* enable PHY wakeup in MAC register */ E1000_WRITE_REG(hw, E1000_WUC, @@ -3889,8 +3883,8 @@ em_enable_phy_wakeup(struct adapter *adapter) E1000_WRITE_REG(hw, E1000_WUFC, adapter->wol); /* configure and enable PHY wakeup in PHY registers */ - e1000_write_phy_reg(&adapter->hw, BM_WUFC, adapter->wol); - e1000_write_phy_reg(&adapter->hw, BM_WUC, E1000_WUC_PME_EN); + e1000_write_phy_reg(hw, BM_WUFC, adapter->wol); + e1000_write_phy_reg(hw, BM_WUC, E1000_WUC_PME_EN); /* activate PHY wakeup */ ret = hw->phy.ops.acquire(hw); From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:56:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAEEF659E71; Tue, 17 Aug 2021 01:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYzl3fJDz4fLM; Tue, 17 Aug 2021 01:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57104147DB; Tue, 17 Aug 2021 01:56:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1uZcc022728; Tue, 17 Aug 2021 01:56:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1uZmg022727; Tue, 17 Aug 2021 01:56:35 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:56:35 GMT Message-Id: <202108170156.17H1uZmg022727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: ded3123049a5 - stable/12 - e1000: fix build after 92804cf3dc48 (orig c1655b0f) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ded3123049a592ec1f9c5b757e3f0f98f104d6cf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:56:36 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ded3123049a592ec1f9c5b757e3f0f98f104d6cf commit ded3123049a592ec1f9c5b757e3f0f98f104d6cf Author: Marius Strobl AuthorDate: 2021-01-27 14:28:25 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:56:20 +0000 e1000: fix build after 92804cf3dc48 (orig c1655b0f) (cherry picked from commit c262e8e87e7b59b768c717c1779ef1ba28507f44) --- sys/dev/e1000/if_em.c | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index eeb52de497a9..bcf7e0e9ec56 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -838,7 +838,7 @@ em_if_attach_pre(if_ctx_t ctx) device_printf(dev, "attach_pre capping queues at %d\n", scctx->isc_ntxqsets_max); - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0] * sizeof(union e1000_adv_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_adv_rx_desc), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(union e1000_adv_tx_desc); @@ -850,7 +850,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_capabilities = scctx->isc_capenable = IGB_CAPS; scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_TSO | CSUM_IP6_TCP | CSUM_IP6_UDP; - if (hw.mac.type != e1000_82575) + if (hw->mac.type != e1000_82575) scctx->isc_tx_csum_flags |= CSUM_SCTP | CSUM_IP6_SCTP; /* ** Some new devices, as with ixgbe, now may @@ -860,7 +860,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); if (pci_read_config(dev, scctx->isc_msix_bar, 4) == 0) scctx->isc_msix_bar += 4; - } else if (hw.mac.type >= em_mac_min) { + } else if (hw->mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); scctx->isc_txd_size[0] = sizeof(struct e1000_tx_desc); @@ -892,7 +892,7 @@ em_if_attach_pre(if_ctx_t ctx) * We support MSI-X with 82574 only, but indicate to iflib(4) * that it shall give MSI at least a try with other devices. */ - if (hw.mac.type == e1000_82574) { + if (hw->mac.type == e1000_82574) { scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); } else { scctx->isc_msix_bar = -1; @@ -906,7 +906,7 @@ em_if_attach_pre(if_ctx_t ctx) scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP; scctx->isc_txrx = &lem_txrx; scctx->isc_capabilities = scctx->isc_capenable = LEM_CAPS; - if (hw.mac.type < e1000_82543) + if (hw->mac.type < e1000_82543) scctx->isc_capenable &= ~(IFCAP_HWCSUM|IFCAP_VLAN_HWCSUM); /* INTx only */ scctx->isc_msix_bar = 0; @@ -999,7 +999,7 @@ em_if_attach_pre(if_ctx_t ctx) hw->phy.autoneg_wait_to_complete = FALSE; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; - if (hw.mac.type < em_mac_min) { + if (hw->mac.type < em_mac_min) { e1000_init_script_state_82541(hw, TRUE); e1000_set_tbi_compatibility_82543(hw, TRUE); } @@ -1014,7 +1014,7 @@ em_if_attach_pre(if_ctx_t ctx) * Set the frame limits assuming * standard ethernet sized frames. */ - scctx->isc_max_frame_size = hw.mac.max_frame_size = + scctx->isc_max_frame_size = hw->mac.max_frame_size = ETHERMTU + ETHER_HDR_LEN + ETHERNET_FCS_SIZE; /* @@ -1798,7 +1798,7 @@ em_if_update_admin_status(if_ctx_t ctx) break; case e1000_media_type_internal_serdes: e1000_check_for_link(hw); - link_check = hw.mac.serdes_has_link; + link_check = hw->mac.serdes_has_link; break; /* VF device is type_unknown */ case e1000_media_type_unknown: @@ -1846,7 +1846,7 @@ em_if_update_admin_status(if_ctx_t ctx) msec_delay(I210_LINK_DELAY); /* Reset if the media type changed. */ if (hw->dev_spec._82575.media_changed && - hw.mac.type >= igb_mac_min) { + hw->mac.type >= igb_mac_min) { hw->dev_spec._82575.media_changed = false; adapter->flags |= IGB_MEDIA_RESET; em_reset(ctx); @@ -2107,13 +2107,13 @@ igb_configure_queues(struct adapter *adapter) u32 tmp, ivar = 0, newitr = 0; /* First turn on RSS capability */ - if (hw.mac.type != e1000_82575) + if (hw->mac.type != e1000_82575) E1000_WRITE_REG(hw, E1000_GPIE, E1000_GPIE_MSIX_MODE | E1000_GPIE_EIAME | E1000_GPIE_PBA | E1000_GPIE_NSICR); /* Turn on MSI-X */ - switch (hw.mac.type) { + switch (hw->mac.type) { case e1000_82580: case e1000_i350: case e1000_i354: @@ -2521,7 +2521,7 @@ em_reset(if_ctx_t ctx) case e1000_ich9lan: case e1000_ich10lan: /* Boost Receive side for jumbo frames */ - if (hw.mac.max_frame_size > 4096) + if (hw->mac.max_frame_size > 4096) pba = E1000_PBA_14K; else pba = E1000_PBA_10K; @@ -2569,11 +2569,11 @@ em_reset(if_ctx_t ctx) pba = E1000_READ_REG(hw, E1000_PBA); tx_space = pba >> 16; pba &= 0xffff; - min_tx = (hw.mac.max_frame_size + + min_tx = (hw->mac.max_frame_size + sizeof(struct e1000_tx_desc) - ETHERNET_FCS_SIZE) * 2; min_tx = roundup2(min_tx, 1024); min_tx >>= 10; - min_rx = hw.mac.max_frame_size; + min_rx = hw->mac.max_frame_size; min_rx = roundup2(min_rx, 1024); min_rx >>= 10; if (tx_space < min_tx && @@ -2610,7 +2610,7 @@ em_reset(if_ctx_t ctx) */ rx_buffer_size = (pba & 0xffff) << 10; hw->fc.high_water = rx_buffer_size - - roundup2(hw.mac.max_frame_size, 1024); + roundup2(hw->mac.max_frame_size, 1024); hw->fc.low_water = hw->fc.high_water - 1500; if (adapter->fc) /* locally set flow control value? */ @@ -2688,7 +2688,7 @@ em_reset(if_ctx_t ctx) /* Issue a global reset */ e1000_reset_hw(hw); - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { E1000_WRITE_REG(hw, E1000_WUC, 0); } else { E1000_WRITE_REG(hw, E1000_WUFC, 0); @@ -2704,7 +2704,7 @@ em_reset(if_ctx_t ctx) device_printf(dev, "Hardware Initialization Failed\n"); return; } - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) igb_init_dmac(adapter, pba); E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN); @@ -2769,7 +2769,7 @@ igb_initialize_rss_mapping(struct adapter *adapter) u32 rss_key[10], mrqc, shift = 0; /* XXX? */ - if (hw.mac.type == e1000_82575) + if (hw->mac.type == e1000_82575) shift = 6; /* @@ -2878,11 +2878,11 @@ em_setup_interface(if_ctx_t ctx) * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - if (hw.phy.media_type == e1000_media_type_fiber || - hw.phy.media_type == e1000_media_type_internal_serdes) { + if (adapter->hw.phy.media_type == e1000_media_type_fiber || + adapter->hw.phy.media_type == e1000_media_type_internal_serdes) { u_char fiber_type = IFM_1000_SX; /* default type */ - if (hw.mac.type == e1000_82545) + if (adapter->hw.mac.type == e1000_82545) fiber_type = IFM_1000_LX; ifmedia_add(adapter->media, IFM_ETHER | fiber_type | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | fiber_type, 0, NULL); @@ -2891,7 +2891,7 @@ em_setup_interface(if_ctx_t ctx) ifmedia_add(adapter->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - if (hw.phy.type != e1000_phy_ife) { + if (adapter->hw.phy.type != e1000_phy_ife) { ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); ifmedia_add(adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL); } @@ -3081,7 +3081,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) } /* Set the default values for the Tx Inter Packet Gap timer */ - switch (hw.mac.type) { + switch (hw->mac.type) { case e1000_80003es2lan: tipg = DEFAULT_82543_TIPG_IPGR1; tipg |= DEFAULT_80003ES2LAN_TIPG_IPGR2 << @@ -3093,8 +3093,8 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; break; default: - if (hw.phy.media_type == e1000_media_type_fiber || - hw.phy.media_type == e1000_media_type_internal_serdes) + if (hw->phy.media_type == e1000_media_type_fiber || + hw->phy.media_type == e1000_media_type_internal_serdes) tipg = DEFAULT_82543_TIPG_IPGT_FIBER; else tipg = DEFAULT_82543_TIPG_IPGT_COPPER; @@ -3105,15 +3105,15 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TIPG, tipg); E1000_WRITE_REG(hw, E1000_TIDV, adapter->tx_int_delay.value); - if(hw.mac.type >= e1000_82540) + if(hw->mac.type >= e1000_82540) E1000_WRITE_REG(hw, E1000_TADV, adapter->tx_abs_int_delay.value); - if (hw.mac.type == e1000_82571 || hw.mac.type == e1000_82572) { + if (hw->mac.type == e1000_82571 || hw->mac.type == e1000_82572) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_SPEED_MODE_BIT; E1000_WRITE_REG(hw, E1000_TARC(0), tarc); - } else if (hw.mac.type == e1000_80003es2lan) { + } else if (hw->mac.type == e1000_80003es2lan) { /* errata: program both queues to unweighted RR */ tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= 1; @@ -3121,7 +3121,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) tarc = E1000_READ_REG(hw, E1000_TARC(1)); tarc |= 1; E1000_WRITE_REG(hw, E1000_TARC(1), tarc); - } else if (hw.mac.type == e1000_82574) { + } else if (hw->mac.type == e1000_82574) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); tarc |= TARC_ERRATA_BIT; if ( adapter->tx_num_queues > 1) { @@ -3141,7 +3141,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (hw.mac.type >= e1000_82571) + if (hw->mac.type >= e1000_82571) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ @@ -3208,7 +3208,7 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (hw.mac.type >= e1000_82540) { + if (hw->mac.type >= e1000_82540) { E1000_WRITE_REG(hw, E1000_RADV, adapter->rx_abs_int_delay.value); @@ -3238,9 +3238,9 @@ em_initialize_receive_unit(if_ctx_t ctx) rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && - hw.mac.type >= e1000_82543) { + hw->mac.type >= e1000_82543) { if (adapter->tx_num_queues > 1) { - if (hw.mac.type >= igb_mac_min) { + if (hw->mac.type >= igb_mac_min) { rxcsum |= E1000_RXCSUM_PCSD; if (hw->mac.type != e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; @@ -3249,11 +3249,11 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_RXCSUM_IPOFL | E1000_RXCSUM_PCSD; } else { - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) rxcsum |= E1000_RXCSUM_IPPCSE; else rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL; - if (hw.mac.type > e1000_82575) + if (hw->mac.type > e1000_82575) rxcsum |= E1000_RXCSUM_CRCOFL; } } else @@ -3262,7 +3262,7 @@ em_initialize_receive_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); if (adapter->rx_num_queues > 1) { - if (hw.mac.type >= igb_mac_min) + if (hw->mac.type >= igb_mac_min) igb_initialize_rss_mapping(adapter); else em_initialize_rss_mapping(adapter); @@ -3302,11 +3302,11 @@ em_initialize_receive_unit(if_ctx_t ctx) * Only write to RXDCTL(1) if there is a need for different * settings. */ - if ((hw.mac.type == e1000_ich9lan || hw.mac.type == e1000_pch2lan || - hw.mac.type == e1000_ich10lan) && (if_getmtu(ifp) > ETHERMTU)) { + if ((hw->mac.type == e1000_ich9lan || hw->mac.type == e1000_pch2lan || + hw->mac.type == e1000_ich10lan) && if_getmtu(ifp) > ETHERMTU) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3); - } else if (hw.mac.type == e1000_82574) { + } else if (hw->mac.type == e1000_82574) { for (int i = 0; i < adapter->rx_num_queues; i++) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(i)); rxdctl |= 0x20; /* PTHRESH */ @@ -3315,7 +3315,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= 1 << 24; /* Switch to granularity */ E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (hw.mac.type >= igb_mac_min) { + } else if (hw->mac.type >= igb_mac_min) { u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { @@ -3377,7 +3377,7 @@ em_initialize_receive_unit(if_ctx_t ctx) rxdctl |= IGB_RX_WTHRESH << 16; E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); } - } else if (hw.mac.type >= e1000_pch2lan) { + } else if (hw->mac.type >= e1000_pch2lan) { if (if_getmtu(ifp) > ETHERMTU) e1000_lv_jumbo_workaround_ich8lan(hw, TRUE); else @@ -3387,7 +3387,7 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; - if (hw.mac.type < igb_mac_min) { + if (hw->mac.type < igb_mac_min) { if (adapter->rx_mbuf_sz == MCLBYTES) rctl |= E1000_RCTL_SZ_2048; else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) @@ -3850,7 +3850,7 @@ em_enable_phy_wakeup(struct adapter *adapter) e1000_copy_rx_addrs_to_phy_ich8lan(hw); /* copy MAC MTA to PHY MTA */ - for (int i = 0; i < hw.mac.mta_reg_count; i++) { + for (int i = 0; i < hw->mac.mta_reg_count; i++) { mreg = E1000_READ_REG_ARRAY(hw, E1000_MTA, i); e1000_write_phy_reg(hw, BM_MTA(i), (u16)(mreg & 0xFFFF)); e1000_write_phy_reg(hw, BM_MTA(i) + 1, From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 01:56:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABAD465A31C; Tue, 17 Aug 2021 01:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpYzm4B6tz4fJJ; Tue, 17 Aug 2021 01:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73D721491E; Tue, 17 Aug 2021 01:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17H1uaCV022752; Tue, 17 Aug 2021 01:56:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17H1uaEa022751; Tue, 17 Aug 2021 01:56:36 GMT (envelope-from git) Date: Tue, 17 Aug 2021 01:56:36 GMT Message-Id: <202108170156.17H1uaEa022751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 4188e54d3fa7 - stable/12 - e1000: rctl/srrctl buffer size init, rfctl fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4188e54d3fa729b4ca337231f4f5825905535212 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 01:56:37 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=4188e54d3fa729b4ca337231f4f5825905535212 commit 4188e54d3fa729b4ca337231f4f5825905535212 Author: Kevin Bowling AuthorDate: 2021-08-10 19:47:22 +0000 Commit: Kevin Bowling CommitDate: 2021-08-17 01:56:20 +0000 e1000: rctl/srrctl buffer size init, rfctl fix Simplify the setup of srrctl.BSIZEPKT on igb class NICs. Improve the setup of rctl.BSIZE on lem and em class NICs. Don't try to touch rfctl on lem class NICs. Manipulate rctl.BSEX correctly on lem and em class NICs. Approved by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31457 (cherry picked from commit 12e8addd320df995bfb2b00f51c233541f741ae4) --- sys/dev/e1000/if_em.c | 76 +++++++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index bcf7e0e9ec56..74641acbb3b3 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3166,6 +3166,7 @@ em_initialize_transmit_unit(if_ctx_t ctx) * Enable receive unit. * **********************************************************************/ +#define BSIZEPKT_ROUNDUP ((1<hw; struct em_rx_queue *que; int i; - u32 rctl, rxcsum, rfctl; + uint32_t rctl, rxcsum; INIT_DEBUGOUT("em_initialize_receive_units: begin"); @@ -3220,21 +3221,25 @@ em_initialize_receive_unit(if_ctx_t ctx) } E1000_WRITE_REG(hw, E1000_RDTR, adapter->rx_int_delay.value); - /* Use extended rx descriptor formats */ - rfctl = E1000_READ_REG(hw, E1000_RFCTL); - rfctl |= E1000_RFCTL_EXTEN; - /* - * When using MSI-X interrupts we need to throttle - * using the EITR register (82574 only) - */ - if (hw->mac.type == e1000_82574) { - for (int i = 0; i < 4; i++) - E1000_WRITE_REG(hw, E1000_EITR_82574(i), - DEFAULT_ITR); - /* Disable accelerated acknowledge */ - rfctl |= E1000_RFCTL_ACK_DIS; + if (hw->mac.type >= em_mac_min) { + uint32_t rfctl; + /* Use extended rx descriptor formats */ + rfctl = E1000_READ_REG(hw, E1000_RFCTL); + rfctl |= E1000_RFCTL_EXTEN; + + /* + * When using MSI-X interrupts we need to throttle + * using the EITR register (82574 only) + */ + if (hw->mac.type == e1000_82574) { + for (int i = 0; i < 4; i++) + E1000_WRITE_REG(hw, E1000_EITR_82574(i), + DEFAULT_ITR); + /* Disable accelerated acknowledge */ + rfctl |= E1000_RFCTL_ACK_DIS; + } + E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); } - E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM && @@ -3319,24 +3324,17 @@ em_initialize_receive_unit(if_ctx_t ctx) u32 psize, srrctl = 0; if (if_getmtu(ifp) > ETHERMTU) { - /* Set maximum packet len */ - if (adapter->rx_mbuf_sz <= 4096) { - srrctl |= 4096 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; - } else if (adapter->rx_mbuf_sz > 4096) { - srrctl |= 8192 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; - } psize = scctx->isc_max_frame_size; /* are we on a vlan? */ if (ifp->if_vlantrunk != NULL) psize += VLAN_TAG_SIZE; E1000_WRITE_REG(hw, E1000_RLPML, psize); - } else { - srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT; - rctl |= E1000_RCTL_SZ_2048; } + /* Set maximum packet buffer len */ + srrctl |= (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >> + E1000_SRRCTL_BSIZEPKT_SHIFT; + /* * If TX flow control is disabled and there's >1 queue defined, * enable DROP. @@ -3387,17 +3385,29 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; + /* Set up packet buffer size, overridden by per queue srrctl on igb */ if (hw->mac.type < igb_mac_min) { - if (adapter->rx_mbuf_sz == MCLBYTES) - rctl |= E1000_RCTL_SZ_2048; - else if (adapter->rx_mbuf_sz == MJUMPAGESIZE) + if (adapter->rx_mbuf_sz > 2048 && adapter->rx_mbuf_sz <= 4096) rctl |= E1000_RCTL_SZ_4096 | E1000_RCTL_BSEX; - else if (adapter->rx_mbuf_sz > MJUMPAGESIZE) + else if (adapter->rx_mbuf_sz > 4096 && adapter->rx_mbuf_sz <= 8192) rctl |= E1000_RCTL_SZ_8192 | E1000_RCTL_BSEX; + else if (adapter->rx_mbuf_sz > 8192) + rctl |= E1000_RCTL_SZ_16384 | E1000_RCTL_BSEX; + else { + rctl |= E1000_RCTL_SZ_2048; + rctl &= ~E1000_RCTL_BSEX; + } + } else + rctl |= E1000_RCTL_SZ_2048; - /* ensure we clear use DTYPE of 00 here */ - rctl &= ~0x00000C00; - } + /* + * rctl bits 11:10 are as follows + * lem: reserved + * em: DTYPE + * igb: reserved + * and should be 00 on all of the above + */ + rctl &= ~0x00000C00; /* Write out the settings */ E1000_WRITE_REG(hw, E1000_RCTL, rctl); From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 13:56:26 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D894D664F0F; Tue, 17 Aug 2021 13:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpsyK5l2wz4ppd; Tue, 17 Aug 2021 13:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B5AD1EE8F; Tue, 17 Aug 2021 13:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17HDuPIE084919; Tue, 17 Aug 2021 13:56:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17HDuP4o084918; Tue, 17 Aug 2021 13:56:25 GMT (envelope-from git) Date: Tue, 17 Aug 2021 13:56:25 GMT Message-Id: <202108171356.17HDuP4o084918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1ee912e80e37 - stable/13 - build.7: Document LOCAL_MODULES and LOCAL_MODULES_DIR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1ee912e80e37a702df4af6df20cc19b767da7bd9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 13:56:27 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1ee912e80e37a702df4af6df20cc19b767da7bd9 commit 1ee912e80e37a702df4af6df20cc19b767da7bd9 Author: Mark Johnston AuthorDate: 2021-08-10 15:42:35 +0000 Commit: Mark Johnston CommitDate: 2021-08-17 13:56:13 +0000 build.7: Document LOCAL_MODULES and LOCAL_MODULES_DIR Reviewed by: 0mp, imp Sponsored by: The FreeBSD Foundation (cherry picked from commit e7a13643b17c3ec7357b26324986587dab810da5) --- share/man/man7/build.7 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index bad3da789e5a..d0806fa79dbb 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 15, 2021 +.Dd August 10, 2021 .Dt BUILD 7 .Os .Sh NAME @@ -602,6 +602,19 @@ process. .Bd -literal -offset indent make PORTS_MODULES=emulators/virtualbox-ose-kmod kernel .Ed +.It Va LOCAL_MODULES +A list of external kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.It Va LOCAL_MODULES_DIR +The directory in which to search for the kernel modules specified by +.Va LOCAL_MODULES . +Each kernel module should consist of a directory containing a makefile. +Defaults to +.Pa ${LOCALBASE}/sys/modules . .It Va SRCCONF Specify a file to override the default .Pa /etc/src.conf . From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 13:56:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E6EB664E60; Tue, 17 Aug 2021 13:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GpsyL75ZBz4q55; Tue, 17 Aug 2021 13:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B27F21EF04; Tue, 17 Aug 2021 13:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17HDuQsm084943; Tue, 17 Aug 2021 13:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17HDuQ6I084942; Tue, 17 Aug 2021 13:56:26 GMT (envelope-from git) Date: Tue, 17 Aug 2021 13:56:26 GMT Message-Id: <202108171356.17HDuQ6I084942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 72a8cdd3226e - stable/13 - build.7: Describe the default value for LOCAL_MODULES MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 72a8cdd3226e472e21976ef918d4692fe55ee553 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 13:56:27 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=72a8cdd3226e472e21976ef918d4692fe55ee553 commit 72a8cdd3226e472e21976ef918d4692fe55ee553 Author: Mark Johnston AuthorDate: 2021-08-10 17:34:57 +0000 Commit: Mark Johnston CommitDate: 2021-08-17 13:56:15 +0000 build.7: Describe the default value for LOCAL_MODULES Suggested by: jhb (cherry picked from commit 805c3af898a8fed6a92caa069011c0ce7fa542ef) --- share/man/man7/build.7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index d0806fa79dbb..015e80c4bc24 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -609,6 +609,8 @@ as part of the and .Cm installkernel process. +Defaults to the list of sub-directories of +.Va LOCAL_MODULES_DIR . .It Va LOCAL_MODULES_DIR The directory in which to search for the kernel modules specified by .Va LOCAL_MODULES . From owner-dev-commits-src-branches@freebsd.org Tue Aug 17 21:15:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2906566BB4C; Tue, 17 Aug 2021 21:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gq3hj0VNZz4Rsr; Tue, 17 Aug 2021 21:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED1AE24AC3; Tue, 17 Aug 2021 21:15:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17HLFG79076676; Tue, 17 Aug 2021 21:15:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17HLFG8Z076675; Tue, 17 Aug 2021 21:15:16 GMT (envelope-from git) Date: Tue, 17 Aug 2021 21:15:16 GMT Message-Id: <202108172115.17HLFG8Z076675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 406a4b37a24e - stable/13 - [multipath][nhops] Fix random crashes with high route churn rate. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 406a4b37a24e655b8a5d8f3401e636ba43f37978 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 21:15:17 -0000 The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=406a4b37a24e655b8a5d8f3401e636ba43f37978 commit 406a4b37a24e655b8a5d8f3401e636ba43f37978 Author: Alexander V. Chernikov AuthorDate: 2021-08-01 09:46:05 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-08-17 21:14:42 +0000 [multipath][nhops] Fix random crashes with high route churn rate. When certain multipath route begins flapping really fast, it may result in creating multiple identical nexthop groups. The code responsible for unlinking unused nexthop groups had an implicit assumption that there could be only one nexthop group for the same combination of nexthops with weights. This assumption resulted in always unlinking the first "identical" group, instead of the desired one. Such action, in turn, produced a used-but-unlinked nhg along with freed-and-linked nhg, ending up in random crashes. Similarly, it is possible that multiple identical nexthops gets created in the case of high route churn, resulting in the same problem when deleting one of such nexthops. Fix by matching the nexthop/nexhop group pointer when deleting the item. Reported by: avg (cherry picked from commit 054948bd81bb9e4e32449cf351b62e501b8831ff) --- sys/net/route/nhgrp.c | 2 +- sys/net/route/nhop.c | 2 +- sys/net/route/nhop_utils.h | 23 +++-------------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/sys/net/route/nhgrp.c b/sys/net/route/nhgrp.c index f6638b12ebea..f40ee3c2981c 100644 --- a/sys/net/route/nhgrp.c +++ b/sys/net/route/nhgrp.c @@ -187,7 +187,7 @@ unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key) NHOPS_WLOCK(ctl); - CHT_SLIST_REMOVE_BYOBJ(&ctl->gr_head, mpath, key, nhg_priv_ret); + CHT_SLIST_REMOVE(&ctl->gr_head, mpath, key, nhg_priv_ret); if (nhg_priv_ret == NULL) { DPRINTF("Unable to find nhop group!"); diff --git a/sys/net/route/nhop.c b/sys/net/route/nhop.c index 0db47db9916e..ab5e393ae56a 100644 --- a/sys/net/route/nhop.c +++ b/sys/net/route/nhop.c @@ -337,7 +337,7 @@ unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv_del) idx = 0; NHOPS_WLOCK(ctl); - CHT_SLIST_REMOVE_BYOBJ(&ctl->nh_head, nhops, nh_priv_del, priv_ret); + CHT_SLIST_REMOVE(&ctl->nh_head, nhops, nh_priv_del, priv_ret); if (priv_ret != NULL) { idx = priv_ret->nh_idx; diff --git a/sys/net/route/nhop_utils.h b/sys/net/route/nhop_utils.h index a0d7cd564e72..1f56f4cb8b0b 100644 --- a/sys/net/route/nhop_utils.h +++ b/sys/net/route/nhop_utils.h @@ -115,31 +115,13 @@ struct _HNAME##_head { \ (_head)->items_count++; \ } while(0) -#define CHT_SLIST_REMOVE(_head, _PX, _key, _ret) do { \ - typeof(*(_head)->ptr) _tmp; \ - uint32_t _buck = CHT_GET_BUCK(_head, _PX, _key); \ - _ret = CHT_FIRST(_head, _buck); \ - _tmp = NULL; \ - for ( ; _ret != NULL; _tmp = _ret, _ret = _PX##_next(_ret)) { \ - if (_PX##_cmp(_key, _ret)) \ - break; \ - } \ - if (_ret != NULL) { \ - if (_tmp == NULL) \ - CHT_FIRST(_head, _buck) = _PX##_next(_ret); \ - else \ - _PX##_next(_tmp) = _PX##_next(_ret); \ - (_head)->items_count--; \ - } \ -} while(0) - -#define CHT_SLIST_REMOVE_BYOBJ(_head, _PX, _obj, _ret) do { \ +#define CHT_SLIST_REMOVE(_head, _PX, _obj, _ret) do { \ typeof(*(_head)->ptr) _tmp; \ uint32_t _buck = CHT_GET_BUCK_OBJ(_head, _PX, _obj); \ _ret = CHT_FIRST(_head, _buck); \ _tmp = NULL; \ for ( ; _ret != NULL; _tmp = _ret, _ret = _PX##_next(_ret)) { \ - if (_PX##_cmp(_obj, _ret)) \ + if (_obj == _ret) \ break; \ } \ if (_ret != NULL) { \ @@ -150,6 +132,7 @@ struct _HNAME##_head { \ (_head)->items_count--; \ } \ } while(0) +#define CHT_SLIST_REMOVE_BYOBJ CHT_SLIST_REMOVE #define CHT_SLIST_FOREACH(_head, _PX, _x) \ for (uint32_t _i = 0; _i < (_head)->hash_size; _i++) { \ From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 01:30:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70BB066F3F2; Wed, 18 Aug 2021 01:30:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gq9MS2WwXz4jFx; Wed, 18 Aug 2021 01:30:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EE6D42A; Wed, 18 Aug 2021 01:30:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I1UifO018411; Wed, 18 Aug 2021 01:30:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I1Uids018410; Wed, 18 Aug 2021 01:30:44 GMT (envelope-from git) Date: Wed, 18 Aug 2021 01:30:44 GMT Message-Id: <202108180130.17I1Uids018410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d1d9ee6f781d - stable/13 - ar: remove invalid extra param in bsdar_warnc calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d1d9ee6f781d4ff4ca487c48f92e186e2f07b378 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 01:30:44 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d1d9ee6f781d4ff4ca487c48f92e186e2f07b378 commit d1d9ee6f781d4ff4ca487c48f92e186e2f07b378 Author: Ed Maste AuthorDate: 2021-08-11 17:22:23 +0000 Commit: Ed Maste CommitDate: 2021-08-18 01:27:41 +0000 ar: remove invalid extra param in bsdar_warnc calls A number of warnings passed an exit status code to bsdar_warnc, but it does not take exit status (as a warning, it does not exit). MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 09319f7d3f8aefe8a6b37b1c2a6d842126a2c181) --- usr.bin/ar/write.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/ar/write.c b/usr.bin/ar/write.c index 24bac2f25b92..f515b2b4eb1e 100644 --- a/usr.bin/ar/write.c +++ b/usr.bin/ar/write.c @@ -787,7 +787,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) return; } if (elf_getshstrndx(e, &shstrndx) == 0) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_getshstrndx failed: %s", + bsdar_warnc(bsdar, 0, "elf_getshstrndx failed: %s", elf_errmsg(-1)); elf_end(e); return; @@ -824,8 +824,8 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) scn = NULL; while ((scn = elf_nextscn(e, scn)) != NULL) { if (gelf_getshdr(scn, &shdr) != &shdr) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, - "elf_getshdr failed: %s", elf_errmsg(-1)); + bsdar_warnc(bsdar, 0, "elf_getshdr failed: %s", + elf_errmsg(-1)); continue; } if (shdr.sh_type != SHT_SYMTAB) @@ -838,7 +838,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) len = data->d_size / shdr.sh_entsize; for (i = 0; i < len; i++) { if (gelf_getsym(data, i, &sym) != &sym) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "gelf_getsym failed: %s", elf_errmsg(-1)); continue; @@ -855,7 +855,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) if ((name = elf_strptr(e, tabndx, sym.st_name)) == NULL) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "elf_strptr failed: %s", elf_errmsg(-1)); continue; @@ -867,7 +867,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) } elferr = elf_errno(); if (elferr != 0) - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_nextscn failed: %s", + bsdar_warnc(bsdar, 0, "elf_nextscn failed: %s", elf_errmsg(elferr)); elf_end(e); From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 01:31:33 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B07166EE42; Wed, 18 Aug 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gq9NP2f8Mz4jWg; Wed, 18 Aug 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43D7E27BFB; Wed, 18 Aug 2021 01:31:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I1VXK0022405; Wed, 18 Aug 2021 01:31:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I1VX3I022404; Wed, 18 Aug 2021 01:31:33 GMT (envelope-from git) Date: Wed, 18 Aug 2021 01:31:33 GMT Message-Id: <202108180131.17I1VX3I022404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e3580ab6e64a - stable/12 - ar: remove invalid extra param in bsdar_warnc calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e3580ab6e64a9ae6b8535419ad1724b37e30ce38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 01:31:33 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e3580ab6e64a9ae6b8535419ad1724b37e30ce38 commit e3580ab6e64a9ae6b8535419ad1724b37e30ce38 Author: Ed Maste AuthorDate: 2021-08-11 17:22:23 +0000 Commit: Ed Maste CommitDate: 2021-08-18 01:30:58 +0000 ar: remove invalid extra param in bsdar_warnc calls A number of warnings passed an exit status code to bsdar_warnc, but it does not take exit status (as a warning, it does not exit). MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 09319f7d3f8aefe8a6b37b1c2a6d842126a2c181) --- usr.bin/ar/write.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/ar/write.c b/usr.bin/ar/write.c index 24bac2f25b92..f515b2b4eb1e 100644 --- a/usr.bin/ar/write.c +++ b/usr.bin/ar/write.c @@ -787,7 +787,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) return; } if (elf_getshstrndx(e, &shstrndx) == 0) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_getshstrndx failed: %s", + bsdar_warnc(bsdar, 0, "elf_getshstrndx failed: %s", elf_errmsg(-1)); elf_end(e); return; @@ -824,8 +824,8 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) scn = NULL; while ((scn = elf_nextscn(e, scn)) != NULL) { if (gelf_getshdr(scn, &shdr) != &shdr) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, - "elf_getshdr failed: %s", elf_errmsg(-1)); + bsdar_warnc(bsdar, 0, "elf_getshdr failed: %s", + elf_errmsg(-1)); continue; } if (shdr.sh_type != SHT_SYMTAB) @@ -838,7 +838,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) len = data->d_size / shdr.sh_entsize; for (i = 0; i < len; i++) { if (gelf_getsym(data, i, &sym) != &sym) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "gelf_getsym failed: %s", elf_errmsg(-1)); continue; @@ -855,7 +855,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) if ((name = elf_strptr(e, tabndx, sym.st_name)) == NULL) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "elf_strptr failed: %s", elf_errmsg(-1)); continue; @@ -867,7 +867,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) } elferr = elf_errno(); if (elferr != 0) - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_nextscn failed: %s", + bsdar_warnc(bsdar, 0, "elf_nextscn failed: %s", elf_errmsg(elferr)); elf_end(e); From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 01:32:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AAFF66EBD5; Wed, 18 Aug 2021 01:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gq9Q02fsdz4jXM; Wed, 18 Aug 2021 01:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44543350; Wed, 18 Aug 2021 01:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I1WuHh023484; Wed, 18 Aug 2021 01:32:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I1Wu6e023483; Wed, 18 Aug 2021 01:32:56 GMT (envelope-from git) Date: Wed, 18 Aug 2021 01:32:56 GMT Message-Id: <202108180132.17I1Wu6e023483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: adc3aa84fb32 - stable/11 - ar: remove invalid extra param in bsdar_warnc calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: adc3aa84fb32333fc20d989096f967e6524ab0e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 01:32:56 -0000 The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=adc3aa84fb32333fc20d989096f967e6524ab0e0 commit adc3aa84fb32333fc20d989096f967e6524ab0e0 Author: Ed Maste AuthorDate: 2021-08-11 17:22:23 +0000 Commit: Ed Maste CommitDate: 2021-08-18 01:32:36 +0000 ar: remove invalid extra param in bsdar_warnc calls A number of warnings passed an exit status code to bsdar_warnc, but it does not take exit status (as a warning, it does not exit). MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 09319f7d3f8aefe8a6b37b1c2a6d842126a2c181) --- usr.bin/ar/write.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/ar/write.c b/usr.bin/ar/write.c index 96821cf2e4b7..0a0c7ec75bda 100644 --- a/usr.bin/ar/write.c +++ b/usr.bin/ar/write.c @@ -787,7 +787,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) return; } if (elf_getshstrndx(e, &shstrndx) == 0) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_getshstrndx failed: %s", + bsdar_warnc(bsdar, 0, "elf_getshstrndx failed: %s", elf_errmsg(-1)); elf_end(e); return; @@ -824,8 +824,8 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) scn = NULL; while ((scn = elf_nextscn(e, scn)) != NULL) { if (gelf_getshdr(scn, &shdr) != &shdr) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, - "elf_getshdr failed: %s", elf_errmsg(-1)); + bsdar_warnc(bsdar, 0, "elf_getshdr failed: %s", + elf_errmsg(-1)); continue; } if (shdr.sh_type != SHT_SYMTAB) @@ -838,7 +838,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) len = data->d_size / shdr.sh_entsize; for (i = 0; i < len; i++) { if (gelf_getsym(data, i, &sym) != &sym) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "gelf_getsym failed: %s", elf_errmsg(-1)); continue; @@ -855,7 +855,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) if ((name = elf_strptr(e, tabndx, sym.st_name)) == NULL) { - bsdar_warnc(bsdar, EX_SOFTWARE, 0, + bsdar_warnc(bsdar, 0, "elf_strptr failed: %s", elf_errmsg(-1)); continue; @@ -867,7 +867,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size) } elferr = elf_errno(); if (elferr != 0) - bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_nextscn failed: %s", + bsdar_warnc(bsdar, 0, "elf_nextscn failed: %s", elf_errmsg(elferr)); elf_end(e); From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 08:54:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13D856742AB; Wed, 18 Aug 2021 08:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqMCN05wRz3R3V; Wed, 18 Aug 2021 08:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB2BC637F; Wed, 18 Aug 2021 08:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I8sNcw010272; Wed, 18 Aug 2021 08:54:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I8sNkM010271; Wed, 18 Aug 2021 08:54:23 GMT (envelope-from git) Date: Wed, 18 Aug 2021 08:54:23 GMT Message-Id: <202108180854.17I8sNkM010271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: ba91a76793d9 - stable/13 - Add missing lex/yacc dependency for mkesdb/mkcsmapper bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba91a76793d9a385e53d8bed00c0da806a5a60e7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 08:54:24 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=ba91a76793d9a385e53d8bed00c0da806a5a60e7 commit ba91a76793d9a385e53d8bed00c0da806a5a60e7 Author: Alex Richardson AuthorDate: 2021-08-16 08:56:17 +0000 Commit: Alex Richardson CommitDate: 2021-08-18 08:34:11 +0000 Add missing lex/yacc dependency for mkesdb/mkcsmapper bootstrap This causes build failures on macOS where the build can end up invoking an incompatible m4 binary. Fxies: 2de949cf85d0 ("Remove mkcsmapper_static and mkesdb_static from build-tools") (cherry picked from commit cc1345056b113d57f0c65b0ecf3e3d5da3f34276) --- Makefile.inc1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index cc854fbebbb1..941589324a80 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2373,6 +2373,8 @@ ${_bt}-usr.bin/localedef: ${_bt}-usr.bin/yacc ${_bt_lex_depend} .if ${MK_ICONV} != "no" _mkesdb= usr.bin/mkesdb _mkcsmapper= usr.bin/mkcsmapper +${_bt}-usr.bin/mkesdb: ${_bt}-usr.bin/yacc ${_bt_lex_depend} +${_bt}-usr.bin/mkcsmapper: ${_bt}-usr.bin/yacc ${_bt_lex_depend} .endif .if ${MK_KERBEROS} != "no" From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 08:54:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8983E67430A; Wed, 18 Aug 2021 08:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqMCP11fJz3RBX; Wed, 18 Aug 2021 08:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 012076611; Wed, 18 Aug 2021 08:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I8sOhB010296; Wed, 18 Aug 2021 08:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I8sOe9010295; Wed, 18 Aug 2021 08:54:24 GMT (envelope-from git) Date: Wed, 18 Aug 2021 08:54:24 GMT Message-Id: <202108180854.17I8sOe9010295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 64f6c8d616b9 - stable/13 - Mark LLDB/CLANG_BOOTSTRAP/LLD_BOOTSTRAP as broken on non-FreeBSD for now MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64f6c8d616b95a6ca153dd7d9e07bad3cf86e51f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 08:54:25 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=64f6c8d616b95a6ca153dd7d9e07bad3cf86e51f commit 64f6c8d616b95a6ca153dd7d9e07bad3cf86e51f Author: Alex Richardson AuthorDate: 2021-08-17 16:44:40 +0000 Commit: Alex Richardson CommitDate: 2021-08-18 08:34:19 +0000 Mark LLDB/CLANG_BOOTSTRAP/LLD_BOOTSTRAP as broken on non-FreeBSD for now I enabled these options again in 31ba4ce8898f9dfa5e7f054fdbc26e50a599a6e3, but unfortunately only my specific build configuration worked whereas the build with default options is still broken. (cherry picked from commit d9f25575a29ff7c83f226349a10a37b9aaf75ad5) --- share/mk/src.opts.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 7d08b6a1da89..6fb8c6c855a1 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -359,6 +359,13 @@ __DEFAULT_YES_OPTIONS+=OPENMP __DEFAULT_NO_OPTIONS+=OPENMP .endif +.if ${.MAKE.OS} != "FreeBSD" +# Bootstrapping the toolchain and building LLDB currently results in build +# failures non-FreeBSD, so disable these options until the fixes that are +# currently under review have landed. +BROKEN_OPTIONS+=LLDB CLANG_BOOTSTRAP LLD_BOOTSTRAP +.endif + .include # From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:47:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 390EF674760; Wed, 18 Aug 2021 09:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNNB1BC5z3mCR; Wed, 18 Aug 2021 09:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10EE16F58; Wed, 18 Aug 2021 09:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9l5i5078091; Wed, 18 Aug 2021 09:47:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9l5mW078090; Wed, 18 Aug 2021 09:47:05 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:47:05 GMT Message-Id: <202108180947.17I9l5mW078090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: ad9671955a40 - stable/13 - ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ad9671955a40ed69432e66d4ff6579c42a6e048d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:47:06 -0000 The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ad9671955a40ed69432e66d4ff6579c42a6e048d commit ad9671955a40ed69432e66d4ff6579c42a6e048d Author: Mateusz Guzik AuthorDate: 2021-08-13 09:29:57 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:44:43 +0000 ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line The keyword adds nothing as all operations on the var are performed through atomic_* Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31526 (cherry picked from commit d2b95af1c27ed51d72bef5d9f3d89860edc4fd40) --- sys/netinet/ip_reass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index f5cc6ad68125..8a071345677a 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -137,12 +137,12 @@ ipq_drop(struct ipqbucket *bucket, struct ipq *fp) #define IP_MAXFRAGPACKETS (imin(IP_MAXFRAGS, IPREASS_NHASH * 50)) static int maxfrags; -static volatile u_int nfrags; +static u_int __exclusive_cache_line nfrags; SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfrags, CTLFLAG_RW, &maxfrags, 0, "Maximum number of IPv4 fragments allowed across all reassembly queues"); SYSCTL_UINT(_net_inet_ip, OID_AUTO, curfrags, CTLFLAG_RD, - __DEVOLATILE(u_int *, &nfrags), 0, + &nfrags, 0, "Current number of IPv4 fragments across all reassembly queues"); VNET_DEFINE_STATIC(uma_zone_t, ipq_zone); From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:47:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6995674766; Wed, 18 Aug 2021 09:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNNC2FLTz3mJB; Wed, 18 Aug 2021 09:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3121F71A7; Wed, 18 Aug 2021 09:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9l7D4078121; Wed, 18 Aug 2021 09:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9l7C4078120; Wed, 18 Aug 2021 09:47:07 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:47:07 GMT Message-Id: <202108180947.17I9l7C4078120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 990e592daeb3 - stable/13 - ip_reass: do less work in ipreass_slowtimo if possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 990e592daeb3aa7aad1881d999a6b95c15320df7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:47:07 -0000 The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=990e592daeb3aa7aad1881d999a6b95c15320df7 commit 990e592daeb3aa7aad1881d999a6b95c15320df7 Author: Mateusz Guzik AuthorDate: 2021-08-13 09:32:16 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:44:44 +0000 ip_reass: do less work in ipreass_slowtimo if possible ipreass_slowtimo avoidably uses CPU on otherwise idle boxes Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31526 (cherry picked from commit 3be3cbe06d6107486d67d8eb80480d34d084c39c) --- sys/netinet/ip_reass.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index 8a071345677a..db32e6a312f2 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -593,11 +593,16 @@ ipreass_slowtimo(void) { struct ipq *fp, *tmp; + if (atomic_load_int(&nfrags) == 0) + return; + for (int i = 0; i < IPREASS_NHASH; i++) { + if (TAILQ_EMPTY(&V_ipq[i].head)) + continue; IPQ_LOCK(i); TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, tmp) if (--fp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i], fp); + ipq_timeout(&V_ipq[i], fp); IPQ_UNLOCK(i); } } From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:47:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88C14674F01; Wed, 18 Aug 2021 09:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNNF2tTqz3m9s; Wed, 18 Aug 2021 09:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70492730D; Wed, 18 Aug 2021 09:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9l8IM078146; Wed, 18 Aug 2021 09:47:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9l8J3078145; Wed, 18 Aug 2021 09:47:08 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:47:08 GMT Message-Id: <202108180947.17I9l8J3078145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: d368dc0b420a - stable/13 - frag6: drop the volatile keyword from frag6_nfrags and mark with __exclusive_cache_line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d368dc0b420af723e85a224636e23998b3e14c07 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:47:09 -0000 The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d368dc0b420af723e85a224636e23998b3e14c07 commit d368dc0b420af723e85a224636e23998b3e14c07 Author: Mateusz Guzik AuthorDate: 2021-08-13 11:28:39 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:44:44 +0000 frag6: drop the volatile keyword from frag6_nfrags and mark with __exclusive_cache_line The keyword adds nothing as all operations on the var are performed through atomic_* Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31528 (cherry picked from commit c17ae18080b4412435aa2fb91cd6e81dd6cd180b) --- sys/netinet6/frag6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 1903b01e03d4..ec35e98d25ec 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -116,7 +116,7 @@ VNET_DEFINE_STATIC(bool, frag6_on); /* System wide (global) maximum and count of packets in reassembly queues. */ static int ip6_maxfrags; -static volatile u_int frag6_nfrags = 0; +static u_int __exclusive_cache_line frag6_nfrags; /* Maximum and current packets in per-VNET reassembly queue. */ VNET_DEFINE_STATIC(int, ip6_maxfragpackets); @@ -164,7 +164,7 @@ VNET_DEFINE_STATIC(uint32_t, ip6qb_hashseed); SYSCTL_DECL(_net_inet6_ip6); SYSCTL_UINT(_net_inet6_ip6, OID_AUTO, frag6_nfrags, - CTLFLAG_RD, __DEVOLATILE(u_int *, &frag6_nfrags), 0, + CTLFLAG_RD, &frag6_nfrags, 0, "Global number of IPv6 fragments across all reassembly queues."); static void From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:47:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 265FF674E1C; Wed, 18 Aug 2021 09:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNNF4QMcz3mRG; Wed, 18 Aug 2021 09:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79865730E; Wed, 18 Aug 2021 09:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9l9nx078170; Wed, 18 Aug 2021 09:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9l98B078169; Wed, 18 Aug 2021 09:47:09 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:47:09 GMT Message-Id: <202108180947.17I9l98B078169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 86a96281df03 - stable/13 - frag6: do less work in frag6_slowtimo if possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 86a96281df03901f7930669c4ad488fab9ca64e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:47:10 -0000 The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=86a96281df03901f7930669c4ad488fab9ca64e1 commit 86a96281df03901f7930669c4ad488fab9ca64e1 Author: Mateusz Guzik AuthorDate: 2021-08-13 11:32:03 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:44:45 +0000 frag6: do less work in frag6_slowtimo if possible frag6_slowtimo avoidably uses CPU on otherwise idle boxes Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31528 (cherry picked from commit 8afe9481cfa382337b8a885f358fe888bddf5982) --- sys/netinet6/frag6.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index ec35e98d25ec..222bd157fddd 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -891,10 +891,15 @@ frag6_slowtimo(void) struct ip6q *q6, *q6tmp; uint32_t bucket; + if (atomic_load_int(&frag6_nfrags) == 0) + return; + VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); for (bucket = 0; bucket < IP6REASS_NHASH; bucket++) { + if (V_ip6qb[bucket].count == 0) + continue; IP6QB_LOCK(bucket); head = IP6QB_HEAD(bucket); TAILQ_FOREACH_SAFE(q6, head, ip6q_tq, q6tmp) From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:50:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CE1C674DCE; Wed, 18 Aug 2021 09:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNSQ2X0Mz3mqH; Wed, 18 Aug 2021 09:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F5EC71B7; Wed, 18 Aug 2021 09:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9oksj086726; Wed, 18 Aug 2021 09:50:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9oknJ086725; Wed, 18 Aug 2021 09:50:46 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:50:46 GMT Message-Id: <202108180950.17I9oknJ086725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 8d9f1e9f2be1 - stable/12 - ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8d9f1e9f2be113a62b280fa3610fbdd3b97af729 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:50:46 -0000 The branch stable/12 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8d9f1e9f2be113a62b280fa3610fbdd3b97af729 commit 8d9f1e9f2be113a62b280fa3610fbdd3b97af729 Author: Mateusz Guzik AuthorDate: 2021-08-13 09:29:57 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:48:14 +0000 ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line The keyword adds nothing as all operations on the var are performed through atomic_* Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31526 (cherry picked from commit d2b95af1c27ed51d72bef5d9f3d89860edc4fd40) --- sys/netinet/ip_reass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index a0503cd614c2..5aa75474ad60 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -137,12 +137,12 @@ ipq_drop(struct ipqbucket *bucket, struct ipq *fp) #define IP_MAXFRAGPACKETS (imin(IP_MAXFRAGS, IPREASS_NHASH * 50)) static int maxfrags; -static volatile u_int nfrags; +static u_int __exclusive_cache_line nfrags; SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfrags, CTLFLAG_RW, &maxfrags, 0, "Maximum number of IPv4 fragments allowed across all reassembly queues"); SYSCTL_UINT(_net_inet_ip, OID_AUTO, curfrags, CTLFLAG_RD, - __DEVOLATILE(u_int *, &nfrags), 0, + &nfrags, 0, "Current number of IPv4 fragments across all reassembly queues"); VNET_DEFINE_STATIC(uma_zone_t, ipq_zone); From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:50:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8451D674EC2; Wed, 18 Aug 2021 09:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNSR3H7qz3mwD; Wed, 18 Aug 2021 09:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 595496F64; Wed, 18 Aug 2021 09:50:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9olbM086750; Wed, 18 Aug 2021 09:50:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9ol4n086749; Wed, 18 Aug 2021 09:50:47 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:50:47 GMT Message-Id: <202108180950.17I9ol4n086749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 2666f081bac0 - stable/12 - ip_reass: do less work in ipreass_slowtimo if possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2666f081bac0c9225b7db2cb7a6776ed52bd568a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:50:47 -0000 The branch stable/12 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2666f081bac0c9225b7db2cb7a6776ed52bd568a commit 2666f081bac0c9225b7db2cb7a6776ed52bd568a Author: Mateusz Guzik AuthorDate: 2021-08-13 09:32:16 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:48:16 +0000 ip_reass: do less work in ipreass_slowtimo if possible ipreass_slowtimo avoidably uses CPU on otherwise idle boxes Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31526 (cherry picked from commit 3be3cbe06d6107486d67d8eb80480d34d084c39c) --- sys/netinet/ip_reass.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index 5aa75474ad60..0d5300d7382b 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -592,11 +592,16 @@ ipreass_slowtimo(void) { struct ipq *fp, *tmp; + if (atomic_load_int(&nfrags) == 0) + return; + for (int i = 0; i < IPREASS_NHASH; i++) { + if (TAILQ_EMPTY(&V_ipq[i].head)) + continue; IPQ_LOCK(i); TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, tmp) if (--fp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i], fp); + ipq_timeout(&V_ipq[i], fp); IPQ_UNLOCK(i); } } From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:50:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A533675102; Wed, 18 Aug 2021 09:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNSS6GVBz3mst; Wed, 18 Aug 2021 09:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 826BE6F66; Wed, 18 Aug 2021 09:50:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9omLC086780; Wed, 18 Aug 2021 09:50:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9omlQ086779; Wed, 18 Aug 2021 09:50:48 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:50:48 GMT Message-Id: <202108180950.17I9omlQ086779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 3fdd170c5825 - stable/12 - frag6: drop the volatile keyword from frag6_nfrags and mark with __exclusive_cache_line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3fdd170c5825fd90b050a54b6da5f985ad573159 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:50:49 -0000 The branch stable/12 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3fdd170c5825fd90b050a54b6da5f985ad573159 commit 3fdd170c5825fd90b050a54b6da5f985ad573159 Author: Mateusz Guzik AuthorDate: 2021-08-13 11:28:39 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:48:19 +0000 frag6: drop the volatile keyword from frag6_nfrags and mark with __exclusive_cache_line The keyword adds nothing as all operations on the var are performed through atomic_* Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31528 (cherry picked from commit c17ae18080b4412435aa2fb91cd6e81dd6cd180b) --- sys/netinet6/frag6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 15b2c2a14af0..d27d21e536fe 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -116,7 +116,7 @@ VNET_DEFINE_STATIC(bool, frag6_on); /* System wide (global) maximum and count of packets in reassembly queues. */ static int ip6_maxfrags; -static volatile u_int frag6_nfrags = 0; +static u_int __exclusive_cache_line frag6_nfrags; /* Maximum and current packets in per-VNET reassembly queue. */ VNET_DEFINE_STATIC(int, ip6_maxfragpackets); @@ -165,7 +165,7 @@ VNET_DEFINE_STATIC(uint32_t, ip6qb_hashseed); SYSCTL_DECL(_net_inet6_ip6); SYSCTL_UINT(_net_inet6_ip6, OID_AUTO, frag6_nfrags, - CTLFLAG_RD, __DEVOLATILE(u_int *, &frag6_nfrags), 0, + CTLFLAG_RD, &frag6_nfrags, 0, "Global number of IPv6 fragments across all reassembly queues."); static void From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 09:50:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10E1E675106; Wed, 18 Aug 2021 09:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqNST63yYz3mwT; Wed, 18 Aug 2021 09:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A80367125; Wed, 18 Aug 2021 09:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17I9on4U086805; Wed, 18 Aug 2021 09:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17I9onfY086804; Wed, 18 Aug 2021 09:50:49 GMT (envelope-from git) Date: Wed, 18 Aug 2021 09:50:49 GMT Message-Id: <202108180950.17I9onfY086804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 2da4005188ce - stable/12 - frag6: do less work in frag6_slowtimo if possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2da4005188ced25eee5ccb803586bf31f4574fca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 09:50:50 -0000 The branch stable/12 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2da4005188ced25eee5ccb803586bf31f4574fca commit 2da4005188ced25eee5ccb803586bf31f4574fca Author: Mateusz Guzik AuthorDate: 2021-08-13 11:32:03 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-18 09:48:22 +0000 frag6: do less work in frag6_slowtimo if possible frag6_slowtimo avoidably uses CPU on otherwise idle boxes Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31528 (cherry picked from commit 8afe9481cfa382337b8a885f358fe888bddf5982) --- sys/netinet6/frag6.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index d27d21e536fe..5a31bbff9747 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -901,10 +901,15 @@ frag6_slowtimo(void) struct ip6q *q6, *q6tmp; uint32_t bucket; + if (atomic_load_int(&frag6_nfrags) == 0) + return; + VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); for (bucket = 0; bucket < IP6REASS_NHASH; bucket++) { + if (V_ip6qb[bucket].count == 0) + continue; IP6QB_LOCK(bucket); head = IP6QB_HEAD(bucket); TAILQ_FOREACH_SAFE(q6, head, ip6q_tq, q6tmp) From owner-dev-commits-src-branches@freebsd.org Wed Aug 18 23:43:51 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0993B659016 for ; Wed, 18 Aug 2021 23:43:51 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gqkxd2mVcz3hcY; Wed, 18 Aug 2021 23:43:48 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-48-130-181.area1b.commufa.jp [123.48.130.181]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 17INhdMN010256; Thu, 19 Aug 2021 08:43:40 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Thu, 19 Aug 2021 08:43:39 +0900 From: Tomoaki AOKI To: dev-commits-src-branches@freebsd.org Cc: manu@FreeBSD.org, jkim@FreeBSD.org Subject: Re: git: e99783747e49 - stable/13 - pkgbase: Add an src.conf option for splitting man pages Message-Id: <20210819084339.16eaf17eeac1f936a6c2ceee@dec.sakura.ne.jp> Reply-To: junchoon@dec.sakura.ne.jp Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Gqkxd2mVcz3hcY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of junchoon@dec.sakura.ne.jp has no SPF policy when checking 153.125.133.21) smtp.mailfrom=junchoon@dec.sakura.ne.jp X-Spamd-Result: default: False [-0.60 / 15.00]; HAS_REPLYTO(0.00)[junchoon@dec.sakura.ne.jp]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[123.48.130.181:received]; FAKE_REPLY(1.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[sakura.ne.jp]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-branches] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 23:43:51 -0000 This breaks at least x11/nvidia-driver build. Additional MFC of git: 6827435548d2 [1] is needed. [1] https://cgit.freebsd.org/src/commit/?id=6827435548d257c672f934db5c6ff01012d96995 > The branch stable/13 has been updated by manu: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e99783747e49d0df4c9bccbc33907333e2d77a1e > > commit e99783747e49d0df4c9bccbc33907333e2d77a1e > Author: Emmanuel Vadot > AuthorDate: 2021-03-16 06:11:56 +0000 > Commit: Emmanuel Vadot > CommitDate: 2021-08-16 16:13:51 +0000 > > pkgbase: Add an src.conf option for splitting man pages > > Man pages can be big in total, add an options to split man pages > in -man packages so we produce smaller packages. > This is useful for small jails or mfsroot produced of pkgbase. > The option is off by default. > > Reviewed by: bapt, Mina Gali$B".(B > Differential Revision: https://reviews.freebsd.org/D29169 > MFC after: 2 weeks > > (cherry picked from commit c7e6cb9e08d6b51e677a9f5546b8e36d678687d0) > --- > release/packages/generate-ucl.sh | 5 +++++ > share/man/man5/src.conf.5 | 2 ++ > share/mk/bsd.man.mk | 9 +++++++++ > share/mk/src.opts.mk | 1 + > tools/build/options/WITH_MANSPLITPKG | 2 ++ > 5 files changed, 19 insertions(+) > > diff --git a/release/packages/generate-ucl.sh > b/release/packages/generate-ucl.sh index e900f9991912..67c10e485eb7 100755 > --- a/release/packages/generate-ucl.sh > +++ b/release/packages/generate-ucl.sh > @@ -71,6 +71,11 @@ main() { > _descr="Debugging Symbols" > pkgdeps="${outname}" > ;; > + *_man) > + outname="${outname%%_man}" > + _descr="Manual Pages" > + pkgdeps="${outname}" > + ;; > ${origname}) > pkgdeps="runtime" > ;; > diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 > index a0c1b4bb8b8a..f118471c2770 100644 > --- a/share/man/man5/src.conf.5 > +++ b/share/man/man5/src.conf.5 > @@ -1099,6 +1099,8 @@ is set explicitly) > .It Va WITHOUT_MANCOMPRESS > Set to not to install compressed man pages. > Only the uncompressed versions will be installed. > +.It Va WITH_MANSPLITPKG > +Set to split man pages into their own packages during make package. > .It Va WITHOUT_MAN_UTILS > Set to not build utilities for manual pages, > .Xr apropos 1 , > diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk > index 1e67928a2754..21c5fe4f2424 100644 > --- a/share/mk/bsd.man.mk > +++ b/share/mk/bsd.man.mk > @@ -50,7 +50,11 @@ > .error bsd.man.mk cannot be included directly. > .endif > > +.if ${MK_MANSPLITPKG} == "no" > MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m $ {MANMODE} +.else > +MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.endif > > CATDIR= ${MANDIR:H:S/$/\/cat/} > CATEXT= .cat > @@ -226,8 +230,13 @@ maninstall: ${MAN} > .endif # ${MK_MANCOMPRESS} == "no" > .endif > .for l t in ${_MANLINKS} > +.if ${MK_MANSPLITPKG} == "no" > rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ > ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} $ {DESTDIR}${t}${ZEXT} +.else > + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ > + ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}$ {l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.endif > .endfor > > manlint: > diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk > index 77c60aef0bc4..7d08b6a1da89 100644 > --- a/share/mk/src.opts.mk > +++ b/share/mk/src.opts.mk > @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \ > LOADER_FIREWIRE \ > LOADER_VERBOSE \ > LOADER_VERIEXEC_PASS_MANIFEST \ > + MANSPLITPKG \ > OFED_EXTRA \ > OPENLDAP \ > OPENSSL_KTLS \ > diff --git a/tools/build/options/WITH_MANSPLITPKG > b/tools/build/options/WITH_MANSPLITPKG new file mode 100644 > index 000000000000..122da24e0bb4 > --- /dev/null > +++ b/tools/build/options/WITH_MANSPLITPKG > @@ -0,0 +1,2 @@ > +.\" $FreeBSD$ > +Set to split man pages into their own packages during make package. -- Tomoaki AOKI From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 00:24:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A21136592CF; Thu, 19 Aug 2021 00:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqlrF4BxFz3ljQ; Thu, 19 Aug 2021 00:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 783771AEF7; Thu, 19 Aug 2021 00:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J0ODwp053820; Thu, 19 Aug 2021 00:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J0OD5D053819; Thu, 19 Aug 2021 00:24:13 GMT (envelope-from git) Date: Thu, 19 Aug 2021 00:24:13 GMT Message-Id: <202108190024.17J0OD5D053819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 60833696c2e9 - stable/13 - ipfilter: remove doubled semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60833696c2e90ab929ac12e9da2ac2b381f02563 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 00:24:13 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=60833696c2e90ab929ac12e9da2ac2b381f02563 commit 60833696c2e90ab929ac12e9da2ac2b381f02563 Author: Ed Maste AuthorDate: 2021-08-16 17:16:23 +0000 Commit: Ed Maste CommitDate: 2021-08-19 00:23:50 +0000 ipfilter: remove doubled semicolons Local commit; ipfilter upstream is inactive. Discussed with: cy MFC after: 3 days --- sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 93bcc2ed9415..4a2596e72563 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -1181,7 +1181,7 @@ ipf_frag_nat_next(softc, token, itp) ipftoken_t *token; ipfgeniter_t *itp; { - ipf_frag_softc_t *softf = softc->ipf_frag_soft;; + ipf_frag_softc_t *softf = softc->ipf_frag_soft; #ifdef USE_MUTEXES return ipf_frag_next(softc, token, itp, &softf->ipfr_natlist, diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 0ebebb49297d..7918f34fe685 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2855,8 +2855,8 @@ ipf_checkicmpmatchingstate(fin) tcp = (tcphdr_t *)((char *)oip + (IP_HL(oip) << 2)); - hv += tcp->th_dport;; - hv += tcp->th_sport;; + hv += tcp->th_dport; + hv += tcp->th_sport; hv = DOUBLE_HASH(hv); READ_ENTER(&softc->ipf_state); From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 00:24:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 760E265907E; Thu, 19 Aug 2021 00:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gqlrg2s4sz3lZZ; Thu, 19 Aug 2021 00:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 498AF1ACF3; Thu, 19 Aug 2021 00:24:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J0OZbx054380; Thu, 19 Aug 2021 00:24:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J0OZoU054379; Thu, 19 Aug 2021 00:24:35 GMT (envelope-from git) Date: Thu, 19 Aug 2021 00:24:35 GMT Message-Id: <202108190024.17J0OZoU054379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7429c75a19d2 - stable/12 - ipfilter: remove doubled semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7429c75a19d297f4ab80042662292ac9ec668e99 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 00:24:35 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7429c75a19d297f4ab80042662292ac9ec668e99 commit 7429c75a19d297f4ab80042662292ac9ec668e99 Author: Ed Maste AuthorDate: 2021-08-16 17:16:23 +0000 Commit: Ed Maste CommitDate: 2021-08-19 00:24:17 +0000 ipfilter: remove doubled semicolons Local commit; ipfilter upstream is inactive. Discussed with: cy MFC after: 3 days --- sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 93bcc2ed9415..4a2596e72563 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -1181,7 +1181,7 @@ ipf_frag_nat_next(softc, token, itp) ipftoken_t *token; ipfgeniter_t *itp; { - ipf_frag_softc_t *softf = softc->ipf_frag_soft;; + ipf_frag_softc_t *softf = softc->ipf_frag_soft; #ifdef USE_MUTEXES return ipf_frag_next(softc, token, itp, &softf->ipfr_natlist, diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 0ebebb49297d..7918f34fe685 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2855,8 +2855,8 @@ ipf_checkicmpmatchingstate(fin) tcp = (tcphdr_t *)((char *)oip + (IP_HL(oip) << 2)); - hv += tcp->th_dport;; - hv += tcp->th_sport;; + hv += tcp->th_dport; + hv += tcp->th_sport; hv = DOUBLE_HASH(hv); READ_ENTER(&softc->ipf_state); From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 00:25:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04E6C659BCC; Thu, 19 Aug 2021 00:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqlsM6kgbz3lxD; Thu, 19 Aug 2021 00:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF2861B0CF; Thu, 19 Aug 2021 00:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J0PBqV054539; Thu, 19 Aug 2021 00:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J0PBOR054538; Thu, 19 Aug 2021 00:25:11 GMT (envelope-from git) Date: Thu, 19 Aug 2021 00:25:11 GMT Message-Id: <202108190025.17J0PBOR054538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f3616c6d7ff5 - stable/11 - ipfilter: remove doubled semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: f3616c6d7ff5168d2e7883a831b60bbdc31367c6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 00:25:12 -0000 The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f3616c6d7ff5168d2e7883a831b60bbdc31367c6 commit f3616c6d7ff5168d2e7883a831b60bbdc31367c6 Author: Ed Maste AuthorDate: 2021-08-16 17:16:23 +0000 Commit: Ed Maste CommitDate: 2021-08-19 00:24:46 +0000 ipfilter: remove doubled semicolons Local commit; ipfilter upstream is inactive. Discussed with: cy MFC after: 3 days (cherry picked from commit 8fa63f44e64ebac444a4ac6451ac5e150cdcf8b1) --- sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 93bcc2ed9415..4a2596e72563 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -1181,7 +1181,7 @@ ipf_frag_nat_next(softc, token, itp) ipftoken_t *token; ipfgeniter_t *itp; { - ipf_frag_softc_t *softf = softc->ipf_frag_soft;; + ipf_frag_softc_t *softf = softc->ipf_frag_soft; #ifdef USE_MUTEXES return ipf_frag_next(softc, token, itp, &softf->ipfr_natlist, diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 0ebebb49297d..7918f34fe685 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2855,8 +2855,8 @@ ipf_checkicmpmatchingstate(fin) tcp = (tcphdr_t *)((char *)oip + (IP_HL(oip) << 2)); - hv += tcp->th_dport;; - hv += tcp->th_sport;; + hv += tcp->th_dport; + hv += tcp->th_sport; hv = DOUBLE_HASH(hv); READ_ENTER(&softc->ipf_state); From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 01:12:02 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76CA765A152; Thu, 19 Aug 2021 01:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqmvQ2nNHz3pjl; Thu, 19 Aug 2021 01:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47C661BF00; Thu, 19 Aug 2021 01:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J1C2DS017435; Thu, 19 Aug 2021 01:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J1C2Ea017434; Thu, 19 Aug 2021 01:12:02 GMT (envelope-from git) Date: Thu, 19 Aug 2021 01:12:02 GMT Message-Id: <202108190112.17J1C2Ea017434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 09d4fe40e039 - stable/13 - Fix race between first rand(3) calls with _once(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 09d4fe40e039d4b08a034454c36aed86571725b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 01:12:02 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=09d4fe40e039d4b08a034454c36aed86571725b0 commit 09d4fe40e039d4b08a034454c36aed86571725b0 Author: Alexander Motin AuthorDate: 2021-07-21 15:25:46 +0000 Commit: Alexander Motin CommitDate: 2021-08-19 01:11:51 +0000 Fix race between first rand(3) calls with _once(). Before this patch there was a chance for thread that called rand(3) slightly later to see rand3_state already allocated, but not yet initialized. While this API is not expected to be thread-safe, it is not expected to crash. ztest on 64-thread system reproduced it reliably for me. Submitted by: avg@ MFC after: 1 month (cherry picked from commit 3a57f08b5042f15bb8ffb2fcce99d082d225d4cf) --- lib/libc/stdlib/rand.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index bddb0f040302..e448d1b1fd14 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -41,11 +41,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include "un-namespace.h" +#include "libc_private.h" #include "random.h" /* @@ -64,6 +66,7 @@ __FBSDID("$FreeBSD$"); * the advantage of being the one already in the tree. */ static struct __random_state *rand3_state; +static pthread_once_t rand3_state_once = PTHREAD_ONCE_INIT; static void initialize_rand3(void) @@ -78,16 +81,14 @@ initialize_rand3(void) int rand(void) { - if (rand3_state == NULL) - initialize_rand3(); + _once(&rand3_state_once, initialize_rand3); return ((int)random_r(rand3_state)); } void srand(unsigned seed) { - if (rand3_state == NULL) - initialize_rand3(); + _once(&rand3_state_once, initialize_rand3); srandom_r(rand3_state, seed); } From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:08:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1766965F241; Thu, 19 Aug 2021 07:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gqwpq6zvPz3krT; Thu, 19 Aug 2021 07:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D44F021215; Thu, 19 Aug 2021 07:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J78ZFN088227; Thu, 19 Aug 2021 07:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J78ZnY088226; Thu, 19 Aug 2021 07:08:35 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:08:35 GMT Message-Id: <202108190708.17J78ZnY088226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 17fe7de111dd - stable/13 - pkgbase: Fix building out-of-tree manual pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 17fe7de111dd9df3ab047f9f7a7dcdb670aecc74 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:08:36 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=17fe7de111dd9df3ab047f9f7a7dcdb670aecc74 commit 17fe7de111dd9df3ab047f9f7a7dcdb670aecc74 Author: Jung-uk Kim AuthorDate: 2021-03-16 18:16:10 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-19 07:08:06 +0000 pkgbase: Fix building out-of-tree manual pages c7e6cb9e08d6 introduced MK_MANSPLITPKG but it was not available for building out-of-tree manual pages. For example, x11/nvidia-driver fails with the following error: ===> doc (all) make[3]: "/usr/share/mk/bsd.man.mk" line 53: Malformed conditional (${MK_MANSPLITPKG} == "no") make[3]: Fatal errors encountered -- cannot continue Move the definition from src.opts.mk to bsd.opts.mk to make it visible. (cherry picked from commit 6827435548d257c672f934db5c6ff01012d96995) --- share/mk/bsd.opts.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 88c73cc6bfe4..934f3d36df77 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -76,6 +76,7 @@ __DEFAULT_NO_OPTIONS = \ INIT_ALL_ZERO \ INSTALL_AS_USER \ PIE \ + MANSPLITPKG \ RETPOLINE \ STALE_STAGED From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:10:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E9C065EDDA; Thu, 19 Aug 2021 07:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqwsF3DBcz3lJK; Thu, 19 Aug 2021 07:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5682E21403; Thu, 19 Aug 2021 07:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7AfNO096795; Thu, 19 Aug 2021 07:10:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7AfhE096793; Thu, 19 Aug 2021 07:10:41 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:10:41 GMT Message-Id: <202108190710.17J7AfhE096793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: c432a007529f - stable/13 - pkgbase: Fix cherry-pick conflict MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c432a007529f8d7315ac30da36fb0ac1128ec977 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:10:41 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c432a007529f8d7315ac30da36fb0ac1128ec977 commit c432a007529f8d7315ac30da36fb0ac1128ec977 Author: Emmanuel Vadot AuthorDate: 2021-08-19 07:09:39 +0000 Commit: Emmanuel Vadot CommitDate: 2021-08-19 07:09:39 +0000 pkgbase: Fix cherry-pick conflict 17fe7de111dd was supposed to remove the option from src.opts.mk --- share/mk/src.opts.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 6fb8c6c855a1..f5f582688161 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -208,7 +208,6 @@ __DEFAULT_NO_OPTIONS = \ LOADER_FIREWIRE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ - MANSPLITPKG \ OFED_EXTRA \ OPENLDAP \ OPENSSL_KTLS \ From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:18:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1487565F926; Thu, 19 Aug 2021 07:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gqx2k6sVjz3lF5; Thu, 19 Aug 2021 07:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF7A021499; Thu, 19 Aug 2021 07:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7IsdS001583; Thu, 19 Aug 2021 07:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7IseQ001582; Thu, 19 Aug 2021 07:18:54 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:18:54 GMT Message-Id: <202108190718.17J7IseQ001582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: f296898fb797 - stable/13 - Fix a common typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f296898fb797e294377a13d0ca8a0b4379ec91be Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:18:55 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f296898fb797e294377a13d0ca8a0b4379ec91be commit f296898fb797e294377a13d0ca8a0b4379ec91be Author: Gordon Bergling AuthorDate: 2021-08-14 12:17:48 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:18:35 +0000 Fix a common typo in source code comments - s/aligment/alignment/ (cherry picked from commit a1581cd73594bbbde638859c31226c2c21be1ab3) --- lib/libc/gen/tls.c | 4 ++-- share/man/man9/rman.9 | 4 ++-- sys/arm/allwinner/if_emac.c | 2 +- sys/dev/sound/pci/hda/hdaa.c | 2 +- sys/dev/usb/controller/uhci.c | 2 +- sys/dev/usb/usb_busdma.c | 2 +- sys/i386/i386/locore.s | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 69b87aea52bf..98915ef4ddf7 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -249,9 +249,9 @@ __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) * * where: * extra_size is tcbsize - TLS_TCB_SIZE - * post_size is used to adjust TCB to TLS aligment for first version of TLS + * post_size is used to adjust TCB to TLS alignment for first version of TLS * layout and is always 0 for second version. - * pre_size is used to adjust TCB aligment for first version and to adjust + * pre_size is used to adjust TCB alignment for first version and to adjust * TLS alignment for second version. * */ diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index 3faea2a014fc..a5a8c34cde90 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -275,7 +275,7 @@ The caller can specify the and .Fa end of an acceptable range, -as well as a boundary restriction and required aligment, +as well as a boundary restriction and required alignment, and the code will attempt to find a free segment which fits. The .Fa start @@ -288,7 +288,7 @@ Therefore, must be \[<=] .Fa end for any allocation to happen. -The aligment requirement +The alignment requirement .Pq if any is specified in .Fa flags . diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 73e7e889916a..5110ce2f9fb4 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -409,7 +409,7 @@ emac_rxeof(struct emac_softc *sc, int count) m->m_len = m->m_pkthdr.len = len - ETHER_CRC_LEN; /* - * Emac controller needs strict aligment, so to avoid + * Emac controller needs strict alignment, so to avoid * copying over an entire frame to align, we allocate * a new mbuf and copy ethernet header + IP header to * the new mbuf. The new mbuf is prepended into the diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 8eeeadce6666..4d872dc88405 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2191,7 +2191,7 @@ hdaa_channel_getptr(kobj_t obj, void *data) hdaa_unlock(devinfo); /* - * Round to available space and force 128 bytes aligment. + * Round to available space and force 128 bytes alignment. */ ptr %= ch->blksz * ch->blkcnt; ptr &= HDA_BLK_ALIGN; diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index 59453359deb0..86bfe0b1108a 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -2898,7 +2898,7 @@ uhci_xfer_setup(struct usb_setup_params *parm) * We don't allow alignments of * less than 8 bytes: * - * NOTE: Allocating using an aligment + * NOTE: Allocating using an alignment * of 1 byte has special meaning! */ if (n < 3) { diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index 26fddaef65b2..4806903fa83a 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -546,7 +546,7 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg, /* * XXX BUS-DMA workaround - FIXME later: * - * We assume that that the aligment at this point of + * We assume that that the alignment at this point of * the code is greater than or equal to the size and * less than two times the size, so that if we double * the size, the size will be greater than the diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 2bc751ba8ffc..d350c3abaeaa 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -340,7 +340,7 @@ ENTRY(identify_cpu) testl %eax,%eax jnz try486 - /* NexGen CPU does not have aligment check flag. */ + /* NexGen CPU does not have alignment check flag. */ pushfl movl $0x5555, %eax xorl %edx, %edx From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:27:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F75D65F633; Thu, 19 Aug 2021 07:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxDP6nD4z3ljT; Thu, 19 Aug 2021 07:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D142D214BC; Thu, 19 Aug 2021 07:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7RH9H014518; Thu, 19 Aug 2021 07:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7RHH0014517; Thu, 19 Aug 2021 07:27:17 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:27:17 GMT Message-Id: <202108190727.17J7RHH0014517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ca2e359c02c8 - stable/13 - Fix a common typo in a comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca2e359c02c83c921bad881ab80232cf51830749 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:27:18 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ca2e359c02c83c921bad881ab80232cf51830749 commit ca2e359c02c83c921bad881ab80232cf51830749 Author: Gordon Bergling AuthorDate: 2021-08-14 11:29:51 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:26:58 +0000 Fix a common typo in a comment - s/enrty/entry/ (cherry picked from commit 86b74b736818a0b025ef520f8a4f570f48741666) --- sys/dev/bxe/bxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index a8aa0a89aae1..9145f11e5bf1 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -17179,7 +17179,7 @@ bxe_init_hw_common(struct bxe_softc *sc) * stay set) * f. If this is VNIC 3 of a port then also init * first_timers_ilt_entry to zero and last_timers_ilt_entry - * to the last enrty in the ILT. + * to the last enrtry in the ILT. * * Notes: * Currently the PF error in the PGLC is non recoverable. From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:27:50 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9ED8E65FA7D; Thu, 19 Aug 2021 07:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxF243xBz3ljh; Thu, 19 Aug 2021 07:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 745B3213B7; Thu, 19 Aug 2021 07:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7RoiU014664; Thu, 19 Aug 2021 07:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7Ro8p014663; Thu, 19 Aug 2021 07:27:50 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:27:50 GMT Message-Id: <202108190727.17J7Ro8p014663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ac7cf0c6364f - stable/13 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac7cf0c6364f1ff29a0be34ab579881674074e0b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:27:50 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ac7cf0c6364f1ff29a0be34ab579881674074e0b commit ac7cf0c6364f1ff29a0be34ab579881674074e0b Author: Gordon Bergling AuthorDate: 2021-08-14 08:08:49 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:27:34 +0000 Fix a few typos in source code comments - s/procesing/processing/ (cherry picked from commit 288e553623d3f8ac33baaabc93a4f030689755d2) --- sys/dev/ce/ceddk.c | 4 ++-- usr.bin/indent/lexi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ce/ceddk.c b/sys/dev/ce/ceddk.c index cca95c891964..569476040a93 100644 --- a/sys/dev/ce/ceddk.c +++ b/sys/dev/ce/ceddk.c @@ -245,7 +245,7 @@ static void TAU32_CALLBACK_TYPE ce_on_receive c->error (c, CE_OVERRUN); } else { CE_DDK_DEBUG (b, c, ("Another receive error: %x\n", error)); - /* Do some procesing */ + /* Do some processing */ } CE_ASSERT (!req->pInternal); @@ -297,7 +297,7 @@ static void TAU32_CALLBACK_TYPE ce_on_transmit } else { CE_DDK_DEBUG (c->board, c, ("Another transmit error: %x\n", error)); - /* Do some procesing */ + /* Do some processing */ } CE_ENQUEUE (c->tx_queue, req); diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index 1a5938689e26..83178a72b4f6 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -354,7 +354,7 @@ lexi(struct parser_state *state) * then following sign is unary */ state->last_u_d = true; /* will make "int a -1" work */ return (ident); /* the ident is not in the list */ - } /* end of procesing for alpanum character */ + } /* end of processing for alpanum character */ /* Scan a non-alphanumeric token */ From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:28:22 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB8C665FC1C; Thu, 19 Aug 2021 07:28:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxFf4RrRz3lk3; Thu, 19 Aug 2021 07:28:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81FDA214BD; Thu, 19 Aug 2021 07:28:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7SMmd014814; Thu, 19 Aug 2021 07:28:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7SMTh014813; Thu, 19 Aug 2021 07:28:22 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:28:22 GMT Message-Id: <202108190728.17J7SMTh014813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ab4864fba27a - stable/13 - Fix some common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ab4864fba27a141dba0929afd8432b94ad77e873 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:28:22 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ab4864fba27a141dba0929afd8432b94ad77e873 commit ab4864fba27a141dba0929afd8432b94ad77e873 Author: Gordon Bergling AuthorDate: 2021-08-14 06:55:58 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:28:06 +0000 Fix some common typos in source code comments - s/struture/structure/ - s/structre/structure/ (cherry picked from commit 17db4b52fb41aeabeb945c68c1b5edd4db4eac31) --- sys/dev/bce/if_bce.c | 4 ++-- sys/dev/drm2/drm_platform.c | 2 +- sys/dev/isci/scil/intel_ata.h | 2 +- sys/dev/isci/scil/sci_overview.h | 2 +- sys/dev/liquidio/base/lio_device.h | 2 +- sys/dev/pms/RefTisa/sallsdk/api/sa.h | 2 +- sys/dev/pms/RefTisa/sallsdk/spc/sallist.h | 2 +- sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c | 2 +- sys/dev/pms/freebsd/driver/common/lxcommon.h | 2 +- sys/sys/jail.h | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index d6c5a2bf091f..869d8f9fc40e 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -3163,7 +3163,7 @@ bce_init_media(struct bce_softc *sc) /****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ -/* Scans through each data structre that requires DMA memory and frees */ +/* Scans through each data structure that requires DMA memory and frees */ /* the memory if allocated. */ /* */ /* Returns: */ @@ -5553,7 +5553,7 @@ bce_init_tx_chain(struct bce_softc *sc) DBRUN(sc->tx_full_count = 0); /* - * The NetXtreme II supports a linked-list structre called + * The NetXtreme II supports a linked-list structure called * a Buffer Descriptor Chain (or BD chain). A BD chain * consists of a series of 1 or more chain pages, each of which * consists of a fixed number of BD entries. diff --git a/sys/dev/drm2/drm_platform.c b/sys/dev/drm2/drm_platform.c index a8972b44f5f1..17f3367719e2 100644 --- a/sys/dev/drm2/drm_platform.c +++ b/sys/dev/drm2/drm_platform.c @@ -107,7 +107,7 @@ static struct drm_bus drm_platform_bus = { /** * Register. * - * \param platdev - Platform device struture + * \param platdev - Platform device structure * \return zero on success or a negative number on failure. * * Attempt to gets inter module "drm" information. If we are first diff --git a/sys/dev/isci/scil/intel_ata.h b/sys/dev/isci/scil/intel_ata.h index 86f584b35d61..e213d0efcb06 100644 --- a/sys/dev/isci/scil/intel_ata.h +++ b/sys/dev/isci/scil/intel_ata.h @@ -244,7 +244,7 @@ * * The following constants define bit masks utilized to determine if a * feature is supported/enabled or if a bit is simply set inside of the - * IDENTIFY DEVICE data structre. + * IDENTIFY DEVICE data structure. */ /*@{*/ #define ATA_IDENTIFY_REMOVABLE_MEDIA_ENABLE 0x0080 diff --git a/sys/dev/isci/scil/sci_overview.h b/sys/dev/isci/scil/sci_overview.h index 3cde341efb1f..cba4f8351fbd 100644 --- a/sys/dev/isci/scil/sci_overview.h +++ b/sys/dev/isci/scil/sci_overview.h @@ -216,7 +216,7 @@ associate one object to another. An SCI object can be made to have an association to another SCI object. Additionally, an SCI object can be made to have an association to a non-SCI based object. For example, an SCI Framework library can have it's association set to an operating system -specific adapter/device driver structre. +specific adapter/device driver structure. Simply put, the association that an object has is a handle (i.e. a void pointer) to a user structure. This enables the user of the SCI object to diff --git a/sys/dev/liquidio/base/lio_device.h b/sys/dev/liquidio/base/lio_device.h index d5ba3361b2fc..de07f604fd9c 100644 --- a/sys/dev/liquidio/base/lio_device.h +++ b/sys/dev/liquidio/base/lio_device.h @@ -799,7 +799,7 @@ void *lio_get_config_info(struct octeon_device *oct, uint16_t card_type); /* * Gets the octeon device configuration - * @return - pointer to the octeon configuration struture + * @return - pointer to the octeon configuration structure */ struct lio_config *lio_get_conf(struct octeon_device *oct); diff --git a/sys/dev/pms/RefTisa/sallsdk/api/sa.h b/sys/dev/pms/RefTisa/sallsdk/api/sa.h index e13db5390f4e..e702dd4fb23a 100644 --- a/sys/dev/pms/RefTisa/sallsdk/api/sa.h +++ b/sys/dev/pms/RefTisa/sallsdk/api/sa.h @@ -1660,7 +1660,7 @@ typedef struct agsaContext_s void *sdkData; /**< Pointer-sized value used internally by the LL Layer */ } agsaContext_t; -/** \brief hold points to global data strutures used by the LL and OS Layers +/** \brief hold points to global data structures used by the LL and OS Layers * * The agsaRoot_t data structure is used to hold pointer-sized values for * internal use by the LL and OS Layers. It is intended that the diff --git a/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h b/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h index 0203a64f6f65..8ed9fb325445 100644 --- a/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h +++ b/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h @@ -40,7 +40,7 @@ /** \brief Structure of Link Data * * link data, need to be included at the start (offset 0) - * of any strutures that are to be stored in the link list + * of any structures that are to be stored in the link list * */ typedef struct _SALINK diff --git a/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c b/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c index 89ac376caaff..eeaac814d1c2 100644 --- a/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c +++ b/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c @@ -2496,7 +2496,7 @@ tdsaSharedMemCalculate( #endif #ifdef TD_DISCOVER - /* adding expander data strutures */ + /* adding expander data structures */ tdSharedMem->tdSharedCachedMem1.singleElementLength += sizeof(tdsaExpander_t) * MaxTargets; #endif diff --git a/sys/dev/pms/freebsd/driver/common/lxcommon.h b/sys/dev/pms/freebsd/driver/common/lxcommon.h index bbe33cf1fef7..5968ecba8021 100644 --- a/sys/dev/pms/freebsd/driver/common/lxcommon.h +++ b/sys/dev/pms/freebsd/driver/common/lxcommon.h @@ -614,7 +614,7 @@ bit8 *data; //buffer /* ** link data, need to be included at the start (offset 0) -** of any strutures that are to be stored in the link list +** of any structures that are to be stored in the link list */ typedef struct _LINK_NODE { diff --git a/sys/sys/jail.h b/sys/sys/jail.h index c9d4c65e4d9e..f863a523b917 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -148,7 +148,7 @@ struct prison_racct; /* * This structure describes a prison. It is pointed to by all struct * ucreds's of the inmates. pr_ref keeps track of them and is used to - * delete the struture when the last inmate is dead. + * delete the structure when the last inmate is dead. * * Lock key: * (a) allprison_lock From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:28:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4983665FD8C; Thu, 19 Aug 2021 07:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxG81bXYz3ln1; Thu, 19 Aug 2021 07:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE21214BE; Thu, 19 Aug 2021 07:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7SmkU014953; Thu, 19 Aug 2021 07:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7SmQF014952; Thu, 19 Aug 2021 07:28:48 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:28:48 GMT Message-Id: <202108190728.17J7SmQF014952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7aa0f2904567 - stable/13 - Fix a common typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7aa0f29045671e42aa19992d45c0d7bd1ddbe96d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:28:48 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7aa0f29045671e42aa19992d45c0d7bd1ddbe96d commit 7aa0f29045671e42aa19992d45c0d7bd1ddbe96d Author: Gordon Bergling AuthorDate: 2021-08-14 12:08:46 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:28:34 +0000 Fix a common typo in source code comments - s/definitons/definitions/ (cherry picked from commit 1da11b8ac3474817f38330e272f50553f2ef21a4) --- sys/cam/scsi/scsi_da.c | 2 +- sys/mips/include/cpuregs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index c13b51921745..b281dbfd4ee1 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4469,7 +4469,7 @@ dazonedone(struct cam_periph *periph, union ccb *ccb) /* * NOTE: we're mapping the values here directly * from the SCSI/ATA bit definitions to the bio.h - * definitons. There is also a warning in + * definitions. There is also a warning in * disk_zone.h, but the impact is that if * additional values are added in the SCSI/ATA * specs these will be visible to consumers of diff --git a/sys/mips/include/cpuregs.h b/sys/mips/include/cpuregs.h index c61724564a59..2b5a0ce554dc 100644 --- a/sys/mips/include/cpuregs.h +++ b/sys/mips/include/cpuregs.h @@ -222,7 +222,7 @@ #define MIPS_SR_INT_MASK 0x0000ff00 /* - * R4000 status register bit definitons, + * R4000 status register bit definitions, * where different from r2000/r3000. */ #define MIPS_SR_XX 0x80000000 From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:29:15 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FA5F65FB4E; Thu, 19 Aug 2021 07:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxGg3jw4z3m5l; Thu, 19 Aug 2021 07:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6841721460; Thu, 19 Aug 2021 07:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7TFJf015098; Thu, 19 Aug 2021 07:29:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7TFOI015097; Thu, 19 Aug 2021 07:29:15 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:29:15 GMT Message-Id: <202108190729.17J7TFOI015097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: df8242497082 - stable/13 - md5(1): Fix a typo in the manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: df82424970828bc91fa1f9a299bb3b17fd4b9003 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:29:15 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=df82424970828bc91fa1f9a299bb3b17fd4b9003 commit df82424970828bc91fa1f9a299bb3b17fd4b9003 Author: Gordon Bergling AuthorDate: 2021-08-14 12:48:39 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:29:01 +0000 md5(1): Fix a typo in the manual page - s/compatibilty/compatibility/ (cherry picked from commit 0d71cea832f4b6e1db9d28d3ca393682d577b43e) --- sbin/md5/md5.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index 2b1da85c080f..ddda24196d9e 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -164,7 +164,7 @@ d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf .Pd The .Nm -sum -variants put 2 blank characters between hash and file name for full compatibilty +variants put 2 blank characters between hash and file name for full compatibility with the coreutils versions of these commands. .Ed .Pp From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:29:42 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8CEC65FDB2; Thu, 19 Aug 2021 07:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxHB4qkJz3m0B; Thu, 19 Aug 2021 07:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E832214BF; Thu, 19 Aug 2021 07:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7Tggd015243; Thu, 19 Aug 2021 07:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7TgTV015242; Thu, 19 Aug 2021 07:29:42 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:29:42 GMT Message-Id: <202108190729.17J7TgTV015242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: a6bc738260c2 - stable/13 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a6bc738260c27905af29eaf81cc3e50744a54cda Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:29:42 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a6bc738260c27905af29eaf81cc3e50744a54cda commit a6bc738260c27905af29eaf81cc3e50744a54cda Author: Gordon Bergling AuthorDate: 2021-08-14 07:39:17 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:29:25 +0000 Fix a few typos in source code comments - s/posbile/possible/ (cherry picked from commit 34f620f1d0cfa67f5987452ac3fdd8c113b6b099) --- sys/cam/scsi/scsi_all.c | 2 +- sys/netgraph/ng_base.c | 2 +- tools/regression/netinet/ipsockopt/ipsockopt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 1b60003a4ac7..a84c5b8d6c22 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -9150,7 +9150,7 @@ scsi_devid_match(uint8_t *lhs, size_t lhs_len, uint8_t *rhs, size_t rhs_len) rhs_end = rhs + rhs_len; /* - * rhs_last and lhs_last are the last posible position of a valid + * rhs_last and lhs_last are the last possible position of a valid * descriptor assuming it had a zero length identifier. We use * these variables to insure we can safely dereference the length * field in our loop termination tests. diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index ae179cf13a45..ba60acb53502 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -3454,7 +3454,7 @@ ngthread(void *arg) /* * XXX - * It's posible that a debugging NG_NODE_REF may need + * It's possible that a debugging NG_NODE_REF may need * to be outside the mutex zone */ static void diff --git a/tools/regression/netinet/ipsockopt/ipsockopt.c b/tools/regression/netinet/ipsockopt/ipsockopt.c index d03ddf652f42..16805b9e6412 100644 --- a/tools/regression/netinet/ipsockopt/ipsockopt.c +++ b/tools/regression/netinet/ipsockopt/ipsockopt.c @@ -163,7 +163,7 @@ test_ip_options(int sock, const char *socktypename) "returned %d bytes of data", socktypename, len); /* - * One posible failure mode is that the call succeeds but neglects to + * One possible failure mode is that the call succeeds but neglects to * copy out the data. */ if (test_options[0] == TEST_MAGIC) From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:30:06 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0248065FE26; Thu, 19 Aug 2021 07:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxHd6T7bz3m1Z; Thu, 19 Aug 2021 07:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C703A20DF6; Thu, 19 Aug 2021 07:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7U5Xq017790; Thu, 19 Aug 2021 07:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7U57T017787; Thu, 19 Aug 2021 07:30:05 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:30:05 GMT Message-Id: <202108190730.17J7U57T017787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 337c9718387d - stable/13 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 337c9718387df72af2e30175c0b9aeddc04117df Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:30:06 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=337c9718387df72af2e30175c0b9aeddc04117df commit 337c9718387df72af2e30175c0b9aeddc04117df Author: Gordon Bergling AuthorDate: 2021-08-14 07:06:09 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:29:50 +0000 Fix a few typos in source code comments - s/becase/because/ (cherry picked from commit fa7a635f7ee277960eb37b9102a3aef76b36b825) --- stand/i386/libfirewire/dconsole.c | 2 +- sys/vm/vm_pageout.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/i386/libfirewire/dconsole.c b/stand/i386/libfirewire/dconsole.c index 1528fafdf787..338ed26aa417 100644 --- a/stand/i386/libfirewire/dconsole.c +++ b/stand/i386/libfirewire/dconsole.c @@ -47,7 +47,7 @@ static int dcons_started = 0; static struct dcons_softc sc[DCONS_NPORT]; uint32_t dcons_paddr; -/* The buffer must be allocated in BSS becase: +/* The buffer must be allocated in BSS because: * - The dcons driver in the kernel is initialized before VM/pmap is * initialized, so that the buffer must be allocate in the region * that is mapped at the very early boot state. diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 9a0b295569e2..ff0c90843037 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -539,7 +539,7 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen, * the PQ_UNSWAPPABLE holding queue. This is an * optimization that prevents the page daemon from * wasting CPU cycles on pages that cannot be reclaimed - * becase no swap device is configured. + * because no swap device is configured. * * Otherwise, reactivate the page so that it doesn't * clog the laundry and inactive queues. (We will try From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:31:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6D0D660000; Thu, 19 Aug 2021 07:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxKR4G2Cz3mLn; Thu, 19 Aug 2021 07:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A94F21477; Thu, 19 Aug 2021 07:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7VdUi026891; Thu, 19 Aug 2021 07:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7Vd9O026890; Thu, 19 Aug 2021 07:31:39 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:31:39 GMT Message-Id: <202108190731.17J7Vd9O026890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: b26056a6bd68 - stable/12 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b26056a6bd68fab3e083d0fa1ad8a49de787b20e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:31:39 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b26056a6bd68fab3e083d0fa1ad8a49de787b20e commit b26056a6bd68fab3e083d0fa1ad8a49de787b20e Author: Gordon Bergling AuthorDate: 2021-08-14 07:06:09 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:31:24 +0000 Fix a few typos in source code comments - s/becase/because/ (cherry picked from commit fa7a635f7ee277960eb37b9102a3aef76b36b825) --- stand/i386/libfirewire/dconsole.c | 2 +- sys/vm/vm_pageout.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/i386/libfirewire/dconsole.c b/stand/i386/libfirewire/dconsole.c index 1528fafdf787..338ed26aa417 100644 --- a/stand/i386/libfirewire/dconsole.c +++ b/stand/i386/libfirewire/dconsole.c @@ -47,7 +47,7 @@ static int dcons_started = 0; static struct dcons_softc sc[DCONS_NPORT]; uint32_t dcons_paddr; -/* The buffer must be allocated in BSS becase: +/* The buffer must be allocated in BSS because: * - The dcons driver in the kernel is initialized before VM/pmap is * initialized, so that the buffer must be allocate in the region * that is mapped at the very early boot state. diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index fc7219d868bb..d38f3d7d5946 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -509,7 +509,7 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen, * the PQ_UNSWAPPABLE holding queue. This is an * optimization that prevents the page daemon from * wasting CPU cycles on pages that cannot be reclaimed - * becase no swap device is configured. + * because no swap device is configured. * * Otherwise, reactivate the page so that it doesn't * clog the laundry and inactive queues. (We will try From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:32:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BEC665FFB2; Thu, 19 Aug 2021 07:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxKz0q2Zz3mCw; Thu, 19 Aug 2021 07:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 044D4214DD; Thu, 19 Aug 2021 07:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7W6UF027903; Thu, 19 Aug 2021 07:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7W6Dp027902; Thu, 19 Aug 2021 07:32:06 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:32:06 GMT Message-Id: <202108190732.17J7W6Dp027902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: a9ec80d82360 - stable/12 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a9ec80d82360e766b34fad4905016c1e30ea03d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:32:07 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a9ec80d82360e766b34fad4905016c1e30ea03d9 commit a9ec80d82360e766b34fad4905016c1e30ea03d9 Author: Gordon Bergling AuthorDate: 2021-08-14 07:39:17 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:31:53 +0000 Fix a few typos in source code comments - s/posbile/possible/ (cherry picked from commit 34f620f1d0cfa67f5987452ac3fdd8c113b6b099) --- sys/cam/scsi/scsi_all.c | 2 +- sys/netgraph/ng_base.c | 2 +- tools/regression/netinet/ipsockopt/ipsockopt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index cc114ace1d75..6c8dec7cc235 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -9153,7 +9153,7 @@ scsi_devid_match(uint8_t *lhs, size_t lhs_len, uint8_t *rhs, size_t rhs_len) rhs_end = rhs + rhs_len; /* - * rhs_last and lhs_last are the last posible position of a valid + * rhs_last and lhs_last are the last possible position of a valid * descriptor assuming it had a zero length identifier. We use * these variables to insure we can safely dereference the length * field in our loop termination tests. diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index f7c2cdb9afb0..13dd44cd4f4a 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -3448,7 +3448,7 @@ ngthread(void *arg) /* * XXX - * It's posible that a debugging NG_NODE_REF may need + * It's possible that a debugging NG_NODE_REF may need * to be outside the mutex zone */ static void diff --git a/tools/regression/netinet/ipsockopt/ipsockopt.c b/tools/regression/netinet/ipsockopt/ipsockopt.c index d03ddf652f42..16805b9e6412 100644 --- a/tools/regression/netinet/ipsockopt/ipsockopt.c +++ b/tools/regression/netinet/ipsockopt/ipsockopt.c @@ -163,7 +163,7 @@ test_ip_options(int sock, const char *socktypename) "returned %d bytes of data", socktypename, len); /* - * One posible failure mode is that the call succeeds but neglects to + * One possible failure mode is that the call succeeds but neglects to * copy out the data. */ if (test_options[0] == TEST_MAGIC) From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:33:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 686E66600A0; Thu, 19 Aug 2021 07:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxMh2Npvz3mSD; Thu, 19 Aug 2021 07:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A30621A0C; Thu, 19 Aug 2021 07:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7Xawm028173; Thu, 19 Aug 2021 07:33:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7XaV7028172; Thu, 19 Aug 2021 07:33:36 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:33:36 GMT Message-Id: <202108190733.17J7XaV7028172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ccd9a87e56ff - stable/12 - md5(1): Fix a typo in the manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ccd9a87e56ff3333435a9b5b9a50b5d60f1691d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:33:36 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ccd9a87e56ff3333435a9b5b9a50b5d60f1691d9 commit ccd9a87e56ff3333435a9b5b9a50b5d60f1691d9 Author: Gordon Bergling AuthorDate: 2021-08-14 12:48:39 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:33:21 +0000 md5(1): Fix a typo in the manual page - s/compatibilty/compatibility/ (cherry picked from commit 0d71cea832f4b6e1db9d28d3ca393682d577b43e) --- sbin/md5/md5.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index f91e0b759dc7..8cef5650b7c1 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -180,7 +180,7 @@ d80bf36c332dc0fdc479366ec3fa44cd /etc/rc.conf .Pd The .Nm -sum -variants put 2 blank characters between hash and file name for full compatibilty +variants put 2 blank characters between hash and file name for full compatibility with the coreutils versions of these commands. .Ed .Pp From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:34:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A19B65FF29; Thu, 19 Aug 2021 07:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxNK0gqLz3mSR; Thu, 19 Aug 2021 07:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0017C217C3; Thu, 19 Aug 2021 07:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7Y8Qo028318; Thu, 19 Aug 2021 07:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7Y8Yt028317; Thu, 19 Aug 2021 07:34:08 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:34:08 GMT Message-Id: <202108190734.17J7Y8Yt028317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: ddab34da3d22 - stable/12 - Fix a common typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ddab34da3d22827fcb2d37c28f1a8862b7895905 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:34:09 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ddab34da3d22827fcb2d37c28f1a8862b7895905 commit ddab34da3d22827fcb2d37c28f1a8862b7895905 Author: Gordon Bergling AuthorDate: 2021-08-14 12:08:46 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:33:54 +0000 Fix a common typo in source code comments - s/definitons/definitions/ (cherry picked from commit 1da11b8ac3474817f38330e272f50553f2ef21a4) --- sys/cam/scsi/scsi_da.c | 2 +- sys/mips/include/cpuregs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 1e9112e815d4..4f773b75498b 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4374,7 +4374,7 @@ dazonedone(struct cam_periph *periph, union ccb *ccb) /* * NOTE: we're mapping the values here directly * from the SCSI/ATA bit definitions to the bio.h - * definitons. There is also a warning in + * definitions. There is also a warning in * disk_zone.h, but the impact is that if * additional values are added in the SCSI/ATA * specs these will be visible to consumers of diff --git a/sys/mips/include/cpuregs.h b/sys/mips/include/cpuregs.h index 096f322d672d..830b1aed412c 100644 --- a/sys/mips/include/cpuregs.h +++ b/sys/mips/include/cpuregs.h @@ -222,7 +222,7 @@ #define MIPS_SR_INT_MASK 0x0000ff00 /* - * R4000 status register bit definitons, + * R4000 status register bit definitions, * where different from r2000/r3000. */ #define MIPS_SR_XX 0x80000000 From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:35:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 526996600BD; Thu, 19 Aug 2021 07:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxPj1rjzz3mYy; Thu, 19 Aug 2021 07:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27C3D214E8; Thu, 19 Aug 2021 07:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7ZLHq028528; Thu, 19 Aug 2021 07:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7ZLjj028527; Thu, 19 Aug 2021 07:35:21 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:35:21 GMT Message-Id: <202108190735.17J7ZLjj028527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 54e111ec0c74 - stable/12 - Fix some common typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 54e111ec0c74dc7ae50758aaaa8d34571a3bc3b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:35:21 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=54e111ec0c74dc7ae50758aaaa8d34571a3bc3b0 commit 54e111ec0c74dc7ae50758aaaa8d34571a3bc3b0 Author: Gordon Bergling AuthorDate: 2021-08-14 06:55:58 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:35:05 +0000 Fix some common typos in source code comments - s/struture/structure/ - s/structre/structure/ (cherry picked from commit 17db4b52fb41aeabeb945c68c1b5edd4db4eac31) --- sys/dev/bce/if_bce.c | 4 ++-- sys/dev/drm2/drm_platform.c | 2 +- sys/dev/isci/scil/intel_ata.h | 2 +- sys/dev/isci/scil/sci_overview.h | 2 +- sys/dev/liquidio/base/lio_device.h | 2 +- sys/dev/pms/RefTisa/sallsdk/api/sa.h | 2 +- sys/dev/pms/RefTisa/sallsdk/spc/sallist.h | 2 +- sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c | 2 +- sys/dev/pms/freebsd/driver/common/lxcommon.h | 2 +- sys/sys/jail.h | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 3d5c0742580c..5277e8f59cc6 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -3227,7 +3227,7 @@ bce_init_media(struct bce_softc *sc) /****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ -/* Scans through each data structre that requires DMA memory and frees */ +/* Scans through each data structure that requires DMA memory and frees */ /* the memory if allocated. */ /* */ /* Returns: */ @@ -5657,7 +5657,7 @@ bce_init_tx_chain(struct bce_softc *sc) DBRUN(sc->tx_full_count = 0); /* - * The NetXtreme II supports a linked-list structre called + * The NetXtreme II supports a linked-list structure called * a Buffer Descriptor Chain (or BD chain). A BD chain * consists of a series of 1 or more chain pages, each of which * consists of a fixed number of BD entries. diff --git a/sys/dev/drm2/drm_platform.c b/sys/dev/drm2/drm_platform.c index a8972b44f5f1..17f3367719e2 100644 --- a/sys/dev/drm2/drm_platform.c +++ b/sys/dev/drm2/drm_platform.c @@ -107,7 +107,7 @@ static struct drm_bus drm_platform_bus = { /** * Register. * - * \param platdev - Platform device struture + * \param platdev - Platform device structure * \return zero on success or a negative number on failure. * * Attempt to gets inter module "drm" information. If we are first diff --git a/sys/dev/isci/scil/intel_ata.h b/sys/dev/isci/scil/intel_ata.h index 86f584b35d61..e213d0efcb06 100644 --- a/sys/dev/isci/scil/intel_ata.h +++ b/sys/dev/isci/scil/intel_ata.h @@ -244,7 +244,7 @@ * * The following constants define bit masks utilized to determine if a * feature is supported/enabled or if a bit is simply set inside of the - * IDENTIFY DEVICE data structre. + * IDENTIFY DEVICE data structure. */ /*@{*/ #define ATA_IDENTIFY_REMOVABLE_MEDIA_ENABLE 0x0080 diff --git a/sys/dev/isci/scil/sci_overview.h b/sys/dev/isci/scil/sci_overview.h index 3cde341efb1f..cba4f8351fbd 100644 --- a/sys/dev/isci/scil/sci_overview.h +++ b/sys/dev/isci/scil/sci_overview.h @@ -216,7 +216,7 @@ associate one object to another. An SCI object can be made to have an association to another SCI object. Additionally, an SCI object can be made to have an association to a non-SCI based object. For example, an SCI Framework library can have it's association set to an operating system -specific adapter/device driver structre. +specific adapter/device driver structure. Simply put, the association that an object has is a handle (i.e. a void pointer) to a user structure. This enables the user of the SCI object to diff --git a/sys/dev/liquidio/base/lio_device.h b/sys/dev/liquidio/base/lio_device.h index d5ba3361b2fc..de07f604fd9c 100644 --- a/sys/dev/liquidio/base/lio_device.h +++ b/sys/dev/liquidio/base/lio_device.h @@ -799,7 +799,7 @@ void *lio_get_config_info(struct octeon_device *oct, uint16_t card_type); /* * Gets the octeon device configuration - * @return - pointer to the octeon configuration struture + * @return - pointer to the octeon configuration structure */ struct lio_config *lio_get_conf(struct octeon_device *oct); diff --git a/sys/dev/pms/RefTisa/sallsdk/api/sa.h b/sys/dev/pms/RefTisa/sallsdk/api/sa.h index e13db5390f4e..e702dd4fb23a 100644 --- a/sys/dev/pms/RefTisa/sallsdk/api/sa.h +++ b/sys/dev/pms/RefTisa/sallsdk/api/sa.h @@ -1660,7 +1660,7 @@ typedef struct agsaContext_s void *sdkData; /**< Pointer-sized value used internally by the LL Layer */ } agsaContext_t; -/** \brief hold points to global data strutures used by the LL and OS Layers +/** \brief hold points to global data structures used by the LL and OS Layers * * The agsaRoot_t data structure is used to hold pointer-sized values for * internal use by the LL and OS Layers. It is intended that the diff --git a/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h b/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h index 0203a64f6f65..8ed9fb325445 100644 --- a/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h +++ b/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h @@ -40,7 +40,7 @@ /** \brief Structure of Link Data * * link data, need to be included at the start (offset 0) - * of any strutures that are to be stored in the link list + * of any structures that are to be stored in the link list * */ typedef struct _SALINK diff --git a/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c b/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c index 89ac376caaff..eeaac814d1c2 100644 --- a/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c +++ b/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c @@ -2496,7 +2496,7 @@ tdsaSharedMemCalculate( #endif #ifdef TD_DISCOVER - /* adding expander data strutures */ + /* adding expander data structures */ tdSharedMem->tdSharedCachedMem1.singleElementLength += sizeof(tdsaExpander_t) * MaxTargets; #endif diff --git a/sys/dev/pms/freebsd/driver/common/lxcommon.h b/sys/dev/pms/freebsd/driver/common/lxcommon.h index 71ce230c3812..3b12822fc8d1 100644 --- a/sys/dev/pms/freebsd/driver/common/lxcommon.h +++ b/sys/dev/pms/freebsd/driver/common/lxcommon.h @@ -614,7 +614,7 @@ bit8 *data; //buffer /* ** link data, need to be included at the start (offset 0) -** of any strutures that are to be stored in the link list +** of any structures that are to be stored in the link list */ typedef struct _LINK_NODE { diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 8baf784d6b6d..590fb4488262 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -146,7 +146,7 @@ struct prison_racct; /* * This structure describes a prison. It is pointed to by all struct * ucreds's of the inmates. pr_ref keeps track of them and is used to - * delete the struture when the last inmate is dead. + * delete the structure when the last inmate is dead. * * Lock key: * (a) allprison_lock From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:35:48 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C025B6602B3; Thu, 19 Aug 2021 07:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxQD4zNJz3mx4; Thu, 19 Aug 2021 07:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92829214E9; Thu, 19 Aug 2021 07:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7ZmnZ028667; Thu, 19 Aug 2021 07:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7Zm6p028666; Thu, 19 Aug 2021 07:35:48 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:35:48 GMT Message-Id: <202108190735.17J7Zm6p028666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 85639326a98a - stable/12 - Fix a few typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 85639326a98a34f818c01472ccfdb06b8473ede8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:35:48 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=85639326a98a34f818c01472ccfdb06b8473ede8 commit 85639326a98a34f818c01472ccfdb06b8473ede8 Author: Gordon Bergling AuthorDate: 2021-08-14 08:08:49 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:35:33 +0000 Fix a few typos in source code comments - s/procesing/processing/ (cherry picked from commit 288e553623d3f8ac33baaabc93a4f030689755d2) --- sys/dev/ce/ceddk.c | 4 ++-- usr.bin/indent/lexi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ce/ceddk.c b/sys/dev/ce/ceddk.c index 96419ee086d3..9934cbfb6b99 100644 --- a/sys/dev/ce/ceddk.c +++ b/sys/dev/ce/ceddk.c @@ -245,7 +245,7 @@ static void TAU32_CALLBACK_TYPE ce_on_receive c->error (c, CE_OVERRUN); } else { CE_DDK_DEBUG (b, c, ("Another receive error: %x\n", error)); - /* Do some procesing */ + /* Do some processing */ } CE_ASSERT (!req->pInternal); @@ -297,7 +297,7 @@ static void TAU32_CALLBACK_TYPE ce_on_transmit } else { CE_DDK_DEBUG (c->board, c, ("Another transmit error: %x\n", error)); - /* Do some procesing */ + /* Do some processing */ } CE_ENQUEUE (c->tx_queue, req); diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index 1a5938689e26..83178a72b4f6 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -354,7 +354,7 @@ lexi(struct parser_state *state) * then following sign is unary */ state->last_u_d = true; /* will make "int a -1" work */ return (ident); /* the ident is not in the list */ - } /* end of procesing for alpanum character */ + } /* end of processing for alpanum character */ /* Scan a non-alphanumeric token */ From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:36:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 247D36602C0; Thu, 19 Aug 2021 07:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxQp0Tg4z3nBD; Thu, 19 Aug 2021 07:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECBFD216E8; Thu, 19 Aug 2021 07:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7aHJo028812; Thu, 19 Aug 2021 07:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7aHO8028811; Thu, 19 Aug 2021 07:36:17 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:36:17 GMT Message-Id: <202108190736.17J7aHO8028811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 2971cf09c819 - stable/12 - Fix a common typo in a comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2971cf09c819e19a4a664b08e2b548f0b6ea475f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:36:18 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2971cf09c819e19a4a664b08e2b548f0b6ea475f commit 2971cf09c819e19a4a664b08e2b548f0b6ea475f Author: Gordon Bergling AuthorDate: 2021-08-14 11:29:51 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:36:02 +0000 Fix a common typo in a comment - s/enrty/entry/ (cherry picked from commit 86b74b736818a0b025ef520f8a4f570f48741666) --- sys/dev/bxe/bxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index f66cf8239571..70f070389de9 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -17275,7 +17275,7 @@ bxe_init_hw_common(struct bxe_softc *sc) * stay set) * f. If this is VNIC 3 of a port then also init * first_timers_ilt_entry to zero and last_timers_ilt_entry - * to the last enrty in the ILT. + * to the last enrtry in the ILT. * * Notes: * Currently the PF error in the PGLC is non recoverable. From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 07:36:46 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E32FD6600F0; Thu, 19 Aug 2021 07:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqxRL62DSz3nFZ; Thu, 19 Aug 2021 07:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7BCF216E9; Thu, 19 Aug 2021 07:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17J7aknn028957; Thu, 19 Aug 2021 07:36:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17J7akvx028956; Thu, 19 Aug 2021 07:36:46 GMT (envelope-from git) Date: Thu, 19 Aug 2021 07:36:46 GMT Message-Id: <202108190736.17J7akvx028956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 535182ea0f95 - stable/12 - Fix a common typo in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 535182ea0f95b944f7e5d2337373b2a22ae3b2b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 07:36:47 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=535182ea0f95b944f7e5d2337373b2a22ae3b2b1 commit 535182ea0f95b944f7e5d2337373b2a22ae3b2b1 Author: Gordon Bergling AuthorDate: 2021-08-14 12:17:48 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 07:36:32 +0000 Fix a common typo in source code comments - s/aligment/alignment/ (cherry picked from commit a1581cd73594bbbde638859c31226c2c21be1ab3) --- lib/libc/gen/tls.c | 4 ++-- share/man/man9/rman.9 | 4 ++-- sys/arm/allwinner/if_emac.c | 2 +- sys/dev/sound/pci/hda/hdaa.c | 2 +- sys/dev/usb/controller/uhci.c | 2 +- sys/dev/usb/usb_busdma.c | 2 +- sys/i386/i386/locore.s | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index d1cab7a504e1..bb6f24774a7c 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -243,9 +243,9 @@ __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) * * where: * extra_size is tcbsize - TLS_TCB_SIZE - * post_size is used to adjust TCB to TLS aligment for first version of TLS + * post_size is used to adjust TCB to TLS alignment for first version of TLS * layout and is always 0 for second version. - * pre_size is used to adjust TCB aligment for first version and to adjust + * pre_size is used to adjust TCB alignment for first version and to adjust * TLS alignment for second version. * */ diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index 3e03c05f9088..9d954fdba22f 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -275,7 +275,7 @@ The caller can specify the and .Fa end of an acceptable range, -as well as a boundary restriction and required aligment, +as well as a boundary restriction and required alignment, and the code will attempt to find a free segment which fits. The .Fa start @@ -288,7 +288,7 @@ Therefore, must be \[<=] .Fa end for any allocation to happen. -The aligment requirement +The alignment requirement .Pq if any is specified in .Fa flags . diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 0b19783fb58b..bd6d0c752ded 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -408,7 +408,7 @@ emac_rxeof(struct emac_softc *sc, int count) m->m_len = m->m_pkthdr.len = len - ETHER_CRC_LEN; /* - * Emac controller needs strict aligment, so to avoid + * Emac controller needs strict alignment, so to avoid * copying over an entire frame to align, we allocate * a new mbuf and copy ethernet header + IP header to * the new mbuf. The new mbuf is prepended into the diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 5a926a125de5..91e9a65457d4 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2193,7 +2193,7 @@ hdaa_channel_getptr(kobj_t obj, void *data) hdaa_unlock(devinfo); /* - * Round to available space and force 128 bytes aligment. + * Round to available space and force 128 bytes alignment. */ ptr %= ch->blksz * ch->blkcnt; ptr &= HDA_BLK_ALIGN; diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index 16ffa7756878..709d413e3599 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -2934,7 +2934,7 @@ uhci_xfer_setup(struct usb_setup_params *parm) * We don't allow alignments of * less than 8 bytes: * - * NOTE: Allocating using an aligment + * NOTE: Allocating using an alignment * of 1 byte has special meaning! */ if (n < 3) { diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index f43926d04aac..b7f0464c1767 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -557,7 +557,7 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg, /* * XXX BUS-DMA workaround - FIXME later: * - * We assume that that the aligment at this point of + * We assume that that the alignment at this point of * the code is greater than or equal to the size and * less than two times the size, so that if we double * the size, the size will be greater than the diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 454f7f0a1010..035be23a0a7a 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -349,7 +349,7 @@ ENTRY(identify_cpu) testl %eax,%eax jnz try486 - /* NexGen CPU does not have aligment check flag. */ + /* NexGen CPU does not have alignment check flag. */ pushfl movl $0x5555, %eax xorl %edx, %edx From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:22:55 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 228E36636AC; Thu, 19 Aug 2021 11:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr2SH0PYmz4f60; Thu, 19 Aug 2021 11:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAA7124B8B; Thu, 19 Aug 2021 11:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JBMsGB037001; Thu, 19 Aug 2021 11:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JBMsMK037000; Thu, 19 Aug 2021 11:22:54 GMT (envelope-from git) Date: Thu, 19 Aug 2021 11:22:54 GMT Message-Id: <202108191122.17JBMsMK037000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bbba66e3b65f - stable/13 - pipe_paircreate(): do not leak pipepair memory on error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bbba66e3b65fa2db53aa2274ef1e797ab69229ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:22:55 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bbba66e3b65fa2db53aa2274ef1e797ab69229ce commit bbba66e3b65fa2db53aa2274ef1e797ab69229ce Author: Konstantin Belousov AuthorDate: 2021-08-16 09:24:49 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-19 11:21:56 +0000 pipe_paircreate(): do not leak pipepair memory on error (cherry picked from commit 81b895a95bdab28897bf948f5265fad1f51f8aa2) --- sys/kern/sys_pipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index ec0fb3860eda..b19fe8dbc0c0 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -391,6 +391,7 @@ fail: #ifdef MAC mac_pipe_destroy(pp); #endif + uma_zfree(pipe_zone, pp); return (error); } From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:22:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AB2C663372; Thu, 19 Aug 2021 11:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr2SJ1xzGz4f8Z; Thu, 19 Aug 2021 11:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 241FA24B8C; Thu, 19 Aug 2021 11:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JBMuA4037025; Thu, 19 Aug 2021 11:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JBMuqp037024; Thu, 19 Aug 2021 11:22:56 GMT (envelope-from git) Date: Thu, 19 Aug 2021 11:22:56 GMT Message-Id: <202108191122.17JBMuqp037024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f37afa877a5a - stable/13 - Style: wrap the long line, definition of ufs_checkpath() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f37afa877a5a718463eb1f4e9e8386d2bba72361 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:22:56 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f37afa877a5a718463eb1f4e9e8386d2bba72361 commit f37afa877a5a718463eb1f4e9e8386d2bba72361 Author: Konstantin Belousov AuthorDate: 2021-08-01 17:56:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-19 11:21:56 +0000 Style: wrap the long line, definition of ufs_checkpath() (cherry picked from commit 2e2212b4f55f307ed814cbe1ea633c32faea4a9c) --- sys/ufs/ufs/ufs_lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index b7bf4eb6c86c..ac3a8ee641a0 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1439,7 +1439,8 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino, * Check if source directory is in the path of the target directory. */ int -ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, struct ucred *cred, ino_t *wait_ino) +ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, + struct ucred *cred, ino_t *wait_ino) { struct mount *mp; struct vnode *tvp, *vp, *vp1; From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:22:57 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98642663B33; Thu, 19 Aug 2021 11:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr2SK3W3Hz4fKt; Thu, 19 Aug 2021 11:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5ACB2248D3; Thu, 19 Aug 2021 11:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JBMvwp037049; Thu, 19 Aug 2021 11:22:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JBMvUK037048; Thu, 19 Aug 2021 11:22:57 GMT (envelope-from git) Date: Thu, 19 Aug 2021 11:22:57 GMT Message-Id: <202108191122.17JBMvUK037048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b46bcc26809c - stable/13 - ufs rename: ensure that the result of ufs_checkpath() is stable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b46bcc26809c9e1e96c86656cbc63ba517b3fff9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:22:57 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b46bcc26809c9e1e96c86656cbc63ba517b3fff9 commit b46bcc26809c9e1e96c86656cbc63ba517b3fff9 Author: Konstantin Belousov AuthorDate: 2021-08-06 01:03:19 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-19 11:21:56 +0000 ufs rename: ensure that the result of ufs_checkpath() is stable (cherry picked from commit 8df4bc48c89a1302078282f22139a8368dc06971) --- sys/ufs/ffs/ffs_vfsops.c | 5 ++++- sys/ufs/ufs/ufs_lookup.c | 2 ++ sys/ufs/ufs/ufs_vnops.c | 12 ++++++++++-- sys/ufs/ufs/ufsmount.h | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 85c7929550fb..047c6f58a8a9 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1179,6 +1179,7 @@ ffs_mountfs(odevvp, mp, td) else ump->um_check_blkno = NULL; mtx_init(UFS_MTX(ump), "FFS", "FFS Lock", MTX_DEF); + sx_init(&ump->um_checkpath_lock, "uchpth"); ffs_oldfscompat_read(fs, ump, fs->fs_sblockloc); fs->fs_ronly = ronly; fs->fs_active = NULL; @@ -1349,8 +1350,9 @@ out: g_vfs_close(cp); g_topology_unlock(); } - if (ump) { + if (ump != NULL) { mtx_destroy(UFS_MTX(ump)); + sx_destroy(&ump->um_checkpath_lock); if (mp->mnt_gjprovider != NULL) { free(mp->mnt_gjprovider, M_UFSMNT); mp->mnt_gjprovider = NULL; @@ -1576,6 +1578,7 @@ ffs_unmount(mp, mntflags) vrele(ump->um_odevvp); dev_rel(ump->um_dev); mtx_destroy(UFS_MTX(ump)); + sx_destroy(&ump->um_checkpath_lock); if (mp->mnt_gjprovider != NULL) { free(mp->mnt_gjprovider, M_UFSMNT); mp->mnt_gjprovider = NULL; diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index ac3a8ee641a0..fc78c017e2c6 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1450,6 +1450,8 @@ ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, vp = tvp = ITOV(target); mp = vp->v_mount; *wait_ino = 0; + sx_assert(&VFSTOUFS(mp)->um_checkpath_lock, SA_XLOCKED); + if (target->i_number == source_ino) return (EEXIST); if (target->i_number == parent_ino) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 2dfc2e24f772..00ec8f41f432 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1249,9 +1249,9 @@ ufs_rename(ap) struct mount *mp; ino_t ino; seqc_t fdvp_s, fvp_s, tdvp_s, tvp_s; - bool want_seqc_end; + bool checkpath_locked, want_seqc_end; - want_seqc_end = false; + checkpath_locked = want_seqc_end = false; #ifdef INVARIANTS if ((tcnp->cn_flags & HASBUF) == 0 || @@ -1453,6 +1453,9 @@ relock: error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); if (error) goto unlockout; + + sx_xlock(&VFSTOUFS(mp)->um_checkpath_lock); + checkpath_locked = true; error = ufs_checkpath(ino, fdp->i_number, tdp, tcnp->cn_cred, &ino); /* @@ -1460,6 +1463,8 @@ relock: * everything else and VGET before restarting. */ if (ino) { + sx_xunlock(&VFSTOUFS(mp)->um_checkpath_lock); + checkpath_locked = false; VOP_UNLOCK(fdvp); VOP_UNLOCK(fvp); VOP_UNLOCK(tdvp); @@ -1690,6 +1695,9 @@ unlockout: vn_seqc_write_end(fdvp); } + if (checkpath_locked) + sx_xunlock(&VFSTOUFS(mp)->um_checkpath_lock); + vput(fdvp); vput(fvp); diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index e5f9c93da373..0b90cae95ff5 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -45,6 +45,9 @@ struct ufs_args { #ifdef _KERNEL +#include +#include +#include #include #ifdef MALLOC_DECLARE @@ -100,6 +103,8 @@ struct ufsmount { uint64_t um_maxsymlinklen; /* (c) max size of short symlink */ struct mtx um_lock; /* (c) Protects ufsmount & fs */ + struct sx um_checkpath_lock; /* (c) Protects ufs_checkpath() + result */ pid_t um_fsckpid; /* (u) PID can do fsck sysctl */ struct mount_softdeps *um_softdep; /* (c) softdep mgmt structure */ struct vnode *um_quotas[MAXQUOTAS]; /* (q) pointer to quota files */ From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:22:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B624663998; Thu, 19 Aug 2021 11:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr2SL4xsgz4fRc; Thu, 19 Aug 2021 11:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CD89249C7; Thu, 19 Aug 2021 11:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JBMwSX037073; Thu, 19 Aug 2021 11:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JBMwu7037072; Thu, 19 Aug 2021 11:22:58 GMT (envelope-from git) Date: Thu, 19 Aug 2021 11:22:58 GMT Message-Id: <202108191122.17JBMwu7037072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2c5f0480c211 - stable/13 - fstatat(2): handle non-vnode file descriptors for AT_EMPTY_PATH MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c5f0480c211ef1373a0e01aa4ce1b64d8e2e10e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:22:59 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2c5f0480c211ef1373a0e01aa4ce1b64d8e2e10e commit 2c5f0480c211ef1373a0e01aa4ce1b64d8e2e10e Author: Konstantin Belousov AuthorDate: 2021-08-13 17:40:10 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-19 11:21:57 +0000 fstatat(2): handle non-vnode file descriptors for AT_EMPTY_PATH (cherry picked from commit 9446d9e88fd7b203fa50c015f29b636db5b1d52b) --- sys/kern/vfs_lookup.c | 2 +- sys/kern/vfs_syscalls.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index e0b98c9f5661..a827c87538b8 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -489,6 +489,7 @@ namei_emptypath(struct nameidata *ndp) MPASS((cnp->cn_flags & EMPTYPATH) != 0); MPASS((cnp->cn_flags & (LOCKPARENT | WANTPARENT)) == 0); + ndp->ni_resflags |= NIRES_EMPTYPATH; error = namei_setup(ndp, &dp, &pwd); if (error != 0) { namei_cleanup_cnp(cnp); @@ -501,7 +502,6 @@ namei_emptypath(struct nameidata *ndp) ndp->ni_vp = dp; namei_cleanup_cnp(cnp); pwd_drop(pwd); - ndp->ni_resflags |= NIRES_EMPTYPATH; NDVALIDATE(ndp); if ((cnp->cn_flags & LOCKLEAF) != 0) { VOP_LOCK(dp, (cnp->cn_flags & LOCKSHARED) != 0 ? diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 855943adecef..8fae55c2862d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2426,8 +2426,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); - if ((error = namei(&nd)) != 0) + if ((error = namei(&nd)) != 0) { + if (error == ENOTDIR && + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) + error = kern_fstat(td, fd, sbp); return (error); + } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED, td); if (error == 0) { if (__predict_false(hook != NULL)) From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:22:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0C11663B3D; Thu, 19 Aug 2021 11:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr2SM4qX8z4fRd; Thu, 19 Aug 2021 11:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CCE12465C; Thu, 19 Aug 2021 11:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JBMxIt037097; Thu, 19 Aug 2021 11:22:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JBMxOx037096; Thu, 19 Aug 2021 11:22:59 GMT (envelope-from git) Date: Thu, 19 Aug 2021 11:22:59 GMT Message-Id: <202108191122.17JBMxOx037096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 21edf70b8c87 - stable/13 - Add test for fstatat(pipefd, AT_EMPTY_PATH) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 21edf70b8c879cfdac21f8ad43f23eb468b5e7de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:22:59 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=21edf70b8c879cfdac21f8ad43f23eb468b5e7de commit 21edf70b8c879cfdac21f8ad43f23eb468b5e7de Author: Konstantin Belousov AuthorDate: 2021-08-14 10:33:18 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-19 11:21:57 +0000 Add test for fstatat(pipefd, AT_EMPTY_PATH) (cherry picked from commit b42df9dafb8038169e23f9225f3f1588ded8d27e) --- tests/sys/file/path_test.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/sys/file/path_test.c b/tests/sys/file/path_test.c index e1f5240374c4..50a77f16736c 100644 --- a/tests/sys/file/path_test.c +++ b/tests/sys/file/path_test.c @@ -63,6 +63,25 @@ #define CHECKED_CLOSE(fd) \ ATF_REQUIRE_MSG(close(fd) == 0, FMT_ERR("close")) +/* + * Verify fstatat(AT_EMPTY_PATH) on non-regular dirfd. + * Verify that fstatat(AT_EMPTY_PATH) on NULL path returns EFAULT. + */ +ATF_TC_WITHOUT_HEAD(path_pipe_fstatat); +ATF_TC_BODY(path_pipe_fstatat, tc) +{ + struct stat sb; + int fd[2]; + + ATF_REQUIRE_MSG(pipe(fd) == 0, FMT_ERR("pipe")); + ATF_REQUIRE_MSG(fstatat(fd[0], "", &sb, AT_EMPTY_PATH) == 0, + FMT_ERR("fstatat pipe")); + ATF_REQUIRE_ERRNO(EFAULT, fstatat(fd[0], NULL, &sb, + AT_EMPTY_PATH) == -1); + CHECKED_CLOSE(fd[0]); + CHECKED_CLOSE(fd[1]); +} + /* Create a temporary regular file containing some data. */ static void mktfile(char path[PATH_MAX], const char *template) @@ -873,6 +892,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, path_lock); ATF_TP_ADD_TC(tp, path_rights); ATF_TP_ADD_TC(tp, path_unix); + ATF_TP_ADD_TC(tp, path_pipe_fstatat); return (atf_no_error()); } From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 11:59:18 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25B31663F7F for ; Thu, 19 Aug 2021 11:59:18 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr3GD5PlFz4gRM; Thu, 19 Aug 2021 11:59:16 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-48-130-181.area1b.commufa.jp [123.48.130.181]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 17JBxB0l010820; Thu, 19 Aug 2021 20:59:12 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Thu, 19 Aug 2021 20:59:11 +0900 From: Tomoaki AOKI To: dev-commits-src-branches@freebsd.org Cc: manu@FreeBSD.org, jkim@FreeBSD.org Subject: Re: git: e99783747e49 - stable/13 - pkgbase: Add an src.conf option for splitting man pages Message-Id: <20210819205911.06542f21114e499fe4ea7fa9@dec.sakura.ne.jp> In-Reply-To: <20210819084339.16eaf17eeac1f936a6c2ceee@dec.sakura.ne.jp> References: <20210819084339.16eaf17eeac1f936a6c2ceee@dec.sakura.ne.jp> Reply-To: junchoon@dec.sakura.ne.jp Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Gr3GD5PlFz4gRM X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of junchoon@dec.sakura.ne.jp has no SPF policy when checking 153.125.133.21) smtp.mailfrom=junchoon@dec.sakura.ne.jp X-Spamd-Result: default: False [-1.37 / 15.00]; HAS_REPLYTO(0.00)[junchoon@dec.sakura.ne.jp]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-0.77)[-0.767]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[123.48.130.181:received]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sakura.ne.jp]; AUTH_NA(1.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-branches] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 11:59:18 -0000 Confirmed fixed with git: 17fe7de111dd and c432a007529f. Thanks! On Thu, 19 Aug 2021 08:43:39 +0900 Tomoaki AOKI wrote: > This breaks at least x11/nvidia-driver build. > Additional MFC of git: 6827435548d2 [1] is needed. > > [1] > https://cgit.freebsd.org/src/commit/?id=6827435548d257c672f934db5c6ff01012d96995 > > > The branch stable/13 has been updated by manu: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=e99783747e49d0df4c9bccbc33907333e2d77a1e > > > > commit e99783747e49d0df4c9bccbc33907333e2d77a1e > > Author: Emmanuel Vadot > > AuthorDate: 2021-03-16 06:11:56 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2021-08-16 16:13:51 +0000 > > > > pkgbase: Add an src.conf option for splitting man pages > > > > Man pages can be big in total, add an options to split man pages > > in -man packages so we produce smaller packages. > > This is useful for small jails or mfsroot produced of pkgbase. > > The option is off by default. > > > > Reviewed by: bapt, Mina Gali$B".(B > > Differential Revision: https://reviews.freebsd.org/D29169 > > MFC after: 2 weeks > > > > (cherry picked from commit c7e6cb9e08d6b51e677a9f5546b8e36d678687d0) > > --- > > release/packages/generate-ucl.sh | 5 +++++ > > share/man/man5/src.conf.5 | 2 ++ > > share/mk/bsd.man.mk | 9 +++++++++ > > share/mk/src.opts.mk | 1 + > > tools/build/options/WITH_MANSPLITPKG | 2 ++ > > 5 files changed, 19 insertions(+) > > > > diff --git a/release/packages/generate-ucl.sh > > b/release/packages/generate-ucl.sh index e900f9991912..67c10e485eb7 > 100755 > > --- a/release/packages/generate-ucl.sh > > +++ b/release/packages/generate-ucl.sh > > @@ -71,6 +71,11 @@ main() { > > _descr="Debugging Symbols" > > pkgdeps="${outname}" > > ;; > > + *_man) > > + outname="${outname%%_man}" > > + _descr="Manual Pages" > > + pkgdeps="${outname}" > > + ;; > > ${origname}) > > pkgdeps="runtime" > > ;; > > diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 > > index a0c1b4bb8b8a..f118471c2770 100644 > > --- a/share/man/man5/src.conf.5 > > +++ b/share/man/man5/src.conf.5 > > @@ -1099,6 +1099,8 @@ is set explicitly) > > .It Va WITHOUT_MANCOMPRESS > > Set to not to install compressed man pages. > > Only the uncompressed versions will be installed. > > +.It Va WITH_MANSPLITPKG > > +Set to split man pages into their own packages during make package. > > .It Va WITHOUT_MAN_UTILS > > Set to not build utilities for manual pages, > > .Xr apropos 1 , > > diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk > > index 1e67928a2754..21c5fe4f2424 100644 > > --- a/share/mk/bsd.man.mk > > +++ b/share/mk/bsd.man.mk > > @@ -50,7 +50,11 @@ > > .error bsd.man.mk cannot be included directly. > > .endif > > > > +.if ${MK_MANSPLITPKG} == "no" > > MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m $ > {MANMODE} +.else > > +MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} > -g ${MANGRP} -m ${MANMODE} +.endif > > > > CATDIR= ${MANDIR:H:S/$/\/cat/} > > CATEXT= .cat > > @@ -226,8 +230,13 @@ maninstall: ${MAN} > > .endif # ${MK_MANCOMPRESS} == "no" > > .endif > > .for l t in ${_MANLINKS} > > +.if ${MK_MANSPLITPKG} == "no" > > rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ > > ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} $ > {DESTDIR}${t}${ZEXT} +.else > > + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ > > + ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}$ > {l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.endif > > .endfor > > > > manlint: > > diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk > > index 77c60aef0bc4..7d08b6a1da89 100644 > > --- a/share/mk/src.opts.mk > > +++ b/share/mk/src.opts.mk > > @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \ > > LOADER_FIREWIRE \ > > LOADER_VERBOSE \ > > LOADER_VERIEXEC_PASS_MANIFEST \ > > + MANSPLITPKG \ > > OFED_EXTRA \ > > OPENLDAP \ > > OPENSSL_KTLS \ > > diff --git a/tools/build/options/WITH_MANSPLITPKG > > b/tools/build/options/WITH_MANSPLITPKG new file mode 100644 > > index 000000000000..122da24e0bb4 > > --- /dev/null > > +++ b/tools/build/options/WITH_MANSPLITPKG > > @@ -0,0 +1,2 @@ > > +.\" $FreeBSD$ > > +Set to split man pages into their own packages during make package. > > -- > Tomoaki AOKI -- Tomoaki AOKI From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 12:32:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAAB7664C23; Thu, 19 Aug 2021 12:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr40T4WcXz4j8N; Thu, 19 Aug 2021 12:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F5D25A80; Thu, 19 Aug 2021 12:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JCWPVS029662; Thu, 19 Aug 2021 12:32:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JCWPQ6029661; Thu, 19 Aug 2021 12:32:25 GMT (envelope-from git) Date: Thu, 19 Aug 2021 12:32:25 GMT Message-Id: <202108191232.17JCWPQ6029661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: af89e052b9c2 - stable/13 - Fix a typo that was introduced while fixing a typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: af89e052b9c229dec8e365fe560fdc22432c66a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 12:32:25 -0000 The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=af89e052b9c229dec8e365fe560fdc22432c66a7 commit af89e052b9c229dec8e365fe560fdc22432c66a7 Author: Gordon Bergling AuthorDate: 2021-08-14 12:30:59 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 12:32:05 +0000 Fix a typo that was introduced while fixing a typo - s/enrtry/entry/ (cherry picked from commit 646f3a36c8df0e54e71332038ede594965daac6e) --- sys/dev/bxe/bxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 9145f11e5bf1..bf6904b26b55 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -17179,7 +17179,7 @@ bxe_init_hw_common(struct bxe_softc *sc) * stay set) * f. If this is VNIC 3 of a port then also init * first_timers_ilt_entry to zero and last_timers_ilt_entry - * to the last enrtry in the ILT. + * to the last entry in the ILT. * * Notes: * Currently the PF error in the PGLC is non recoverable. From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 12:33:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3933E664BA8; Thu, 19 Aug 2021 12:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr42D1970z4hy4; Thu, 19 Aug 2021 12:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10C6D257B1; Thu, 19 Aug 2021 12:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JCXt0l029915; Thu, 19 Aug 2021 12:33:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JCXtRK029914; Thu, 19 Aug 2021 12:33:55 GMT (envelope-from git) Date: Thu, 19 Aug 2021 12:33:55 GMT Message-Id: <202108191233.17JCXtRK029914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: a98dd5c1e792 - stable/12 - Fix a typo that was introduced while fixing a typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a98dd5c1e79240dfd82bdf04741e9a4c269a5bf8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 12:33:56 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a98dd5c1e79240dfd82bdf04741e9a4c269a5bf8 commit a98dd5c1e79240dfd82bdf04741e9a4c269a5bf8 Author: Gordon Bergling AuthorDate: 2021-08-14 12:30:59 +0000 Commit: Gordon Bergling CommitDate: 2021-08-19 12:33:33 +0000 Fix a typo that was introduced while fixing a typo - s/enrtry/entry/ (cherry picked from commit 646f3a36c8df0e54e71332038ede594965daac6e) --- sys/dev/bxe/bxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 70f070389de9..18082b779306 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -17275,7 +17275,7 @@ bxe_init_hw_common(struct bxe_softc *sc) * stay set) * f. If this is VNIC 3 of a port then also init * first_timers_ilt_entry to zero and last_timers_ilt_entry - * to the last enrtry in the ILT. + * to the last entry in the ILT. * * Notes: * Currently the PF error in the PGLC is non recoverable. From owner-dev-commits-src-branches@freebsd.org Thu Aug 19 13:06:59 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 995416650F1; Thu, 19 Aug 2021 13:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gr4mM3d65z4kcL; Thu, 19 Aug 2021 13:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63F7D2577E; Thu, 19 Aug 2021 13:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17JD6xU7070729; Thu, 19 Aug 2021 13:06:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17JD6xkR070728; Thu, 19 Aug 2021 13:06:59 GMT (envelope-from git) Date: Thu, 19 Aug 2021 13:06:59 GMT Message-Id: <202108191306.17JD6xkR070728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: 416194c9af84 - stable/13 - loader: cstyle cleanup of userboot/devicename.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 416194c9af849c6fb4026fea30dbd45e0c06a859 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2021 13:06:59 -0000 The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=416194c9af849c6fb4026fea30dbd45e0c06a859 commit 416194c9af849c6fb4026fea30dbd45e0c06a859 Author: Toomas Soome AuthorDate: 2021-08-11 07:07:28 +0000 Commit: Toomas Soome CommitDate: 2021-08-19 13:05:26 +0000 loader: cstyle cleanup of userboot/devicename.c No functional changes intended. (cherry picked from commit 5d5a6216645a6aefa8665c79bb761b754d74c067) --- stand/userboot/userboot/devicename.c | 260 ++++++++++++++++++----------------- 1 file changed, 132 insertions(+), 128 deletions(-) diff --git a/stand/userboot/userboot/devicename.c b/stand/userboot/userboot/devicename.c index 5c50b84384d2..8819af5ef127 100644 --- a/stand/userboot/userboot/devicename.c +++ b/stand/userboot/userboot/devicename.c @@ -38,9 +38,10 @@ __FBSDID("$FreeBSD$"); #include "libzfs.h" #endif -static int userboot_parsedev(struct disk_devdesc **dev, const char *devspec, const char **path); +static int userboot_parsedev(struct disk_devdesc **dev, const char *devspec, + const char **path); -/* +/* * Point (dev) at an allocated device specifier for the device matching the * path in (devspec). If it contains an explicit device specification, * use that. If not, use the default device. @@ -48,27 +49,27 @@ static int userboot_parsedev(struct disk_devdesc **dev, const char *devspec, con int userboot_getdev(void **vdev, const char *devspec, const char **path) { - struct disk_devdesc **dev = (struct disk_devdesc **)vdev; - int rv; - - /* - * If it looks like this is just a path and no - * device, go with the current device. - */ - if ((devspec == NULL) || - (devspec[0] == '/') || - (strchr(devspec, ':') == NULL)) { - - if (((rv = userboot_parsedev(dev, getenv("currdev"), NULL)) == 0) && - (path != NULL)) - *path = devspec; - return(rv); - } - - /* - * Try to parse the device name off the beginning of the devspec - */ - return(userboot_parsedev(dev, devspec, path)); + struct disk_devdesc **dev = (struct disk_devdesc **)vdev; + int rv; + + /* + * If it looks like this is just a path and no + * device, go with the current device. + */ + if ((devspec == NULL) || + (devspec[0] == '/') || + (strchr(devspec, ':') == NULL)) { + + rv = userboot_parsedev(dev, getenv("currdev"), NULL); + if (rv == 0 && path != NULL) + *path = devspec; + return (rv); + } + + /* + * Try to parse the device name off the beginning of the devspec + */ + return (userboot_parsedev(dev, devspec, path)); } /* @@ -83,126 +84,129 @@ userboot_getdev(void **vdev, const char *devspec, const char **path) * For disk-type devices, the syntax is: * * disk[s][]: - * + * */ static int -userboot_parsedev(struct disk_devdesc **dev, const char *devspec, const char **path) +userboot_parsedev(struct disk_devdesc **dev, const char *devspec, + const char **path) { - struct disk_devdesc *idev; - struct devsw *dv; - int i, unit, err; - const char *cp; - const char *np; - - /* minimum length check */ - if (strlen(devspec) < 2) - return(EINVAL); - - /* look for a device that matches */ - for (i = 0, dv = NULL; devsw[i] != NULL; i++) { - if (!strncmp(devspec, devsw[i]->dv_name, strlen(devsw[i]->dv_name))) { - dv = devsw[i]; - break; - } - } - if (dv == NULL) - return(ENOENT); - idev = malloc(sizeof(struct disk_devdesc)); - err = 0; - np = (devspec + strlen(dv->dv_name)); - - switch(dv->dv_type) { - case DEVT_NONE: /* XXX what to do here? Do we care? */ - break; - - case DEVT_DISK: - err = disk_parsedev(idev, np, path); - if (err != 0) - goto fail; - break; - - case DEVT_CD: - case DEVT_NET: - unit = 0; - - if (*np && (*np != ':')) { - unit = strtol(np, (char **)&cp, 0); /* get unit number if present */ - if (cp == np) { - err = EUNIT; - goto fail; - } - } else { - cp = np; - } - if (*cp && (*cp != ':')) { - err = EINVAL; - goto fail; + struct disk_devdesc *idev; + struct devsw *dv; + int i, unit, err; + const char *cp; + const char *np; + + /* minimum length check */ + if (strlen(devspec) < 2) + return (EINVAL); + + /* look for a device that matches */ + for (i = 0, dv = NULL; devsw[i] != NULL; i++) { + if (strncmp(devspec, devsw[i]->dv_name, + strlen(devsw[i]->dv_name)) == 0) { + dv = devsw[i]; + break; + } } - - idev->dd.d_unit = unit; - if (path != NULL) - *path = (*cp == 0) ? cp : cp + 1; - break; - - case DEVT_ZFS: + if (dv == NULL) + return (ENOENT); + idev = malloc(sizeof(struct disk_devdesc)); + err = 0; + np = (devspec + strlen(dv->dv_name)); + + switch (dv->dv_type) { + case DEVT_NONE: /* XXX what to do here? Do we care? */ + break; + + case DEVT_DISK: + err = disk_parsedev(idev, np, path); + if (err != 0) + goto fail; + break; + + case DEVT_CD: + case DEVT_NET: + unit = 0; + + if (*np && (*np != ':')) { + /* get unit number if present */ + unit = strtol(np, (char **)&cp, 0); + if (cp == np) { + err = EUNIT; + goto fail; + } + } else { + cp = np; + } + if (*cp && (*cp != ':')) { + err = EINVAL; + goto fail; + } + + idev->dd.d_unit = unit; + if (path != NULL) + *path = (*cp == 0) ? cp : cp + 1; + break; + + case DEVT_ZFS: #if defined(USERBOOT_ZFS_SUPPORT) - err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); - if (err != 0) - goto fail; - break; + err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); + if (err != 0) + goto fail; + break; #else - /* FALLTHROUGH */ + /* FALLTHROUGH */ #endif - default: - err = EINVAL; - goto fail; - } - idev->dd.d_dev = dv; - if (dev == NULL) { + default: + err = EINVAL; + goto fail; + } + idev->dd.d_dev = dv; + if (dev == NULL) { + free(idev); + } else { + *dev = idev; + } + return (0); + +fail: free(idev); - } else { - *dev = idev; - } - return(0); - - fail: - free(idev); - return(err); + return (err); } char * userboot_fmtdev(void *vdev) { - struct devdesc *dev = (struct devdesc *)vdev; - static char buf[128]; /* XXX device length constant? */ + struct devdesc *dev = (struct devdesc *)vdev; + static char buf[128]; /* XXX device length constant? */ - switch(dev->d_dev->dv_type) { - case DEVT_NONE: - strcpy(buf, "(no device)"); - break; + switch(dev->d_dev->dv_type) { + case DEVT_NONE: + strcpy(buf, "(no device)"); + break; - case DEVT_CD: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); - break; + case DEVT_CD: + sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + break; - case DEVT_DISK: - return (disk_fmtdev(vdev)); + case DEVT_DISK: + return (disk_fmtdev(vdev)); - case DEVT_NET: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); - break; + case DEVT_NET: + sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + break; - case DEVT_ZFS: + case DEVT_ZFS: #if defined(USERBOOT_ZFS_SUPPORT) - return (zfs_fmtdev(vdev)); + return (zfs_fmtdev(vdev)); #else - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); #endif - break; - } - return(buf); + break; + } + return (buf); } @@ -212,12 +216,12 @@ userboot_fmtdev(void *vdev) int userboot_setcurrdev(struct env_var *ev, int flags, const void *value) { - struct disk_devdesc *ncurr; - int rv; - - if ((rv = userboot_parsedev(&ncurr, value, NULL)) != 0) - return(rv); - free(ncurr); - env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); - return(0); + struct disk_devdesc *ncurr; + int rv; + + if ((rv = userboot_parsedev(&ncurr, value, NULL)) != 0) + return (rv); + free(ncurr); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + return (0); } From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 09:32:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5F6265D0EE; Fri, 20 Aug 2021 09:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrbyS67Drz57g7; Fri, 20 Aug 2021 09:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA92B16752; Fri, 20 Aug 2021 09:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17K9WWRu010285; Fri, 20 Aug 2021 09:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17K9WWai010284; Fri, 20 Aug 2021 09:32:32 GMT (envelope-from git) Date: Fri, 20 Aug 2021 09:32:32 GMT Message-Id: <202108200932.17K9WWai010284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a90bcfbadd88 - stable/13 - rtld: style nits MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a90bcfbadd88c0f6b6935b75c1a7821d9bd5883f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 09:32:33 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a90bcfbadd88c0f6b6935b75c1a7821d9bd5883f commit a90bcfbadd88c0f6b6935b75c1a7821d9bd5883f Author: Mariusz Zaborski AuthorDate: 2021-03-24 21:05:39 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-20 09:31:46 +0000 rtld: style nits (cherry picked from commit 852a88a1d92500028f1364a4afc58955190db7a5) --- libexec/rtld-elf/rtld.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 42abd8391386..ccf6c76773ba 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2485,30 +2485,31 @@ load_needed_objects(Obj_Entry *first, int flags) static int load_preload_objects(void) { - char *p = ld_preload; - Obj_Entry *obj; - static const char delim[] = " \t:;"; - - if (p == NULL) - return 0; + char *p = ld_preload; + Obj_Entry *obj; + static const char delim[] = " \t:;"; - p += strspn(p, delim); - while (*p != '\0') { - size_t len = strcspn(p, delim); - char savech; + if (p == NULL) + return (0); - savech = p[len]; - p[len] = '\0'; - obj = load_object(p, -1, NULL, 0); - if (obj == NULL) - return -1; /* XXX - cleanup */ - obj->z_interpose = true; - p[len] = savech; - p += len; p += strspn(p, delim); - } - LD_UTRACE(UTRACE_PRELOAD_FINISHED, NULL, NULL, 0, 0, NULL); - return 0; + while (*p != '\0') { + size_t len = strcspn(p, delim); + char savech; + + savech = p[len]; + p[len] = '\0'; + obj = load_object(p, -1, NULL, 0); + if (obj == NULL) + return (-1); /* XXX - cleanup */ + obj->z_interpose = true; + p[len] = savech; + p += len; + p += strspn(p, delim); + } + LD_UTRACE(UTRACE_PRELOAD_FINISHED, NULL, NULL, 0, 0, NULL); + + return (0); } static const char * From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 09:32:34 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 116CB65CBF3; Fri, 20 Aug 2021 09:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrbyT6tkyz57rG; Fri, 20 Aug 2021 09:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5EDF16B9D; Fri, 20 Aug 2021 09:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17K9WXLW010309; Fri, 20 Aug 2021 09:32:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17K9WXM7010308; Fri, 20 Aug 2021 09:32:33 GMT (envelope-from git) Date: Fri, 20 Aug 2021 09:32:33 GMT Message-Id: <202108200932.17K9WXM7010308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7b845dc144e4 - stable/13 - rtld: introduce PRELOAD_FDS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b845dc144e47c629f78dcede957f497bcc71536 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 09:32:34 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7b845dc144e47c629f78dcede957f497bcc71536 commit 7b845dc144e47c629f78dcede957f497bcc71536 Author: Mariusz Zaborski AuthorDate: 2021-03-24 21:10:33 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-20 09:31:46 +0000 rtld: introduce PRELOAD_FDS (cherry picked from commit f90218886fc82e7b1fdb9e241adc5d713dadabe3) --- libexec/rtld-elf/rtld.1 | 10 ++- libexec/rtld-elf/rtld.c | 33 +++++++-- libexec/rtld-elf/tests/Makefile | 7 ++ libexec/rtld-elf/tests/common.c | 81 +++++++++++++++++++++ libexec/rtld-elf/tests/common.h | 43 +++++++++++ libexec/rtld-elf/tests/ld_library_pathfds.c | 56 +-------------- libexec/rtld-elf/tests/ld_preload_fds.c | 108 ++++++++++++++++++++++++++++ 7 files changed, 277 insertions(+), 61 deletions(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 41b010a2376c..118671624446 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 2021 +.Dd March 24, 2021 .Dt RTLD 1 .Os .Sh NAME @@ -190,6 +190,14 @@ to be linked in before any other shared libraries. If the directory is not specified then the directories specified by +.It Ev LD_PRELOAD_PATH_FDS +A colon separated list of file descriptor numbers for libraries. +This is intended for preloading libraries in which we already have a file +descriptor. +This may optimize the process of loading libraries because we do not have to +look for them in directories. +It may also be useful in a capability base system where we do not have access to +global namespaces such as the filesystem. .Ev LD_LIBRARY_PATH will be searched first followed by the set of built-in standard directories. diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index ccf6c76773ba..f60872f12c52 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -123,7 +123,7 @@ static void linkmap_delete(Obj_Entry *); static void load_filtees(Obj_Entry *, int flags, RtldLockState *); static void unload_filtees(Obj_Entry *, RtldLockState *); static int load_needed_objects(Obj_Entry *, int); -static int load_preload_objects(void); +static int load_preload_objects(char *, bool); static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); static int obj_disable_relro(Obj_Entry *); @@ -213,6 +213,8 @@ static char *ld_library_path; /* Environment variable for search path */ static char *ld_library_dirs; /* Environment variable for library descriptors */ static char *ld_preload; /* Environment variable for libraries to load first */ +static char *ld_preload_fds; /* Environment variable for libraries represented by + descriptors */ static const char *ld_elf_hints_path; /* Environment variable for alternative hints path */ static const char *ld_tracing; /* Called from ldd to print libs */ static char *ld_utrace; /* Use utrace() to log events. */ @@ -569,7 +571,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) ld_bind_now = getenv(_LD("BIND_NOW")); - /* + /* * If the process is tainted, then we un-set the dangerous environment * variables. The process will be marked as tainted until setuid(2) * is called. If any child process calls setuid(2) we do not want any @@ -580,7 +582,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) unsetenv(_LD("LIBRARY_PATH")) || unsetenv(_LD("LIBRARY_PATH_FDS")) || unsetenv(_LD("LIBMAP_DISABLE")) || unsetenv(_LD("BIND_NOT")) || unsetenv(_LD("DEBUG")) || unsetenv(_LD("ELF_HINTS_PATH")) || - unsetenv(_LD("LOADFLTR")) || unsetenv(_LD("LIBRARY_PATH_RPATH"))) { + unsetenv(_LD("LOADFLTR")) || unsetenv(_LD("LIBRARY_PATH_RPATH")) || + unsetenv(_LD("PRELOAD_FDS"))) { _rtld_error("environment corrupt; aborting"); rtld_die(); } @@ -593,6 +596,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) ld_library_path = getenv(_LD("LIBRARY_PATH")); ld_library_dirs = getenv(_LD("LIBRARY_PATH_FDS")); ld_preload = getenv(_LD("PRELOAD")); + ld_preload_fds = getenv(_LD("PRELOAD_FDS")); ld_elf_hints_path = getenv(_LD("ELF_HINTS_PATH")); ld_loadfltr = getenv(_LD("LOADFLTR")) != NULL; library_path_rpath = getenv(_LD("LIBRARY_PATH_RPATH")); @@ -707,8 +711,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) if (!libmap_disable) libmap_disable = (bool)lm_init(libmap_override); + dbg("loading LD_PRELOAD_FDS libraries"); + if (load_preload_objects(ld_preload_fds, true) == -1) + rtld_die(); + dbg("loading LD_PRELOAD libraries"); - if (load_preload_objects() == -1) + if (load_preload_objects(ld_preload, false) == -1) rtld_die(); preload_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q)); @@ -2483,9 +2491,8 @@ load_needed_objects(Obj_Entry *first, int flags) } static int -load_preload_objects(void) +load_preload_objects(char *p, bool isfd) { - char *p = ld_preload; Obj_Entry *obj; static const char delim[] = " \t:;"; @@ -2494,12 +2501,24 @@ load_preload_objects(void) p += strspn(p, delim); while (*p != '\0') { + const char *name; size_t len = strcspn(p, delim); char savech; + int fd; savech = p[len]; p[len] = '\0'; - obj = load_object(p, -1, NULL, 0); + if (isfd) { + name = NULL; + fd = parse_integer(p); + if (fd == -1) + return (-1); + } else { + name = p; + fd = -1; + } + + obj = load_object(name, fd, NULL, 0); if (obj == NULL) return (-1); /* XXX - cleanup */ obj->z_interpose = true; diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile index 4ab69c1ab0ab..6b8b4e80333b 100644 --- a/libexec/rtld-elf/tests/Makefile +++ b/libexec/rtld-elf/tests/Makefile @@ -3,7 +3,14 @@ SUBDIR+= libpythagoras target SUBDIR_DEPEND_target= libpythagoras + ATF_TESTS_C= ld_library_pathfds +ATF_TESTS_C+= ld_preload_fds + +.for t in ${ATF_TESTS_C} +SRCS.$t= $t.c common.c +.endfor + WARNS?= 3 .include diff --git a/libexec/rtld-elf/tests/common.c b/libexec/rtld-elf/tests/common.c new file mode 100644 index 000000000000..6eb3edfbc14c --- /dev/null +++ b/libexec/rtld-elf/tests/common.c @@ -0,0 +1,81 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * Copyright 2014 Jonathan Anderson. + * Copyright 2021 Mariusz Zaborski + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include + +#include "common.h" + +void +expect_success(int binary, char *senv) +{ + char * const env[] = { senv, NULL }; + + try_to_run(binary, 0, env, "the hypotenuse of 3 and 4 is 5\n", ""); +} + +void +expect_missing_library(int binary, char *senv) +{ + char * const env[] = { senv, NULL }; + + try_to_run(binary, 1, env, "", + "ld-elf.so.1: Shared object \"libpythagoras.so.0\" not found," + " required by \"target\"\n"); +} + +void +try_to_run(int binary, int exit_status, char * const *env, + const char *expected_out, const char *expected_err) +{ + pid_t child = atf_utils_fork(); + + if (child == 0) { + char * const args[] = { "target", NULL }; + + fexecve(binary, args, env); + atf_tc_fail("fexecve() failed"); + } + + atf_utils_wait(child, exit_status, expected_out, expected_err); +} + +int +opendir(const char *name) +{ + + return open(name, O_RDONLY | O_DIRECTORY); +} + +int +opendirat(int parent, const char *name) +{ + + return openat(parent, name, O_RDONLY | O_DIRECTORY); +} diff --git a/libexec/rtld-elf/tests/common.h b/libexec/rtld-elf/tests/common.h new file mode 100644 index 000000000000..d5bf2050dcfd --- /dev/null +++ b/libexec/rtld-elf/tests/common.h @@ -0,0 +1,43 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * Copyright 2014 Jonathan Anderson. + * Copyright 2021 Mariusz Zaborski + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LD_COMMON_H_ +#define _LD_COMMON_H_ + +#define TARGET_ELF_NAME "target" +#define TARGET_LIBRARY "libpythagoras.so.0" + +void expect_success(int binary, char *senv); +void expect_missing_library(int binary, char *senv); + +void try_to_run(int binary, int expected_exit_status, char * const *env, + const char *expected_out, const char *expected_err); +int opendir(const char *name); +int opendirat(int parent, const char *name); + +#endif /* _LD_COMMON_H_ */ diff --git a/libexec/rtld-elf/tests/ld_library_pathfds.c b/libexec/rtld-elf/tests/ld_library_pathfds.c index 5c6c2dabbcdb..bc0627d4c3d5 100644 --- a/libexec/rtld-elf/tests/ld_library_pathfds.c +++ b/libexec/rtld-elf/tests/ld_library_pathfds.c @@ -29,6 +29,7 @@ #include #include +#include "common.h" struct descriptors { int binary; @@ -38,14 +39,8 @@ struct descriptors { int usr; }; -static void setup(struct descriptors *, const atf_tc_t *); -static void expect_success(int binary, char *pathfds); -static void expect_missing_library(int binary, char *pathfds); -static void try_to_run(int binary, int expected_exit_status, - char * const *env, const char *expected_out, const char *expected_err); -static int opendir(const char *name); -static int opendirat(int parent, const char *name); +static void setup(struct descriptors *, const atf_tc_t *); ATF_TC_WITHOUT_HEAD(missing_library); @@ -167,55 +162,10 @@ setup(struct descriptors *dp, const atf_tc_t *tc) dp->testdir = opendir(atf_tc_get_config_var(tc, "srcdir")); ATF_REQUIRE(dp->testdir >= 0); ATF_REQUIRE( - (dp->binary = openat(dp->testdir, "target", O_RDONLY)) >= 0); + (dp->binary = openat(dp->testdir, TARGET_ELF_NAME, O_RDONLY)) >= 0); ATF_REQUIRE((dp->root = opendir("/")) >= 0); ATF_REQUIRE((dp->etc = opendirat(dp->root, "etc")) >= 0); ATF_REQUIRE((dp->usr = opendirat(dp->root, "usr")) >= 0); } -static void -expect_success(int binary, char *pathfds) -{ - char * const env[] = { pathfds, NULL }; - try_to_run(binary, 0, env, "the hypotenuse of 3 and 4 is 5\n", ""); -} - -static void -expect_missing_library(int binary, char *pathfds) -{ - char * const env[] = { pathfds, NULL }; - try_to_run(binary, 1, env, "", - "ld-elf.so.1: Shared object \"libpythagoras.so.0\" not found," - " required by \"target\"\n"); -} - - -static void -try_to_run(int binary, int exit_status, char * const *env, - const char *expected_out, const char *expected_err) -{ - pid_t child = atf_utils_fork(); - - if (child == 0) { - char * const args[] = { "target", NULL }; - - fexecve(binary, args, env); - atf_tc_fail("fexecve() failed"); - } - - atf_utils_wait(child, exit_status, expected_out, expected_err); -} - - -static int -opendir(const char *name) -{ - return open(name, O_RDONLY | O_DIRECTORY); -} - -static int -opendirat(int parent, const char *name) -{ - return openat(parent, name, O_RDONLY | O_DIRECTORY); -} diff --git a/libexec/rtld-elf/tests/ld_preload_fds.c b/libexec/rtld-elf/tests/ld_preload_fds.c new file mode 100644 index 000000000000..3a220b009bb6 --- /dev/null +++ b/libexec/rtld-elf/tests/ld_preload_fds.c @@ -0,0 +1,108 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * Copyright 2021 Mariusz Zaborski + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include + +#include "common.h" + +int binaryfd; +int libraryfd; + +static void +setup(const atf_tc_t *tc) +{ + int testdir; + + testdir = opendir(atf_tc_get_config_var(tc, "srcdir")); + ATF_REQUIRE(testdir >= 0); + + binaryfd = openat(testdir, TARGET_ELF_NAME, O_RDONLY); + ATF_REQUIRE(binaryfd >= 0); + libraryfd = openat(testdir, TARGET_LIBRARY, O_RDONLY); + ATF_REQUIRE(libraryfd >= 0); + + close(testdir); +} + +ATF_TC_WITHOUT_HEAD(missing_library); +ATF_TC_BODY(missing_library, tc) +{ + + setup(tc); + expect_missing_library(binaryfd, NULL); +} + +ATF_TC_WITHOUT_HEAD(bad_librarys); +ATF_TC_BODY(bad_librarys, tc) +{ + char *senv; + + ATF_REQUIRE(asprintf(&senv, "LD_PRELOAD_FDS=::") > 0); + + setup(tc); + expect_missing_library(binaryfd, senv); +} + +ATF_TC_WITHOUT_HEAD(single_library); +ATF_TC_BODY(single_library, tc) +{ + char *senv; + + setup(tc); + + ATF_REQUIRE( + asprintf(&senv, "LD_PRELOAD_FDS=%d", libraryfd) > 0); + + expect_success(binaryfd, senv); +} + +ATF_TC_WITHOUT_HEAD(two_librarys); +ATF_TC_BODY(two_librarys, tc) +{ + char *senv; + + setup(tc); + + ATF_REQUIRE( + asprintf(&senv, "LD_PRELOAD_FDS=%d:%d", libraryfd, libraryfd) > 0); + + expect_success(binaryfd, senv); +} + +/* Register test cases with ATF. */ +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, missing_library); + ATF_TP_ADD_TC(tp, bad_librarys); + ATF_TP_ADD_TC(tp, single_library); + ATF_TP_ADD_TC(tp, two_librarys); + + return atf_no_error(); +} From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 09:32:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3DA865CD55; Fri, 20 Aug 2021 09:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrbyW0k8Bz57tT; Fri, 20 Aug 2021 09:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0177616B9E; Fri, 20 Aug 2021 09:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17K9WYgH010340; Fri, 20 Aug 2021 09:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17K9WYYl010339; Fri, 20 Aug 2021 09:32:34 GMT (envelope-from git) Date: Fri, 20 Aug 2021 09:32:34 GMT Message-Id: <202108200932.17K9WYYl010339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 98ef339d4498 - stable/13 - rtld: fix the man page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98ef339d44989db316e196e37ebc90e9a9d6f8de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 09:32:35 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=98ef339d44989db316e196e37ebc90e9a9d6f8de commit 98ef339d44989db316e196e37ebc90e9a9d6f8de Author: Mariusz Zaborski AuthorDate: 2021-03-24 23:49:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-20 09:31:46 +0000 rtld: fix the man page (cherry picked from commit e086aff91c242a2decdf7dd1ceb5a0b3e723a53f) --- libexec/rtld-elf/rtld.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 118671624446..b6572caac811 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -190,7 +190,7 @@ to be linked in before any other shared libraries. If the directory is not specified then the directories specified by -.It Ev LD_PRELOAD_PATH_FDS +.It Ev LD_PRELOAD_FDS A colon separated list of file descriptor numbers for libraries. This is intended for preloading libraries in which we already have a file descriptor. From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 09:32:36 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6038D65D018; Fri, 20 Aug 2021 09:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrbyX1v2Jz57tX; Fri, 20 Aug 2021 09:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2597116866; Fri, 20 Aug 2021 09:32:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17K9WaAw010364; Fri, 20 Aug 2021 09:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17K9WarF010363; Fri, 20 Aug 2021 09:32:36 GMT (envelope-from git) Date: Fri, 20 Aug 2021 09:32:36 GMT Message-Id: <202108200932.17K9WarF010363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 02e46073bd8a - stable/13 - rtld: Round down relro_size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 02e46073bd8a98a8c3adc96b1885b5e47ebb3d4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 09:32:36 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=02e46073bd8a98a8c3adc96b1885b5e47ebb3d4f commit 02e46073bd8a98a8c3adc96b1885b5e47ebb3d4f Author: Konstantin Belousov AuthorDate: 2021-08-12 02:45:15 +0000 Commit: Konstantin Belousov CommitDate: 2021-08-20 09:31:46 +0000 rtld: Round down relro_size (cherry picked from commit c9f833abf1d76ea194b82caafa06a0627790ad97) --- libexec/rtld-elf/map_object.c | 3 ++- libexec/rtld-elf/rtld.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 273e477fbda5..b725fe93b8f6 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -325,7 +325,8 @@ map_object(int fd, const char *path, const struct stat *sb) } obj->stack_flags = stack_flags; obj->relro_page = obj->relocbase + trunc_page(relro_page); - obj->relro_size = round_page(relro_size); + obj->relro_size = trunc_page(relro_page + relro_size) - + trunc_page(relro_page); if (note_start < note_end) digest_notes(obj, note_start, note_end); if (note_map != NULL) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index f60872f12c52..eaad89339d07 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1557,7 +1557,8 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t entry, const char *path) case PT_GNU_RELRO: obj->relro_page = obj->relocbase + trunc_page(ph->p_vaddr); - obj->relro_size = round_page(ph->p_memsz); + obj->relro_size = trunc_page(ph->p_vaddr + ph->p_memsz) - + trunc_page(ph->p_vaddr); break; case PT_NOTE: From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 12:42:53 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 062676602A6; Fri, 20 Aug 2021 12:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrhB46Qnpz3lJ2; Fri, 20 Aug 2021 12:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C50F719174; Fri, 20 Aug 2021 12:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KCgqr8063903; Fri, 20 Aug 2021 12:42:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KCgq2R063902; Fri, 20 Aug 2021 12:42:52 GMT (envelope-from git) Date: Fri, 20 Aug 2021 12:42:52 GMT Message-Id: <202108201242.17KCgq2R063902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8ad5619ec3b8 - stable/13 - ng_bridge: Use M_NOWAIT when allocating memory in the newhook routine MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ad5619ec3b848844cb278582e9a4a32ed0f863d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 12:42:53 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ad5619ec3b848844cb278582e9a4a32ed0f863d commit 8ad5619ec3b848844cb278582e9a4a32ed0f863d Author: Mark Johnston AuthorDate: 2021-08-13 13:49:43 +0000 Commit: Mark Johnston CommitDate: 2021-08-20 12:42:43 +0000 ng_bridge: Use M_NOWAIT when allocating memory in the newhook routine newhook can be invoked by ngthread, which runs in a network epoch section and is thus not permitted to perform M_WAITOK allocations. Reported by: Jenkins Reviewed by: donner, afedorov Sponsored by: The FreeBSD Foundation (cherry picked from commit e0e3ded78a5d0859f3520c541726b815897ba7b0) --- sys/netgraph/ng_bridge.c | 84 ++++++++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index 3f3d8b3c406e..9bcc7aac271b 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -154,6 +154,7 @@ static ng_rcvdata_t ng_bridge_rcvdata; static ng_disconnect_t ng_bridge_disconnect; /* Other internal functions */ +static void ng_bridge_free_link(link_p link); static struct ng_bridge_host *ng_bridge_get(priv_cp priv, const u_char *addr); static int ng_bridge_put(priv_p priv, const u_char *addr, link_p link); static void ng_bridge_rehash(priv_p priv); @@ -395,28 +396,36 @@ ng_bridge_newhook(node_p node, hook_p hook, const char *name) if(NG_PEER_NODE(hook) == node) return (ELOOP); - link = malloc(sizeof(*link), M_NETGRAPH_BRIDGE, M_WAITOK | M_ZERO); - - link->stats.recvOctets = counter_u64_alloc(M_WAITOK); - link->stats.recvPackets = counter_u64_alloc(M_WAITOK); - link->stats.recvMulticasts = counter_u64_alloc(M_WAITOK); - link->stats.recvBroadcasts = counter_u64_alloc(M_WAITOK); - link->stats.recvUnknown = counter_u64_alloc(M_WAITOK); - link->stats.recvRunts = counter_u64_alloc(M_WAITOK); - link->stats.recvInvalid = counter_u64_alloc(M_WAITOK); - link->stats.xmitOctets = counter_u64_alloc(M_WAITOK); - link->stats.xmitPackets = counter_u64_alloc(M_WAITOK); - link->stats.xmitMulticasts = counter_u64_alloc(M_WAITOK); - link->stats.xmitBroadcasts = counter_u64_alloc(M_WAITOK); - link->stats.loopDrops = counter_u64_alloc(M_WAITOK); - link->stats.memoryFailures = counter_u64_alloc(M_WAITOK); + link = malloc(sizeof(*link), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO); + if (link == NULL) + return (ENOMEM); + +#define NG_BRIDGE_COUNTER_ALLOC(f) do { \ + link->stats.f = counter_u64_alloc(M_NOWAIT); \ + if (link->stats.f == NULL) \ + goto nomem; \ +} while (0) + NG_BRIDGE_COUNTER_ALLOC(recvOctets); + NG_BRIDGE_COUNTER_ALLOC(recvPackets); + NG_BRIDGE_COUNTER_ALLOC(recvMulticasts); + NG_BRIDGE_COUNTER_ALLOC(recvBroadcasts); + NG_BRIDGE_COUNTER_ALLOC(recvUnknown); + NG_BRIDGE_COUNTER_ALLOC(recvRunts); + NG_BRIDGE_COUNTER_ALLOC(recvInvalid); + NG_BRIDGE_COUNTER_ALLOC(xmitOctets); + NG_BRIDGE_COUNTER_ALLOC(xmitPackets); + NG_BRIDGE_COUNTER_ALLOC(xmitMulticasts); + NG_BRIDGE_COUNTER_ALLOC(xmitBroadcasts); + NG_BRIDGE_COUNTER_ALLOC(loopDrops); + NG_BRIDGE_COUNTER_ALLOC(memoryFailures); +#undef NG_BRIDGE_COUNTER_ALLOC link->hook = hook; if (isUplink) { link->learnMac = 0; link->sendUnknown = 1; if (priv->numLinks == 0) /* if the first link is an uplink */ - priv->sendUnknown = 0; /* switch to restrictive mode */ + priv->sendUnknown = 0; /* switch to restrictive mode */ } else { link->learnMac = 1; link->sendUnknown = priv->sendUnknown; @@ -425,12 +434,17 @@ ng_bridge_newhook(node_p node, hook_p hook, const char *name) NG_HOOK_SET_PRIVATE(hook, link); priv->numLinks++; return (0); + +nomem: + ng_bridge_free_link(link); + return (ENOMEM); } /* * Receive a control message */ -static void ng_bridge_clear_link_stats(struct ng_bridge_link_kernel_stats * p) +static void +ng_bridge_clear_link_stats(struct ng_bridge_link_kernel_stats *p) { counter_u64_zero(p->recvOctets); counter_u64_zero(p->recvPackets); @@ -446,7 +460,26 @@ static void ng_bridge_clear_link_stats(struct ng_bridge_link_kernel_stats * p) counter_u64_zero(p->loopDrops); p->loopDetects = 0; counter_u64_zero(p->memoryFailures); -}; +} + +static void +ng_bridge_free_link(link_p link) +{ + counter_u64_free(link->stats.recvOctets); + counter_u64_free(link->stats.recvPackets); + counter_u64_free(link->stats.recvMulticasts); + counter_u64_free(link->stats.recvBroadcasts); + counter_u64_free(link->stats.recvUnknown); + counter_u64_free(link->stats.recvRunts); + counter_u64_free(link->stats.recvInvalid); + counter_u64_free(link->stats.xmitOctets); + counter_u64_free(link->stats.xmitPackets); + counter_u64_free(link->stats.xmitMulticasts); + counter_u64_free(link->stats.xmitBroadcasts); + counter_u64_free(link->stats.loopDrops); + counter_u64_free(link->stats.memoryFailures); + free(link, M_NETGRAPH_BRIDGE); +} static int ng_bridge_reset_link(hook_p hook, void *arg __unused) @@ -984,20 +1017,7 @@ ng_bridge_disconnect(hook_p hook) ng_bridge_remove_hosts(priv, link); /* Free associated link information */ - counter_u64_free(link->stats.recvOctets); - counter_u64_free(link->stats.recvPackets); - counter_u64_free(link->stats.recvMulticasts); - counter_u64_free(link->stats.recvBroadcasts); - counter_u64_free(link->stats.recvUnknown); - counter_u64_free(link->stats.recvRunts); - counter_u64_free(link->stats.recvInvalid); - counter_u64_free(link->stats.xmitOctets); - counter_u64_free(link->stats.xmitPackets); - counter_u64_free(link->stats.xmitMulticasts); - counter_u64_free(link->stats.xmitBroadcasts); - counter_u64_free(link->stats.loopDrops); - counter_u64_free(link->stats.memoryFailures); - free(link, M_NETGRAPH_BRIDGE); + ng_bridge_free_link(link); priv->numLinks--; /* If no more hooks, go away */ From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 15:25:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9978766238F; Fri, 20 Aug 2021 15:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrlnX3k7bz4WyG; Fri, 20 Aug 2021 15:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67B831AEFC; Fri, 20 Aug 2021 15:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KFPKQf081544; Fri, 20 Aug 2021 15:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KFPKws081543; Fri, 20 Aug 2021 15:25:20 GMT (envelope-from git) Date: Fri, 20 Aug 2021 15:25:20 GMT Message-Id: <202108201525.17KFPKws081543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 13f32ff71eeb - stable/13 - wpa: Restructure wpa build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 13f32ff71eeb7213bb9f34bdfa88c7ccecf451bc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 15:25:20 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=13f32ff71eeb7213bb9f34bdfa88c7ccecf451bc commit 13f32ff71eeb7213bb9f34bdfa88c7ccecf451bc Author: Cy Schubert AuthorDate: 2021-05-20 21:28:17 +0000 Commit: Cy Schubert CommitDate: 2021-08-20 15:24:54 +0000 wpa: Restructure wpa build The current WPA build assumes a flat namespace. However the latest sources from w1.fi now have a duplicate config.c, in two separate subdirectories. The flat namespace will overwrite config.o with the output from the most recently modified config.c, of which there are two of them. This commit resolves this problem by building each component in wpa's src subdirectory tree into its own .a archive, just as the w1.fi upstream build as used by the port does. The advantages of this approach are: 1. Duplicate source file names, i.e. config.c in the wpa_supplicant direcory and another config.c in src/utils in the next wpa will result in both compiles writing to the same .o file. 2. This restructure simplifies maintanence. A develper needs only to add new files as identified by git status in the vendor branch to the appropriate Makefile within the usr.sbin/wpa tree. This also reduces time required to prepare a new import and should reduce error. 3. The new wpa build structure more closely represents the build as performed by the upstream tarball. This is in preparation for the next wpa update from w1.fi. Reviewed by: philip Tested by: philip Differential Revision: https://reviews.freebsd.org/D30372 (cherry picked from commit 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3) --- share/mk/src.libnames.mk | 62 +++++++++++++- usr.sbin/wpa/Makefile | 10 ++- usr.sbin/wpa/Makefile.crypto | 104 ------------------------ usr.sbin/wpa/Makefile.inc | 92 +++++++++++++++++---- usr.sbin/wpa/hostapd/Makefile | 153 ++--------------------------------- usr.sbin/wpa/hostapd_cli/Makefile | 10 +-- usr.sbin/wpa/src/Makefile | 19 +++++ usr.sbin/wpa/src/ap/Makefile | 59 ++++++++++++++ usr.sbin/wpa/src/common/Makefile | 27 +++++++ usr.sbin/wpa/src/crypto/Makefile | 63 +++++++++++++++ usr.sbin/wpa/src/drivers/Makefile | 21 +++++ usr.sbin/wpa/src/eap_common/Makefile | 25 ++++++ usr.sbin/wpa/src/eap_peer/Makefile | 33 ++++++++ usr.sbin/wpa/src/eap_server/Makefile | 34 ++++++++ usr.sbin/wpa/src/eapol_auth/Makefile | 18 +++++ usr.sbin/wpa/src/eapol_supp/Makefile | 19 +++++ usr.sbin/wpa/src/l2_packet/Makefile | 19 +++++ usr.sbin/wpa/src/radius/Makefile | 24 ++++++ usr.sbin/wpa/src/rsn_supp/Makefile | 26 ++++++ usr.sbin/wpa/src/tls/Makefile | 38 +++++++++ usr.sbin/wpa/src/utils/Makefile | 32 ++++++++ usr.sbin/wpa/src/wps/Makefile | 39 +++++++++ usr.sbin/wpa/wpa_cli/Makefile | 33 ++++---- usr.sbin/wpa/wpa_passphrase/Makefile | 7 +- usr.sbin/wpa/wpa_priv/Makefile | 9 +-- usr.sbin/wpa/wpa_supplicant/Makefile | 93 ++++++--------------- 26 files changed, 700 insertions(+), 369 deletions(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 93ae9caf1a2d..c4d7ad8e2fcc 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -58,7 +58,22 @@ _INTERNALLIBS= \ smdb \ smutil \ telnet \ - vers + vers \ + wpaap \ + wpacommon \ + wpacrypto \ + wpadrivers \ + wpaeap_common \ + wpaeap_peer \ + wpaeap_server \ + wpaeapol_auth \ + wpaeapol_supp \ + wpal2_packet \ + wparadius \ + wparsn_supp \ + wpatls \ + wpautils \ + wpawps _LIBRARIES= \ ${_PRIVATELIBS} \ @@ -560,6 +575,51 @@ LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a LIBPMCSTATDIR= ${_LIB_OBJTOP}/lib/libpmcstat LIBPMCSTAT?= ${LIBPMCSTATDIR}/libpmcstat${PIE_SUFFIX}.a +LIBWPAAPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/ap +LIBWPAAP?= ${LIBWPAAPDIR}/libwpaap${PIE_SUFFIX}.a + +LIBWPACOMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/common +LIBWPACOMMON?= ${LIBWPACOMMONDIR}/libwpacommon${PIE_SUFFIX}.a + +LIBWPACRYPTODIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/crypto +LIBWPACRYPTO?= ${LIBWPACRYPTODIR}/libwpacrypto${PIE_SUFFIX}.a + +LIBWPADRIVERSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/drivers +LIBWPADRIVERS?= ${LIBWPADRIVERSDIR}/libwpadrivers${PIE_SUFFIX}.a + +LIBWPAEAP_COMMONDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_common +LIBWPAEAP_COMMON?= ${LIBWPAEAP_COMMONDIR}/libwpaeap_common${PIE_SUFFIX}.a + +LIBWPAEAP_PEERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_peer +LIBWPAEAP_PEER?= ${LIBWPAEAP_PEERDIR}/libwpaeap_peer${PIE_SUFFIX}.a + +LIBWPAEAP_SERVERDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eap_server +LIBWPAEAP_SERVER?= ${LIBWPAEAP_SERVERDIR}/libwpaeap_server${PIE_SUFFIX}.a + +LIBWPAEAPOL_AUTHDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_auth +LIBWPAEAPOL_AUTH?= ${LIBWPAEAPOL_AUTHDIR}/libwpaeapol_auth${PIE_SUFFIX}.a + +LIBWPAEAPOL_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/eapol_supp +LIBWPAEAPOL_SUPP?= ${LIBWPAEAPOL_SUPPDIR}/libwpaeapol_supp${PIE_SUFFIX}.a + +LIBWPAL2_PACKETDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/l2_packet +LIBWPAL2_PACKET?= ${LIBWPAL2_PACKETDIR}/libwpal2_packet${PIE_SUFFIX}.a + +LIBWPARADIUSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/radius +LIBWPARADIUS?= ${LIBWPARADIUSDIR}/libwparadius${PIE_SUFFIX}.a + +LIBWPARSN_SUPPDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/rsn_supp +LIBWPARSN_SUPP?= ${LIBWPARSN_SUPPDIR}/libwparsn_supp${PIE_SUFFIX}.a + +LIBWPATLSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/tls +LIBWPATLS?= ${LIBWPATLSDIR}/libwpatls${PIE_SUFFIX}.a + +LIBWPAUTILSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/utils +LIBWPAUTILS?= ${LIBWPAUTILSDIR}/libwpautils${PIE_SUFFIX}.a + +LIBWPAWPSDIR= ${_LIB_OBJTOP}/usr.sbin/wpa/src/wps +LIBWPAWPS?= ${LIBWPAWPSDIR}/libwpawps${PIE_SUFFIX}.a + LIBC_NOSSP_PICDIR= ${_LIB_OBJTOP}/lib/libc LIBC_NOSSP_PIC?= ${LIBC_NOSSP_PICDIR}/libc_nossp_pic.a diff --git a/usr.sbin/wpa/Makefile b/usr.sbin/wpa/Makefile index ae07ec04f001..fe8fb60b1dc2 100644 --- a/usr.sbin/wpa/Makefile +++ b/usr.sbin/wpa/Makefile @@ -1,8 +1,12 @@ # $FreeBSD$ -SUBDIR= wpa_supplicant wpa_cli wpa_passphrase -SUBDIR+= hostapd hostapd_cli -SUBDIR+= ndis_events +SUBDIR= src .WAIT \ + wpa_supplicant \ + wpa_cli \ + wpa_passphrase \ + hostapd \ + hostapd_cli \ + SUBDIR_PARALLEL= .include diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto index bed452bf8592..a7ddb917ac6d 100644 --- a/usr.sbin/wpa/Makefile.crypto +++ b/usr.sbin/wpa/Makefile.crypto @@ -1,13 +1,10 @@ # $FreeBSD$ .if ${MK_OPENSSL} != "no" -SRCS+= crypto_openssl.c random.c sha1-prf.c sha256-prf.c sha256-tlsprf.c \ - sha512.c LIBADD+= ssl crypto CFLAGS+= -DCONFIG_SHA256 .else CFLAGS+=-DCONFIG_CRYPTO_INTERNAL -SRCS+= crypto_internal.c random.c CONFIG_INTERNAL_AES=y CONFIG_INTERNAL_DES=y CONFIG_INTERNAL_MD4=y @@ -33,129 +30,28 @@ NEED_TLS_PRF=y .if defined(CONFIG_INTERNAL_TLS) CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ -DCONFIG_TLS_INTERNAL_CLIENT -SRCS+= asn1.c \ - bignum.c \ - crypto_internal-cipher.c \ - crypto_internal-modexp.c \ - crypto_internal-rsa.c \ - pkcs1.c \ - pkcs5.c \ - pkcs8.c \ - rsa.c \ - tls_internal.c \ - tlsv1_common.c \ - tlsv1_record.c \ - tlsv1_cred.c \ - tlsv1_client.c \ - tlsv1_client_write.c \ - tlsv1_client_read.c \ - tlsv1_client_ocsp.c \ - x509v3.c NEED_DES=y NEED_MD4=y NEED_RC4=y .else CFLAGS+=-DEAP_TLS_OPENSSL -SRCS+= tls_openssl.c tls_openssl_ocsp.c .endif .endif -.if defined(CONFIG_INTERNAL_AES) -SRCS+= aes-unwrap.c aes-wrap.c \ - aes-internal.c \ - aes-internal-dec.c \ - aes-internal-enc.c -.endif - -.if defined(NEED_AES_CBC) -SRCS+= aes-cbc.c -.endif - .if defined(NEED_AES_EAX) -SRCS+= aes-eax.c NEED_AES_CTR=y .endif -.if defined(NEED_AES_CTR) -SRCS+= aes-ctr.c -.endif - -.if defined(NEED_AES_ENCBLOCK) -SRCS+= aes-encblock.c -.endif - -.if defined(NEED_AES_OMAC1) -SRCS+= aes-omac1.c -.endif - -.if defined(NEED_DES) -.if defined(CONFIG_INTERNAL_DES) -SRCS+= des-internal.c -.endif -.endif - -.if defined(NEED_MD4) -.if defined(CONFIG_INTERNAL_MD4) -SRCS+= md4-internal.c -.endif -.endif - -.if defined(CONFIG_INTERNAL_MD5) -SRCS+= md5.c md5-internal.c -.endif - -.if defined(NEED_FIPS186_2_PRF) -.if defined(CONFIG_INTERNAL_SHA1) -SRCS+= fips_prf_internal.c -.else -SRCS+= fips_prf_openssl.c -.endif -.endif - -.if defined(CONFIG_INTERNAL_RC4) -SRCS+= rc4.c -.endif - -.if defined(CONFIG_INTERNAL_SHA1) -SRCS+= sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c -.endif - .if defined(NEED_SHA256) CFLAGS+=-DCONFIG_SHA256 -SRCS+= sha256.c -.if defined(CONFIG_INTERNAL_SHA256) -SRCS+= sha256-internal.c sha256-prf.c -.endif .endif .if defined(NEED_SHA384) CFLAGS+=-DCONFIG_SHA384 -SRCS+= sha384.c -.if defined(CONFIG_INTERNAL_SHA384) -SRCS+= sha384-internal.c sha384-prf.c -.endif .endif .if defined(NEED_SHA512) CFLAGS+=-DCONFIG_SHA512 -SRCS+= sha512.c -.if defined(CONFIG_INTERNAL_SHA512) -SRCS+= sha512-internal.c sha512-prf.c -.endif -.endif - -.if defined(NEED_TLS_PRF) -SRCS+= sha1-tlsprf.c -.endif - -.if defined(CONFIG_INTERNAL_DH5) -.if defined(NEED_DH_GROUPS) -SRCS+= dh_group5.c -.endif -.endif - -.if defined(NEED_DH_GROUPS) -SRCS+= dh_groups.c .endif .if defined(NEED_DH_GROUPS_ALL) diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index 0a69ca08166b..87a1d6c23bbc 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + BINDIR?= /usr/sbin WARNS?= 0 @@ -8,18 +10,7 @@ WPA_DISTDIR?= ${SRCTOP}/contrib/wpa/ WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/wpa_supplicant HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd -.PATH.c:${.CURDIR:H} \ - ${WPA_DISTDIR}/src/common \ - ${WPA_DISTDIR}/src/crypto \ - ${WPA_DISTDIR}/src/eapol_auth \ - ${WPA_DISTDIR}/src/eap_common \ - ${WPA_DISTDIR}/src/eapol_supp \ - ${WPA_DISTDIR}/src/l2_packet \ - ${WPA_DISTDIR}/src/radius \ - ${WPA_DISTDIR}/src/rsn_supp \ - ${WPA_DISTDIR}/src/tls \ - ${WPA_DISTDIR}/src/utils \ - ${WPA_DISTDIR}/src/wps +.PATH.c:${.CURDIR:H} CFLAGS+=-I${.CURDIR} CFLAGS+=-I${HOSTAPD_DISTDIR} @@ -31,9 +22,78 @@ CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet CFLAGS+=-I${WPA_DISTDIR}/src/utils CFLAGS+=-I${WPA_DISTDIR}/src/wps -CFLAGS+= -DCONFIG_CTRL_IFACE -CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX -CFLAGS+= -DNEED_AP_MLME -CFLAGS+= -DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\" +CFLAGS+=-DCONFIG_DRIVER_BSD +CFLAGS+=-DCONFIG_DRIVER_WIRED +CFLAGS+=-DCONFIG_DRIVER_RADIUS_ACL +CFLAGS+=-DCONFIG_CTRL_IFACE +CFLAGS+=-DCONFIG_CTRL_IFACE_UNIX +CFLAGS+=-DCONFIG_IEEE80211AC +CFLAGS+=-DCONFIG_IEEE80211N +CFLAGS+=-DCONFIG_IEEE80211R +CFLAGS+=-DCONFIG_IEEE80211W +CFLAGS+=-DCONFIG_IEEE80211AX +CFLAGS+=-DNEED_AP_MLME +CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\" +CFLAGS+=-DCONFIG_DEBUG_SYSLOG +CFLAGS+=-DCONFIG_WPS +CFLAGS+=-DCONFIG_WPS2 +CFLAGS+=-DCONFIG_WPS_UPNP +CFLAGS+=-DCONFIG_WPS_OOB +CFLAGS+=-DCONFIG_INTERWORKING +CFLAGS+=-DPKCS12_FUNCS +CFLAGS+=-DCONFIG_GAS +CFLAGS+=-DCONFIG_PEERKEY +CFLAGS+=-DCONFIG_PRIVSEP +CFLAGS+=-DCONFIG_SMARTCARD +CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF +CFLAGS+=-DCONFIG_TLS=openssl +CFLAGS+=-DCONFIG_MATCH_IFACE +CFLAGS+=-DEAP_SERVER +CFLAGS+=-DEAP_SERVER_GTC +CFLAGS+=-DEAP_SERVER_IDENTITY +CFLAGS+=-DEAP_SERVER_MD5 +CFLAGS+=-DEAP_SERVER_MSCHAPV2 +CFLAGS+=-DEAP_SERVER_PEAP +CFLAGS+=-DEAP_SERVER_TLS +CFLAGS+=-DEAP_SERVER_TTLS +CFLAGS+=-DEAP_SERVER_WSC +CFLAGS+=-DEAP_TLS_FUNCS + +.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" +CFLAGS+=-DCONFIG_HS20 \ + -DEAP_GTC \ + -DEAP_LEAP \ + -DEAP_MD5 \ + -DEAP_MSCHAPv2 \ + -DEAP_OTP \ + -DEAP_PEAP \ + -DEAP_PSK \ + -DEAP_TLS \ + -DEAP_TTLS \ + -DEAP_WSC \ + -DIEEE8021X_EAPOL +NEED_AES_EAX=y +NEED_AES_ENCBLOCK=y +NEED_AES_OMAC1=y +.endif + +.if !empty(CFLAGS:M*-DEAP_AKA) +NEED_SIM_COMMON=y +NEED_AES_CBC=y +.endif + +.if !empty(CFLAGS:M*-DEAP_SIM) +NEED_SIM_COMMON=y +NEED_AES_CBC=y +.endif + +.if defined(NEED_SIM_COMMON) +NEED_FIPS186_2_PRF=y +.endif + +.if !empty(CFLAGS:M*-DEAP_GPSK) +CFLAGS+=-DEAP_GPSK_SHA256 +NEED_AES_OMAC1=y +.endif .include diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index 579694046989..6e026babae1a 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -3,96 +3,14 @@ .include .include "../Makefile.inc" -.PATH.c:${HOSTAPD_DISTDIR} \ - ${WPA_DISTDIR}/src/ap \ - ${WPA_DISTDIR}/src/eap_server \ - ${WPA_DISTDIR}/src/eap_peer \ - ${WPA_DISTDIR}/src/drivers \ - ${WPA_DISTDIR}/wpa_supplicant +.PATH.c:${HOSTAPD_DISTDIR} PACKAGE= hostapd PROG= hostapd -SRCS= accounting.c \ - ap_config.c \ - ap_drv_ops.c \ - ap_list.c \ - ap_mlme.c \ - authsrv.c \ - base64.c \ - beacon.c \ - bss_load.c \ - chap.c \ - common.c \ - config_file.c \ +SRCS= config_file.c \ ctrl_iface.c \ - ctrl_iface_ap.c \ - ctrl_iface_common.c \ - dfs.c \ - driver_bsd.c \ - driver_common.c \ - drivers.c \ - drv_callbacks.c \ - eloop.c \ - gas.c \ - gas_serv.c \ - http_client.c \ - http_server.c \ - httpread.c \ - hostapd.c \ - hs20.c \ - hw_features.c \ - hw_features_common.c \ - ieee802_11.c \ - ieee802_11_auth.c \ - ieee802_11_common.c \ - ieee802_11_he.c \ - ieee802_11_ht.c \ - ieee802_11_shared.c \ - ieee802_11_vht.c \ - ieee802_1x.c \ - ip_addr.c \ - l2_packet_freebsd.c \ - main.c \ - mbo_ap.c \ - ms_funcs.c \ - neighbor_db.c \ - os_unix.c \ - pmksa_cache_auth.c \ - preauth_auth.c \ - radius.c \ - radius_client.c \ - radius_das.c \ - rrm.c \ - sta_info.c \ - tkip_countermeasures.c \ - upnp_xml.c \ - utils.c \ - uuid.c \ - vlan.c \ - vlan_ifconfig.c \ - vlan_init.c \ - wmm.c \ - wpa_auth.c \ - wpa_auth_glue.c \ - wpa_auth_ie.c \ - wpa_common.c \ - wpa_ctrl.c \ - wpa_debug.c \ - wpabuf.c \ - wps.c \ - wps_attr_build.c \ - wps_attr_process.c \ - wps_attr_parse.c \ - wps_common.c \ - wps_dev_attr.c \ - wps_enrollee.c \ - wps_hostapd.c \ - wps_registrar.c \ - wps_upnp.c \ - wps_upnp_ap.c \ - wps_upnp_event.c \ - wps_upnp_ssdp.c \ - wps_upnp_web.c + eap_register.c \ + main.c MAN= hostapd.8 hostapd.conf.5 @@ -104,26 +22,17 @@ FILES= hostapd.conf hostapd.eap_user hostapd.wpa_psk CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \ -I${WPA_DISTDIR}/src/eap_peer \ - -DCONFIG_DRIVER_BSD \ - -DCONFIG_DRIVER_RADIUS_ACL \ - -DCONFIG_HS20 \ -DCONFIG_MBO \ - -DCONFIG_IEEE80211N \ - -DCONFIG_IEEE80211W \ - -DCONFIG_IEEE80211AC \ - -DCONFIG_IEEE80211AX \ - -DCONFIG_INTERWORKING \ - -DCONFIG_PEERKEY \ -DCONFIG_RSN_PREAUTH \ - -DCONFIG_WPS \ - -DCONFIG_WPS2 \ - -DCONFIG_WPS_UPNP \ -DHOSTAPD .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif #CFLAGS+= -g -LIBADD+= pcap util +LIBADD+= pcap util wpaap wpacommon wpacrypto \ + wpadrivers wpal2_packet wpaeap_common wpaeap_server \ + wpaeapol_auth \ + wparadius wpatls wpautils wpawps # User customizations for wpa_supplicant/hostapd build environment CFLAGS+=${HOSTAPD_CFLAGS} @@ -131,36 +40,6 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -CFLAGS+=-DDPKCS12_FUNCS \ - -DEAP_SERVER \ - -DEAP_SERVER_GTC \ - -DEAP_SERVER_IDENTITY \ - -DEAP_SERVER_MD5 \ - -DEAP_SERVER_MSCHAPV2 \ - -DEAP_SERVER_PEAP \ - -DEAP_SERVER_TLS \ - -DEAP_SERVER_TTLS \ - -DEAP_SERVER_WSC \ - -DEAP_TLS_FUNCS - -SRCS+= eap_server_gtc.c \ - eap_common.c \ - eap_peap_common.c \ - eap_register.c \ - eap_server.c \ - eap_server_identity.c \ - eap_server_md5.c \ - eap_server_methods.c \ - eap_server_mschapv2.c \ - eap_server_peap.c \ - eap_server_tls.c \ - eap_server_tls_common.c \ - eap_server_ttls.c \ - eap_server_wsc.c \ - eap_user_db.c \ - eap_wsc_common.c \ - eapol_auth_dump.c \ - eapol_auth_sm.c TLS_FUNCS=y # For WPS, EAP modes, etc @@ -172,38 +51,22 @@ NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_AKA) -SRCS+= eap_server_aka.c NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_SIM) -SRCS+= eap_server_sim.c NEED_SIM_COMMON=y .endif .if defined(NEED_SIM_COMMON) -SRCS+= eap_sim_common.c \ - eap_sim_db.c NEED_FIPS186_2_PRF=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 -SRCS+= eap_server_gpsk.c \ - eap_gpsk_common.c NEED_AES_OMAC1=y .endif -.if !empty(CFLAGS:M*-DEAP_SERVER_PAX) -SRCS+= eap_server_pax.c \ - eap_pax_common.c -.endif - -.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE) -SRCS+= eap_server_sake.c \ - eap_sake_common.c -.endif - .include "../Makefile.crypto" .include diff --git a/usr.sbin/wpa/hostapd_cli/Makefile b/usr.sbin/wpa/hostapd_cli/Makefile index eda50e222d2e..276e25058298 100644 --- a/usr.sbin/wpa/hostapd_cli/Makefile +++ b/usr.sbin/wpa/hostapd_cli/Makefile @@ -6,14 +6,12 @@ PACKAGE= hostapd PROG= hostapd_cli -SRCS= cli.c common.c edit.c eloop.c hostapd_cli.c os_unix.c \ - wpa_ctrl.c wpa_debug.c +SRCS= hostapd_cli.c -CFLAGS+= -DCONFIG_CTRL_IFACE -CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX - -LIBADD+= util +LIBADD+= util wpacommon wpautils MAN= hostapd_cli.8 +.include "../Makefile.crypto" + .include diff --git a/usr.sbin/wpa/src/Makefile b/usr.sbin/wpa/src/Makefile new file mode 100644 index 000000000000..f21856ad23a2 --- /dev/null +++ b/usr.sbin/wpa/src/Makefile @@ -0,0 +1,19 @@ +SUBDIR= ap \ + common \ + crypto \ + drivers \ + eap_common \ + eap_peer \ + eap_server \ + eapol_auth \ + eapol_supp \ + l2_packet \ + radius \ + rsn_supp \ + tls \ + utils \ + wps + +SUBDIR_PARALLEL= + +.include diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile new file mode 100644 index 000000000000..edb2f1e9d089 --- /dev/null +++ b/usr.sbin/wpa/src/ap/Makefile @@ -0,0 +1,59 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpaap +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/ap + +SRCS= accounting.c \ + ap_config.c \ + ap_drv_ops.c \ + ap_list.c \ + ap_mlme.c \ + authsrv.c \ + beacon.c \ + bss_load.c \ + ctrl_iface_ap.c \ + dfs.c \ + drv_callbacks.c \ + eap_user_db.c \ + gas_serv.c \ + hostapd.c \ + hs20.c \ + hw_features.c \ + ieee802_11.c \ + ieee802_11_auth.c \ + ieee802_11_he.c \ + ieee802_11_ht.c \ + ieee802_11_shared.c \ + ieee802_11_vht.c \ + ieee802_1x.c \ + mbo_ap.c \ + neighbor_db.c \ + pmksa_cache_auth.c \ + preauth_auth.c \ + rrm.c \ + sta_info.c \ + tkip_countermeasures.c \ + utils.c \ + vlan.c \ + vlan_ifconfig.c \ + vlan_init.c \ + wmm.c \ + wpa_auth.c \ + wpa_auth_glue.c \ + wpa_auth_ie.c \ + wps_hostapd.c + +CFLAGS+=-DCONFIG_MBO \ + -DCONFIG_RSN_PREAUTH \ + -DHOSTAPD + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/common/Makefile b/usr.sbin/wpa/src/common/Makefile new file mode 100644 index 000000000000..28c16ff9d31a --- /dev/null +++ b/usr.sbin/wpa/src/common/Makefile @@ -0,0 +1,27 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpacommon +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/common + +SRCS= cli.c \ + ctrl_iface_common.c \ + gas.c \ + hw_features_common.c \ + ieee802_11_common.c \ + wpa_common.c \ + wpa_ctrl.c + +CFLAGS+=-DCONFIG_SAE \ + -DCONFIG_SUITE \ + -DCONFIG_SUITEB + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile new file mode 100644 index 000000000000..d7e1304dc95e --- /dev/null +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -0,0 +1,63 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpacrypto +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/crypto + +SRCS= aes-cbc.c \ + aes-ctr.c \ + aes-eax.c \ + aes-encblock.c \ + aes-internal.c \ + aes-internal-dec.c \ + aes-internal-enc.c \ + aes-omac1.c \ + aes-unwrap.c \ + aes-wrap.c \ + crypto_internal.c \ + crypto_internal-cipher.c \ + crypto_internal-modexp.c \ + crypto_internal-rsa.c \ + des-internal.c \ + dh_group5.c \ + dh_groups.c \ + fips_prf_internal.c \ + md4-internal.c \ + md5.c \ + md5-internal.c \ + ms_funcs.c \ + random.c \ + rc4.c \ + sha1.c \ + sha1-internal.c \ + sha1-pbkdf2.c \ + sha1-prf.c \ + sha1-tlsprf.c \ + sha256.c \ + sha256-prf.c \ + sha256-tlsprf.c \ + sha256-internal.c \ + sha384.c \ + sha384-prf.c \ + sha384-internal.c \ + sha512-internal.c \ + tls_internal.c + +CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ + -DCONFIG_TLS_INTERNAL_CLIENT \ + -DCONFIG_TLS_INTERNAL_SERVER \ + -DCONFIG_SHA256 \ + -DCONFIG_SHA384 \ + -DCONFIG_HMAC_SHA384_KDF \ + -DCONFIG_INTERNAL_SHA384 +#CFLAGS+=-DALL_DH_GROUPS + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/drivers/Makefile b/usr.sbin/wpa/src/drivers/Makefile new file mode 100644 index 000000000000..1800b651885f --- /dev/null +++ b/usr.sbin/wpa/src/drivers/Makefile @@ -0,0 +1,21 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpadrivers +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/drivers + +SRCS= drivers.c \ + driver_bsd.c \ + driver_common.c \ + driver_wired.c \ + driver_wired_common.c + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/eap_common/Makefile b/usr.sbin/wpa/src/eap_common/Makefile new file mode 100644 index 000000000000..4da89b221b36 --- /dev/null +++ b/usr.sbin/wpa/src/eap_common/Makefile @@ -0,0 +1,25 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpaeap_common +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/eap_common + +SRCS= chap.c \ + eap_common.c \ + eap_gpsk_common.c \ + eap_pax_common.c \ + eap_peap_common.c \ + eap_psk_common.c \ + eap_sake_common.c \ + eap_sim_common.c \ + eap_wsc_common.c + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/eap_peer/Makefile b/usr.sbin/wpa/src/eap_peer/Makefile new file mode 100644 index 000000000000..524c7cf6c6f1 --- /dev/null +++ b/usr.sbin/wpa/src/eap_peer/Makefile @@ -0,0 +1,33 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpaeap_peer +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/eap_peer + +SRCS= eap.c \ + eap_gtc.c \ + eap_leap.c \ + eap_md5.c \ + eap_methods.c \ + eap_mschapv2.c \ + eap_otp.c \ + eap_peap.c \ + eap_psk.c \ + eap_tls.c \ + eap_tls_common.c \ + eap_ttls.c \ + eap_wsc.c \ + eap_methods.c \ + mschapv2.c + +CFLAGS+=-DIEEE8021X_EAPOL + +.include "../../Makefile.crypto" + +# We are only interested in includes at this point. Not libraries. +LIBADD= + +.include diff --git a/usr.sbin/wpa/src/eap_server/Makefile b/usr.sbin/wpa/src/eap_server/Makefile new file mode 100644 index 000000000000..c5a4566bb444 --- /dev/null +++ b/usr.sbin/wpa/src/eap_server/Makefile @@ -0,0 +1,34 @@ +.include + +.include "../../Makefile.inc" + +LIB= wpaeap_server +INTERNALLIB= + +.PATH: ${WPA_DISTDIR}/src/eap_server + +SRCS= eap_server.c \ + eap_server_aka.c \ + eap_server_gpsk.c \ + eap_server_gtc.c \ + eap_server_identity.c \ + eap_server_md5.c \ + eap_server_methods.c \ + eap_server_mschapv2.c \ + eap_server_pax.c \ + eap_server_peap.c \ + eap_server_pwd.c \ + eap_server_sake.c \ + eap_server_sim.c \ + eap_server_tls.c \ + eap_server_tls_common.c \ *** 506 LINES SKIPPED *** From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 15:25:22 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC6F1661CF0; Fri, 20 Aug 2021 15:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrlnZ5Qlvz4WqB; Fri, 20 Aug 2021 15:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A32BD1B52A; Fri, 20 Aug 2021 15:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KFPM4n081596; Fri, 20 Aug 2021 15:25:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KFPMY4081595; Fri, 20 Aug 2021 15:25:22 GMT (envelope-from git) Date: Fri, 20 Aug 2021 15:25:22 GMT Message-Id: <202108201525.17KFPMY4081595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6f3564a52cf1 - stable/13 - wpa: Fix GCC 6 build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f3564a52cf16a8cad7c073de4f875bdd0547ed0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 15:25:22 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6f3564a52cf16a8cad7c073de4f875bdd0547ed0 commit 6f3564a52cf16a8cad7c073de4f875bdd0547ed0 Author: Cy Schubert AuthorDate: 2021-06-04 01:40:55 +0000 Commit: Cy Schubert CommitDate: 2021-08-20 15:24:54 +0000 wpa: Fix GCC 6 build GCC 6 searches serially to resolve external references. (cherry picked from commit 681500889424423403ace51f118b3467e09acc00) --- usr.sbin/wpa/hostapd/Makefile | 8 ++++---- usr.sbin/wpa/wpa_cli/Makefile | 4 ++-- usr.sbin/wpa/wpa_supplicant/Makefile | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index c0083747782a..c7775c960ddd 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -31,10 +31,10 @@ CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \ CFLAGS+= -DCONFIG_IPV6 .endif #CFLAGS+= -g -LIBADD+= pcap util wpaap wpacommon wpacrypto \ - wpadrivers wpal2_packet wpaeap_common wpaeap_server \ - wpaeapol_auth \ - wparadius wpatls wpautils wpawps +LIBADD+= pcap util \ + wpadrivers wpaap wpal2_packet wpaeap_server \ + wpaeapol_auth wpaeap_common \ + wparadius wpatls wpawps wpacommon wpacrypto wpautils # User customizations for wpa_supplicant/hostapd build environment CFLAGS+=${HOSTAPD_CFLAGS} diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile index bf2cf6252550..93a24295f4a2 100644 --- a/usr.sbin/wpa/wpa_cli/Makefile +++ b/usr.sbin/wpa/wpa_cli/Makefile @@ -21,16 +21,16 @@ CFLAGS+= -D_DIRENT_HAVE_D_TYPE CFLAGS+= -DCONFIG_WPA_CLI_EDIT=y LIBADD+=wpaap \ wpacommon \ - wpacrypto \ - wpaeap_common \ wpaeap_peer \ wpaeap_server \ wpaeapol_auth \ wpaeapol_supp \ + wpaeap_common \ wpal2_packet \ wparadius \ wparsn_supp \ wpatls \ + wpacrypto \ wpautils LIBADD+= pcap util diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 332f66315346..c86be9497eca 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -41,9 +41,10 @@ FILES= wpa_supplicant.conf CFLAGS+=-DCONFIG_BACKEND_FILE #CFLAGS+= -g -LIBADD+=pcap util wpaap wpacommon wpacrypto wpadrivers wpaeapol_supp \ - wpaeap_common wpaeap_server \ - wpaeap_peer wpal2_packet wparsn_supp wpatls wpautils wpawps +LIBADD+=pcap util wpadrivers wpaap wpaeapol_supp \ + wpaeap_server \ + wpaeap_peer wpaeap_common wpal2_packet wparsn_supp wpatls wpawps \ + wpacommon wpacrypto wpautils # User customizations to the wpa_supplicant build environment CFLAGS+=${WPA_SUPPLICANT_CFLAGS} From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 15:25:21 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE30C66230F; Fri, 20 Aug 2021 15:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrlnY4RdRz4Wn1; Fri, 20 Aug 2021 15:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 808211B665; Fri, 20 Aug 2021 15:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KFPLme081568; Fri, 20 Aug 2021 15:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KFPL2B081567; Fri, 20 Aug 2021 15:25:21 GMT (envelope-from git) Date: Fri, 20 Aug 2021 15:25:21 GMT Message-Id: <202108201525.17KFPL2B081567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 0a4379136f80 - stable/13 - wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offload MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0a4379136f80e7e3caf6d0f6b4069ca29895e5f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 15:25:21 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0a4379136f80e7e3caf6d0f6b4069ca29895e5f7 commit 0a4379136f80e7e3caf6d0f6b4069ca29895e5f7 Author: Cy Schubert AuthorDate: 2021-06-02 19:46:02 +0000 Commit: Cy Schubert CommitDate: 2021-08-20 15:24:54 +0000 wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offload Incorrectly linked built-in wpa functions resulted in overwriting sm->ctx->set_rekey_offload with garbage. It was initialized correctly however it changed after wpa_supplicant became a daemon. No SIGBUS violations reported by dhw@ were experienced during testing of the original commit by msyelf or philip@. Reported by: dhw Tested by: dhw X-MFC with: 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3 (cherry picked from commit 9a0f82285322a338548d13fcda07e1d574301190) --- usr.sbin/wpa/Makefile.crypto | 1 + usr.sbin/wpa/hostapd/Makefile | 6 +- usr.sbin/wpa/hostapd_cli/Makefile | 4 +- usr.sbin/wpa/src/ap/Makefile | 4 +- usr.sbin/wpa/src/common/Makefile | 4 +- usr.sbin/wpa/src/crypto/Makefile | 175 ++++++++++++++++++++++++++++------- usr.sbin/wpa/src/drivers/Makefile | 4 +- usr.sbin/wpa/src/eap_common/Makefile | 4 +- usr.sbin/wpa/src/eap_peer/Makefile | 4 +- usr.sbin/wpa/src/eap_server/Makefile | 4 +- usr.sbin/wpa/src/eapol_auth/Makefile | 4 +- usr.sbin/wpa/src/eapol_supp/Makefile | 4 +- usr.sbin/wpa/src/l2_packet/Makefile | 4 +- usr.sbin/wpa/src/radius/Makefile | 4 +- usr.sbin/wpa/src/rsn_supp/Makefile | 4 +- usr.sbin/wpa/src/tls/Makefile | 15 ++- usr.sbin/wpa/src/utils/Makefile | 4 +- usr.sbin/wpa/src/wps/Makefile | 4 +- usr.sbin/wpa/wpa_cli/Makefile | 6 +- usr.sbin/wpa/wpa_passphrase/Makefile | 4 +- usr.sbin/wpa/wpa_priv/Makefile | 6 +- usr.sbin/wpa/wpa_supplicant/Makefile | 7 +- 22 files changed, 191 insertions(+), 85 deletions(-) diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto index a7ddb917ac6d..a65ee29e0ebe 100644 --- a/usr.sbin/wpa/Makefile.crypto +++ b/usr.sbin/wpa/Makefile.crypto @@ -24,6 +24,7 @@ NEED_AES_ENC=true NEED_AES_CBC=true .endif NEED_AES_OMAC1=true +TLS_FUNCS=y .if defined(TLS_FUNCS) NEED_TLS_PRF=y diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index 6e026babae1a..c0083747782a 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -3,6 +3,8 @@ .include .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${HOSTAPD_DISTDIR} PACKAGE= hostapd @@ -40,8 +42,6 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -TLS_FUNCS=y - # For WPS, EAP modes, etc NEED_DH_GROUPS=y NEED_DH_GROUPS_ALL=y @@ -67,6 +67,4 @@ CFLAGS+=-DEAP_GPSK_SHA256 NEED_AES_OMAC1=y .endif -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/hostapd_cli/Makefile b/usr.sbin/wpa/hostapd_cli/Makefile index 276e25058298..fef18dab7b32 100644 --- a/usr.sbin/wpa/hostapd_cli/Makefile +++ b/usr.sbin/wpa/hostapd_cli/Makefile @@ -2,6 +2,8 @@ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${HOSTAPD_DISTDIR} PACKAGE= hostapd @@ -12,6 +14,4 @@ LIBADD+= util wpacommon wpautils MAN= hostapd_cli.8 -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/src/ap/Makefile b/usr.sbin/wpa/src/ap/Makefile index edb2f1e9d089..77caf1ed8efe 100644 --- a/usr.sbin/wpa/src/ap/Makefile +++ b/usr.sbin/wpa/src/ap/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaap INTERNALLIB= @@ -51,8 +53,6 @@ CFLAGS+=-DCONFIG_MBO \ -DCONFIG_RSN_PREAUTH \ -DHOSTAPD -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/common/Makefile b/usr.sbin/wpa/src/common/Makefile index 28c16ff9d31a..b415b926c207 100644 --- a/usr.sbin/wpa/src/common/Makefile +++ b/usr.sbin/wpa/src/common/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpacommon INTERNALLIB= @@ -19,8 +21,6 @@ CFLAGS+=-DCONFIG_SAE \ -DCONFIG_SUITE \ -DCONFIG_SUITEB -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/crypto/Makefile b/usr.sbin/wpa/src/crypto/Makefile index d7e1304dc95e..b25489072425 100644 --- a/usr.sbin/wpa/src/crypto/Makefile +++ b/usr.sbin/wpa/src/crypto/Makefile @@ -2,49 +2,156 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpacrypto INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/crypto -SRCS= aes-cbc.c \ - aes-ctr.c \ - aes-eax.c \ - aes-encblock.c \ - aes-internal.c \ - aes-internal-dec.c \ - aes-internal-enc.c \ - aes-omac1.c \ - aes-unwrap.c \ - aes-wrap.c \ - crypto_internal.c \ - crypto_internal-cipher.c \ - crypto_internal-modexp.c \ - crypto_internal-rsa.c \ - des-internal.c \ - dh_group5.c \ - dh_groups.c \ - fips_prf_internal.c \ - md4-internal.c \ - md5.c \ - md5-internal.c \ - ms_funcs.c \ +.if ${MK_OPENSSL} != "no" +SRCS= crypto_openssl.c \ random.c \ - rc4.c \ - sha1.c \ - sha1-internal.c \ - sha1-pbkdf2.c \ sha1-prf.c \ - sha1-tlsprf.c \ - sha256.c \ sha256-prf.c \ sha256-tlsprf.c \ - sha256-internal.c \ - sha384.c \ - sha384-prf.c \ - sha384-internal.c \ - sha512-internal.c \ + sha512.c +.else +SRCS= crypto_internal.c \ + random.c +.endif + +.if defined(TLS_FUNCS) +.if defined(CONFIG_INTERNAL_TLS) +SRCS+= crypto_internal-cipher.c \ + crypto_internal-modexp.c \ + crypto_internal-rsa.c \ tls_internal.c +.else +SRCS+= tls_openssl.c \ + tls_openssl_ocsp.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_AES) +SRCS+= aes-unwrap.c aes-wrap.c \ + aes-internal.c \ + aes-internal-dec.c \ + aes-internal-enc.c +.else +.endif + +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_EAX) +SRCS+= aes-eax.c +.endif + +.if defined(NEED_AES_CTR) +SRCS+= aes-ctr.c +.endif + +.if defined(NEED_AES_ENCBLOCK) +SRCS+= aes-encblock.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_DES) +.if defined(CONFIG_INTERNAL_DES) +SRCS+= des-internal.c +.endif +.endif + +.if defined(NEED_MD4) +.if defined(CONFIG_INTERNAL_MD4) +SRCS+= md4-internal.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_MD5) +SRCS+= md5.c \ + md5-internal.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= fips_prf_internal.c +.else +SRCS+= fips_prf_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_RC4) +SRCS+= rc4.c +.endif + +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= sha1-internal.c \ + sha1-pbkdf2.c \ + sha1.c \ + sha1-prf.c +.endif + +.if defined(NEED_SHA256) +SRCS+= sha256.c +.if defined(CONFIG_INTERNAL_SHA256) +SRCS+= sha256-internal.c \ + sha256-prf.c +.endif +.endif + +.if defined(NEED_SHA384) +SRCS+= sha384.c +.if defined(CONFIG_INTERNAL_SHA384) +SRCS+= sha384-internal.c \ + sha384-prf.c +.endif +.endif + +.if defined(NEED_SHA512) +SRCS+= sha512.c +.if defined(CONFIG_INTERNAL_SHA512) +SRCS+= sha512-internal.c \ + sha512-prf.c +.endif +.endif + +.if defined(NEED_TLS_PRF) +SRCS+= sha1-tlsprf.c +.endif + +.if defined(CONFIG_INTERNAL_DH5) +.if defined(NEED_DH_GROUPS) +SRCS+= dh_group5.c +.endif +.endif + +.if defined(NEED_DH_GROUPS) +SRCS+= dh_groups.c +.endif + +.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" +CFLAGS+=-DCONFIG_WPS \ + -DCONFIG_HS20 \ + -DCONFIG_INTERWORKING \ + -DEAP_GTC \ + -DEAP_LEAP \ + -DEAP_MD5 \ + -DEAP_MSCHAPv2 \ + -DEAP_OTP \ + -DEAP_PEAP \ + -DEAP_PSK \ + -DEAP_TLS \ + -DEAP_TTLS \ + -DEAP_WSC \ + -DIEEE8021X_EAPOL +SRCS+= ms_funcs.c +.endif CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLS_INTERNAL_CLIENT \ @@ -55,8 +162,6 @@ CFLAGS+=-DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_INTERNAL_SHA384 #CFLAGS+=-DALL_DH_GROUPS -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/drivers/Makefile b/usr.sbin/wpa/src/drivers/Makefile index 1800b651885f..0f901bdcf2fd 100644 --- a/usr.sbin/wpa/src/drivers/Makefile +++ b/usr.sbin/wpa/src/drivers/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpadrivers INTERNALLIB= @@ -13,8 +15,6 @@ SRCS= drivers.c \ driver_wired.c \ driver_wired_common.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/eap_common/Makefile b/usr.sbin/wpa/src/eap_common/Makefile index 4da89b221b36..7ec416c74102 100644 --- a/usr.sbin/wpa/src/eap_common/Makefile +++ b/usr.sbin/wpa/src/eap_common/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_common INTERNALLIB= @@ -17,8 +19,6 @@ SRCS= chap.c \ eap_sim_common.c \ eap_wsc_common.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/eap_peer/Makefile b/usr.sbin/wpa/src/eap_peer/Makefile index 524c7cf6c6f1..bab1b690f6d9 100644 --- a/usr.sbin/wpa/src/eap_peer/Makefile +++ b/usr.sbin/wpa/src/eap_peer/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_peer INTERNALLIB= @@ -25,8 +27,6 @@ SRCS= eap.c \ CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/eap_server/Makefile b/usr.sbin/wpa/src/eap_server/Makefile index c5a4566bb444..795d2a9c68a0 100644 --- a/usr.sbin/wpa/src/eap_server/Makefile +++ b/usr.sbin/wpa/src/eap_server/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeap_server INTERNALLIB= @@ -26,8 +28,6 @@ SRCS= eap_server.c \ eap_server_wsc.c \ eap_sim_db.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/eapol_auth/Makefile b/usr.sbin/wpa/src/eapol_auth/Makefile index 7f05367edfb0..984b96df5c6f 100644 --- a/usr.sbin/wpa/src/eapol_auth/Makefile +++ b/usr.sbin/wpa/src/eapol_auth/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeapol_auth INTERNALLIB= @@ -10,8 +12,6 @@ INTERNALLIB= SRCS= eapol_auth_sm.c \ eapol_auth_dump.c -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/eapol_supp/Makefile b/usr.sbin/wpa/src/eapol_supp/Makefile index 2b3cc0179109..a4588fc23de1 100644 --- a/usr.sbin/wpa/src/eapol_supp/Makefile +++ b/usr.sbin/wpa/src/eapol_supp/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpaeapol_supp INTERNALLIB= @@ -11,8 +13,6 @@ SRCS= eapol_supp_sm.c CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/l2_packet/Makefile b/usr.sbin/wpa/src/l2_packet/Makefile index 89ce771b0343..f53dc81fdf52 100644 --- a/usr.sbin/wpa/src/l2_packet/Makefile +++ b/usr.sbin/wpa/src/l2_packet/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpal2_packet INTERNALLIB= @@ -11,8 +13,6 @@ SRCS= l2_packet_freebsd.c CFLAGS+=-DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/radius/Makefile b/usr.sbin/wpa/src/radius/Makefile index 1ef986a799ae..a37d60be6f7d 100644 --- a/usr.sbin/wpa/src/radius/Makefile +++ b/usr.sbin/wpa/src/radius/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wparadius INTERNALLIB= @@ -16,8 +18,6 @@ SRCS= radius.c \ CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/rsn_supp/Makefile b/usr.sbin/wpa/src/rsn_supp/Makefile index 1b50689e6960..4d952c2204c4 100644 --- a/usr.sbin/wpa/src/rsn_supp/Makefile +++ b/usr.sbin/wpa/src/rsn_supp/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wparsn_supp INTERNALLIB= @@ -18,8 +20,6 @@ CFLAGS+=-DCONFIG_TDLS \ -DCONFIG_WNM \ -DIEEE8021X_EAPOL -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/tls/Makefile b/usr.sbin/wpa/src/tls/Makefile index defe9b0faf6e..e5fdf96444d6 100644 --- a/usr.sbin/wpa/src/tls/Makefile +++ b/usr.sbin/wpa/src/tls/Makefile @@ -2,36 +2,41 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpatls INTERNALLIB= .PATH: ${WPA_DISTDIR}/src/tls -SRCS= asn1.c \ +SRCS= tlsv1_server.c + +.if defined(TLS_FUNCS) +.if defined(CONFIG_INTERNAL_TLS) +SRCS+= asn1.c \ bignum.c \ pkcs1.c \ pkcs5.c \ pkcs8.c \ rsa.c \ tlsv1_client.c \ + tlsv1_client_ocsp.c \ tlsv1_client_read.c \ tlsv1_client_write.c \ - tlsv1_client_ocsp.c \ tlsv1_common.c \ tlsv1_cred.c \ tlsv1_record.c \ - tlsv1_server.c \ tlsv1_server_read.c \ tlsv1_server_write.c \ x509v3.c +.endif +.endif CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ -DCONFIG_CRYPTO_INTERNAL \ -DCONFIG_TLSV11 \ -DCONFIG_TLSV12 -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/utils/Makefile b/usr.sbin/wpa/src/utils/Makefile index f08a2d78fced..22ec732a2b3b 100644 --- a/usr.sbin/wpa/src/utils/Makefile +++ b/usr.sbin/wpa/src/utils/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpautils INTERNALLIB= @@ -24,8 +26,6 @@ CFLAGS+=-DCONFIG_DEBUG_FILE CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/src/wps/Makefile b/usr.sbin/wpa/src/wps/Makefile index ddb40b682c27..5f5485d69bce 100644 --- a/usr.sbin/wpa/src/wps/Makefile +++ b/usr.sbin/wpa/src/wps/Makefile @@ -2,6 +2,8 @@ .include "../../Makefile.inc" +.include "../../Makefile.crypto" + LIB= wpawps INTERNALLIB= @@ -31,8 +33,6 @@ CFLAGS+=-DCONFIG_P2P CFLAGS+= -DCONFIG_IPV6 .endif -.include "../../Makefile.crypto" - # We are only interested in includes at this point. Not libraries. LIBADD= diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile index 7568154a7e45..bf2cf6252550 100644 --- a/usr.sbin/wpa/wpa_cli/Makefile +++ b/usr.sbin/wpa/wpa_cli/Makefile @@ -4,6 +4,8 @@ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa @@ -32,8 +34,4 @@ LIBADD+=wpaap \ wpautils LIBADD+= pcap util -TLS_FUNCS=y - -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/wpa_passphrase/Makefile b/usr.sbin/wpa/wpa_passphrase/Makefile index 0dcb3e69da98..4cd540696d67 100644 --- a/usr.sbin/wpa/wpa_passphrase/Makefile +++ b/usr.sbin/wpa/wpa_passphrase/Makefile @@ -2,6 +2,8 @@ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa @@ -14,6 +16,4 @@ LIBADD+= util wpacrypto wpautils MAN= wpa_passphrase.8 -.include "../Makefile.crypto" - .include diff --git a/usr.sbin/wpa/wpa_priv/Makefile b/usr.sbin/wpa/wpa_priv/Makefile index fd316402c1cf..d3b693341276 100644 --- a/usr.sbin/wpa/wpa_priv/Makefile +++ b/usr.sbin/wpa/wpa_priv/Makefile @@ -2,6 +2,8 @@ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} PACKAGE= wpa @@ -9,8 +11,6 @@ PROG= wpa_priv SRCS= os_unix.c eloop.c common.c wpa_debug.c wpabuf.c wpa_priv.c \ l2_packet_freebsd.c -LIBADD= pcap wpadrivers - -.include "../Makefile.crypto" +LIBADD+=pcap wpadrivers .include diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index 482c06d68e40..332f66315346 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -4,6 +4,8 @@ .include "../Makefile.inc" +.include "../Makefile.crypto" + .PATH.c:${WPA_SUPPLICANT_DISTDIR} \ ${WPA_DISTDIR}/src/drivers @@ -39,7 +41,7 @@ FILES= wpa_supplicant.conf CFLAGS+=-DCONFIG_BACKEND_FILE #CFLAGS+= -g -LIBADD= pcap util wpaap wpacommon wpacrypto wpadrivers wpaeapol_supp \ +LIBADD+=pcap util wpaap wpacommon wpacrypto wpadrivers wpaeapol_supp \ wpaeap_common wpaeap_server \ wpaeap_peer wpal2_packet wparsn_supp wpatls wpautils wpawps @@ -68,7 +70,6 @@ NEED_AES_EAX=y NEED_AES_ENCBLOCK=y NEED_AES_OMAC1=y .endif -TLS_FUNCS=y .if !empty(CFLAGS:M*-DEAP_AKA) SRCS+= eap_aka.c @@ -116,6 +117,4 @@ SRCS+= eap_sake.c \ eap_sake_common.c .endif -.include "../Makefile.crypto" - .include From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 15:25:24 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 197B166236D; Fri, 20 Aug 2021 15:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Grlnb6vlsz4Wlw; Fri, 20 Aug 2021 15:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF0551B52B; Fri, 20 Aug 2021 15:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KFPNiV081623; Fri, 20 Aug 2021 15:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KFPNai081622; Fri, 20 Aug 2021 15:25:23 GMT (envelope-from git) Date: Fri, 20 Aug 2021 15:25:23 GMT Message-Id: <202108201525.17KFPNai081622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3003edd28aa0 - stable/13 - wpa: The ap library is not needed by wpa_supplicant or wpa_cli MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3003edd28aa0fdf97adac8334cecc4a15ddde6ca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 15:25:24 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3003edd28aa0fdf97adac8334cecc4a15ddde6ca commit 3003edd28aa0fdf97adac8334cecc4a15ddde6ca Author: Cy Schubert AuthorDate: 2021-06-12 23:51:51 +0000 Commit: Cy Schubert CommitDate: 2021-08-20 15:24:55 +0000 wpa: The ap library is not needed by wpa_supplicant or wpa_cli The ap library is not needed by wpa_supplicant or wpa_cli. It is only used by hostapd. (cherry picked from commit dc9d54b5c1e058b4f1bb9ab9372b171ac87a0d72) --- usr.sbin/wpa/wpa_cli/Makefile | 3 +-- usr.sbin/wpa/wpa_supplicant/Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile index 93a24295f4a2..2aad727a6785 100644 --- a/usr.sbin/wpa/wpa_cli/Makefile +++ b/usr.sbin/wpa/wpa_cli/Makefile @@ -19,8 +19,7 @@ CFLAGS+= -DCONFIG_TLS=openssl CFLAGS+= -D_DIRENT_HAVE_D_TYPE CFLAGS+= -DCONFIG_WPA_CLI_EDIT=y -LIBADD+=wpaap \ - wpacommon \ +LIBADD+=wpacommon \ wpaeap_peer \ wpaeap_server \ wpaeapol_auth \ diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index c86be9497eca..9b31bea2a63c 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -41,7 +41,7 @@ FILES= wpa_supplicant.conf CFLAGS+=-DCONFIG_BACKEND_FILE #CFLAGS+= -g -LIBADD+=pcap util wpadrivers wpaap wpaeapol_supp \ +LIBADD+=pcap util wpadrivers wpaeapol_supp \ wpaeap_server \ wpaeap_peer wpaeap_common wpal2_packet wparsn_supp wpatls wpawps \ wpacommon wpacrypto wpautils From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 15:25:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 460B3662544; Fri, 20 Aug 2021 15:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Grlnd0wTfz4WjP; Fri, 20 Aug 2021 15:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F19D91B455; Fri, 20 Aug 2021 15:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KFPO65081647; Fri, 20 Aug 2021 15:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KFPOGg081646; Fri, 20 Aug 2021 15:25:24 GMT (envelope-from git) Date: Fri, 20 Aug 2021 15:25:24 GMT Message-Id: <202108201525.17KFPOGg081646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: a3e54ad094ae - stable/13 - wpa: Add wpa_cli action file event MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a3e54ad094ae3b42156cc5fdbcbab0ac44c71925 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 15:25:25 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a3e54ad094ae3b42156cc5fdbcbab0ac44c71925 commit a3e54ad094ae3b42156cc5fdbcbab0ac44c71925 Author: Cy Schubert AuthorDate: 2021-08-12 13:38:21 +0000 Commit: Cy Schubert CommitDate: 2021-08-20 15:24:55 +0000 wpa: Add wpa_cli action file event Yang Zhong at FreeBSD Foundation is working on a wireless network configuratior for an experimental FreeBSD installer. The new installer requires an event to detect when connecting to a network fails due to a bad password. When this happens a WPA-EVENT-TEMP-DISABLED event is triggered. This patch passes the event to an action file provided by the new experimental installer. Submitted by: Yang Zhong Reviewed by: assumed to be reviewed by emaste (and cy) (cherry picked from commit ce92f5a91b161c85e0a7e37cc754e3c28074281a) --- contrib/wpa/wpa_supplicant/wpa_cli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/wpa/wpa_supplicant/wpa_cli.c b/contrib/wpa/wpa_supplicant/wpa_cli.c index 43ac427203ec..9ad2e3ef2144 100644 --- a/contrib/wpa/wpa_supplicant/wpa_cli.c +++ b/contrib/wpa/wpa_supplicant/wpa_cli.c @@ -3977,6 +3977,8 @@ static void wpa_cli_action_process(const char *msg) wpa_cli_connected = 0; wpa_cli_exec(action_file, ifname, "DISCONNECTED"); } + } else if (str_starts(pos, WPA_EVENT_TEMP_DISABLED)) { + wpa_cli_exec(action_file, ifname, pos); } else if (str_starts(pos, WPA_EVENT_CHANNEL_SWITCH_STARTED)) { wpa_cli_exec(action_file, ctrl_ifname, pos); } else if (str_starts(pos, AP_EVENT_ENABLED)) { From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 16:22:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5ABC663591; Fri, 20 Aug 2021 16:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Grn396D87z4cX7; Fri, 20 Aug 2021 16:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD9C01C314; Fri, 20 Aug 2021 16:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KGMDQt061268; Fri, 20 Aug 2021 16:22:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KGMDO1061267; Fri, 20 Aug 2021 16:22:13 GMT (envelope-from git) Date: Fri, 20 Aug 2021 16:22:13 GMT Message-Id: <202108201622.17KGMDO1061267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a949c6a0d6c8 - stable/13 - Apply upstream lldb fix for unhandled Error causing abort MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a949c6a0d6c83994471e33c8ea60f1509e691f6c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 16:22:14 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a949c6a0d6c83994471e33c8ea60f1509e691f6c commit a949c6a0d6c83994471e33c8ea60f1509e691f6c Author: Dimitry Andric AuthorDate: 2021-08-16 16:56:41 +0000 Commit: Dimitry Andric CommitDate: 2021-08-20 16:21:46 +0000 Apply upstream lldb fix for unhandled Error causing abort Merge commit 5033f0793fe6 from llvm git (by Dimitry Andric): [lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage When assertions are turned off, the `llvm::Error` value created at the start of this function is overwritten using the move-assignment operator, but the success value is never checked. Whenever a TypeSystem cannot be found or created, this can lead to lldb core dumping with: Program aborted due to an unhandled Error: Error value was Success. (Note: Success values must still be checked prior to being destroyed). Fix this by not creating a `llvm::Error` value in advance, and directly returning the result of `llvm::make_error` instead, whenever an error is encountered. See also: and . Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D108088 Reported by: dmgk, ota@j.email.ne.jp PR: 253881, 257829 (cherry picked from commit c1a540709a83f810aa47380b946552ab20020374) --- .../llvm-project/lldb/source/Symbol/TypeSystem.cpp | 90 +++++++++------------- 1 file changed, 38 insertions(+), 52 deletions(-) diff --git a/contrib/llvm-project/lldb/source/Symbol/TypeSystem.cpp b/contrib/llvm-project/lldb/source/Symbol/TypeSystem.cpp index 2adf36fa8276..83161f32444c 100644 --- a/contrib/llvm-project/lldb/source/Symbol/TypeSystem.cpp +++ b/contrib/llvm-project/lldb/source/Symbol/TypeSystem.cpp @@ -224,62 +224,32 @@ void TypeSystemMap::ForEach(std::function const &callback) { llvm::Expected TypeSystemMap::GetTypeSystemForLanguage( lldb::LanguageType language, llvm::Optional create_callback) { - llvm::Error error = llvm::Error::success(); - assert(!error); // Check the success value when assertions are enabled std::lock_guard guard(m_mutex); - if (m_clear_in_progress) { - error = llvm::make_error( + if (m_clear_in_progress) + return llvm::make_error( "Unable to get TypeSystem because TypeSystemMap is being cleared", llvm::inconvertibleErrorCode()); - } else { - collection::iterator pos = m_map.find(language); - if (pos != m_map.end()) { - auto *type_system = pos->second.get(); - if (type_system) { - llvm::consumeError(std::move(error)); - return *type_system; - } - error = llvm::make_error( - "TypeSystem for language " + - llvm::StringRef(Language::GetNameForLanguageType(language)) + - " doesn't exist", - llvm::inconvertibleErrorCode()); - return std::move(error); - } - for (const auto &pair : m_map) { - if (pair.second && pair.second->SupportsLanguage(language)) { - // Add a new mapping for "language" to point to an already existing - // TypeSystem that supports this language - m_map[language] = pair.second; - if (pair.second.get()) { - llvm::consumeError(std::move(error)); - return *pair.second.get(); - } - error = llvm::make_error( - "TypeSystem for language " + - llvm::StringRef(Language::GetNameForLanguageType(language)) + - " doesn't exist", - llvm::inconvertibleErrorCode()); - return std::move(error); - } - } + collection::iterator pos = m_map.find(language); + if (pos != m_map.end()) { + auto *type_system = pos->second.get(); + if (type_system) + return *type_system; + return llvm::make_error( + "TypeSystem for language " + + llvm::StringRef(Language::GetNameForLanguageType(language)) + + " doesn't exist", + llvm::inconvertibleErrorCode()); + } - if (!create_callback) { - error = llvm::make_error( - "Unable to find type system for language " + - llvm::StringRef(Language::GetNameForLanguageType(language)), - llvm::inconvertibleErrorCode()); - } else { - // Cache even if we get a shared pointer that contains a null type system - // back - TypeSystemSP type_system_sp = (*create_callback)(); - m_map[language] = type_system_sp; - if (type_system_sp.get()) { - llvm::consumeError(std::move(error)); - return *type_system_sp.get(); - } - error = llvm::make_error( + for (const auto &pair : m_map) { + if (pair.second && pair.second->SupportsLanguage(language)) { + // Add a new mapping for "language" to point to an already existing + // TypeSystem that supports this language + m_map[language] = pair.second; + if (pair.second.get()) + return *pair.second.get(); + return llvm::make_error( "TypeSystem for language " + llvm::StringRef(Language::GetNameForLanguageType(language)) + " doesn't exist", @@ -287,7 +257,23 @@ llvm::Expected TypeSystemMap::GetTypeSystemForLanguage( } } - return std::move(error); + if (!create_callback) + return llvm::make_error( + "Unable to find type system for language " + + llvm::StringRef(Language::GetNameForLanguageType(language)), + llvm::inconvertibleErrorCode()); + + // Cache even if we get a shared pointer that contains a null type system + // back + TypeSystemSP type_system_sp = (*create_callback)(); + m_map[language] = type_system_sp; + if (type_system_sp.get()) + return *type_system_sp.get(); + return llvm::make_error( + "TypeSystem for language " + + llvm::StringRef(Language::GetNameForLanguageType(language)) + + " doesn't exist", + llvm::inconvertibleErrorCode()); } llvm::Expected From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 21:32:44 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB5DA667B5C; Fri, 20 Aug 2021 21:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrvxS4CLPz3Hh1; Fri, 20 Aug 2021 21:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 788D82026A; Fri, 20 Aug 2021 21:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KLWi9N081902; Fri, 20 Aug 2021 21:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KLWiGR081901; Fri, 20 Aug 2021 21:32:44 GMT (envelope-from git) Date: Fri, 20 Aug 2021 21:32:44 GMT Message-Id: <202108202132.17KLWiGR081901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 32294ca07393 - stable/13 - man: document ether_gen_addr(9) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 32294ca07393dee40cb85a872a6dce9532f360ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 21:32:44 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=32294ca07393dee40cb85a872a6dce9532f360ce commit 32294ca07393dee40cb85a872a6dce9532f360ce Author: Kyle Evans AuthorDate: 2021-04-16 01:08:27 +0000 Commit: Kevin Bowling CommitDate: 2021-08-20 21:32:23 +0000 man: document ether_gen_addr(9) This KPI is used to assign a MAC address to an interface that doesn't already have one assigned. Reviewed by: bcr, gnn, imp, kbowling, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29787 (cherry picked from commit e58a65ccdac352712e19a60fffa57a86afabbde9) --- share/man/man9/Makefile | 1 + share/man/man9/ether_gen_addr.9 | 79 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0c874e77cf0a..43bf82426a73 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -137,6 +137,7 @@ MAN= accept_filter.9 \ DRIVER_MODULE.9 \ efirt.9 \ epoch.9 \ + ether_gen_addr.9 \ EVENTHANDLER.9 \ eventtimers.9 \ extattr.9 \ diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9 new file mode 100644 index 000000000000..1b98a841736d --- /dev/null +++ b/share/man/man9/ether_gen_addr.9 @@ -0,0 +1,79 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (C) 2021 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice(s), this list of conditions and the following disclaimer as +.\" the first lines of this file unmodified other than the possible +.\" addition of one or more copyright notices. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice(s), this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY +.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +.\" DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 1, 2021 +.Dt ETHER_GEN_ADDR 9 +.Os +.Sh NAME +.Nm ether_gen_addr +.Nd "generate an arbitrary MAC address for use" +.Sh SYNOPSIS +.In sys/types.h +.In sys/socket.h +.In net/if.h +.In net/if_var.h +.In net/ethernet.h +.Ft void +.Fn ether_gen_addr "struct ifnet *ifp" "struct ether_addr *hwaddr" +.Sh DESCRIPTION +The +.Fn ether_gen_addr +function generates an arbitrary MAC address for use by an ethernet interface +that does not have an assigned address. +.Pp +By default, +.Nm +attempts to generate a stable MAC address using the hostid of the jail that +the +.Ar ifp +is being added to. +During early boot, the hostid may not be set on machines that haven't yet +populated +.Pa /etc/hostid , +or on machines that do not use +.Xr loader 8 . +.Pp +.Nm +can fail to derive a MAC address due to memory allocation failure. +In this case, a locally-administered unicast MAC address will be randomly +generated and returned via the +.Ar hwaddr +parameter. +.Pp +If +.Nm +succeeds, then it will return a MAC address in the FreeBSD Foundation OUI, +.Dq 58:9c:fc , +via the +.Ar hwaddr +parameter. +.Sh AUTHORS +This manual page was written by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 21:32:45 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8D4A667B8F; Fri, 20 Aug 2021 21:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrvxT545Gz3Hkp; Fri, 20 Aug 2021 21:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 952D02026B; Fri, 20 Aug 2021 21:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KLWjP2081926; Fri, 20 Aug 2021 21:32:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KLWjcE081925; Fri, 20 Aug 2021 21:32:45 GMT (envelope-from git) Date: Fri, 20 Aug 2021 21:32:45 GMT Message-Id: <202108202132.17KLWjcE081925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 8a206a22654f - stable/13 - kern: ether_gen_addr: randomize on default hostuuid, too MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a206a22654f8947927764a9a4024c2119fcc470 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 21:32:46 -0000 The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8a206a22654f8947927764a9a4024c2119fcc470 commit 8a206a22654f8947927764a9a4024c2119fcc470 Author: Kyle Evans AuthorDate: 2021-04-16 01:11:35 +0000 Commit: Kevin Bowling CommitDate: 2021-08-20 21:32:31 +0000 kern: ether_gen_addr: randomize on default hostuuid, too Currently, this will still hash the default (all zero) hostuuid and potentially arrive at a MAC address that has a high chance of collision if another interface of the same name appears in the same broadcast domain on another host without a hostuuid, e.g., some virtual machine setups. Instead of using the default hostuuid, just treat it as a failure and generate a random LA unicast MAC address. Reviewed by: bz, gbe, imp, kbowling, kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29788 (cherry picked from commit 2d741f33bd07bf94a59635db3c7b9e070a8a6e55) --- share/man/man9/ether_gen_addr.9 | 5 +++-- sys/kern/kern_jail.c | 1 - sys/net/if_ethersubr.c | 17 ++++++++++++++--- sys/sys/jail.h | 1 + 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9 index 1b98a841736d..f69cb199e2c3 100644 --- a/share/man/man9/ether_gen_addr.9 +++ b/share/man/man9/ether_gen_addr.9 @@ -61,8 +61,9 @@ or on machines that do not use .Xr loader 8 . .Pp .Nm -can fail to derive a MAC address due to memory allocation failure. -In this case, a locally-administered unicast MAC address will be randomly +can fail to derive a MAC address due to memory allocation failure, or because +the hostid has not been populated. +In these cases, a locally-administered unicast MAC address will be randomly generated and returned via the .Ar hwaddr parameter. diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 303e31490eb1..9784f3bfc23b 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #include -#define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" #define PRISON0_HOSTUUID_MODULE "hostuuid" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 01c2d2f7b3e8..7eb46df8281a 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1443,6 +1443,11 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) char jailname[MAXHOSTNAMELEN]; getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); + if (strncmp(uuid, DEFAULT_HOSTUUID, sizeof(uuid)) == 0) { + /* Fall back to a random mac address. */ + goto rando; + } + /* If each (vnet) jail would also have a unique hostuuid this would not * be necessary. */ getjailname(curthread->td_ucred, jailname, sizeof(jailname)); @@ -1450,9 +1455,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) jailname); if (sz < 0) { /* Fall back to a random mac address. */ - arc4rand(hwaddr, sizeof(*hwaddr), 0); - hwaddr->octet[0] = 0x02; - return; + goto rando; } SHA1Init(&ctx); @@ -1467,6 +1470,14 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) hwaddr->octet[i] = addr >> ((ETHER_ADDR_LEN - i - 1) * 8) & 0xFF; } + + return; +rando: + arc4rand(hwaddr, sizeof(*hwaddr), 0); + /* Unicast */ + hwaddr->octet[0] &= 0xFE; + /* Locally administered. */ + hwaddr->octet[0] |= 0x02; } DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index f863a523b917..b0183d404352 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -140,6 +140,7 @@ MALLOC_DECLARE(M_PRISON); #include #define HOSTUUIDLEN 64 +#define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" #define OSRELEASELEN 32 struct racct; From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 21:36:22 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2698A667E9A; Fri, 20 Aug 2021 21:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Grw1f0Yzmz3HQL; Fri, 20 Aug 2021 21:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFCFA205B3; Fri, 20 Aug 2021 21:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KLaLsM082351; Fri, 20 Aug 2021 21:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KLaLFT082350; Fri, 20 Aug 2021 21:36:21 GMT (envelope-from git) Date: Fri, 20 Aug 2021 21:36:21 GMT Message-Id: <202108202136.17KLaLFT082350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 778488b9254b - stable/12 - man: document ether_gen_addr(9) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 778488b9254ba53e1a86e139f25df90fabe0784a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 21:36:22 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=778488b9254ba53e1a86e139f25df90fabe0784a commit 778488b9254ba53e1a86e139f25df90fabe0784a Author: Kyle Evans AuthorDate: 2021-04-16 01:08:27 +0000 Commit: Kevin Bowling CommitDate: 2021-08-20 21:35:34 +0000 man: document ether_gen_addr(9) This KPI is used to assign a MAC address to an interface that doesn't already have one assigned. Reviewed by: bcr, gnn, imp, kbowling, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29787 (cherry picked from commit e58a65ccdac352712e19a60fffa57a86afabbde9) --- share/man/man9/Makefile | 1 + share/man/man9/ether_gen_addr.9 | 79 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7a4fc64f5f88..ef9c1cc9c674 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -127,6 +127,7 @@ MAN= accept_filter.9 \ DRIVER_MODULE.9 \ efirt.9 \ epoch.9 \ + ether_gen_addr.9 \ EVENTHANDLER.9 \ eventtimers.9 \ extattr.9 \ diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9 new file mode 100644 index 000000000000..1b98a841736d --- /dev/null +++ b/share/man/man9/ether_gen_addr.9 @@ -0,0 +1,79 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (C) 2021 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice(s), this list of conditions and the following disclaimer as +.\" the first lines of this file unmodified other than the possible +.\" addition of one or more copyright notices. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice(s), this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY +.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +.\" DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 1, 2021 +.Dt ETHER_GEN_ADDR 9 +.Os +.Sh NAME +.Nm ether_gen_addr +.Nd "generate an arbitrary MAC address for use" +.Sh SYNOPSIS +.In sys/types.h +.In sys/socket.h +.In net/if.h +.In net/if_var.h +.In net/ethernet.h +.Ft void +.Fn ether_gen_addr "struct ifnet *ifp" "struct ether_addr *hwaddr" +.Sh DESCRIPTION +The +.Fn ether_gen_addr +function generates an arbitrary MAC address for use by an ethernet interface +that does not have an assigned address. +.Pp +By default, +.Nm +attempts to generate a stable MAC address using the hostid of the jail that +the +.Ar ifp +is being added to. +During early boot, the hostid may not be set on machines that haven't yet +populated +.Pa /etc/hostid , +or on machines that do not use +.Xr loader 8 . +.Pp +.Nm +can fail to derive a MAC address due to memory allocation failure. +In this case, a locally-administered unicast MAC address will be randomly +generated and returned via the +.Ar hwaddr +parameter. +.Pp +If +.Nm +succeeds, then it will return a MAC address in the FreeBSD Foundation OUI, +.Dq 58:9c:fc , +via the +.Ar hwaddr +parameter. +.Sh AUTHORS +This manual page was written by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-dev-commits-src-branches@freebsd.org Fri Aug 20 21:36:23 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FE55667F82; Fri, 20 Aug 2021 21:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Grw1g1fR9z3HWC; Fri, 20 Aug 2021 21:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE9A2026E; Fri, 20 Aug 2021 21:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17KLaNvp082375; Fri, 20 Aug 2021 21:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17KLaN6l082374; Fri, 20 Aug 2021 21:36:23 GMT (envelope-from git) Date: Fri, 20 Aug 2021 21:36:23 GMT Message-Id: <202108202136.17KLaN6l082374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 0a7dbddfb0ca - stable/12 - kern: ether_gen_addr: randomize on default hostuuid, too MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0a7dbddfb0ca789acca9858c980e58ab8f1bc6de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2021 21:36:23 -0000 The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0a7dbddfb0ca789acca9858c980e58ab8f1bc6de commit 0a7dbddfb0ca789acca9858c980e58ab8f1bc6de Author: Kyle Evans AuthorDate: 2021-04-16 01:11:35 +0000 Commit: Kevin Bowling CommitDate: 2021-08-20 21:35:49 +0000 kern: ether_gen_addr: randomize on default hostuuid, too Currently, this will still hash the default (all zero) hostuuid and potentially arrive at a MAC address that has a high chance of collision if another interface of the same name appears in the same broadcast domain on another host without a hostuuid, e.g., some virtual machine setups. Instead of using the default hostuuid, just treat it as a failure and generate a random LA unicast MAC address. Reviewed by: bz, gbe, imp, kbowling, kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29788 (cherry picked from commit 2d741f33bd07bf94a59635db3c7b9e070a8a6e55) --- share/man/man9/ether_gen_addr.9 | 5 +++-- sys/kern/kern_jail.c | 1 - sys/net/if_ethersubr.c | 17 ++++++++++++++--- sys/sys/jail.h | 1 + 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9 index 1b98a841736d..f69cb199e2c3 100644 --- a/share/man/man9/ether_gen_addr.9 +++ b/share/man/man9/ether_gen_addr.9 @@ -61,8 +61,9 @@ or on machines that do not use .Xr loader 8 . .Pp .Nm -can fail to derive a MAC address due to memory allocation failure. -In this case, a locally-administered unicast MAC address will be randomly +can fail to derive a MAC address due to memory allocation failure, or because +the hostid has not been populated. +In these cases, a locally-administered unicast MAC address will be randomly generated and returned via the .Ar hwaddr parameter. diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 46b43fa7bbc2..e95a0c60bd1e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #include -#define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" #define PRISON0_HOSTUUID_MODULE "hostuuid" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 5e255f862221..ddc92535be60 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1396,6 +1396,11 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) char jailname[MAXHOSTNAMELEN]; getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); + if (strncmp(uuid, DEFAULT_HOSTUUID, sizeof(uuid)) == 0) { + /* Fall back to a random mac address. */ + goto rando; + } + /* If each (vnet) jail would also have a unique hostuuid this would not * be necessary. */ getjailname(curthread->td_ucred, jailname, sizeof(jailname)); @@ -1403,9 +1408,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) jailname); if (sz < 0) { /* Fall back to a random mac address. */ - arc4rand(hwaddr, sizeof(*hwaddr), 0); - hwaddr->octet[0] = 0x02; - return; + goto rando; } SHA1Init(&ctx); @@ -1420,6 +1423,14 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) hwaddr->octet[i] = addr >> ((ETHER_ADDR_LEN - i - 1) * 8) & 0xFF; } + + return; +rando: + arc4rand(hwaddr, sizeof(*hwaddr), 0); + /* Unicast */ + hwaddr->octet[0] &= 0xFE; + /* Locally administered. */ + hwaddr->octet[0] |= 0x02; } DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 590fb4488262..66ffa60e67ef 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -138,6 +138,7 @@ MALLOC_DECLARE(M_PRISON); #include #define HOSTUUIDLEN 64 +#define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" #define OSRELEASELEN 32 struct racct; From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 15:14:43 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4144D673AEA; Sat, 21 Aug 2021 15:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsMVp4cBJz4hTN; Sat, 21 Aug 2021 15:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E0027338; Sat, 21 Aug 2021 15:14:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LFEgrC094002; Sat, 21 Aug 2021 15:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LFEgJL094001; Sat, 21 Aug 2021 15:14:42 GMT (envelope-from git) Date: Sat, 21 Aug 2021 15:14:42 GMT Message-Id: <202108211514.17LFEgJL094001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b65d87e5d7b5 - stable/12 - Apply upstream clang fix for assertion failure compiling devel/capnproto MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b65d87e5d7b58fd06cf4a3061b564d62f1033999 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 15:14:43 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b65d87e5d7b58fd06cf4a3061b564d62f1033999 commit b65d87e5d7b58fd06cf4a3061b564d62f1033999 Author: Dimitry Andric AuthorDate: 2021-08-21 14:26:51 +0000 Commit: Dimitry Andric CommitDate: 2021-08-21 15:13:37 +0000 Apply upstream clang fix for assertion failure compiling devel/capnproto Merge commit 48c70c1664aa from llvm git (by Richard Smith): Extend memset-to-zero optimization to C++11 aggregate functional casts Aggr{...}. We previously missed these cases due to not stepping over the additional AST nodes representing their syntactic form. Direct commit to stable/12, as both main and stable/13 already have this fix as part of clang 12.0.1. Reported by: fernape PR: 257961 --- contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp index 53dbfecfc538..658f0778796b 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp @@ -1732,7 +1732,9 @@ void AggExprEmitter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) /// non-zero bytes that will be stored when outputting the initializer for the /// specified initializer expression. static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { - E = E->IgnoreParens(); + if (auto *MTE = dyn_cast(E)) + E = MTE->getSubExpr(); + E = E->IgnoreParenNoopCasts(CGF.getContext()); // 0 and 0.0 won't require any non-zero stores! if (isSimpleZero(E, CGF)) return CharUnits::Zero(); @@ -1781,7 +1783,7 @@ static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { } } - + // FIXME: This overestimates the number of non-zero bytes for bit-fields. CharUnits NumNonZeroBytes = CharUnits::Zero(); for (unsigned i = 0, e = ILE->getNumInits(); i != e; ++i) NumNonZeroBytes += GetNumNonZeroBytesInInit(ILE->getInit(i), CGF); From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 15:15:07 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1249D67412B; Sat, 21 Aug 2021 15:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsMWH02wHz4hqY; Sat, 21 Aug 2021 15:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDC3B7049; Sat, 21 Aug 2021 15:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LFF6QC094174; Sat, 21 Aug 2021 15:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LFF65Z094173; Sat, 21 Aug 2021 15:15:06 GMT (envelope-from git) Date: Sat, 21 Aug 2021 15:15:06 GMT Message-Id: <202108211515.17LFF65Z094173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d5c7f929b50d - stable/11 - Apply upstream clang fix for assertion failure compiling devel/capnproto MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: d5c7f929b50dbd5965c500ab42c93d0a2736ef99 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 15:15:07 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c7f929b50dbd5965c500ab42c93d0a2736ef99 commit d5c7f929b50dbd5965c500ab42c93d0a2736ef99 Author: Dimitry Andric AuthorDate: 2021-08-21 15:13:10 +0000 Commit: Dimitry Andric CommitDate: 2021-08-21 15:14:00 +0000 Apply upstream clang fix for assertion failure compiling devel/capnproto Merge commit 48c70c1664aa from llvm git (by Richard Smith): Extend memset-to-zero optimization to C++11 aggregate functional casts Aggr{...}. We previously missed these cases due to not stepping over the additional AST nodes representing their syntactic form. Direct commit to stable/11, as both main and stable/13 already have this fix as part of clang 12.0.1. Reported by: fernape PR: 257961 --- contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp index 53dbfecfc538..658f0778796b 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp @@ -1732,7 +1732,9 @@ void AggExprEmitter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) /// non-zero bytes that will be stored when outputting the initializer for the /// specified initializer expression. static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { - E = E->IgnoreParens(); + if (auto *MTE = dyn_cast(E)) + E = MTE->getSubExpr(); + E = E->IgnoreParenNoopCasts(CGF.getContext()); // 0 and 0.0 won't require any non-zero stores! if (isSimpleZero(E, CGF)) return CharUnits::Zero(); @@ -1781,7 +1783,7 @@ static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { } } - + // FIXME: This overestimates the number of non-zero bytes for bit-fields. CharUnits NumNonZeroBytes = CharUnits::Zero(); for (unsigned i = 0, e = ILE->getNumInits(); i != e; ++i) NumNonZeroBytes += GetNumNonZeroBytesInInit(ILE->getInit(i), CGF); From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:09 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F08F7676221; Sat, 21 Aug 2021 17:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8Y5xCJz4W0V; Sat, 21 Aug 2021 17:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3E4B119AB; Sat, 21 Aug 2021 17:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHx9GK008034; Sat, 21 Aug 2021 17:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHx9BE008033; Sat, 21 Aug 2021 17:59:09 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:09 GMT Message-Id: <202108211759.17LHx9BE008033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 66f390ffaf0c - stable/13 - rtsold: auto-probe point to point interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66f390ffaf0cd12b6860a4139f81f4aed9a05414 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:10 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66f390ffaf0cd12b6860a4139f81f4aed9a05414 commit 66f390ffaf0cd12b6860a4139f81f4aed9a05414 Author: Franco Fitchner AuthorDate: 2021-08-14 15:08:07 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:10:14 +0000 rtsold: auto-probe point to point interfaces rtsold works fine for point to point interfaces in manual mode but will not auto-probe them. Reviewed by: markj (cherry picked from commit bfa812f5407bddac2bcced290a09bd3e686e354a) --- usr.sbin/rtsold/rtsold.8 | 4 ++-- usr.sbin/rtsold/rtsold.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index e30a07f3a3fe..273a2b4f0dd8 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2020 +.Dd August 14, 2021 .Dt RTSOLD 8 .Os .\" @@ -167,7 +167,7 @@ The options are as follows: .It Fl a Autoprobe outgoing interfaces. .Nm -will try to find any non-loopback, non-point-to-point, IPv6-capable interfaces +will try to find any non-loopback, IPv6-capable interfaces and send router solicitation messages on all of them. .It Fl d Enable debugging. diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index 5e5298bfdadc..f58574cec731 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -846,8 +846,6 @@ autoifprobe(void) for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if ((ifa->ifa_flags & IFF_UP) == 0) continue; - if ((ifa->ifa_flags & IFF_POINTOPOINT) != 0) - continue; if ((ifa->ifa_flags & IFF_LOOPBACK) != 0) continue; if ((ifa->ifa_flags & IFF_MULTICAST) == 0) From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C94D86762CD; Sat, 21 Aug 2021 17:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8X4zCFz4Vjw; Sat, 21 Aug 2021 17:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91F6E11A3E; Sat, 21 Aug 2021 17:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHx8Ms008004; Sat, 21 Aug 2021 17:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHx8Lg008003; Sat, 21 Aug 2021 17:59:08 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:08 GMT Message-Id: <202108211759.17LHx8Lg008003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: acabc20906ed - stable/13 - kevent: Prohibit negative change and event list lengths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: acabc20906ed93a9e556b0d452a45e103f2e6eb6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:08 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=acabc20906ed93a9e556b0d452a45e103f2e6eb6 commit acabc20906ed93a9e556b0d452a45e103f2e6eb6 Author: Mark Johnston AuthorDate: 2021-05-27 19:49:32 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:08:58 +0000 kevent: Prohibit negative change and event list lengths Previously, a negative change list length would be treated the same as an empty change list. A negative event list length would result in bogus copyouts. Make kevent(2) return EINVAL for both cases so that application bugs are more easily found, and to be more robust against future changes to kevent internals. Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit e00bae5c181ac8282caf41cd33a076da03cf8ac9) --- lib/libc/sys/kqueue.2 | 4 +++- sys/kern/kern_event.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index b83d85d90d42..9be380bb5d99 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2020 +.Dd May 26, 2021 .Dt KQUEUE 2 .Os .Sh NAME @@ -762,6 +762,8 @@ events were placed on the kqueue for return. A cancellation request was delivered to the thread, but not yet handled. .It Bq Er EINVAL The specified time limit or filter is invalid. +.It Bq Er EINVAL +The specified length of the event or change lists is negative. .It Bq Er ENOENT The event could not be found to be modified or deleted. .It Bq Er ENOMEM diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index c277ac085d62..bf04dae2ee5c 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1301,6 +1301,9 @@ kqueue_kevent(struct kqueue *kq, struct thread *td, int nchanges, int nevents, struct kevent *kevp, *changes; int i, n, nerrors, error; + if (nchanges < 0) + return (EINVAL); + nerrors = 0; while (nchanges > 0) { n = nchanges > KQ_NEVENTS ? KQ_NEVENTS : nchanges; @@ -1885,6 +1888,10 @@ kqueue_scan(struct kqueue *kq, int maxevents, struct kevent_copyops *k_ops, if (maxevents == 0) goto done_nl; + if (maxevents < 0) { + error = EINVAL; + goto done_nl; + } rsbt = 0; if (tsp != NULL) { From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A5F467605E; Sat, 21 Aug 2021 17:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8b0w0Xz4Vk1; Sat, 21 Aug 2021 17:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF398114F3; Sat, 21 Aug 2021 17:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHxArM008059; Sat, 21 Aug 2021 17:59:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHxAmX008058; Sat, 21 Aug 2021 17:59:10 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:10 GMT Message-Id: <202108211759.17LHxAmX008058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2544cb334d5f - stable/13 - rtsold: pass sending router address to other and managed script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2544cb334d5f99c78b172d8eae65074eaaadef45 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:11 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2544cb334d5f99c78b172d8eae65074eaaadef45 commit 2544cb334d5f99c78b172d8eae65074eaaadef45 Author: Franco Fitchner AuthorDate: 2021-08-14 15:10:21 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:10:22 +0000 rtsold: pass sending router address to other and managed script Reviewed by: markj (cherry picked from commit 02508a3d4e178b431fe5dda354a56d883f976c02) --- usr.sbin/rtsold/rtsol.c | 8 ++++++-- usr.sbin/rtsold/rtsold.8 | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index 76756bfd8393..646dd092cb0c 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -79,8 +79,8 @@ static int ra_opt_rdnss_dispatch(struct ifinfo *, struct rainfo *, struct script_msg_head_t *, struct script_msg_head_t *); static char *make_rsid(const char *, const char *, struct rainfo *); -#define _ARGS_MANAGED managedconf_script, ifi->ifname -#define _ARGS_OTHER otherconf_script, ifi->ifname +#define _ARGS_MANAGED managedconf_script, ifi->ifname, rasender +#define _ARGS_OTHER otherconf_script, ifi->ifname, rasender #define _ARGS_RESADD resolvconf_script, "-a", rsid #define _ARGS_RESDEL resolvconf_script, "-d", rsid @@ -301,6 +301,8 @@ rtsol_input(int sock) */ if (((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_MANAGED) && !ifi->managedconfig) { + const char *rasender = inet_ntop(AF_INET6, &from.sin6_addr, + ntopbuf, sizeof(ntopbuf)); warnmsg(LOG_DEBUG, __func__, "ManagedConfigFlag on %s is turned on", ifi->ifname); ifi->managedconfig = 1; @@ -317,6 +319,8 @@ rtsol_input(int sock) */ if (((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_OTHER) && !ifi->otherconfig) { + const char *rasender = inet_ntop(AF_INET6, &from.sin6_addr, + ntopbuf, sizeof(ntopbuf)); warnmsg(LOG_DEBUG, __func__, "OtherConfigFlag on %s is turned on", ifi->ifname); ifi->otherconfig = 1; diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 273a2b4f0dd8..84e4d3013ef4 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -219,7 +219,8 @@ When the flag changes from FALSE to TRUE, .Nm will invoke .Ar script-name -with a single argument of the receiving interface name, +with a first argument of the receiving interface name +and a second argument of the sending router address, expecting the script will then start a protocol for the managed configuration. .Ar script-name @@ -233,7 +234,8 @@ When the flag changes from FALSE to TRUE, .Nm will invoke .Ar script-name -with a single argument of the receiving interface name, +with a first argument of the receiving interface name +and a second argument of the sending router address, expecting the script will then start a protocol for the other configuration. The script will not be run if the Managed Configuration flag in the From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91E37676061; Sat, 21 Aug 2021 17:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8c2pYRz4Vgd; Sat, 21 Aug 2021 17:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3ECC11851; Sat, 21 Aug 2021 17:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHxBLC008083; Sat, 21 Aug 2021 17:59:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHxBIi008082; Sat, 21 Aug 2021 17:59:11 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:11 GMT Message-Id: <202108211759.17LHxBIi008082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 20a8c236d102 - stable/13 - rpc: Make function tables const MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20a8c236d1025f560c8418be92f72e0105003216 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:12 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=20a8c236d1025f560c8418be92f72e0105003216 commit 20a8c236d1025f560c8418be92f72e0105003216 Author: Mark Johnston AuthorDate: 2021-07-09 14:56:13 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:10:31 +0000 rpc: Make function tables const No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 20d728b559178577869e50c7e3c1bf0ad24a750c) --- sys/rpc/auth.h | 2 +- sys/rpc/auth_none.c | 2 +- sys/rpc/auth_unix.c | 2 +- sys/rpc/clnt.h | 2 +- sys/rpc/clnt_bck.c | 2 +- sys/rpc/clnt_dg.c | 2 +- sys/rpc/clnt_rc.c | 2 +- sys/rpc/clnt_vc.c | 2 +- sys/rpc/rpcsec_gss/rpcsec_gss.c | 2 +- sys/rpc/rpcsec_gss/svc_rpcsec_gss.c | 8 ++++---- sys/rpc/rpcsec_tls/auth_tls.c | 2 +- sys/rpc/svc.h | 2 +- sys/rpc/svc_auth.c | 10 +++++----- sys/rpc/svc_dg.c | 2 +- sys/rpc/svc_vc.c | 6 +++--- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/rpc/auth.h b/sys/rpc/auth.h index fd56b33da52e..5444f6180c5e 100644 --- a/sys/rpc/auth.h +++ b/sys/rpc/auth.h @@ -189,7 +189,7 @@ typedef struct __auth { struct opaque_auth ah_cred; struct opaque_auth ah_verf; union des_block ah_key; - struct auth_ops { + const struct auth_ops { void (*ah_nextverf) (struct __auth *); /* nextverf & serialize */ int (*ah_marshal) (struct __auth *, uint32_t, XDR *, diff --git a/sys/rpc/auth_none.c b/sys/rpc/auth_none.c index 236b4aa166ae..91597114c069 100644 --- a/sys/rpc/auth_none.c +++ b/sys/rpc/auth_none.c @@ -70,7 +70,7 @@ static bool_t authnone_validate (AUTH *, uint32_t, struct opaque_auth *, static bool_t authnone_refresh (AUTH *, void *); static void authnone_destroy (AUTH *); -static struct auth_ops authnone_ops = { +static const struct auth_ops authnone_ops = { .ah_nextverf = authnone_verf, .ah_marshal = authnone_marshal, .ah_validate = authnone_validate, diff --git a/sys/rpc/auth_unix.c b/sys/rpc/auth_unix.c index 4a3df5f70e3a..be0a241baa36 100644 --- a/sys/rpc/auth_unix.c +++ b/sys/rpc/auth_unix.c @@ -76,7 +76,7 @@ static bool_t authunix_refresh (AUTH *, void *); static void authunix_destroy (AUTH *); static void marshal_new_auth (AUTH *); -static struct auth_ops authunix_ops = { +static const struct auth_ops authunix_ops = { .ah_nextverf = authunix_nextverf, .ah_marshal = authunix_marshal, .ah_validate = authunix_validate, diff --git a/sys/rpc/clnt.h b/sys/rpc/clnt.h index 6f8f898ca918..a968c8f930fc 100644 --- a/sys/rpc/clnt.h +++ b/sys/rpc/clnt.h @@ -132,7 +132,7 @@ typedef struct __rpc_client { #ifdef _KERNEL volatile u_int cl_refs; /* reference count */ AUTH *cl_auth; /* authenticator */ - struct clnt_ops { + const struct clnt_ops { /* call remote procedure */ enum clnt_stat (*cl_call)(struct __rpc_client *, struct rpc_callextra *, rpcproc_t, diff --git a/sys/rpc/clnt_bck.c b/sys/rpc/clnt_bck.c index 2414171bad37..514905bf1cc2 100644 --- a/sys/rpc/clnt_bck.c +++ b/sys/rpc/clnt_bck.c @@ -101,7 +101,7 @@ static bool_t clnt_bck_control(CLIENT *, u_int, void *); static void clnt_bck_close(CLIENT *); static void clnt_bck_destroy(CLIENT *); -static struct clnt_ops clnt_bck_ops = { +static const struct clnt_ops clnt_bck_ops = { .cl_abort = clnt_bck_abort, .cl_geterr = clnt_bck_geterr, .cl_freeres = clnt_bck_freeres, diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c index 3a3662a02a39..63a26cc0b9ac 100644 --- a/sys/rpc/clnt_dg.c +++ b/sys/rpc/clnt_dg.c @@ -84,7 +84,7 @@ static void clnt_dg_close(CLIENT *); static void clnt_dg_destroy(CLIENT *); static int clnt_dg_soupcall(struct socket *so, void *arg, int waitflag); -static struct clnt_ops clnt_dg_ops = { +static const struct clnt_ops clnt_dg_ops = { .cl_call = clnt_dg_call, .cl_abort = clnt_dg_abort, .cl_geterr = clnt_dg_geterr, diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c index ae3b2985a891..aa69356b8cd2 100644 --- a/sys/rpc/clnt_rc.c +++ b/sys/rpc/clnt_rc.c @@ -59,7 +59,7 @@ static bool_t clnt_reconnect_control(CLIENT *, u_int, void *); static void clnt_reconnect_close(CLIENT *); static void clnt_reconnect_destroy(CLIENT *); -static struct clnt_ops clnt_reconnect_ops = { +static const struct clnt_ops clnt_reconnect_ops = { .cl_call = clnt_reconnect_call, .cl_abort = clnt_reconnect_abort, .cl_geterr = clnt_reconnect_geterr, diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c index 92c216e227d1..7d22c670b017 100644 --- a/sys/rpc/clnt_vc.c +++ b/sys/rpc/clnt_vc.c @@ -104,7 +104,7 @@ static bool_t time_not_ok(struct timeval *); static int clnt_vc_soupcall(struct socket *so, void *arg, int waitflag); static void clnt_vc_dotlsupcall(void *data); -static struct clnt_ops clnt_vc_ops = { +static const struct clnt_ops clnt_vc_ops = { .cl_call = clnt_vc_call, .cl_abort = clnt_vc_abort, .cl_geterr = clnt_vc_geterr, diff --git a/sys/rpc/rpcsec_gss/rpcsec_gss.c b/sys/rpc/rpcsec_gss/rpcsec_gss.c index b384a8347ef5..32121be21091 100644 --- a/sys/rpc/rpcsec_gss/rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/rpcsec_gss.c @@ -97,7 +97,7 @@ static bool_t rpc_gss_validate(AUTH *, uint32_t, struct opaque_auth *, static void rpc_gss_destroy(AUTH *); static void rpc_gss_destroy_context(AUTH *, bool_t); -static struct auth_ops rpc_gss_ops = { +static const struct auth_ops rpc_gss_ops = { .ah_nextverf = rpc_gss_nextverf, .ah_marshal = rpc_gss_marshal, .ah_validate = rpc_gss_validate, diff --git a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c index 36ab8c5bcf87..c9a09438d907 100644 --- a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c @@ -90,10 +90,10 @@ static void svc_rpc_gss_release(SVCAUTH *); static enum auth_stat svc_rpc_gss(struct svc_req *, struct rpc_msg *); static int rpc_gss_svc_getcred(struct svc_req *, struct ucred **, int *); -static struct svc_auth_ops svc_auth_gss_ops = { - svc_rpc_gss_wrap, - svc_rpc_gss_unwrap, - svc_rpc_gss_release, +static const struct svc_auth_ops svc_auth_gss_ops = { + .svc_ah_wrap = svc_rpc_gss_wrap, + .svc_ah_unwrap = svc_rpc_gss_unwrap, + .svc_ah_release = svc_rpc_gss_release, }; struct sx svc_rpc_gss_lock; diff --git a/sys/rpc/rpcsec_tls/auth_tls.c b/sys/rpc/rpcsec_tls/auth_tls.c index bd23784f5ebf..9afde553283e 100644 --- a/sys/rpc/rpcsec_tls/auth_tls.c +++ b/sys/rpc/rpcsec_tls/auth_tls.c @@ -70,7 +70,7 @@ static bool_t authtls_validate (AUTH *, uint32_t, struct opaque_auth *, static bool_t authtls_refresh (AUTH *, void *); static void authtls_destroy (AUTH *); -static struct auth_ops authtls_ops = { +static const struct auth_ops authtls_ops = { .ah_nextverf = authtls_verf, .ah_marshal = authtls_marshal, .ah_validate = authtls_validate, diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index 8a94d7058972..d92fa6953891 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -212,7 +212,7 @@ typedef struct __rpc_svcxprt { * Interface to server-side authentication flavors. */ typedef struct __rpc_svcauth { - struct svc_auth_ops { + const struct svc_auth_ops { #ifdef _KERNEL int (*svc_ah_wrap)(struct __rpc_svcauth *, struct mbuf **); int (*svc_ah_unwrap)(struct __rpc_svcauth *, struct mbuf **); diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index 0c5a68688d48..75d1f21d3484 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -60,7 +60,7 @@ static enum auth_stat (*_svcauth_rpcsec_gss)(struct svc_req *, static int (*_svcauth_rpcsec_gss_getcred)(struct svc_req *, struct ucred **, int *); -static struct svc_auth_ops svc_auth_null_ops; +static const struct svc_auth_ops svc_auth_null_ops; /* * The call rpc message, msg has been obtained from the wire. The msg contains @@ -145,10 +145,10 @@ svcauth_null_release(SVCAUTH *auth) } -static struct svc_auth_ops svc_auth_null_ops = { - svcauth_null_wrap, - svcauth_null_unwrap, - svcauth_null_release, +static const struct svc_auth_ops svc_auth_null_ops = { + .svc_ah_wrap = svcauth_null_wrap, + .svc_ah_unwrap = svcauth_null_unwrap, + .svc_ah_release = svcauth_null_release, }; /*ARGSUSED*/ diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c index 2bdd0700c044..db1928655618 100644 --- a/sys/rpc/svc_dg.c +++ b/sys/rpc/svc_dg.c @@ -73,7 +73,7 @@ static void svc_dg_destroy(SVCXPRT *); static bool_t svc_dg_control(SVCXPRT *, const u_int, void *); static int svc_dg_soupcall(struct socket *so, void *arg, int waitflag); -static struct xp_ops svc_dg_ops = { +static const struct xp_ops svc_dg_ops = { .xp_recv = svc_dg_recv, .xp_stat = svc_dg_stat, .xp_reply = svc_dg_reply, diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c index 234feba5c8bd..d81c0b01d84d 100644 --- a/sys/rpc/svc_vc.c +++ b/sys/rpc/svc_vc.c @@ -105,7 +105,7 @@ static int svc_vc_accept(struct socket *head, struct socket **sop); static int svc_vc_soupcall(struct socket *so, void *arg, int waitflag); static int svc_vc_rendezvous_soupcall(struct socket *, void *, int); -static struct xp_ops svc_vc_rendezvous_ops = { +static const struct xp_ops svc_vc_rendezvous_ops = { .xp_recv = svc_vc_rendezvous_recv, .xp_stat = svc_vc_rendezvous_stat, .xp_reply = (bool_t (*)(SVCXPRT *, struct rpc_msg *, @@ -114,7 +114,7 @@ static struct xp_ops svc_vc_rendezvous_ops = { .xp_control = svc_vc_rendezvous_control }; -static struct xp_ops svc_vc_ops = { +static const struct xp_ops svc_vc_ops = { .xp_recv = svc_vc_recv, .xp_stat = svc_vc_stat, .xp_ack = svc_vc_ack, @@ -123,7 +123,7 @@ static struct xp_ops svc_vc_ops = { .xp_control = svc_vc_control }; -static struct xp_ops svc_vc_backchannel_ops = { +static const struct xp_ops svc_vc_backchannel_ops = { .xp_recv = svc_vc_backchannel_recv, .xp_stat = svc_vc_backchannel_stat, .xp_reply = svc_vc_backchannel_reply, From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:13 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 694796762D8; Sat, 21 Aug 2021 17:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8d2Nz7z4Vk7; Sat, 21 Aug 2021 17:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32DA7114F4; Sat, 21 Aug 2021 17:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHxDgm008107; Sat, 21 Aug 2021 17:59:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHxDBw008106; Sat, 21 Aug 2021 17:59:13 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:13 GMT Message-Id: <202108211759.17LHxDBw008106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9bfe19ff8253 - stable/13 - tail: Fix -f with stdin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9bfe19ff8253d08482cbbbf59cca435c4de87ac5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:13 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9bfe19ff8253d08482cbbbf59cca435c4de87ac5 commit 9bfe19ff8253d08482cbbbf59cca435c4de87ac5 Author: Mark Johnston AuthorDate: 2021-07-08 21:40:59 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:18:17 +0000 tail: Fix -f with stdin Based on a patch from swills@. (cherry picked from commit 7e11889959a6c92f05e1c1949deb73295ce60bac) --- usr.bin/tail/extern.h | 2 +- usr.bin/tail/tail.c | 43 ++++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/usr.bin/tail/extern.h b/usr.bin/tail/extern.h index 65ddb519dc61..3d8c12629682 100644 --- a/usr.bin/tail/extern.h +++ b/usr.bin/tail/extern.h @@ -56,7 +56,7 @@ struct mapinfo { struct file_info { FILE *fp; - char *file_name; + const char *file_name; struct stat st; }; diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index b52043c5e580..874557f105ec 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -67,8 +67,6 @@ static const char sccsid[] = "@(#)tail.c 8.1 (Berkeley) 6/6/93"; int Fflag, fflag, qflag, rflag, rval, no_files; fileargs_t *fa; -static file_info_t *files; - static void obsolete(char **); static void usage(void); @@ -88,8 +86,8 @@ main(int argc, char *argv[]) FILE *fp; off_t off; enum STYLE style; - int i, ch, first; - file_info_t *file; + int ch, first; + file_info_t file, *filep, *files; char *p; cap_rights_t rights; @@ -206,30 +204,24 @@ main(int argc, char *argv[]) } if (*argv && fflag) { - files = (struct file_info *) malloc(no_files * - sizeof(struct file_info)); - if (!files) + files = malloc(no_files * sizeof(struct file_info)); + if (files == NULL) err(1, "Couldn't malloc space for file descriptors."); - for (file = files; (fn = *argv++); file++) { - file->file_name = strdup(fn); - if (! file->file_name) - errx(1, "Couldn't malloc space for file name."); - file->fp = fileargs_fopen(fa, file->file_name, "r"); - if (file->fp == NULL || - fstat(fileno(file->fp), &file->st)) { - if (file->fp != NULL) { - fclose(file->fp); - file->fp = NULL; + for (filep = files; (fn = *argv++); filep++) { + filep->file_name = fn; + filep->fp = fileargs_fopen(fa, filep->file_name, "r"); + if (filep->fp == NULL || + fstat(fileno(filep->fp), &filep->st)) { + if (filep->fp != NULL) { + fclose(filep->fp); + filep->fp = NULL; } if (!Fflag || errno != ENOENT) - ierr(file->file_name); + ierr(filep->file_name); } } follow(files, style, off); - for (i = 0, file = files; i < no_files; i++, file++) { - free(file->file_name); - } free(files); } else if (*argv) { for (first = 1; (fn = *argv++);) { @@ -266,10 +258,15 @@ main(int argc, char *argv[]) fflag = 0; /* POSIX.2 requires this. */ } - if (rflag) + if (rflag) { reverse(stdin, fn, style, off, &sb); - else + } else if (fflag) { + file.file_name = fn; + file.fp = stdin; + follow(&file, style, off); + } else { forward(stdin, fn, style, off, &sb); + } } fileargs_free(fa); exit(rval); From owner-dev-commits-src-branches@freebsd.org Sat Aug 21 17:59:14 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89E156762DD; Sat, 21 Aug 2021 17:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsR8f3D2Cz4Vsw; Sat, 21 Aug 2021 17:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 474DF11852; Sat, 21 Aug 2021 17:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17LHxEXm008131; Sat, 21 Aug 2021 17:59:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17LHxECd008130; Sat, 21 Aug 2021 17:59:14 GMT (envelope-from git) Date: Sat, 21 Aug 2021 17:59:14 GMT Message-Id: <202108211759.17LHxECd008130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4c6246b76ed9 - stable/13 - tail: Add regression tests for -f and -F MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c6246b76ed951680d6b9491fbb9497160a4ca16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2021 17:59:14 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c6246b76ed951680d6b9491fbb9497160a4ca16 commit 4c6246b76ed951680d6b9491fbb9497160a4ca16 Author: Mark Johnston AuthorDate: 2021-07-05 15:01:41 +0000 Commit: Mark Johnston CommitDate: 2021-08-21 16:18:21 +0000 tail: Add regression tests for -f and -F Sponsored by: The FreeBSD Foundation (cherry picked from commit 58b1a126b98f9d64f30246c90d6c049fd78dda6b) --- usr.bin/tail/tests/tail_test.sh | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/usr.bin/tail/tests/tail_test.sh b/usr.bin/tail/tests/tail_test.sh index 9eecf460d1e5..66d435f2cd02 100755 --- a/usr.bin/tail/tests/tail_test.sh +++ b/usr.bin/tail/tests/tail_test.sh @@ -272,6 +272,85 @@ broken_pipe_body() -x '(tail -n 856 ints; echo exit code: $? >&2) | sleep 2' } +atf_test_case stdin +stdin_head() +{ + atf_set "descr" "Check basic operations on standard input" +} +stdin_body() +{ + seq 1 5 > infile + seq 1 5 > expectfile + seq 5 1 > expectfile_r + + tail < infile > outfile + tail -r < infile > outfile_r + + atf_check cmp expectfile outfile + atf_check cmp expectfile_r outfile_r +} + +atf_test_case follow +follow_head() +{ + atf_set "descr" "Basic regression test for -f" +} +follow_body() +{ + local pid + + seq 1 5 > expectfile + seq 1 3 > infile + tail -f infile > outfile & + pid=$! + sleep 0.1 + seq 4 5 >> infile + sleep 0.1 + atf_check cmp expectfile outfile + atf_check kill $pid +} + +atf_test_case follow_stdin +follow_stdin_head() +{ + atf_set "descr" "Verify that -f works with files piped to standard input" +} +follow_stdin_body() +{ + local pid + + seq 1 5 > expectfile + seq 1 3 > infile + tail -f < infile > outfile & + pid=$! + sleep 0.1 + seq 4 5 >> infile + sleep 0.1 + atf_check cmp expectfile outfile + atf_check kill $pid +} + +atf_test_case follow_rename +follow_rename_head() +{ + atf_set "descr" "Verify that -F works" +} +follow_rename_body() +{ + local pid + + seq 1 5 > expectfile + seq 1 3 > infile + tail -F infile > outfile & + pid=$! + seq 4 5 > infile_new + atf_check mv infile infile_old + atf_check mv infile_new infile + # tail -F polls for a new file every 1s. + sleep 2 + atf_check cmp expectfile outfile + atf_check kill $pid +} atf_init_test_cases() { @@ -289,4 +368,8 @@ atf_init_test_cases() atf_add_test_case longfile_rc145782_longlines atf_add_test_case longfile_rn2500 atf_add_test_case broken_pipe + atf_add_test_case stdin + atf_add_test_case follow + atf_add_test_case follow_stdin + atf_add_test_case follow_rename } From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 00:27:38 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81A0567AE5A; Sun, 22 Aug 2021 00:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gsbmp1rVrz3nfN; Sun, 22 Aug 2021 00:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23F94168DD; Sun, 22 Aug 2021 00:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17M0RcJ0033506; Sun, 22 Aug 2021 00:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17M0RcVd033505; Sun, 22 Aug 2021 00:27:38 GMT (envelope-from git) Date: Sun, 22 Aug 2021 00:27:38 GMT Message-Id: <202108220027.17M0RcVd033505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 66e088e12b9f - stable/13 - kbdmux(4): Make callout handler mpsafe. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66e088e12b9fd3a42e5a92a0de79d75a3d4b5cd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 00:27:38 -0000 The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=66e088e12b9fd3a42e5a92a0de79d75a3d4b5cd3 commit 66e088e12b9fd3a42e5a92a0de79d75a3d4b5cd3 Author: Alexander Motin AuthorDate: 2021-08-08 22:19:08 +0000 Commit: Alexander Motin CommitDate: 2021-08-22 00:27:25 +0000 kbdmux(4): Make callout handler mpsafe. Both callout and taskqueue now have drain() routines not requiring external locking. It allows to remove TASK flag and manual drain, so the only thing remaining for lock to protect inside the callout handler is ks_inq_length zero comparison, that can be lockless. MFC after: 2 weeks (cherry picked from commit e5018628e76a27e0f61ca03e2aa2247b3c62a158) --- sys/dev/kbdmux/kbdmux.c | 61 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 409e52c21716..3bbdc78b7c1a 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -105,12 +105,6 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, "Keyboard multiplexor"); mtx_unlock(&(s)->ks_lock) #define KBDMUX_LOCK_ASSERT(s, w) \ mtx_assert(&(s)->ks_lock, (w)) -#define KBDMUX_SLEEP(s, f, d, t) \ - msleep(&(s)->f, &(s)->ks_lock, PCATCH | (PZERO + 1), (d), (t)) -#define KBDMUX_CALLOUT_INIT(s) \ - callout_init_mtx(&(s)->ks_timo, &(s)->ks_lock, 0) -#define KBDMUX_QUEUE_INTR(s) \ - taskqueue_enqueue(taskqueue_swi_giant, &(s)->ks_task) #else #define KBDMUX_LOCK_DECL_GLOBAL @@ -124,12 +118,6 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, "Keyboard multiplexor"); #define KBDMUX_LOCK_ASSERT(s, w) -#define KBDMUX_SLEEP(s, f, d, t) \ - tsleep(&(s)->f, PCATCH | (PZERO + 1), (d), (t)) -#define KBDMUX_CALLOUT_INIT(s) \ - callout_init(&(s)->ks_timo, 0) -#define KBDMUX_QUEUE_INTR(s) \ - taskqueue_enqueue(taskqueue_swi_giant, &(s)->ks_task) #endif /* not yet */ /* @@ -157,7 +145,6 @@ struct kbdmux_state int ks_flags; /* flags */ #define COMPOSE (1 << 0) /* compose char flag */ -#define TASK (1 << 2) /* interrupt task queued */ int ks_polling; /* poll nesting count */ int ks_mode; /* K_XLATE, K_RAW, K_CODE */ @@ -223,16 +210,8 @@ void kbdmux_kbd_intr(void *xkbd, int pending) { keyboard_t *kbd = (keyboard_t *) xkbd; - kbdmux_state_t *state = (kbdmux_state_t *) kbd->kb_data; kbdd_intr(kbd, NULL); - - KBDMUX_LOCK(state); - - state->ks_flags &= ~TASK; - wakeup(&state->ks_task); - - KBDMUX_UNLOCK(state); } /* @@ -243,23 +222,12 @@ kbdmux_kbd_intr_timo(void *xstate) { kbdmux_state_t *state = (kbdmux_state_t *) xstate; - KBDMUX_LOCK_ASSERT(state, MA_OWNED); - - if (callout_pending(&state->ks_timo)) - return; /* callout was reset */ - - if (!callout_active(&state->ks_timo)) - return; /* callout was stopped */ - - callout_deactivate(&state->ks_timo); - /* queue interrupt task if needed */ - if (state->ks_inq_length > 0 && !(state->ks_flags & TASK) && - KBDMUX_QUEUE_INTR(state) == 0) - state->ks_flags |= TASK; + if (state->ks_inq_length > 0) + taskqueue_enqueue(taskqueue_swi_giant, &state->ks_task); /* re-schedule timeout */ - callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); + callout_schedule(&state->ks_timo, TICKS); } /* @@ -299,9 +267,8 @@ kbdmux_kbd_event(keyboard_t *kbd, int event, void *arg) } /* queue interrupt task if needed */ - if (state->ks_inq_length > 0 && !(state->ks_flags & TASK) && - KBDMUX_QUEUE_INTR(state) == 0) - state->ks_flags |= TASK; + if (state->ks_inq_length > 0) + taskqueue_enqueue(taskqueue_swi_giant, &state->ks_task); KBDMUX_UNLOCK(state); } break; @@ -444,7 +411,7 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) KBDMUX_LOCK_INIT(state); TASK_INIT(&state->ks_task, 0, kbdmux_kbd_intr, (void *) kbd); - KBDMUX_CALLOUT_INIT(state); + callout_init(&state->ks_timo, 1); SLIST_INIT(&state->ks_kbds); } else if (KBD_IS_INITIALIZED(*kbdp) && KBD_IS_CONFIGURED(*kbdp)) { return (0); @@ -521,9 +488,7 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) KBD_CONFIG_DONE(kbd); - KBDMUX_LOCK(state); callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); - KBDMUX_UNLOCK(state); } return (0); @@ -555,16 +520,8 @@ kbdmux_term(keyboard_t *kbd) kbdmux_state_t *state = (kbdmux_state_t *) kbd->kb_data; kbdmux_kbd_t *k; - KBDMUX_LOCK(state); - - /* kill callout */ - callout_stop(&state->ks_timo); - - /* wait for interrupt task */ - while (state->ks_flags & TASK) - KBDMUX_SLEEP(state, ks_task, "kbdmuxc", 0); - /* release all keyboards from the mux */ + KBDMUX_LOCK(state); while ((k = SLIST_FIRST(&state->ks_kbds)) != NULL) { kbd_release(k->kbd, &k->kbd); SLIST_REMOVE_HEAD(&state->ks_kbds, next); @@ -573,9 +530,11 @@ kbdmux_term(keyboard_t *kbd) free(k, M_KBDMUX); } - KBDMUX_UNLOCK(state); + callout_drain(&state->ks_timo); + taskqueue_drain(taskqueue_swi_giant, &state->ks_task); + kbd_unregister(kbd); #ifdef EVDEV_SUPPORT From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 00:29:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94BF067B181; Sun, 22 Aug 2021 00:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gsbpl2MSMz3p2k; Sun, 22 Aug 2021 00:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B6CD16B1D; Sun, 22 Aug 2021 00:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17M0TIhE033733; Sun, 22 Aug 2021 00:29:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17M0TIQK033732; Sun, 22 Aug 2021 00:29:18 GMT (envelope-from git) Date: Sun, 22 Aug 2021 00:29:18 GMT Message-Id: <202108220029.17M0TIQK033732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 0417804260fd - stable/12 - kbdmux(4): Make callout handler mpsafe. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0417804260fd61ab47424632c26532d6ce2fed14 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 00:29:19 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=0417804260fd61ab47424632c26532d6ce2fed14 commit 0417804260fd61ab47424632c26532d6ce2fed14 Author: Alexander Motin AuthorDate: 2021-08-08 22:19:08 +0000 Commit: Alexander Motin CommitDate: 2021-08-22 00:27:58 +0000 kbdmux(4): Make callout handler mpsafe. Both callout and taskqueue now have drain() routines not requiring external locking. It allows to remove TASK flag and manual drain, so the only thing remaining for lock to protect inside the callout handler is ks_inq_length zero comparison, that can be lockless. MFC after: 2 weeks (cherry picked from commit e5018628e76a27e0f61ca03e2aa2247b3c62a158) --- sys/dev/kbdmux/kbdmux.c | 61 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 5c24db23da55..8fb220b898ce 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -105,12 +105,6 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, "Keyboard multiplexor"); mtx_unlock(&(s)->ks_lock) #define KBDMUX_LOCK_ASSERT(s, w) \ mtx_assert(&(s)->ks_lock, (w)) -#define KBDMUX_SLEEP(s, f, d, t) \ - msleep(&(s)->f, &(s)->ks_lock, PCATCH | (PZERO + 1), (d), (t)) -#define KBDMUX_CALLOUT_INIT(s) \ - callout_init_mtx(&(s)->ks_timo, &(s)->ks_lock, 0) -#define KBDMUX_QUEUE_INTR(s) \ - taskqueue_enqueue(taskqueue_swi_giant, &(s)->ks_task) #else #define KBDMUX_LOCK_DECL_GLOBAL @@ -124,12 +118,6 @@ MALLOC_DEFINE(M_KBDMUX, KEYBOARD_NAME, "Keyboard multiplexor"); #define KBDMUX_LOCK_ASSERT(s, w) -#define KBDMUX_SLEEP(s, f, d, t) \ - tsleep(&(s)->f, PCATCH | (PZERO + 1), (d), (t)) -#define KBDMUX_CALLOUT_INIT(s) \ - callout_init(&(s)->ks_timo, 0) -#define KBDMUX_QUEUE_INTR(s) \ - taskqueue_enqueue(taskqueue_swi_giant, &(s)->ks_task) #endif /* not yet */ /* @@ -157,7 +145,6 @@ struct kbdmux_state int ks_flags; /* flags */ #define COMPOSE (1 << 0) /* compose char flag */ -#define TASK (1 << 2) /* interrupt task queued */ int ks_polling; /* poll nesting count */ int ks_mode; /* K_XLATE, K_RAW, K_CODE */ @@ -223,16 +210,8 @@ void kbdmux_kbd_intr(void *xkbd, int pending) { keyboard_t *kbd = (keyboard_t *) xkbd; - kbdmux_state_t *state = (kbdmux_state_t *) kbd->kb_data; kbdd_intr(kbd, NULL); - - KBDMUX_LOCK(state); - - state->ks_flags &= ~TASK; - wakeup(&state->ks_task); - - KBDMUX_UNLOCK(state); } /* @@ -243,23 +222,12 @@ kbdmux_kbd_intr_timo(void *xstate) { kbdmux_state_t *state = (kbdmux_state_t *) xstate; - KBDMUX_LOCK_ASSERT(state, MA_OWNED); - - if (callout_pending(&state->ks_timo)) - return; /* callout was reset */ - - if (!callout_active(&state->ks_timo)) - return; /* callout was stopped */ - - callout_deactivate(&state->ks_timo); - /* queue interrupt task if needed */ - if (state->ks_inq_length > 0 && !(state->ks_flags & TASK) && - KBDMUX_QUEUE_INTR(state) == 0) - state->ks_flags |= TASK; + if (state->ks_inq_length > 0) + taskqueue_enqueue(taskqueue_swi_giant, &state->ks_task); /* re-schedule timeout */ - callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); + callout_schedule(&state->ks_timo, TICKS); } /* @@ -299,9 +267,8 @@ kbdmux_kbd_event(keyboard_t *kbd, int event, void *arg) } /* queue interrupt task if needed */ - if (state->ks_inq_length > 0 && !(state->ks_flags & TASK) && - KBDMUX_QUEUE_INTR(state) == 0) - state->ks_flags |= TASK; + if (state->ks_inq_length > 0) + taskqueue_enqueue(taskqueue_swi_giant, &state->ks_task); KBDMUX_UNLOCK(state); } break; @@ -444,7 +411,7 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) KBDMUX_LOCK_INIT(state); TASK_INIT(&state->ks_task, 0, kbdmux_kbd_intr, (void *) kbd); - KBDMUX_CALLOUT_INIT(state); + callout_init(&state->ks_timo, 1); SLIST_INIT(&state->ks_kbds); } else if (KBD_IS_INITIALIZED(*kbdp) && KBD_IS_CONFIGURED(*kbdp)) { return (0); @@ -521,9 +488,7 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) KBD_CONFIG_DONE(kbd); - KBDMUX_LOCK(state); callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); - KBDMUX_UNLOCK(state); } return (0); @@ -555,16 +520,8 @@ kbdmux_term(keyboard_t *kbd) kbdmux_state_t *state = (kbdmux_state_t *) kbd->kb_data; kbdmux_kbd_t *k; - KBDMUX_LOCK(state); - - /* kill callout */ - callout_stop(&state->ks_timo); - - /* wait for interrupt task */ - while (state->ks_flags & TASK) - KBDMUX_SLEEP(state, ks_task, "kbdmuxc", 0); - /* release all keyboards from the mux */ + KBDMUX_LOCK(state); while ((k = SLIST_FIRST(&state->ks_kbds)) != NULL) { kbd_release(k->kbd, &k->kbd); SLIST_REMOVE_HEAD(&state->ks_kbds, next); @@ -573,9 +530,11 @@ kbdmux_term(keyboard_t *kbd) free(k, M_KBDMUX); } - KBDMUX_UNLOCK(state); + callout_drain(&state->ks_timo); + taskqueue_drain(taskqueue_swi_giant, &state->ks_task); + kbd_unregister(kbd); #ifdef EVDEV_SUPPORT From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 02:32:19 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC20167C475; Sun, 22 Aug 2021 02:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GsfXg4Gkwz3FTM; Sun, 22 Aug 2021 02:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BFE018E4D; Sun, 22 Aug 2021 02:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17M2WJdD005415; Sun, 22 Aug 2021 02:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17M2WJCm005414; Sun, 22 Aug 2021 02:32:19 GMT (envelope-from git) Date: Sun, 22 Aug 2021 02:32:19 GMT Message-Id: <202108220232.17M2WJCm005414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Peter Grehan Subject: git: 28e22482279f - stable/13 - arm64: HWCAP/HWCAP2 aux args support for 32-bit ARM binaries. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 28e22482279f43dda9c78f3fec2189630e9b84cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 02:32:19 -0000 The branch stable/13 has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=28e22482279f43dda9c78f3fec2189630e9b84cd commit 28e22482279f43dda9c78f3fec2189630e9b84cd Author: Peter Grehan AuthorDate: 2021-07-25 09:34:14 +0000 Commit: Peter Grehan CommitDate: 2021-08-22 04:17:46 +0000 arm64: HWCAP/HWCAP2 aux args support for 32-bit ARM binaries. This fixes build/run of golang under COMPAT32 emulation. PR: 256897 Reviewed by: andrew, mmel, manu, jhb, cognet, Robert Clausecker Tested by: brd, andrew, Robert Clausecker Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D31175 (cherry picked from commit bbe80bff7c3549128bd19862eea7899b3def1d7f) --- sys/arm64/arm64/elf32_machdep.c | 5 + sys/arm64/arm64/identcpu.c | 302 ++++++++++++++++++++++++++++++++++++++++ sys/arm64/include/armreg.h | 131 +++++++++++++++++ sys/arm64/include/elf.h | 29 ++++ sys/arm64/include/md_var.h | 4 + 5 files changed, 471 insertions(+) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 48d6dc189e3a..3625a4d124da 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -77,6 +77,9 @@ static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); +u_long __read_frequently elf32_hwcap; +u_long __read_frequently elf32_hwcap2; + static struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = freebsd32_sysent, @@ -109,6 +112,8 @@ static struct sysentvec elf32_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &elf32_hwcap, + .sv_hwcap2 = &elf32_hwcap2, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, }; diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 6395b3e0f08a..522526b92307 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -50,6 +50,10 @@ __FBSDID("$FreeBSD$"); static void print_cpu_features(u_int cpu); static u_long parse_cpu_features_hwcap(void); static u_long parse_cpu_features_hwcap2(void); +#ifdef COMPAT_FREEBSD32 +static u_long parse_cpu_features_hwcap32(void); +static u_long parse_cpu_features_hwcap32_2(void); +#endif char machine[] = "arm64"; @@ -135,6 +139,11 @@ struct cpu_desc { uint64_t id_aa64pfr0; uint64_t id_aa64pfr1; uint64_t ctr; +#ifdef COMPAT_FREEBSD32 + uint64_t id_isar5; + uint64_t mvfr0; + uint64_t mvfr1; +#endif }; static struct cpu_desc cpu_desc[MAXCPU]; @@ -152,6 +161,11 @@ static u_int cpu_print_regs; #define PRINT_ID_AA64_MMFR2 0x00004000 #define PRINT_ID_AA64_PFR0 0x00010000 #define PRINT_ID_AA64_PFR1 0x00020000 +#ifdef COMPAT_FREEBSD32 +#define PRINT_ID_ISAR5 0x01000000 +#define PRINT_MVFR0 0x02000000 +#define PRINT_MVFR1 0x04000000 +#endif #define PRINT_CTR_EL0 0x10000000 struct cpu_parts { @@ -987,6 +1001,167 @@ static struct mrs_field id_aa64pfr1_fields[] = { MRS_FIELD_END, }; +#ifdef COMPAT_FREEBSD32 +/* ID_ISAR5_EL1 */ +static struct mrs_field_value id_isar5_vcma[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, VCMA, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_rdm[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, RDM, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_crc32[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, CRC32, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_sha2[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SHA2, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_sha1[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SHA1, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_aes[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, AES, NONE, BASE), + MRS_FIELD_VALUE(ID_ISAR5_AES_VMULL, "AES+VMULL"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value id_isar5_sevl[] = { + MRS_FIELD_VALUE_NONE_IMPL(ID_ISAR5, SEVL, NOP, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field id_isar5_fields[] = { + MRS_FIELD(ID_ISAR5, VCMA, false, MRS_LOWER, id_isar5_vcma), + MRS_FIELD(ID_ISAR5, RDM, false, MRS_LOWER, id_isar5_rdm), + MRS_FIELD(ID_ISAR5, CRC32, false, MRS_LOWER, id_isar5_crc32), + MRS_FIELD(ID_ISAR5, SHA2, false, MRS_LOWER, id_isar5_sha2), + MRS_FIELD(ID_ISAR5, SHA1, false, MRS_LOWER, id_isar5_sha1), + MRS_FIELD(ID_ISAR5, AES, false, MRS_LOWER, id_isar5_aes), + MRS_FIELD(ID_ISAR5, SEVL, false, MRS_LOWER, id_isar5_sevl), + MRS_FIELD_END, +}; + +/* MVFR0 */ +static struct mrs_field_value mvfr0_fpround[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR0, FPRound, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_fpsqrt[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR0, FPSqrt, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_fpdivide[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR0, FPDivide, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_fptrap[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR0, FPTrap, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_fpdp[] = { + MRS_FIELD_VALUE(MVFR0_FPDP_NONE, ""), + MRS_FIELD_VALUE(MVFR0_FPDP_VFP_v2, "DP VFPv2"), + MRS_FIELD_VALUE(MVFR0_FPDP_VFP_v3_v4, "DP VFPv3+v4"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_fpsp[] = { + MRS_FIELD_VALUE(MVFR0_FPSP_NONE, ""), + MRS_FIELD_VALUE(MVFR0_FPSP_VFP_v2, "SP VFPv2"), + MRS_FIELD_VALUE(MVFR0_FPSP_VFP_v3_v4, "SP VFPv3+v4"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr0_simdreg[] = { + MRS_FIELD_VALUE(MVFR0_SIMDReg_NONE, ""), + MRS_FIELD_VALUE(MVFR0_SIMDReg_FP, "FP 16x64"), + MRS_FIELD_VALUE(MVFR0_SIMDReg_AdvSIMD, "AdvSIMD"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field mvfr0_fields[] = { + MRS_FIELD(MVFR0, FPRound, false, MRS_LOWER, mvfr0_fpround), + MRS_FIELD(MVFR0, FPSqrt, false, MRS_LOWER, mvfr0_fpsqrt), + MRS_FIELD(MVFR0, FPDivide, false, MRS_LOWER, mvfr0_fpdivide), + MRS_FIELD(MVFR0, FPTrap, false, MRS_LOWER, mvfr0_fptrap), + MRS_FIELD(MVFR0, FPDP, false, MRS_LOWER, mvfr0_fpdp), + MRS_FIELD(MVFR0, FPSP, false, MRS_LOWER, mvfr0_fpsp), + MRS_FIELD(MVFR0, SIMDReg, false, MRS_LOWER, mvfr0_simdreg), + MRS_FIELD_END, +}; + +/* MVFR1 */ +static struct mrs_field_value mvfr1_simdfmac[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, SIMDFMAC, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_fphp[] = { + MRS_FIELD_VALUE(MVFR1_FPHP_NONE, ""), + MRS_FIELD_VALUE(MVFR1_FPHP_CONV_SP, "FPHP SP Conv"), + MRS_FIELD_VALUE(MVFR1_FPHP_CONV_DP, "FPHP DP Conv"), + MRS_FIELD_VALUE(MVFR1_FPHP_ARITH, "FPHP Arith"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_simdhp[] = { + MRS_FIELD_VALUE(MVFR1_SIMDHP_NONE, ""), + MRS_FIELD_VALUE(MVFR1_SIMDHP_CONV_SP, "SIMDHP SP Conv"), + MRS_FIELD_VALUE(MVFR1_SIMDHP_ARITH, "SIMDHP Arith"), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_simdsp[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, SIMDSP, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_simdint[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, SIMDInt, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_simdls[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, SIMDLS, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_fpdnan[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, FPDNaN, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field_value mvfr1_fpftz[] = { + MRS_FIELD_VALUE_NONE_IMPL(MVFR1, FPFtZ, NONE, IMPL), + MRS_FIELD_VALUE_END, +}; + +static struct mrs_field mvfr1_fields[] = { + MRS_FIELD(MVFR1, SIMDFMAC, false, MRS_LOWER, mvfr1_simdfmac), + MRS_FIELD(MVFR1, FPHP, false, MRS_LOWER, mvfr1_fphp), + MRS_FIELD(MVFR1, SIMDHP, false, MRS_LOWER, mvfr1_simdhp), + MRS_FIELD(MVFR1, SIMDSP, false, MRS_LOWER, mvfr1_simdsp), + MRS_FIELD(MVFR1, SIMDInt, false, MRS_LOWER, mvfr1_simdint), + MRS_FIELD(MVFR1, SIMDLS, false, MRS_LOWER, mvfr1_simdls), + MRS_FIELD(MVFR1, FPDNaN, false, MRS_LOWER, mvfr1_fpdnan), + MRS_FIELD(MVFR1, FPFtZ, false, MRS_LOWER, mvfr1_fpftz), + MRS_FIELD_END, +}; +#endif /* COMPAT_FREEBSD32 */ + struct mrs_user_reg { u_int reg; u_int CRm; @@ -1038,6 +1213,32 @@ static struct mrs_user_reg user_regs[] = { .offset = __offsetof(struct cpu_desc, id_aa64mmfr0), .fields = id_aa64mmfr0_fields, }, +#ifdef COMPAT_FREEBSD32 + { + /* id_isar5_el1 */ + .reg = ID_ISAR5_EL1, + .CRm = 2, + .Op2 = 5, + .offset = __offsetof(struct cpu_desc, id_isar5), + .fields = id_isar5_fields, + }, + { + /* mvfr0 */ + .reg = MVFR0_EL1, + .CRm = 3, + .Op2 = 0, + .offset = __offsetof(struct cpu_desc, mvfr0), + .fields = mvfr0_fields, + }, + { + /* mvfr1 */ + .reg = MVFR1_EL1, + .CRm = 3, + .Op2 = 1, + .offset = __offsetof(struct cpu_desc, mvfr1), + .fields = mvfr1_fields, + }, +#endif /* COMPAT_FREEBSD32 */ }; #define CPU_DESC_FIELD(desc, idx) \ @@ -1272,6 +1473,12 @@ identify_cpu_sysinit(void *dummy __unused) elf_hwcap = parse_cpu_features_hwcap(); elf_hwcap2 = parse_cpu_features_hwcap2(); +#ifdef COMPAT_FREEBSD32 + /* 32-bit ARM versions of AT_HWCAP/HWCAP2 */ + elf32_hwcap = parse_cpu_features_hwcap32(); + elf32_hwcap2 = parse_cpu_features_hwcap32_2(); +#endif + if (dic && idc) { arm64_icache_sync_range = &arm64_dic_idc_icache_sync_range; if (bootverbose) @@ -1483,6 +1690,66 @@ parse_cpu_features_hwcap2(void) return (hwcap2); } +#ifdef COMPAT_FREEBSD32 +static u_long +parse_cpu_features_hwcap32(void) +{ + u_long hwcap = HWCAP32_DEFAULT; + + if (MVFR0_FPDP_VAL(user_cpu_desc.mvfr0) >= + MVFR0_FPDP_VFP_v2) { + hwcap |= HWCAP32_VFP; + + if (MVFR0_FPDP_VAL(user_cpu_desc.mvfr0) == + MVFR0_FPDP_VFP_v3_v4) { + hwcap |= HWCAP32_VFPv3; + + if (MVFR1_SIMDFMAC_VAL(user_cpu_desc.mvfr1) == + MVFR1_SIMDFMAC_IMPL) + hwcap |= HWCAP32_VFPv4; + } + } + + if ((MVFR1_SIMDLS_VAL(user_cpu_desc.mvfr1) == + MVFR1_SIMDLS_IMPL) && + (MVFR1_SIMDInt_VAL(user_cpu_desc.mvfr1) == + MVFR1_SIMDInt_IMPL) && + (MVFR1_SIMDSP_VAL(user_cpu_desc.mvfr1) == + MVFR1_SIMDSP_IMPL)) + hwcap |= HWCAP32_NEON; + + return (hwcap); +} + +static u_long +parse_cpu_features_hwcap32_2(void) +{ + u_long hwcap2 = 0; + + if (ID_ISAR5_AES_VAL(user_cpu_desc.id_isar5) >= + ID_ISAR5_AES_BASE) + hwcap2 |= HWCAP32_2_AES; + + if (ID_ISAR5_AES_VAL(user_cpu_desc.id_isar5) == + ID_ISAR5_AES_VMULL) + hwcap2 |= HWCAP32_2_PMULL; + + if (ID_ISAR5_SHA1_VAL(user_cpu_desc.id_isar5) == + ID_ISAR5_SHA1_IMPL) + hwcap2 |= HWCAP32_2_SHA1; + + if (ID_ISAR5_SHA2_VAL(user_cpu_desc.id_isar5) == + ID_ISAR5_SHA2_IMPL) + hwcap2 |= HWCAP32_2_SHA2; + + if (ID_ISAR5_CRC32_VAL(user_cpu_desc.id_isar5) == + ID_ISAR5_CRC32_IMPL) + hwcap2 |= HWCAP32_2_CRC32; + + return (hwcap2); +} +#endif /* COMPAT_FREEBSD32 */ + static void print_ctr_fields(struct sbuf *sb, uint64_t reg, void *arg) { @@ -1696,6 +1963,23 @@ print_cpu_features(u_int cpu) print_id_register(sb, "Auxiliary Features 1", cpu_desc[cpu].id_aa64afr1, id_aa64afr1_fields); +#ifdef COMPAT_FREEBSD32 + /* AArch32 Instruction Set Attribute Register 5 */ + if (cpu == 0 || (cpu_print_regs & PRINT_ID_ISAR5) != 0) + print_id_register(sb, "AArch32 Instruction Set Attributes 5", + cpu_desc[cpu].id_isar5, id_isar5_fields); + + /* AArch32 Media and VFP Feature Register 0 */ + if (cpu == 0 || (cpu_print_regs & PRINT_MVFR0) != 0) + print_id_register(sb, "AArch32 Media and VFP Features 0", + cpu_desc[cpu].mvfr0, mvfr0_fields); + + /* AArch32 Media and VFP Feature Register 1 */ + if (cpu == 0 || (cpu_print_regs & PRINT_MVFR1) != 0) + print_id_register(sb, "AArch32 Media and VFP Features 1", + cpu_desc[cpu].mvfr1, mvfr1_fields); +#endif + sbuf_delete(sb); sb = NULL; #undef SEP_STR @@ -1795,6 +2079,15 @@ identify_cpu(u_int cpu) cpu_desc[cpu].id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1); cpu_desc[cpu].id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1); cpu_desc[cpu].id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1); +#ifdef COMPAT_FREEBSD32 + /* Only read aarch32 SRs if EL0-32 is available */ + if (ID_AA64PFR0_EL0_VAL(cpu_desc[cpu].id_aa64pfr0) == + ID_AA64PFR0_EL0_64_32) { + cpu_desc[cpu].id_isar5 = READ_SPECIALREG(id_isar5_el1); + cpu_desc[cpu].mvfr0 = READ_SPECIALREG(mvfr0_el1); + cpu_desc[cpu].mvfr1 = READ_SPECIALREG(mvfr1_el1); + } +#endif } static void @@ -1859,4 +2152,13 @@ check_cpu_regs(u_int cpu) identify_cache(cpu_desc[cpu].ctr); cpu_print_regs |= PRINT_CTR_EL0; } + +#ifdef COMPAT_FREEBSD32 + if (cpu_desc[cpu].id_isar5 != cpu_desc[0].id_isar5) + cpu_print_regs |= PRINT_ID_ISAR5; + if (cpu_desc[cpu].mvfr0 != cpu_desc[0].mvfr0) + cpu_print_regs |= PRINT_MVFR0; + if (cpu_desc[cpu].mvfr1 != cpu_desc[0].mvfr1) + cpu_print_regs |= PRINT_MVFR1; +#endif } diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 9521b0826064..60389f4171ef 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -771,6 +771,45 @@ #define ID_AA64PFR1_RAS_frac_V1 (UL(0x0) << ID_AA64PFR1_RAS_frac_SHIFT) #define ID_AA64PFR1_RAS_frac_V2 (UL(0x1) << ID_AA64PFR1_RAS_frac_SHIFT) +/* ID_ISAR5_EL1 */ +#define ID_ISAR5_EL1 MRS_REG(3, 0, 0, 2, 5) +#define ID_ISAR5_SEVL_SHIFT 0 +#define ID_ISAR5_SEVL_MASK (UL(0xf) << ID_ISAR5_SEVL_SHIFT) +#define ID_ISAR5_SEVL_VAL(x) ((x) & ID_ISAR5_SEVL_MASK) +#define ID_ISAR5_SEVL_NOP (UL(0x0) << ID_ISAR5_SEVL_SHIFT) +#define ID_ISAR5_SEVL_IMPL (UL(0x1) << ID_ISAR5_SEVL_SHIFT) +#define ID_ISAR5_AES_SHIFT 4 +#define ID_ISAR5_AES_MASK (UL(0xf) << ID_ISAR5_AES_SHIFT) +#define ID_ISAR5_AES_VAL(x) ((x) & ID_ISAR5_AES_MASK) +#define ID_ISAR5_AES_NONE (UL(0x0) << ID_ISAR5_AES_SHIFT) +#define ID_ISAR5_AES_BASE (UL(0x1) << ID_ISAR5_AES_SHIFT) +#define ID_ISAR5_AES_VMULL (UL(0x2) << ID_ISAR5_AES_SHIFT) +#define ID_ISAR5_SHA1_SHIFT 8 +#define ID_ISAR5_SHA1_MASK (UL(0xf) << ID_ISAR5_SHA1_SHIFT) +#define ID_ISAR5_SHA1_VAL(x) ((x) & ID_ISAR5_SHA1_MASK) +#define ID_ISAR5_SHA1_NONE (UL(0x0) << ID_ISAR5_SHA1_SHIFT) +#define ID_ISAR5_SHA1_IMPL (UL(0x1) << ID_ISAR5_SHA1_SHIFT) +#define ID_ISAR5_SHA2_SHIFT 12 +#define ID_ISAR5_SHA2_MASK (UL(0xf) << ID_ISAR5_SHA2_SHIFT) +#define ID_ISAR5_SHA2_VAL(x) ((x) & ID_ISAR5_SHA2_MASK) +#define ID_ISAR5_SHA2_NONE (UL(0x0) << ID_ISAR5_SHA2_SHIFT) +#define ID_ISAR5_SHA2_IMPL (UL(0x1) << ID_ISAR5_SHA2_SHIFT) +#define ID_ISAR5_CRC32_SHIFT 16 +#define ID_ISAR5_CRC32_MASK (UL(0xf) << ID_ISAR5_CRC32_SHIFT) +#define ID_ISAR5_CRC32_VAL(x) ((x) & ID_ISAR5_CRC32_MASK) +#define ID_ISAR5_CRC32_NONE (UL(0x0) << ID_ISAR5_CRC32_SHIFT) +#define ID_ISAR5_CRC32_IMPL (UL(0x1) << ID_ISAR5_CRC32_SHIFT) +#define ID_ISAR5_RDM_SHIFT 24 +#define ID_ISAR5_RDM_MASK (UL(0xf) << ID_ISAR5_RDM_SHIFT) +#define ID_ISAR5_RDM_VAL(x) ((x) & ID_ISAR5_RDM_MASK) +#define ID_ISAR5_RDM_NONE (UL(0x0) << ID_ISAR5_RDM_SHIFT) +#define ID_ISAR5_RDM_IMPL (UL(0x1) << ID_ISAR5_RDM_SHIFT) +#define ID_ISAR5_VCMA_SHIFT 28 +#define ID_ISAR5_VCMA_MASK (UL(0xf) << ID_ISAR5_VCMA_SHIFT) +#define ID_ISAR5_VCMA_VAL(x) ((x) & ID_ISAR5_VCMA_MASK) +#define ID_ISAR5_VCMA_NONE (UL(0x0) << ID_ISAR5_VCMA_SHIFT) +#define ID_ISAR5_VCMA_IMPL (UL(0x1) << ID_ISAR5_VCMA_SHIFT) + /* MAIR_EL1 - Memory Attribute Indirection Register */ #define MAIR_ATTR_MASK(idx) (0xff << ((n)* 8)) #define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) @@ -779,6 +818,98 @@ #define MAIR_NORMAL_WT 0xbb #define MAIR_NORMAL_WB 0xff +/* MVFR0_EL1 */ +#define MVFR0_EL1 MRS_REG(3, 0, 0, 3, 0) +#define MVFR0_SIMDReg_SHIFT 0 +#define MVFR0_SIMDReg_MASK (UL(0xf) << MVFR0_SIMDReg_SHIFT) +#define MVFR0_SIMDReg_VAL(x) ((x) & MVFR0_SIMDReg_MASK) +#define MVFR0_SIMDReg_NONE (UL(0x0) << MVFR0_SIMDReg_SHIFT) +#define MVFR0_SIMDReg_FP (UL(0x1) << MVFR0_SIMDReg_SHIFT) +#define MVFR0_SIMDReg_AdvSIMD (UL(0x2) << MVFR0_SIMDReg_SHIFT) +#define MVFR0_FPSP_SHIFT 4 +#define MVFR0_FPSP_MASK (UL(0xf) << MVFR0_FPSP_SHIFT) +#define MVFR0_FPSP_VAL(x) ((x) & MVFR0_FPSP_MASK) +#define MVFR0_FPSP_NONE (UL(0x0) << MVFR0_FPSP_SHIFT) +#define MVFR0_FPSP_VFP_v2 (UL(0x1) << MVFR0_FPSP_SHIFT) +#define MVFR0_FPSP_VFP_v3_v4 (UL(0x2) << MVFR0_FPSP_SHIFT) +#define MVFR0_FPDP_SHIFT 8 +#define MVFR0_FPDP_MASK (UL(0xf) << MVFR0_FPDP_SHIFT) +#define MVFR0_FPDP_VAL(x) ((x) & MVFR0_FPDP_MASK) +#define MVFR0_FPDP_NONE (UL(0x0) << MVFR0_FPDP_SHIFT) +#define MVFR0_FPDP_VFP_v2 (UL(0x1) << MVFR0_FPDP_SHIFT) +#define MVFR0_FPDP_VFP_v3_v4 (UL(0x2) << MVFR0_FPDP_SHIFT) +#define MVFR0_FPTrap_SHIFT 12 +#define MVFR0_FPTrap_MASK (UL(0xf) << MVFR0_FPTrap_SHIFT) +#define MVFR0_FPTrap_VAL(x) ((x) & MVFR0_FPTrap_MASK) +#define MVFR0_FPTrap_NONE (UL(0x0) << MVFR0_FPTrap_SHIFT) +#define MVFR0_FPTrap_IMPL (UL(0x1) << MVFR0_FPTrap_SHIFT) +#define MVFR0_FPDivide_SHIFT 16 +#define MVFR0_FPDivide_MASK (UL(0xf) << MVFR0_FPDivide_SHIFT) +#define MVFR0_FPDivide_VAL(x) ((x) & MVFR0_FPDivide_MASK) +#define MVFR0_FPDivide_NONE (UL(0x0) << MVFR0_FPDivide_SHIFT) +#define MVFR0_FPDivide_IMPL (UL(0x1) << MVFR0_FPDivide_SHIFT) +#define MVFR0_FPSqrt_SHIFT 20 +#define MVFR0_FPSqrt_MASK (UL(0xf) << MVFR0_FPSqrt_SHIFT) +#define MVFR0_FPSqrt_VAL(x) ((x) & MVFR0_FPSqrt_MASK) +#define MVFR0_FPSqrt_NONE (UL(0x0) << MVFR0_FPSqrt_SHIFT) +#define MVFR0_FPSqrt_IMPL (UL(0x1) << MVFR0_FPSqrt_SHIFT) +#define MVFR0_FPShVec_SHIFT 24 +#define MVFR0_FPShVec_MASK (UL(0xf) << MVFR0_FPShVec_SHIFT) +#define MVFR0_FPShVec_VAL(x) ((x) & MVFR0_FPShVec_MASK) +#define MVFR0_FPShVec_NONE (UL(0x0) << MVFR0_FPShVec_SHIFT) +#define MVFR0_FPShVec_IMPL (UL(0x1) << MVFR0_FPShVec_SHIFT) +#define MVFR0_FPRound_SHIFT 28 +#define MVFR0_FPRound_MASK (UL(0xf) << MVFR0_FPRound_SHIFT) +#define MVFR0_FPRound_VAL(x) ((x) & MVFR0_FPRound_MASK) +#define MVFR0_FPRound_NONE (UL(0x0) << MVFR0_FPRound_SHIFT) +#define MVFR0_FPRound_IMPL (UL(0x1) << MVFR0_FPRound_SHIFT) + +/* MVFR1_EL1 */ +#define MVFR1_EL1 MRS_REG(3, 0, 0, 3, 1) +#define MVFR1_FPFtZ_SHIFT 0 +#define MVFR1_FPFtZ_MASK (UL(0xf) << MVFR1_FPFtZ_SHIFT) +#define MVFR1_FPFtZ_VAL(x) ((x) & MVFR1_FPFtZ_MASK) +#define MVFR1_FPFtZ_NONE (UL(0x0) << MVFR1_FPFtZ_SHIFT) +#define MVFR1_FPFtZ_IMPL (UL(0x1) << MVFR1_FPFtZ_SHIFT) +#define MVFR1_FPDNaN_SHIFT 4 +#define MVFR1_FPDNaN_MASK (UL(0xf) << MVFR1_FPDNaN_SHIFT) +#define MVFR1_FPDNaN_VAL(x) ((x) & MVFR1_FPDNaN_MASK) +#define MVFR1_FPDNaN_NONE (UL(0x0) << MVFR1_FPDNaN_SHIFT) +#define MVFR1_FPDNaN_IMPL (UL(0x1) << MVFR1_FPDNaN_SHIFT) +#define MVFR1_SIMDLS_SHIFT 8 +#define MVFR1_SIMDLS_MASK (UL(0xf) << MVFR1_SIMDLS_SHIFT) +#define MVFR1_SIMDLS_VAL(x) ((x) & MVFR1_SIMDLS_MASK) +#define MVFR1_SIMDLS_NONE (UL(0x0) << MVFR1_SIMDLS_SHIFT) +#define MVFR1_SIMDLS_IMPL (UL(0x1) << MVFR1_SIMDLS_SHIFT) +#define MVFR1_SIMDInt_SHIFT 12 +#define MVFR1_SIMDInt_MASK (UL(0xf) << MVFR1_SIMDInt_SHIFT) +#define MVFR1_SIMDInt_VAL(x) ((x) & MVFR1_SIMDInt_MASK) +#define MVFR1_SIMDInt_NONE (UL(0x0) << MVFR1_SIMDInt_SHIFT) +#define MVFR1_SIMDInt_IMPL (UL(0x1) << MVFR1_SIMDInt_SHIFT) +#define MVFR1_SIMDSP_SHIFT 16 +#define MVFR1_SIMDSP_MASK (UL(0xf) << MVFR1_SIMDSP_SHIFT) +#define MVFR1_SIMDSP_VAL(x) ((x) & MVFR1_SIMDSP_MASK) +#define MVFR1_SIMDSP_NONE (UL(0x0) << MVFR1_SIMDSP_SHIFT) +#define MVFR1_SIMDSP_IMPL (UL(0x1) << MVFR1_SIMDSP_SHIFT) +#define MVFR1_SIMDHP_SHIFT 20 +#define MVFR1_SIMDHP_MASK (UL(0xf) << MVFR1_SIMDHP_SHIFT) +#define MVFR1_SIMDHP_VAL(x) ((x) & MVFR1_SIMDHP_MASK) +#define MVFR1_SIMDHP_NONE (UL(0x0) << MVFR1_SIMDHP_SHIFT) +#define MVFR1_SIMDHP_CONV_SP (UL(0x1) << MVFR1_SIMDHP_SHIFT) +#define MVFR1_SIMDHP_ARITH (UL(0x2) << MVFR1_SIMDHP_SHIFT) +#define MVFR1_FPHP_SHIFT 24 +#define MVFR1_FPHP_MASK (UL(0xf) << MVFR1_FPHP_SHIFT) +#define MVFR1_FPHP_VAL(x) ((x) & MVFR1_FPHP_MASK) +#define MVFR1_FPHP_NONE (UL(0x0) << MVFR1_FPHP_SHIFT) +#define MVFR1_FPHP_CONV_SP (UL(0x1) << MVFR1_FPHP_SHIFT) +#define MVFR1_FPHP_CONV_DP (UL(0x2) << MVFR1_FPHP_SHIFT) +#define MVFR1_FPHP_ARITH (UL(0x3) << MVFR1_FPHP_SHIFT) +#define MVFR1_SIMDFMAC_SHIFT 28 +#define MVFR1_SIMDFMAC_MASK (UL(0xf) << MVFR1_SIMDFMAC_SHIFT) +#define MVFR1_SIMDFMAC_VAL(x) ((x) & MVFR1_SIMDFMAC_MASK) +#define MVFR1_SIMDFMAC_NONE (UL(0x0) << MVFR1_SIMDFMAC_SHIFT) +#define MVFR1_SIMDFMAC_IMPL (UL(0x1) << MVFR1_SIMDFMAC_SHIFT) + /* PAR_EL1 - Physical Address Register */ #define PAR_F_SHIFT 0 #define PAR_F (0x1 << PAR_F_SHIFT) diff --git a/sys/arm64/include/elf.h b/sys/arm64/include/elf.h index bed84e6c755a..3f7c3964d428 100644 --- a/sys/arm64/include/elf.h +++ b/sys/arm64/include/elf.h @@ -150,4 +150,33 @@ __ElfType(Auxinfo); #define HWCAP2_RNG 0x00010000 #define HWCAP2_BTI 0x00020000 +#ifdef COMPAT_FREEBSD32 +/* ARM HWCAP */ +#define HWCAP32_HALF 0x00000002 /* Always set. */ +#define HWCAP32_THUMB 0x00000004 /* Always set. */ +#define HWCAP32_FAST_MULT 0x00000010 /* Always set. */ +#define HWCAP32_VFP 0x00000040 +#define HWCAP32_EDSP 0x00000080 /* Always set. */ +#define HWCAP32_NEON 0x00001000 +#define HWCAP32_VFPv3 0x00002000 +#define HWCAP32_TLS 0x00008000 /* Always set. */ +#define HWCAP32_VFPv4 0x00010000 +#define HWCAP32_IDIVA 0x00020000 /* Always set. */ +#define HWCAP32_IDIVT 0x00040000 /* Always set. */ +#define HWCAP32_VFPD32 0x00080000 /* Always set. */ +#define HWCAP32_LPAE 0x00100000 /* Always set. */ + +#define HWCAP32_DEFAULT \ + (HWCAP32_HALF | HWCAP32_THUMB | HWCAP32_FAST_MULT | HWCAP32_EDSP |\ + HWCAP32_TLS | HWCAP32_IDIVA | HWCAP32_IDIVT | HWCAP32_VFPD32 | \ + HWCAP32_LPAE) + +/* ARM HWCAP2 */ +#define HWCAP32_2_AES 0x00000001 +#define HWCAP32_2_PMULL 0x00000002 +#define HWCAP32_2_SHA1 0x00000004 +#define HWCAP32_2_SHA2 0x00000008 +#define HWCAP32_2_CRC32 0x00000010 +#endif + #endif /* !_MACHINE_ELF_H_ */ diff --git a/sys/arm64/include/md_var.h b/sys/arm64/include/md_var.h index 73cf642148b5..beaea0f8e719 100644 --- a/sys/arm64/include/md_var.h +++ b/sys/arm64/include/md_var.h @@ -38,6 +38,10 @@ extern char sigcode[]; extern int szsigcode; extern u_long elf_hwcap; extern u_long elf_hwcap2; +#ifdef COMPAT_FREEBSD32 +extern u_long elf32_hwcap; +extern u_long elf32_hwcap2; +#endif struct dumperinfo; From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 14:54:20 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1D416567C4; Sun, 22 Aug 2021 14:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gsz0r4TkSz3mF6; Sun, 22 Aug 2021 14:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 818EA22A7E; Sun, 22 Aug 2021 14:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MEsKEN090854; Sun, 22 Aug 2021 14:54:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MEsK9m090853; Sun, 22 Aug 2021 14:54:20 GMT (envelope-from git) Date: Sun, 22 Aug 2021 14:54:20 GMT Message-Id: <202108221454.17MEsK9m090853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: e81b2348d210 - stable/13 - Add zfskeys rc.d script for auto-loading encryption keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e81b2348d2101f33043e4a4ab3e24f4d69bac073 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 14:54:20 -0000 The branch stable/13 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=e81b2348d2101f33043e4a4ab3e24f4d69bac073 commit e81b2348d2101f33043e4a4ab3e24f4d69bac073 Author: Eirik Øverby AuthorDate: 2021-07-28 16:11:35 +0000 Commit: Allan Jude CommitDate: 2021-08-22 14:53:21 +0000 Add zfskeys rc.d script for auto-loading encryption keys ZFS in 13 supports encryption, but for the use case where keys are available in plaintext on disk there is no mechanism for automatically loading keys on startup. This script will, by default, look for any dataset with encryption and keylocation prefixed with file://. It will attempt to unlock, timing out after 10 seconds for each dataset found. User can optionally specify explicitly which datasets to attempt to unlock. Also supports (optionally by force) unmounting filesystems and unloading associated keys. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D30015 (cherry picked from commit 33ff39796ffe469a764e485ac49c31700a51fd6f) --- libexec/rc/rc.d/zfskeys | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/libexec/rc/rc.d/zfskeys b/libexec/rc/rc.d/zfskeys new file mode 100755 index 000000000000..c558eb3af5d7 --- /dev/null +++ b/libexec/rc/rc.d/zfskeys @@ -0,0 +1,119 @@ +#!/bin/sh + +# PROVIDE: zfskeys +# REQUIRE: zpool +# BEFORE: zfs zvol + +. /etc/rc.subr + +name="zfskeys" +desc="Load dataset keys" +rcvar="zfskeys_enable" +extra_commands="status" +start_cmd="load_zfs_keys" +stop_cmd="unload_zfs_keys" +status_cmd="status_zfs_keys" +required_modules="zfs" + +# Note that zfskeys_datasets must have any character found in IFS escaped. +# Forcibly unmounting/unloading only applies to filesystems; ignored for zvols. +: ${zfskeys_datasets:=''} +: ${zfskeys_timeout:=10} +: ${zfskeys_unload_force:='NO'} + +encode_args() +{ + shift && [ $# -gt 0 ] && printf "%s\0" "$@" | b64encode -r - +} + +list_datasets() +{ + if [ "$zfskeys_args" ]; then + echo "$zfskeys_args" | b64decode -r | + xargs -0 zfs get -H -s local -o value,name keylocation + elif [ ! "$zfskeys_datasets" ]; then + zfs get -H -t filesystem,volume -s local -o value,name keylocation + else + echo "$zfskeys_datasets" | xargs -n 1 zfs get -H -s local \ + -o value,name keylocation + fi +} + +unlock_fs() +{ + local fs="$1" + local kl="$2" + local k="${kl##file://}" + + if [ "$k" ] && [ -f "$k" ] && [ -s "$k" ] && [ -r "$k" ]; then + if [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then + echo "Key already loaded for $fs." + elif keytest=$(zfs load-key -n -L "$kl" "$fs" 2>&1); then + echo "Loading key for $fs from $kl.." + if ! keyload=$(timeout $zfskeys_timeout zfs load-key -L "$kl" "$fs" 2>&1) ; then + if [ $? -eq 124 ]; then + echo "Timed out loading key from $kl for $fs" + else + echo "Failed to load key from $kl for $fs:" + echo "$keyload" + fi + fi + else + echo "Could not verify key from $kl for $fs:" + echo "$keytest" + fi + else + echo "Key file $k not found, empty or unreadable. Skipping $fs.." + fi +} + +lock_fs() +{ + local fs=$1 + + if [ "$(zfs get -Ho value mounted "$fs")" = 'yes' ]; then + if checkyesno zfskeys_unload_force ; then + zfs unmount -f "$fs" && echo "Forcibly unmounted $fs." + else + zfs unmount "$fs" && echo "Unmounted $fs." + fi + fi + if [ "$?" -ne 0 ]; then + echo "Unmount failed for $fs" + elif [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then + zfs unload-key "$fs" && echo "Unloaded key for $fs." + else + echo "No key loaded for $fs." + fi +} + +status_zfs_keys() +{ + local IFS=$(printf "\t") + + list_datasets | while read kl fs ; do + echo "$fs: $(zfs get -Ho value keystatus "$fs")" + done +} + +load_zfs_keys() +{ + local IFS=$(printf "\t") + + list_datasets | while read kl fs ; do + unlock_fs "$fs" "$kl" + done +} + +unload_zfs_keys() +{ + local IFS=$(printf "\t") + + list_datasets | while read kl fs ; do + lock_fs "$fs" + done +} + +zfskeys_args=$(encode_args "$@") +load_rc_config $name +run_rc_command "$1" From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 19:44:10 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3085F65C203; Sun, 22 Aug 2021 19:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt5RG0bJfz4dWB; Sun, 22 Aug 2021 19:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04FB26B84; Sun, 22 Aug 2021 19:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MJi9Mt077346; Sun, 22 Aug 2021 19:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MJi9PW077345; Sun, 22 Aug 2021 19:44:09 GMT (envelope-from git) Date: Sun, 22 Aug 2021 19:44:09 GMT Message-Id: <202108221944.17MJi9PW077345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Pawel Stefaniak Subject: git: 108633bb1556 - stable/13 - diff: Use unprivileged_user with report_identical test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pstef X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 108633bb1556f1e107b05a68fa0c323ac4d2c712 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 19:44:10 -0000 The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=108633bb1556f1e107b05a68fa0c323ac4d2c712 commit 108633bb1556f1e107b05a68fa0c323ac4d2c712 Author: Olivier Cochard AuthorDate: 2021-02-03 16:18:59 +0000 Commit: Piotr Pawel Stefaniak CommitDate: 2021-08-22 16:48:55 +0000 diff: Use unprivileged_user with report_identical test Approved by: bapt Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28466 (cherry picked from commit b67df8d7c203a139b5afbe72e1947fbb8c32dc73) --- usr.bin/diff/tests/diff_test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 60b56f0d9067..b9d1698d982e 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -228,13 +228,18 @@ label_body() -s exit:1 diff --label hello --label world `which diff` `which ls` } +report_identical_head() +{ + atf_set "require.config" unprivileged_user +} report_identical_body() { + UNPRIVILEGED_USER=$(atf_config_get unprivileged_user) printf "\tA\n" > A printf "\tB\n" > B chmod -r B atf_check -s exit:2 -e inline:"diff: B: Permission denied\n" \ - -o empty diff -s A B + -o empty su -m "$UNPRIVILEGED_USER" -c 'diff -s A B' } non_regular_file_body() From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 21:22:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DA1465D3FC; Sun, 22 Aug 2021 21:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt7dG32lcz3hfD; Sun, 22 Aug 2021 21:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50866A8; Sun, 22 Aug 2021 21:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MLMwdG010466; Sun, 22 Aug 2021 21:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MLMw62010465; Sun, 22 Aug 2021 21:22:58 GMT (envelope-from git) Date: Sun, 22 Aug 2021 21:22:58 GMT Message-Id: <202108222122.17MLMw62010465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: e7d99efb3638 - stable/13 - Escape any '.' characters in sysctl node names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7d99efb3638b71756da8033ef8cef74213c42fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 21:22:58 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=e7d99efb3638b71756da8033ef8cef74213c42fd commit e7d99efb3638b71756da8033ef8cef74213c42fd Author: Alan Somers AuthorDate: 2021-07-21 21:11:00 +0000 Commit: Alan Somers CommitDate: 2021-08-22 21:11:00 +0000 Escape any '.' characters in sysctl node names ZFS creates some sysctl nodes that include a pool name, and '.' is an allowed character in pool names. But it's the separator in the sysctl tree, so it can't be included in a sysctl name. Replace it with "%25". Handily, "%" is illegal in ZFS pool names, so there's no ambiguity there. PR: 257316 Sponsored by: Axcient Reviewed by: freqlabs Differential Revision: https://reviews.freebsd.org/D31265 (cherry picked from commit 6c9506559080da2914749bf611225d7c0a153609) --- sys/kern/kern_sysctl.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 4bfe7073e5a3..f1e249ace89a 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -122,6 +122,7 @@ static int sysctl_root(SYSCTL_HANDLER_ARGS); /* Root list */ struct sysctl_oid_list sysctl__children = SLIST_HEAD_INITIALIZER(&sysctl__children); +static char* sysctl_escape_name(const char*); static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse); static int sysctl_old_kernel(struct sysctl_req *, const void *, size_t); @@ -747,6 +748,46 @@ sysctl_remove_name(struct sysctl_oid *parent, const char *name, return (error); } +/* + * Duplicate the provided string, escaping any illegal characters. The result + * must be freed when no longer in use. + * + * The list of illegal characters is ".". + */ +static char* +sysctl_escape_name(const char* orig) +{ + int i, s = 0, d = 0, nillegals = 0; + char *new; + + /* First count the number of illegal characters */ + for (i = 0; orig[i] != '\0'; i++) { + if (orig[i] == '.') + nillegals++; + } + + /* Allocate storage for new string */ + new = malloc(i + 2 * nillegals + 1, M_SYSCTLOID, M_WAITOK); + + /* Copy the name, escaping characters as we go */ + while (orig[s] != '\0') { + if (orig[s] == '.') { + /* %25 is the hexadecimal representation of '.' */ + new[d++] = '%'; + new[d++] = '2'; + new[d++] = '5'; + s++; + } else { + new[d++] = orig[s++]; + } + } + + /* Finally, nul-terminate */ + new[d] = '\0'; + + return (new); +} + static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse) { @@ -828,14 +869,17 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, const char *label) { struct sysctl_oid *oidp; + char *escaped; /* You have to hook up somewhere.. */ if (parent == NULL) return(NULL); + escaped = sysctl_escape_name(name); /* Check if the node already exists, otherwise create it */ SYSCTL_WLOCK(); - oidp = sysctl_find_oidname(name, parent); + oidp = sysctl_find_oidname(escaped, parent); if (oidp != NULL) { + free(escaped, M_SYSCTLOID); if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { oidp->oid_refcnt++; /* Update the context */ @@ -854,7 +898,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, SLIST_INIT(&oidp->oid_children); oidp->oid_number = number; oidp->oid_refcnt = 1; - oidp->oid_name = strdup(name, M_SYSCTLOID); + oidp->oid_name = escaped; oidp->oid_handler = handler; oidp->oid_kind = CTLFLAG_DYN | kind; oidp->oid_arg1 = arg1; From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 21:23:49 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C565965D5FB; Sun, 22 Aug 2021 21:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt7fF59Rfz3hxV; Sun, 22 Aug 2021 21:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A3DF27EB3; Sun, 22 Aug 2021 21:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MLNnFF010640; Sun, 22 Aug 2021 21:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MLNnvl010639; Sun, 22 Aug 2021 21:23:49 GMT (envelope-from git) Date: Sun, 22 Aug 2021 21:23:49 GMT Message-Id: <202108222123.17MLNnvl010639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: f61939970fae - stable/13 - iostat: fix rounding errors in iostat -x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f61939970fae21a118bffa8794d8dcc65aed5372 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 21:23:49 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f61939970fae21a118bffa8794d8dcc65aed5372 commit f61939970fae21a118bffa8794d8dcc65aed5372 Author: Alan Somers AuthorDate: 2021-07-08 16:16:32 +0000 Commit: Alan Somers CommitDate: 2021-08-22 21:23:23 +0000 iostat: fix rounding errors in iostat -x Better to round numbers instead of flooring them. Sponsored by: Axcient (cherry picked from commit 61631b24a1347a23cafe0657fba894622b1606e2) --- usr.sbin/iostat/iostat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 4cbfcfcbcbd5..9140bf10ef07 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -888,17 +888,17 @@ devstats(int perf_select, long double etime, int havelast) mb_per_second_write > ((long double).0005)/1024 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %7d %7d %8.1Lf " - "%8.1Lf %5d %5d %5d %5d " - "%4" PRIu64 " %3.0Lf ", + printf("%-8.8s %7.0Lf %7.0Lf %8.1Lf " + "%8.1Lf %5.0Lf %5.0Lf %5.0Lf %5.0Lf" + " %4" PRIu64 " %3.0Lf ", devicename, - (int)transfers_per_second_read, - (int)transfers_per_second_write, + transfers_per_second_read, + transfers_per_second_write, mb_per_second_read * 1024, mb_per_second_write * 1024, - (int)ms_per_read, (int)ms_per_write, - (int)ms_per_other, - (int)ms_per_transaction, + ms_per_read, ms_per_write, + ms_per_other, + ms_per_transaction, queue_len, busy_pct); else printf("%-8.8s %11.1Lf %11.1Lf " From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 21:25:39 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7BE265D766; Sun, 22 Aug 2021 21:25:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt7hM4tYyz3k82; Sun, 22 Aug 2021 21:25:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85CF9109; Sun, 22 Aug 2021 21:25:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MLPdTd010875; Sun, 22 Aug 2021 21:25:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MLPdXQ010874; Sun, 22 Aug 2021 21:25:39 GMT (envelope-from git) Date: Sun, 22 Aug 2021 21:25:39 GMT Message-Id: <202108222125.17MLPdXQ010874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 2e6862b12b20 - stable/13 - ftpd: delete dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2e6862b12b20ca62b53faf3899e39744c89a9a43 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 21:25:39 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2e6862b12b20ca62b53faf3899e39744c89a9a43 commit 2e6862b12b20ca62b53faf3899e39744c89a9a43 Author: Alan Somers AuthorDate: 2021-07-27 18:14:00 +0000 Commit: Alan Somers CommitDate: 2021-08-22 21:25:29 +0000 ftpd: delete dead code Delete code killed by SVN r13139 in 1996. Little chance that it would still compile today. PR: 257317 Reported by: Alan Shearer Sponsored by: Axcient (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9) --- libexec/ftpd/extern.h | 3 --- libexec/ftpd/ftpd.c | 49 ------------------------------------------------- 2 files changed, 52 deletions(-) diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h index 80d24b46d2e4..aa48ea67e320 100644 --- a/libexec/ftpd/extern.h +++ b/libexec/ftpd/extern.h @@ -59,9 +59,6 @@ char *renamefrom(char *); void reply(int, const char *, ...) __printflike(2, 3); void retrieve(char *, char *); void send_file_list(char *); -#ifdef OLD_SETPROCTITLE -void setproctitle(const char *, ...); -#endif void statcmd(void); void statfilecmd(char *); void store(char *, char *, int); diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 25ae3fba956b..e23c06aaf143 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -205,10 +205,6 @@ int swaitmax = SWAITMAX; int swaitint = SWAITINT; #ifdef SETPROCTITLE -#ifdef OLD_SETPROCTITLE -char **Argv = NULL; /* pointer to argument vector */ -char *LastArgv = NULL; /* end of argv */ -#endif /* OLD_SETPROCTITLE */ char proctitle[LINE_MAX]; /* initial part of title */ #endif /* SETPROCTITLE */ @@ -280,16 +276,6 @@ main(int argc, char *argv[], char **envp) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; -#ifdef OLD_SETPROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ - Argv = argv; - while (*envp) - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); -#endif /* OLD_SETPROCTITLE */ - /* * Prevent diagnostic messages from appearing on stderr. * We run as a daemon or from inetd; in both cases, there's @@ -3329,41 +3315,6 @@ reapchild(int signo) while (waitpid(-1, NULL, WNOHANG) > 0); } -#ifdef OLD_SETPROCTITLE -/* - * Clobber argv so ps will show what we're doing. (Stolen from sendmail.) - * Warning, since this is usually started from inetd.conf, it often doesn't - * have much of an environment or arglist to overwrite. - */ -void -setproctitle(const char *fmt, ...) -{ - int i; - va_list ap; - char *p, *bp, ch; - char buf[LINE_MAX]; - - va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - - /* make ps print our process name */ - p = Argv[0]; - *p++ = '-'; - - i = strlen(buf); - if (i > LastArgv - p - 2) { - i = LastArgv - p - 2; - buf[i] = '\0'; - } - bp = buf; - while (ch = *bp++) - if (ch != '\n' && ch != '\r') - *p++ = ch; - while (p < LastArgv) - *p++ = ' '; -} -#endif /* OLD_SETPROCTITLE */ - static void appendf(char **strp, char *fmt, ...) { From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 23:03:28 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 415E165F498; Sun, 22 Aug 2021 23:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt9sD1JF2z4gtG; Sun, 22 Aug 2021 23:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15DF2126E; Sun, 22 Aug 2021 23:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MN3SJS043931; Sun, 22 Aug 2021 23:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MN3Sj0043930; Sun, 22 Aug 2021 23:03:28 GMT (envelope-from git) Date: Sun, 22 Aug 2021 23:03:28 GMT Message-Id: <202108222303.17MN3Sj0043930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 98c467192082 - stable/12 - Escape any '.' characters in sysctl node names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 98c467192082b3d4a6c91eeaa80868bb5231534c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 23:03:28 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=98c467192082b3d4a6c91eeaa80868bb5231534c commit 98c467192082b3d4a6c91eeaa80868bb5231534c Author: Alan Somers AuthorDate: 2021-07-21 21:11:00 +0000 Commit: Alan Somers CommitDate: 2021-08-22 22:43:50 +0000 Escape any '.' characters in sysctl node names ZFS creates some sysctl nodes that include a pool name, and '.' is an allowed character in pool names. But it's the separator in the sysctl tree, so it can't be included in a sysctl name. Replace it with "%25". Handily, "%" is illegal in ZFS pool names, so there's no ambiguity there. PR: 257316 Sponsored by: Axcient Reviewed by: freqlabs Differential Revision: https://reviews.freebsd.org/D31265 (cherry picked from commit 6c9506559080da2914749bf611225d7c0a153609) --- sys/kern/kern_sysctl.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index fa0398896ad0..d40eec348ae3 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -109,6 +109,7 @@ static int sysctl_root(SYSCTL_HANDLER_ARGS); /* Root list */ struct sysctl_oid_list sysctl__children = SLIST_HEAD_INITIALIZER(&sysctl__children); +static char* sysctl_escape_name(const char*); static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse); static int sysctl_old_kernel(struct sysctl_req *, const void *, size_t); @@ -734,6 +735,45 @@ sysctl_remove_name(struct sysctl_oid *parent, const char *name, return (error); } +/* + * Duplicate the provided string, escaping any illegal characters. The result + * must be freed when no longer in use. + * + * The list of illegal characters is ".". + */ +static char* +sysctl_escape_name(const char* orig) +{ + int i, s = 0, d = 0, nillegals = 0; + char *new; + + /* First count the number of illegal characters */ + for (i = 0; orig[i] != '\0'; i++) { + if (orig[i] == '.') + nillegals++; + } + + /* Allocate storage for new string */ + new = malloc(i + 2 * nillegals + 1, M_SYSCTLOID, M_WAITOK); + + /* Copy the name, escaping characters as we go */ + while (orig[s] != '\0') { + if (orig[s] == '.') { + /* %25 is the hexadecimal representation of '.' */ + new[d++] = '%'; + new[d++] = '2'; + new[d++] = '5'; + s++; + } else { + new[d++] = orig[s++]; + } + } + + /* Finally, nul-terminate */ + new[d] = '\0'; + + return (new); +} static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse) @@ -816,14 +856,17 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, const char *label) { struct sysctl_oid *oidp; + char *escaped; /* You have to hook up somewhere.. */ if (parent == NULL) return(NULL); + escaped = sysctl_escape_name(name); /* Check if the node already exists, otherwise create it */ SYSCTL_WLOCK(); - oidp = sysctl_find_oidname(name, parent); + oidp = sysctl_find_oidname(escaped, parent); if (oidp != NULL) { + free(escaped, M_SYSCTLOID); if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { oidp->oid_refcnt++; /* Update the context */ @@ -842,7 +885,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, SLIST_INIT(&oidp->oid_children); oidp->oid_number = number; oidp->oid_refcnt = 1; - oidp->oid_name = strdup(name, M_SYSCTLOID); + oidp->oid_name = escaped; oidp->oid_handler = handler; oidp->oid_kind = CTLFLAG_DYN | kind; oidp->oid_arg1 = arg1; From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 23:04:27 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF8D265F735; Sun, 22 Aug 2021 23:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt9tM5389z4hSd; Sun, 22 Aug 2021 23:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 958D91379; Sun, 22 Aug 2021 23:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MN4ReD044113; Sun, 22 Aug 2021 23:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MN4Rta044112; Sun, 22 Aug 2021 23:04:27 GMT (envelope-from git) Date: Sun, 22 Aug 2021 23:04:27 GMT Message-Id: <202108222304.17MN4Rta044112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 5f468877862c - stable/12 - iostat: fix rounding errors in iostat -x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5f468877862c4ee4e2d94146b924fa0463f926cb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 23:04:27 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5f468877862c4ee4e2d94146b924fa0463f926cb commit 5f468877862c4ee4e2d94146b924fa0463f926cb Author: Alan Somers AuthorDate: 2021-07-08 16:16:32 +0000 Commit: Alan Somers CommitDate: 2021-08-22 23:04:09 +0000 iostat: fix rounding errors in iostat -x Better to round numbers instead of flooring them. Sponsored by: Axcient (cherry picked from commit 61631b24a1347a23cafe0657fba894622b1606e2) --- usr.sbin/iostat/iostat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index e5f746c15284..d1c35063c72f 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -888,17 +888,17 @@ devstats(int perf_select, long double etime, int havelast) mb_per_second_write > ((long double).0005)/1024 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %7d %7d %8.1Lf " - "%8.1Lf %5d %5d %5d %5d " - "%4" PRIu64 " %3.0Lf ", + printf("%-8.8s %7.0Lf %7.0Lf %8.1Lf " + "%8.1Lf %5.0Lf %5.0Lf %5.0Lf %5.0Lf" + " %4" PRIu64 " %3.0Lf ", devicename, - (int)transfers_per_second_read, - (int)transfers_per_second_write, + transfers_per_second_read, + transfers_per_second_write, mb_per_second_read * 1024, mb_per_second_write * 1024, - (int)ms_per_read, (int)ms_per_write, - (int)ms_per_other, - (int)ms_per_transaction, + ms_per_read, ms_per_write, + ms_per_other, + ms_per_transaction, queue_len, busy_pct); else printf("%-8.8s %11.1Lf %11.1Lf " From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 23:05:40 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45CA665F747; Sun, 22 Aug 2021 23:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt9vm1WmZz4j68; Sun, 22 Aug 2021 23:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DA5B12DA; Sun, 22 Aug 2021 23:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MN5evP044309; Sun, 22 Aug 2021 23:05:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MN5eGU044308; Sun, 22 Aug 2021 23:05:40 GMT (envelope-from git) Date: Sun, 22 Aug 2021 23:05:40 GMT Message-Id: <202108222305.17MN5eGU044308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 457516c6ab75 - stable/12 - ftpd: delete dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 457516c6ab758abf47d22fcf520d82bf1be96a26 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 23:05:40 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=457516c6ab758abf47d22fcf520d82bf1be96a26 commit 457516c6ab758abf47d22fcf520d82bf1be96a26 Author: Alan Somers AuthorDate: 2021-07-27 18:14:00 +0000 Commit: Alan Somers CommitDate: 2021-08-22 23:05:32 +0000 ftpd: delete dead code Delete code killed by SVN r13139 in 1996. Little chance that it would still compile today. PR: 257317 Reported by: Alan Shearer Sponsored by: Axcient (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9) --- libexec/ftpd/extern.h | 3 --- libexec/ftpd/ftpd.c | 49 ------------------------------------------------- 2 files changed, 52 deletions(-) diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h index 80d24b46d2e4..aa48ea67e320 100644 --- a/libexec/ftpd/extern.h +++ b/libexec/ftpd/extern.h @@ -59,9 +59,6 @@ char *renamefrom(char *); void reply(int, const char *, ...) __printflike(2, 3); void retrieve(char *, char *); void send_file_list(char *); -#ifdef OLD_SETPROCTITLE -void setproctitle(const char *, ...); -#endif void statcmd(void); void statfilecmd(char *); void store(char *, char *, int); diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 25ae3fba956b..e23c06aaf143 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -205,10 +205,6 @@ int swaitmax = SWAITMAX; int swaitint = SWAITINT; #ifdef SETPROCTITLE -#ifdef OLD_SETPROCTITLE -char **Argv = NULL; /* pointer to argument vector */ -char *LastArgv = NULL; /* end of argv */ -#endif /* OLD_SETPROCTITLE */ char proctitle[LINE_MAX]; /* initial part of title */ #endif /* SETPROCTITLE */ @@ -280,16 +276,6 @@ main(int argc, char *argv[], char **envp) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; -#ifdef OLD_SETPROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ - Argv = argv; - while (*envp) - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); -#endif /* OLD_SETPROCTITLE */ - /* * Prevent diagnostic messages from appearing on stderr. * We run as a daemon or from inetd; in both cases, there's @@ -3329,41 +3315,6 @@ reapchild(int signo) while (waitpid(-1, NULL, WNOHANG) > 0); } -#ifdef OLD_SETPROCTITLE -/* - * Clobber argv so ps will show what we're doing. (Stolen from sendmail.) - * Warning, since this is usually started from inetd.conf, it often doesn't - * have much of an environment or arglist to overwrite. - */ -void -setproctitle(const char *fmt, ...) -{ - int i; - va_list ap; - char *p, *bp, ch; - char buf[LINE_MAX]; - - va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - - /* make ps print our process name */ - p = Argv[0]; - *p++ = '-'; - - i = strlen(buf); - if (i > LastArgv - p - 2) { - i = LastArgv - p - 2; - buf[i] = '\0'; - } - bp = buf; - while (ch = *bp++) - if (ch != '\n' && ch != '\r') - *p++ = ch; - while (p < LastArgv) - *p++ = ' '; -} -#endif /* OLD_SETPROCTITLE */ - static void appendf(char **strp, char *fmt, ...) { From owner-dev-commits-src-branches@freebsd.org Sun Aug 22 23:22:12 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0002D65F519; Sun, 22 Aug 2021 23:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GtBGq6QTYz4msX; Sun, 22 Aug 2021 23:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC58C1665; Sun, 22 Aug 2021 23:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MNMBvY070043; Sun, 22 Aug 2021 23:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MNMBOY070042; Sun, 22 Aug 2021 23:22:11 GMT (envelope-from git) Date: Sun, 22 Aug 2021 23:22:11 GMT Message-Id: <202108222322.17MNMBOY070042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 60d0fd063d34 - stable/11 - ftpd: delete dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 60d0fd063d3497d94f4015fc407f86b13a74b2ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 23:22:12 -0000 The branch stable/11 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=60d0fd063d3497d94f4015fc407f86b13a74b2ff commit 60d0fd063d3497d94f4015fc407f86b13a74b2ff Author: Alan Somers AuthorDate: 2021-07-27 18:14:00 +0000 Commit: Alan Somers CommitDate: 2021-08-22 23:22:00 +0000 ftpd: delete dead code Delete code killed by SVN r13139 in 1996. Little chance that it would still compile today. PR: 257317 Reported by: Alan Shearer Sponsored by: Axcient (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9) --- libexec/ftpd/extern.h | 3 --- libexec/ftpd/ftpd.c | 49 ------------------------------------------------- 2 files changed, 52 deletions(-) diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h index 9d56cb235b4c..022c97f6b6a9 100644 --- a/libexec/ftpd/extern.h +++ b/libexec/ftpd/extern.h @@ -57,9 +57,6 @@ char *renamefrom(char *); void reply(int, const char *, ...) __printflike(2, 3); void retrieve(char *, char *); void send_file_list(char *); -#ifdef OLD_SETPROCTITLE -void setproctitle(const char *, ...); -#endif void statcmd(void); void statfilecmd(char *); void store(char *, char *, int); diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index c057fdc7b500..67181f641494 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -203,10 +203,6 @@ int swaitmax = SWAITMAX; int swaitint = SWAITINT; #ifdef SETPROCTITLE -#ifdef OLD_SETPROCTITLE -char **Argv = NULL; /* pointer to argument vector */ -char *LastArgv = NULL; /* end of argv */ -#endif /* OLD_SETPROCTITLE */ char proctitle[LINE_MAX]; /* initial part of title */ #endif /* SETPROCTITLE */ @@ -278,16 +274,6 @@ main(int argc, char *argv[], char **envp) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; -#ifdef OLD_SETPROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ - Argv = argv; - while (*envp) - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); -#endif /* OLD_SETPROCTITLE */ - /* * Prevent diagnostic messages from appearing on stderr. * We run as a daemon or from inetd; in both cases, there's @@ -3326,41 +3312,6 @@ reapchild(int signo) while (waitpid(-1, NULL, WNOHANG) > 0); } -#ifdef OLD_SETPROCTITLE -/* - * Clobber argv so ps will show what we're doing. (Stolen from sendmail.) - * Warning, since this is usually started from inetd.conf, it often doesn't - * have much of an environment or arglist to overwrite. - */ -void -setproctitle(const char *fmt, ...) -{ - int i; - va_list ap; - char *p, *bp, ch; - char buf[LINE_MAX]; - - va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - - /* make ps print our process name */ - p = Argv[0]; - *p++ = '-'; - - i = strlen(buf); - if (i > LastArgv - p - 2) { - i = LastArgv - p - 2; - buf[i] = '\0'; - } - bp = buf; - while (ch = *bp++) - if (ch != '\n' && ch != '\r') - *p++ = ch; - while (p < LastArgv) - *p++ = ' '; -} -#endif /* OLD_SETPROCTITLE */ - static void appendf(char **strp, char *fmt, ...) {