From owner-svn-src-stable@freebsd.org Sun Jun 17 17:24:58 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4EA51002F56; Sun, 17 Jun 2018 17:24:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 661A4767CF; Sun, 17 Jun 2018 17:24:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45499185AF; Sun, 17 Jun 2018 17:24:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHOwJH022428; Sun, 17 Jun 2018 17:24:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHOwVk022427; Sun, 17 Jun 2018 17:24:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171724.w5HHOwVk022427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335288 - stable/11/sys/dev/drm2/i915 X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/dev/drm2/i915 X-SVN-Commit-Revision: 335288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:24:58 -0000 Author: dim Date: Sun Jun 17 17:24:57 2018 New Revision: 335288 URL: https://svnweb.freebsd.org/changeset/base/335288 Log: MFC r334946: Fix build of i915kms with base gcc Base gcc fails to compile sys/dev/drm2/i915/intel_display.c for i386, with the following -Werror warnings: cc1: warnings being treated as errors /usr/src/sys/dev/drm2/i915/intel_display.c:8884: warning: initialization from incompatible pointer type This is due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432, which incorrectly interprets the [] as a flexible array member. Because base gcc does not have a -W flag to suppress this particular warning, it requires a rather ugly cast. To not influence any other compiler, put it in a #if/#endif block. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D15744 Modified: stable/11/sys/dev/drm2/i915/intel_display.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/i915/intel_display.c ============================================================================== --- stable/11/sys/dev/drm2/i915/intel_display.c Sun Jun 17 17:10:35 2018 (r335287) +++ stable/11/sys/dev/drm2/i915/intel_display.c Sun Jun 17 17:24:57 2018 (r335288) @@ -8872,7 +8872,15 @@ static int intel_dmi_reverse_brightness(const struct d static const struct intel_dmi_quirk intel_dmi_quirks[] = { { - .dmi_id_list = &(const struct dmi_system_id[]) { + .dmi_id_list = +#if !defined(__clang__) && !__GNUC_PREREQ__(4, 3) + /* gcc 4.2 needs an additional cast, to avoid a bogus + * "initialization from incompatible pointer type" warning. + * see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432 + */ + (const struct dmi_system_id (*)[]) +#endif + &(const struct dmi_system_id[]) { { .callback = intel_dmi_reverse_brightness, .ident = "NCR Corporation", From owner-svn-src-stable@freebsd.org Sun Jun 17 17:28:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EEEB10030DC; Sun, 17 Jun 2018 17:28:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 209EB76965; Sun, 17 Jun 2018 17:28:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0214E185B3; Sun, 17 Jun 2018 17:28:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHSR02022701; Sun, 17 Jun 2018 17:28:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHSRKO022700; Sun, 17 Jun 2018 17:28:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171728.w5HHSRKO022700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335289 - in stable: 10/sys/dev/bxe 11/sys/dev/bxe X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/bxe 11/sys/dev/bxe X-SVN-Commit-Revision: 335289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:28:28 -0000 Author: dim Date: Sun Jun 17 17:28:27 2018 New Revision: 335289 URL: https://svnweb.freebsd.org/changeset/base/335289 Log: MFC r334948: Fix build of bxe with base gcc on i386 Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so print these without casting. The kva field of struct bxe_bar is of type vm_offset_t, which can be 32 or 64 bit, so cast it to uintmax_t before printing. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D15733 Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/bxe/bxe.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Sun Jun 17 17:24:57 2018 (r335288) +++ stable/10/sys/dev/bxe/bxe.c Sun Jun 17 17:28:27 2018 (r335289) @@ -12851,12 +12851,12 @@ bxe_allocate_bars(struct bxe_softc *sc) sc->bar[i].handle = rman_get_bushandle(sc->bar[i].resource); sc->bar[i].kva = (vm_offset_t)rman_get_virtual(sc->bar[i].resource); - BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %p-%p (%ld) -> %p\n", + BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %#jx-%#jx (%jd) -> %#jx\n", i, PCIR_BAR(i), - (void *)rman_get_start(sc->bar[i].resource), - (void *)rman_get_end(sc->bar[i].resource), + rman_get_start(sc->bar[i].resource), + rman_get_end(sc->bar[i].resource), rman_get_size(sc->bar[i].resource), - (void *)sc->bar[i].kva); + (uintmax_t)sc->bar[i].kva); } return (0); From owner-svn-src-stable@freebsd.org Sun Jun 17 17:28:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B3F010030D7; Sun, 17 Jun 2018 17:28:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCDF676964; Sun, 17 Jun 2018 17:28:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E2DF185B2; Sun, 17 Jun 2018 17:28:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHSRC5022695; Sun, 17 Jun 2018 17:28:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHSRvM022694; Sun, 17 Jun 2018 17:28:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171728.w5HHSRvM022694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335289 - in stable: 10/sys/dev/bxe 11/sys/dev/bxe X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/bxe 11/sys/dev/bxe X-SVN-Commit-Revision: 335289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:28:28 -0000 Author: dim Date: Sun Jun 17 17:28:27 2018 New Revision: 335289 URL: https://svnweb.freebsd.org/changeset/base/335289 Log: MFC r334948: Fix build of bxe with base gcc on i386 Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so print these without casting. The kva field of struct bxe_bar is of type vm_offset_t, which can be 32 or 64 bit, so cast it to uintmax_t before printing. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D15733 Modified: stable/11/sys/dev/bxe/bxe.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/bxe/bxe.c ============================================================================== --- stable/11/sys/dev/bxe/bxe.c Sun Jun 17 17:24:57 2018 (r335288) +++ stable/11/sys/dev/bxe/bxe.c Sun Jun 17 17:28:27 2018 (r335289) @@ -12819,12 +12819,12 @@ bxe_allocate_bars(struct bxe_softc *sc) sc->bar[i].handle = rman_get_bushandle(sc->bar[i].resource); sc->bar[i].kva = (vm_offset_t)rman_get_virtual(sc->bar[i].resource); - BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %p-%p (%jd) -> %p\n", + BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %#jx-%#jx (%jd) -> %#jx\n", i, PCIR_BAR(i), - (void *)rman_get_start(sc->bar[i].resource), - (void *)rman_get_end(sc->bar[i].resource), + rman_get_start(sc->bar[i].resource), + rman_get_end(sc->bar[i].resource), rman_get_size(sc->bar[i].resource), - (void *)sc->bar[i].kva); + (uintmax_t)sc->bar[i].kva); } return (0); From owner-svn-src-stable@freebsd.org Sun Jun 17 17:32:33 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 478621003492; Sun, 17 Jun 2018 17:32:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE9DB77062; Sun, 17 Jun 2018 17:32:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFCB118747; Sun, 17 Jun 2018 17:32:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHWWnE027421; Sun, 17 Jun 2018 17:32:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHWW7i027419; Sun, 17 Jun 2018 17:32:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171732.w5HHWW7i027419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335291 - stable/11/sys/dev/ocs_fc X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/dev/ocs_fc X-SVN-Commit-Revision: 335291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:32:33 -0000 Author: dim Date: Sun Jun 17 17:32:32 2018 New Revision: 335291 URL: https://svnweb.freebsd.org/changeset/base/335291 Log: MFC r334945: Fix build of ocs_fs with base gcc on i386 Add a few intermediate casts to uintptr_t to suppress "cast to pointer from integer of different size" warnings from gcc. Also remove a few incorrect casts. Reviewed by: ram Differential Revision: https://reviews.freebsd.org/D15747 Modified: stable/11/sys/dev/ocs_fc/ocs_ioctl.c stable/11/sys/dev/ocs_fc/ocs_sport.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ocs_fc/ocs_ioctl.c ============================================================================== --- stable/11/sys/dev/ocs_fc/ocs_ioctl.c Sun Jun 17 17:31:16 2018 (r335290) +++ stable/11/sys/dev/ocs_fc/ocs_ioctl.c Sun Jun 17 17:32:32 2018 (r335291) @@ -140,7 +140,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbo wrobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys); /* copy the data into the DMA buffer */ - copyin((void *)mcmd->in_addr, dma->virt, mcmd->in_bytes); + copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); } break; case SLI4_OPC_COMMON_DELETE_OBJECT: @@ -169,8 +169,8 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbo break; default: device_printf(ocs->dev, "%s: in=%p (%lld) out=%p (%lld)\n", __func__, - (void *)mcmd->in_addr, (unsigned long long)mcmd->in_bytes, - (void *)mcmd->out_addr, (unsigned long long)mcmd->out_bytes); + (void *)(uintptr_t)mcmd->in_addr, (unsigned long long)mcmd->in_bytes, + (void *)(uintptr_t)mcmd->out_addr, (unsigned long long)mcmd->out_bytes); device_printf(ocs->dev, "%s: unknown (opc=%#x)\n", __func__, req->opcode); hexdump(mcmd, mcmd->size, NULL, 0); @@ -184,7 +184,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbo return ENXIO; } - copyin((void *)mcmd->in_addr, dma->virt, mcmd->in_bytes); + copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes); sli_config->payload.mem.address_low = ocs_addr32_lo(dma->phys); sli_config->payload.mem.address_high = ocs_addr32_hi(dma->phys); @@ -250,7 +250,7 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_ if( SLI4_MBOX_COMMAND_SLI_CONFIG == ((sli4_mbox_command_header_t *)mcmd->payload)->command && mcmd->out_bytes && dma.virt) { - copyout(dma.virt, (void *)mcmd->out_addr, mcmd->out_bytes); + copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes); } no_support: Modified: stable/11/sys/dev/ocs_fc/ocs_sport.c ============================================================================== --- stable/11/sys/dev/ocs_fc/ocs_sport.c Sun Jun 17 17:31:16 2018 (r335290) +++ stable/11/sys/dev/ocs_fc/ocs_sport.c Sun Jun 17 17:32:32 2018 (r335291) @@ -781,7 +781,7 @@ __ocs_sport_attached(ocs_sm_ctx_t *ctx, ocs_sm_event_t case OCS_EVT_ENTER: { ocs_node_t *node; - ocs_log_debug(ocs, "[%s] SPORT attached WWPN %016llx WWNN %016llx \n", (unsigned long long)sport->display_name, + ocs_log_debug(ocs, "[%s] SPORT attached WWPN %016llx WWNN %016llx \n", sport->display_name, sport->wwpn, sport->wwnn); ocs_sport_lock(sport); ocs_list_foreach(&sport->node_list, node) { @@ -805,7 +805,7 @@ __ocs_sport_attached(ocs_sm_ctx_t *ctx, ocs_sm_event_t } case OCS_EVT_EXIT: - ocs_log_debug(ocs, "[%s] SPORT deattached WWPN %016llx WWNN %016llx \n", (unsigned long long)sport->display_name, + ocs_log_debug(ocs, "[%s] SPORT deattached WWPN %016llx WWNN %016llx \n", sport->display_name, sport->wwpn, sport->wwnn); if (sport->enable_ini) { ocs_scsi_ini_del_sport(sport); From owner-svn-src-stable@freebsd.org Sun Jun 17 17:35:32 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1D3F10036BF; Sun, 17 Jun 2018 17:35:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93F53772E2; Sun, 17 Jun 2018 17:35:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 752481874D; Sun, 17 Jun 2018 17:35:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHZVfw027683; Sun, 17 Jun 2018 17:35:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHZVZP027682; Sun, 17 Jun 2018 17:35:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171735.w5HHZVZP027682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335292 - stable/11/sys/modules X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/modules X-SVN-Commit-Revision: 335292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:35:32 -0000 Author: dim Date: Sun Jun 17 17:35:30 2018 New Revision: 335292 URL: https://svnweb.freebsd.org/changeset/base/335292 Log: MFC r334947: Disable building aesni with base gcc Because base gcc does not support the required intrinsics, do not attempt to compile the aesni module with it. Noticed by: Dan Allen Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Sun Jun 17 17:32:32 2018 (r335291) +++ stable/11/sys/modules/Makefile Sun Jun 17 17:35:30 2018 (r335292) @@ -632,7 +632,9 @@ _aac= aac _aacraid= aacraid _acpi= acpi .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201 _aesni= aesni +.endif .endif _amd_ecc_inject=amd_ecc_inject _amdsbwd= amdsbwd From owner-svn-src-stable@freebsd.org Sun Jun 17 17:38:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1092310038BF; Sun, 17 Jun 2018 17:38:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7B867760B; Sun, 17 Jun 2018 17:38:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94E171874F; Sun, 17 Jun 2018 17:38:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5HHcOX9028019; Sun, 17 Jun 2018 17:38:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5HHcOus028018; Sun, 17 Jun 2018 17:38:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806171738.w5HHcOus028018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 17 Jun 2018 17:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335293 - stable/11/sys/dev/liquidio X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/dev/liquidio X-SVN-Commit-Revision: 335293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2018 17:38:25 -0000 Author: dim Date: Sun Jun 17 17:38:24 2018 New Revision: 335293 URL: https://svnweb.freebsd.org/changeset/base/335293 Log: MFC r335034: Fix build of liquidio with base gcc on i386 Some casts from pointers to uint64_t and back in lio_main.c cause base gcc on i386 to warn "cast from pointer to integer of different size", and vice versa. Add additional casts to uintptr_t to suppress these. Reviewed by: sbruno Differential Revision: https://reviews.freebsd.org/D15754 Modified: stable/11/sys/dev/liquidio/lio_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/liquidio/lio_main.c ============================================================================== --- stable/11/sys/dev/liquidio/lio_main.c Sun Jun 17 17:35:30 2018 (r335292) +++ stable/11/sys/dev/liquidio/lio_main.c Sun Jun 17 17:38:24 2018 (r335293) @@ -1770,8 +1770,8 @@ lio_setup_glists(struct octeon_device *oct, struct lio if (g == NULL) break; - g->sg = (struct lio_sg_entry *) - ((uint64_t)lio->glists_virt_base[i] + + g->sg = (struct lio_sg_entry *)(uintptr_t) + ((uint64_t)(uintptr_t)lio->glists_virt_base[i] + (j * lio->glist_entry_size)); g->sg_dma_ptr = (uint64_t)lio->glists_dma_base[i] + (j * lio->glist_entry_size); From owner-svn-src-stable@freebsd.org Mon Jun 18 19:35:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61038101C6F9; Mon, 18 Jun 2018 19:35:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10A216E7CE; Mon, 18 Jun 2018 19:35:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5E3C866; Mon, 18 Jun 2018 19:35:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5IJZHRM032353; Mon, 18 Jun 2018 19:35:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5IJZHE3032351; Mon, 18 Jun 2018 19:35:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201806181935.w5IJZHE3032351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Jun 2018 19:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335335 - in stable/11/lib/libc: stdio tests/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/11/lib/libc: stdio tests/stdio X-SVN-Commit-Revision: 335335 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 19:35:18 -0000 Author: cy Date: Mon Jun 18 19:35:17 2018 New Revision: 335335 URL: https://svnweb.freebsd.org/changeset/base/335335 Log: MFC r333895, r334022 r333895: Drop obsolete Buenos Aires Convention. Prompted by: Recent discussion r334022: Drop obsolete Buenos Aires Convention. Modified: stable/11/lib/libc/stdio/gets_s.c stable/11/lib/libc/tests/stdio/gets_s_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdio/gets_s.c ============================================================================== --- stable/11/lib/libc/stdio/gets_s.c Mon Jun 18 19:34:43 2018 (r335334) +++ stable/11/lib/libc/stdio/gets_s.c Mon Jun 18 19:35:17 2018 (r335335) @@ -4,7 +4,7 @@ * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * Copyright (c) 2017, 2018 - * Cyril S. E. Schubert. All rights reserved. + * Cyril S. E. Schubert * * This code is derived from software contributed to Berkeley by * Chris Torek. Modified: stable/11/lib/libc/tests/stdio/gets_s_test.c ============================================================================== --- stable/11/lib/libc/tests/stdio/gets_s_test.c Mon Jun 18 19:34:43 2018 (r335334) +++ stable/11/lib/libc/tests/stdio/gets_s_test.c Mon Jun 18 19:35:17 2018 (r335335) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Cyril S. E. Schubert. All rights reserved. + * Copyright (c) 2017 Cyril S. E. Schubert * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-stable@freebsd.org Mon Jun 18 20:42:54 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B159C1020E45; Mon, 18 Jun 2018 20:42:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60FB172598; Mon, 18 Jun 2018 20:42:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4394C142A; Mon, 18 Jun 2018 20:42:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5IKgsT7069437; Mon, 18 Jun 2018 20:42:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5IKgsGE069436; Mon, 18 Jun 2018 20:42:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806182042.w5IKgsGE069436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 18 Jun 2018 20:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335340 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/10/sys/dev/bxe X-SVN-Commit-Revision: 335340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 20:42:54 -0000 Author: dim Date: Mon Jun 18 20:42:53 2018 New Revision: 335340 URL: https://svnweb.freebsd.org/changeset/base/335340 Log: Follow-up to r335289, which merged r334948 from head, to really fix the bxe build on i386. In the stable/10 branch, the rman functions still use u_long instead of uintmax_t (this was changed in r294883 and r297000), so these have to be printed using the l modifier instead. Pointy hat to: me Noticed by: gjb Modified: stable/10/sys/dev/bxe/bxe.c Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Mon Jun 18 20:32:53 2018 (r335339) +++ stable/10/sys/dev/bxe/bxe.c Mon Jun 18 20:42:53 2018 (r335340) @@ -12851,7 +12851,7 @@ bxe_allocate_bars(struct bxe_softc *sc) sc->bar[i].handle = rman_get_bushandle(sc->bar[i].resource); sc->bar[i].kva = (vm_offset_t)rman_get_virtual(sc->bar[i].resource); - BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %#jx-%#jx (%jd) -> %#jx\n", + BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %#lx-%#lx (%ld) -> %#jx\n", i, PCIR_BAR(i), rman_get_start(sc->bar[i].resource), rman_get_end(sc->bar[i].resource), From owner-svn-src-stable@freebsd.org Tue Jun 19 11:06:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EE571010EFD; Tue, 19 Jun 2018 11:06:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6BD7A2C8; Tue, 19 Jun 2018 11:06:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CEB812A64; Tue, 19 Jun 2018 11:06:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5JB6aDF013761; Tue, 19 Jun 2018 11:06:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5JB6arZ013760; Tue, 19 Jun 2018 11:06:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806191106.w5JB6arZ013760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 19 Jun 2018 11:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335363 - stable/11/sys/compat/linuxkpi/common/include/net X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/net X-SVN-Commit-Revision: 335363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 11:06:37 -0000 Author: hselasky Date: Tue Jun 19 11:06:36 2018 New Revision: 335363 URL: https://svnweb.freebsd.org/changeset/base/335363 Log: MFC r334993: Implement the ip_eth_mc_map() function in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/net/ip.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/net/ip.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/net/ip.h Tue Jun 19 10:34:45 2018 (r335362) +++ stable/11/sys/compat/linuxkpi/common/include/net/ip.h Tue Jun 19 11:06:36 2018 (r335363) @@ -58,6 +58,20 @@ inet_get_local_port_range(struct vnet *vnet, int *low, } static inline void +ip_eth_mc_map(uint32_t addr, char *buf) +{ + + addr = ntohl(addr); + + buf[0] = 0x01; + buf[1] = 0x00; + buf[2] = 0x5e; + buf[3] = (addr >> 16) & 0x7f; + buf[4] = (addr >> 8) & 0xff; + buf[5] = (addr & 0xff); +} + +static inline void ip_ib_mc_map(uint32_t addr, const unsigned char *bcast, char *buf) { unsigned char scope; From owner-svn-src-stable@freebsd.org Tue Jun 19 17:11:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF84D100118B; Tue, 19 Jun 2018 17:11:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A277D6B788; Tue, 19 Jun 2018 17:11:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83843167EC; Tue, 19 Jun 2018 17:11:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5JHBss6002456; Tue, 19 Jun 2018 17:11:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5JHBsVd002455; Tue, 19 Jun 2018 17:11:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806191711.w5JHBsVd002455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 19 Jun 2018 17:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335375 - stable/11/usr.bin/elfdump X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.bin/elfdump X-SVN-Commit-Revision: 335375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 17:11:55 -0000 Author: emaste Date: Tue Jun 19 17:11:53 2018 New Revision: 335375 URL: https://svnweb.freebsd.org/changeset/base/335375 Log: MFC r334363: elfdump: chase ABI tag note name change from r232832 r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag. Follow suit in elfdump. Elfdump's note parsing is very basic and should be significantly reworked, but for now just restore the broken functionality. PR: 228290 Submitted by: martin at lispworks.com Modified: stable/11/usr.bin/elfdump/elfdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/11/usr.bin/elfdump/elfdump.c Tue Jun 19 16:55:39 2018 (r335374) +++ stable/11/usr.bin/elfdump/elfdump.c Tue Jun 19 17:11:53 2018 (r335375) @@ -663,7 +663,7 @@ main(int ac, char **av) case SHT_NOTE: name = elf_get_word(e, v, SH_NAME); if (flags & ED_NOTE && - strcmp(shstrtab + name, ".note.ABI-tag") == 0) + strcmp(shstrtab + name, ".note.tag") == 0) elf_print_note(e, v); break; case SHT_DYNSYM: From owner-svn-src-stable@freebsd.org Wed Jun 20 05:10:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59EA510000DC; Wed, 20 Jun 2018 05:10:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC0287535; Wed, 20 Jun 2018 05:10:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD5221DCA6; Wed, 20 Jun 2018 05:10:30 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K5AUAt073752; Wed, 20 Jun 2018 05:10:30 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K5AURT073751; Wed, 20 Jun 2018 05:10:30 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806200510.w5K5AURT073751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 20 Jun 2018 05:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335405 - stable/11/usr.sbin/sysrc X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/usr.sbin/sysrc X-SVN-Commit-Revision: 335405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 05:10:31 -0000 Author: dteske Date: Wed Jun 20 05:10:30 2018 New Revision: 335405 URL: https://svnweb.freebsd.org/changeset/base/335405 Log: MFC r335277: sysrc(8): Exit with failure on API error Fix exit status when f_sysrc_set() fails. Errors in the underlying API provided by bsdconfig(8) -- /usr/share/bsdconfig/sysrc.subr -- were not being communicated back to the command-line. This was affecting ansible modules using sysrc as they were not able to accurately test for error. PR: bin/211448 Reported by: Christian Schwarz Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/sysrc/sysrc Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sysrc/sysrc ============================================================================== --- stable/11/usr.sbin/sysrc/sysrc Wed Jun 20 03:31:19 2018 (r335404) +++ stable/11/usr.sbin/sysrc/sysrc Wed Jun 20 05:10:30 2018 (r335405) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010-2016 Devin Teske +# Copyright (c) 2010-2018 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="7.1 Feb-2,2016" +SYSRC_VERSION="7.2 Jun-16,2018" # # Options @@ -842,7 +842,7 @@ while [ $# -gt 0 ]; do # if [ ! "$SHOW_VALUE" ]; then echo "$NAME" - f_sysrc_set "$NAME" "$new" + f_sysrc_set "$NAME" "$new" || status=$FAILURE else if f_sysrc_set "$NAME" "$new"; then if [ "$SHOW_FILE" ]; then @@ -854,6 +854,8 @@ while [ $# -gt 0 ]; do echo -n "$before${SHOW_EQUALS:+\" #}" echo -n " -> ${SHOW_EQUALS:+\"}$after" echo "${SHOW_EQUALS:+\"}" + else + status=$FAILURE fi fi ;; From owner-svn-src-stable@freebsd.org Wed Jun 20 05:45:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E52C1001B6D; Wed, 20 Jun 2018 05:45:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A09E686F7; Wed, 20 Jun 2018 05:45:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 087C41E2F1; Wed, 20 Jun 2018 05:45:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K5jfLu094125; Wed, 20 Jun 2018 05:45:41 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K5jfa7094123; Wed, 20 Jun 2018 05:45:41 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806200545.w5K5jfa7094123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 20 Jun 2018 05:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335406 - stable/11/lib/libdpv X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/lib/libdpv X-SVN-Commit-Revision: 335406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 05:45:42 -0000 Author: dteske Date: Wed Jun 20 05:45:41 2018 New Revision: 335406 URL: https://svnweb.freebsd.org/changeset/base/335406 Log: dpv(3): MFC r330943, r335264 r330943: Fix bad error messages from dpv(3) Before = dpv: <__func__>: posix_spawnp(3): No such file or directory After = dpv: : No such file or directory Most notably, show the 2nd argument being passed to posix_spawnp(3) so we know what path/cmd failed. Also, we don't need to have "posix_spawnp(3)" in the error message nor the function because that can [a] change and [b] traversed using a debugger if necessary. r335264: Fix comparison between pointer and char literal PR: misc/204252 Reported by: David Binderman Sponsored by: Smule, Inc. Modified: stable/11/lib/libdpv/dialog_util.c stable/11/lib/libdpv/dprompt.c stable/11/lib/libdpv/util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libdpv/dialog_util.c ============================================================================== --- stable/11/lib/libdpv/dialog_util.c Wed Jun 20 05:10:30 2018 (r335405) +++ stable/11/lib/libdpv/dialog_util.c Wed Jun 20 05:45:41 2018 (r335406) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -328,8 +328,7 @@ dialog_spawn_gauge(char *init_prompt, pid_t *pid) posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, dialog, &action, (const posix_spawnattr_t *)NULL, dargv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", dialog); /* NB: Do not free(3) *dargv[], else SIGSEGV */ Modified: stable/11/lib/libdpv/dprompt.c ============================================================================== --- stable/11/lib/libdpv/dprompt.c Wed Jun 20 05:10:30 2018 (r335405) +++ stable/11/lib/libdpv/dprompt.c Wed Jun 20 05:45:41 2018 (r335406) @@ -89,7 +89,7 @@ spin_char(void) { char ch; - if (spin_cp == '\0') + if (*spin_cp == '\0') spin_cp = spin; ch = *spin_cp; Modified: stable/11/lib/libdpv/util.c ============================================================================== --- stable/11/lib/libdpv/util.c Wed Jun 20 05:10:30 2018 (r335405) +++ stable/11/lib/libdpv/util.c Wed Jun 20 05:45:41 2018 (r335406) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -100,8 +100,7 @@ shell_spawn_pipecmd(const char *cmd, const char *label posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, shellcmd, &action, (const posix_spawnattr_t *)NULL, shellcmd_argv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", shellcmd); return stdin_pipe[1]; } From owner-svn-src-stable@freebsd.org Wed Jun 20 05:50:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C4941001EC5; Wed, 20 Jun 2018 05:50:56 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF2A068BE0; Wed, 20 Jun 2018 05:50:55 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1DDF1E30B; Wed, 20 Jun 2018 05:50:55 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K5otR6094417; Wed, 20 Jun 2018 05:50:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K5otP1094414; Wed, 20 Jun 2018 05:50:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806200550.w5K5otP1094414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 20 Jun 2018 05:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335407 - stable/10/lib/libdpv X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10/lib/libdpv X-SVN-Commit-Revision: 335407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 05:50:56 -0000 Author: dteske Date: Wed Jun 20 05:50:54 2018 New Revision: 335407 URL: https://svnweb.freebsd.org/changeset/base/335407 Log: dpv(3): MFC r330943, r335264 r330943: Fix bad error messages from dpv(3) Before = dpv: <__func__>: posix_spawnp(3): No such file or directory After = dpv: : No such file or directory Most notably, show the 2nd argument being passed to posix_spawnp(3) so we know what path/cmd failed. Also, we don't need to have "posix_spawnp(3)" in the error message nor the function because that can [a] change and [b] traversed using a debugger if necessary. r335264: Fix comparison between pointer and char literal PR: misc/204252 Reported by: David Binderman Sponsored by: Smule, Inc. Modified: stable/10/lib/libdpv/dialog_util.c stable/10/lib/libdpv/dprompt.c stable/10/lib/libdpv/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdpv/dialog_util.c ============================================================================== --- stable/10/lib/libdpv/dialog_util.c Wed Jun 20 05:45:41 2018 (r335406) +++ stable/10/lib/libdpv/dialog_util.c Wed Jun 20 05:50:54 2018 (r335407) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -328,8 +328,7 @@ dialog_spawn_gauge(char *init_prompt, pid_t *pid) posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, dialog, &action, (const posix_spawnattr_t *)NULL, dargv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", dialog); /* NB: Do not free(3) *dargv[], else SIGSEGV */ Modified: stable/10/lib/libdpv/dprompt.c ============================================================================== --- stable/10/lib/libdpv/dprompt.c Wed Jun 20 05:45:41 2018 (r335406) +++ stable/10/lib/libdpv/dprompt.c Wed Jun 20 05:50:54 2018 (r335407) @@ -89,7 +89,7 @@ spin_char(void) { char ch; - if (spin_cp == '\0') + if (*spin_cp == '\0') spin_cp = spin; ch = *spin_cp; Modified: stable/10/lib/libdpv/util.c ============================================================================== --- stable/10/lib/libdpv/util.c Wed Jun 20 05:45:41 2018 (r335406) +++ stable/10/lib/libdpv/util.c Wed Jun 20 05:50:54 2018 (r335407) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -100,8 +100,7 @@ shell_spawn_pipecmd(const char *cmd, const char *label posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, shellcmd, &action, (const posix_spawnattr_t *)NULL, shellcmd_argv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", shellcmd); return stdin_pipe[1]; } From owner-svn-src-stable@freebsd.org Wed Jun 20 06:11:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9F1210031DC; Wed, 20 Jun 2018 06:11:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E558698F5; Wed, 20 Jun 2018 06:11:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55A4B1E792; Wed, 20 Jun 2018 06:11:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6BqLj008281; Wed, 20 Jun 2018 06:11:52 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6Bp4f008276; Wed, 20 Jun 2018 06:11:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806200611.w5K6Bp4f008276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 20 Jun 2018 06:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335408 - in stable/11: lib/libdpv lib/libfigpar usr.bin/dpv usr.sbin/bsdconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: in stable/11: lib/libdpv lib/libfigpar usr.bin/dpv usr.sbin/bsdconfig X-SVN-Commit-Revision: 335408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:11:53 -0000 Author: dteske Date: Wed Jun 20 06:11:51 2018 New Revision: 335408 URL: https://svnweb.freebsd.org/changeset/base/335408 Log: MFC r330878-r330879, r330939, r330948: Man-page updates r330878: Fix typo and lint/igor warnings r330879: Fix lint/igor warnings r330939: Use full month in dpv(3), figpar(3), and bsdconfig(8) manuals r330948: Bump copyright following recent changes Sponsored by: Smule, Inc. Modified: stable/11/lib/libdpv/dpv.3 stable/11/lib/libfigpar/figpar.3 stable/11/usr.bin/dpv/dpv.1 stable/11/usr.sbin/bsdconfig/bsdconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libdpv/dpv.3 ============================================================================== --- stable/11/lib/libdpv/dpv.3 Wed Jun 20 05:50:54 2018 (r335407) +++ stable/11/lib/libdpv/dpv.3 Wed Jun 20 06:11:51 2018 (r335408) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2016 Devin Teske +.\" Copyright (c) 2013-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 26, 2016 +.Dd March 13, 2018 .Dt DPV 3 .Os .Sh NAME @@ -36,7 +36,8 @@ .In dpv.h .Ft int .Fo dpv -.Fa "struct dpv_config *config, struct dpv_file_node *file_list" +.Fa "struct dpv_config *config" +.Fa "struct dpv_file_node *file_list" .Fc .Ft void .Fo dpv_free @@ -60,8 +61,7 @@ or The .Fn dpv .Fa config -argument contains the following properties for configuring global display -features: +argument properties for configuring global display features: .Bd -literal -offset indent struct dpv_config { uint8_t keep_tite; /* Cleaner exit for scripts */ @@ -113,11 +113,12 @@ member of the .Fn dpv .Fa config argument is a mask of bit fields indicating various processing options. -Possible flags are as follows: +Possible flags are: .Bl -tag -width DPV_NO_OVERRUN .It Dv DPV_TEST_MODE Enable test mode. -In test mode, the +In test mode, +the .Fn action callback of the .Fa config @@ -126,18 +127,21 @@ Appends .Dq [TEST MODE] to the status line .Po -to override, set the +to override, +set the .Va status_format member of the .Fn dpv .Fa config argument; -e.g., to +for example, +to .Dv DPV_STATUS_DEFAULT .Pc . .It Dv DPV_WIDE_MODE Enable wide mode. -In wide mode, the length of the +In wide mode, +the length of the .Va aprompt and .Va pprompt @@ -169,7 +173,8 @@ does not support color environment variable is ignored .Pc . .It Dv DPV_NO_OVERRUN -When enabled, callbacks for the current +When enabled, +callbacks for the current .Vt dpv_file_node are terminated when .Fn action @@ -189,7 +194,7 @@ argument to .Fn dpv is a pointer to a .Dq linked-list , -described as follows in +described in .In dpv.h : .Bd -literal -offset indent struct dpv_file_node { @@ -206,7 +211,8 @@ struct dpv_file_node { For each of the items in the .Fa file_list .Dq linked-list -argument, the +argument, +the .Fn action callback member of the .Fn dpv @@ -214,7 +220,7 @@ callback member of the argument is called. The .Fn action -function should perform a +function performs a .Dq nominal action on the file and return. The return value of @@ -231,7 +237,7 @@ provides a reference to the current .Vt dpv_file_node being processed. .Fa out -provides a file descriptor where the data should go. +provides a file descriptor where the data goes. .Pp If the .Va output @@ -244,7 +250,7 @@ the .Fa out file descriptor of .Fn action -will be zero and should be ignored. +will be zero and can be ignored. If .Fa output was set to DPV_OUTPUT_FILE, @@ -257,14 +263,16 @@ was set to DPV_OUTPUT_SHELL, will be an open file descriptor to a pipe for a spawned shell program. When .Fa out -is greater than zero, you should write any data you have read back to +is greater than zero, +write data that has been read back to .Fa out . .Pp To abort .Fn dpv , either from the .Fn action -callback or asynchronously from a signal handler, two globals are provided via +callback or asynchronously from a signal handler, +two globals are provided via .In dpv.h : .Bd -literal -offset indent extern int dpv_interrupt; /* Set to TRUE in interrupt handler */ @@ -272,11 +280,12 @@ extern int dpv_abort; /* Set to true in callback t .Ed .Pp These globals are not automatically reset and must be manually maintained. -Don't forget to reset these globals before subsequent invocations of +Do not forget to reset these globals before subsequent invocations of .Fn dpv when making multiple calls from the same program. .Pp -In addition, the +In addition, +the .Va status member of the .Fn action @@ -284,7 +293,7 @@ member of the argument can be used to control callbacks for the current file. The .Va status -member can be set to any of the following from +member can be set to any of the below from .In dpv.h : .Bd -literal -offset indent enum dpv_status { @@ -296,13 +305,17 @@ enum dpv_status { .Pp The default .Fa status -is zero, DPV_STATUS_RUNING, which keeps the callbacks coming for the current +is zero, +DPV_STATUS_RUNNING, +which keeps the callbacks coming for the current .Fn file . Setting .Ql file->status to anything other than DPV_STATUS_RUNNING will cause .Fn dpv -to loop to the next file, effecting the next callback, if any. +to loop to the next file, +effecting the next callback, +if any. .Pp The .Fn action @@ -318,7 +331,7 @@ Percentages are reported through the return value of the .Fn action callback. -Throughput statistics are calculated from the following global +Throughput statistics are calculated from the below global .Vt int in .In dpv.h : @@ -326,7 +339,7 @@ in extern int dpv_overall_read; .Ed .Pp -This should be set to the number of bytes that have been read for all files. +Set this to the number of bytes that have been read for all files. Throughput information is displayed in the status line .Pq only available when using Xr dialog 3 at the bottom of the screen. @@ -335,18 +348,20 @@ See DPV_DISPLAY_LIBDIALOG above. Note that .Va dpv_overall_read does not have to represent bytes. -For example, you can change the +For example, +the .Va status_format -to display something other than +can be changed to display something other than .Dq Li bytes and increment .Va dpv_overall_read accordingly -.Pq e.g., counting lines . +.Pq for example, counting lines . .Pp When .Fn dpv -is processing the current file, the +is processing the current file, +the .Va length and .Va read @@ -355,7 +370,8 @@ members of the .Fa file argument are used for calculating the display of mini progress bars .Po -if enabled; see +if enabled; +see .Va pbar_size above .Pc . @@ -381,7 +397,7 @@ function performs on private global variables initialized by .Fn dpv . .Sh ENVIRONMENT -The following environment variables are referenced by +The below environment variables are referenced by .Nm : .Bl -tag -width ".Ev USE_COLOR" .It Ev DIALOG @@ -398,17 +414,20 @@ or .Ql Xdialog .Pq for Dv DPV_DISPLAY_XDIALOG . .It Ev DIALOGRC -If set and non-NULL, path to +If set and non-NULL, +path to .Ql .dialogrc file. .It Ev HOME If .Ql Ev $DIALOGRC -is either not set or NULL, used as a prefix to +is either not set or NULL, +used as a prefix to .Ql .dialogrc -.Pq i.e., Ql $HOME/.dialogrc . +.Pq that is, Ql $HOME/.dialogrc . .It Ev USE_COLOR -If set and NULL, disables the use of color when using +If set and NULL, +disables the use of color when using .Xr dialog 1 .Pq does not apply to Xr Xdialog 1 . .It Ev msg_done Ev msg_fail Ev msg_pending @@ -418,7 +437,8 @@ Internationalization strings for overriding the defaul and .Ql Pending respectively. -To prevent their usage, explicitly set the +To prevent their usage, +explicitly set the .Va msg_done , .Va msg_fail , and @@ -471,11 +491,11 @@ This is a known issue with the .Ql --gauge widget in .Xr Xdialog 1 . -Embed escaped newlines within prompt text(s) to force line breaks. +Embed escaped newlines within prompt text to force line breaks. .Pp .Xr dialog 1 does not display the first character after a series of escaped escape-sequences -(e.g., ``\\\\n'' produces ``\\'' instead of ``\\n''). +(for example, ``\\\\n'' produces ``\\'' instead of ``\\n''). This is a known issue with .Xr dialog 1 and does not affect @@ -483,10 +503,10 @@ and does not affect or .Xr Xdialog 1 . .Pp -If your application ignores +If an application ignores .Ev USE_COLOR when set and NULL before calling -.Xr dpv 3 +.Fn dpv with color escape sequences anyway, .Xr dialog 3 and Modified: stable/11/lib/libfigpar/figpar.3 ============================================================================== --- stable/11/lib/libfigpar/figpar.3 Wed Jun 20 05:50:54 2018 (r335407) +++ stable/11/lib/libfigpar/figpar.3 Wed Jun 20 06:11:51 2018 (r335408) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Nov 2, 2015 +.Dd March 13, 2018 .Dt FIGPAR 3 .Os .Sh NAME @@ -38,22 +38,30 @@ .In figpar.h .Ft int .Fo parse_config -.Fa "struct figpar_config options[], const char *path" -.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct figpar_config *option, uint32_t line" -.Fa "char *directive, char *value\*[rp], uint8_t processing_options" +.Fa "struct figpar_config options[]" +.Fa "const char *path" +.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct figpar_config *option" +.Fa "uint32_t line" +.Fa "char *directive" +.Fa "char *value\*[rp]" +.Fa "uint8_t processing_options" .Fc .Ft "struct figpar_config *" .Fo get_config_option -.Fa "struct figpar_config options[], const char *directive" +.Fa "struct figpar_config options[]" +.Fa "const char *directive" .Fc .In string_m.h .Ft int .Fo replaceall -.Fa "char *source, const char *find, const char *replace" +.Fa "char *source" +.Fa "const char *find" +.Fa "const char *replace" .Fc .Ft unsigned int .Fo strcount -.Fa "const char *source, const char *find" +.Fa "const char *source" +.Fa "const char *find" .Fc .Ft void .Fo strexpand @@ -70,7 +78,8 @@ .Sh DESCRIPTION The .Nm -library provides a light-weight, portable framework for parsing configuration +library provides a light-weight, +portable framework for parsing configuration files. The library uses .Xr open 2 , @@ -87,8 +96,9 @@ provides raw data to a set of callback functions. These callback functions can in-turn initiate abort through their return value, allowing custom syntax validation during parsing. .Pp -Configuration directives, types, and callback functions are provided through -data structures defined in +Configuration directives, +types, +and callback functions are provided through data structures defined in .In figpar.h : .Bd -literal -offset indent struct figpar_config { @@ -132,7 +142,7 @@ argument to .Fn parse_config is a mask of bit fields which indicate various processing options. -The possible flags are as follows: +The possible flags are: .Bl -tag -width FIGPAR_BREAK_ON_SEMICOLON .It Dv FIGPAR_BREAK_ON_EQUALS An equals sign @@ -151,7 +161,8 @@ Normally directives are matched case insensitively usi .Xr fnmatch 3 . This flag enables directive matching to be case sensitive. .It Dv FIGPAR_REQUIRE_EQUALS -If a directive is not followed by an equals, processing is aborted. +If a directive is not followed by an equals, +processing is aborted. .It Dv FIGPAR_STRICT_EQUALS Equals must be part of the directive to be considered a delimiter between directive and value. @@ -159,7 +170,7 @@ directive and value. .Pp The .Fa options -struct array pointer can be NULL and every directive will invoke the +struct array pointer can be NULL and every directive will run the .Fn unknown function argument. .Pp @@ -168,13 +179,16 @@ The directive for each figpar_config item in the options argument is matched against each parsed directive using .Xr fnmatch 3 until a match is found. -If a match is found, the +If a match is found, +the .Fn action -function for that figpar_config directive is invoked with the line number, -directive, and value. -Otherwise if no match, the +function for that figpar_config directive is run with the line number, +directive, +and value. +Otherwise if no match, +the .Fn unknown -function is invoked +function is run .Pq with the same arguments . .Pp If either @@ -197,19 +211,20 @@ is entirely optional as-is the use of .Fa "enum figpar_cfgtype" or .Fa "union figpar_cfgvalue" . -For example, you could choose to pass a NULL pointer to +For example, +a NULL pointer can be passed to .Fn parse_config -for the first argument and then provide a simple +for the first argument while providing a simple .Fa unknown function based on .Xr queue 3 -that populates a singly-linked list of your own struct containing the +that populates a singly-linked list of a struct containing the .Fa directive and .Fa value . .Pp -In addition, the following miscellaneous string manipulation routines are -provided by +In addition, +miscellaneous string manipulation routines are provided by .In string_m.h : .Bl -tag -width strexpandnl() .It Fn replaceall @@ -224,8 +239,7 @@ Count the number of occurrences of one string that app .Fa source string. Return value is the total count. -An example use would be if you need to know how large a block of memory needs -to be for a +An example use would be to show how large a block of memory needs to be for a .Fn replaceall series. .It Fn strexpand Modified: stable/11/usr.bin/dpv/dpv.1 ============================================================================== --- stable/11/usr.bin/dpv/dpv.1 Wed Jun 20 05:50:54 2018 (r335407) +++ stable/11/usr.bin/dpv/dpv.1 Wed Jun 20 06:11:51 2018 (r335408) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 26, 2016 +.Dd January 26, 2016 .Dt DPV 1 .Os .Sh NAME Modified: stable/11/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- stable/11/usr.sbin/bsdconfig/bsdconfig.8 Wed Jun 20 05:50:54 2018 (r335407) +++ stable/11/usr.sbin/bsdconfig/bsdconfig.8 Wed Jun 20 06:11:51 2018 (r335408) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jun 5, 2013 +.Dd June 5, 2013 .Dt BSDCONFIG 8 .Os .Sh NAME From owner-svn-src-stable@freebsd.org Wed Jun 20 06:24:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 144451003C48; Wed, 20 Jun 2018 06:24:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BADDC6A2A4; Wed, 20 Jun 2018 06:24:03 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BB641E94B; Wed, 20 Jun 2018 06:24:03 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6O3wS015063; Wed, 20 Jun 2018 06:24:03 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6O318015062; Wed, 20 Jun 2018 06:24:03 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806200624.w5K6O318015062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 20 Jun 2018 06:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335409 - stable/11/usr.sbin/sysrc X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/usr.sbin/sysrc X-SVN-Commit-Revision: 335409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:24:04 -0000 Author: dteske Date: Wed Jun 20 06:24:03 2018 New Revision: 335409 URL: https://svnweb.freebsd.org/changeset/base/335409 Log: MFC r334303: sysrc(8): Test variable names for invalid characters PR: bin/187461 Reported by: ebay@looksharp.net Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/sysrc/sysrc Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sysrc/sysrc ============================================================================== --- stable/11/usr.sbin/sysrc/sysrc Wed Jun 20 06:11:51 2018 (r335408) +++ stable/11/usr.sbin/sysrc/sysrc Wed Jun 20 06:24:03 2018 (r335409) @@ -370,6 +370,18 @@ if [ "$LIST_SERVICE_CONFS" ]; then fi # +# Validate arguments +# +for name in "$@"; do + # NB: shell expansion syntax removed first + name="${name%%:[+=-]*}" + name="${name%%[%#+=-]*}" + [ "$name" = "${name#*[!$VALID_VARNAME_CHARS]}" ] || die \ + "%s: %s: name contains characters not allowed in shell" \ + "$pgm" "$name" +done + +# # Process `-s name' argument # if [ "$SERVICE" -a ! "${RC_CONFS+set}" ]; then From owner-svn-src-stable@freebsd.org Wed Jun 20 06:34:32 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59ED81004360; Wed, 20 Jun 2018 06:34:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0656A86D; Wed, 20 Jun 2018 06:34:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB1E21EAD9; Wed, 20 Jun 2018 06:34:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6YVv4020399; Wed, 20 Jun 2018 06:34:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6YVcd020398; Wed, 20 Jun 2018 06:34:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200634.w5K6YVcd020398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335410 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:34:32 -0000 Author: hselasky Date: Wed Jun 20 06:34:31 2018 New Revision: 335410 URL: https://svnweb.freebsd.org/changeset/base/335410 Log: MFC r334481: Add more GFP macro definitions in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/gfp.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/gfp.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jun 20 06:24:03 2018 (r335409) +++ stable/11/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jun 20 06:34:31 2018 (r335410) @@ -49,6 +49,9 @@ #define __GFP_NORETRY 0 #define __GFP_RECLAIM 0 #define __GFP_RECLAIMABLE 0 +#define __GFP_RETRY_MAYFAIL 0 +#define __GFP_MOVABLE 0 +#define __GFP_COMP 0 #define __GFP_IO 0 #define __GFP_NO_KSWAPD 0 @@ -56,6 +59,7 @@ #define __GFP_DMA32 (1U << 24) /* LinuxKPI only */ #define __GFP_BITS_SHIFT 25 #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) +#define __GFP_NOFAIL M_WAITOK #define GFP_NOWAIT M_NOWAIT #define GFP_ATOMIC (M_NOWAIT | M_USE_RESERVE) @@ -68,6 +72,7 @@ #define GFP_DMA32 __GFP_DMA32 #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) +#define GFP_TRANSHUGE 0 CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0); CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK); From owner-svn-src-stable@freebsd.org Wed Jun 20 06:35:38 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8758210044D2; Wed, 20 Jun 2018 06:35:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38B006A9FB; Wed, 20 Jun 2018 06:35:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19C121EADA; Wed, 20 Jun 2018 06:35:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6ZbxZ020514; Wed, 20 Jun 2018 06:35:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6ZbNN020513; Wed, 20 Jun 2018 06:35:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200635.w5K6ZbNN020513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335411 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 335411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:35:38 -0000 Author: hselasky Date: Wed Jun 20 06:35:37 2018 New Revision: 335411 URL: https://svnweb.freebsd.org/changeset/base/335411 Log: MFC r334482: Improve high resolution timer support in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/hrtimer.h stable/11/sys/compat/linuxkpi/common/src/linux_hrtimer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/hrtimer.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/hrtimer.h Wed Jun 20 06:34:31 2018 (r335410) +++ stable/11/sys/compat/linuxkpi/common/include/linux/hrtimer.h Wed Jun 20 06:35:37 2018 (r335411) @@ -37,6 +37,7 @@ enum hrtimer_mode { HRTIMER_MODE_REL, + HRTIMER_MODE_REL_PINNED = HRTIMER_MODE_REL, }; enum hrtimer_restart { @@ -48,31 +49,42 @@ struct hrtimer { enum hrtimer_restart (*function)(struct hrtimer *); struct mtx mtx; struct callout callout; + s64 expires; /* relative time in nanoseconds */ + s64 precision; /* in nanoseconds */ }; #define hrtimer_active(hrtimer) linux_hrtimer_active(hrtimer) #define hrtimer_cancel(hrtimer) linux_hrtimer_cancel(hrtimer) + #define hrtimer_init(hrtimer, clock, mode) do { \ CTASSERT((clock) == CLOCK_MONOTONIC); \ CTASSERT((mode) == HRTIMER_MODE_REL); \ linux_hrtimer_init(hrtimer); \ } while (0) + #define hrtimer_set_expires(hrtimer, time) \ linux_hrtimer_set_expires(hrtimer, time) + #define hrtimer_start(hrtimer, time, mode) do { \ CTASSERT((mode) == HRTIMER_MODE_REL); \ linux_hrtimer_start(hrtimer, time); \ } while (0) + #define hrtimer_start_range_ns(hrtimer, time, prec, mode) do { \ CTASSERT((mode) == HRTIMER_MODE_REL); \ linux_hrtimer_start_range_ns(hrtimer, time, prec); \ } while (0) +#define hrtimer_forward_now(hrtimer, interval) do { \ + linux_hrtimer_forward_now(hrtimer, interval); \ +} while (0) + bool linux_hrtimer_active(struct hrtimer *); int linux_hrtimer_cancel(struct hrtimer *); void linux_hrtimer_init(struct hrtimer *); void linux_hrtimer_set_expires(struct hrtimer *, ktime_t); void linux_hrtimer_start(struct hrtimer *, ktime_t); void linux_hrtimer_start_range_ns(struct hrtimer *, ktime_t, int64_t); +void linux_hrtimer_forward_now(struct hrtimer *, ktime_t); #endif /* _LINUX_HRTIMER_H_ */ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_hrtimer.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_hrtimer.c Wed Jun 20 06:34:31 2018 (r335410) +++ stable/11/sys/compat/linuxkpi/common/src/linux_hrtimer.c Wed Jun 20 06:35:37 2018 (r335411) @@ -45,8 +45,13 @@ hrtimer_call_handler(void *arg) hrtimer = arg; ret = hrtimer->function(hrtimer); - MPASS(ret == HRTIMER_NORESTART); - callout_deactivate(&hrtimer->callout); + + if (ret == HRTIMER_RESTART) { + callout_schedule_sbt(&hrtimer->callout, + nstosbt(hrtimer->expires), nstosbt(hrtimer->precision), 0); + } else { + callout_deactivate(&hrtimer->callout); + } } bool @@ -57,6 +62,7 @@ linux_hrtimer_active(struct hrtimer *hrtimer) mtx_lock(&hrtimer->mtx); ret = callout_active(&hrtimer->callout); mtx_unlock(&hrtimer->mtx); + return (ret); } @@ -75,15 +81,16 @@ void linux_hrtimer_init(struct hrtimer *hrtimer) { - hrtimer->function = NULL; - mtx_init(&hrtimer->mtx, "hrtimer", NULL, MTX_DEF | MTX_RECURSE); + memset(hrtimer, 0, sizeof(*hrtimer)); + mtx_init(&hrtimer->mtx, "hrtimer", NULL, + MTX_DEF | MTX_RECURSE | MTX_NOWITNESS); callout_init_mtx(&hrtimer->callout, &hrtimer->mtx, 0); } void -linux_hrtimer_set_expires(struct hrtimer *hrtimer __unused, - ktime_t time __unused) +linux_hrtimer_set_expires(struct hrtimer *hrtimer, ktime_t time) { + hrtimer->expires = ktime_to_ns(time); } void @@ -94,11 +101,24 @@ linux_hrtimer_start(struct hrtimer *hrtimer, ktime_t t } void -linux_hrtimer_start_range_ns(struct hrtimer *hrtimer, ktime_t time, int64_t nsec) +linux_hrtimer_start_range_ns(struct hrtimer *hrtimer, ktime_t time, + int64_t nsec) { mtx_lock(&hrtimer->mtx); - callout_reset_sbt(&hrtimer->callout, nstosbt(time), nstosbt(nsec), - hrtimer_call_handler, hrtimer, 0); + hrtimer->precision = nsec; + callout_reset_sbt(&hrtimer->callout, nstosbt(ktime_to_ns(time)), + nstosbt(nsec), hrtimer_call_handler, hrtimer, 0); mtx_unlock(&hrtimer->mtx); } + +void +linux_hrtimer_forward_now(struct hrtimer *hrtimer, ktime_t interval) +{ + + mtx_lock(&hrtimer->mtx); + callout_reset_sbt(&hrtimer->callout, nstosbt(ktime_to_ns(interval)), + nstosbt(hrtimer->precision), hrtimer_call_handler, hrtimer, 0); + mtx_unlock(&hrtimer->mtx); +} + From owner-svn-src-stable@freebsd.org Wed Jun 20 06:36:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94E0310045C0; Wed, 20 Jun 2018 06:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A4CC6AB70; Wed, 20 Jun 2018 06:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B5E21EADB; Wed, 20 Jun 2018 06:36:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6aQW3020608; Wed, 20 Jun 2018 06:36:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6aPSH020607; Wed, 20 Jun 2018 06:36:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200636.w5K6aPSH020607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335412 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 335412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:36:26 -0000 Author: hselasky Date: Wed Jun 20 06:36:25 2018 New Revision: 335412 URL: https://svnweb.freebsd.org/changeset/base/335412 Log: MFC r334483: Implement radix_tree_iter_delete() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/radix-tree.h stable/11/sys/compat/linuxkpi/common/src/linux_radix.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/radix-tree.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/radix-tree.h Wed Jun 20 06:35:37 2018 (r335411) +++ stable/11/sys/compat/linuxkpi/common/include/linux/radix-tree.h Wed Jun 20 06:36:25 2018 (r335412) @@ -79,5 +79,6 @@ void *radix_tree_lookup(struct radix_tree_root *, unsi void *radix_tree_delete(struct radix_tree_root *, unsigned long); int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); bool radix_tree_iter_find(struct radix_tree_root *, struct radix_tree_iter *, void ***); +void radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **); #endif /* _LINUX_RADIX_TREE_H_ */ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_radix.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_radix.c Wed Jun 20 06:35:37 2018 (r335411) +++ stable/11/sys/compat/linuxkpi/common/src/linux_radix.c Wed Jun 20 06:36:25 2018 (r335412) @@ -162,6 +162,13 @@ out: return (item); } +void +radix_tree_iter_delete(struct radix_tree_root *root, + struct radix_tree_iter *iter, void **slot) +{ + radix_tree_delete(root, iter->index); +} + int radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) { From owner-svn-src-stable@freebsd.org Wed Jun 20 06:37:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5E810046B8; Wed, 20 Jun 2018 06:37:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1FA6ACE9; Wed, 20 Jun 2018 06:37:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8BF31EAE0; Wed, 20 Jun 2018 06:37:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6bF8B020700; Wed, 20 Jun 2018 06:37:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6bFFV020699; Wed, 20 Jun 2018 06:37:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200637.w5K6bFFV020699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335413 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:37:16 -0000 Author: hselasky Date: Wed Jun 20 06:37:15 2018 New Revision: 335413 URL: https://svnweb.freebsd.org/changeset/base/335413 Log: MFC r334484: Implement the __sg_alloc_table_from_pages() function based on the existing sg_alloc_table_from_pages() function in the LinuxKPI. This basically allow segments to have a limit, max_segment. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Jun 20 06:36:25 2018 (r335412) +++ stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Jun 20 06:37:15 2018 (r335413) @@ -64,6 +64,8 @@ struct sg_page_iter { } internal; }; +#define SCATTERLIST_MAX_SEGMENT (-1U & ~(PAGE_SIZE - 1)) + #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) #define SG_MAGIC 0x87654321UL @@ -286,18 +288,26 @@ sg_alloc_table(struct sg_table *table, unsigned int ne } static inline int -sg_alloc_table_from_pages(struct sg_table *sgt, +__sg_alloc_table_from_pages(struct sg_table *sgt, struct page **pages, unsigned int count, unsigned long off, unsigned long size, - gfp_t gfp_mask) + unsigned int max_segment, gfp_t gfp_mask) { - unsigned int i, segs, cur; + unsigned int i, segs, cur, len; int rc; struct scatterlist *s; + if (__predict_false(!max_segment || offset_in_page(max_segment))) + return (-EINVAL); + + len = 0; for (segs = i = 1; i < count; ++i) { - if (page_to_pfn(pages[i]) != page_to_pfn(pages[i - 1]) + 1) + len += PAGE_SIZE; + if (len >= max_segment || + page_to_pfn(pages[i]) != page_to_pfn(pages[i - 1]) + 1) { ++segs; + len = 0; + } } if (__predict_false((rc = sg_alloc_table(sgt, segs, gfp_mask)))) return (rc); @@ -307,10 +317,13 @@ sg_alloc_table_from_pages(struct sg_table *sgt, unsigned long seg_size; unsigned int j; - for (j = cur + 1; j < count; ++j) - if (page_to_pfn(pages[j]) != + len = 0; + for (j = cur + 1; j < count; ++j) { + len += PAGE_SIZE; + if (len >= max_segment || page_to_pfn(pages[j]) != page_to_pfn(pages[j - 1]) + 1) break; + } seg_size = ((j - cur) << PAGE_SHIFT) - off; sg_set_page(s, pages[cur], min(size, seg_size), off); @@ -321,6 +334,16 @@ sg_alloc_table_from_pages(struct sg_table *sgt, return (0); } +static inline int +sg_alloc_table_from_pages(struct sg_table *sgt, + struct page **pages, unsigned int count, + unsigned long off, unsigned long size, + gfp_t gfp_mask) +{ + + return (__sg_alloc_table_from_pages(sgt, pages, count, off, size, + SCATTERLIST_MAX_SEGMENT, gfp_mask)); +} static inline int sg_nents(struct scatterlist *sg) From owner-svn-src-stable@freebsd.org Wed Jun 20 06:38:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 942F710047E4; Wed, 20 Jun 2018 06:38:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 462856AE5A; Wed, 20 Jun 2018 06:38:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27EA91EAE1; Wed, 20 Jun 2018 06:38:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6c4na020793; Wed, 20 Jun 2018 06:38:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6c4hn020792; Wed, 20 Jun 2018 06:38:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200638.w5K6c4hn020792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335414 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:38:04 -0000 Author: hselasky Date: Wed Jun 20 06:38:03 2018 New Revision: 335414 URL: https://svnweb.freebsd.org/changeset/base/335414 Log: MFC r334658: Implement timer_setup() and from_timer() function macros in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Wed Jun 20 06:37:15 2018 (r335413) +++ stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Wed Jun 20 06:38:03 2018 (r335414) @@ -39,7 +39,10 @@ struct timer_list { struct callout callout; - void (*function) (unsigned long); + union { + void (*function) (unsigned long); /* < v4.15 */ + void (*function_415) (struct timer_list *); + }; unsigned long data; int expires; }; @@ -47,6 +50,16 @@ struct timer_list { extern unsigned long linux_timer_hz_mask; #define TIMER_IRQSAFE 0x0001 + +#define from_timer(var, arg, field) \ + container_of(arg, typeof(*(var)), field) + +#define timer_setup(timer, func, flags) do { \ + CTASSERT(((flags) & ~TIMER_IRQSAFE) == 0); \ + (timer)->function_415 = (func); \ + (timer)->data = (unsigned long)(timer); \ + callout_init(&(timer)->callout, 1); \ +} while (0) #define setup_timer(timer, func, dat) do { \ (timer)->function = (func); \ From owner-svn-src-stable@freebsd.org Wed Jun 20 06:38:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD9E210048D1; Wed, 20 Jun 2018 06:38:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F5FE6AFA2; Wed, 20 Jun 2018 06:38:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 503E11EAE5; Wed, 20 Jun 2018 06:38:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6clYu020883; Wed, 20 Jun 2018 06:38:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6cle4020882; Wed, 20 Jun 2018 06:38:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200638.w5K6cle4020882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335415 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:38:47 -0000 Author: hselasky Date: Wed Jun 20 06:38:46 2018 New Revision: 335415 URL: https://svnweb.freebsd.org/changeset/base/335415 Log: MFC r334659: Implement mul_u32_u32() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/math64.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/math64.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/math64.h Wed Jun 20 06:38:03 2018 (r335414) +++ stable/11/sys/compat/linuxkpi/common/include/linux/math64.h Wed Jun 20 06:38:46 2018 (r335415) @@ -84,4 +84,11 @@ div_u64(uint64_t dividend, uint32_t divisor) return (dividend / divisor); } +static inline uint64_t +mul_u32_u32(uint32_t a, uint32_t b) +{ + + return ((uint64_t)a * b); +} + #endif /* _LINUX_MATH64_H */ From owner-svn-src-stable@freebsd.org Wed Jun 20 06:39:33 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B1210049C9; Wed, 20 Jun 2018 06:39:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEAE06B0F6; Wed, 20 Jun 2018 06:39:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0EAC1EAE6; Wed, 20 Jun 2018 06:39:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6dWDV020976; Wed, 20 Jun 2018 06:39:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6dW9n020975; Wed, 20 Jun 2018 06:39:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200639.w5K6dW9n020975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335416 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:39:33 -0000 Author: hselasky Date: Wed Jun 20 06:39:32 2018 New Revision: 335416 URL: https://svnweb.freebsd.org/changeset/base/335416 Log: MFC r334660: Add "access" function pointer to the "vm_operations_struct" structure in the LinuxKPI. While at it document when to use the "virtual_address" or the "address" field in the "vm_fault" structure. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/mm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/mm.h Wed Jun 20 06:38:46 2018 (r335415) +++ stable/11/sys/compat/linuxkpi/common/include/linux/mm.h Wed Jun 20 06:39:32 2018 (r335416) @@ -120,8 +120,8 @@ struct vm_fault { pgoff_t pgoff; union { /* user-space address */ - void *virtual_address; - unsigned long address; + void *virtual_address; /* < 4.11 */ + unsigned long address; /* >= 4.11 */ }; struct page *page; struct vm_area_struct *vma; @@ -131,6 +131,7 @@ struct vm_operations_struct { void (*open) (struct vm_area_struct *); void (*close) (struct vm_area_struct *); int (*fault) (struct vm_area_struct *, struct vm_fault *); + int (*access) (struct vm_area_struct *, unsigned long, void *, int, int); }; /* From owner-svn-src-stable@freebsd.org Wed Jun 20 06:40:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 103F61004A7F; Wed, 20 Jun 2018 06:40:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B65566B245; Wed, 20 Jun 2018 06:40:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 979961EAEA; Wed, 20 Jun 2018 06:40:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6eJlq021093; Wed, 20 Jun 2018 06:40:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6eJB0021092; Wed, 20 Jun 2018 06:40:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200640.w5K6eJB0021092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335417 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:40:20 -0000 Author: hselasky Date: Wed Jun 20 06:40:19 2018 New Revision: 335417 URL: https://svnweb.freebsd.org/changeset/base/335417 Log: MFC r334661: Implement the task_pid_vnr() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sched.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/sched.h Wed Jun 20 06:39:32 2018 (r335416) +++ stable/11/sys/compat/linuxkpi/common/include/linux/sched.h Wed Jun 20 06:40:19 2018 (r335417) @@ -89,6 +89,7 @@ struct task_struct { #define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid #define task_pid(task) ((task)->pid) #define task_pid_nr(task) ((task)->pid) +#define task_pid_vnr(task) ((task)->pid) #define get_pid(x) (x) #define put_pid(x) do { } while (0) #define current_euid() (curthread->td_ucred->cr_uid) From owner-svn-src-stable@freebsd.org Wed Jun 20 06:41:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3EF51004B5C; Wed, 20 Jun 2018 06:41:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8EDA6B41D; Wed, 20 Jun 2018 06:41:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B8CC1EB22; Wed, 20 Jun 2018 06:41:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6fF5b021194; Wed, 20 Jun 2018 06:41:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6fFKs021193; Wed, 20 Jun 2018 06:41:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200641.w5K6fFKs021193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335418 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:41:16 -0000 Author: hselasky Date: Wed Jun 20 06:41:15 2018 New Revision: 335418 URL: https://svnweb.freebsd.org/changeset/base/335418 Log: MFC r334663: Implement the INIT_DELAYED_WORK_ONSTACK() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Wed Jun 20 06:40:19 2018 (r335417) +++ stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Wed Jun 20 06:41:15 2018 (r335418) @@ -117,6 +117,9 @@ do { \ #define INIT_DELAYED_WORK(dwork, fn) \ linux_init_delayed_work(dwork, fn) +#define INIT_DELAYED_WORK_ONSTACK(dwork, fn) \ + linux_init_delayed_work(dwork, fn) + #define INIT_DEFERRABLE_WORK(dwork, fn) \ INIT_DELAYED_WORK(dwork, fn) From owner-svn-src-stable@freebsd.org Wed Jun 20 06:42:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D58E1004D7E; Wed, 20 Jun 2018 06:42:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFE686B6E7; Wed, 20 Jun 2018 06:42:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7EE91EC65; Wed, 20 Jun 2018 06:42:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6g4id025770; Wed, 20 Jun 2018 06:42:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6g43G025768; Wed, 20 Jun 2018 06:42:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200642.w5K6g43G025768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335419 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 335419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:42:05 -0000 Author: hselasky Date: Wed Jun 20 06:42:04 2018 New Revision: 335419 URL: https://svnweb.freebsd.org/changeset/base/335419 Log: MFC r334664: Declare and set the global "system_highpri_wq" workqueue structure pointer in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h stable/11/sys/compat/linuxkpi/common/src/linux_work.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Wed Jun 20 06:41:15 2018 (r335418) +++ stable/11/sys/compat/linuxkpi/common/include/linux/workqueue.h Wed Jun 20 06:42:04 2018 (r335419) @@ -214,6 +214,7 @@ do { \ extern struct workqueue_struct *system_wq; extern struct workqueue_struct *system_long_wq; extern struct workqueue_struct *system_unbound_wq; +extern struct workqueue_struct *system_highpri_wq; extern struct workqueue_struct *system_power_efficient_wq; extern void linux_init_delayed_work(struct delayed_work *, work_func_t); Modified: stable/11/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_work.c Wed Jun 20 06:41:15 2018 (r335418) +++ stable/11/sys/compat/linuxkpi/common/src/linux_work.c Wed Jun 20 06:42:04 2018 (r335419) @@ -55,6 +55,7 @@ static struct workqueue_struct *linux_system_long_wq; struct workqueue_struct *system_wq; struct workqueue_struct *system_long_wq; struct workqueue_struct *system_unbound_wq; +struct workqueue_struct *system_highpri_wq; struct workqueue_struct *system_power_efficient_wq; static int linux_default_wq_cpus = 4; @@ -598,6 +599,7 @@ linux_work_init(void *arg) system_wq = linux_system_short_wq; system_power_efficient_wq = linux_system_short_wq; system_unbound_wq = linux_system_short_wq; + system_highpri_wq = linux_system_short_wq; } SYSINIT(linux_work_init, SI_SUB_TASKQ, SI_ORDER_THIRD, linux_work_init, NULL); @@ -612,5 +614,6 @@ linux_work_uninit(void *arg) system_wq = NULL; system_power_efficient_wq = NULL; system_unbound_wq = NULL; + system_highpri_wq = NULL; } SYSUNINIT(linux_work_uninit, SI_SUB_TASKQ, SI_ORDER_THIRD, linux_work_uninit, NULL); From owner-svn-src-stable@freebsd.org Wed Jun 20 06:42:52 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF361004E2C; Wed, 20 Jun 2018 06:42:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C712B6B87A; Wed, 20 Jun 2018 06:42:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A805A1EC8C; Wed, 20 Jun 2018 06:42:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6gpGn025858; Wed, 20 Jun 2018 06:42:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6gpOF025857; Wed, 20 Jun 2018 06:42:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200642.w5K6gpOF025857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335420 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 335420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:42:52 -0000 Author: hselasky Date: Wed Jun 20 06:42:51 2018 New Revision: 335420 URL: https://svnweb.freebsd.org/changeset/base/335420 Log: MFC r334710: Implement the rdmsrl_safe() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/asm/msr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/msr.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/msr.h Wed Jun 20 06:42:04 2018 (r335419) +++ stable/11/sys/compat/linuxkpi/common/include/asm/msr.h Wed Jun 20 06:42:51 2018 (r335420) @@ -32,5 +32,6 @@ #include #define rdmsrl(msr, val) ((val) = rdmsr(msr)) +#define rdmsrl_safe(msr, val) rdmsr_safe(msr, val) #endif /* _ASM_MSR_H_ */ From owner-svn-src-stable@freebsd.org Wed Jun 20 06:43:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66DF91004F37; Wed, 20 Jun 2018 06:43:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13DCD6B9D4; Wed, 20 Jun 2018 06:43:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E96E01EC8D; Wed, 20 Jun 2018 06:43:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6hfkS025952; Wed, 20 Jun 2018 06:43:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6hfA8025951; Wed, 20 Jun 2018 06:43:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200643.w5K6hfA8025951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335421 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:43:42 -0000 Author: hselasky Date: Wed Jun 20 06:43:41 2018 New Revision: 335421 URL: https://svnweb.freebsd.org/changeset/base/335421 Log: MFC r334711: Implement the ktime_compare() and ktime_after() functions in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Jun 20 06:42:51 2018 (r335420) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Jun 20 06:43:41 2018 (r335421) @@ -127,6 +127,25 @@ ktime_add(ktime_t lhs, ktime_t rhs) return (lhs + rhs); } +static inline int +ktime_compare(const ktime_t cmp1, const ktime_t cmp2) +{ + + if (cmp1 > cmp2) + return (1); + else if (cmp1 < cmp2) + return (-1); + else + return (0); +} + +static inline bool +ktime_after(const ktime_t cmp1, const ktime_t cmp2) +{ + + return (ktime_compare(cmp1, cmp2) > 0); +} + static inline ktime_t timespec_to_ktime(struct timespec ts) { From owner-svn-src-stable@freebsd.org Wed Jun 20 06:46:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 583291005131; Wed, 20 Jun 2018 06:46:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08EE36BB78; Wed, 20 Jun 2018 06:46:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3DC61EC8E; Wed, 20 Jun 2018 06:46:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6kshf026185; Wed, 20 Jun 2018 06:46:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6ksIP026184; Wed, 20 Jun 2018 06:46:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200646.w5K6ksIP026184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335422 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 335422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:46:55 -0000 Author: hselasky Date: Wed Jun 20 06:46:54 2018 New Revision: 335422 URL: https://svnweb.freebsd.org/changeset/base/335422 Log: MFC r334712 and r334718: Implement the atomic_dec_if_positive() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h Wed Jun 20 06:43:41 2018 (r335421) +++ stable/11/sys/compat/linuxkpi/common/include/asm/atomic.h Wed Jun 20 06:46:54 2018 (r335422) @@ -235,6 +235,23 @@ atomic_cmpxchg(atomic_t *v, int old, int new) __ret.val; \ }) +static inline int +atomic_dec_if_positive(atomic_t *v) +{ + int retval; + int old; + + old = atomic_read(v); + for (;;) { + retval = old - 1; + if (unlikely(retval < 0)) + break; + if (likely(atomic_fcmpset_int(&v->counter, &old, retval))) + break; + } + return (retval); +} + #define LINUX_ATOMIC_OP(op, c_op) \ static inline void atomic_##op(int i, atomic_t *v) \ { \ From owner-svn-src-stable@freebsd.org Wed Jun 20 06:47:50 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EC11005205; Wed, 20 Jun 2018 06:47:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E16396BCB6; Wed, 20 Jun 2018 06:47:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C28281EC8F; Wed, 20 Jun 2018 06:47:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6lnCF026283; Wed, 20 Jun 2018 06:47:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6lnt4026282; Wed, 20 Jun 2018 06:47:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200647.w5K6lnt4026282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335423 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 335423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:47:50 -0000 Author: hselasky Date: Wed Jun 20 06:47:49 2018 New Revision: 335423 URL: https://svnweb.freebsd.org/changeset/base/335423 Log: MFC r334713: Implement the init_wait_entry() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:46:54 2018 (r335422) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:47:49 2018 (r335423) @@ -106,8 +106,11 @@ extern wait_queue_func_t default_wake_function; INIT_LIST_HEAD(&(wqh)->task_list); \ } while (0) +void linux_init_wait_entry(wait_queue_t *, int); void linux_wake_up(wait_queue_head_t *, unsigned int, int, bool); +#define init_wait_entry(wq, flags) \ + linux_init_wait_entry(wq, flags) #define wake_up(wqh) \ linux_wake_up(wqh, TASK_NORMAL, 1, false) #define wake_up_all(wqh) \ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Wed Jun 20 06:46:54 2018 (r335422) +++ stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Wed Jun 20 06:47:49 2018 (r335423) @@ -188,6 +188,17 @@ default_wake_function(wait_queue_t *wq, unsigned int s } void +linux_init_wait_entry(wait_queue_t *wq, int flags) +{ + + memset(wq, 0, sizeof(*wq)); + wq->flags = flags; + wq->private = current; + wq->func = autoremove_wake_function; + INIT_LIST_HEAD(&wq->task_list); +} + +void linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) { wait_queue_t *pos, *next; From owner-svn-src-stable@freebsd.org Wed Jun 20 06:48:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C480C100530C; Wed, 20 Jun 2018 06:48:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 796906BE0B; Wed, 20 Jun 2018 06:48:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A4BE1EC90; Wed, 20 Jun 2018 06:48:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6mgJh026379; Wed, 20 Jun 2018 06:48:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6mgcK026378; Wed, 20 Jun 2018 06:48:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200648.w5K6mgcK026378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335424 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:48:42 -0000 Author: hselasky Date: Wed Jun 20 06:48:41 2018 New Revision: 335424 URL: https://svnweb.freebsd.org/changeset/base/335424 Log: MFC r334714: Rename two structure field members while keeping backwards compatibility in the LinuxKPI. Add a comment saying in which Linux version this change was made. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:47:49 2018 (r335423) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:48:41 2018 (r335424) @@ -63,12 +63,18 @@ struct wait_queue { unsigned int flags; /* always 0 */ void *private; wait_queue_func_t *func; - struct list_head task_list; + union { + struct list_head task_list; /* < v4.13 */ + struct list_head entry; /* >= v4.13 */ + }; }; struct wait_queue_head { spinlock_t lock; - struct list_head task_list; + union { + struct list_head task_list; /* < v4.13 */ + struct list_head head; /* >= v4.13 */ + }; }; /* From owner-svn-src-stable@freebsd.org Wed Jun 20 06:49:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B997410053F2; Wed, 20 Jun 2018 06:49:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B00F6BF54; Wed, 20 Jun 2018 06:49:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C18C1EC91; Wed, 20 Jun 2018 06:49:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6nRFP026470; Wed, 20 Jun 2018 06:49:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6nROe026469; Wed, 20 Jun 2018 06:49:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200649.w5K6nROe026469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335425 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:49:27 -0000 Author: hselasky Date: Wed Jun 20 06:49:26 2018 New Revision: 335425 URL: https://svnweb.freebsd.org/changeset/base/335425 Log: MFC r334715: Implement the might_sleep_if() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:48:41 2018 (r335424) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:49:26 2018 (r335425) @@ -47,6 +47,10 @@ #define might_sleep() \ WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "might_sleep()") +#define might_sleep_if(cond) do { \ + if (cond) { might_sleep(); } \ +} while (0) + struct wait_queue; struct wait_queue_head; From owner-svn-src-stable@freebsd.org Wed Jun 20 06:50:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CACD10054DB; Wed, 20 Jun 2018 06:50:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 060C16C16D; Wed, 20 Jun 2018 06:50:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61DC01ECCE; Wed, 20 Jun 2018 06:50:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6oBwB026712; Wed, 20 Jun 2018 06:50:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6oBDw026711; Wed, 20 Jun 2018 06:50:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200650.w5K6oBDw026711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335426 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:50:15 -0000 Author: hselasky Date: Wed Jun 20 06:50:11 2018 New Revision: 335426 URL: https://svnweb.freebsd.org/changeset/base/335426 Log: MFC r334717: Implement the __add_wait_queue_entry_tail() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:49:26 2018 (r335425) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Wed Jun 20 06:50:11 2018 (r335426) @@ -54,7 +54,10 @@ struct wait_queue; struct wait_queue_head; +#define wait_queue_entry wait_queue + typedef struct wait_queue wait_queue_t; +typedef struct wait_queue_entry wait_queue_entry_t; typedef struct wait_queue_head wait_queue_head_t; typedef int wait_queue_func_t(wait_queue_t *, unsigned int, int, void *); @@ -246,6 +249,12 @@ static inline void __add_wait_queue_tail(wait_queue_head_t *wqh, wait_queue_t *wq) { list_add_tail(&wq->task_list, &wqh->task_list); +} + +static inline void +__add_wait_queue_entry_tail(wait_queue_head_t *wqh, wait_queue_entry_t *wq) +{ + list_add_tail(&wq->entry, &wqh->head); } static inline void From owner-svn-src-stable@freebsd.org Wed Jun 20 06:50:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D32E6100559B; Wed, 20 Jun 2018 06:50:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 826FD6C3FE; Wed, 20 Jun 2018 06:50:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6363E1ECF8; Wed, 20 Jun 2018 06:50:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6ovgV026801; Wed, 20 Jun 2018 06:50:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6ov0c026800; Wed, 20 Jun 2018 06:50:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200650.w5K6ov0c026800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335427 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:50:58 -0000 Author: hselasky Date: Wed Jun 20 06:50:56 2018 New Revision: 335427 URL: https://svnweb.freebsd.org/changeset/base/335427 Log: MFC r334720: Make some list functions RCU safe in the LinuxKPI. While at it rename hlist_add_after() into hlist_add_behind(). Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/list.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/list.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/list.h Wed Jun 20 06:50:11 2018 (r335426) +++ stable/11/sys/compat/linuxkpi/common/include/linux/list.h Wed Jun 20 06:50:56 2018 (r335427) @@ -337,16 +337,16 @@ static inline int hlist_empty(const struct hlist_head *h) { - return !h->first; + return !READ_ONCE(h->first); } static inline void hlist_del(struct hlist_node *n) { - if (n->next) + WRITE_ONCE(*(n->pprev), n->next); + if (n->next != NULL) n->next->pprev = n->pprev; - *n->pprev = n->next; } static inline void @@ -364,9 +364,9 @@ hlist_add_head(struct hlist_node *n, struct hlist_head { n->next = h->first; - if (h->first) + if (h->first != NULL) h->first->pprev = &n->next; - h->first = n; + WRITE_ONCE(h->first, n); n->pprev = &h->first; } @@ -377,18 +377,19 @@ hlist_add_before(struct hlist_node *n, struct hlist_no n->pprev = next->pprev; n->next = next; next->pprev = &n->next; - *(n->pprev) = n; + WRITE_ONCE(*(n->pprev), n); } static inline void -hlist_add_after(struct hlist_node *n, struct hlist_node *next) +hlist_add_behind(struct hlist_node *n, struct hlist_node *prev) { - next->next = n->next; - n->next = next; - next->pprev = &n->next; - if (next->next) - next->next->pprev = &next->next; + n->next = prev->next; + WRITE_ONCE(prev->next, n); + n->pprev = &prev->next; + + if (n->next != NULL) + n->next->pprev = &n->next; } static inline void From owner-svn-src-stable@freebsd.org Wed Jun 20 06:51:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5169110057ED; Wed, 20 Jun 2018 06:51:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECA7C6C5F0; Wed, 20 Jun 2018 06:51:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDE021ED2F; Wed, 20 Jun 2018 06:51:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6pfY5029788; Wed, 20 Jun 2018 06:51:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6pf6O029787; Wed, 20 Jun 2018 06:51:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200651.w5K6pf6O029787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335428 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:51:42 -0000 Author: hselasky Date: Wed Jun 20 06:51:41 2018 New Revision: 335428 URL: https://svnweb.freebsd.org/changeset/base/335428 Log: MFC r334774: Implement the dev_pm_set_driver_flags() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/device.h Wed Jun 20 06:50:56 2018 (r335427) +++ stable/11/sys/compat/linuxkpi/common/include/linux/device.h Wed Jun 20 06:51:41 2018 (r335428) @@ -461,6 +461,9 @@ device_destroy(struct class *class, dev_t devt) device_unregister(device_get_softc(bsddev)); } +#define dev_pm_set_driver_flags(dev, flags) do { \ +} while (0) + static inline void linux_class_kfree(struct class *class) { From owner-svn-src-stable@freebsd.org Wed Jun 20 06:52:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05AA41005900; Wed, 20 Jun 2018 06:52:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A93846C828; Wed, 20 Jun 2018 06:52:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A8BF1EE5D; Wed, 20 Jun 2018 06:52:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6qXtw031360; Wed, 20 Jun 2018 06:52:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6qXwo031358; Wed, 20 Jun 2018 06:52:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200652.w5K6qXwo031358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335429 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:52:34 -0000 Author: hselasky Date: Wed Jun 20 06:52:32 2018 New Revision: 335429 URL: https://svnweb.freebsd.org/changeset/base/335429 Log: MFC r334777: Wrap timespec64 into timespec in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h stable/11/sys/compat/linuxkpi/common/include/linux/time.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Jun 20 06:51:41 2018 (r335428) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Jun 20 06:52:32 2018 (r335429) @@ -159,6 +159,7 @@ timeval_to_ktime(struct timeval tv) } #define ktime_to_timespec(kt) ns_to_timespec(kt) +#define ktime_to_timespec64(kt) ns_to_timespec(kt) #define ktime_to_timeval(kt) ns_to_timeval(kt) #define ktime_to_ns(kt) (kt) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/time.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/time.h Wed Jun 20 06:51:41 2018 (r335428) +++ stable/11/sys/compat/linuxkpi/common/include/linux/time.h Wed Jun 20 06:52:32 2018 (r335429) @@ -35,6 +35,8 @@ #define USEC_PER_MSEC 1000L #define USEC_PER_SEC 1000000L +#define timespec64 timespec + #include #include From owner-svn-src-stable@freebsd.org Wed Jun 20 06:56:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39AB21005C82; Wed, 20 Jun 2018 06:56:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D89726CC11; Wed, 20 Jun 2018 06:56:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9CEE1EE65; Wed, 20 Jun 2018 06:56:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6uI3Z031872; Wed, 20 Jun 2018 06:56:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6uIVD031871; Wed, 20 Jun 2018 06:56:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200656.w5K6uIVD031871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335431 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:56:19 -0000 Author: hselasky Date: Wed Jun 20 06:56:18 2018 New Revision: 335431 URL: https://svnweb.freebsd.org/changeset/base/335431 Log: MFC r334778: Define ARCH_KMALLOC_MINALIGN in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Wed Jun 20 06:54:38 2018 (r335430) +++ stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Wed Jun 20 06:56:18 2018 (r335431) @@ -85,6 +85,9 @@ struct linux_kmem_cache { #define SLAB_DESTROY_BY_RCU \ SLAB_TYPESAFE_BY_RCU +#define ARCH_KMALLOC_MINALIGN \ + __alignof(unsigned long long) + static inline gfp_t linux_check_m_flags(gfp_t flags) { From owner-svn-src-stable@freebsd.org Wed Jun 20 06:57:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E9671005D61; Wed, 20 Jun 2018 06:57:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E45EE6CD58; Wed, 20 Jun 2018 06:57:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6F251EE66; Wed, 20 Jun 2018 06:57:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6vERw031969; Wed, 20 Jun 2018 06:57:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6vE9G031968; Wed, 20 Jun 2018 06:57:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200657.w5K6vE9G031968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335432 - stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 335432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:57:15 -0000 Author: hselasky Date: Wed Jun 20 06:57:14 2018 New Revision: 335432 URL: https://svnweb.freebsd.org/changeset/base/335432 Log: MFC r334953: Implement the user_access_begin(), user_access_end(), usafe_get_user() and unsafe_put_user() function macros in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/asm/uaccess.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/asm/uaccess.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed Jun 20 06:56:18 2018 (r335431) +++ stable/11/sys/compat/linuxkpi/common/include/asm/uaccess.h Wed Jun 20 06:57:14 2018 (r335432) @@ -52,4 +52,17 @@ copy_from_user(void *to, const void *from, unsigned lo #define __copy_from_user(...) copy_from_user(__VA_ARGS__) #define __copy_in_user(...) copy_from_user(__VA_ARGS__) +#define user_access_begin() do { } while (0) +#define user_access_end() do { } while (0) + +#define unsafe_get_user(x, ptr, err) do { \ + if (unlikely(__get_user(x, ptr))) \ + goto err; \ +} while (0) + +#define unsafe_put_user(x, ptr, err) do { \ + if (unlikely(__put_user(x, ptr))) \ + goto err; \ +} while (0) + #endif /* _ASM_UACCESS_H_ */ From owner-svn-src-stable@freebsd.org Wed Jun 20 06:58:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F4EC1005E25; Wed, 20 Jun 2018 06:58:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 508D06CE96; Wed, 20 Jun 2018 06:58:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 321211EE67; Wed, 20 Jun 2018 06:58:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6vx3A032056; Wed, 20 Jun 2018 06:57:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6vxe2032055; Wed, 20 Jun 2018 06:57:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200657.w5K6vxe2032055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335433 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:58:00 -0000 Author: hselasky Date: Wed Jun 20 06:57:59 2018 New Revision: 335433 URL: https://svnweb.freebsd.org/changeset/base/335433 Log: MFC r334958: Implement the kstrtobool() and kstrtobool_from_user() functions in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Jun 20 06:57:14 2018 (r335432) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Jun 20 06:57:59 2018 (r335433) @@ -50,7 +50,9 @@ #include #include #include + #include +#include #include @@ -370,6 +372,46 @@ kstrtou32(const char *cp, unsigned int base, u32 *res) if (temp != (u32)temp) return (-ERANGE); return (0); +} + +static inline int +kstrtobool(const char *s, bool *res) +{ + int len; + + if (s == NULL || (len = strlen(s)) == 0 || res == NULL) + return (-EINVAL); + + /* skip newline character, if any */ + if (s[len - 1] == '\n') + len--; + + if (len == 1 && strchr("yY1", s[0]) != NULL) + *res = true; + else if (len == 1 && strchr("nN0", s[0]) != NULL) + *res = false; + else if (strncasecmp("on", s, len) == 0) + *res = true; + else if (strncasecmp("off", s, len) == 0) + *res = false; + else + return (-EINVAL); + + return (0); +} + +static inline int +kstrtobool_from_user(const char __user *s, size_t count, bool *res) +{ + char buf[8] = {}; + + if (count > (sizeof(buf) - 1)) + count = (sizeof(buf) - 1); + + if (copy_from_user(buf, s, count)) + return (-EFAULT); + + return (kstrtobool(buf, res)); } #define min(x, y) ((x) < (y) ? (x) : (y)) From owner-svn-src-stable@freebsd.org Wed Jun 20 06:58:52 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A9201005F83; Wed, 20 Jun 2018 06:58:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD406D007; Wed, 20 Jun 2018 06:58:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0BF81EE68; Wed, 20 Jun 2018 06:58:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6wplu032149; Wed, 20 Jun 2018 06:58:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6wpH0032148; Wed, 20 Jun 2018 06:58:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200658.w5K6wpH0032148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335434 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:58:52 -0000 Author: hselasky Date: Wed Jun 20 06:58:51 2018 New Revision: 335434 URL: https://svnweb.freebsd.org/changeset/base/335434 Log: MFC r334662: Define the __kernel_size_t type in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/types.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/types.h Wed Jun 20 06:57:59 2018 (r335433) +++ stable/11/sys/compat/linuxkpi/common/include/linux/types.h Wed Jun 20 06:58:51 2018 (r335434) @@ -62,6 +62,8 @@ typedef unsigned long pgoff_t; typedef u64 phys_addr_t; +typedef size_t __kernel_size_t; + #define DECLARE_BITMAP(n, bits) \ unsigned long n[howmany(bits, sizeof(long) * 8)] From owner-svn-src-stable@freebsd.org Wed Jun 20 06:59:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DBA810060C5; Wed, 20 Jun 2018 06:59:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC0E66D164; Wed, 20 Jun 2018 06:59:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D4311EE69; Wed, 20 Jun 2018 06:59:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K6xegV032241; Wed, 20 Jun 2018 06:59:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K6xexT032239; Wed, 20 Jun 2018 06:59:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200659.w5K6xexT032239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 06:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335435 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 335435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:59:41 -0000 Author: hselasky Date: Wed Jun 20 06:59:39 2018 New Revision: 335435 URL: https://svnweb.freebsd.org/changeset/base/335435 Log: MFC r334775: Move the EXPORT_SYMBOL_XXX() function macros into own header file. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Added: stable/11/sys/compat/linuxkpi/common/include/linux/export.h - copied unchanged from r334775, head/sys/compat/linuxkpi/common/include/linux/export.h Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h Directory Properties: stable/11/ (props changed) Copied: stable/11/sys/compat/linuxkpi/common/include/linux/export.h (from r334775, head/sys/compat/linuxkpi/common/include/linux/export.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/compat/linuxkpi/common/include/linux/export.h Wed Jun 20 06:59:39 2018 (r335435, copy of r334775, head/sys/compat/linuxkpi/common/include/linux/export.h) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2018 Johannes Lundberg + * + * 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 unmodified, 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 _LINUX_EXPORT_H +#define _LINUX_EXPORT_H + +#define EXPORT_SYMBOL(name) +#define EXPORT_SYMBOL_GPL(name) + +#endif Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/module.h Wed Jun 20 06:58:51 2018 (r335434) +++ stable/11/sys/compat/linuxkpi/common/include/linux/module.h Wed Jun 20 06:59:39 2018 (r335435) @@ -42,6 +42,7 @@ #include #include #include +#include #define MODULE_AUTHOR(name) #define MODULE_DESCRIPTION(name) @@ -51,8 +52,6 @@ #define THIS_MODULE ((struct module *)0) -#define EXPORT_SYMBOL(name) -#define EXPORT_SYMBOL_GPL(name) #define __MODULE_STRING(x) __stringify(x) /* OFED pre-module initialization */ From owner-svn-src-stable@freebsd.org Wed Jun 20 07:02:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 194511006414; Wed, 20 Jun 2018 07:02:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B93106D531; Wed, 20 Jun 2018 07:02:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AF771EFE2; Wed, 20 Jun 2018 07:02:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5K72Jj0037049; Wed, 20 Jun 2018 07:02:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5K72JV5037048; Wed, 20 Jun 2018 07:02:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806200702.w5K72JV5037048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 20 Jun 2018 07:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335436 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 335436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 07:02:20 -0000 Author: hselasky Date: Wed Jun 20 07:02:19 2018 New Revision: 335436 URL: https://svnweb.freebsd.org/changeset/base/335436 Log: Bump the __FreeBSD_version after recent LinuxKPI updates to force recompilation of external kernel modules. This is a direct commit. Sponsored by: Mellanox Technologies Modified: stable/11/sys/sys/param.h Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Wed Jun 20 06:59:39 2018 (r335435) +++ stable/11/sys/sys/param.h Wed Jun 20 07:02:19 2018 (r335436) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102500 /* Master, propagated to newvers */ +#define __FreeBSD_version 1102501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@freebsd.org Wed Jun 20 17:37:56 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A83491025F93; Wed, 20 Jun 2018 17:37:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD1186EE8; Wed, 20 Jun 2018 17:37:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D4C02567F; Wed, 20 Jun 2018 17:37:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5KHbual095444; Wed, 20 Jun 2018 17:37:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5KHbueT095443; Wed, 20 Jun 2018 17:37:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806201737.w5KHbueT095443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Jun 2018 17:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335453 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 335453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 17:37:56 -0000 Author: kib Date: Wed Jun 20 17:37:55 2018 New Revision: 335453 URL: https://svnweb.freebsd.org/changeset/base/335453 Log: MFC r332994 (by tychon): Handle potential alignment adjustment of the exception frame by hardware. Modified: stable/11/sys/amd64/amd64/exception.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/exception.S ============================================================================== --- stable/11/sys/amd64/amd64/exception.S Wed Jun 20 17:20:39 2018 (r335452) +++ stable/11/sys/amd64/amd64/exception.S Wed Jun 20 17:37:55 2018 (r335453) @@ -341,6 +341,9 @@ page_cr2: * On the stack, we have the hardware interrupt frame to return * to usermode (faulted) and another frame with error code, for * fault. For PTI, copy both frames to the main thread stack. + * Handle the potential 16-byte alignment adjustment incurred + * during the second fault by copying both frames independently + * while unwinding the stack in between. */ .macro PROTF_ENTRY name,trapno \name\()_pti_doreti: @@ -351,7 +354,11 @@ page_cr2: movq %rax,%cr3 movq PCPU(RSP0),%rax subq $2*PTI_SIZE-3*8,%rax /* no err, %rax, %rdx in faulted frame */ - MOVE_STACKS (PTI_SIZE / 4 - 3) + MOVE_STACKS (PTI_SIZE / 8) + addq $PTI_SIZE,%rax + movq PTI_RSP(%rsp),%rsp + MOVE_STACKS (PTI_SIZE / 8 - 3) + subq $PTI_SIZE,%rax movq %rax,%rsp popq %rdx popq %rax From owner-svn-src-stable@freebsd.org Wed Jun 20 18:51:40 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EDD21003FE4; Wed, 20 Jun 2018 18:51:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2392F6D33A; Wed, 20 Jun 2018 18:51:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 062B6263C3; Wed, 20 Jun 2018 18:51:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5KIpdZG036763; Wed, 20 Jun 2018 18:51:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5KIpdjS036760; Wed, 20 Jun 2018 18:51:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806201851.w5KIpdjS036760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Jun 2018 18:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335455 - in stable/10/sys: amd64/amd64 i386/i386 i386/isa X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/10/sys: amd64/amd64 i386/i386 i386/isa X-SVN-Commit-Revision: 335455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 18:51:40 -0000 Author: kib Date: Wed Jun 20 18:51:38 2018 New Revision: 335455 URL: https://svnweb.freebsd.org/changeset/base/335455 Log: MFC r335072, r335089, r335131, r335132: Enable eager FPU context switch on i386 and amd64. CVE: CVE-2018-3665 Tested by: emaste (smoke boot) Modified: stable/10/sys/amd64/amd64/cpu_switch.S stable/10/sys/amd64/amd64/fpu.c stable/10/sys/i386/i386/swtch.s stable/10/sys/i386/isa/npx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/10/sys/amd64/amd64/cpu_switch.S Wed Jun 20 18:43:17 2018 (r335454) +++ stable/10/sys/amd64/amd64/cpu_switch.S Wed Jun 20 18:51:38 2018 (r335455) @@ -111,10 +111,10 @@ done_store_dr: /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) - jne 3f + jne 2f movq PCB_SAVEFPU(%r8),%r8 clts - cmpl $0,use_xsave + cmpl $0,use_xsave(%rip) jne 1f fxsave (%r8) jmp 2f @@ -126,12 +126,7 @@ ctx_switch_xsave: /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ xsave (%r8) movq %rcx,%rdx -2: smsw %ax - orb $CR0_TS,%al - lmsw %ax - xorl %eax,%eax - movq %rax,PCPU(FPCURTHREAD) -3: +2: /* Save is done. Now fire up new thread. Leave old vmspace. */ movq TD_PCB(%rsi),%r8 @@ -255,6 +250,8 @@ done_load_dr: movq PCB_RBX(%r8),%rbx movq PCB_RIP(%r8),%rax movq %rax,(%rsp) + movq PCPU(CURTHREAD),%rdi + call fpu_activate_sw ret /* Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Wed Jun 20 18:43:17 2018 (r335454) +++ stable/10/sys/amd64/amd64/fpu.c Wed Jun 20 18:51:38 2018 (r335455) @@ -139,6 +139,11 @@ static void fpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, 1, "Floating point instructions executed in hardware"); +int lazy_fpu_switch = 0; +SYSCTL_INT(_hw, OID_AUTO, lazy_fpu_switch, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &lazy_fpu_switch, 0, + "Lazily load FPU context after context switch"); + int use_xsave; /* non-static for cpu_switch.S */ uint64_t xsave_mask; /* the same */ static uma_zone_t fpu_save_area_zone; @@ -204,6 +209,7 @@ fpuinit_bsp1(void) u_int cp[4]; uint64_t xsave_mask_user; + TUNABLE_INT_FETCH("hw.lazy_fpu_switch", &lazy_fpu_switch); if ((cpu_feature2 & CPUID2_XSAVE) != 0) { use_xsave = 1; TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); @@ -611,6 +617,45 @@ fputrap_sse(void) return (fpetable[(mxcsr & (~mxcsr >> 7)) & 0x3f]); } +static void +restore_fpu_curthread(struct thread *td) +{ + struct pcb *pcb; + + /* + * Record new context early in case frstor causes a trap. + */ + PCPU_SET(fpcurthread, td); + + stop_emulating(); + fpu_clean_state(); + pcb = td->td_pcb; + + if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { + /* + * This is the first time this thread has used the FPU or + * the PCB doesn't contain a clean FPU state. Explicitly + * load an initial state. + * + * We prefer to restore the state from the actual save + * area in PCB instead of directly loading from + * fpu_initialstate, to ignite the XSAVEOPT + * tracking engine. + */ + bcopy(fpu_initialstate, pcb->pcb_save, + cpu_max_ext_state_size); + fpurestore(pcb->pcb_save); + if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) + fldcw(pcb->pcb_initial_fpucw); + if (PCB_USER_FPU(pcb)) + set_pcb_flags(pcb, PCB_FPUINITDONE | + PCB_USERFPUINITDONE); + else + set_pcb_flags(pcb, PCB_FPUINITDONE); + } else + fpurestore(pcb->pcb_save); +} + /* * Device Not Available (DNA, #NM) exception handler. * @@ -621,7 +666,9 @@ fputrap_sse(void) void fpudna(void) { + struct thread *td; + td = curthread; /* * This handler is entered with interrupts enabled, so context * switches may occur before critical_enter() is executed. If @@ -633,49 +680,38 @@ fpudna(void) */ critical_enter(); - if (PCPU_GET(fpcurthread) == curthread) { - printf("fpudna: fpcurthread == curthread\n"); + if (__predict_false(PCPU_GET(fpcurthread) == td)) { + /* + * Some virtual machines seems to set %cr0.TS at + * arbitrary moments. Silently clear the TS bit + * regardless of the eager/lazy FPU context switch + * mode. + */ stop_emulating(); - critical_exit(); - return; + } else { + if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { + panic( + "fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", + PCPU_GET(fpcurthread), + PCPU_GET(fpcurthread)->td_tid, td, td->td_tid); + } + restore_fpu_curthread(td); } - if (PCPU_GET(fpcurthread) != NULL) { - panic("fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", - PCPU_GET(fpcurthread), PCPU_GET(fpcurthread)->td_tid, - curthread, curthread->td_tid); - } - stop_emulating(); - /* - * Record new context early in case frstor causes a trap. - */ - PCPU_SET(fpcurthread, curthread); + critical_exit(); +} - fpu_clean_state(); +void fpu_activate_sw(struct thread *td); /* Called from the context switch */ +void +fpu_activate_sw(struct thread *td) +{ - if ((curpcb->pcb_flags & PCB_FPUINITDONE) == 0) { - /* - * This is the first time this thread has used the FPU or - * the PCB doesn't contain a clean FPU state. Explicitly - * load an initial state. - * - * We prefer to restore the state from the actual save - * area in PCB instead of directly loading from - * fpu_initialstate, to ignite the XSAVEOPT - * tracking engine. - */ - bcopy(fpu_initialstate, curpcb->pcb_save, - cpu_max_ext_state_size); - fpurestore(curpcb->pcb_save); - if (curpcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(curpcb->pcb_initial_fpucw); - if (PCB_USER_FPU(curpcb)) - set_pcb_flags(curpcb, - PCB_FPUINITDONE | PCB_USERFPUINITDONE); - else - set_pcb_flags(curpcb, PCB_FPUINITDONE); - } else - fpurestore(curpcb->pcb_save); - critical_exit(); + if (lazy_fpu_switch || (td->td_pflags & TDP_KTHREAD) != 0 || + !PCB_USER_FPU(td->td_pcb)) { + PCPU_SET(fpcurthread, NULL); + start_emulating(); + } else if (PCPU_GET(fpcurthread) != td) { + restore_fpu_curthread(td); + } } void Modified: stable/10/sys/i386/i386/swtch.s ============================================================================== --- stable/10/sys/i386/i386/swtch.s Wed Jun 20 18:43:17 2018 (r335454) +++ stable/10/sys/i386/i386/swtch.s Wed Jun 20 18:51:38 2018 (r335455) @@ -314,6 +314,12 @@ sw1: cpu_switch_load_gs: mov PCB_GS(%edx),%gs + pushl %edx + pushl PCPU(CURTHREAD) + call npxswitch + popl %edx + popl %edx + /* Test if debug registers should be restored. */ testl $PCB_DBREGS,PCB_FLAGS(%edx) jz 1f Modified: stable/10/sys/i386/isa/npx.c ============================================================================== --- stable/10/sys/i386/isa/npx.c Wed Jun 20 18:43:17 2018 (r335454) +++ stable/10/sys/i386/isa/npx.c Wed Jun 20 18:51:38 2018 (r335455) @@ -219,6 +219,11 @@ int hw_float; SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, "Floating point instructions executed in hardware"); +int lazy_fpu_switch = 0; +SYSCTL_INT(_hw, OID_AUTO, lazy_fpu_switch, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &lazy_fpu_switch, 0, + "Lazily load FPU context after context switch"); + #ifdef CPU_ENABLE_SSE int use_xsave; uint64_t xsave_mask; @@ -360,6 +365,7 @@ npxinit_bsp1(void) u_int cp[4]; uint64_t xsave_mask_user; + TUNABLE_INT_FETCH("hw.lazy_fpu_switch", &lazy_fpu_switch); if (cpu_fxsr && (cpu_feature2 & CPUID2_XSAVE) != 0) { use_xsave = 1; TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); @@ -840,49 +846,22 @@ npxtrap_sse(void) } #endif -/* - * Implement device not available (DNA) exception - * - * It would be better to switch FP context here (if curthread != fpcurthread) - * and not necessarily for every context switch, but it is too hard to - * access foreign pcb's. - */ - -static int err_count = 0; - -int -npxdna(void) +static void +restore_npx_curthread(struct thread *td, struct pcb *pcb) { - if (!hw_float) - return (0); - critical_enter(); - if (PCPU_GET(fpcurthread) == curthread) { - printf("npxdna: fpcurthread == curthread %d times\n", - ++err_count); - stop_emulating(); - critical_exit(); - return (1); - } - if (PCPU_GET(fpcurthread) != NULL) { - printf("npxdna: fpcurthread = %p (%d), curthread = %p (%d)\n", - PCPU_GET(fpcurthread), - PCPU_GET(fpcurthread)->td_proc->p_pid, - curthread, curthread->td_proc->p_pid); - panic("npxdna"); - } - stop_emulating(); /* * Record new context early in case frstor causes a trap. */ - PCPU_SET(fpcurthread, curthread); + PCPU_SET(fpcurthread, td); + stop_emulating(); #ifdef CPU_ENABLE_SSE if (cpu_fxsr) fpu_clean_state(); #endif - if ((curpcb->pcb_flags & PCB_NPXINITDONE) == 0) { + if ((pcb->pcb_flags & PCB_NPXINITDONE) == 0) { /* * This is the first time this thread has used the FPU or * the PCB doesn't contain a clean FPU state. Explicitly @@ -893,18 +872,54 @@ npxdna(void) * npx_initialstate, to ignite the XSAVEOPT * tracking engine. */ - bcopy(npx_initialstate, curpcb->pcb_save, cpu_max_ext_state_size); - fpurstor(curpcb->pcb_save); - if (curpcb->pcb_initial_npxcw != __INITIAL_NPXCW__) - fldcw(curpcb->pcb_initial_npxcw); - curpcb->pcb_flags |= PCB_NPXINITDONE; - if (PCB_USER_FPU(curpcb)) - curpcb->pcb_flags |= PCB_NPXUSERINITDONE; + bcopy(npx_initialstate, pcb->pcb_save, cpu_max_ext_state_size); + fpurstor(pcb->pcb_save); + if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) + fldcw(pcb->pcb_initial_npxcw); + pcb->pcb_flags |= PCB_NPXINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_NPXUSERINITDONE; } else { - fpurstor(curpcb->pcb_save); + fpurstor(pcb->pcb_save); } - critical_exit(); +} +/* + * Implement device not available (DNA) exception + * + * It would be better to switch FP context here (if curthread != fpcurthread) + * and not necessarily for every context switch, but it is too hard to + * access foreign pcb's. + */ +int +npxdna(void) +{ + struct thread *td; + + if (!hw_float) + return (0); + td = curthread; + critical_enter(); + if (__predict_false(PCPU_GET(fpcurthread) == td)) { + /* + * Some virtual machines seems to set %cr0.TS at + * arbitrary moments. Silently clear the TS bit + * regardless of the eager/lazy FPU context switch + * mode. + */ + stop_emulating(); + } else { + if (__predict_false(PCPU_GET(fpcurthread) != NULL)) { + printf( + "npxdna: fpcurthread = %p (%d), curthread = %p (%d)\n", + PCPU_GET(fpcurthread), + PCPU_GET(fpcurthread)->td_proc->p_pid, + td, td->td_proc->p_pid); + panic("npxdna"); + } + restore_npx_curthread(td, td->td_pcb); + } + critical_exit(); return (1); } @@ -928,8 +943,20 @@ npxsave(addr) else #endif fpusave(addr); - start_emulating(); - PCPU_SET(fpcurthread, NULL); +} + +void npxswitch(struct thread *td, struct pcb *pcb); +void +npxswitch(struct thread *td, struct pcb *pcb) +{ + + if (lazy_fpu_switch || (td->td_pflags & TDP_KTHREAD) != 0 || + !PCB_USER_FPU(pcb)) { + start_emulating(); + PCPU_SET(fpcurthread, NULL); + } else if (PCPU_GET(fpcurthread) != td) { + restore_npx_curthread(td, pcb); + } } /* From owner-svn-src-stable@freebsd.org Thu Jun 21 09:41:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EA2C1018570; Thu, 21 Jun 2018 09:41:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30B0175829; Thu, 21 Jun 2018 09:41:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11D6610056; Thu, 21 Jun 2018 09:41:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5L9fiKu098585; Thu, 21 Jun 2018 09:41:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5L9fiKR098584; Thu, 21 Jun 2018 09:41:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806210941.w5L9fiKR098584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 21 Jun 2018 09:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335471 - stable/11/sys/dev/acpi_support X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/dev/acpi_support X-SVN-Commit-Revision: 335471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 09:41:45 -0000 Author: dim Date: Thu Jun 21 09:41:44 2018 New Revision: 335471 URL: https://svnweb.freebsd.org/changeset/base/335471 Log: MFC r335296: Fix build of aibs with base gcc on i386 Add a few intermediate casts to intptr_t to suppress "cast to pointer from integer of different size" warnings from gcc. In this case, the 'arg2' part of SYSCTL_HANDLER_ARGS is used to pass in a pointer, via an intermediate intmax_t, so no information is lost. Reviewed by: avg Differential Revision: https://reviews.freebsd.org/D15725 Modified: stable/11/sys/dev/acpi_support/atk0110.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpi_support/atk0110.c ============================================================================== --- stable/11/sys/dev/acpi_support/atk0110.c Thu Jun 21 08:19:11 2018 (r335470) +++ stable/11/sys/dev/acpi_support/atk0110.c Thu Jun 21 09:41:44 2018 (r335471) @@ -453,7 +453,7 @@ static int aibs_sysctl(SYSCTL_HANDLER_ARGS) { struct aibs_softc *sc = arg1; - struct aibs_sensor *sensor = (void *)arg2; + struct aibs_sensor *sensor = (void *)(intptr_t)arg2; int i = oidp->oid_number; ACPI_STATUS rs; ACPI_OBJECT p, *bp; @@ -519,7 +519,7 @@ static int aibs_sysctl_ggrp(SYSCTL_HANDLER_ARGS) { struct aibs_softc *sc = arg1; - struct aibs_sensor *sensor = (void *)arg2; + struct aibs_sensor *sensor = (void *)(intptr_t)arg2; ACPI_STATUS rs; ACPI_OBJECT p, *bp; ACPI_OBJECT_LIST arg; From owner-svn-src-stable@freebsd.org Thu Jun 21 09:45:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3895810188E3; Thu, 21 Jun 2018 09:45:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDED775AA1; Thu, 21 Jun 2018 09:45:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE5F610199; Thu, 21 Jun 2018 09:45:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5L9j389099513; Thu, 21 Jun 2018 09:45:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5L9j3HK099512; Thu, 21 Jun 2018 09:45:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806210945.w5L9j3HK099512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 21 Jun 2018 09:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335472 - stable/11/sys/compat/ndis X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/compat/ndis X-SVN-Commit-Revision: 335472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 09:45:04 -0000 Author: dim Date: Thu Jun 21 09:45:03 2018 New Revision: 335472 URL: https://svnweb.freebsd.org/changeset/base/335472 Log: MFC r335297: Fix build of ndis with base gcc on i386 Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so use an intermediate cast to uintptr_t to suppress it. In this case, the I/O port range is effectively limited to the range of 0..65535. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D15746 Modified: stable/11/sys/compat/ndis/subr_ndis.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/ndis/subr_ndis.c ============================================================================== --- stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 21 09:41:44 2018 (r335471) +++ stable/11/sys/compat/ndis/subr_ndis.c Thu Jun 21 09:45:03 2018 (r335472) @@ -1285,7 +1285,7 @@ NdisMRegisterIoPortRange(offset, adapter, port, numpor if (rman_get_size(sc->ndis_res_io) < numports) return (NDIS_STATUS_INVALID_LENGTH); - *offset = (void *)rman_get_start(sc->ndis_res_io); + *offset = (void *)(uintptr_t)rman_get_start(sc->ndis_res_io); return (NDIS_STATUS_SUCCESS); } From owner-svn-src-stable@freebsd.org Thu Jun 21 10:51:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41F04101A97B; Thu, 21 Jun 2018 10:51:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E729777339; Thu, 21 Jun 2018 10:51:25 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C864410B64; Thu, 21 Jun 2018 10:51:25 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LApPV3033350; Thu, 21 Jun 2018 10:51:25 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LApP35033349; Thu, 21 Jun 2018 10:51:25 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201806211051.w5LApP35033349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 21 Jun 2018 10:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335473 - stable/11/sys/netinet/libalias X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netinet/libalias X-SVN-Commit-Revision: 335473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 10:51:26 -0000 Author: ae Date: Thu Jun 21 10:51:25 2018 New Revision: 335473 URL: https://svnweb.freebsd.org/changeset/base/335473 Log: MFC r335133: In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested. It is better to try allocate a big mbuf, than just silently drop a big packet. A better solution could be reworking of libalias modules to be able use m_copydata()/m_copyback() instead of requiring the single contiguous buffer. PR: 229006 Modified: stable/11/sys/netinet/libalias/alias.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/libalias/alias.c ============================================================================== --- stable/11/sys/netinet/libalias/alias.c Thu Jun 21 09:45:03 2018 (r335472) +++ stable/11/sys/netinet/libalias/alias.c Thu Jun 21 10:51:25 2018 (r335473) @@ -1749,7 +1749,8 @@ LibAliasUnLoadAllModule(void) * the input packet, on failure NULL. The input packet is always consumed. */ struct mbuf * -m_megapullup(struct mbuf *m, int len) { +m_megapullup(struct mbuf *m, int len) +{ struct mbuf *mcl; if (len > m->m_pkthdr.len) @@ -1758,7 +1759,14 @@ m_megapullup(struct mbuf *m, int len) { if (m->m_next == NULL && M_WRITABLE(m)) return (m); - mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + if (len <= MJUMPAGESIZE) + mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + else if (len <= MJUM9BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + else if (len <= MJUM16BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES); + else + goto bad; if (mcl == NULL) goto bad; m_align(mcl, len); From owner-svn-src-stable@freebsd.org Thu Jun 21 11:24:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE580101B46E; Thu, 21 Jun 2018 11:24:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A10EC781B5; Thu, 21 Jun 2018 11:24:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EAFC11193; Thu, 21 Jun 2018 11:24:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LBOLA4050492; Thu, 21 Jun 2018 11:24:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LBOLhs050491; Thu, 21 Jun 2018 11:24:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201806211124.w5LBOLhs050491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 21 Jun 2018 11:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335474 - stable/10/sys/netinet/libalias X-SVN-Group: stable-10 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/10/sys/netinet/libalias X-SVN-Commit-Revision: 335474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 11:24:22 -0000 Author: ae Date: Thu Jun 21 11:24:20 2018 New Revision: 335474 URL: https://svnweb.freebsd.org/changeset/base/335474 Log: MFC r335133: In m_megapullup() use m_getjcl() to allocate 9k or 16k mbuf when requested. It is better to try allocate a big mbuf, than just silently drop a big packet. A better solution could be reworking of libalias modules to be able use m_copydata()/m_copyback() instead of requiring the single contiguous buffer. PR: 229006 Modified: stable/10/sys/netinet/libalias/alias.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/libalias/alias.c ============================================================================== --- stable/10/sys/netinet/libalias/alias.c Thu Jun 21 10:51:25 2018 (r335473) +++ stable/10/sys/netinet/libalias/alias.c Thu Jun 21 11:24:20 2018 (r335474) @@ -1749,7 +1749,8 @@ LibAliasUnLoadAllModule(void) * the input packet, on failure NULL. The input packet is always consumed. */ struct mbuf * -m_megapullup(struct mbuf *m, int len) { +m_megapullup(struct mbuf *m, int len) +{ struct mbuf *mcl; if (len > m->m_pkthdr.len) @@ -1758,7 +1759,14 @@ m_megapullup(struct mbuf *m, int len) { if (m->m_next == NULL && M_WRITABLE(m)) return (m); - mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + if (len <= MJUMPAGESIZE) + mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); + else if (len <= MJUM9BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + else if (len <= MJUM16BYTES) + mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES); + else + goto bad; if (mcl == NULL) goto bad; m_align(mcl, len); From owner-svn-src-stable@freebsd.org Thu Jun 21 14:21:12 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53919102052C; Thu, 21 Jun 2018 14:21:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F23A37E76B; Thu, 21 Jun 2018 14:21:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D389912E37; Thu, 21 Jun 2018 14:21:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LELBIk039733; Thu, 21 Jun 2018 14:21:11 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LELBGS039732; Thu, 21 Jun 2018 14:21:11 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806211421.w5LELBGS039732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Jun 2018 14:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335480 - stable/11/share/examples X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/share/examples X-SVN-Commit-Revision: 335480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 14:21:12 -0000 Author: dteske Date: Thu Jun 21 14:21:11 2018 New Revision: 335480 URL: https://svnweb.freebsd.org/changeset/base/335480 Log: MFC r330886: Install files added in SVN's r295373, r295457, r295542 Reported by: woodsb02 Sponsored by: Smule, Inc. Modified: stable/11/share/examples/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/Makefile ============================================================================== --- stable/11/share/examples/Makefile Thu Jun 21 14:04:02 2018 (r335479) +++ stable/11/share/examples/Makefile Thu Jun 21 14:21:11 2018 (r335480) @@ -76,6 +76,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ indent/indent.pro \ ipfw/change_rules.sh \ jails/README \ + jails/VIMAGE \ + jails/jail.xxx.conf \ + jails/jib \ + jails/jng \ + jails/rc.conf.jails \ + jails/rcjail.xxx.conf \ kld/Makefile \ kld/cdev/Makefile \ kld/cdev/README \ From owner-svn-src-stable@freebsd.org Thu Jun 21 14:41:59 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33ED71020E77; Thu, 21 Jun 2018 14:41:59 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAFD17F8FD; Thu, 21 Jun 2018 14:41:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B1A2131B1; Thu, 21 Jun 2018 14:41:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LEfwTG050958; Thu, 21 Jun 2018 14:41:58 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LEfwg8050957; Thu, 21 Jun 2018 14:41:58 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806211441.w5LEfwg8050957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Jun 2018 14:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335484 - stable/11/usr.sbin/bsdconfig/share X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/usr.sbin/bsdconfig/share X-SVN-Commit-Revision: 335484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 14:41:59 -0000 Author: dteske Date: Thu Jun 21 14:41:58 2018 New Revision: 335484 URL: https://svnweb.freebsd.org/changeset/base/335484 Log: MFC r335280-r335281, r335302: sysrc.subr updates r335280: Fix handling of files with missing newline at EOF r335302: Fix a comment for accuracy PR: bin/203435 Reported by: Andreas Sommer r335281: Fix display when value is "-n" PR: bin/226406 Reported by: Marius Halden Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/share/sysrc.subr Thu Jun 21 14:30:14 2018 (r335483) +++ stable/11/usr.sbin/bsdconfig/share/sysrc.subr Thu Jun 21 14:41:58 2018 (r335484) @@ -200,7 +200,7 @@ f_sysrc_get() # such as "${varname?}" and "${varname:?}" (see "Parameter # Expansion" in sh(1) for more information). # - eval echo '"${'"$1"'}"' 2> /dev/null + eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null ) } @@ -338,7 +338,7 @@ f_sysrc_get_default() # such as "${varname?}" and "${varname:?}" (see "Parameter # Expansion" in sh(1) for more information). # - eval echo '"${'"$1"'}"' 2> /dev/null + eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null ) } @@ -556,9 +556,16 @@ f_sysrc_set() fi # - # If not found, append new value to last file and return. + # If not found, append new value to first file and return. # if [ "$not_found" ]; then + # Add a newline if missing before appending to the file + awk 'BEGIN { wc = 0 } NR == 1 { + (cmd = "wc -l " FILENAME) | getline + close(cmd) + wc = $1 + } END { exit wc != NR }' "$file" || + echo >> "$file" || return $? echo "$varname=\"$new_value\"" >> "$file" return $? fi @@ -606,8 +613,11 @@ f_sysrc_set() # # Operate on the matching file, replacing only the last occurrence. # + # Use awk to ensure LF at end of each line, else files without ending + # LF will trigger a bug in `tail -r' where last two lines are joined. + # local new_contents retval - new_contents=$( tail -r $file 2> /dev/null ) + new_contents=$( awk 1 "$file" 2> /dev/null | tail -r ) new_contents=$( echo "$new_contents" | awk -v varname="$varname" \ -v new_value="$new_value" "$f_sysrc_set_awk" ) retval=$? From owner-svn-src-stable@freebsd.org Thu Jun 21 14:55:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66814102135C; Thu, 21 Jun 2018 14:55:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 130C5801B1; Thu, 21 Jun 2018 14:55:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E846C133AA; Thu, 21 Jun 2018 14:55:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LEtQoA057614; Thu, 21 Jun 2018 14:55:26 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LEtQn7057613; Thu, 21 Jun 2018 14:55:26 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806211455.w5LEtQn7057613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Jun 2018 14:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335485 - stable/11/usr.sbin/bsdconfig/usermgmt/share X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/usr.sbin/bsdconfig/usermgmt/share X-SVN-Commit-Revision: 335485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 14:55:27 -0000 Author: dteske Date: Thu Jun 21 14:55:26 2018 New Revision: 335485 URL: https://svnweb.freebsd.org/changeset/base/335485 Log: MFC r335308: bsdconfig: Fix a bug when editing users The usermgmt API was stomping on a global ($user_gid to be specific) so things would appear to work fine until you tried to make a second pass into the API with the now-tainted variable contents. Fixed by localizing menu-specific contents as to not leak outside API. PR: bin/208774 Reported by: Martin Waschbuesch Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:41:58 2018 (r335484) +++ stable/11/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:55:26 2018 (r335485) @@ -1020,13 +1020,6 @@ f_dialog_menu_user_add() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1038,6 +1031,14 @@ f_dialog_menu_user_add() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_add/$msg_exit' '1' '$msg_login: $_user_name' @@ -1137,13 +1138,6 @@ f_dialog_menu_user_delete() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1155,6 +1149,14 @@ f_dialog_menu_user_delete() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_delete/$msg_exit' '1' '$msg_login: $_user_name' @@ -1254,13 +1256,6 @@ f_dialog_menu_user_edit() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1271,6 +1266,14 @@ f_dialog_menu_user_edit() local _user_$var eval f_shell_escape \"\$user_$var\" _user_$var done + + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi menu_list=" 'X' '$msg_save/$msg_exit' From owner-svn-src-stable@freebsd.org Thu Jun 21 15:02:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB25210216CE; Thu, 21 Jun 2018 15:02:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 648C780895; Thu, 21 Jun 2018 15:02:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46EB113550; Thu, 21 Jun 2018 15:02:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LF2IlD062623; Thu, 21 Jun 2018 15:02:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LF2IjT062622; Thu, 21 Jun 2018 15:02:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806211502.w5LF2IjT062622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Jun 2018 15:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335487 - stable/10/usr.sbin/bsdconfig/usermgmt/share X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10/usr.sbin/bsdconfig/usermgmt/share X-SVN-Commit-Revision: 335487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 15:02:19 -0000 Author: dteske Date: Thu Jun 21 15:02:17 2018 New Revision: 335487 URL: https://svnweb.freebsd.org/changeset/base/335487 Log: MFC r335308: bsdconfig: Fix a bug when editing users The usermgmt API was stomping on a global ($user_gid to be specific) so things would appear to work fine until you tried to make a second pass into the API with the now-tainted variable contents. Fixed by localizing menu-specific contents as to not leak outside API. PR: bin/208774 Reported by: Martin Waschbuesch Sponsored by: Smule, Inc. Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 14:59:23 2018 (r335486) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Thu Jun 21 15:02:17 2018 (r335487) @@ -1020,13 +1020,6 @@ f_dialog_menu_user_add() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1038,6 +1031,14 @@ f_dialog_menu_user_add() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_add/$msg_exit' '1' '$msg_login: $_user_name' @@ -1137,13 +1138,6 @@ f_dialog_menu_user_delete() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1155,6 +1149,14 @@ f_dialog_menu_user_delete() eval f_shell_escape \"\$user_$var\" _user_$var done + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi + menu_list=" 'X' '$msg_delete/$msg_exit' '1' '$msg_login: $_user_name' @@ -1254,13 +1256,6 @@ f_dialog_menu_user_edit() user_password_expires_on="$user_password_expire" fi - # Attempt to translate a numeric GID into `number (name)' - if f_isinteger "$user_gid"; then - local user_group - user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) && - user_gid="$user_gid (${user_group%%:*})" - fi - # Localize potentially hostile variables and escape their values # to the local variable (see f_shell_escape() of `strings.subr') local var @@ -1271,6 +1266,14 @@ f_dialog_menu_user_edit() local _user_$var eval f_shell_escape \"\$user_$var\" _user_$var done + + # Attempt to translate a numeric GID into `number (name)' + if f_isinteger "$_user_gid"; then + local _user_group + _user_group=$( pw groupshow -g "$_user_gid" 2> /dev/null ) && + _user_group="${_user_group%%:*}" && + f_shell_escape "$_user_gid ($_user_group)" _user_gid + fi menu_list=" 'X' '$msg_save/$msg_exit' From owner-svn-src-stable@freebsd.org Thu Jun 21 15:11:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E83731021A38; Thu, 21 Jun 2018 15:11:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D24E80BB3; Thu, 21 Jun 2018 15:11:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F1AD135A2; Thu, 21 Jun 2018 15:11:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LFBEcM064795; Thu, 21 Jun 2018 15:11:14 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LFBEoa064794; Thu, 21 Jun 2018 15:11:14 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806211511.w5LFBEoa064794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 21 Jun 2018 15:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335488 - stable/11/usr.sbin/bsdconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/usr.sbin/bsdconfig X-SVN-Commit-Revision: 335488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 15:11:15 -0000 Author: dteske Date: Thu Jun 21 15:11:14 2018 New Revision: 335488 URL: https://svnweb.freebsd.org/changeset/base/335488 Log: MFC r335306: bsdconfig: Make examples optional PR: bin/228485 Submitted by: Dmitry Wagin Reported by: Dmitry Wagin Sponsored by: Smule, Inc. Modified: stable/11/usr.sbin/bsdconfig/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/Makefile ============================================================================== --- stable/11/usr.sbin/bsdconfig/Makefile Thu Jun 21 15:02:17 2018 (r335487) +++ stable/11/usr.sbin/bsdconfig/Makefile Thu Jun 21 15:11:14 2018 (r335488) @@ -1,10 +1,11 @@ # $FreeBSD$ +.include + SUBDIR= console \ diskmgmt \ docsinstall \ dot \ - examples \ include \ includes \ mouse \ @@ -17,6 +18,10 @@ SUBDIR= console \ timezone \ ttys \ usermgmt + +.if ${MK_EXAMPLES} != "no" +SUBDIR+= examples +.endif FILESDIR= ${LIBEXECDIR}/bsdconfig FILES= USAGE From owner-svn-src-stable@freebsd.org Thu Jun 21 16:12:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B797A1022C3D; Thu, 21 Jun 2018 16:12:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D55B831BD; Thu, 21 Jun 2018 16:12:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E579140D6; Thu, 21 Jun 2018 16:12:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LGCV3e099304; Thu, 21 Jun 2018 16:12:31 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LGCVJZ099303; Thu, 21 Jun 2018 16:12:31 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201806211612.w5LGCVJZ099303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 21 Jun 2018 16:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335492 - stable/11/usr.sbin/syslogd X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/usr.sbin/syslogd X-SVN-Commit-Revision: 335492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 16:12:31 -0000 Author: ed Date: Thu Jun 21 16:12:30 2018 New Revision: 335492 URL: https://svnweb.freebsd.org/changeset/base/335492 Log: MFC r335314: Fix bad logic in iovlist_truncate(). To conform to RFC 5426, this function is intended to truncate messages if they exceed the message size limits. Unfortunately, the amount of space was computed the wrong way around, causing messages to be truncated entirely. Reported by: Michael Grimm on stable@ Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 21 15:59:05 2018 (r335491) +++ stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 21 16:12:30 2018 (r335492) @@ -1611,8 +1611,8 @@ iovlist_truncate(struct iovlist *il, size_t size) struct iovec *last; size_t diff; - while (size > il->totalsize) { - diff = size - il->totalsize; + while (il->totalsize > size) { + diff = il->totalsize - size; last = &il->iov[il->iovcnt - 1]; if (diff >= last->iov_len) { /* Remove the last iovec entirely. */ From owner-svn-src-stable@freebsd.org Thu Jun 21 16:53:49 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B86B610240C9; Thu, 21 Jun 2018 16:53:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B60784FAE; Thu, 21 Jun 2018 16:53:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C6FB147C9; Thu, 21 Jun 2018 16:53:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LGrn2D022005; Thu, 21 Jun 2018 16:53:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LGrmTh022003; Thu, 21 Jun 2018 16:53:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806211653.w5LGrmTh022003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 16:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335495 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 335495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 16:53:49 -0000 Author: gjb Date: Thu Jun 21 16:53:48 2018 New Revision: 335495 URL: https://svnweb.freebsd.org/changeset/base/335495 Log: Document EN-18:07, SA-18:07. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Thu Jun 21 16:40:07 2018 (r335494) +++ stable/11/release/doc/share/xml/errata.xml Thu Jun 21 16:53:48 2018 (r335495) @@ -88,6 +88,13 @@ Update timezone database information + + + FreeBSD-EN-18:07.pmap + 21 June 2018 + Fix TLB for Xen guests + Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Thu Jun 21 16:40:07 2018 (r335494) +++ stable/11/release/doc/share/xml/security.xml Thu Jun 21 16:53:48 2018 (r335495) @@ -114,6 +114,14 @@ Mishandling of x86 debug exceptions + + + FreeBSD-SA-18:07.lazyfpu + 21 June 2018 + Fix Lazy FPU information + disclosure + From owner-svn-src-stable@freebsd.org Thu Jun 21 17:05:33 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9944F102438C; Thu, 21 Jun 2018 17:05:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DC508578D; Thu, 21 Jun 2018 17:05:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A250149E1; Thu, 21 Jun 2018 17:05:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LH5WQR027041; Thu, 21 Jun 2018 17:05:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LH5WcK027037; Thu, 21 Jun 2018 17:05:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806211705.w5LH5WcK027037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 17:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335496 - in stable/11/release/doc/en_US.ISO8859-1: errata hardware readme relnotes X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/release/doc/en_US.ISO8859-1: errata hardware readme relnotes X-SVN-Commit-Revision: 335496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 17:05:33 -0000 Author: gjb Date: Thu Jun 21 17:05:31 2018 New Revision: 335496 URL: https://svnweb.freebsd.org/changeset/base/335496 Log: Add xml:id attributes for future diff reduction. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 16:53:48 2018 (r335495) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 17:05:31 2018 (r335496) @@ -14,6 +14,7 @@
&os; &release; Errata Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Jun 21 16:53:48 2018 (r335495) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Jun 21 17:05:31 2018 (r335496) @@ -7,7 +7,9 @@ %devauto; ]>
+ xmlns:xlink="http://www.w3.org/1999/xlink" + xml:id="top" + version="5.0"> &os; &release.current; Hardware Notes Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu Jun 21 16:53:48 2018 (r335495) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu Jun 21 17:05:31 2018 (r335496) @@ -13,7 +13,9 @@ End: -->
+ xmlns:xlink="http://www.w3.org/1999/xlink" + xml:id="top" + version="5.0"> &os; &release.current; README @@ -70,7 +72,7 @@ &release.current;, the latest point along the &release.branch; branch. - + About &os; &os; is an operating system based on 4.4 BSD Lite for @@ -107,7 +109,7 @@ be quickly installed from the installation program. - + Target Audience This &release.type; is aimed @@ -163,7 +165,7 @@ complete &os; distribution, rather than updating an existing installation. - + CDROM and DVD &os; -RELEASE distributions may be ordered on CDROM or DVD @@ -180,7 +182,7 @@ &os; appendix to the Handbook. - + HTTPS &os; releases may be downloaded via @@ -189,7 +191,7 @@ which is the official &os; release site. - + FTP You can use FTP to retrieve &os; and any or all of its @@ -222,7 +224,7 @@ Contacting the &os; Project - + Email and Mailing Lists For any questions or general technical support issues, @@ -265,7 +267,7 @@ - + Submitting Problem Reports Suggestions, bug reports and contributions of code are @@ -369,7 +371,7 @@ - + Manual Pages As with almost all &unix; like operating systems, &os; @@ -387,7 +389,7 @@ and &man.style.9; (a style guide to kernel coding). - + Books and Articles Two highly-useful collections of &os;-related information, Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 21 16:53:48 2018 (r335495) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 21 17:05:31 2018 (r335496) @@ -11,7 +11,9 @@ ]>
+ xmlns:xlink="http://www.w3.org/1999/xlink" + xml:id="top" + version="5.0"> &os; &release.current; Release Notes From owner-svn-src-stable@freebsd.org Thu Jun 21 21:19:49 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 500F310009AE; Thu, 21 Jun 2018 21:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 022FD8EFAA; Thu, 21 Jun 2018 21:19:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D41CF1749E; Thu, 21 Jun 2018 21:19:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LLJmYm057324; Thu, 21 Jun 2018 21:19:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LLJmSA057323; Thu, 21 Jun 2018 21:19:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806212119.w5LLJmSA057323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Jun 2018 21:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335507 - stable/11/sys/amd64/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/linux X-SVN-Commit-Revision: 335507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 21:19:49 -0000 Author: kib Date: Thu Jun 21 21:19:48 2018 New Revision: 335507 URL: https://svnweb.freebsd.org/changeset/base/335507 Log: MFC r335135: linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN. Modified: stable/11/sys/amd64/linux/linux_sysvec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/amd64/linux/linux_sysvec.c Thu Jun 21 21:16:26 2018 (r335506) +++ stable/11/sys/amd64/linux/linux_sysvec.c Thu Jun 21 21:19:48 2018 (r335507) @@ -257,7 +257,8 @@ linux_set_syscall_retval(struct thread *td, int error) * So, do not clobber %rdx and %r10 */ td->td_retval[1] = frame->tf_rdx; - frame->tf_r10 = frame->tf_rcx; + if (error != EJUSTRETURN) + frame->tf_r10 = frame->tf_rcx; cpu_set_syscall_retval(td, error); From owner-svn-src-stable@freebsd.org Thu Jun 21 21:21:17 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569211000A51; Thu, 21 Jun 2018 21:21:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7138F17E; Thu, 21 Jun 2018 21:21:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFB59174E0; Thu, 21 Jun 2018 21:21:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LLLGjC060356; Thu, 21 Jun 2018 21:21:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LLLG9r060355; Thu, 21 Jun 2018 21:21:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806212121.w5LLLG9r060355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Jun 2018 21:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335508 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 335508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 21:21:17 -0000 Author: kib Date: Thu Jun 21 21:21:16 2018 New Revision: 335508 URL: https://svnweb.freebsd.org/changeset/base/335508 Log: MFC r335171: Handle the race between fork/vm_object_split() and faults. Modified: stable/11/sys/vm/swap_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Thu Jun 21 21:19:48 2018 (r335507) +++ stable/11/sys/vm/swap_pager.c Thu Jun 21 21:21:16 2018 (r335508) @@ -1096,21 +1096,24 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, int *rahead) { struct buf *bp; - vm_page_t mpred, msucc, p; + vm_page_t bm, mpred, msucc, p; vm_pindex_t pindex; daddr_t blk; - int i, j, maxahead, maxbehind, reqcount, shift; + int i, maxahead, maxbehind, reqcount; reqcount = count; - VM_OBJECT_WUNLOCK(object); - bp = getpbuf(&nsw_rcount); - VM_OBJECT_WLOCK(object); - - if (!swap_pager_haspage(object, ma[0]->pindex, &maxbehind, &maxahead)) { - relpbuf(bp, &nsw_rcount); + /* + * Determine the final number of read-behind pages and + * allocate them BEFORE releasing the object lock. Otherwise, + * there can be a problematic race with vm_object_split(). + * Specifically, vm_object_split() might first transfer pages + * that precede ma[0] in the current object to a new object, + * and then this function incorrectly recreates those pages as + * read-behind pages in the current object. + */ + if (!swap_pager_haspage(object, ma[0]->pindex, &maxbehind, &maxahead)) return (VM_PAGER_FAIL); - } /* * Clip the readahead and readbehind ranges to exclude resident pages. @@ -1132,35 +1135,31 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, *rbehind = pindex - mpred->pindex - 1; } + bm = ma[0]; + for (i = 0; i < count; i++) + ma[i]->oflags |= VPO_SWAPINPROG; + /* * Allocate readahead and readbehind pages. */ - shift = rbehind != NULL ? *rbehind : 0; - if (shift != 0) { - for (i = 1; i <= shift; i++) { + if (rbehind != NULL) { + for (i = 1; i <= *rbehind; i++) { p = vm_page_alloc(object, ma[0]->pindex - i, VM_ALLOC_NORMAL); - if (p == NULL) { - /* Shift allocated pages to the left. */ - for (j = 0; j < i - 1; j++) - bp->b_pages[j] = - bp->b_pages[j + shift - i + 1]; + if (p == NULL) break; - } - bp->b_pages[shift - i] = p; + p->oflags |= VPO_SWAPINPROG; + bm = p; } - shift = i - 1; - *rbehind = shift; + *rbehind = i - 1; } - for (i = 0; i < reqcount; i++) - bp->b_pages[i + shift] = ma[i]; if (rahead != NULL) { for (i = 0; i < *rahead; i++) { p = vm_page_alloc(object, ma[reqcount - 1]->pindex + i + 1, VM_ALLOC_NORMAL); if (p == NULL) break; - bp->b_pages[shift + reqcount + i] = p; + p->oflags |= VPO_SWAPINPROG; } *rahead = i; } @@ -1171,15 +1170,18 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, vm_object_pip_add(object, count); - for (i = 0; i < count; i++) - bp->b_pages[i]->oflags |= VPO_SWAPINPROG; - - pindex = bp->b_pages[0]->pindex; + pindex = bm->pindex; blk = swp_pager_meta_ctl(object, pindex, 0); KASSERT(blk != SWAPBLK_NONE, ("no swap blocking containing %p(%jx)", object, (uintmax_t)pindex)); VM_OBJECT_WUNLOCK(object); + bp = getpbuf(&nsw_rcount); + /* Pages cannot leave the object while busy. */ + for (i = 0, p = bm; i < count; i++, p = TAILQ_NEXT(p, listq)) { + MPASS(p->pindex == bm->pindex + i); + bp->b_pages[i] = p; + } bp->b_flags |= B_PAGING; bp->b_iocmd = BIO_READ; From owner-svn-src-stable@freebsd.org Thu Jun 21 23:09:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 545D61003D61; Thu, 21 Jun 2018 23:09:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F044D72A84; Thu, 21 Jun 2018 23:09:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC7E618763; Thu, 21 Jun 2018 23:09:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LN9ePB013832; Thu, 21 Jun 2018 23:09:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LN9eZM013831; Thu, 21 Jun 2018 23:09:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806212309.w5LN9eZM013831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 23:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335511 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 335511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 23:09:41 -0000 Author: gjb Date: Thu Jun 21 23:09:40 2018 New Revision: 335511 URL: https://svnweb.freebsd.org/changeset/base/335511 Log: Update version entities in release.ent. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/release.ent Modified: stable/11/release/doc/share/xml/release.ent ============================================================================== --- stable/11/release/doc/share/xml/release.ent Thu Jun 21 22:59:49 2018 (r335510) +++ stable/11/release/doc/share/xml/release.ent Thu Jun 21 23:09:40 2018 (r335511) @@ -6,23 +6,23 @@ - + - + - + - + - + From owner-svn-src-stable@freebsd.org Thu Jun 21 23:10:59 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6638A1003FAB; Thu, 21 Jun 2018 23:10:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1784972C4B; Thu, 21 Jun 2018 23:10:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED2C11887F; Thu, 21 Jun 2018 23:10:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LNAwZv013992; Thu, 21 Jun 2018 23:10:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LNAw1x013991; Thu, 21 Jun 2018 23:10:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806212310.w5LNAw1x013991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 23:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335512 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 23:10:59 -0000 Author: gjb Date: Thu Jun 21 23:10:58 2018 New Revision: 335512 URL: https://svnweb.freebsd.org/changeset/base/335512 Log: Synchronize the stable/11 errata page with releng/11.2 in preparation for creating the 11.2-RELEASE errata.html page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 23:09:40 2018 (r335511) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 21 23:10:58 2018 (r335512) @@ -57,7 +57,7 @@ Introduction This errata document contains late-breaking - news about &os; &release; Before installing this + news about &os; &release;. Before installing this version, it is important to consult this document to learn about any post-release discoveries or problems that may already have been found and fixed. @@ -121,19 +121,6 @@ boot - [2017-07-21] Due to a bug in earlier versions of - &man.clang.1; that is difficult to work around in the - upgrade process, to upgrade the system from sources via - buildworld to -CURRENT or &release;, it is necessary to - upgrade machines running 9.x to at least revision r286035, - or machines running 10.x to revision r286033. Source-based - upgrades from 10.3-RELEASE are not affected. This differs - from the historical situation where one could generally - upgrade from anywhere on earlier stable branches, so caution - should be exercised. - - - [2017-07-25] &os;/&arch.arm64; currently lacks EFI real-time clock (RTC) support, which may cause the system @@ -154,51 +141,6 @@ boot - [2017-07-26] Note for those upgrading from 11.1-RC2 in - VirtualBox: - - If system panics were experienced when upgrading from - 11.1-RC1 to 11.1-RC2, and the emulators/virtualbox-ose-additions{,-nox11} - port was built locally as a resolution, the port will either - need to be rebuilt when upgrading from 11.1-RC2 to - 11.1-RELEASE, or reinstall the package from the pkg(8) - mirrors using either: - - &prompt.root; pkg install -f virtualbox-ose-additions - - or - - &prompt.root; pkg install -f virtualbox-ose-additions-nox11 - - To ensure the system does not panic after rebooting into - the updated kernel, it is recommended to disable the - vboxguest service in &man.rc.conf.5; - prior to rebooting the system if possible, or use - &man.pkg.8; to forcefully reinstall the package. - - Systems being upgraded from 11.1-RC1 and earlier and - 11.1-RC3 to 11.1-RELEASE should be unaffected. - - - - [2017-07-27] The release notes erroneously state - revision r315330 was sponsored by Rubicon - Communications, LLC (Netgate), when in fact this work was - done by Hiroki Mori independently. - - - - [2017-08-09] The release notes stated the - &man.ruptime.1;, &man.rwho.1;, and &man.rwhod.8; utilities - have been marked "deprecated", however this change - was reversed in 12.0-CURRENT. - - The other utilities mentioned in the entry in the - release notes, however, are unchanged. - - - [2017-11-06] An issue with &os; virtual machines with vagrant was discovered that affects the VirtualBox where the @@ -213,6 +155,23 @@ boot invocation of vagrant up will allow the virtual machine to successfully boot, allowing access via vagrant ssh. + + + + [2018-06-21] An issue had been discovered late in the + release cycle where removing ZFS vdevs + from a pool under certain conditions would cause a system + crash when &man.zfsd.8; is enabled in + &man.rc.conf.5;. + + At present, it is believed to be limited to removal of + a mirror vdev from a pool consisting of + multiple mirror vdevs. + + See PR 228750 + for more information and updates as the issue is + investigated. From owner-svn-src-stable@freebsd.org Thu Jun 21 23:13:35 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7CFC10040FB; Thu, 21 Jun 2018 23:13:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6984C72FD3; Thu, 21 Jun 2018 23:13:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 469FF188F5; Thu, 21 Jun 2018 23:13:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LNDZsp018562; Thu, 21 Jun 2018 23:13:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LNDYQM018561; Thu, 21 Jun 2018 23:13:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806212313.w5LNDYQM018561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 23:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335513 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 335513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 23:13:36 -0000 Author: gjb Date: Thu Jun 21 23:13:34 2018 New Revision: 335513 URL: https://svnweb.freebsd.org/changeset/base/335513 Log: Prune SAs and ENs from 11.1-RELEASE in preparation for creating the 11.2-RELEASE errata page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Thu Jun 21 23:10:58 2018 (r335512) +++ stable/11/release/doc/share/xml/errata.xml Thu Jun 21 23:13:34 2018 (r335513) @@ -19,81 +19,9 @@ - FreeBSD-EN-17:07.vnet - 10 August 2017 - VNET kernel panic with asynchronous - I/O - - - - FreeBSD-EN-17:08.pf - 10 August 2017 - &man.pf.4; housekeeping thread causes kernel - panic - - - - FreeBSD-EN-17:09.tzdata - 2 November 2017 - Timezone database information - update - - - - FreeBSD-EN-18:01.tzdata - 07 March 2018 - Timezone database information - update - - - - FreeBSD-EN-18:02.file - 07 March 2018 - Stack-based buffer overflow - - - - FreeBSD-EN-18:03.tzdata - 04 April 2018 - Update timezone database - information - - - - FreeBSD-EN-18:04.mem - 04 April 2018 - Multiple small kernel memory - disclosures - - - - FreeBSD-EN-18:05.mem - 08 May 2018 - Multiple small kernel memory - disclosures - - - - FreeBSD-EN-18:06.tzdata - 08 May 2018 - Update timezone database - information - - - - FreeBSD-EN-18:07.pmap - 21 June 2018 - Fix TLB for Xen guests + No erratas +   +   Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Thu Jun 21 23:10:58 2018 (r335512) +++ stable/11/release/doc/share/xml/security.xml Thu Jun 21 23:13:34 2018 (r335513) @@ -19,108 +19,9 @@ - FreeBSD-SA-17:06.openssh - 10 August 2017 - Denial of Service vulnerability - - - - FreeBSD-SA-17:07.wpa - 16 October 2017 - WPA2 protocol vulnerability - - - - FreeBSD-SA-17:08.ptrace - 15 November 2017 - Kernel data leak via - ptrace(PT_LWPINFO) - - - - FreeBSD-SA-17:10.kldstat - 15 November 2017 - Information leak - - - - FreeBSD-SA-17:11.openssl - 29 November 2017 - Multiple vulnerabilities - - - - FreeBSD-SA-17:12.openssl - 09 December 2017 - Multiple vulnerabilities - - - - FreeBSD-SA-18:01.ipsec - 07 March 2018 - Fix IPSEC validation and - use-after-free - - - - FreeBSD-SA-18:02.ntp - 07 March 2018 - Multiple vulnerabilities - - - - FreeBSD-SA-18:03.speculative_execution - 14 March 2018 - - Speculative Execution Vulnerabilities - - This advisory addresses the most significant issues - for &os; 11.1 on &arch.amd64; CPUs. We expect to - update this advisory to include 10.x for &arch.amd64; - CPUs. Future &os; releases will address this issue on - &arch.i386; and other CPUs. - - - - - - FreeBSD-SA-18:04.vt - 04 April 2018 - Fix &man.vt.4; console memory - disclosure - - - - FreeBSD-SA-18:05.ipsec - 04 April 2018 - Fix denial of service - - - - FreeBSD-SA-18:06.debugreg - 08 May 2018 - Mishandling of x86 debug - exceptions - - - - FreeBSD-SA-18:07.lazyfpu - 21 June 2018 - Fix Lazy FPU information - disclosure + No advisories +   +   From owner-svn-src-stable@freebsd.org Thu Jun 21 23:29:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 270AE10047FC; Thu, 21 Jun 2018 23:29:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C66D5736EC; Thu, 21 Jun 2018 23:29:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A432518AA9; Thu, 21 Jun 2018 23:29:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LNTHdt024182; Thu, 21 Jun 2018 23:29:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LNTH0K024181; Thu, 21 Jun 2018 23:29:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806212329.w5LNTH0K024181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 21 Jun 2018 23:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335514 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 335514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 23:29:18 -0000 Author: gjb Date: Thu Jun 21 23:29:17 2018 New Revision: 335514 URL: https://svnweb.freebsd.org/changeset/base/335514 Log: Set stable/11 from -PRERELEASE back to -STABLE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 21 23:13:34 2018 (r335513) +++ stable/11/sys/conf/newvers.sh Thu Jun 21 23:29:17 2018 (r335514) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.2" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@freebsd.org Fri Jun 22 00:27:32 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F681006177; Fri, 22 Jun 2018 00:27:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65C16754D8; Fri, 22 Jun 2018 00:27:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46C5219468; Fri, 22 Jun 2018 00:27:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M0RWFW054908; Fri, 22 Jun 2018 00:27:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M0RWxK054907; Fri, 22 Jun 2018 00:27:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806220027.w5M0RWxK054907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Jun 2018 00:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335518 - stable/11/usr.sbin/asf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/asf X-SVN-Commit-Revision: 335518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 00:27:32 -0000 Author: emaste Date: Fri Jun 22 00:27:31 2018 New Revision: 335518 URL: https://svnweb.freebsd.org/changeset/base/335518 Log: MFC r335221: Add deprecation notice in asf.8 PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/asf/asf.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/asf/asf.8 ============================================================================== --- stable/11/usr.sbin/asf/asf.8 Fri Jun 22 00:02:36 2018 (r335517) +++ stable/11/usr.sbin/asf/asf.8 Fri Jun 22 00:27:31 2018 (r335518) @@ -37,6 +37,15 @@ .Op Fl o Ar outfile .Op Fl X Ar suffix .Op Ar modules-path Op Ar outfile +.Sh DEPRECATION NOTICE +The +.Nm +utility is not present in +.Fx 12.0 +and later. +The +.Xr kgdb 1 +debugger handles kernel module state internally. .Sh DESCRIPTION By default, .Nm From owner-svn-src-stable@freebsd.org Fri Jun 22 00:28:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7349B1006373; Fri, 22 Jun 2018 00:28:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20E29756D7; Fri, 22 Jun 2018 00:28:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02FFC1946A; Fri, 22 Jun 2018 00:28:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M0SSBU055022; Fri, 22 Jun 2018 00:28:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M0SSw0055021; Fri, 22 Jun 2018 00:28:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806220028.w5M0SSw0055021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Jun 2018 00:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335519 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 335519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 00:28:29 -0000 Author: emaste Date: Fri Jun 22 00:28:28 2018 New Revision: 335519 URL: https://svnweb.freebsd.org/changeset/base/335519 Log: MFC r335214: Correct kern.pre.mk comment: objcopy copies objects. (Not objdump.) PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/kern.pre.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.pre.mk ============================================================================== --- stable/11/sys/conf/kern.pre.mk Fri Jun 22 00:27:31 2018 (r335518) +++ stable/11/sys/conf/kern.pre.mk Fri Jun 22 00:28:28 2018 (r335519) @@ -229,7 +229,7 @@ MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" MKMODULESENV+= __MPATH="${__MPATH}" .endif -# Architecture and output format arguments for objdump to convert image to +# Architecture and output format arguments for objcopy to convert image to # object file .if ${MFS_IMAGE:Uno} != "no" From owner-svn-src-stable@freebsd.org Fri Jun 22 00:29:30 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F71100644A; Fri, 22 Jun 2018 00:29:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDEC475844; Fri, 22 Jun 2018 00:29:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEFD91946C; Fri, 22 Jun 2018 00:29:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M0TTus055130; Fri, 22 Jun 2018 00:29:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M0TT8U055129; Fri, 22 Jun 2018 00:29:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806220029.w5M0TT8U055129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Jun 2018 00:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335520 - stable/11/share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/man/man5 X-SVN-Commit-Revision: 335520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 00:29:30 -0000 Author: emaste Date: Fri Jun 22 00:29:29 2018 New Revision: 335520 URL: https://svnweb.freebsd.org/changeset/base/335520 Log: MFC r335209: elf.5: add readelf cross-reference objdump is sometimes used in cases where readelf is more appropriate, but the obsolete GNU objdump we have in the base system will be removed in the future. .Xr readelf from elf.5 to improve the odds the more appropriate tool will be found. PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man5/elf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/elf.5 ============================================================================== --- stable/11/share/man/man5/elf.5 Fri Jun 22 00:28:28 2018 (r335519) +++ stable/11/share/man/man5/elf.5 Fri Jun 22 00:29:29 2018 (r335520) @@ -1281,6 +1281,7 @@ stored into the relocatable field. .Xr gdb 1 , .Xr ld 1 , .Xr objdump 1 , +.Xr readelf 1 , .Xr execve 2 , .Xr ar 5 , .Xr core 5 From owner-svn-src-stable@freebsd.org Fri Jun 22 00:30:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED0F4100666E; Fri, 22 Jun 2018 00:30:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4675975A7C; Fri, 22 Jun 2018 00:30:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27BB419481; Fri, 22 Jun 2018 00:30:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M0UP1a055261; Fri, 22 Jun 2018 00:30:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M0UPTh055260; Fri, 22 Jun 2018 00:30:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806220030.w5M0UPTh055260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 22 Jun 2018 00:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335521 - stable/11/usr.bin/ldd X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.bin/ldd X-SVN-Commit-Revision: 335521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 00:30:27 -0000 Author: emaste Date: Fri Jun 22 00:30:24 2018 New Revision: 335521 URL: https://svnweb.freebsd.org/changeset/base/335521 Log: MFC r335213: ldd: reference readelf instead of objdump in warning message We have an obsolete GNU objdump 2.17.50 in the base system, which will be removed in the future. Suggest readelf(1) for examining ELF files instead; for most use cases it is the preferred tool anyhow. PR: 229046 Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.bin/ldd/sods.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/ldd/sods.c ============================================================================== --- stable/11/usr.bin/ldd/sods.c Fri Jun 22 00:29:29 2018 (r335520) +++ stable/11/usr.bin/ldd/sods.c Fri Jun 22 00:30:24 2018 (r335521) @@ -203,7 +203,7 @@ dump_file(const char *fname) file_base = (const char *) objbase; /* Makes address arithmetic easier */ if (IS_ELF(*(const Elf32_Ehdr*) align_struct(file_base))) { - warnx("%s: this is an ELF program; use objdump to examine", fname); + warnx("%s: this is an ELF program; use readelf to examine", fname); ++error_count; munmap(objbase, sb.st_size); return; From owner-svn-src-stable@freebsd.org Fri Jun 22 04:54:52 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD44100E2C5; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 698117E067; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 474361C134; Fri, 22 Jun 2018 04:54:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M4sqar093229; Fri, 22 Jun 2018 04:54:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M4sqUV093228; Fri, 22 Jun 2018 04:54:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806220454.w5M4sqUV093228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 22 Jun 2018 04:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335530 - stable/11/usr.sbin/service X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/service X-SVN-Commit-Revision: 335530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 04:54:53 -0000 Author: eadler Date: Fri Jun 22 04:54:51 2018 New Revision: 335530 URL: https://svnweb.freebsd.org/changeset/base/335530 Log: MFC r334472: service(1): Improve manual page * Sort options.. * Fix some typos. * Use one Bd macro for code blocks instead of a bunch of Dl * macros. * Improve formatting. * Clarify 'jail' argument PR: 228552 Modified: stable/11/usr.sbin/service/service.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/service/service.8 ============================================================================== --- stable/11/usr.sbin/service/service.8 Fri Jun 22 03:40:03 2018 (r335529) +++ stable/11/usr.sbin/service/service.8 Fri Jun 22 04:54:51 2018 (r335530) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2018 +.Dd May 31, 2018 .Dt SERVICE 8 .Os .Sh NAME @@ -32,19 +32,24 @@ .Nd "control (start/stop/etc.) or list system services" .Sh SYNOPSIS .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl e .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Fl R .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Fl l | r +.Fl l .Nm -.Op Fl j Ao jail name or id Ac +.Op Fl j Ar jail .Op Fl v -.Ar start|stop|etc. +.Fl r +.Nm +.Op Fl j Ar jail +.Op Fl v +.Ar script +.Ar command .Sh DESCRIPTION The .Nm @@ -52,14 +57,16 @@ command is an easy interface to the rc.d system. Its primary purpose is to start and stop services provided by the rc.d scripts. When used for this purpose it will set the same restricted -environment that is in use at boot time (see below). +environment that is in use at boot time +.Po +see +.Sx ENVIRONMENT +.Pc . It can also be used to list the scripts using various criteria. .Pp The options are as follows: .Bl -tag -width F1 -.It Fl j Ao jail name or id Ac -Perform the given actions under the named jail. .It Fl e List services that are enabled. The list of scripts to check is compiled using @@ -70,8 +77,11 @@ then that list of scripts is checked for an .Qq rcvar assignment. If present the script is checked to see if it is enabled. -.It Fl R -Restart all enabled local services. +.It Fl j Ar jail +Perform the given actions under the named jail. +The +.Ar jail +argument can be either a jail ID or a jail name. .It Fl l List all files in .Pa /etc/rc.d @@ -88,8 +98,10 @@ Generate the as in .Fl e above, but list all of the files, not just what is enabled. +.It Fl R +Restart all enabled local services. .It Fl v -Be slightly more verbose +Be slightly more verbose. .El .Sh ENVIRONMENT When used to run rc.d scripts the @@ -111,21 +123,24 @@ at boot time. The following are examples of typical usage of the .Nm command: +.Bd -literal -offset -ident +service named status +service -j dns named status +service -rv +.Ed .Pp -.Dl "service named status" -.Dl "service -j dns named status" -.Dl "service -rv" -.Pp The following programmable completion entry can be use in .Xr bash 1 for the names of the rc.d scripts: -.Dl "_service () {" -.Dl " local cur" -.Dl " cur=${COMP_WORDS[COMP_CWORD]}" -.Dl " COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )" -.Dl " return 0" -.Dl "}" -.Dl "complete -F _service service" +.Bd -literal -offset -ident +_service () { + local cur + cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) ) + return 0 +} +complete -F _service service +.Ed .Sh SEE ALSO .Xr bash 1 Pq Pa ports/shells/bash , .Xr rc.conf 5 , From owner-svn-src-stable@freebsd.org Fri Jun 22 09:08:40 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E8F1013C6E; Fri, 22 Jun 2018 09:08:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACEE85C60; Fri, 22 Jun 2018 09:08:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BFDE1E9CD; Fri, 22 Jun 2018 09:08:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M98dn1023061; Fri, 22 Jun 2018 09:08:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M98d78023060; Fri, 22 Jun 2018 09:08:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220908.w5M98d78023060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335533 - stable/11/sys/dev/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/acpica X-SVN-Commit-Revision: 335533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:08:40 -0000 Author: avg Date: Fri Jun 22 09:08:38 2018 New Revision: 335533 URL: https://svnweb.freebsd.org/changeset/base/335533 Log: MFC r333209: hpet: use macros instead of magic values for the timer mode Modified: stable/11/sys/dev/acpica/acpi_hpet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_hpet.c Fri Jun 22 06:05:19 2018 (r335532) +++ stable/11/sys/dev/acpica/acpi_hpet.c Fri Jun 22 09:08:38 2018 (r335533) @@ -97,6 +97,9 @@ struct hpet_softc { struct hpet_softc *sc; int num; int mode; +#define TIMER_STOPPED 0 +#define TIMER_PERIODIC 1 +#define TIMER_ONESHOT 2 int intr_rid; int irq; int pcpu_cpu; @@ -207,10 +210,10 @@ hpet_start(struct eventtimer *et, sbintime_t first, sb t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]]; if (period != 0) { - t->mode = 1; + t->mode = TIMER_PERIODIC; t->div = (sc->freq * period) >> 32; } else { - t->mode = 2; + t->mode = TIMER_ONESHOT; t->div = 0; } if (first != 0) @@ -223,7 +226,7 @@ hpet_start(struct eventtimer *et, sbintime_t first, sb now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); restart: t->next = now + fdiv; - if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { + if (t->mode == TIMER_PERIODIC && (t->caps & HPET_TCAP_PER_INT)) { t->caps |= HPET_TCNF_TYPE; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps | HPET_TCNF_VAL_SET); @@ -254,7 +257,7 @@ hpet_stop(struct eventtimer *et) struct hpet_softc *sc = mt->sc; t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]]; - t->mode = 0; + t->mode = TIMER_STOPPED; t->caps &= ~(HPET_TCNF_INT_ENB | HPET_TCNF_TYPE); bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps); return (0); @@ -268,7 +271,7 @@ hpet_intr_single(void *arg) struct hpet_softc *sc = t->sc; uint32_t now; - if (t->mode == 0) + if (t->mode == TIMER_STOPPED) return (FILTER_STRAY); /* Check that per-CPU timer interrupt reached right CPU. */ if (t->pcpu_cpu >= 0 && t->pcpu_cpu != curcpu) { @@ -282,8 +285,9 @@ hpet_intr_single(void *arg) * Reload timer, hoping that next time may be more lucky * (system will manage proper interrupt binding). */ - if ((t->mode == 1 && (t->caps & HPET_TCAP_PER_INT) == 0) || - t->mode == 2) { + if ((t->mode == TIMER_PERIODIC && + (t->caps & HPET_TCAP_PER_INT) == 0) || + t->mode == TIMER_ONESHOT) { t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER) + sc->freq / 8; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), @@ -291,7 +295,7 @@ hpet_intr_single(void *arg) } return (FILTER_HANDLED); } - if (t->mode == 1 && + if (t->mode == TIMER_PERIODIC && (t->caps & HPET_TCAP_PER_INT) == 0) { t->next += t->div; now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); @@ -299,8 +303,8 @@ hpet_intr_single(void *arg) t->next = now + t->div / 2; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), t->next); - } else if (t->mode == 2) - t->mode = 0; + } else if (t->mode == TIMER_ONESHOT) + t->mode = TIMER_STOPPED; mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master]; if (mt->et.et_active) mt->et.et_event_cb(&mt->et, mt->et.et_arg); @@ -529,7 +533,7 @@ hpet_attach(device_t dev) t = &sc->t[i]; t->sc = sc; t->num = i; - t->mode = 0; + t->mode = TIMER_STOPPED; t->intr_rid = -1; t->irq = -1; t->pcpu_cpu = -1; @@ -879,10 +883,11 @@ hpet_resume(device_t dev) } } #endif - if (t->mode == 0) + if (t->mode == TIMER_STOPPED) continue; t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); - if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { + if (t->mode == TIMER_PERIODIC && + (t->caps & HPET_TCAP_PER_INT) != 0) { t->caps |= HPET_TCNF_TYPE; t->next += t->div; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), From owner-svn-src-stable@freebsd.org Fri Jun 22 09:10:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A077D1013D70; Fri, 22 Jun 2018 09:10:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F94385DB5; Fri, 22 Jun 2018 09:10:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F50B1E9D2; Fri, 22 Jun 2018 09:10:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9A0qU023225; Fri, 22 Jun 2018 09:10:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9A0MI023224; Fri, 22 Jun 2018 09:10:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220910.w5M9A0MI023224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335534 - stable/10/sys/dev/acpica X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/acpica X-SVN-Commit-Revision: 335534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:10:00 -0000 Author: avg Date: Fri Jun 22 09:09:59 2018 New Revision: 335534 URL: https://svnweb.freebsd.org/changeset/base/335534 Log: MFC r333209: hpet: use macros instead of magic values for the timer mode Modified: stable/10/sys/dev/acpica/acpi_hpet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_hpet.c Fri Jun 22 09:08:38 2018 (r335533) +++ stable/10/sys/dev/acpica/acpi_hpet.c Fri Jun 22 09:09:59 2018 (r335534) @@ -93,6 +93,9 @@ struct hpet_softc { struct hpet_softc *sc; int num; int mode; +#define TIMER_STOPPED 0 +#define TIMER_PERIODIC 1 +#define TIMER_ONESHOT 2 int intr_rid; int irq; int pcpu_cpu; @@ -171,10 +174,10 @@ hpet_start(struct eventtimer *et, sbintime_t first, sb t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]]; if (period != 0) { - t->mode = 1; + t->mode = TIMER_PERIODIC; t->div = (sc->freq * period) >> 32; } else { - t->mode = 2; + t->mode = TIMER_ONESHOT; t->div = 0; } if (first != 0) @@ -187,7 +190,7 @@ hpet_start(struct eventtimer *et, sbintime_t first, sb now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); restart: t->next = now + fdiv; - if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { + if (t->mode == TIMER_PERIODIC && (t->caps & HPET_TCAP_PER_INT)) { t->caps |= HPET_TCNF_TYPE; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps | HPET_TCNF_VAL_SET); @@ -218,7 +221,7 @@ hpet_stop(struct eventtimer *et) struct hpet_softc *sc = mt->sc; t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]]; - t->mode = 0; + t->mode = TIMER_STOPPED; t->caps &= ~(HPET_TCNF_INT_ENB | HPET_TCNF_TYPE); bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps); return (0); @@ -232,7 +235,7 @@ hpet_intr_single(void *arg) struct hpet_softc *sc = t->sc; uint32_t now; - if (t->mode == 0) + if (t->mode == TIMER_STOPPED) return (FILTER_STRAY); /* Check that per-CPU timer interrupt reached right CPU. */ if (t->pcpu_cpu >= 0 && t->pcpu_cpu != curcpu) { @@ -246,8 +249,9 @@ hpet_intr_single(void *arg) * Reload timer, hoping that next time may be more lucky * (system will manage proper interrupt binding). */ - if ((t->mode == 1 && (t->caps & HPET_TCAP_PER_INT) == 0) || - t->mode == 2) { + if ((t->mode == TIMER_PERIODIC && + (t->caps & HPET_TCAP_PER_INT) == 0) || + t->mode == TIMER_ONESHOT) { t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER) + sc->freq / 8; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), @@ -255,7 +259,7 @@ hpet_intr_single(void *arg) } return (FILTER_HANDLED); } - if (t->mode == 1 && + if (t->mode == TIMER_PERIODIC && (t->caps & HPET_TCAP_PER_INT) == 0) { t->next += t->div; now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); @@ -263,8 +267,8 @@ hpet_intr_single(void *arg) t->next = now + t->div / 2; bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), t->next); - } else if (t->mode == 2) - t->mode = 0; + } else if (t->mode == TIMER_ONESHOT) + t->mode = TIMER_STOPPED; mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master]; if (mt->et.et_active) mt->et.et_event_cb(&mt->et, mt->et.et_arg); @@ -483,7 +487,7 @@ hpet_attach(device_t dev) t = &sc->t[i]; t->sc = sc; t->num = i; - t->mode = 0; + t->mode = TIMER_STOPPED; t->intr_rid = -1; t->irq = -1; t->pcpu_cpu = -1; @@ -822,10 +826,11 @@ hpet_resume(device_t dev) } } #endif - if (t->mode == 0) + if (t->mode == TIMER_STOPPED) continue; t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); - if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { + if (t->mode == TIMER_PERIODIC && + (t->caps & HPET_TCAP_PER_INT) != 0) { t->caps |= HPET_TCNF_TYPE; t->next += t->div; bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), From owner-svn-src-stable@freebsd.org Fri Jun 22 09:18:40 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D95010140B5; Fri, 22 Jun 2018 09:18:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D01B086382; Fri, 22 Jun 2018 09:18:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 924081EB61; Fri, 22 Jun 2018 09:18:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9IdX3028062; Fri, 22 Jun 2018 09:18:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9Iclp028057; Fri, 22 Jun 2018 09:18:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220918.w5M9Iclp028057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335536 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:18:40 -0000 Author: avg Date: Fri Jun 22 09:18:38 2018 New Revision: 335536 URL: https://svnweb.freebsd.org/changeset/base/335536 Log: MFC r332816: call racct_proc_ucred_changed() under the proc lock Modified: stable/11/sys/kern/kern_jail.c stable/11/sys/kern/kern_loginclass.c stable/11/sys/kern/kern_prot.c stable/11/sys/kern/kern_racct.c stable/11/sys/kern/kern_rctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_jail.c ============================================================================== --- stable/11/sys/kern/kern_jail.c Fri Jun 22 09:10:50 2018 (r335535) +++ stable/11/sys/kern/kern_jail.c Fri Jun 22 09:18:38 2018 (r335536) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2409,10 +2410,15 @@ do_jail_attach(struct thread *td, struct prison *pr) newcred->cr_prison = pr; proc_set_cred(p, newcred); setsugid(p); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); return (0); @@ -3959,6 +3965,7 @@ prison_racct_modify(struct prison *pr) */ racct_move(pr->pr_prison_racct->prr_racct, oldprr->prr_racct); +#ifdef RCTL /* * Force rctl to reattach rules to processes. */ @@ -3966,9 +3973,10 @@ prison_racct_modify(struct prison *pr) PROC_LOCK(p); cred = crhold(p->p_ucred); PROC_UNLOCK(p); - racct_proc_ucred_changed(p, cred, cred); + rctl_proc_ucred_changed(p, cred); crfree(cred); } +#endif sx_sunlock(&allproc_lock); prison_racct_free_locked(oldprr); Modified: stable/11/sys/kern/kern_loginclass.c ============================================================================== --- stable/11/sys/kern/kern_loginclass.c Fri Jun 22 09:10:50 2018 (r335535) +++ stable/11/sys/kern/kern_loginclass.c Fri Jun 22 09:18:38 2018 (r335536) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -222,9 +223,14 @@ sys_setloginclass(struct thread *td, struct setlogincl oldcred = crcopysafe(p, newcred); newcred->cr_loginclass = newlc; proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); +#endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); #endif loginclass_free(oldcred->cr_loginclass); crfree(oldcred); Modified: stable/11/sys/kern/kern_prot.c ============================================================================== --- stable/11/sys/kern/kern_prot.c Fri Jun 22 09:10:50 2018 (r335535) +++ stable/11/sys/kern/kern_prot.c Fri Jun 22 09:18:38 2018 (r335536) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -579,10 +580,15 @@ sys_setuid(struct thread *td, struct setuid_args *uap) setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif uifree(uip); crfree(oldcred); return (0); @@ -927,10 +933,15 @@ sys_setreuid(struct thread *td, struct setreuid_args * setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); #endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); +#endif uifree(ruip); uifree(euip); crfree(oldcred); @@ -1068,9 +1079,14 @@ sys_setresuid(struct thread *td, struct setresuid_args setsugid(p); } proc_set_cred(p, newcred); - PROC_UNLOCK(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); + crhold(newcred); +#endif + PROC_UNLOCK(p); +#ifdef RCTL + rctl_proc_ucred_changed(p, newcred); + crfree(newcred); #endif uifree(ruip); uifree(euip); Modified: stable/11/sys/kern/kern_racct.c ============================================================================== --- stable/11/sys/kern/kern_racct.c Fri Jun 22 09:10:50 2018 (r335535) +++ stable/11/sys/kern/kern_racct.c Fri Jun 22 09:18:38 2018 (r335536) @@ -1048,7 +1048,7 @@ racct_proc_ucred_changed(struct proc *p, struct ucred if (!racct_enable) return; - PROC_LOCK_ASSERT(p, MA_NOTOWNED); + PROC_LOCK_ASSERT(p, MA_OWNED); newuip = newcred->cr_ruidinfo; olduip = oldcred->cr_ruidinfo; @@ -1075,10 +1075,6 @@ racct_proc_ucred_changed(struct proc *p, struct ucred p->p_racct); } RACCT_UNLOCK(); - -#ifdef RCTL - rctl_proc_ucred_changed(p, newcred); -#endif } void Modified: stable/11/sys/kern/kern_rctl.c ============================================================================== --- stable/11/sys/kern/kern_rctl.c Fri Jun 22 09:10:50 2018 (r335535) +++ stable/11/sys/kern/kern_rctl.c Fri Jun 22 09:18:38 2018 (r335536) @@ -1954,12 +1954,15 @@ rctl_proc_ucred_changed(struct proc *p, struct ucred * struct prison_racct *newprr; int rulecnt, i; - ASSERT_RACCT_ENABLED(); + if (!racct_enable) + return; + PROC_LOCK_ASSERT(p, MA_NOTOWNED); + newuip = newcred->cr_ruidinfo; newlc = newcred->cr_loginclass; newprr = newcred->cr_prison->pr_prison_racct; - + LIST_INIT(&newrules); again: From owner-svn-src-stable@freebsd.org Fri Jun 22 09:20:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E05AD101413F; Fri, 22 Jun 2018 09:20:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 922D0864D5; Fri, 22 Jun 2018 09:20:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7339C1EB65; Fri, 22 Jun 2018 09:20:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9K0kv028213; Fri, 22 Jun 2018 09:20:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9K0Zi028212; Fri, 22 Jun 2018 09:20:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220920.w5M9K0Zi028212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335537 - stable/11/sys/dev/amdsbwd X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/amdsbwd X-SVN-Commit-Revision: 335537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:20:01 -0000 Author: avg Date: Fri Jun 22 09:20:00 2018 New Revision: 335537 URL: https://svnweb.freebsd.org/changeset/base/335537 Log: MFC r333212: amdsbwd: add suspend and resume methods Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:18:38 2018 (r335536) +++ stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:20:00 2018 (r335537) @@ -100,12 +100,16 @@ static void amdsbwd_identify(driver_t *driver, device_ static int amdsbwd_probe(device_t dev); static int amdsbwd_attach(device_t dev); static int amdsbwd_detach(device_t dev); +static int amdsbwd_suspend(device_t dev); +static int amdsbwd_resume(device_t dev); static device_method_t amdsbwd_methods[] = { DEVMETHOD(device_identify, amdsbwd_identify), DEVMETHOD(device_probe, amdsbwd_probe), DEVMETHOD(device_attach, amdsbwd_attach), DEVMETHOD(device_detach, amdsbwd_detach), + DEVMETHOD(device_suspend, amdsbwd_suspend), + DEVMETHOD(device_resume, amdsbwd_resume), #if 0 DEVMETHOD(device_shutdown, amdsbwd_detach), #endif @@ -549,3 +553,30 @@ amdsbwd_detach(device_t dev) return (0); } +static int +amdsbwd_suspend(device_t dev) +{ + struct amdsbwd_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); + val = wdctrl_read(sc); + val &= ~AMDSB_WD_RUN; + wdctrl_write(sc, val); + return (0); +} + +static int +amdsbwd_resume(device_t dev) +{ + struct amdsbwd_softc *sc; + + sc = device_get_softc(dev); + wdctrl_write(sc, AMDSB_WD_FIRED); + if (sc->active) { + amdsbwd_tmr_set(sc, sc->timeout); + amdsbwd_tmr_enable(sc); + amdsbwd_tmr_reload(sc); + } + return (0); +} From owner-svn-src-stable@freebsd.org Fri Jun 22 09:20:51 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA0BD10141B8; Fri, 22 Jun 2018 09:20:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D9148663D; Fri, 22 Jun 2018 09:20:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6031B1EB7E; Fri, 22 Jun 2018 09:20:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9KpFV030717; Fri, 22 Jun 2018 09:20:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9KpXL030716; Fri, 22 Jun 2018 09:20:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220920.w5M9KpXL030716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335538 - stable/10/sys/dev/amdsbwd X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/amdsbwd X-SVN-Commit-Revision: 335538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:20:52 -0000 Author: avg Date: Fri Jun 22 09:20:50 2018 New Revision: 335538 URL: https://svnweb.freebsd.org/changeset/base/335538 Log: MFC r333212: amdsbwd: add suspend and resume methods Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:20:00 2018 (r335537) +++ stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:20:50 2018 (r335538) @@ -100,12 +100,16 @@ static void amdsbwd_identify(driver_t *driver, device_ static int amdsbwd_probe(device_t dev); static int amdsbwd_attach(device_t dev); static int amdsbwd_detach(device_t dev); +static int amdsbwd_suspend(device_t dev); +static int amdsbwd_resume(device_t dev); static device_method_t amdsbwd_methods[] = { DEVMETHOD(device_identify, amdsbwd_identify), DEVMETHOD(device_probe, amdsbwd_probe), DEVMETHOD(device_attach, amdsbwd_attach), DEVMETHOD(device_detach, amdsbwd_detach), + DEVMETHOD(device_suspend, amdsbwd_suspend), + DEVMETHOD(device_resume, amdsbwd_resume), #if 0 DEVMETHOD(device_shutdown, amdsbwd_detach), #endif @@ -549,3 +553,30 @@ amdsbwd_detach(device_t dev) return (0); } +static int +amdsbwd_suspend(device_t dev) +{ + struct amdsbwd_softc *sc; + uint32_t val; + + sc = device_get_softc(dev); + val = wdctrl_read(sc); + val &= ~AMDSB_WD_RUN; + wdctrl_write(sc, val); + return (0); +} + +static int +amdsbwd_resume(device_t dev) +{ + struct amdsbwd_softc *sc; + + sc = device_get_softc(dev); + wdctrl_write(sc, AMDSB_WD_FIRED); + if (sc->active) { + amdsbwd_tmr_set(sc, sc->timeout); + amdsbwd_tmr_enable(sc); + amdsbwd_tmr_reload(sc); + } + return (0); +} From owner-svn-src-stable@freebsd.org Fri Jun 22 09:22:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B38310144F0; Fri, 22 Jun 2018 09:22:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F13C86C24; Fri, 22 Jun 2018 09:22:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 209041ED39; Fri, 22 Jun 2018 09:22:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9MUQe033331; Fri, 22 Jun 2018 09:22:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9MUMI033330; Fri, 22 Jun 2018 09:22:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220922.w5M9MUMI033330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335540 - stable/11/sys/cddl/compat/opensolaris/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/compat/opensolaris/kern X-SVN-Commit-Revision: 335540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:22:31 -0000 Author: avg Date: Fri Jun 22 09:22:30 2018 New Revision: 335540 URL: https://svnweb.freebsd.org/changeset/base/335540 Log: MFC r333243: opensolaris system_taskq does not need to run at maximum priority Modified: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri Jun 22 09:21:01 2018 (r335539) +++ stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri Jun 22 09:22:30 2018 (r335540) @@ -48,7 +48,8 @@ system_taskq_init(void *arg) taskq_zone = uma_zcreate("taskq_zone", sizeof(taskq_ent_t), NULL, NULL, NULL, NULL, 0, 0); - system_taskq = taskq_create("system_taskq", mp_ncpus, 0, 0, 0, 0); + system_taskq = taskq_create("system_taskq", mp_ncpus, minclsyspri, + 0, 0, 0); } SYSINIT(system_taskq_init, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_init, NULL); From owner-svn-src-stable@freebsd.org Fri Jun 22 09:23:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 372AD1014569; Fri, 22 Jun 2018 09:23:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E006E86D53; Fri, 22 Jun 2018 09:23:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C11DE1ED3C; Fri, 22 Jun 2018 09:23:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9N6DX033424; Fri, 22 Jun 2018 09:23:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9N6ii033423; Fri, 22 Jun 2018 09:23:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220923.w5M9N6ii033423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335541 - stable/10/sys/cddl/compat/opensolaris/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/compat/opensolaris/kern X-SVN-Commit-Revision: 335541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:23:07 -0000 Author: avg Date: Fri Jun 22 09:23:06 2018 New Revision: 335541 URL: https://svnweb.freebsd.org/changeset/base/335541 Log: MFC r333243: opensolaris system_taskq does not need to run at maximum priority Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri Jun 22 09:22:30 2018 (r335540) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri Jun 22 09:23:06 2018 (r335541) @@ -48,7 +48,8 @@ system_taskq_init(void *arg) taskq_zone = uma_zcreate("taskq_zone", sizeof(taskq_ent_t), NULL, NULL, NULL, NULL, 0, 0); - system_taskq = taskq_create("system_taskq", mp_ncpus, 0, 0, 0, 0); + system_taskq = taskq_create("system_taskq", mp_ncpus, minclsyspri, + 0, 0, 0); } SYSINIT(system_taskq_init, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_init, NULL); From owner-svn-src-stable@freebsd.org Fri Jun 22 09:25:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 137AC1014656; Fri, 22 Jun 2018 09:25:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B714186EF8; Fri, 22 Jun 2018 09:25:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 919311ED3D; Fri, 22 Jun 2018 09:25:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9PPEc033587; Fri, 22 Jun 2018 09:25:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9PPSW033585; Fri, 22 Jun 2018 09:25:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220925.w5M9PPSW033585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335542 - stable/11/sys/dev/amdsbwd X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/amdsbwd X-SVN-Commit-Revision: 335542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:25:26 -0000 Author: avg Date: Fri Jun 22 09:25:24 2018 New Revision: 335542 URL: https://svnweb.freebsd.org/changeset/base/335542 Log: MFC r333269: amdsbwd: fix reboot status reporting Modified: stable/11/sys/dev/amdsbwd/amd_chipset.h stable/11/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- stable/11/sys/dev/amdsbwd/amd_chipset.h Fri Jun 22 09:23:06 2018 (r335541) +++ stable/11/sys/dev/amdsbwd/amd_chipset.h Fri Jun 22 09:25:24 2018 (r335542) @@ -95,9 +95,10 @@ #define AMDSB8_WDT_32KHZ 0x00 #define AMDSB8_WDT_1HZ 0x03 #define AMDSB8_WDT_RES_MASK 0x03 -#define AMDSB8_PM_RESET_STATUS0 0xc0 -#define AMDSB8_PM_RESET_STATUS1 0xc1 -#define AMDSB8_WD_RST_STS 0x20 +#define AMDSB8_PM_RESET_STATUS 0xc0 /* 32 bit wide */ +#define AMDSB8_WD_RST_STS 0x2000000 +#define AMDSB8_PM_RESET_CTRL 0xc4 +#define AMDSB8_RST_STS_DIS 0x04 /* * Newer FCH registers in the PMIO space. Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:23:06 2018 (r335541) +++ stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:25:24 2018 (r335542) @@ -317,16 +317,23 @@ amdsbwd_probe_sb7xx(device_t dev, struct resource *pmr static void amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint8_t val; - int i; + uint32_t val; + int i; /* Report cause of previous reset for user's convenience. */ - val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0); + + val = pmio_read(pmres, AMDSB8_PM_RESET_CTRL); + if ((val & AMDSB8_RST_STS_DIS) != 0) { + val &= ~AMDSB8_RST_STS_DIS; + pmio_write(pmres, AMDSB8_PM_RESET_CTRL, val); + } + val = 0; + for (i = 3; i >= 0; i--) { + val <<= 8; + val |= pmio_read(pmres, AMDSB8_PM_RESET_STATUS + i); + } if (val != 0) - amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val); - val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS1); - if (val != 0) - amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val); + amdsbwd_verbose_printf(dev, "ResetStatus = 0x%08x\n", val); if ((val & AMDSB8_WD_RST_STS) != 0) device_printf(dev, "Previous Reset was caused by Watchdog\n"); From owner-svn-src-stable@freebsd.org Fri Jun 22 09:26:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0AF110146AB; Fri, 22 Jun 2018 09:26:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93CF38701B; Fri, 22 Jun 2018 09:26:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7516A1ED3E; Fri, 22 Jun 2018 09:26:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9Q6E1033688; Fri, 22 Jun 2018 09:26:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9Q6p3033686; Fri, 22 Jun 2018 09:26:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220926.w5M9Q6p3033686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335543 - stable/10/sys/dev/amdsbwd X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/amdsbwd X-SVN-Commit-Revision: 335543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:26:07 -0000 Author: avg Date: Fri Jun 22 09:26:05 2018 New Revision: 335543 URL: https://svnweb.freebsd.org/changeset/base/335543 Log: MFC r333269: amdsbwd: fix reboot status reporting Modified: stable/10/sys/dev/amdsbwd/amd_chipset.h stable/10/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- stable/10/sys/dev/amdsbwd/amd_chipset.h Fri Jun 22 09:25:24 2018 (r335542) +++ stable/10/sys/dev/amdsbwd/amd_chipset.h Fri Jun 22 09:26:05 2018 (r335543) @@ -95,9 +95,10 @@ #define AMDSB8_WDT_32KHZ 0x00 #define AMDSB8_WDT_1HZ 0x03 #define AMDSB8_WDT_RES_MASK 0x03 -#define AMDSB8_PM_RESET_STATUS0 0xc0 -#define AMDSB8_PM_RESET_STATUS1 0xc1 -#define AMDSB8_WD_RST_STS 0x20 +#define AMDSB8_PM_RESET_STATUS 0xc0 /* 32 bit wide */ +#define AMDSB8_WD_RST_STS 0x2000000 +#define AMDSB8_PM_RESET_CTRL 0xc4 +#define AMDSB8_RST_STS_DIS 0x04 /* * Newer FCH registers in the PMIO space. Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:25:24 2018 (r335542) +++ stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Jun 22 09:26:05 2018 (r335543) @@ -317,16 +317,23 @@ amdsbwd_probe_sb7xx(device_t dev, struct resource *pmr static void amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr) { - uint8_t val; - int i; + uint32_t val; + int i; /* Report cause of previous reset for user's convenience. */ - val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0); + + val = pmio_read(pmres, AMDSB8_PM_RESET_CTRL); + if ((val & AMDSB8_RST_STS_DIS) != 0) { + val &= ~AMDSB8_RST_STS_DIS; + pmio_write(pmres, AMDSB8_PM_RESET_CTRL, val); + } + val = 0; + for (i = 3; i >= 0; i--) { + val <<= 8; + val |= pmio_read(pmres, AMDSB8_PM_RESET_STATUS + i); + } if (val != 0) - amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val); - val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS1); - if (val != 0) - amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val); + amdsbwd_verbose_printf(dev, "ResetStatus = 0x%08x\n", val); if ((val & AMDSB8_WD_RST_STS) != 0) device_printf(dev, "Previous Reset was caused by Watchdog\n"); From owner-svn-src-stable@freebsd.org Fri Jun 22 09:29:35 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D24AE10147B4; Fri, 22 Jun 2018 09:29:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78BAE871BB; Fri, 22 Jun 2018 09:29:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53CB21ED41; Fri, 22 Jun 2018 09:29:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9TZql033892; Fri, 22 Jun 2018 09:29:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9TZrh033891; Fri, 22 Jun 2018 09:29:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220929.w5M9TZrh033891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335544 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 335544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:29:36 -0000 Author: avg Date: Fri Jun 22 09:29:34 2018 New Revision: 335544 URL: https://svnweb.freebsd.org/changeset/base/335544 Log: MFC r334785: expand descriptions of x86 panic_on_nmi and kdb_on_nmi sysctls Modified: stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Fri Jun 22 09:26:05 2018 (r335543) +++ stable/11/sys/x86/x86/cpu_machdep.c Fri Jun 22 09:29:34 2018 (r335544) @@ -756,7 +756,7 @@ SYSINIT(cpu_idle_tun, SI_SUB_CPU, SI_ORDER_MIDDLE, cpu static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, &panic_on_nmi, 0, - "Panic on NMI"); + "Panic on NMI raised by hardware failure"); int nmi_is_broadcast = 1; SYSCTL_INT(_machdep, OID_AUTO, nmi_is_broadcast, CTLFLAG_RWTUN, &nmi_is_broadcast, 0, @@ -765,7 +765,7 @@ SYSCTL_INT(_machdep, OID_AUTO, nmi_is_broadcast, CTLFL int kdb_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RWTUN, &kdb_on_nmi, 0, - "Go to KDB on NMI"); + "Go to KDB on NMI with unknown source"); #endif #ifdef DEV_ISA From owner-svn-src-stable@freebsd.org Fri Jun 22 09:37:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5079F1014C57; Fri, 22 Jun 2018 09:37:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1AE0882C9; Fri, 22 Jun 2018 09:37:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B5E1EF09; Fri, 22 Jun 2018 09:37:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9bQCK039341; Fri, 22 Jun 2018 09:37:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9bQvu039340; Fri, 22 Jun 2018 09:37:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220937.w5M9bQvu039340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335545 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 335545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:37:27 -0000 Author: avg Date: Fri Jun 22 09:37:26 2018 New Revision: 335545 URL: https://svnweb.freebsd.org/changeset/base/335545 Log: MFC r333630: Fix 'zpool create -t ' Creating a pool with a temporary name fails when we also specify custom dataset properties: this is because we mistakenly call zfs_set_prop_nvlist() on the "real" pool name which, as expected, cannot be found because the SPA is present in the namespace with the temporary name. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 09:29:34 2018 (r335544) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 09:37:26 2018 (r335545) @@ -1557,6 +1557,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) nvlist_t *config, *props = NULL; nvlist_t *rootprops = NULL; nvlist_t *zplprops = NULL; + char *spa_name = zc->zc_name; if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, zc->zc_iflags, &config)) @@ -1572,6 +1573,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) if (props) { nvlist_t *nvl = NULL; uint64_t version = SPA_VERSION; + char *tname; (void) nvlist_lookup_uint64(props, zpool_prop_to_name(ZPOOL_PROP_VERSION), &version); @@ -1594,6 +1596,10 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) zplprops, NULL); if (error != 0) goto pool_props_bad; + + if (nvlist_lookup_string(props, + zpool_prop_to_name(ZPOOL_PROP_TNAME), &tname) == 0) + spa_name = tname; } error = spa_create(zc->zc_name, config, props, zplprops); @@ -1601,9 +1607,9 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) /* * Set the remaining root properties */ - if (!error && (error = zfs_set_prop_nvlist(zc->zc_name, + if (!error && (error = zfs_set_prop_nvlist(spa_name, ZPROP_SRC_LOCAL, rootprops, NULL)) != 0) - (void) spa_destroy(zc->zc_name); + (void) spa_destroy(spa_name); pool_props_bad: nvlist_free(rootprops); From owner-svn-src-stable@freebsd.org Fri Jun 22 09:41:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A2251014E03; Fri, 22 Jun 2018 09:41:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1AB9884F7; Fri, 22 Jun 2018 09:41:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92D5C1F02E; Fri, 22 Jun 2018 09:41:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5M9fDHV039559; Fri, 22 Jun 2018 09:41:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5M9fDOu039558; Fri, 22 Jun 2018 09:41:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806220941.w5M9fDOu039558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 09:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335546 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 335546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 09:41:14 -0000 Author: avg Date: Fri Jun 22 09:41:13 2018 New Revision: 335546 URL: https://svnweb.freebsd.org/changeset/base/335546 Log: MFC r333630: Fix 'zpool create -t ' Creating a pool with a temporary name fails when we also specify custom dataset properties: this is because we mistakenly call zfs_set_prop_nvlist() on the "real" pool name which, as expected, cannot be found because the SPA is present in the namespace with the temporary name. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 09:37:26 2018 (r335545) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 09:41:13 2018 (r335546) @@ -1529,6 +1529,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) nvlist_t *config, *props = NULL; nvlist_t *rootprops = NULL; nvlist_t *zplprops = NULL; + char *spa_name = zc->zc_name; if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, zc->zc_iflags, &config)) @@ -1544,6 +1545,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) if (props) { nvlist_t *nvl = NULL; uint64_t version = SPA_VERSION; + char *tname; (void) nvlist_lookup_uint64(props, zpool_prop_to_name(ZPOOL_PROP_VERSION), &version); @@ -1566,6 +1568,10 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) zplprops, NULL); if (error != 0) goto pool_props_bad; + + if (nvlist_lookup_string(props, + zpool_prop_to_name(ZPOOL_PROP_TNAME), &tname) == 0) + spa_name = tname; } error = spa_create(zc->zc_name, config, props, zplprops); @@ -1573,9 +1579,9 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) /* * Set the remaining root properties */ - if (!error && (error = zfs_set_prop_nvlist(zc->zc_name, + if (!error && (error = zfs_set_prop_nvlist(spa_name, ZPROP_SRC_LOCAL, rootprops, NULL)) != 0) - (void) spa_destroy(zc->zc_name); + (void) spa_destroy(spa_name); pool_props_bad: nvlist_free(rootprops); From owner-svn-src-stable@freebsd.org Fri Jun 22 10:07:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C6881015BAF; Fri, 22 Jun 2018 10:07:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4102E89463; Fri, 22 Jun 2018 10:07:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 221D91F3D0; Fri, 22 Jun 2018 10:07:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MA7M7m054449; Fri, 22 Jun 2018 10:07:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MA7MD9054448; Fri, 22 Jun 2018 10:07:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806221007.w5MA7MD9054448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Jun 2018 10:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335548 - stable/11/sys/compat/linprocfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linprocfs X-SVN-Commit-Revision: 335548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 10:07:22 -0000 Author: kib Date: Fri Jun 22 10:07:21 2018 New Revision: 335548 URL: https://svnweb.freebsd.org/changeset/base/335548 Log: MFC r335199: linprocfs: add TracerPid to /proc/pid/status. Modified: stable/11/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/11/sys/compat/linprocfs/linprocfs.c Fri Jun 22 09:45:18 2018 (r335547) +++ stable/11/sys/compat/linprocfs/linprocfs.c Fri Jun 22 10:07:21 2018 (r335548) @@ -754,8 +754,8 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) * Credentials */ sbuf_printf(sb, "Pid:\t%d\n", p->p_pid); - sbuf_printf(sb, "PPid:\t%d\n", p->p_pptr ? - p->p_pptr->p_pid : 0); + sbuf_printf(sb, "PPid:\t%d\n", kp.ki_ppid ); + sbuf_printf(sb, "TracerPid:\t%d\n", kp.ki_tracer ); sbuf_printf(sb, "Uid:\t%d %d %d %d\n", p->p_ucred->cr_ruid, p->p_ucred->cr_uid, p->p_ucred->cr_svuid, From owner-svn-src-stable@freebsd.org Fri Jun 22 10:13:17 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F33C11015EDB; Fri, 22 Jun 2018 10:13:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 909A189911; Fri, 22 Jun 2018 10:13:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C51A1F57B; Fri, 22 Jun 2018 10:13:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MADGMh059378; Fri, 22 Jun 2018 10:13:16 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MADGdg059377; Fri, 22 Jun 2018 10:13:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806221013.w5MADGdg059377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 10:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335549 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 335549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 10:13:17 -0000 Author: avg Date: Fri Jun 22 10:13:15 2018 New Revision: 335549 URL: https://svnweb.freebsd.org/changeset/base/335549 Log: Revert r335546 as temporary pool name feature has not been merged Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 10:07:21 2018 (r335548) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 22 10:13:15 2018 (r335549) @@ -1529,7 +1529,6 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) nvlist_t *config, *props = NULL; nvlist_t *rootprops = NULL; nvlist_t *zplprops = NULL; - char *spa_name = zc->zc_name; if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, zc->zc_iflags, &config)) @@ -1545,7 +1544,6 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) if (props) { nvlist_t *nvl = NULL; uint64_t version = SPA_VERSION; - char *tname; (void) nvlist_lookup_uint64(props, zpool_prop_to_name(ZPOOL_PROP_VERSION), &version); @@ -1568,10 +1566,6 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) zplprops, NULL); if (error != 0) goto pool_props_bad; - - if (nvlist_lookup_string(props, - zpool_prop_to_name(ZPOOL_PROP_TNAME), &tname) == 0) - spa_name = tname; } error = spa_create(zc->zc_name, config, props, zplprops); @@ -1579,9 +1573,9 @@ zfs_ioc_pool_create(zfs_cmd_t *zc) /* * Set the remaining root properties */ - if (!error && (error = zfs_set_prop_nvlist(spa_name, + if (!error && (error = zfs_set_prop_nvlist(zc->zc_name, ZPROP_SRC_LOCAL, rootprops, NULL)) != 0) - (void) spa_destroy(spa_name); + (void) spa_destroy(zc->zc_name); pool_props_bad: nvlist_free(rootprops); From owner-svn-src-stable@freebsd.org Fri Jun 22 10:39:24 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00E00101681F; Fri, 22 Jun 2018 10:39:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 953008A7A6; Fri, 22 Jun 2018 10:39:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 722DF1F8B2; Fri, 22 Jun 2018 10:39:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MAdNEW070047; Fri, 22 Jun 2018 10:39:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MAdMm5070044; Fri, 22 Jun 2018 10:39:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806221039.w5MAdMm5070044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 10:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335554 - in stable/11/sys: dev/acpica dev/acpica/Osd x86/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: dev/acpica dev/acpica/Osd x86/acpica X-SVN-Commit-Revision: 335554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 10:39:24 -0000 Author: avg Date: Fri Jun 22 10:39:22 2018 New Revision: 335554 URL: https://svnweb.freebsd.org/changeset/base/335554 Log: MFC r332918, r333222: go deeper for ACPI suspend bounce test debug.acpi.suspend_bounce sysctl now allows a deeper dive into the sleep abyss. The system will execute the suspend sequence up to the call to AcpiEnterSleepState(). That includes saving processor contexts and parking APs. Then, instead of actually entering the sleep state, the BSP will call resumectx() to emulate the wakeup. The APs should get restarted by the sequence of Init and Startup IPIs that BSP sends to them. AcpiOsEnterSleep() is used to implement this feature. Joint work with jkim. Modified: stable/11/sys/dev/acpica/Osd/OsdHardware.c stable/11/sys/dev/acpica/acpi.c stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- stable/11/sys/dev/acpica/Osd/OsdHardware.c Fri Jun 22 10:23:32 2018 (r335553) +++ stable/11/sys/dev/acpica/Osd/OsdHardware.c Fri Jun 22 10:39:22 2018 (r335554) @@ -37,9 +37,15 @@ __FBSDID("$FreeBSD$"); #include #include +extern int acpi_susp_bounce; + ACPI_STATUS AcpiOsEnterSleep(UINT8 SleepState, UINT32 RegaValue, UINT32 RegbValue) { + + /* If testing device suspend only, back out of everything here. */ + if (acpi_susp_bounce) + return (AE_CTRL_TERMINATE); return (AE_OK); } Modified: stable/11/sys/dev/acpica/acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi.c Fri Jun 22 10:23:32 2018 (r335553) +++ stable/11/sys/dev/acpica/acpi.c Fri Jun 22 10:39:22 2018 (r335554) @@ -291,7 +291,7 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); -static int acpi_susp_bounce; +int acpi_susp_bounce; SYSCTL_INT(_debug_acpi, OID_AUTO, suspend_bounce, CTLFLAG_RW, &acpi_susp_bounce, 0, "Don't actually suspend, just test devices."); @@ -2897,10 +2897,6 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) goto backout; } slp_state = ACPI_SS_DEV_SUSPEND; - - /* If testing device suspend only, back out of everything here. */ - if (acpi_susp_bounce) - goto backout; status = AcpiEnterSleepStatePrep(state); if (ACPI_FAILURE(status)) { Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Fri Jun 22 10:23:32 2018 (r335553) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Fri Jun 22 10:39:22 2018 (r335554) @@ -77,6 +77,7 @@ CTASSERT(sizeof(wakecode) < PAGE_SIZE - 1024); extern int acpi_resume_beep; extern int acpi_reset_video; +extern int acpi_susp_bounce; #ifdef SMP extern struct susppcb **susppcbs; @@ -257,6 +258,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) AcpiFormatException(status)); return (0); /* couldn't sleep */ } + + if (acpi_susp_bounce) + resumectx(pcb); for (;;) ia32_pause(); From owner-svn-src-stable@freebsd.org Fri Jun 22 10:44:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 336C21016BBD; Fri, 22 Jun 2018 10:44:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA16B8ACF7; Fri, 22 Jun 2018 10:44:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CE9E1FA47; Fri, 22 Jun 2018 10:44:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MAiXFF074968; Fri, 22 Jun 2018 10:44:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MAiX16074967; Fri, 22 Jun 2018 10:44:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806221044.w5MAiX16074967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 10:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335555 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 335555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 10:44:34 -0000 Author: avg Date: Fri Jun 22 10:44:33 2018 New Revision: 335555 URL: https://svnweb.freebsd.org/changeset/base/335555 Log: MFC r333321,r333707: x86 cpususpend_handler: call wbinvd after setting suspend state bits Without a subsequent wbinvd the changes to suspended_cpus (and resuming_cpus) can be lost at least on AMD systems that use MOESI cache coherency protocol. That can happen because one of APs ends up as an Owner of the corresponding cache line(s) and the changes may never reach the main memory before the AP is reset. This change fixed suspend to RAM a previously broken AMD-based system. Modified: stable/11/sys/x86/x86/mp_x86.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mp_x86.c ============================================================================== --- stable/11/sys/x86/x86/mp_x86.c Fri Jun 22 10:39:22 2018 (r335554) +++ stable/11/sys/x86/x86/mp_x86.c Fri Jun 22 10:44:33 2018 (r335555) @@ -1317,15 +1317,33 @@ cpususpend_handler(void) #else npxsuspend(susppcbs[cpu]->sp_fpususpend); #endif - wbinvd(); - CPU_SET_ATOMIC(cpu, &suspended_cpus); /* - * Hack for xen, which does not use resumectx() so never - * uses the next clause: set resuming_cpus early so that - * resume_cpus() can wait on the same bitmap for acpi and - * xen. resuming_cpus now means eventually_resumable_cpus. + * suspended_cpus is cleared shortly after each AP is restarted + * by a Startup IPI, so that the BSP can proceed to restarting + * the next AP. + * + * resuming_cpus gets cleared when the AP completes + * initialization after having been released by the BSP. + * resuming_cpus is probably not the best name for the + * variable, because it is actually a set of processors that + * haven't resumed yet and haven't necessarily started resuming. + * + * Note that suspended_cpus is meaningful only for ACPI suspend + * as it's not really used for Xen suspend since the APs are + * automatically restored to the running state and the correct + * context. For the same reason resumectx is never called in + * that case. */ + CPU_SET_ATOMIC(cpu, &suspended_cpus); CPU_SET_ATOMIC(cpu, &resuming_cpus); + + /* + * Invalidate the cache after setting the global status bits. + * The last AP to set its bit may end up being an Owner of the + * corresponding cache line in MOESI protocol. The AP may be + * stopped before the cache line is written to the main memory. + */ + wbinvd(); } else { #ifdef __amd64__ fpuresume(susppcbs[cpu]->sp_fpususpend); @@ -1337,7 +1355,7 @@ cpususpend_handler(void) PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); - /* Indicate that we are resuming */ + /* Indicate that we have restarted and restored the context. */ CPU_CLR_ATOMIC(cpu, &suspended_cpus); } From owner-svn-src-stable@freebsd.org Fri Jun 22 10:49:22 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A05661016E45; Fri, 22 Jun 2018 10:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD0F8B208; Fri, 22 Jun 2018 10:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B5391FA49; Fri, 22 Jun 2018 10:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MAnMjT075245; Fri, 22 Jun 2018 10:49:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MAnLOT075240; Fri, 22 Jun 2018 10:49:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806221049.w5MAnLOT075240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 10:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335556 - in stable/11/sys: arm/arm arm64/arm64 mips/mips X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: arm/arm arm64/arm64 mips/mips X-SVN-Commit-Revision: 335556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 10:49:22 -0000 Author: avg Date: Fri Jun 22 10:49:21 2018 New Revision: 335556 URL: https://svnweb.freebsd.org/changeset/base/335556 Log: MFC r333667: followup to r332730/r332752: set kdb_why to "trap" for fatal traps This change updates arm, arm64 and mips achitectures. Additionally, it removes redundant checks for kdb_active where it already results in kdb_reenter() and adds kdb_reenter() calls where they were missing. Some architectures check the return value of kdb_trap(), but some don't. I haven't changed any of that. Some trap handling routines have a return code. I am not sure if I provided correct ones for returns after kdb_reenter(). kdb_reenter should never return unless kdb_jmpbufp is NULL for some reason. Modified: stable/11/sys/arm/arm/trap-v4.c stable/11/sys/arm/arm/trap-v6.c stable/11/sys/arm64/arm64/trap.c stable/11/sys/mips/mips/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/trap-v4.c ============================================================================== --- stable/11/sys/arm/arm/trap-v4.c Fri Jun 22 10:44:33 2018 (r335555) +++ stable/11/sys/arm/arm/trap-v4.c Fri Jun 22 10:49:21 2018 (r335556) @@ -404,7 +404,16 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct ksig *ksig) { const char *mode; +#ifdef KDB + bool handled; +#endif +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return (0); + } +#endif #ifdef KDTRACE_HOOKS if (!TRAP_USERMODE(tf)) { if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far & FAULT_TYPE_MASK)) @@ -447,9 +456,13 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic || kdb_active) - if (kdb_trap(fsr, 0, tf)) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(fsr, 0, tf); + kdb_why = KDB_WHY_UNSET; + if (handled) return (0); + } #endif panic("Fatal abort"); /*NOTREACHED*/ Modified: stable/11/sys/arm/arm/trap-v6.c ============================================================================== --- stable/11/sys/arm/arm/trap-v6.c Fri Jun 22 10:44:33 2018 (r335555) +++ stable/11/sys/arm/arm/trap-v6.c Fri Jun 22 10:49:21 2018 (r335556) @@ -599,8 +599,11 @@ abort_fatal(struct trapframe *tf, u_int idx, u_int fsr printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic || kdb_active) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; kdb_trap(fsr, 0, tf); + kdb_why = KDB_WHY_UNSET; + } #endif panic("Fatal abort"); /*NOTREACHED*/ Modified: stable/11/sys/arm64/arm64/trap.c ============================================================================== --- stable/11/sys/arm64/arm64/trap.c Fri Jun 22 10:44:33 2018 (r335555) +++ stable/11/sys/arm64/arm64/trap.c Fri Jun 22 10:49:21 2018 (r335556) @@ -155,6 +155,9 @@ data_abort(struct thread *td, struct trapframe *frame, vm_prot_t ftype; vm_offset_t va; int error, sig, ucode; +#ifdef KDB + bool handled; +#endif /* * According to the ARMv8-A rev. A.g, B2.10.5 "Load-Exclusive @@ -232,9 +235,14 @@ data_abort(struct thread *td, struct trapframe *frame, printf(" esr: %.8lx\n", esr); #ifdef KDB - if (debugger_on_panic || kdb_active) - if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame)) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(ESR_ELx_EXCEPTION(esr), 0, + frame); + kdb_why = KDB_WHY_UNSET; + if (handled) return; + } #endif panic("vm_fault failed: %lx", frame->tf_elr); } Modified: stable/11/sys/mips/mips/trap.c ============================================================================== --- stable/11/sys/mips/mips/trap.c Fri Jun 22 10:44:33 2018 (r335555) +++ stable/11/sys/mips/mips/trap.c Fri Jun 22 10:49:21 2018 (r335556) @@ -533,7 +533,12 @@ trap(struct trapframe *trapframe) register_t *frame_regs; trapdebug_enter(trapframe, 0); - +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return (0); + } +#endif type = (trapframe->cause & MIPS_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT; if (TRAPF_USERMODE(trapframe)) { type |= T_USER; @@ -1104,8 +1109,10 @@ err: #endif #ifdef KDB - if (debugger_on_panic || kdb_active) { + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; kdb_trap(type, 0, trapframe); + kdb_why = KDB_WHY_UNSET; } #endif panic("trap"); From owner-svn-src-stable@freebsd.org Fri Jun 22 11:16:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC6F1017A94; Fri, 22 Jun 2018 11:16:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D5FE8C259; Fri, 22 Jun 2018 11:16:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 549B01FF1C; Fri, 22 Jun 2018 11:16:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MBGINX090640; Fri, 22 Jun 2018 11:16:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MBGHjP090637; Fri, 22 Jun 2018 11:16:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806221116.w5MBGHjP090637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 22 Jun 2018 11:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335557 - in stable/10/sys: arm/arm mips/mips X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys: arm/arm mips/mips X-SVN-Commit-Revision: 335557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 11:16:19 -0000 Author: avg Date: Fri Jun 22 11:16:17 2018 New Revision: 335557 URL: https://svnweb.freebsd.org/changeset/base/335557 Log: MFC r333667: followup to r332730/r332752: set kdb_why to "trap" for fatal traps This change updates arm, arm64 and mips achitectures. Additionally, it removes redundant checks for kdb_active where it already results in kdb_reenter() and adds kdb_reenter() calls where they were missing. Some architectures check the return value of kdb_trap(), but some don't. I haven't changed any of that. Some trap handling routines have a return code. I am not sure if I provided correct ones for returns after kdb_reenter(). kdb_reenter should never return unless kdb_jmpbufp is NULL for some reason. Modified: stable/10/sys/arm/arm/trap-v6.c stable/10/sys/arm/arm/trap.c stable/10/sys/mips/mips/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/trap-v6.c ============================================================================== --- stable/10/sys/arm/arm/trap-v6.c Fri Jun 22 10:49:21 2018 (r335556) +++ stable/10/sys/arm/arm/trap-v6.c Fri Jun 22 11:16:17 2018 (r335557) @@ -592,8 +592,11 @@ abort_fatal(struct trapframe *tf, u_int idx, u_int fsr printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic || kdb_active) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; kdb_trap(fsr, 0, tf); + kdb_why = KDB_WHY_UNSET; + } #endif panic("Fatal abort"); /*NOTREACHED*/ Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Fri Jun 22 10:49:21 2018 (r335556) +++ stable/10/sys/arm/arm/trap.c Fri Jun 22 11:16:17 2018 (r335557) @@ -422,7 +422,16 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct ksig *ksig) { const char *mode; +#ifdef KDB + bool handled; +#endif +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return (0); + } +#endif mode = TRAP_USERMODE(tf) ? "user" : "kernel"; disable_interrupts(PSR_I|PSR_F); @@ -458,9 +467,13 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic || kdb_active) - if (kdb_trap(fsr, 0, tf)) + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(fsr, 0, tf); + kdb_why = KDB_WHY_UNSET; + if (handled) return (0); + } #endif panic("Fatal abort"); /*NOTREACHED*/ @@ -749,4 +762,4 @@ badaddr_read(void *addr, size_t size, void *rptr) /* Return EFAULT if the address was invalid, else zero */ return (rv); -} \ No newline at end of file +} Modified: stable/10/sys/mips/mips/trap.c ============================================================================== --- stable/10/sys/mips/mips/trap.c Fri Jun 22 10:49:21 2018 (r335556) +++ stable/10/sys/mips/mips/trap.c Fri Jun 22 11:16:17 2018 (r335557) @@ -529,7 +529,12 @@ trap(struct trapframe *trapframe) register_t *frame_regs; trapdebug_enter(trapframe, 0); - +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return (0); + } +#endif type = (trapframe->cause & MIPS_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT; if (TRAPF_USERMODE(trapframe)) { type |= T_USER; @@ -1104,8 +1109,10 @@ err: #endif #ifdef KDB - if (debugger_on_panic || kdb_active) { + if (debugger_on_panic) { + kdb_why = KDB_WHY_TRAP; kdb_trap(type, 0, trapframe); + kdb_why = KDB_WHY_UNSET; } #endif panic("trap"); From owner-svn-src-stable@freebsd.org Fri Jun 22 20:19:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2CC81025FC7; Fri, 22 Jun 2018 20:19:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A321F7F890; Fri, 22 Jun 2018 20:19:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8430E25775; Fri, 22 Jun 2018 20:19:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MKJXZS068754; Fri, 22 Jun 2018 20:19:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MKJX3u068753; Fri, 22 Jun 2018 20:19:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806222019.w5MKJX3u068753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 22 Jun 2018 20:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335561 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe X-SVN-Commit-Revision: 335561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 20:19:34 -0000 Author: np Date: Fri Jun 22 20:19:33 2018 New Revision: 335561 URL: https://svnweb.freebsd.org/changeset/base/335561 Log: cxgbe(4): Determine early in the ioctl whether it is allowed to sleep or not, instead of always starting a non-sleepable operation and re-adjusting later. This ensures that an operation that is allowed to sleep (ifconfig up/down) never fails with EBUSY on the initial attempt to start a synchronized operation. This is a direct commit to stable/11. The driver ioctl is always allowed to sleep in head. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_main.c Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Fri Jun 22 17:58:56 2018 (r335560) +++ stable/11/sys/dev/cxgbe/t4_main.c Fri Jun 22 20:19:33 2018 (r335561) @@ -1607,7 +1607,7 @@ cxgbe_init(void *arg) static int cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) { - int rc = 0, mtu, flags, can_sleep; + int rc = 0, mtu, can_sleep, if_flags, if_drv_flags, vi_if_flags; struct vi_info *vi = ifp->if_softc; struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; @@ -1633,48 +1633,57 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd break; case SIOCSIFFLAGS: - can_sleep = 0; -redo_sifflags: + /* + * Decide what to do, with the port lock held. + */ + PORT_LOCK(pi); + if_flags = ifp->if_flags; + if_drv_flags = ifp->if_drv_flags; + vi_if_flags = vi->if_flags; + if (if_flags & IFF_UP && if_drv_flags & IFF_DRV_RUNNING && + (vi_if_flags ^ if_flags) & (IFF_PROMISC | IFF_ALLMULTI)) { + can_sleep = 0; + } else { + can_sleep = 1; + } + PORT_UNLOCK(pi); + + /* + * ifp/vi flags may change here but we'll just do what our local + * copy of the flags indicates and then update the driver owned + * ifp/vi flags (in a synch-op and with the port lock held) to + * reflect what we did. + */ + rc = begin_synchronized_op(sc, vi, can_sleep ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4flg"); if (rc) { if_printf(ifp, "%ssleepable synch operation failed: %d." " if_flags 0x%08x, if_drv_flags 0x%08x\n", - can_sleep ? "" : "non-", rc, ifp->if_flags, - ifp->if_drv_flags); + can_sleep ? "" : "non-", rc, if_flags, + if_drv_flags); return (rc); } - if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - flags = vi->if_flags; - if ((ifp->if_flags ^ flags) & + if (if_flags & IFF_UP) { + if (if_drv_flags & IFF_DRV_RUNNING) { + if ((if_flags ^ vi_if_flags) & (IFF_PROMISC | IFF_ALLMULTI)) { - if (can_sleep == 1) { - end_synchronized_op(sc, 0); - can_sleep = 0; - goto redo_sifflags; - } + MPASS(can_sleep == 0); rc = update_mac_settings(ifp, XGMAC_PROMISC | XGMAC_ALLMULTI); } } else { - if (can_sleep == 0) { - end_synchronized_op(sc, LOCK_HELD); - can_sleep = 1; - goto redo_sifflags; - } + MPASS(can_sleep == 1); rc = cxgbe_init_synchronized(vi); } - vi->if_flags = ifp->if_flags; - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (can_sleep == 0) { - end_synchronized_op(sc, LOCK_HELD); - can_sleep = 1; - goto redo_sifflags; - } + } else if (if_drv_flags & IFF_DRV_RUNNING) { + MPASS(can_sleep == 1); rc = cxgbe_uninit_synchronized(vi); } + PORT_LOCK(pi); + vi->if_flags = if_flags; + PORT_UNLOCK(pi); end_synchronized_op(sc, can_sleep ? 0 : LOCK_HELD); break; From owner-svn-src-stable@freebsd.org Fri Jun 22 23:52:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8E4C1004631; Fri, 22 Jun 2018 23:52:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AB48890B2; Fri, 22 Jun 2018 23:52:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CFEF279F2; Fri, 22 Jun 2018 23:52:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5MNqMRU084975; Fri, 22 Jun 2018 23:52:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5MNqKJg084967; Fri, 22 Jun 2018 23:52:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806222352.w5MNqKJg084967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Jun 2018 23:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335570 - in stable/11/sys/amd64: amd64 include X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys/amd64: amd64 include X-SVN-Commit-Revision: 335570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 23:52:23 -0000 Author: kib Date: Fri Jun 22 23:52:20 2018 New Revision: 335570 URL: https://svnweb.freebsd.org/changeset/base/335570 Log: MFC r333059 (by tychon): Expand the checks for UCR3 == PMAP_NO_CR3 to enable processes to be excluded from PTI. Modified: stable/11/sys/amd64/amd64/cpu_switch.S stable/11/sys/amd64/amd64/exception.S stable/11/sys/amd64/amd64/genassym.c stable/11/sys/amd64/amd64/machdep.c stable/11/sys/amd64/amd64/mp_machdep.c stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/amd64/trap.c stable/11/sys/amd64/include/asmacros.h stable/11/sys/amd64/include/pcpu.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/11/sys/amd64/amd64/cpu_switch.S Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/cpu_switch.S Fri Jun 22 23:52:20 2018 (r335570) @@ -210,10 +210,13 @@ done_tss: movq %r8,PCPU(RSP0) movq %r8,PCPU(CURPCB) /* Update the TSS_RSP0 pointer for the next interrupt */ - cmpb $0,pti(%rip) - jne 1f - movq %r8,TSS_RSP0(%rdx) -1: movq %r12,PCPU(CURTHREAD) /* into next thread */ + cmpq $~0,PCPU(UCR3) + je 1f + movq PCPU(PTI_RSP0),%rax + movq %rax,TSS_RSP0(%rdx) + jmp 2f +1: movq %r8,TSS_RSP0(%rdx) +2: movq %r12,PCPU(CURTHREAD) /* into next thread */ /* Test if debug registers should be restored. */ testl $PCB_DBREGS,PCB_FLAGS(%r8) @@ -292,12 +295,7 @@ do_tss: movq %rdx,PCPU(TSSP) shrq $8,%rcx movl %ecx,8(%rax) movb $0x89,5(%rax) /* unset busy */ - cmpb $0,pti(%rip) - je 1f - movq PCPU(PRVSPACE),%rax - addq $PC_PTI_STACK+PC_PTI_STACK_SZ*8,%rax - movq %rax,TSS_RSP0(%rdx) -1: movl $TSSSEL,%eax + movl $TSSSEL,%eax ltr %ax jmp done_tss Modified: stable/11/sys/amd64/amd64/exception.S ============================================================================== --- stable/11/sys/amd64/amd64/exception.S Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/exception.S Fri Jun 22 23:52:20 2018 (r335570) @@ -298,11 +298,15 @@ IDTVEC(page_pti) jz Xpage swapgs pushq %rax - pushq %rdx movq %cr3,%rax movq %rax,PCPU(SAVED_UCR3) + cmpq $~0,PCPU(UCR3) + jne 1f + popq %rax + jmp 2f +1: pushq %rdx PTI_UUENTRY has_err=1 - subq $TF_ERR,%rsp +2: subq $TF_ERR,%rsp movq %rdi,TF_RDI(%rsp) movq %rax,TF_RAX(%rsp) movq %rdx,TF_RDX(%rsp) @@ -347,9 +351,11 @@ page_cr2: */ .macro PROTF_ENTRY name,trapno \name\()_pti_doreti: + swapgs + cmpq $~0,PCPU(UCR3) + je 1f pushq %rax pushq %rdx - swapgs movq PCPU(KCR3),%rax movq %rax,%cr3 movq PCPU(RSP0),%rax @@ -362,7 +368,7 @@ page_cr2: movq %rax,%rsp popq %rdx popq %rax - swapgs +1: swapgs jmp X\name IDTVEC(\name\()_pti) cmpq $doreti_iret,PTI_RIP-2*8(%rsp) @@ -438,6 +444,8 @@ prot_addrf: IDTVEC(fast_syscall_pti) swapgs movq %rax,PCPU(SCRATCH_RAX) + cmpq $~0,PCPU(UCR3) + je fast_syscall_common movq PCPU(KCR3),%rax movq %rax,%cr3 jmp fast_syscall_common @@ -503,7 +511,7 @@ fast_syscall_common: movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%rsp /* user stack pointer */ - cmpb $0,pti + cmpq $~0,PCPU(UCR3) je 2f movq PCPU(UCR3),%r9 movq %r9,%cr3 @@ -1126,11 +1134,11 @@ ld_regs: jz 2f /* keep running with kernel GS.base */ cli call handle_ibrs_exit_rs - cmpb $0,pti + cmpq $~0,PCPU(UCR3) je 1f pushq %rdx - movq PCPU(PRVSPACE),%rdx - addq $PC_PTI_STACK+PC_PTI_STACK_SZ*8-PTI_SIZE,%rdx + movq PCPU(PTI_RSP0),%rdx + subq $PTI_SIZE,%rdx movq %rax,PTI_RAX(%rdx) popq %rax movq %rax,PTI_RDX(%rdx) Modified: stable/11/sys/amd64/amd64/genassym.c ============================================================================== --- stable/11/sys/amd64/amd64/genassym.c Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/genassym.c Fri Jun 22 23:52:20 2018 (r335570) @@ -229,6 +229,7 @@ ASSYM(PC_UCR3, offsetof(struct pcpu, pc_ucr3)); ASSYM(PC_SAVED_UCR3, offsetof(struct pcpu, pc_saved_ucr3)); ASSYM(PC_PTI_STACK, offsetof(struct pcpu, pc_pti_stack)); ASSYM(PC_PTI_STACK_SZ, PC_PTI_STACK_SZ); +ASSYM(PC_PTI_RSP0, offsetof(struct pcpu, pc_pti_rsp0)); ASSYM(PC_IBPB_SET, offsetof(struct pcpu, pc_ibpb_set)); ASSYM(LA_EOI, LAPIC_EOI * LAPIC_MEM_MUL); Modified: stable/11/sys/amd64/amd64/machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/machdep.c Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/machdep.c Fri Jun 22 23:52:20 2018 (r335570) @@ -1817,9 +1817,10 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) rsp0 = (vm_offset_t)thread0.td_pcb; /* Ensure the stack is aligned to 16 bytes */ rsp0 &= ~0xFul; - common_tss[0].tss_rsp0 = pti ? ((vm_offset_t)PCPU_PTR(pti_stack) + - PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful : rsp0; + common_tss[0].tss_rsp0 = rsp0; PCPU_SET(rsp0, rsp0); + PCPU_SET(pti_rsp0, ((vm_offset_t)PCPU_PTR(pti_stack) + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful); PCPU_SET(curpcb, thread0.td_pcb); /* transfer to user mode */ Modified: stable/11/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/mp_machdep.c Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/mp_machdep.c Fri Jun 22 23:52:20 2018 (r335570) @@ -255,6 +255,8 @@ init_secondary(void) pc->pc_tssp = &common_tss[cpu]; pc->pc_commontssp = &common_tss[cpu]; pc->pc_rsp0 = 0; + pc->pc_pti_rsp0 = ((vm_offset_t)&pc->pc_pti_stack + + PC_PTI_STACK_SZ * sizeof(uint64_t) & ~0xful); pc->pc_tss = (struct system_segment_descriptor *)&gdt[NGDT * cpu + GPROC0_SEL]; pc->pc_fs32p = &gdt[NGDT * cpu + GUFS32_SEL]; @@ -264,8 +266,7 @@ init_secondary(void) pc->pc_curpmap = kernel_pmap; pc->pc_pcid_gen = 1; pc->pc_pcid_next = PMAP_PCID_KERN + 1; - common_tss[cpu].tss_rsp0 = pti ? ((vm_offset_t)&pc->pc_pti_stack + - PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful : 0; + common_tss[cpu].tss_rsp0 = 0; /* Save the per-cpu pointer for use by the NMI handler. */ np = ((struct nmi_pcpu *) &nmi_stack[PAGE_SIZE]) - 1; Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/pmap.c Fri Jun 22 23:52:20 2018 (r335570) @@ -2560,8 +2560,10 @@ pmap_pinit0(pmap_t pmap) CPU_FOREACH(i) { pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; pmap->pm_pcids[i].pm_gen = 0; - if (!pti) + if (!pti) { __pcpu[i].pc_kcr3 = PMAP_NO_CR3; + __pcpu[i].pc_ucr3 = PMAP_NO_CR3; + } } PCPU_SET(curpmap, kernel_pmap); pmap_activate(curthread); @@ -2736,7 +2738,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, str * the kernel-mode page table active on return * to user space. */ - *pml4 |= pg_nx; + if (pmap->pm_ucr3 != PMAP_NO_CR3) + *pml4 |= pg_nx; pml4u = &pmap->pm_pml4u[pml4index]; *pml4u = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | @@ -7337,9 +7340,10 @@ pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; struct invpcid_descr d; - uint64_t cached, cr3, kcr3, kern_pti_cached, ucr3; + uint64_t cached, cr3, kcr3, kern_pti_cached, rsp0, ucr3; register_t rflags; u_int cpuid; + struct amd64tss *tssp; oldpmap = PCPU_GET(curpmap); pmap = vmspace_pmap(td->td_proc->p_vmspace); @@ -7429,6 +7433,12 @@ pmap_activate_sw(struct thread *td) PCPU_SET(kcr3, pmap->pm_cr3); PCPU_SET(ucr3, pmap->pm_ucr3); } + } + if (pmap->pm_ucr3 != PMAP_NO_CR3) { + rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; + tssp = PCPU_GET(tssp); + tssp->tss_rsp0 = rsp0; } #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); Modified: stable/11/sys/amd64/amd64/trap.c ============================================================================== --- stable/11/sys/amd64/amd64/trap.c Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/amd64/trap.c Fri Jun 22 23:52:20 2018 (r335570) @@ -463,11 +463,13 @@ trap(struct trapframe *frame) */ if (frame->tf_rip == (long)doreti_iret) { frame->tf_rip = (long)doreti_iret_fault; - if (pti && frame->tf_rsp == (uintptr_t)PCPU_PTR( - pti_stack) + (PC_PTI_STACK_SZ - 5) * - sizeof(register_t)) + if ((PCPU_GET(curpmap)->pm_ucr3 != + PMAP_NO_CR3) && + (frame->tf_rsp == (uintptr_t)PCPU_GET( + pti_rsp0) - 5 * sizeof(register_t))) { frame->tf_rsp = PCPU_GET(rsp0) - 5 * sizeof(register_t); + } return; } if (frame->tf_rip == (long)ld_ds) { Modified: stable/11/sys/amd64/include/asmacros.h ============================================================================== --- stable/11/sys/amd64/include/asmacros.h Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/include/asmacros.h Fri Jun 22 23:52:20 2018 (r335570) @@ -194,9 +194,12 @@ .macro PTI_UENTRY has_err swapgs + cmpq $~0,PCPU(UCR3) + je 1f pushq %rax pushq %rdx PTI_UUENTRY \has_err +1: .endm .macro PTI_ENTRY name, cont, has_err=0 Modified: stable/11/sys/amd64/include/pcpu.h ============================================================================== --- stable/11/sys/amd64/include/pcpu.h Fri Jun 22 21:59:30 2018 (r335569) +++ stable/11/sys/amd64/include/pcpu.h Fri Jun 22 23:52:20 2018 (r335570) @@ -67,13 +67,14 @@ u_int pc_cmci_mask; /* MCx banks for CMCI */ \ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ uint64_t pc_pti_stack[PC_PTI_STACK_SZ]; \ + register_t pc_pti_rsp0; \ int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ uint32_t pc_ibpb_set; \ - char __pad[96] /* be divisor of PAGE_SIZE \ + char __pad[88] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 From owner-svn-src-stable@freebsd.org Sat Jun 23 00:38:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96F071005D4A; Sat, 23 Jun 2018 00:38:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6278AE94; Sat, 23 Jun 2018 00:38:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15D2C1B5; Sat, 23 Jun 2018 00:38:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5N0ciac007358; Sat, 23 Jun 2018 00:38:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5N0ciZq007357; Sat, 23 Jun 2018 00:38:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806230038.w5N0ciZq007357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 23 Jun 2018 00:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335572 - stable/11/lib/libthr/support X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libthr/support X-SVN-Commit-Revision: 335572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2018 00:38:45 -0000 Author: kib Date: Sat Jun 23 00:38:44 2018 New Revision: 335572 URL: https://svnweb.freebsd.org/changeset/base/335572 Log: MFC r335258: Remove unused file. Deleted: stable/11/lib/libthr/support/ Modified: Directory Properties: stable/11/ (props changed)