From owner-svn-src-releng@freebsd.org Tue May 26 15:48:29 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AD3C2CBC3A; Tue, 26 May 2020 15:48:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49WdfP06bPz4Ppd; Tue, 26 May 2020 15:48:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F361E25C27; Tue, 26 May 2020 15:48:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04QFmSkl070619; Tue, 26 May 2020 15:48:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04QFmRR0070614; Tue, 26 May 2020 15:48:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202005261548.04QFmRR0070614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 26 May 2020 15:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361522 - releng/11.4/sys/netinet X-SVN-Group: releng X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: releng/11.4/sys/netinet X-SVN-Commit-Revision: 361522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 15:48:29 -0000 Author: tuexen Date: Tue May 26 15:48:27 2020 New Revision: 361522 URL: https://svnweb.freebsd.org/changeset/base/361522 Log: MFS r361469: Fix bug in PR-SCTP Only drop DATA chunk with lower priorities as specified in RFC 7496. This issue was found by looking at a reproducer generated by syzkaller. MFS r361472: Improve SCTP iterator Ensure that the SCTP iterator runs with an stcb and inp, which belong to each other. MFS r361473: Improve stcb handling during teardown Ensure that an stcb is not dereferenced when it is about to be freed. This issue was found by SYZKALLER. MFS r361476: Improve ASCONF handling Avoid an integer underflow. Approved by: re(gjb) Modified: releng/11.4/sys/netinet/sctp_asconf.c releng/11.4/sys/netinet/sctp_indata.c releng/11.4/sys/netinet/sctp_indata.h releng/11.4/sys/netinet/sctp_output.c releng/11.4/sys/netinet/sctputil.c Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/sys/netinet/sctp_asconf.c ============================================================================== --- releng/11.4/sys/netinet/sctp_asconf.c Tue May 26 15:48:06 2020 (r361521) +++ releng/11.4/sys/netinet/sctp_asconf.c Tue May 26 15:48:27 2020 (r361522) @@ -1797,9 +1797,9 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, } /* switch */ /* update remaining ASCONF-ACK message length to process */ - ack_length -= SCTP_SIZE32(param_length); - if (ack_length <= 0) { - /* no more data in the mbuf chain */ + if (ack_length > SCTP_SIZE32(param_length)) { + ack_length -= SCTP_SIZE32(param_length); + } else { break; } offset += SCTP_SIZE32(param_length); Modified: releng/11.4/sys/netinet/sctp_indata.c ============================================================================== --- releng/11.4/sys/netinet/sctp_indata.c Tue May 26 15:48:06 2020 (r361521) +++ releng/11.4/sys/netinet/sctp_indata.c Tue May 26 15:48:27 2020 (r361522) @@ -162,6 +162,9 @@ sctp_build_readq_entry(struct sctp_tcb *stcb, read_queue_e->data = dm; read_queue_e->stcb = stcb; read_queue_e->port_from = stcb->rport; + if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + read_queue_e->do_not_ref_stcb = 1; + } failed_build: return (read_queue_e); } @@ -773,6 +776,7 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_ atomic_add_int(&nc->whoFrom->ref_count, 1); nc->stcb = control->stcb; nc->port_from = control->port_from; + nc->do_not_ref_stcb = control->do_not_ref_stcb; } static void Modified: releng/11.4/sys/netinet/sctp_indata.h ============================================================================== --- releng/11.4/sys/netinet/sctp_indata.h Tue May 26 15:48:06 2020 (r361521) +++ releng/11.4/sys/netinet/sctp_indata.h Tue May 26 15:48:27 2020 (r361522) @@ -66,6 +66,9 @@ sctp_build_readq_entry(struct sctp_tcb *stcb, (_ctl)->data = dm; \ (_ctl)->stcb = (in_it); \ (_ctl)->port_from = (in_it)->rport; \ + if ((in_it)->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { \ + (_ctl)->do_not_ref_stcb = 1; \ + }\ } \ } while (0) Modified: releng/11.4/sys/netinet/sctp_output.c ============================================================================== --- releng/11.4/sys/netinet/sctp_output.c Tue May 26 15:48:06 2020 (r361521) +++ releng/11.4/sys/netinet/sctp_output.c Tue May 26 15:48:27 2020 (r361522) @@ -6198,11 +6198,11 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, * This one is PR-SCTP AND buffer space * limited type */ - if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { + if (chk->rec.data.timetodrop.tv_sec > (long)srcv->sinfo_timetolive) { /* * Lower numbers equates to higher * priority so if the one we are - * looking at has a larger or equal + * looking at has a larger * priority we want to drop the data * and NOT retransmit it. */ @@ -6233,7 +6233,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { /* Here we must move to the sent queue and mark */ if (PR_SCTP_BUF_ENABLED(chk->flags)) { - if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { + if (chk->rec.data.timetodrop.tv_sec > (long)srcv->sinfo_timetolive) { if (chk->data) { /* * We release the book_size @@ -12614,7 +12614,7 @@ sctp_lower_sosend(struct socket *so, top = SCTP_HEADER_TO_CHAIN(i_pak); sndlen = SCTP_HEADER_LEN(i_pak); } - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %zu\n", + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %zd\n", (void *)addr, sndlen); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && Modified: releng/11.4/sys/netinet/sctputil.c ============================================================================== --- releng/11.4/sys/netinet/sctputil.c Tue May 26 15:48:06 2020 (r361521) +++ releng/11.4/sys/netinet/sctputil.c Tue May 26 15:48:27 2020 (r361522) @@ -1409,6 +1409,7 @@ select_a_new_ep: } tinp = it->inp; it->inp = LIST_NEXT(it->inp, sctp_list); + it->stcb = NULL; SCTP_INP_RUNLOCK(tinp); if (it->inp == NULL) { goto done_with_iterator; @@ -1478,6 +1479,9 @@ select_a_new_ep: atomic_add_int(&it->stcb->asoc.refcnt, -1); iteration_count = 0; } + KASSERT(it->inp == it->stcb->sctp_ep, + ("%s: stcb %p does not belong to inp %p, but inp %p", + __func__, it->stcb, it->inp, it->stcb->sctp_ep)); /* run function on this one */ (*it->function_assoc) (it->inp, it->stcb, it->pointer, it->val); @@ -1510,6 +1514,7 @@ no_stcb: } else { it->inp = LIST_NEXT(it->inp, sctp_list); } + it->stcb = NULL; if (it->inp == NULL) { goto done_with_iterator; } From owner-svn-src-releng@freebsd.org Tue May 26 16:14:22 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8CC92CCB1F; Tue, 26 May 2020 16:14:22 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49WfDG3WYKz4SZd; Tue, 26 May 2020 16:14:22 +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 6FA6A260E3; Tue, 26 May 2020 16:14:22 +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 04QGEM6D089289; Tue, 26 May 2020 16:14:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04QGELTn089287; Tue, 26 May 2020 16:14:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202005261614.04QGELTn089287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 26 May 2020 16:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361531 - in releng/11.4/lib/clang/include: clang/Config llvm/Config X-SVN-Group: releng X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in releng/11.4/lib/clang/include: clang/Config llvm/Config X-SVN-Commit-Revision: 361531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 16:14:22 -0000 Author: dim Date: Tue May 26 16:14:21 2020 New Revision: 361531 URL: https://svnweb.freebsd.org/changeset/base/361531 Log: MF11 r361465: Regenerate llvm config headers to correctly enable zlib support During the initial upgrade to 10.0.0 in r357120, I generated these headers once, but they were missing zlib-related settings at that time. These should have been regenerated again during the merge of the final 10.0.0 release. Direct commit to stable/{11,12}, since head has gotten 10.0.1 in the mean time, with up-to-date generated headers. Approved by: re (gjb) Reported by: hyama99@gmail.com PR: 246244 Modified: releng/11.4/lib/clang/include/clang/Config/config.h releng/11.4/lib/clang/include/llvm/Config/config.h releng/11.4/lib/clang/include/llvm/Config/llvm-config.h Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/lib/clang/include/clang/Config/config.h ============================================================================== --- releng/11.4/lib/clang/include/clang/Config/config.h Tue May 26 16:11:46 2020 (r361530) +++ releng/11.4/lib/clang/include/clang/Config/config.h Tue May 26 16:14:21 2020 (r361531) @@ -62,7 +62,7 @@ #define CLANG_HAVE_RLIMITS 1 /* The LLVM product name and version */ -#define BACKEND_PACKAGE_STRING "LLVM 10.0.0git" +#define BACKEND_PACKAGE_STRING "LLVM 10.0.0" /* Linker version detected at compile time. */ /* #undef HOST_LINK_VERSION */ Modified: releng/11.4/lib/clang/include/llvm/Config/config.h ============================================================================== --- releng/11.4/lib/clang/include/llvm/Config/config.h Tue May 26 16:11:46 2020 (r361530) +++ releng/11.4/lib/clang/include/llvm/Config/config.h Tue May 26 16:14:21 2020 (r361531) @@ -110,6 +110,9 @@ /* Define to 1 if you have the `pthread_setname_np' function. */ /* #undef HAVE_PTHREAD_SETNAME_NP */ +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + /* Define to 1 if you have the header file. */ #define HAVE_LINK_H 1 @@ -224,6 +227,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_VALGRIND_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_ZLIB_H 1 + /* Have host's _alloca */ /* #undef HAVE__ALLOCA */ @@ -316,10 +322,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 10.0.0git" +#define PACKAGE_STRING "LLVM 10.0.0" /* Define to the version of this package. */ -#define PACKAGE_VERSION "10.0.0git" +#define PACKAGE_VERSION "10.0.0" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ Modified: releng/11.4/lib/clang/include/llvm/Config/llvm-config.h ============================================================================== --- releng/11.4/lib/clang/include/llvm/Config/llvm-config.h Tue May 26 16:11:46 2020 (r361530) +++ releng/11.4/lib/clang/include/llvm/Config/llvm-config.h Tue May 26 16:14:21 2020 (r361531) @@ -73,7 +73,7 @@ #define LLVM_VERSION_PATCH 0 /* LLVM version string */ -#define LLVM_VERSION_STRING "10.0.0git" +#define LLVM_VERSION_STRING "10.0.0" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() From owner-svn-src-releng@freebsd.org Tue May 26 22:41:12 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE3A92F640E; Tue, 26 May 2020 22:41:12 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Wppc4y1kz45CH; Tue, 26 May 2020 22:41:12 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5057ADA7; Tue, 26 May 2020 22:41:12 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04QMfCqG026537; Tue, 26 May 2020 22:41:12 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04QMfCOV026534; Tue, 26 May 2020 22:41:12 GMT (envelope-from mw@FreeBSD.org) Message-Id: <202005262241.04QMfCOV026534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 26 May 2020 22:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361539 - in releng/11.4: share/man/man4 sys/contrib/ena-com sys/contrib/ena-com/ena_defs sys/dev/ena sys/modules/ena X-SVN-Group: releng X-SVN-Commit-Author: mw X-SVN-Commit-Paths: in releng/11.4: share/man/man4 sys/contrib/ena-com sys/contrib/ena-com/ena_defs sys/dev/ena sys/modules/ena X-SVN-Commit-Revision: 361539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 22:41:12 -0000 Author: mw Date: Tue May 26 22:41:12 2020 New Revision: 361539 URL: https://svnweb.freebsd.org/changeset/base/361539 Log: MF11: r361467-361468,361534 This patch upgrades the ENA driver to version 2.2.0. Approved by: re (gjb) Sponsored by: Amazon, Inc. Added: releng/11.4/sys/dev/ena/ena_datapath.c - copied, changed from r361468, stable/11/sys/dev/ena/ena_datapath.c releng/11.4/sys/dev/ena/ena_datapath.h - copied, changed from r361468, stable/11/sys/dev/ena/ena_datapath.h releng/11.4/sys/dev/ena/ena_netmap.c - copied, changed from r361468, stable/11/sys/dev/ena/ena_netmap.c releng/11.4/sys/dev/ena/ena_netmap.h - copied, changed from r361468, stable/11/sys/dev/ena/ena_netmap.h Modified: releng/11.4/share/man/man4/ena.4 releng/11.4/sys/contrib/ena-com/ena_com.c releng/11.4/sys/contrib/ena-com/ena_com.h releng/11.4/sys/contrib/ena-com/ena_defs/ena_admin_defs.h releng/11.4/sys/contrib/ena-com/ena_defs/ena_common_defs.h releng/11.4/sys/contrib/ena-com/ena_defs/ena_eth_io_defs.h releng/11.4/sys/contrib/ena-com/ena_defs/ena_gen_info.h releng/11.4/sys/contrib/ena-com/ena_defs/ena_regs_defs.h releng/11.4/sys/contrib/ena-com/ena_eth_com.c releng/11.4/sys/contrib/ena-com/ena_eth_com.h releng/11.4/sys/contrib/ena-com/ena_plat.h releng/11.4/sys/dev/ena/ena.c releng/11.4/sys/dev/ena/ena.h releng/11.4/sys/dev/ena/ena_sysctl.c releng/11.4/sys/dev/ena/ena_sysctl.h releng/11.4/sys/modules/ena/Makefile Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/share/man/man4/ena.4 ============================================================================== --- releng/11.4/share/man/man4/ena.4 Tue May 26 19:34:05 2020 (r361538) +++ releng/11.4/share/man/man4/ena.4 Tue May 26 22:41:12 2020 (r361539) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 04, 2017 +.Dd August 16, 2017 .Dt ENA 4 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" .Sh SYNOPSIS To compile this driver into the kernel, -place the following line in your +place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "device ena" @@ -59,8 +59,9 @@ The driver supports a range of ENA devices, is link-sp (i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has a negotiated and extendable feature set. .Pp -Some ENA devices support SR-IOV. This driver is used for both the -SR-IOV Physical Function (PF) and Virtual Function (VF) devices. +Some ENA devices support SR-IOV. +This driver is used for both the SR-IOV Physical Function (PF) and Virtual +Function (VF) devices. .Pp The ENA devices enable high speed and low overhead network traffic processing by providing multiple Tx/Rx queue pairs (the maximum number @@ -82,8 +83,8 @@ to recover in a manner transparent to the application, debug logs. .Pp Some of the ENA devices support a working mode called Low-latency -Queue (LLQ), which saves several more microseconds. This feature will -be implemented for driver in future releases. +Queue (LLQ), which saves several more microseconds. +This feature will be implemented for driver in future releases. .Sh HARDWARE Supported PCI vendor ID/device IDs: .Pp @@ -105,19 +106,23 @@ Supported PCI vendor ID/device IDs: Error occurred during initialization of the mmio register read request. .It ena%d: Can not reset device .Pp -Device could not be reset; device may not be responding or is already -during reset. +Device could not be reset. +.br +Device may not be responding or is already during reset. .It ena%d: device version is too low .Pp -Version of the controller is too low and it is not supported by the driver. +Version of the controller is too old and it is not supported by the driver. .It ena%d: Invalid dma width value %d .Pp -The controller is able to request dma transcation width. Device stopped -responding or it demanded invalid value. +The controller is able to request dma transaction width. +.br +Device stopped responding or it demanded invalid value. .It ena%d: Can not initialize ena admin queue with device .Pp -Initialization of the Admin Queue failed; device may not be responding or there -was a problem with initialization of the resources. +Initialization of the Admin Queue failed. +.br +Device may not be responding or there was a problem with initialization of +the resources. .It ena%d: Cannot get attribute for ena device rc: %d .Pp Failed to get attributes of the device from the controller. @@ -141,11 +146,14 @@ Errors occurred when trying to configure AENQ groups. .It ena%d: could not allocate irq vector: %d .It ena%d: Unable to allocate bus resource: registers .Pp -Resource allocation failed when initializing the device; driver will not -be attached. +Resource allocation failed when initializing the device. +.br +Driver will not be attached. .It ena%d: ENA device init failed (err: %d) .Pp -Device initialization failed; driver will not be attached. +Device initialization failed. +.br +Driver will not be attached. .It ena%d: could not activate irq vector: %d .Pp Error occurred when trying to activate interrupt vectors for Admin Queue. @@ -157,13 +165,16 @@ Error occurred when trying to register Admin Queue int Error occurred during configuration of the Admin Queue interrupts. .It ena%d: Enable MSI-X failed .Pp -Configuration of the MSI-X for Admin Queue failed; there could be lack -of resources or interrupts could not have been configured; driver will -not be attached. +Configuration of the MSI-X for Admin Queue failed. +.br +There could be lack of resources or interrupts could not have been configured. +.br +Driver will not be attached. .It ena%d: VLAN is in use, detach first .Pp -VLANs are being used when trying to detach the driver; VLANs should be detached -first and then detach routine should be called again. +VLANs are being used when trying to detach the driver. +.br +VLANs must be detached first and then detach routine have to be called again. .It ena%d: Unmapped RX DMA tag associations .It ena%d: Unmapped TX DMA tag associations .Pp @@ -175,8 +186,9 @@ Error occurred when trying to destroy RX/TX DMA tag. .It ena%d: Cannot fill hash control .It ena%d: WARNING: RSS was not properly initialized, it will affect bandwidth .Pp -Error occurred during initialization of one of RSS resources; device is still -going to work but it will affect performance because all RX packets will be +Error occurred during initialization of one of RSS resources. +.br +The device will work with reduced performance because all RX packets will be passed to queue 0 and there will be no hash information. .It ena%d: failed to tear down irq: %d .It ena%d: dev has no parent while releasing res for irq: %d @@ -196,16 +208,20 @@ Requested MTU value is not supported and will not be s Device stopped responding and will be reset. .It ena%d: Found a Tx that wasn't completed on time, qid %d, index %d. .Pp -Packet was pushed to the NIC but not sent within given time limit; it may -be caused by hang of the IO queue. +Packet was pushed to the NIC but not sent within given time limit. +.br +It may be caused by hang of the IO queue. .It ena%d: The number of lost tx completion is aboce the threshold (%d > %d). Reset the device .Pp -If too many Tx wasn't completed on time the device is going to be reset; it may -be caused by hanged queue or device. +If too many Tx wasn't completed on time the device is going to be reset. +.br +It may be caused by hanged queue or device. .It ena%d: trigger reset is on .Pp -Device will be reset; reset is triggered either by watchdog or if too many TX -packets were not completed on time. +Device will be reset. +.br +Reset is triggered either by watchdog or if too many TX packets were not +completed on time. .It ena%d: invalid value recvd .Pp Link status received from the device in the AENQ handler is invalid. @@ -220,7 +236,9 @@ Link status received from the device in the AENQ handl .It ena%d: could not allocate irq vector: %d .It ena%d: failed to register interrupt handler for irq %ju: %d .Pp -IO resources initialization failed. Interface will not be brought up. +IO resources initialization failed. +.br +Interface will not be brought up. .It ena%d: LRO[%d] Initialization failed! .Pp Initialization of the LRO for the RX ring failed. @@ -228,20 +246,26 @@ Initialization of the LRO for the RX ring failed. .It ena%d: failed to add buffer for rx queue %d .It ena%d: refilled rx queue %d with %d pages only .Pp -Allocation of resources used on RX path failed; if happened during -initialization of the IO queue, the interface will not be brought up. +Allocation of resources used on RX path failed. +.br +If happened during initialization of the IO queue, the interface will not be +brought up. .It ena%d: ioctl promisc/allmulti .Pp -IOCTL request for the device to work in promiscuous/allmulti mode; see +IOCTL request for the device to work in promiscuous/allmulti mode. +.br +See .Xr ifconfig 8 for more details. .It ena%d: too many fragments. Last fragment: %d! .Pp Packet with unsupported number of segments was queued for sending to the -device; packet will be dropped. +device. +.br +Packet will be dropped. .Sh SUPPORT -If an issue is identified with the released source code with a supported adapter -email the specific information related to the issue to +If an issue is identified with the released source code with a supported +adapter, please email the specific information related to the issue to .Aq Mt mk@semihalf.com and .Aq Mt mw@semihalf.com . Modified: releng/11.4/sys/contrib/ena-com/ena_com.c ============================================================================== --- releng/11.4/sys/contrib/ena-com/ena_com.c Tue May 26 19:34:05 2020 (r361538) +++ releng/11.4/sys/contrib/ena-com/ena_com.c Tue May 26 22:41:12 2020 (r361539) @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. + * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,9 +32,6 @@ */ #include "ena_com.h" -#ifdef ENA_INTERNAL -#include "ena_gen_info.h" -#endif /*****************************************************************************/ /*****************************************************************************/ @@ -52,9 +49,6 @@ #define ENA_EXTENDED_STAT_GET_QUEUE(_funct_queue) (_funct_queue >> 16) #endif /* ENA_EXTENDED_STATS */ -#define MIN_ENA_VER (((ENA_COMMON_SPEC_VERSION_MAJOR) << \ - ENA_REGS_VERSION_MAJOR_VERSION_SHIFT) \ - | (ENA_COMMON_SPEC_VERSION_MINOR)) #define ENA_CTRL_MAJOR 0 #define ENA_CTRL_MINOR 0 @@ -76,6 +70,10 @@ #define ENA_REGS_ADMIN_INTR_MASK 1 +#define ENA_MIN_POLL_US 100 + +#define ENA_MAX_POLL_US 5000 + /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ @@ -103,7 +101,7 @@ struct ena_com_stats_ctx { struct ena_admin_acq_get_stats_resp get_resp; }; -static inline int ena_com_mem_addr_set(struct ena_com_dev *ena_dev, +static int ena_com_mem_addr_set(struct ena_com_dev *ena_dev, struct ena_common_mem_addr *ena_addr, dma_addr_t addr) { @@ -112,8 +110,8 @@ static inline int ena_com_mem_addr_set(struct ena_com_ return ENA_COM_INVAL; } - ena_addr->mem_addr_low = (u32)addr; - ena_addr->mem_addr_high = (u16)((u64)addr >> 32); + ena_addr->mem_addr_low = lower_32_bits(addr); + ena_addr->mem_addr_high = (u16)upper_32_bits(addr); return 0; } @@ -127,7 +125,7 @@ static int ena_com_admin_init_sq(struct ena_com_admin_ sq->mem_handle); if (!sq->entries) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } @@ -149,7 +147,7 @@ static int ena_com_admin_init_cq(struct ena_com_admin_ cq->mem_handle); if (!cq->entries) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } @@ -174,7 +172,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev aenq->mem_handle); if (!aenq->entries) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } @@ -204,7 +202,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev return 0; } -static inline void comp_ctxt_release(struct ena_com_admin_queue *queue, +static void comp_ctxt_release(struct ena_com_admin_queue *queue, struct ena_comp_ctx *comp_ctx) { comp_ctx->occupied = false; @@ -220,6 +218,11 @@ static struct ena_comp_ctx *get_comp_ctxt(struct ena_c return NULL; } + if (unlikely(!queue->comp_ctx)) { + ena_trc_err("Completion context is NULL\n"); + return NULL; + } + if (unlikely(queue->comp_ctx[command_id].occupied && capture)) { ena_trc_err("Completion context is occupied\n"); return NULL; @@ -249,7 +252,7 @@ static struct ena_comp_ctx *__ena_com_submit_admin_cmd tail_masked = admin_queue->sq.tail & queue_size_mask; /* In case of queue FULL */ - cnt = ATOMIC32_READ(&admin_queue->outstanding_cmds); + cnt = (u16)ATOMIC32_READ(&admin_queue->outstanding_cmds); if (cnt >= admin_queue->q_depth) { ena_trc_dbg("admin queue is full.\n"); admin_queue->stats.out_of_space++; @@ -293,7 +296,7 @@ static struct ena_comp_ctx *__ena_com_submit_admin_cmd return comp_ctx; } -static inline int ena_com_init_comp_ctxt(struct ena_com_admin_queue *queue) +static int ena_com_init_comp_ctxt(struct ena_com_admin_queue *queue) { size_t size = queue->q_depth * sizeof(struct ena_comp_ctx); struct ena_comp_ctx *comp_ctx; @@ -301,7 +304,7 @@ static inline int ena_com_init_comp_ctxt(struct ena_co queue->comp_ctx = ENA_MEM_ALLOC(queue->q_dmadev, size); if (unlikely(!queue->comp_ctx)) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } @@ -320,7 +323,7 @@ static struct ena_comp_ctx *ena_com_submit_admin_cmd(s struct ena_admin_acq_entry *comp, size_t comp_size_in_bytes) { - unsigned long flags; + unsigned long flags = 0; struct ena_comp_ctx *comp_ctx; ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags); @@ -332,7 +335,7 @@ static struct ena_comp_ctx *ena_com_submit_admin_cmd(s cmd_size_in_bytes, comp, comp_size_in_bytes); - if (unlikely(IS_ERR(comp_ctx))) + if (IS_ERR(comp_ctx)) admin_queue->running_state = false; ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags); @@ -348,6 +351,7 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_ memset(&io_sq->desc_addr, 0x0, sizeof(io_sq->desc_addr)); + io_sq->dma_addr_bits = (u8)ena_dev->dma_addr_bits; io_sq->desc_entry_size = (io_sq->direction == ENA_COM_IO_QUEUE_DIRECTION_TX) ? sizeof(struct ena_eth_io_tx_desc) : @@ -373,18 +377,21 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_ } if (!io_sq->desc_addr.virt_addr) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } } if (io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) { /* Allocate bounce buffers */ - io_sq->bounce_buf_ctrl.buffer_size = ena_dev->llq_info.desc_list_entry_size; - io_sq->bounce_buf_ctrl.buffers_num = ENA_COM_BOUNCE_BUFFER_CNTRL_CNT; + io_sq->bounce_buf_ctrl.buffer_size = + ena_dev->llq_info.desc_list_entry_size; + io_sq->bounce_buf_ctrl.buffers_num = + ENA_COM_BOUNCE_BUFFER_CNTRL_CNT; io_sq->bounce_buf_ctrl.next_to_use = 0; - size = io_sq->bounce_buf_ctrl.buffer_size * io_sq->bounce_buf_ctrl.buffers_num; + size = io_sq->bounce_buf_ctrl.buffer_size * + io_sq->bounce_buf_ctrl.buffers_num; ENA_MEM_ALLOC_NODE(ena_dev->dmadev, size, @@ -395,11 +402,12 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_ io_sq->bounce_buf_ctrl.base_buffer = ENA_MEM_ALLOC(ena_dev->dmadev, size); if (!io_sq->bounce_buf_ctrl.base_buffer) { - ena_trc_err("bounce buffer memory allocation failed"); + ena_trc_err("bounce buffer memory allocation failed\n"); return ENA_COM_NO_MEM; } - memcpy(&io_sq->llq_info, &ena_dev->llq_info, sizeof(io_sq->llq_info)); + memcpy(&io_sq->llq_info, &ena_dev->llq_info, + sizeof(io_sq->llq_info)); /* Initiate the first bounce buffer */ io_sq->llq_buf_ctrl.curr_bounce_buf = @@ -408,6 +416,12 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_ 0x0, io_sq->llq_info.desc_list_entry_size); io_sq->llq_buf_ctrl.descs_left_in_line = io_sq->llq_info.descs_num_before_header; + io_sq->disable_meta_caching = + io_sq->llq_info.disable_meta_caching; + + if (io_sq->llq_info.max_entries_in_tx_burst > 0) + io_sq->entries_in_tx_burst_left = + io_sq->llq_info.max_entries_in_tx_burst; } io_sq->tail = 0; @@ -451,7 +465,7 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_ } if (!io_cq->cdesc_addr.virt_addr) { - ena_trc_err("memory allocation failed"); + ena_trc_err("memory allocation failed\n"); return ENA_COM_NO_MEM; } @@ -500,12 +514,12 @@ static void ena_com_handle_admin_completion(struct ena cqe = &admin_queue->cq.entries[head_masked]; /* Go over all the completions */ - while ((cqe->acq_common_descriptor.flags & + while ((READ_ONCE8(cqe->acq_common_descriptor.flags) & ENA_ADMIN_ACQ_COMMON_DESC_PHASE_MASK) == phase) { /* Do not read the rest of the completion entry before the * phase bit was validated */ - rmb(); + dma_rmb(); ena_com_handle_single_admin_completion(admin_queue, cqe); head_masked++; @@ -529,12 +543,9 @@ static int ena_com_comp_status_to_errno(u8 comp_status if (unlikely(comp_status != 0)) ena_trc_err("admin command failed[%u]\n", comp_status); - if (unlikely(comp_status > ENA_ADMIN_UNKNOWN_ERROR)) - return ENA_COM_INVAL; - switch (comp_status) { case ENA_ADMIN_SUCCESS: - return 0; + return ENA_COM_OK; case ENA_ADMIN_RESOURCE_ALLOCATION_FAILURE: return ENA_COM_NO_MEM; case ENA_ADMIN_UNSUPPORTED_OPCODE: @@ -546,23 +557,32 @@ static int ena_com_comp_status_to_errno(u8 comp_status return ENA_COM_INVAL; } - return 0; + return ENA_COM_INVAL; } +static inline void ena_delay_exponential_backoff_us(u32 exp, u32 delay_us) +{ + delay_us = ENA_MAX32(ENA_MIN_POLL_US, delay_us); + delay_us = ENA_MIN32(delay_us * (1 << exp), ENA_MAX_POLL_US); + ENA_USLEEP(delay_us); +} + static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_ctx, struct ena_com_admin_queue *admin_queue) { - unsigned long flags, timeout; + unsigned long flags = 0; + ena_time_t timeout; int ret; + u32 exp = 0; timeout = ENA_GET_SYSTEM_TIMEOUT(admin_queue->completion_timeout); while (1) { - ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags); - ena_com_handle_admin_completion(admin_queue); - ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags); + ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags); + ena_com_handle_admin_completion(admin_queue); + ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags); - if (comp_ctx->status != ENA_CMD_SUBMITTED) + if (comp_ctx->status != ENA_CMD_SUBMITTED) break; if (ENA_TIME_EXPIRE(timeout)) { @@ -577,7 +597,7 @@ static int ena_com_wait_and_process_admin_cq_polling(s goto err; } - ENA_MSLEEP(100); + ena_delay_exponential_backoff_us(exp++, admin_queue->ena_dev->ena_min_poll_delay_us); } if (unlikely(comp_ctx->status == ENA_CMD_ABORTED)) { @@ -598,42 +618,121 @@ err: return ret; } +/** + * Set the LLQ configurations of the firmware + * + * The driver provides only the enabled feature values to the device, + * which in turn, checks if they are supported. + */ +static int ena_com_set_llq(struct ena_com_dev *ena_dev) +{ + struct ena_com_admin_queue *admin_queue; + struct ena_admin_set_feat_cmd cmd; + struct ena_admin_set_feat_resp resp; + struct ena_com_llq_info *llq_info = &ena_dev->llq_info; + int ret; + + memset(&cmd, 0x0, sizeof(cmd)); + admin_queue = &ena_dev->admin_queue; + + cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE; + cmd.feat_common.feature_id = ENA_ADMIN_LLQ; + + cmd.u.llq.header_location_ctrl_enabled = llq_info->header_location_ctrl; + cmd.u.llq.entry_size_ctrl_enabled = llq_info->desc_list_entry_size_ctrl; + cmd.u.llq.desc_num_before_header_enabled = llq_info->descs_num_before_header; + cmd.u.llq.descriptors_stride_ctrl_enabled = llq_info->desc_stride_ctrl; + + if (llq_info->disable_meta_caching) + cmd.u.llq.accel_mode.u.set.enabled_flags |= + BIT(ENA_ADMIN_DISABLE_META_CACHING); + + if (llq_info->max_entries_in_tx_burst) + cmd.u.llq.accel_mode.u.set.enabled_flags |= + BIT(ENA_ADMIN_LIMIT_TX_BURST); + + ret = ena_com_execute_admin_command(admin_queue, + (struct ena_admin_aq_entry *)&cmd, + sizeof(cmd), + (struct ena_admin_acq_entry *)&resp, + sizeof(resp)); + + if (unlikely(ret)) + ena_trc_err("Failed to set LLQ configurations: %d\n", ret); + + return ret; +} + static int ena_com_config_llq_info(struct ena_com_dev *ena_dev, - struct ena_admin_feature_llq_desc *llq_desc) + struct ena_admin_feature_llq_desc *llq_features, + struct ena_llq_configurations *llq_default_cfg) { struct ena_com_llq_info *llq_info = &ena_dev->llq_info; + u16 supported_feat; + int rc; memset(llq_info, 0, sizeof(*llq_info)); - switch (llq_desc->header_location_ctrl) { - case ENA_ADMIN_INLINE_HEADER: - llq_info->inline_header = true; - break; - case ENA_ADMIN_HEADER_RING: - llq_info->inline_header = false; - break; - default: - ena_trc_err("Invalid header location control\n"); + supported_feat = llq_features->header_location_ctrl_supported; + + if (likely(supported_feat & llq_default_cfg->llq_header_location)) { + llq_info->header_location_ctrl = + llq_default_cfg->llq_header_location; + } else { + ena_trc_err("Invalid header location control, supported: 0x%x\n", + supported_feat); return -EINVAL; } - switch (llq_desc->entry_size_ctrl) { - case ENA_ADMIN_LIST_ENTRY_SIZE_128B: - llq_info->desc_list_entry_size = 128; - break; - case ENA_ADMIN_LIST_ENTRY_SIZE_192B: - llq_info->desc_list_entry_size = 192; - break; - case ENA_ADMIN_LIST_ENTRY_SIZE_256B: - llq_info->desc_list_entry_size = 256; - break; - default: - ena_trc_err("Invalid entry_size_ctrl %d\n", - llq_desc->entry_size_ctrl); - return -EINVAL; + if (likely(llq_info->header_location_ctrl == ENA_ADMIN_INLINE_HEADER)) { + supported_feat = llq_features->descriptors_stride_ctrl_supported; + if (likely(supported_feat & llq_default_cfg->llq_stride_ctrl)) { + llq_info->desc_stride_ctrl = llq_default_cfg->llq_stride_ctrl; + } else { + if (supported_feat & ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY) { + llq_info->desc_stride_ctrl = ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY; + } else if (supported_feat & ENA_ADMIN_SINGLE_DESC_PER_ENTRY) { + llq_info->desc_stride_ctrl = ENA_ADMIN_SINGLE_DESC_PER_ENTRY; + } else { + ena_trc_err("Invalid desc_stride_ctrl, supported: 0x%x\n", + supported_feat); + return -EINVAL; + } + + ena_trc_err("Default llq stride ctrl is not supported, performing fallback, default: 0x%x, supported: 0x%x, used: 0x%x\n", + llq_default_cfg->llq_stride_ctrl, + supported_feat, + llq_info->desc_stride_ctrl); + } + } else { + llq_info->desc_stride_ctrl = 0; } - if ((llq_info->desc_list_entry_size & 0x7)) { + supported_feat = llq_features->entry_size_ctrl_supported; + if (likely(supported_feat & llq_default_cfg->llq_ring_entry_size)) { + llq_info->desc_list_entry_size_ctrl = llq_default_cfg->llq_ring_entry_size; + llq_info->desc_list_entry_size = llq_default_cfg->llq_ring_entry_size_value; + } else { + if (supported_feat & ENA_ADMIN_LIST_ENTRY_SIZE_128B) { + llq_info->desc_list_entry_size_ctrl = ENA_ADMIN_LIST_ENTRY_SIZE_128B; + llq_info->desc_list_entry_size = 128; + } else if (supported_feat & ENA_ADMIN_LIST_ENTRY_SIZE_192B) { + llq_info->desc_list_entry_size_ctrl = ENA_ADMIN_LIST_ENTRY_SIZE_192B; + llq_info->desc_list_entry_size = 192; + } else if (supported_feat & ENA_ADMIN_LIST_ENTRY_SIZE_256B) { + llq_info->desc_list_entry_size_ctrl = ENA_ADMIN_LIST_ENTRY_SIZE_256B; + llq_info->desc_list_entry_size = 256; + } else { + ena_trc_err("Invalid entry_size_ctrl, supported: 0x%x\n", supported_feat); + return -EINVAL; + } + + ena_trc_err("Default llq ring entry size is not supported, performing fallback, default: 0x%x, supported: 0x%x, used: 0x%x\n", + llq_default_cfg->llq_ring_entry_size, + supported_feat, + llq_info->desc_list_entry_size); + } + if (unlikely(llq_info->desc_list_entry_size & 0x7)) { /* The desc list entry size should be whole multiply of 8 * This requirement comes from __iowrite64_copy() */ @@ -642,35 +741,56 @@ static int ena_com_config_llq_info(struct ena_com_dev return -EINVAL; } - if (llq_info->inline_header) { - llq_info->desc_stride_ctrl = llq_desc->descriptors_stride_ctrl; - if ((llq_info->desc_stride_ctrl != ENA_ADMIN_SINGLE_DESC_PER_ENTRY) && - (llq_info->desc_stride_ctrl != ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY)) { - ena_trc_err("Invalid desc_stride_ctrl %d\n", - llq_info->desc_stride_ctrl); - return -EINVAL; - } - } else { - llq_info->desc_stride_ctrl = ENA_ADMIN_SINGLE_DESC_PER_ENTRY; - } - - if (llq_info->desc_stride_ctrl == ENA_ADMIN_SINGLE_DESC_PER_ENTRY) + if (llq_info->desc_stride_ctrl == ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY) llq_info->descs_per_entry = llq_info->desc_list_entry_size / sizeof(struct ena_eth_io_tx_desc); else llq_info->descs_per_entry = 1; - llq_info->descs_num_before_header = llq_desc->desc_num_before_header_ctrl; + supported_feat = llq_features->desc_num_before_header_supported; + if (likely(supported_feat & llq_default_cfg->llq_num_decs_before_header)) { + llq_info->descs_num_before_header = llq_default_cfg->llq_num_decs_before_header; + } else { + if (supported_feat & ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_2) { + llq_info->descs_num_before_header = ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_2; + } else if (supported_feat & ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_1) { + llq_info->descs_num_before_header = ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_1; + } else if (supported_feat & ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_4) { + llq_info->descs_num_before_header = ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_4; + } else if (supported_feat & ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_8) { + llq_info->descs_num_before_header = ENA_ADMIN_LLQ_NUM_DESCS_BEFORE_HEADER_8; + } else { + ena_trc_err("Invalid descs_num_before_header, supported: 0x%x\n", + supported_feat); + return -EINVAL; + } - return 0; -} + ena_trc_err("Default llq num descs before header is not supported, performing fallback, default: 0x%x, supported: 0x%x, used: 0x%x\n", + llq_default_cfg->llq_num_decs_before_header, + supported_feat, + llq_info->descs_num_before_header); + } + /* Check for accelerated queue supported */ + llq_info->disable_meta_caching = + llq_features->accel_mode.u.get.supported_flags & + BIT(ENA_ADMIN_DISABLE_META_CACHING); + if (llq_features->accel_mode.u.get.supported_flags & BIT(ENA_ADMIN_LIMIT_TX_BURST)) + llq_info->max_entries_in_tx_burst = + llq_features->accel_mode.u.get.max_tx_burst_size / + llq_default_cfg->llq_ring_entry_size_value; + rc = ena_com_set_llq(ena_dev); + if (rc) + ena_trc_err("Cannot set LLQ configuration: %d\n", rc); + return rc; +} + static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *comp_ctx, struct ena_com_admin_queue *admin_queue) { - unsigned long flags; + unsigned long flags = 0; int ret; ENA_WAIT_EVENT_WAIT(comp_ctx->wait_event, @@ -687,16 +807,25 @@ static int ena_com_wait_and_process_admin_cq_interrupt admin_queue->stats.no_completion++; ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags); - if (comp_ctx->status == ENA_CMD_COMPLETED) - ena_trc_err("The ena device have completion but the driver didn't receive any MSI-X interrupt (cmd %d)\n", - comp_ctx->cmd_opcode); - else - ena_trc_err("The ena device doesn't send any completion for the admin cmd %d status %d\n", + if (comp_ctx->status == ENA_CMD_COMPLETED) { + ena_trc_err("The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d), autopolling mode is %s\n", + comp_ctx->cmd_opcode, admin_queue->auto_polling ? "ON" : "OFF"); + /* Check if fallback to polling is enabled */ + if (admin_queue->auto_polling) + admin_queue->polling = true; + } else { + ena_trc_err("The ena device didn't send a completion for the admin cmd %d status %d\n", comp_ctx->cmd_opcode, comp_ctx->status); - - admin_queue->running_state = false; - ret = ENA_COM_TIMER_EXPIRED; - goto err; + } + /* Check if shifted to polling mode. + * This will happen if there is a completion without an interrupt + * and autopolling mode is enabled. Continuing normal execution in such case + */ + if (!admin_queue->polling) { + admin_queue->running_state = false; + ret = ENA_COM_TIMER_EXPIRED; + goto err; + } } ret = ena_com_comp_status_to_errno(comp_ctx->comp_status); @@ -715,7 +844,7 @@ static u32 ena_com_reg_bar_read32(struct ena_com_dev * volatile struct ena_admin_ena_mmio_req_read_less_resp *read_resp = mmio_read->read_resp; u32 mmio_read_reg, ret, i; - unsigned long flags; + unsigned long flags = 0; u32 timeout = mmio_read->reg_read_to; ENA_MIGHT_SLEEP(); @@ -736,15 +865,11 @@ static u32 ena_com_reg_bar_read32(struct ena_com_dev * mmio_read_reg |= mmio_read->seq_num & ENA_REGS_MMIO_REG_READ_REQ_ID_MASK; - /* make sure read_resp->req_id get updated before the hw can write - * there - */ - wmb(); + ENA_REG_WRITE32(ena_dev->bus, mmio_read_reg, + ena_dev->reg_bar + ENA_REGS_MMIO_REG_READ_OFF); - ENA_REG_WRITE32(ena_dev->bus, mmio_read_reg, ena_dev->reg_bar + ENA_REGS_MMIO_REG_READ_OFF); - for (i = 0; i < timeout; i++) { - if (read_resp->req_id == mmio_read->seq_num) + if (READ_ONCE16(read_resp->req_id) == mmio_read->seq_num) break; ENA_UDELAY(1); @@ -761,7 +886,7 @@ static u32 ena_com_reg_bar_read32(struct ena_com_dev * } if (read_resp->reg_off != offset) { - ena_trc_err("Read failure: wrong offset provided"); + ena_trc_err("Read failure: wrong offset provided\n"); ret = ENA_MMIO_READ_TIMEOUT; } else { ret = read_resp->reg_val; @@ -856,8 +981,9 @@ static void ena_com_io_queue_free(struct ena_com_dev * } if (io_sq->bounce_buf_ctrl.base_buffer) { - size = io_sq->llq_info.desc_list_entry_size * ENA_COM_BOUNCE_BUFFER_CNTRL_CNT; - ENA_MEM_FREE(ena_dev->dmadev, io_sq->bounce_buf_ctrl.base_buffer); + ENA_MEM_FREE(ena_dev->dmadev, + io_sq->bounce_buf_ctrl.base_buffer, + (io_sq->llq_info.desc_list_entry_size * ENA_COM_BOUNCE_BUFFER_CNTRL_CNT)); io_sq->bounce_buf_ctrl.base_buffer = NULL; } } @@ -865,9 +991,13 @@ static void ena_com_io_queue_free(struct ena_com_dev * static int wait_for_reset_state(struct ena_com_dev *ena_dev, u32 timeout, u16 exp_state) { - u32 val, i; + u32 val, exp = 0; + ena_time_t timeout_stamp; - for (i = 0; i < timeout; i++) { + /* Convert timeout from resolution of 100ms to us resolution. */ + timeout_stamp = ENA_GET_SYSTEM_TIMEOUT(100 * 1000 * timeout); + + while (1) { val = ena_com_reg_bar_read32(ena_dev, ENA_REGS_DEV_STS_OFF); if (unlikely(val == ENA_MMIO_READ_TIMEOUT)) { @@ -879,11 +1009,11 @@ static int wait_for_reset_state(struct ena_com_dev *en exp_state) return 0; - /* The resolution of the timeout is 100ms */ - ENA_MSLEEP(100); - } + if (ENA_TIME_EXPIRE(timeout_stamp)) + return ENA_COM_TIMER_EXPIRED; - return ENA_COM_TIMER_EXPIRED; + ena_delay_exponential_backoff_us(exp++, ena_dev->ena_min_poll_delay_us); + } } static bool ena_com_check_supported_feature_id(struct ena_com_dev *ena_dev, @@ -903,7 +1033,8 @@ static int ena_com_get_feature_ex(struct ena_com_dev * struct ena_admin_get_feat_resp *get_resp, enum ena_admin_aq_feature_id feature_id, dma_addr_t control_buf_dma_addr, - u32 control_buff_size) + u32 control_buff_size, + u8 feature_ver) { struct ena_com_admin_queue *admin_queue; struct ena_admin_get_feat_cmd get_cmd; @@ -934,7 +1065,7 @@ static int ena_com_get_feature_ex(struct ena_com_dev * } get_cmd.control_buffer.length = control_buff_size; - + get_cmd.feat_common.feature_version = feature_ver; get_cmd.feat_common.feature_id = feature_id; ret = ena_com_execute_admin_command(admin_queue, @@ -954,19 +1085,45 @@ static int ena_com_get_feature_ex(struct ena_com_dev * static int ena_com_get_feature(struct ena_com_dev *ena_dev, struct ena_admin_get_feat_resp *get_resp, - enum ena_admin_aq_feature_id feature_id) + enum ena_admin_aq_feature_id feature_id, + u8 feature_ver) { return ena_com_get_feature_ex(ena_dev, get_resp, feature_id, 0, - 0); + 0, + feature_ver); } +int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev) +{ + return ena_dev->rss.hash_func; +} + +static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev) +{ + struct ena_admin_feature_rss_flow_hash_control *hash_key = + (ena_dev->rss).hash_key; + + ENA_RSS_FILL_KEY(&hash_key->key, sizeof(hash_key->key)); + /* The key buffer is stored in the device in an array of + * uint32 elements. Therefore the number of elements can be derived + * by dividing the buffer length by the size of each array element. + * In current implementation each element is sized at uint32_t + * so it's actually a division by 4 but if the element size changes, + * there is no need to rewrite this code. + */ + hash_key->keys_num = sizeof(hash_key->key) / sizeof(hash_key->key[0]); +} + static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev) { struct ena_rss *rss = &ena_dev->rss; + if (!ena_com_check_supported_feature_id(ena_dev, ENA_ADMIN_RSS_HASH_FUNCTION)) + return ENA_COM_UNSUPPORTED; + ENA_MEM_ALLOC_COHERENT(ena_dev->dmadev, sizeof(*rss->hash_key), rss->hash_key, @@ -1030,7 +1187,7 @@ static int ena_com_indirect_table_allocate(struct ena_ int ret; ret = ena_com_get_feature(ena_dev, &get_resp, - ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG); + ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG, 0); if (unlikely(ret)) return ret; @@ -1094,7 +1251,9 @@ static void ena_com_indirect_table_destroy(struct ena_ rss->rss_ind_tbl = NULL; if (rss->host_rss_ind_tbl) - ENA_MEM_FREE(ena_dev->dmadev, rss->host_rss_ind_tbl); + ENA_MEM_FREE(ena_dev->dmadev, + rss->host_rss_ind_tbl, + ((1ULL << rss->tbl_log_size) * sizeof(u16))); rss->host_rss_ind_tbl = NULL; } @@ -1195,63 +1354,29 @@ static int ena_com_ind_tbl_convert_to_device(struct en return 0; } -static int ena_com_ind_tbl_convert_from_device(struct ena_com_dev *ena_dev) -{ - u16 dev_idx_to_host_tbl[ENA_TOTAL_NUM_QUEUES] = { (u16)-1 }; - struct ena_rss *rss = &ena_dev->rss; - u8 idx; - u16 i; - - for (i = 0; i < ENA_TOTAL_NUM_QUEUES; i++) - dev_idx_to_host_tbl[ena_dev->io_sq_queues[i].idx] = i; - - for (i = 0; i < 1 << rss->tbl_log_size; i++) { - if (rss->rss_ind_tbl[i].cq_idx > ENA_TOTAL_NUM_QUEUES) - return ENA_COM_INVAL; - idx = (u8)rss->rss_ind_tbl[i].cq_idx; - - if (dev_idx_to_host_tbl[idx] > ENA_TOTAL_NUM_QUEUES) - return ENA_COM_INVAL; - - rss->host_rss_ind_tbl[i] = dev_idx_to_host_tbl[idx]; - } - - return 0; -} - -static int ena_com_init_interrupt_moderation_table(struct ena_com_dev *ena_dev) -{ - size_t size; - - size = sizeof(struct ena_intr_moder_entry) * ENA_INTR_MAX_NUM_OF_LEVELS; - - ena_dev->intr_moder_tbl = ENA_MEM_ALLOC(ena_dev->dmadev, size); - if (!ena_dev->intr_moder_tbl) - return ENA_COM_NO_MEM; - - ena_com_config_default_interrupt_moderation_table(ena_dev); - - return 0; -} - static void ena_com_update_intr_delay_resolution(struct ena_com_dev *ena_dev, u16 intr_delay_resolution) { - struct ena_intr_moder_entry *intr_moder_tbl = ena_dev->intr_moder_tbl; - unsigned int i; + u16 prev_intr_delay_resolution = ena_dev->intr_delay_resolution; - if (!intr_delay_resolution) { + if (unlikely(!intr_delay_resolution)) { ena_trc_err("Illegal intr_delay_resolution provided. Going to use default 1 usec resolution\n"); - intr_delay_resolution = 1; + intr_delay_resolution = ENA_DEFAULT_INTR_DELAY_RESOLUTION; } - ena_dev->intr_delay_resolution = intr_delay_resolution; /* update Rx */ - for (i = 0; i < ENA_INTR_MAX_NUM_OF_LEVELS; i++) - intr_moder_tbl[i].intr_moder_interval /= intr_delay_resolution; + ena_dev->intr_moder_rx_interval = + ena_dev->intr_moder_rx_interval * + prev_intr_delay_resolution / + intr_delay_resolution; /* update Tx */ - ena_dev->intr_moder_tx_interval /= intr_delay_resolution; + ena_dev->intr_moder_tx_interval = + ena_dev->intr_moder_tx_interval * + prev_intr_delay_resolution / + intr_delay_resolution; + + ena_dev->intr_delay_resolution = intr_delay_resolution; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-releng@freebsd.org Wed May 27 16:34:48 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DAC933756A; Wed, 27 May 2020 16:34:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XGdM75jFz4gFC; Wed, 27 May 2020 16:34:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEC7E17E63; Wed, 27 May 2020 16:34:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04RGYlHS092449; Wed, 27 May 2020 16:34:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04RGYla3092448; Wed, 27 May 2020 16:34:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202005271634.04RGYla3092448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 May 2020 16:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361554 - releng/11.4/stand/common X-SVN-Group: releng X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: releng/11.4/stand/common X-SVN-Commit-Revision: 361554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 16:34:48 -0000 Author: kevans Date: Wed May 27 16:34:47 2020 New Revision: 361554 URL: https://svnweb.freebsd.org/changeset/base/361554 Log: MFS r361538: loader: fix userboot's ability to detect a guest's interpreter Some time after r338418, I believe with -Os/-Oz -ffunction-sections -fdata-sections, the bootprog_interp variable that held our "$Interpreter:" marker started getting strip from all loaders, with exception to userboot since it used bootprog_interp to determine what flavor of userboot it was. At some point, it had been brought to my attention that this was no longer working and I had worked up some potential solutions to use the variable that involved printing it out. My vague recollection is that this was rejected, and I forgot to explore the alternatives; I cannot find records of this discussion anymore. Fast forward to present day, Andrew reported that it was non-functional and offered (effectively) this patch (sans comment) to stop the compiler from optimizing it out by assigning it to a volatile variable. This removes concerns about user-facing change while retaining the interpreter marker. Furthermore, it could certainly be uglier. Note that this doesn't affect the stock build of 11.4's loaders, which do not have whatever set of optimizations leads to bootprog_interp getting removed; this is being merged as a low-risk change that will prevent accidents in case I've missed some non-default option combination that can lead to the same situation. Approved by: re (gjb) Modified: releng/11.4/stand/common/interp.c Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/stand/common/interp.c ============================================================================== --- releng/11.4/stand/common/interp.c Wed May 27 16:33:00 2020 (r361553) +++ releng/11.4/stand/common/interp.c Wed May 27 16:34:47 2020 (r361554) @@ -45,8 +45,17 @@ __FBSDID("$FreeBSD$"); void interact(void) { - static char input[256]; /* big enough? */ + static char input[256]; /* big enough? */ + const char * volatile interp_identifier; + /* + * Because interp_identifier is volatile, it cannot be optimized out by + * the compiler as it's considered an externally observable event. This + * prevents the compiler from optimizing out our carefully placed + * $Interpreter:4th string that userboot may use to determine that + * we need to switch interpreters. + */ + interp_identifier = bootprog_interp; interp_init(); printf("\n"); From owner-svn-src-releng@freebsd.org Wed May 27 22:34:47 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FD642F1DE6; Wed, 27 May 2020 22:34:47 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XQcl2Pg6z4Hs7; Wed, 27 May 2020 22:34:47 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DBFC1BEF5; Wed, 27 May 2020 22:34:47 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04RMYlFk016808; Wed, 27 May 2020 22:34:47 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04RMYkuZ016806; Wed, 27 May 2020 22:34:46 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202005272234.04RMYkuZ016806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 27 May 2020 22:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361565 - releng/11.4/sys/netinet X-SVN-Group: releng X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: releng/11.4/sys/netinet X-SVN-Commit-Revision: 361565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 22:34:47 -0000 Author: rscheff Date: Wed May 27 22:34:46 2020 New Revision: 361565 URL: https://svnweb.freebsd.org/changeset/base/361565 Log: MFS r361436: MFC r361347: With RFC3168 ECN, CWR SHOULD only be sent with new data. Overly conservative data receivers may ignore the CWR flag on other packets, and keep ECE latched. This can result in continuous reduction of the congestion window, and very poor performance when ECN is enabled. This does NOT contain the merge of the change to RACK since at this time that code does not exist in stable/11, and there is no plan to merge RACK to stable/11. PR: 243590 Reviewed by: rgrimes (mentor), rrs Approved by: re(gjb) Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D23364 Modified: releng/11.4/sys/netinet/tcp_input.c releng/11.4/sys/netinet/tcp_output.c Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/sys/netinet/tcp_input.c ============================================================================== --- releng/11.4/sys/netinet/tcp_input.c Wed May 27 21:56:45 2020 (r361564) +++ releng/11.4/sys/netinet/tcp_input.c Wed May 27 22:34:46 2020 (r361565) @@ -417,9 +417,15 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, ui } break; case CC_ECN: - if (!IN_CONGRECOVERY(tp->t_flags)) { + if (!IN_CONGRECOVERY(tp->t_flags) || + /* + * Allow ECN reaction on ACK to CWR, if + * that data segment was also CE marked. + */ + SEQ_GEQ(th->th_ack, tp->snd_recover)) { + EXIT_CONGRECOVERY(tp->t_flags); TCPSTAT_INC(tcps_ecn_rcwnd); - tp->snd_recover = tp->snd_max; + tp->snd_recover = tp->snd_max + 1; if (tp->t_flags & TF_ECN_PERMIT) tp->t_flags |= TF_ECN_SND_CWR; } Modified: releng/11.4/sys/netinet/tcp_output.c ============================================================================== --- releng/11.4/sys/netinet/tcp_output.c Wed May 27 21:56:45 2020 (r361564) +++ releng/11.4/sys/netinet/tcp_output.c Wed May 27 22:34:46 2020 (r361565) @@ -1161,7 +1161,8 @@ send: * Ignore pure ack packets, retransmissions and window probes. */ if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) && - !((tp->t_flags & TF_FORCEDATA) && len == 1)) { + !((tp->t_flags & TF_FORCEDATA) && len == 1 && + SEQ_LT(tp->snd_una, tp->snd_max))) { #ifdef INET6 if (isipv6) ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20); @@ -1169,15 +1170,15 @@ send: #endif ip->ip_tos |= IPTOS_ECN_ECT0; TCPSTAT_INC(tcps_ecn_ect0); + /* + * Reply with proper ECN notifications. + * Only set CWR on new data segments. + */ + if (tp->t_flags & TF_ECN_SND_CWR) { + flags |= TH_CWR; + tp->t_flags &= ~TF_ECN_SND_CWR; + } } - - /* - * Reply with proper ECN notifications. - */ - if (tp->t_flags & TF_ECN_SND_CWR) { - flags |= TH_CWR; - tp->t_flags &= ~TF_ECN_SND_CWR; - } if (tp->t_flags & TF_ECN_SND_ECE) flags |= TH_ECE; } From owner-svn-src-releng@freebsd.org Thu May 28 13:19:42 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CD482F21A8; Thu, 28 May 2020 13:19:42 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XpFn6fcHz4c45; Thu, 28 May 2020 13:19:41 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF9D826F1A; Thu, 28 May 2020 13:19:41 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04SDJf9k063850; Thu, 28 May 2020 13:19:41 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04SDJfbR063849; Thu, 28 May 2020 13:19:41 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202005281319.04SDJfbR063849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Thu, 28 May 2020 13:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361585 - releng/11.4/bin/ps X-SVN-Group: releng X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: releng/11.4/bin/ps X-SVN-Commit-Revision: 361585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 13:19:42 -0000 Author: pstef Date: Thu May 28 13:19:41 2020 New Revision: 361585 URL: https://svnweb.freebsd.org/changeset/base/361585 Log: MFS r361026 ps: extend the non-standard option -d (tree view) to work with -p Approved by: re (gjb) Modified: releng/11.4/bin/ps/ps.c Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/bin/ps/ps.c ============================================================================== --- releng/11.4/bin/ps/ps.c Thu May 28 09:52:28 2020 (r361584) +++ releng/11.4/bin/ps/ps.c Thu May 28 13:19:41 2020 (r361585) @@ -490,7 +490,7 @@ main(int argc, char *argv[]) what = KERN_PROC_PGRP | showthreads; flag = *pgrplist.l.pids; nselectors = 0; - } else if (pidlist.count == 1) { + } else if (pidlist.count == 1 && !descendancy) { what = KERN_PROC_PID | showthreads; flag = *pidlist.l.pids; nselectors = 0; @@ -528,6 +528,14 @@ main(int argc, char *argv[]) if ((kp == NULL && errno != ESRCH) || (kp != NULL && nentries < 0)) xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; + if (descendancy) + for (elem = 0; elem < pidlist.count; elem++) + for (i = 0; i < nentries; i++) + if (kp[i].ki_ppid == pidlist.l.pids[elem]) { + if (pidlist.count >= pidlist.maxcount) + expand_list(&pidlist); + pidlist.l.pids[pidlist.count++] = kp[i].ki_pid; + } if (nentries > 0) { if ((kinfo = malloc(nentries * sizeof(*kinfo))) == NULL) xo_errx(1, "malloc failed"); From owner-svn-src-releng@freebsd.org Thu May 28 16:34:55 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56E112F6A64; Thu, 28 May 2020 16:34:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Xtb31Mmwz4vNm; Thu, 28 May 2020 16:34:55 +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 25CF5981A; Thu, 28 May 2020 16:34:55 +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 04SGYs0t087401; Thu, 28 May 2020 16:34:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04SGYrs9087395; Thu, 28 May 2020 16:34:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202005281634.04SGYrs9087395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 May 2020 16:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361588 - in releng/11.4/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Group: releng X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in releng/11.4/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Commit-Revision: 361588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 16:34:55 -0000 Author: kib Date: Thu May 28 16:34:53 2020 New Revision: 361588 URL: https://svnweb.freebsd.org/changeset/base/361588 Log: MFC r361299, r361302: MFstable/11 r361558, r361302: Do not consider CAP_RDCL_NO as an indicator for all MDS vulnerabilities handled by hardware. amd64: Add a knob to flush RSB on context switches if machine has SMEP. Approved by: re (gjb) Modified: releng/11.4/sys/amd64/amd64/cpu_switch.S releng/11.4/sys/amd64/amd64/initcpu.c releng/11.4/sys/amd64/amd64/support.S releng/11.4/sys/i386/i386/support.s releng/11.4/sys/x86/include/x86_var.h releng/11.4/sys/x86/x86/cpu_machdep.c Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/sys/amd64/amd64/cpu_switch.S ============================================================================== --- releng/11.4/sys/amd64/amd64/cpu_switch.S Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/amd64/amd64/cpu_switch.S Thu May 28 16:34:53 2020 (r361588) @@ -235,6 +235,8 @@ done_load_dr: movq %rax,(%rsp) movq PCPU(CURTHREAD),%rdi call fpu_activate_sw + cmpb $0,cpu_flush_rsb_ctxsw(%rip) + jne rsb_flush ret /* Modified: releng/11.4/sys/amd64/amd64/initcpu.c ============================================================================== --- releng/11.4/sys/amd64/amd64/initcpu.c Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/amd64/amd64/initcpu.c Thu May 28 16:34:53 2020 (r361588) @@ -232,13 +232,27 @@ initializecpu(void) cr4 |= CR4_FSGSBASE; /* + * If SMEP is present, we only need to flush RSB (by default) + * on context switches, to prevent cross-process ret2spec + * attacks. Do it automatically if ibrs_disable is set, to + * complete the mitigation. + * * Postpone enabling the SMEP on the boot CPU until the page * tables are switched from the boot loader identity mapping * to the kernel tables. The boot loader enables the U bit in * its tables. */ - if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) - cr4 |= CR4_SMEP; + if (IS_BSP()) { + if (cpu_stdext_feature & CPUID_STDEXT_SMEP && + !TUNABLE_INT_FETCH( + "machdep.mitigations.cpu_flush_rsb_ctxsw", + &cpu_flush_rsb_ctxsw) && + hw_ibrs_disable) + cpu_flush_rsb_ctxsw = 1; + } else { + if (cpu_stdext_feature & CPUID_STDEXT_SMEP) + cr4 |= CR4_SMEP; + } load_cr4(cr4); if ((amd_feature & AMDID_NX) != 0) { msr = rdmsr(MSR_EFER) | EFER_NXE; Modified: releng/11.4/sys/amd64/amd64/support.S ============================================================================== --- releng/11.4/sys/amd64/amd64/support.S Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/amd64/amd64/support.S Thu May 28 16:34:53 2020 (r361588) @@ -832,23 +832,27 @@ ENTRY(pmap_pti_pcid_invlrng) retq .altmacro - .macro ibrs_seq_label l -handle_ibrs_\l: + .macro rsb_seq_label l +rsb_seq_\l: .endm - .macro ibrs_call_label l - call handle_ibrs_\l + .macro rsb_call_label l + call rsb_seq_\l .endm - .macro ibrs_seq count + .macro rsb_seq count ll=1 .rept \count - ibrs_call_label %(ll) + rsb_call_label %(ll) nop - ibrs_seq_label %(ll) + rsb_seq_label %(ll) addq $8,%rsp ll=ll+1 .endr .endm +ENTRY(rsb_flush) + rsb_seq 32 + ret + /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) cmpb $0,hw_ibrs_ibpb_active(%rip) @@ -860,8 +864,7 @@ ENTRY(handle_ibrs_entry) wrmsr movb $1,PCPU(IBPB_SET) testl $CPUID_STDEXT_SMEP,cpu_stdext_feature(%rip) - jne 1f - ibrs_seq 32 + je rsb_flush 1: ret END(handle_ibrs_entry) Modified: releng/11.4/sys/i386/i386/support.s ============================================================================== --- releng/11.4/sys/i386/i386/support.s Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/i386/i386/support.s Thu May 28 16:34:53 2020 (r361588) @@ -819,8 +819,30 @@ msr_onfault: movl $EFAULT,%eax ret -ENTRY(handle_ibrs_entry) + .altmacro + .macro rsb_seq_label l +rsb_seq_\l: + .endm + .macro rsb_call_label l + call rsb_seq_\l + .endm + .macro rsb_seq count + ll=1 + .rept \count + rsb_call_label %(ll) + nop + rsb_seq_label %(ll) + addl $4,%esp + ll=ll+1 + .endr + .endm + +ENTRY(rsb_flush) + rsb_seq 32 ret + +ENTRY(handle_ibrs_entry) + jmp rsb_flush END(handle_ibrs_entry) ENTRY(handle_ibrs_exit) Modified: releng/11.4/sys/x86/include/x86_var.h ============================================================================== --- releng/11.4/sys/x86/include/x86_var.h Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/x86/include/x86_var.h Thu May 28 16:34:53 2020 (r361588) @@ -86,6 +86,7 @@ extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; +extern int cpu_flush_rsb_ctxsw; struct pcb; struct thread; Modified: releng/11.4/sys/x86/x86/cpu_machdep.c ============================================================================== --- releng/11.4/sys/x86/x86/cpu_machdep.c Thu May 28 14:56:11 2020 (r361587) +++ releng/11.4/sys/x86/x86/cpu_machdep.c Thu May 28 16:34:53 2020 (r361588) @@ -1049,11 +1049,11 @@ hw_mds_recalculate(void) * reported. For instance, hypervisor might unknowingly * filter the cap out. * For the similar reasons, and for testing, allow to enable - * mitigation even for RDCL_NO or MDS_NO caps. + * mitigation even when MDS_NO cap is set. */ if (cpu_vendor_id != CPU_VENDOR_INTEL || hw_mds_disable == 0 || - ((cpu_ia32_arch_caps & (IA32_ARCH_CAP_RDCL_NO | - IA32_ARCH_CAP_MDS_NO)) != 0 && hw_mds_disable == 3)) { + ((cpu_ia32_arch_caps & IA32_ARCH_CAP_MDS_NO) != 0 && + hw_mds_disable == 3)) { mds_handler = mds_handler_void; } else if (((cpu_stdext_feature3 & CPUID_STDEXT3_MD_CLEAR) != 0 && hw_mds_disable == 3) || hw_mds_disable == 1) { @@ -1360,3 +1360,7 @@ SYSCTL_PROC(_machdep_mitigations_taa, OID_AUTO, state, sysctl_taa_state_handler, "A", "TAA Mitigation state"); +int __read_frequently cpu_flush_rsb_ctxsw; +SYSCTL_INT(_machdep_mitigations, OID_AUTO, flush_rsb_ctxsw, + CTLFLAG_RW | CTLFLAG_NOFETCH, &cpu_flush_rsb_ctxsw, 0, + "Flush Return Stack Buffer on context switch"); From owner-svn-src-releng@freebsd.org Thu May 28 19:14:45 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 986E12FB21F; Thu, 28 May 2020 19:14:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Xy7S5M4Rz40Ds; Thu, 28 May 2020 19:14:44 +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 76735B05C; Thu, 28 May 2020 19:14:44 +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 04SJEikx088424; Thu, 28 May 2020 19:14:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04SJEiR4088423; Thu, 28 May 2020 19:14:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202005281914.04SJEiR4088423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 28 May 2020 19:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361594 - releng/11.4/release/tools X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.4/release/tools X-SVN-Commit-Revision: 361594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 19:14:47 -0000 Author: gjb Date: Thu May 28 19:14:44 2020 New Revision: 361594 URL: https://svnweb.freebsd.org/changeset/base/361594 Log: MFS11 r361592: MFH r361591: Include the shells/bash port on Vagrant images, which prevents a shell issue during startup. PR: 245051 Approved by: re (kib, insta-MFC for inclusion in RC2) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: releng/11.4/release/tools/vagrant.conf Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/release/tools/vagrant.conf ============================================================================== --- releng/11.4/release/tools/vagrant.conf Thu May 28 18:57:55 2020 (r361593) +++ releng/11.4/release/tools/vagrant.conf Thu May 28 19:14:44 2020 (r361594) @@ -8,7 +8,7 @@ export VMSIZE=8G # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap. -export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs" +export VM_EXTRA_PACKAGES="shells/bash firstboot-freebsd-update firstboot-pkgs" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs growfs" From owner-svn-src-releng@freebsd.org Fri May 29 00:01:48 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36C1A329366; Fri, 29 May 2020 00:01:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Y4Vh0k8Vz4QbT; Fri, 29 May 2020 00:01:48 +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 14191EB4B; Fri, 29 May 2020 00:01:48 +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 04T01l4l065591; Fri, 29 May 2020 00:01:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04T01lss065590; Fri, 29 May 2020 00:01:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202005290001.04T01lss065590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 29 May 2020 00:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361611 - releng/11.4/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.4/sys/conf X-SVN-Commit-Revision: 361611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 00:01:48 -0000 Author: gjb Date: Fri May 29 00:01:47 2020 New Revision: 361611 URL: https://svnweb.freebsd.org/changeset/base/361611 Log: Update releng/11.4 to RC2 as part of the 11.4-RELEASE cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: releng/11.4/sys/conf/newvers.sh Modified: releng/11.4/sys/conf/newvers.sh ============================================================================== --- releng/11.4/sys/conf/newvers.sh Thu May 28 23:57:50 2020 (r361610) +++ releng/11.4/sys/conf/newvers.sh Fri May 29 00:01:47 2020 (r361611) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.4" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-releng@freebsd.org Fri May 29 18:05:40 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA2B733E0EA; Fri, 29 May 2020 18:05:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YXYJ51dbz49NC; Fri, 29 May 2020 18:05: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 A375F1BE04; Fri, 29 May 2020 18:05: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 04TI5ecG048075; Fri, 29 May 2020 18:05:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04TI5erd048074; Fri, 29 May 2020 18:05:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202005291805.04TI5erd048074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 29 May 2020 18:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361631 - releng/11.4/release/pkg_repos X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.4/release/pkg_repos X-SVN-Commit-Revision: 361631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 18:05:40 -0000 Author: gjb Date: Fri May 29 18:05:40 2020 New Revision: 361631 URL: https://svnweb.freebsd.org/changeset/base/361631 Log: Update the pkg.conf used to populate the dvd1.iso to use the release_4 package set from this point forward. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: releng/11.4/release/pkg_repos/release-dvd.conf Modified: releng/11.4/release/pkg_repos/release-dvd.conf ============================================================================== --- releng/11.4/release/pkg_repos/release-dvd.conf Fri May 29 17:52:20 2020 (r361630) +++ releng/11.4/release/pkg_repos/release-dvd.conf Fri May 29 18:05:40 2020 (r361631) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_4", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From owner-svn-src-releng@freebsd.org Sat May 30 18:01:54 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0617D2F13C9; Sat, 30 May 2020 18:01:54 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Z8QT6TJjz4N7R; Sat, 30 May 2020 18:01:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D99F6CF47; Sat, 30 May 2020 18:01:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04UI1rdn048712; Sat, 30 May 2020 18:01:53 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04UI1rBt048711; Sat, 30 May 2020 18:01:53 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202005301801.04UI1rBt048711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 30 May 2020 18:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r361653 - releng/11.4/release/tools X-SVN-Group: releng X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: releng/11.4/release/tools X-SVN-Commit-Revision: 361653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 18:01:54 -0000 Author: cperciva Date: Sat May 30 18:01:53 2020 New Revision: 361653 URL: https://svnweb.freebsd.org/changeset/base/361653 Log: Insta-merge r361652 from stable/11: Expand EC2 AMI UFS partition to 2.9 GB. Approved by: re (gjb) Sponsored by: https://www.patreon.com/cperciva Modified: releng/11.4/release/tools/ec2.conf Directory Properties: releng/11.4/ (props changed) Modified: releng/11.4/release/tools/ec2.conf ============================================================================== --- releng/11.4/release/tools/ec2.conf Sat May 30 17:43:10 2020 (r361652) +++ releng/11.4/release/tools/ec2.conf Sat May 30 18:01:53 2020 (r361653) @@ -19,12 +19,12 @@ fi # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" -# Build with a 2 GB UFS partition; the growfs rc.d script will expand +# Build with a 2.9 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. # Note that if this is set to G, we will end up with an GB disk # image since VMSIZE is the size of the UFS partition, not the disk which # it resides within. -export VMSIZE=2048M +export VMSIZE=2970M # No swap space; the ec2_ephemeralswap rc.d script will allocate swap # space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances