From owner-svn-src-head@freebsd.org Sun Jun 21 00:06:04 2020 Return-Path: Delivered-To: svn-src-head@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 E6C58338E00; Sun, 21 Jun 2020 00:06:04 +0000 (UTC) (envelope-from rmacklem@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 49qCW05mHXz46mQ; Sun, 21 Jun 2020 00:06:04 +0000 (UTC) (envelope-from rmacklem@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 C0ED21498F; Sun, 21 Jun 2020 00:06:04 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L064Eu064098; Sun, 21 Jun 2020 00:06:04 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L064Cf064097; Sun, 21 Jun 2020 00:06:04 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006210006.05L064Cf064097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 21 Jun 2020 00:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362455 - head/sys/rpc X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/rpc X-SVN-Commit-Revision: 362455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 00:06:05 -0000 Author: rmacklem Date: Sun Jun 21 00:06:04 2020 New Revision: 362455 URL: https://svnweb.freebsd.org/changeset/base/362455 Log: Modify the way the client side krpc does soreceive() for TCP. Without this patch, clnt_vc_soupcall() first does a soreceive() for 4 bytes (the Sun RPC over TCP record mark) and then soreceive(s) for the RPC message. This first soreceive() almost always results in an mbuf allocation, since having the 4byte record mark in a separate mbuf in the socket rcv queue is unlikely. This is somewhat inefficient and rather odd. It also will not work for the ktls rx, since the latter returns a TLS record for each soreceive(). This patch replaces the above with code similar to what the server side of the krpc does for TCP, where it does a soreceive() for as much data as possible and then parses RPC messages out of the received data. A new field of the TCP socket structure called ct_raw is the list of received mbufs that the RPC message(s) are parsed from. I think this results in cleaner code and is needed for support of nfs-over-tls. It also fixes the code for the case where a server sends an RPC message in multiple RPC message fragments. Although this is allowed by RFC5531, no extant NFS server does this. However, it is probably good to fix this in case some future NFS server does do this. Modified: head/sys/rpc/clnt_vc.c head/sys/rpc/krpc.h Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Sat Jun 20 23:48:57 2020 (r362454) +++ head/sys/rpc/clnt_vc.c Sun Jun 21 00:06:04 2020 (r362455) @@ -269,6 +269,7 @@ clnt_vc_create( soupcall_set(ct->ct_socket, SO_RCV, clnt_vc_soupcall, ct); SOCKBUF_UNLOCK(&ct->ct_socket->so_rcv); + ct->ct_raw = NULL; ct->ct_record = NULL; ct->ct_record_resid = 0; TAILQ_INIT(&ct->ct_pending); @@ -826,6 +827,8 @@ clnt_vc_destroy(CLIENT *cl) soshutdown(so, SHUT_WR); soclose(so); } + m_freem(ct->ct_record); + m_freem(ct->ct_raw); mem_free(ct, sizeof(struct ct_data)); if (cl->cl_netid && cl->cl_netid[0]) mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); @@ -854,122 +857,118 @@ clnt_vc_soupcall(struct socket *so, void *arg, int wai struct ct_request *cr; int error, rcvflag, foundreq; uint32_t xid_plus_direction[2], header; - bool_t do_read; SVCXPRT *xprt; struct cf_conn *cd; + u_int rawlen; - CTASSERT(sizeof(xid_plus_direction) == 2 * sizeof(uint32_t)); + /* + * If another thread is already here, it must be in + * soreceive(), so just return to avoid races with it. + * ct_upcallrefs is protected by the SOCKBUF_LOCK(), + * which is held in this function, except when + * soreceive() is called. + */ + if (ct->ct_upcallrefs > 0) + return (SU_OK); ct->ct_upcallrefs++; - uio.uio_td = curthread; - do { - /* - * If ct_record_resid is zero, we are waiting for a - * record mark. - */ - if (ct->ct_record_resid == 0) { + /* + * Read as much as possible off the socket and link it + * onto ct_raw. + */ + for (;;) { + uio.uio_resid = 1000000000; + uio.uio_td = curthread; + m2 = m = NULL; + rcvflag = MSG_DONTWAIT | MSG_SOCALLBCK; + SOCKBUF_UNLOCK(&so->so_rcv); + error = soreceive(so, NULL, &uio, &m, NULL, &rcvflag); + SOCKBUF_LOCK(&so->so_rcv); + + if (error == EWOULDBLOCK) { /* - * Make sure there is either a whole record - * mark in the buffer or there is some other - * error condition + * We must re-test for readability after + * taking the lock to protect us in the case + * where a new packet arrives on the socket + * after our call to soreceive fails with + * EWOULDBLOCK. */ - do_read = FALSE; - if (sbavail(&so->so_rcv) >= sizeof(uint32_t) - || (so->so_rcv.sb_state & SBS_CANTRCVMORE) - || so->so_error) - do_read = TRUE; - - if (!do_read) + error = 0; + if (!soreadable(so)) break; + continue; + } + if (error == 0 && m == NULL) { + /* + * We must have got EOF trying + * to read from the stream. + */ + error = ECONNRESET; + } + if (error != 0) + break; - SOCKBUF_UNLOCK(&so->so_rcv); - uio.uio_resid = sizeof(uint32_t); - m = NULL; - rcvflag = MSG_DONTWAIT | MSG_SOCALLBCK; - error = soreceive(so, NULL, &uio, &m, NULL, &rcvflag); - SOCKBUF_LOCK(&so->so_rcv); + if (ct->ct_raw != NULL) + m_last(ct->ct_raw)->m_next = m; + else + ct->ct_raw = m; + } + rawlen = m_length(ct->ct_raw, NULL); - if (error == EWOULDBLOCK) + /* Now, process as much of ct_raw as possible. */ + for (;;) { + /* + * If ct_record_resid is zero, we are waiting for a + * record mark. + */ + if (ct->ct_record_resid == 0) { + if (rawlen < sizeof(uint32_t)) break; - - /* - * If there was an error, wake up all pending - * requests. - */ - if (error || uio.uio_resid > 0) { - wakeup_all: - mtx_lock(&ct->ct_lock); - if (!error) { - /* - * We must have got EOF trying - * to read from the stream. - */ - error = ECONNRESET; - } - ct->ct_error.re_status = RPC_CANTRECV; - ct->ct_error.re_errno = error; - TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) { - cr->cr_error = error; - wakeup(cr); - } - mtx_unlock(&ct->ct_lock); - break; - } - m_copydata(m, 0, sizeof(uint32_t), (char *)&header); + m_copydata(ct->ct_raw, 0, sizeof(uint32_t), + (char *)&header); header = ntohl(header); - ct->ct_record = NULL; ct->ct_record_resid = header & 0x7fffffff; ct->ct_record_eor = ((header & 0x80000000) != 0); - m_freem(m); + m_adj(ct->ct_raw, sizeof(uint32_t)); + rawlen -= sizeof(uint32_t); } else { /* - * Wait until the socket has the whole record - * buffered. + * Move as much of the record as possible to + * ct_record. */ - do_read = FALSE; - if (sbavail(&so->so_rcv) >= ct->ct_record_resid - || (so->so_rcv.sb_state & SBS_CANTRCVMORE) - || so->so_error) - do_read = TRUE; - - if (!do_read) + if (rawlen == 0) break; - - /* - * We have the record mark. Read as much as - * the socket has buffered up to the end of - * this record. - */ - SOCKBUF_UNLOCK(&so->so_rcv); - uio.uio_resid = ct->ct_record_resid; - m = NULL; - rcvflag = MSG_DONTWAIT | MSG_SOCALLBCK; - error = soreceive(so, NULL, &uio, &m, NULL, &rcvflag); - SOCKBUF_LOCK(&so->so_rcv); - - if (error == EWOULDBLOCK) + if (rawlen <= ct->ct_record_resid) { + if (ct->ct_record != NULL) + m_last(ct->ct_record)->m_next = + ct->ct_raw; + else + ct->ct_record = ct->ct_raw; + ct->ct_raw = NULL; + ct->ct_record_resid -= rawlen; + rawlen = 0; + } else { + m = m_split(ct->ct_raw, ct->ct_record_resid, + M_NOWAIT); + if (m == NULL) + break; + if (ct->ct_record != NULL) + m_last(ct->ct_record)->m_next = + ct->ct_raw; + else + ct->ct_record = ct->ct_raw; + rawlen -= ct->ct_record_resid; + ct->ct_record_resid = 0; + ct->ct_raw = m; + } + if (ct->ct_record_resid > 0) break; - if (error || uio.uio_resid == ct->ct_record_resid) - goto wakeup_all; - /* - * If we have part of the record already, - * chain this bit onto the end. - */ - if (ct->ct_record) - m_last(ct->ct_record)->m_next = m; - else - ct->ct_record = m; - - ct->ct_record_resid = uio.uio_resid; - - /* * If we have the entire record, see if we can * match it to a request. */ - if (ct->ct_record_resid == 0 - && ct->ct_record_eor) { + if (ct->ct_record_eor) { /* * The XID is in the first uint32_t of * the reply and the message direction @@ -979,8 +978,20 @@ clnt_vc_soupcall(struct socket *so, void *arg, int wai sizeof(xid_plus_direction) && m_length(ct->ct_record, NULL) < sizeof(xid_plus_direction)) { - m_freem(ct->ct_record); - break; + /* + * What to do now? + * The data in the TCP stream is + * corrupted such that there is no + * valid RPC message to parse. + * I think it best to close this + * connection and allow + * clnt_reconnect_XXX() to try + * and establish a new one. + */ + printf("clnt_vc_soupcall: " + "connection data corrupted\n"); + error = ECONNRESET; + goto wakeup_all; } m_copydata(ct->ct_record, 0, sizeof(xid_plus_direction), @@ -1057,7 +1068,26 @@ clnt_vc_soupcall(struct socket *so, void *arg, int wai } } } - } while (m); + } + + if (error != 0) { + wakeup_all: + /* + * This socket is broken, so mark that it cannot + * receive and fail all RPCs waiting for a reply + * on it, so that they will be retried on a new + * TCP connection created by clnt_reconnect_X(). + */ + mtx_lock(&ct->ct_lock); + ct->ct_error.re_status = RPC_CANTRECV; + ct->ct_error.re_errno = error; + TAILQ_FOREACH(cr, &ct->ct_pending, cr_link) { + cr->cr_error = error; + wakeup(cr); + } + mtx_unlock(&ct->ct_lock); + } + ct->ct_upcallrefs--; if (ct->ct_upcallrefs < 0) panic("rpcvc upcall refcnt"); Modified: head/sys/rpc/krpc.h ============================================================================== --- head/sys/rpc/krpc.h Sat Jun 20 23:48:57 2020 (r362454) +++ head/sys/rpc/krpc.h Sun Jun 21 00:06:04 2020 (r362455) @@ -101,6 +101,7 @@ struct ct_data { struct ct_request_list ct_pending; int ct_upcallrefs; /* Ref cnt of upcalls in prog. */ SVCXPRT *ct_backchannelxprt; /* xprt for backchannel */ + struct mbuf *ct_raw; /* Raw mbufs recv'd */ }; struct cf_conn { /* kept in xprt->xp_p1 for actual connection */ From owner-svn-src-head@freebsd.org Sun Jun 21 02:49:57 2020 Return-Path: Delivered-To: svn-src-head@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 803A933DBB7; Sun, 21 Jun 2020 02:49:57 +0000 (UTC) (envelope-from rmacklem@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 49qH852mZHz4GN1; Sun, 21 Jun 2020 02:49:57 +0000 (UTC) (envelope-from rmacklem@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 5A51A16933; Sun, 21 Jun 2020 02:49:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L2nvj7061436; Sun, 21 Jun 2020 02:49:57 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L2nvt9061435; Sun, 21 Jun 2020 02:49:57 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006210249.05L2nvt9061435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 21 Jun 2020 02:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362457 - head/sys/rpc X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/rpc X-SVN-Commit-Revision: 362457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 02:49:57 -0000 Author: rmacklem Date: Sun Jun 21 02:49:56 2020 New Revision: 362457 URL: https://svnweb.freebsd.org/changeset/base/362457 Log: Fix up a comment added by r362455. Modified: head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Sun Jun 21 02:47:37 2020 (r362456) +++ head/sys/rpc/clnt_vc.c Sun Jun 21 02:49:56 2020 (r362457) @@ -985,7 +985,7 @@ clnt_vc_soupcall(struct socket *so, void *arg, int wai * valid RPC message to parse. * I think it best to close this * connection and allow - * clnt_reconnect_XXX() to try + * clnt_reconnect_call() to try * and establish a new one. */ printf("clnt_vc_soupcall: " From owner-svn-src-head@freebsd.org Sun Jun 21 03:39:29 2020 Return-Path: Delivered-To: svn-src-head@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 221FB33FF2B; Sun, 21 Jun 2020 03:39:29 +0000 (UTC) (envelope-from bdragon@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 49qJFF0TtFz4KVg; Sun, 21 Jun 2020 03:39:29 +0000 (UTC) (envelope-from bdragon@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 0BE9416FFF; Sun, 21 Jun 2020 03:39:29 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L3dT4f093187; Sun, 21 Jun 2020 03:39:29 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L3dRir093178; Sun, 21 Jun 2020 03:39:27 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202006210339.05L3dRir093178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Sun, 21 Jun 2020 03:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362458 - in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb dev/ksyms i386/i386 kern mips/mips powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb dev/ksyms i386/i386 kern mips/mips powerpc/powerpc X-SVN-Commit-Revision: 362458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 03:39:29 -0000 Author: bdragon Date: Sun Jun 21 03:39:26 2020 New Revision: 362458 URL: https://svnweb.freebsd.org/changeset/base/362458 Log: [PowerPC] More relocation fixes It turns out relocating the symbol table itself can cause issues, like fbt crashing because it applies the offsets to the kernel twice. This had been previously brought up in rS333447 when the stoffs hack was added, but I had been unaware of this and reimplemented symtab relocation. Instead of relocating the symbol table, keep track of the relocation base in ddb, so the ddb symbols behave like the kernel linker-provided symbols. This is intended to be NFC on platforms other than PowerPC, which do not use fully relocatable kernels. (The relbase will always be 0) * Remove the rest of the stoffs hack. * Remove my half-baked displace_symbol_table() function. * Extend ddb initialization to cope with having a relocation offset on the kernel symbol table. * Fix my kernel-as-initrd hack to work with booke64 by using a temporary mapping to access the data. * Fix another instance of __powerpc__ that is actually RELOCATABLE_KERNEL. * Change the behavior or X_db_symbol_values to apply the relocation base when updating valp, to match link_elf_symbol_values() behavior. Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D25223 Modified: head/sys/amd64/amd64/machdep.c head/sys/arm/arm/machdep_boot.c head/sys/arm64/arm64/machdep_boot.c head/sys/ddb/db_main.c head/sys/ddb/ddb.h head/sys/dev/ksyms/ksyms.c head/sys/i386/i386/machdep.c head/sys/kern/link_elf.c head/sys/mips/mips/machdep.c head/sys/powerpc/powerpc/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/amd64/amd64/machdep.c Sun Jun 21 03:39:26 2020 (r362458) @@ -1508,7 +1508,7 @@ native_parse_preload_data(u_int64_t modulep) #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); - db_fetch_ksymtab(ksym_start, ksym_end); + db_fetch_ksymtab(ksym_start, ksym_end, 0); #endif efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); Modified: head/sys/arm/arm/machdep_boot.c ============================================================================== --- head/sys/arm/arm/machdep_boot.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/arm/arm/machdep_boot.c Sun Jun 21 03:39:26 2020 (r362458) @@ -302,7 +302,7 @@ freebsd_parse_boot_param(struct arm_boot_params *abp) #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); - db_fetch_ksymtab(ksym_start, ksym_end); + db_fetch_ksymtab(ksym_start, ksym_end, 0); #endif return lastaddr; } Modified: head/sys/arm64/arm64/machdep_boot.c ============================================================================== --- head/sys/arm64/arm64/machdep_boot.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/arm64/arm64/machdep_boot.c Sun Jun 21 03:39:26 2020 (r362458) @@ -208,7 +208,7 @@ freebsd_parse_boot_param(struct arm64_bootparams *abp) #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); - db_fetch_ksymtab(ksym_start, ksym_end); + db_fetch_ksymtab(ksym_start, ksym_end, 0); #endif return (lastaddr); } Modified: head/sys/ddb/db_main.c ============================================================================== --- head/sys/ddb/db_main.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/ddb/db_main.c Sun Jun 21 03:39:26 2020 (r362458) @@ -48,6 +48,14 @@ __FBSDID("$FreeBSD$"); #include #include +struct db_private { + char* strtab; + vm_offset_t relbase; +}; +typedef struct db_private *db_private_t; + +#define DB_PRIVATE(x) ((db_private_t)(x->private)) + SYSCTL_NODE(_debug, OID_AUTO, ddb, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "DDB settings"); @@ -64,7 +72,8 @@ KDB_BACKEND(ddb, db_init, db_trace_self_wrapper, db_tr * the symtab and strtab in memory. This is used when loaded from * boot loaders different than the native one (like Xen). */ -vm_offset_t ksymtab, kstrtab, ksymtab_size; +vm_offset_t ksymtab, kstrtab, ksymtab_size, ksymtab_relbase; +static struct db_private ksymtab_private; bool X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t sym, char **file, int *line, @@ -86,7 +95,8 @@ X_db_lookup(db_symtab_t *symtab, const char *symbol) sym = (Elf_Sym *)symtab->start; while ((char *)sym < symtab->end) { if (sym->st_name != 0 && - !strcmp(symtab->private + sym->st_name, symbol)) + !strcmp(DB_PRIVATE(symtab)->strtab + + sym->st_name, symbol)) return ((c_db_sym_t)sym); sym++; } @@ -101,7 +111,7 @@ X_db_search_symbol(db_symtab_t *symtab, db_addr_t off, c_linker_sym_t lsym; Elf_Sym *sym, *match; unsigned long diff; - db_addr_t stoffs; + db_addr_t stoffs = off; if (symtab->private == NULL) { if (!linker_ddb_search_symbol((caddr_t)off, &lsym, &diff)) { @@ -110,10 +120,11 @@ X_db_search_symbol(db_symtab_t *symtab, db_addr_t off, } return (NULL); } + else + stoffs -= DB_PRIVATE(symtab)->relbase; diff = ~0UL; match = NULL; - stoffs = DB_STOFFS(off); for (sym = (Elf_Sym*)symtab->start; (char*)sym < symtab->end; sym++) { if (sym->st_name == 0 || sym->st_shndx == SHN_UNDEF) continue; @@ -171,15 +182,17 @@ X_db_symbol_values(db_symtab_t *symtab, c_db_sym_t sym *valp = (db_expr_t)lval.value; } else { if (namep != NULL) - *namep = (const char *)symtab->private + + *namep = (const char *)DB_PRIVATE(symtab)->strtab + ((const Elf_Sym *)sym)->st_name; if (valp != NULL) - *valp = (db_expr_t)((const Elf_Sym *)sym)->st_value; + *valp = (db_expr_t)((const Elf_Sym *)sym)->st_value + + DB_PRIVATE(symtab)->relbase; } } int -db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end) +db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end, + vm_offset_t relbase) { Elf_Size strsz; @@ -190,9 +203,11 @@ db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t k kstrtab = ksymtab + ksymtab_size; strsz = *(Elf_Size*)kstrtab; kstrtab += sizeof(Elf_Size); + ksymtab_relbase = relbase; if (kstrtab + strsz > ksym_end) { /* Sizes doesn't match, unset everything. */ - ksymtab = ksymtab_size = kstrtab = 0; + ksymtab = ksymtab_size = kstrtab = ksymtab_relbase + = 0; } } @@ -209,8 +224,10 @@ db_init(void) db_command_init(); if (ksymtab != 0 && kstrtab != 0 && ksymtab_size != 0) { + ksymtab_private.strtab = (char *)kstrtab; + ksymtab_private.relbase = ksymtab_relbase; db_add_symbol_table((char *)ksymtab, - (char *)(ksymtab + ksymtab_size), "elf", (char *)kstrtab); + (char *)(ksymtab + ksymtab_size), "elf", (char *)&ksymtab_private); } db_add_symbol_table(NULL, NULL, "kld", NULL); return (1); /* We're the default debugger. */ Modified: head/sys/ddb/ddb.h ============================================================================== --- head/sys/ddb/ddb.h Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/ddb/ddb.h Sun Jun 21 03:39:26 2020 (r362458) @@ -72,10 +72,6 @@ SYSCTL_DECL(_debug_ddb); #define DB_MAXSCRIPTRECURSION 3 #endif -#ifndef DB_STOFFS -#define DB_STOFFS(offs) (offs) -#endif - #ifndef DB_CALL #define DB_CALL db_fncall_generic #else @@ -87,7 +83,7 @@ int DB_CALL(db_expr_t, db_expr_t *, int, db_expr_t[]); * Most users should use db_fetch_symtab in order to set them from the * boot loader provided values. */ -extern vm_offset_t ksymtab, kstrtab, ksymtab_size; +extern vm_offset_t ksymtab, kstrtab, ksymtab_size, ksymtab_relbase; /* * There are three "command tables": @@ -232,7 +228,8 @@ bool db_value_of_name_vnet(const char *name, db_expr_ int db_write_bytes(vm_offset_t addr, size_t size, char *data); void db_command_register(struct command_table *, struct command *); void db_command_unregister(struct command_table *, struct command *); -int db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end); +int db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end, + vm_offset_t relbase); db_cmdfcn_t db_breakpoint_cmd; db_cmdfcn_t db_capture_cmd; Modified: head/sys/dev/ksyms/ksyms.c ============================================================================== --- head/sys/dev/ksyms/ksyms.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/dev/ksyms/ksyms.c Sun Jun 21 03:39:26 2020 (r362458) @@ -202,7 +202,7 @@ ksyms_add(linker_file_t lf, void *arg) strsz = LINKER_STRTAB_GET(lf, &strtab); symsz = numsyms * sizeof(Elf_Sym); -#ifdef __powerpc__ +#ifdef RELOCATABLE_KERNEL fixup = true; #else fixup = lf->id > 1; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/i386/i386/machdep.c Sun Jun 21 03:39:26 2020 (r362458) @@ -2180,7 +2180,7 @@ static void i386_kdb_init(void) { #ifdef DDB - db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab); + db_fetch_ksymtab(bootinfo.bi_symtab, bootinfo.bi_esymtab, 0); #endif kdb_init(); #ifdef KDB Modified: head/sys/kern/link_elf.c ============================================================================== --- head/sys/kern/link_elf.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/kern/link_elf.c Sun Jun 21 03:39:26 2020 (r362458) @@ -389,6 +389,21 @@ link_elf_link_common_finish(linker_file_t lf) } #ifdef RELOCATABLE_KERNEL +/* + * __startkernel and __endkernel are symbols set up as relocation canaries. + * + * They are defined in locore to reference linker script symbols at the + * beginning and end of the LOAD area. This has the desired side effect of + * giving us variables that have relative relocations pointing at them, so + * relocation of the kernel object will cause the variables to be updated + * automatically by the runtime linker when we initialize. + * + * There are two main reasons to relocate the kernel: + * 1) If the loader needed to load the kernel at an alternate load address. + * 2) If the kernel is switching address spaces on machines like POWER9 + * under Radix where the high bits of the effective address are used to + * differentiate between hypervisor, host, guest, and problem state. + */ extern vm_offset_t __startkernel, __endkernel; #endif @@ -427,6 +442,7 @@ link_elf_init(void* arg) ef = (elf_file_t) linker_kernel_file; ef->preloaded = 1; #ifdef RELOCATABLE_KERNEL + /* Compute relative displacement */ ef->address = (caddr_t) (__startkernel - KERNBASE); #else ef->address = 0; Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/mips/mips/machdep.c Sun Jun 21 03:39:26 2020 (r362458) @@ -447,7 +447,7 @@ mips_postboot_fixup(void) kernel_kseg0_end += symtabsize; /* end of .strtab */ ksym_end = kernel_kseg0_end; - db_fetch_ksymtab(ksym_start, ksym_end); + db_fetch_ksymtab(ksym_start, ksym_end, 0); } #endif } Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Sun Jun 21 02:49:56 2020 (r362457) +++ head/sys/powerpc/powerpc/machdep.c Sun Jun 21 03:39:26 2020 (r362458) @@ -251,7 +251,6 @@ void booke_cpu_init(void); #ifdef DDB static void load_external_symtab(void); -static void displace_symbol_table(vm_offset_t, vm_offset_t, vm_offset_t); #endif uintptr_t @@ -360,16 +359,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); ksym_sz = *(Elf_Size*)ksym_start; - /* - * Loader already handled displacing to the load - * address, but we still need to displace it to the - * DMAP. - */ - displace_symbol_table( - (vm_offset_t)(ksym_start + sizeof(Elf_Size)), - ksym_sz, md_offset); - - db_fetch_ksymtab(ksym_start, ksym_end); + db_fetch_ksymtab(ksym_start, ksym_end, md_offset); + /* Symbols provided by loader. */ symbols_provided = true; #endif } @@ -509,45 +500,22 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs #ifdef DDB /* - * XXX Figure out where to move this. + * On powernv and some booke systems, we might not have symbols loaded via + * loader. However, if the user passed the kernel in as the initrd as well, + * we can manually load it via reinterpreting the initrd copy of the kernel. + * + * In the BOOKE case, we don't actually have a DMAP yet, so we have to use + * temporary maps to inspect the memory, but write DMAP addresses to the + * configuration variables. */ static void -displace_symbol_table(vm_offset_t ksym_start, - vm_offset_t ksym_sz, vm_offset_t displacement) { - Elf_Sym *sym; - - /* - * Relocate the symbol table to our final load address. - */ - for (sym = (Elf_Sym *)ksym_start; - (vm_paddr_t)sym < (ksym_start + ksym_sz); - sym++) { - if (sym->st_name == 0 || - sym->st_shndx == SHN_UNDEF || - sym->st_value == 0) - continue; - if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT && - ELF_ST_TYPE(sym->st_info) != STT_FUNC && - ELF_ST_TYPE(sym->st_info) != STT_NOTYPE) - continue; - /* Skip relocating any implausible symbols */ - if (sym->st_value > KERNBASE) - sym->st_value += displacement; - } -} - -/* - * On powernv, we might not have symbols loaded via loader. However, if the - * user passed the kernel in as the initrd as well, we can manually load it - * via reinterpreting the initrd copy of the kernel. - */ -static void load_external_symtab(void) { phandle_t chosen; vm_paddr_t start, end; pcell_t cell[2]; ssize_t size; - u_char *kernelimg; + u_char *kernelimg; /* Temporary map */ + u_char *kernelimg_final; /* Final location */ int i; @@ -555,7 +523,8 @@ load_external_symtab(void) { Elf_Phdr *phdr; Elf_Shdr *shdr; - vm_offset_t ksym_start, ksym_sz, kstr_start, kstr_sz; + vm_offset_t ksym_start, ksym_sz, kstr_start, kstr_sz, + ksym_start_final, kstr_start_final; if (!hw_direct_map) return; @@ -587,27 +556,48 @@ load_external_symtab(void) { if (!(end - start > 0)) return; - kernelimg = (u_char *) PHYS_TO_DMAP(start); - + kernelimg_final = (u_char *) PHYS_TO_DMAP(start); +#ifdef AIM + kernelimg = kernelimg_final; +#else /* BOOKE */ + kernelimg = (u_char *)pmap_early_io_map(start, PAGE_SIZE); +#endif ehdr = (Elf_Ehdr *)kernelimg; - if (!IS_ELF(*ehdr)) + if (!IS_ELF(*ehdr)) { +#ifdef BOOKE + pmap_early_io_unmap(start, PAGE_SIZE); +#endif return; + } +#ifdef BOOKE + pmap_early_io_unmap(start, PAGE_SIZE); + kernelimg = (u_char *)pmap_early_io_map(start, (end - start)); +#endif + phdr = (Elf_Phdr *)(kernelimg + ehdr->e_phoff); shdr = (Elf_Shdr *)(kernelimg + ehdr->e_shoff); ksym_start = 0; ksym_sz = 0; + ksym_start_final = 0; kstr_start = 0; kstr_sz = 0; + kstr_start_final = 0; for (i = 0; i < ehdr->e_shnum; i++) { if (shdr[i].sh_type == SHT_SYMTAB) { ksym_start = (vm_offset_t)(kernelimg + shdr[i].sh_offset); + ksym_start_final = (vm_offset_t) + (kernelimg_final + shdr[i].sh_offset); ksym_sz = (vm_offset_t)(shdr[i].sh_size); kstr_start = (vm_offset_t)(kernelimg + shdr[shdr[i].sh_link].sh_offset); + kstr_start_final = (vm_offset_t) + (kernelimg_final + + shdr[shdr[i].sh_link].sh_offset); + kstr_sz = (vm_offset_t) (shdr[shdr[i].sh_link].sh_size); } @@ -615,13 +605,22 @@ load_external_symtab(void) { if (ksym_start != 0 && kstr_start != 0 && ksym_sz != 0 && kstr_sz != 0 && ksym_start < kstr_start) { - - displace_symbol_table(ksym_start, ksym_sz, - (__startkernel - KERNBASE)); - ksymtab = ksym_start; + /* + * We can't use db_fetch_ksymtab() here, because we need to + * feed in DMAP addresses that are not mapped yet on booke. + * + * Write the variables directly, where db_init() will pick + * them up later, after the DMAP is up. + */ + ksymtab = ksym_start_final; ksymtab_size = ksym_sz; - kstrtab = kstr_start; + kstrtab = kstr_start_final; + ksymtab_relbase = (__startkernel - KERNBASE); } + +#ifdef BOOKE + pmap_early_io_unmap(start, (end - start)); +#endif }; #endif From owner-svn-src-head@freebsd.org Sun Jun 21 04:59:03 2020 Return-Path: Delivered-To: svn-src-head@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 8DC57341A8E; Sun, 21 Jun 2020 04:59:03 +0000 (UTC) (envelope-from jeff@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 49qL133910z4NBM; Sun, 21 Jun 2020 04:59:03 +0000 (UTC) (envelope-from jeff@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 67A4717FDB; Sun, 21 Jun 2020 04:59:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L4x3wO041631; Sun, 21 Jun 2020 04:59:03 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L4x3p8041630; Sun, 21 Jun 2020 04:59:03 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202006210459.05L4x3p8041630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Sun, 21 Jun 2020 04:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362459 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 04:59:03 -0000 Author: jeff Date: Sun Jun 21 04:59:02 2020 New Revision: 362459 URL: https://svnweb.freebsd.org/changeset/base/362459 Log: Use zone nomenclature that is consistent with UMA. Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Sun Jun 21 03:39:26 2020 (r362458) +++ head/sys/kern/kern_mbuf.c Sun Jun 21 04:59:02 2020 (r362459) @@ -73,12 +73,12 @@ __FBSDID("$FreeBSD$"); * Zone. The Zone can be capped at kern.ipc.nmbclusters, if the * administrator so desires. * - * Mbufs are allocated from a UMA Master Zone called the Mbuf + * Mbufs are allocated from a UMA Primary Zone called the Mbuf * Zone. * * Additionally, FreeBSD provides a Packet Zone, which it - * configures as a Secondary Zone to the Mbuf Master Zone, - * thus sharing backend Slab kegs with the Mbuf Master Zone. + * configures as a Secondary Zone to the Mbuf Primary Zone, + * thus sharing backend Slab kegs with the Mbuf Primary Zone. * * Thus common-case allocations and locking are simplified: * @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); * | .------------>[(Packet Cache)] m_get(), m_gethdr() * | | [ Packet ] | * [(Cluster Cache)] [ Secondary ] [ (Mbuf Cache) ] - * [ Cluster Zone ] [ Zone ] [ Mbuf Master Zone ] + * [ Cluster Zone ] [ Zone ] [ Mbuf Primary Zone ] * | \________ | * [ Cluster Keg ] \ / * | [ Mbuf Keg ] @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); * for any deallocation through uma_zfree() the _dtor_ function * is executed. * - * Caches are per-CPU and are filled from the Master Zone. + * Caches are per-CPU and are filled from the Primary Zone. * * Whenever an object is allocated from the underlying global * memory pool it gets pre-initialized with the _zinit_ functions. @@ -611,7 +611,7 @@ debugnet_mbuf_reinit(int nmbuf, int nclust, int clsize #endif /* DEBUGNET */ /* - * Constructor for Mbuf master zone. + * Constructor for Mbuf primary zone. * * The 'arg' pointer points to a mb_args structure which * contains call-specific information required to support the @@ -646,7 +646,7 @@ mb_ctor_mbuf(void *mem, int size, void *arg, int how) } /* - * The Mbuf master zone destructor. + * The Mbuf primary zone destructor. */ static void mb_dtor_mbuf(void *mem, int size, void *arg) From owner-svn-src-head@freebsd.org Sun Jun 21 07:29:07 2020 Return-Path: Delivered-To: svn-src-head@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 C46AA345057; Sun, 21 Jun 2020 07:29:07 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qPLB6Hb3z4TnS; Sun, 21 Jun 2020 07:29:06 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: by mail-lj1-x22f.google.com with SMTP id s1so15937118ljo.0; Sun, 21 Jun 2020 00:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=B5vkwz5CJ7E05MGbxJF4sQ/U7xfP/F1iZ1nZuFPG5qs=; b=IERPlk2cZ90jOg+Lg0XX+cTUaVUUnmOiOa8RwHE7m9HQYl0WRCmMBwCBUrlHCHtsdx gah2LIWWgtQNdCl6aDS/mqJIFXUqMj4kqHJwYPfkiPE8b88q5pO7YtwU58GVShTtWWpM 0gZlZES34ABc8Z0u2v/DbrNFi+9czy02nWSsEIYf1empfsJysYSpQwAEc74qpVzJ9+sJ BFP/7VO9Y8B7y2XOR+cG/+EkugS1q1dMdWtGtWfucMtfr3EP6+qLYNq6UsrbgNMW156y ijTH3f65aKrSxYY4QgQFdoPKxKuf2QHuLQwuoV0IUMPDzHo33a3EHpF8se+zjNN20AIP 7K/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=B5vkwz5CJ7E05MGbxJF4sQ/U7xfP/F1iZ1nZuFPG5qs=; b=spye64bvQ1DUSvQH6/WHbEK/FFaKPXx7aKAARQMJEuxRM1a3HREeqli7blupo+hE/9 ObE0cIR4CMX1P2juijFv0DPdNV4GzX5t3lD6LPlic/3BHruuN6RjYkjDPw9o5PZbK0JT ZjCgkwNoj+I8SRHTCDMSqISD4JdymJPX/QqYfbR5Vwlm/LN+0PuHkd9UCz3hdUUVUdkn vEQ/PkBkAzdUC+ziO4FtxdaFO9jpcbu6cxcx6luddyRVJY00L1gIPqAJlZTceoi/C7cE WjGpz8TTrQvCAdrKU0Etzc/bhANtsjrUxT0eW9+9Qdr1iGUxLWWn4IPPW3li70l/NOGW FVpQ== X-Gm-Message-State: AOAM531d/6/Qmp61QHnaNlZs2xADWwQrCwnSBQxG+nUDau1k73yXIvF0 o662uwrEvSUk9NCgqF5S7Wvm2KLn X-Google-Smtp-Source: ABdhPJyceigw5lWtMCgV2mNGstD/+VfEtILJll9YZ6uUpIgDaVUnPcxsWzukGiPdT53qq+R451z9tg== X-Received: by 2002:a2e:8903:: with SMTP id d3mr5274204lji.298.1592724543937; Sun, 21 Jun 2020 00:29:03 -0700 (PDT) Received: from [10.0.1.2] (broadband-46-242-11-87.ip.moscow.rt.ru. [46.242.11.87]) by smtp.gmail.com with ESMTPSA id m14sm3011788lfp.18.2020.06.21.00.29.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jun 2020 00:29:03 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r362420 - head/share/misc From: Dmitry Sivachenko In-Reply-To: <202006200407.05K47iuN022477@repo.freebsd.org> Date: Sun, 21 Jun 2020 10:29:01 +0300 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <9CFBFBA1-935D-40EF-AF81-B8C0D5B8B0DA@gmail.com> References: <202006200407.05K47iuN022477@repo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 49qPLB6Hb3z4TnS X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=IERPlk2c; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of trtrmitya@gmail.com designates 2a00:1450:4864:20::22f as permitted sender) smtp.mailfrom=trtrmitya@gmail.com X-Spamd-Result: default: False [-3.35 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.78)[-0.782]; RECEIVED_SPAMHAUS_PBL(0.00)[46.242.11.87:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.025]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.05)[-1.045]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22f:from]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 07:29:07 -0000 > On 20 Jun 2020, at 07:07, Warner Losh wrote: >=20 > Author: imp > Date: Sat Jun 20 04:07:44 2020 > New Revision: 362420 > URL: https://svnweb.freebsd.org/changeset/base/362420 >=20 > Log: > Correct 1BSD release date. >=20 > The Quarter Century of Unix book said that 1BSD was released March = 1979. > However, the 1BSD tape image that's on Kirk's historical unix = collection has an > earlier date. >=20 > It was common practice, at the time, to create a new copy of the tape = from the > master system when a new tape was to go out, so several different = versions of > 1BSD, etc were shipped from Berkerely. The date on the 1BSD tape in = the Berkeley > archives on Kirk's DVD is dated in January 16 1979 on the label, and = has dates > as late as Jan 29 (there's an UPDATE file that says this includes = updates > through this date). Note this date as well. >=20 > Modified: > head/share/misc/bsd-family-tree >=20 > Modified: head/share/misc/bsd-family-tree > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/misc/bsd-family-tree Sat Jun 20 04:07:23 2020 = (r362419) > +++ head/share/misc/bsd-family-tree Sat Jun 20 04:07:44 2020 = (r362420) > @@ -477,6 +477,7 @@ Ninth Edition 1986-09-xx [QCU] > Tenth Edition 1989-10-xx [QCU] >=20 > 1BSD late 1977 > + 1978-01-16 [DOC] Ah, this is my birthday (too)! :) From owner-svn-src-head@freebsd.org Sun Jun 21 08:51:26 2020 Return-Path: Delivered-To: svn-src-head@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 4E6A0347049; Sun, 21 Jun 2020 08:51:26 +0000 (UTC) (envelope-from tmunro@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 49qR9B04H0z4ZsN; Sun, 21 Jun 2020 08:51:26 +0000 (UTC) (envelope-from tmunro@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 F1DC11AD80; Sun, 21 Jun 2020 08:51:25 +0000 (UTC) (envelope-from tmunro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L8pPEN083345; Sun, 21 Jun 2020 08:51:25 GMT (envelope-from tmunro@FreeBSD.org) Received: (from tmunro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L8pO5x083339; Sun, 21 Jun 2020 08:51:24 GMT (envelope-from tmunro@FreeBSD.org) Message-Id: <202006210851.05L8pO5x083339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tmunro set sender to tmunro@FreeBSD.org using -f From: Thomas Munro Date: Sun, 21 Jun 2020 08:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362460 - in head/sys: compat/cloudabi fs/devfs kern sys X-SVN-Group: head X-SVN-Commit-Author: tmunro X-SVN-Commit-Paths: in head/sys: compat/cloudabi fs/devfs kern sys X-SVN-Commit-Revision: 362460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 08:51:26 -0000 Author: tmunro Date: Sun Jun 21 08:51:24 2020 New Revision: 362460 URL: https://svnweb.freebsd.org/changeset/base/362460 Log: vfs: track sequential reads and writes separately For software like PostgreSQL and SQLite that sometimes reads sequentially while also writing sequentially some distance behind with interleaved syscalls on the same fd, performance is better on UFS if we do sequential access heuristics separately for reads and writes. Patch originally by Andrew Gierth in 2008, updated and proposed by me with his permission. Reviewed by: mjg, kib, tmunro Approved by: mjg (mentor) Obtained from: Andrew Gierth Differential Revision: https://reviews.freebsd.org/D25024 Modified: head/sys/compat/cloudabi/cloudabi_file.c head/sys/fs/devfs/devfs_vnops.c head/sys/kern/kern_descrip.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/file.h Modified: head/sys/compat/cloudabi/cloudabi_file.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_file.c Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/compat/cloudabi/cloudabi_file.c Sun Jun 21 08:51:24 2020 (r362460) @@ -287,7 +287,8 @@ cloudabi_sys_file_open(struct thread *td, /* Install vnode operations if no custom operations are provided. */ if (fp->f_ops == &badfileops) { - fp->f_seqcount = 1; + fp->f_seqcount[UIO_READ] = 1; + fp->f_seqcount[UIO_WRITE] = 1; finit(fp, (fflags & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); } Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/fs/devfs/devfs_vnops.c Sun Jun 21 08:51:24 2020 (r362460) @@ -1305,7 +1305,7 @@ devfs_read_f(struct file *fp, struct uio *uio, struct td->td_fpop = fpop; dev_relthread(dev, ref); - foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF); + foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF_R); return (error); } @@ -1802,7 +1802,7 @@ devfs_write_f(struct file *fp, struct uio *uio, struct td->td_fpop = fpop; dev_relthread(dev, ref); - foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF); + foffset_unlock_uio(fp, uio, flags | FOF_NOLOCK | FOF_NEXTOFF_W); return (error); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/kern/kern_descrip.c Sun Jun 21 08:51:24 2020 (r362460) @@ -795,7 +795,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ if (arg >= 0) { bsize = fp->f_vnode->v_mount->mnt_stat.f_iosize; arg = MIN(arg, INT_MAX - bsize + 1); - fp->f_seqcount = MIN(IO_SEQMAX, + fp->f_seqcount[UIO_READ] = MIN(IO_SEQMAX, (arg + bsize - 1) / bsize); atomic_set_int(&fp->f_flag, FRDAHEAD); } else { Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/kern/vfs_syscalls.c Sun Jun 21 08:51:24 2020 (r362460) @@ -1124,7 +1124,8 @@ kern_openat(struct thread *td, int fd, const char *pat */ if (fp->f_ops == &badfileops) { KASSERT(vp->v_type != VFIFO, ("Unexpected fifo.")); - fp->f_seqcount = 1; + fp->f_seqcount[UIO_READ] = 1; + fp->f_seqcount[UIO_WRITE] = 1; finit(fp, (flags & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); } @@ -4442,7 +4443,8 @@ sys_fhopen(struct thread *td, struct fhopen_args *uap) td->td_dupfd = 0; #endif fp->f_vnode = vp; - fp->f_seqcount = 1; + fp->f_seqcount[UIO_READ] = 1; + fp->f_seqcount[UIO_WRITE] = 1; finit(fp, (fmode & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); VOP_UNLOCK(vp); Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/kern/vfs_vnops.c Sun Jun 21 08:51:24 2020 (r362460) @@ -489,10 +489,13 @@ vn_close(struct vnode *vp, int flags, struct ucred *fi static int sequential_heuristic(struct uio *uio, struct file *fp) { + enum uio_rw rw; ASSERT_VOP_LOCKED(fp->f_vnode, __func__); + + rw = uio->uio_rw; if (fp->f_flag & FRDAHEAD) - return (fp->f_seqcount << IO_SEQSHIFT); + return (fp->f_seqcount[rw] << IO_SEQSHIFT); /* * Offset 0 is handled specially. open() sets f_seqcount to 1 so @@ -501,8 +504,8 @@ sequential_heuristic(struct uio *uio, struct file *fp) * unless previous seeks have reduced f_seqcount to 0, in which * case offset 0 is not special. */ - if ((uio->uio_offset == 0 && fp->f_seqcount > 0) || - uio->uio_offset == fp->f_nextoff) { + if ((uio->uio_offset == 0 && fp->f_seqcount[rw] > 0) || + uio->uio_offset == fp->f_nextoff[rw]) { /* * f_seqcount is in units of fixed-size blocks so that it * depends mainly on the amount of sequential I/O and not @@ -513,20 +516,20 @@ sequential_heuristic(struct uio *uio, struct file *fp) * to any block size used by software. */ if (uio->uio_resid >= IO_SEQMAX * 16384) - fp->f_seqcount = IO_SEQMAX; + fp->f_seqcount[rw] = IO_SEQMAX; else { - fp->f_seqcount += howmany(uio->uio_resid, 16384); - if (fp->f_seqcount > IO_SEQMAX) - fp->f_seqcount = IO_SEQMAX; + fp->f_seqcount[rw] += howmany(uio->uio_resid, 16384); + if (fp->f_seqcount[rw] > IO_SEQMAX) + fp->f_seqcount[rw] = IO_SEQMAX; } - return (fp->f_seqcount << IO_SEQSHIFT); + return (fp->f_seqcount[rw] << IO_SEQSHIFT); } /* Not sequential. Quickly draw-down sequentiality. */ - if (fp->f_seqcount > 1) - fp->f_seqcount = 1; + if (fp->f_seqcount[rw] > 1) + fp->f_seqcount[rw] = 1; else - fp->f_seqcount = 0; + fp->f_seqcount[rw] = 0; return (0); } @@ -734,8 +737,10 @@ foffset_unlock(struct file *fp, off_t val, int flags) if ((flags & FOF_NOUPDATE) == 0) atomic_store_long(&fp->f_offset, val); - if ((flags & FOF_NEXTOFF) != 0) - fp->f_nextoff = val; + if ((flags & FOF_NEXTOFF_R) != 0) + fp->f_nextoff[UIO_READ] = val; + if ((flags & FOF_NEXTOFF_W) != 0) + fp->f_nextoff[UIO_WRITE] = val; if ((flags & FOF_NOLOCK) != 0) return; @@ -788,8 +793,10 @@ foffset_unlock(struct file *fp, off_t val, int flags) mtx_lock(mtxp); if ((flags & FOF_NOUPDATE) == 0) fp->f_offset = val; - if ((flags & FOF_NEXTOFF) != 0) - fp->f_nextoff = val; + if ((flags & FOF_NEXTOFF_R) != 0) + fp->f_nextoff[UIO_READ] = val; + if ((flags & FOF_NEXTOFF_W) != 0) + fp->f_nextoff[UIO_WRITE] = val; if ((flags & FOF_NOLOCK) == 0) { KASSERT((fp->f_vnread_flags & FOFFSET_LOCKED) != 0, ("Lost FOFFSET_LOCKED")); @@ -878,7 +885,7 @@ vn_read(struct file *fp, struct uio *uio, struct ucred if (error == 0) #endif error = VOP_READ(vp, uio, ioflag, fp->f_cred); - fp->f_nextoff = uio->uio_offset; + fp->f_nextoff[UIO_READ] = uio->uio_offset; VOP_UNLOCK(vp); if (error == 0 && advice == POSIX_FADV_NOREUSE && orig_offset != uio->uio_offset) @@ -953,7 +960,7 @@ vn_write(struct file *fp, struct uio *uio, struct ucre if (error == 0) #endif error = VOP_WRITE(vp, uio, ioflag, fp->f_cred); - fp->f_nextoff = uio->uio_offset; + fp->f_nextoff[UIO_WRITE] = uio->uio_offset; VOP_UNLOCK(vp); if (vp->v_type != VCHR) vn_finished_write(mp); Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Sun Jun 21 04:59:02 2020 (r362459) +++ head/sys/sys/file.h Sun Jun 21 08:51:24 2020 (r362460) @@ -81,7 +81,8 @@ struct ucred; #define FOF_OFFSET 0x01 /* Use the offset in uio argument */ #define FOF_NOLOCK 0x02 /* Do not take FOFFSET_LOCK */ -#define FOF_NEXTOFF 0x04 /* Also update f_nextoff */ +#define FOF_NEXTOFF_R 0x04 /* Also update f_nextoff[UIO_READ] */ +#define FOF_NEXTOFF_W 0x08 /* Also update f_nextoff[UIO_WRITE] */ #define FOF_NOUPDATE 0x10 /* Do not update f_offset */ off_t foffset_lock(struct file *fp, int flags); void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); @@ -187,10 +188,10 @@ struct file { * DTYPE_VNODE specific fields. */ union { - int16_t f_seqcount; /* (a) Count of sequential accesses. */ + int16_t f_seqcount[2]; /* (a) Count of seq. reads and writes. */ int f_pipegen; }; - off_t f_nextoff; /* next expected read/write offset. */ + off_t f_nextoff[2]; /* next expected read/write offset. */ union { struct cdev_privdata *fvn_cdevpriv; /* (d) Private data for the cdev. */ From owner-svn-src-head@freebsd.org Sun Jun 21 09:35:40 2020 Return-Path: Delivered-To: svn-src-head@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 D88BF348543; Sun, 21 Jun 2020 09:35:40 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qS8D5LVsz4dYl; Sun, 21 Jun 2020 09:35:40 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id B0FE290A5; Sun, 21 Jun 2020 09:35:40 +0000 (UTC) Date: Sun, 21 Jun 2020 11:35:40 +0200 From: "Piotr P. Stefaniak" To: Thomas Munro Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362460 - in head/sys: compat/cloudabi fs/devfs kern sys Message-ID: <20200621093540.GA41106@freefall.freebsd.org> References: <202006210851.05L8pO5x083339@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202006210851.05L8pO5x083339@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 09:35:40 -0000 On 2020-06-21 08:51:24, Thomas Munro wrote: >Author: tmunro >Date: Sun Jun 21 08:51:24 2020 >New Revision: 362460 >URL: https://svnweb.freebsd.org/changeset/base/362460 > >Log: > vfs: track sequential reads and writes separately This sounds great to me! Have you considered MFC-ing this? From owner-svn-src-head@freebsd.org Sun Jun 21 09:56:10 2020 Return-Path: Delivered-To: svn-src-head@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 3272C348BC7; Sun, 21 Jun 2020 09:56:10 +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 49qSbt0Pdfz4fqm; Sun, 21 Jun 2020 09:56:10 +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 090FC1B7A5; Sun, 21 Jun 2020 09:56:10 +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 05L9u9Xd024288; Sun, 21 Jun 2020 09:56:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L9u97h024287; Sun, 21 Jun 2020 09:56:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006210956.05L9u97h024287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 21 Jun 2020 09:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362462 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 09:56:10 -0000 Author: tuexen Date: Sun Jun 21 09:56:09 2020 New Revision: 362462 URL: https://svnweb.freebsd.org/changeset/base/362462 Log: Fix the build for an INET6 only configuration. The fix from the last commit is actually needed twice... MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Jun 21 09:24:47 2020 (r362461) +++ head/sys/netinet/sctputil.c Sun Jun 21 09:56:09 2020 (r362462) @@ -6853,6 +6853,8 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, } else { addr_to_use = sa; } +#else + addr_to_use = sa; #endif break; #endif From owner-svn-src-head@freebsd.org Sun Jun 21 10:09:35 2020 Return-Path: Delivered-To: svn-src-head@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 1B01234922A; Sun, 21 Jun 2020 10:09:35 +0000 (UTC) (envelope-from trasz@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 49qSvM0FCtz3Rxt; Sun, 21 Jun 2020 10:09:35 +0000 (UTC) (envelope-from trasz@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 02ECF1B96E; Sun, 21 Jun 2020 10:09:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LA9Y2W030284; Sun, 21 Jun 2020 10:09:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LA9YNI030282; Sun, 21 Jun 2020 10:09:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006211009.05LA9YNI030282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Jun 2020 10:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362463 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 362463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 10:09:35 -0000 Author: trasz Date: Sun Jun 21 10:09:34 2020 New Revision: 362463 URL: https://svnweb.freebsd.org/changeset/base/362463 Log: Adapt linuxulator syscalls.master files to the new layout. No functional changes. Reviewed by: brooks MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25381 Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sun Jun 21 09:56:09 2020 (r362462) +++ head/sys/amd64/linux/syscalls.master Sun Jun 21 10:09:34 2020 (r362463) @@ -38,579 +38,1931 @@ ; #ifdef's, etc. may be included, and are copied to the output files. -0 AUE_NULL NOPROTO { int read(int fd, char *buf, \ - u_int nbyte); } -1 AUE_NULL NOPROTO { int write(int fd, char *buf, \ - u_int nbyte); } -2 AUE_OPEN_RWTC STD { int linux_open(char *path, l_int flags, \ - l_int mode); } -3 AUE_CLOSE NOPROTO { int close(int fd); } -4 AUE_STAT STD { int linux_newstat(char *path, \ - struct l_newstat *buf); } -5 AUE_FSTAT STD { int linux_newfstat(l_uint fd, \ - struct l_newstat *buf); } -6 AUE_LSTAT STD { int linux_newlstat(char *path, \ - struct l_newstat *buf); } -7 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ - int timeout); } -8 AUE_LSEEK STD { int linux_lseek(l_uint fdes, l_off_t off, \ - l_int whence); } -9 AUE_MMAP STD { int linux_mmap2(l_ulong addr, l_ulong len, \ - l_ulong prot, l_ulong flags, l_ulong fd, \ - l_ulong pgoff); } -10 AUE_MPROTECT STD { int linux_mprotect(caddr_t addr, l_int len, \ - l_int prot); } -11 AUE_MUNMAP NOPROTO { int munmap(caddr_t addr, int len); } -12 AUE_NULL STD { int linux_brk(l_ulong dsend); } -13 AUE_NULL STD { int linux_rt_sigaction(l_int sig, \ - l_sigaction_t *act, l_sigaction_t *oact, \ - l_size_t sigsetsize); } -14 AUE_NULL STD { int linux_rt_sigprocmask(l_int how, \ - l_sigset_t *mask, l_sigset_t *omask, \ - l_size_t sigsetsize); } -15 AUE_NULL STD { int linux_rt_sigreturn( \ - struct l_ucontext *ucp); } -16 AUE_IOCTL STD { int linux_ioctl(l_uint fd, l_uint cmd, \ - uintptr_t arg); } -17 AUE_PREAD STD { int linux_pread(l_uint fd, char *buf, \ - l_size_t nbyte, l_loff_t offset); } -18 AUE_PWRITE STD { int linux_pwrite(l_uint fd, char *buf, \ - l_size_t nbyte, l_loff_t offset); } -19 AUE_READV NOPROTO { int readv(int fd, struct iovec *iovp, \ - u_int iovcnt); } -20 AUE_WRITEV NOPROTO { int writev(int fd, struct iovec *iovp, \ - u_int iovcnt); } -21 AUE_ACCESS STD { int linux_access(char *path, l_int amode); } -22 AUE_PIPE STD { int linux_pipe(l_ulong *pipefds); } -23 AUE_SELECT STD { int linux_select(l_int nfds, \ - l_fd_set *readfds, l_fd_set *writefds, \ - l_fd_set *exceptfds, \ - struct l_timeval *timeout); } -24 AUE_NULL NOPROTO { int sched_yield(void); } -25 AUE_NULL STD { int linux_mremap(l_ulong addr, \ - l_ulong old_len, l_ulong new_len, \ - l_ulong flags, l_ulong new_addr); } -26 AUE_MSYNC STD { int linux_msync(l_ulong addr, \ - l_size_t len, l_int fl); } -27 AUE_MINCORE STD { int linux_mincore(l_ulong start, \ - l_size_t len, u_char *vec); } -28 AUE_MADVISE STD { int linux_madvise(void *addr, size_t len, \ - int behav); } -29 AUE_NULL STD { int linux_shmget(l_key_t key, l_size_t size, \ - l_int shmflg); } -30 AUE_NULL STD { int linux_shmat(l_int shmid, char *shmaddr, \ - l_int shmflg); } -31 AUE_NULL STD { int linux_shmctl(l_int shmid, l_int cmd, \ - struct l_shmid_ds *buf); } -32 AUE_DUP NOPROTO { int dup(u_int fd); } -33 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } -34 AUE_NULL STD { int linux_pause(void); } -35 AUE_NULL STD { int linux_nanosleep( \ - const struct l_timespec *rqtp, \ - struct l_timespec *rmtp); } -36 AUE_GETITIMER STD { int linux_getitimer(l_int which, \ - struct l_itimerval *itv); } -37 AUE_NULL STD { int linux_alarm(l_uint secs); } -38 AUE_SETITIMER STD { int linux_setitimer(l_int which, \ - struct l_itimerval *itv, \ - struct l_itimerval *oitv); } -39 AUE_GETPID STD { int linux_getpid(void); } -40 AUE_SENDFILE STD { int linux_sendfile(l_int out, l_int in, \ - l_long *offset, l_size_t count); } -41 AUE_SOCKET STD { int linux_socket(l_int domain, l_int type, \ - l_int protocol); } -42 AUE_CONNECT STD { int linux_connect(l_int s, l_uintptr_t name, \ - l_int namelen); } -43 AUE_ACCEPT STD { int linux_accept(l_int s, l_uintptr_t addr, \ - l_uintptr_t namelen); } -44 AUE_SENDTO STD { int linux_sendto(l_int s, l_uintptr_t msg, \ - l_int len, l_int flags, l_uintptr_t to, \ - l_int tolen); } -45 AUE_RECVFROM STD { int linux_recvfrom(l_int s, l_uintptr_t buf, \ - l_size_t len, l_int flags, l_uintptr_t from, \ - l_uintptr_t fromlen); } -46 AUE_SENDMSG STD { int linux_sendmsg(l_int s, l_uintptr_t msg, \ - l_int flags); } -47 AUE_RECVMSG STD { int linux_recvmsg(l_int s, l_uintptr_t msg, \ - l_int flags); } -48 AUE_NULL STD { int linux_shutdown(l_int s, l_int how); } -49 AUE_BIND STD { int linux_bind(l_int s, l_uintptr_t name, \ - l_int namelen); } -50 AUE_LISTEN STD { int linux_listen(l_int s, l_int backlog); } -51 AUE_GETSOCKNAME STD { int linux_getsockname(l_int s, \ - l_uintptr_t addr, l_uintptr_t namelen); } -52 AUE_GETPEERNAME STD { int linux_getpeername(l_int s, \ - l_uintptr_t addr, l_uintptr_t namelen); } -53 AUE_SOCKETPAIR STD { int linux_socketpair(l_int domain, \ - l_int type, l_int protocol, l_uintptr_t rsv); } -54 AUE_SETSOCKOPT STD { int linux_setsockopt(l_int s, l_int level, \ - l_int optname, l_uintptr_t optval, \ - l_int optlen); } -55 AUE_GETSOCKOPT STD { int linux_getsockopt(l_int s, l_int level, \ - l_int optname, l_uintptr_t optval, \ - l_uintptr_t optlen); } -56 AUE_RFORK STD { int linux_clone(l_int flags, void *stack, \ - void *parent_tidptr, void *child_tidptr, void *tls); } -57 AUE_FORK STD { int linux_fork(void); } -58 AUE_VFORK STD { int linux_vfork(void); } -59 AUE_EXECVE STD { int linux_execve(char *path, char **argp, \ - char **envp); } -60 AUE_EXIT STD { void linux_exit(l_int rval); } -61 AUE_WAIT4 STD { int linux_wait4(l_pid_t pid, \ - l_int *status, l_int options, \ - struct rusage *rusage); } -62 AUE_KILL STD { int linux_kill(l_int pid, l_int signum); } -63 AUE_NULL STD { int linux_newuname( \ - struct l_new_utsname *buf); } -64 AUE_NULL STD { int linux_semget(l_key_t key, \ - l_int nsems, l_int semflg); } -65 AUE_NULL STD { int linux_semop(l_int semid, \ - struct l_sembuf *tsops, l_uint nsops); } -66 AUE_NULL STD { int linux_semctl(l_int semid, \ - l_int semnum, l_int cmd, union l_semun arg); } -67 AUE_NULL STD { int linux_shmdt(char *shmaddr); } -68 AUE_NULL STD { int linux_msgget(l_key_t key, l_int msgflg); } -69 AUE_NULL STD { int linux_msgsnd(l_int msqid, \ - struct l_msgbuf *msgp, l_size_t msgsz, \ - l_int msgflg); } -70 AUE_NULL STD { int linux_msgrcv(l_int msqid, \ - struct l_msgbuf *msgp, l_size_t msgsz, \ - l_long msgtyp, l_int msgflg); } -71 AUE_NULL STD { int linux_msgctl(l_int msqid, l_int cmd, \ - struct l_msqid_ds *buf); } -72 AUE_FCNTL STD { int linux_fcntl(l_uint fd, l_uint cmd, \ - l_ulong arg); } -73 AUE_FLOCK NOPROTO { int flock(int fd, int how); } -74 AUE_FSYNC NOPROTO { int fsync(int fd); } -75 AUE_NULL STD { int linux_fdatasync(l_uint fd); } -76 AUE_TRUNCATE STD { int linux_truncate(char *path, \ - l_ulong length); } -77 AUE_FTRUNCATE STD { int linux_ftruncate(l_int fd, l_long length); } -78 AUE_GETDIRENTRIES STD { int linux_getdents(l_uint fd, void *dent, \ - l_uint count); } -79 AUE_GETCWD STD { int linux_getcwd(char *buf, \ - l_ulong bufsize); } -80 AUE_CHDIR STD { int linux_chdir(char *path); } -81 AUE_FCHDIR NOPROTO { int fchdir(int fd); } -82 AUE_RENAME STD { int linux_rename(char *from, char *to); } -83 AUE_MKDIR STD { int linux_mkdir(char *path, l_int mode); } -84 AUE_RMDIR STD { int linux_rmdir(char *path); } -85 AUE_CREAT STD { int linux_creat(char *path, \ - l_int mode); } -86 AUE_LINK STD { int linux_link(char *path, char *to); } -87 AUE_UNLINK STD { int linux_unlink(char *path); } -88 AUE_SYMLINK STD { int linux_symlink(char *path, char *to); } -89 AUE_READLINK STD { int linux_readlink(char *name, char *buf, \ - l_int count); } -90 AUE_CHMOD STD { int linux_chmod(char *path, \ - l_mode_t mode); } -91 AUE_FCHMOD NOPROTO { int fchmod(int fd, int mode); } -92 AUE_LCHOWN STD { int linux_chown(char *path, \ - l_uid_t uid, l_gid_t gid); } -93 AUE_FCHOWN NOPROTO { int fchown(int fd, int uid, int gid); } -94 AUE_LCHOWN STD { int linux_lchown(char *path, l_uid_t uid, \ - l_gid_t gid); } -95 AUE_UMASK NOPROTO { int umask(int newmask); } -96 AUE_NULL NOPROTO { int gettimeofday(struct l_timeval *tp, \ - struct timezone *tzp); } -97 AUE_GETRLIMIT STD { int linux_getrlimit(l_uint resource, \ - struct l_rlimit *rlim); } -98 AUE_GETRUSAGE NOPROTO { int getrusage(int who, struct rusage *rusage); } -99 AUE_NULL STD { int linux_sysinfo(struct l_sysinfo *info); } -100 AUE_NULL STD { int linux_times(struct l_times_argv *buf); } -101 AUE_PTRACE STD { int linux_ptrace(l_long req, l_long pid, \ - l_ulong addr, l_ulong data); } -102 AUE_GETUID STD { int linux_getuid(void); } -103 AUE_NULL STD { int linux_syslog(l_int type, char *buf, \ - l_int len); } -104 AUE_GETGID STD { int linux_getgid(void); } -105 AUE_SETUID NOPROTO { int setuid(uid_t uid); } -106 AUE_SETGID NOPROTO { int setgid(gid_t gid); } -107 AUE_GETEUID NOPROTO { int geteuid(void); } -108 AUE_GETEGID NOPROTO { int getegid(void); } -109 AUE_SETPGRP NOPROTO { int setpgid(int pid, int pgid); } -110 AUE_GETPPID STD { int linux_getppid(void); } -111 AUE_GETPGRP NOPROTO { int getpgrp(void); } -112 AUE_SETSID NOPROTO { int setsid(void); } -113 AUE_SETREUID NOPROTO { int setreuid(uid_t ruid, uid_t euid); } -114 AUE_SETREGID NOPROTO { int setregid(gid_t rgid, gid_t egid); } -115 AUE_GETGROUPS STD { int linux_getgroups(l_int gidsetsize, \ - l_gid_t *grouplist); } -116 AUE_SETGROUPS STD { int linux_setgroups(l_int gidsetsize, \ - l_gid_t *grouplist); } -117 AUE_SETRESUID NOPROTO { int setresuid(uid_t ruid, uid_t euid, \ - uid_t suid); } -118 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ - uid_t *suid); } -119 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \ - gid_t sgid); } -120 AUE_GETRESGID NOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \ - gid_t *sgid); } -121 AUE_GETPGID NOPROTO { int getpgid(int pid); } -122 AUE_SETFSUID STD { int linux_setfsuid(l_uid_t uid); } -123 AUE_SETFSGID STD { int linux_setfsgid(l_gid_t gid); } -124 AUE_GETSID STD { int linux_getsid(l_pid_t pid); } -125 AUE_CAPGET STD { int linux_capget(struct l_user_cap_header *hdrp, \ - struct l_user_cap_data *datap); } -126 AUE_CAPSET STD { int linux_capset(struct l_user_cap_header *hdrp, \ - struct l_user_cap_data *datap); } -127 AUE_NULL STD { int linux_rt_sigpending(l_sigset_t *set, \ - l_size_t sigsetsize); } -128 AUE_NULL STD { int linux_rt_sigtimedwait(l_sigset_t *mask, \ - l_siginfo_t *ptr, \ - struct l_timeval *timeout, \ - l_size_t sigsetsize); } -129 AUE_NULL STD { int linux_rt_sigqueueinfo(l_pid_t pid, l_int sig, \ - l_siginfo_t *info); } -130 AUE_NULL STD { int linux_rt_sigsuspend( \ - l_sigset_t *newset, \ - l_size_t sigsetsize); } -131 AUE_NULL STD { int linux_sigaltstack(l_stack_t *uss, \ - l_stack_t *uoss); } -132 AUE_UTIME STD { int linux_utime(char *fname, \ - struct l_utimbuf *times); } -133 AUE_MKNOD STD { int linux_mknod(char *path, l_int mode, \ - l_dev_t dev); } +0 AUE_NULL NOPROTO { + int read( + int fd, + char *buf, + u_int nbyte + ); + } +1 AUE_NULL NOPROTO { + int write( + int fd, + char *buf, + u_int nbyte + ); + } +2 AUE_OPEN_RWTC STD { + int linux_open( + char *path, + l_int flags, + l_int mode + ); + } +3 AUE_CLOSE NOPROTO { + int close( + int fd + ); + } +4 AUE_STAT STD { + int linux_newstat( + char *path, + struct l_newstat *buf + ); + } +5 AUE_FSTAT STD { + int linux_newfstat( + l_uint fd, + struct l_newstat *buf + ); + } +6 AUE_LSTAT STD { + int linux_newlstat( + char *path, + struct l_newstat *buf + ); + } +7 AUE_POLL NOPROTO { + int poll( + struct pollfd *fds, + u_int nfds, + int timeout + ); + } +8 AUE_LSEEK STD { + int linux_lseek( + l_uint fdes, + l_off_t off, + l_int whence + ); + } +9 AUE_MMAP STD { + int linux_mmap2( + l_ulong addr, + l_ulong len, + l_ulong prot, + l_ulong flags, + l_ulong fd, + l_ulong pgoff + ); + } +10 AUE_MPROTECT STD { + int linux_mprotect( + caddr_t addr, + l_int len, + l_int prot + ); + } +11 AUE_MUNMAP NOPROTO { + int munmap( + caddr_t addr, + int len + ); + } +12 AUE_NULL STD { + int linux_brk( + l_ulong dsend + ); + } +13 AUE_NULL STD { + int linux_rt_sigaction( + l_int sig, + l_sigaction_t *act, + l_sigaction_t *oact, + l_size_t sigsetsize + ); + } +14 AUE_NULL STD { + int linux_rt_sigprocmask( + l_int how, + l_sigset_t *mask, + l_sigset_t *omask, + l_size_t sigsetsize + ); + } +15 AUE_NULL STD { + int linux_rt_sigreturn( + struct l_ucontext *ucp + ); + } +16 AUE_IOCTL STD { + int linux_ioctl( + l_uint fd, + l_uint cmd, + uintptr_t arg + ); + } +17 AUE_PREAD STD { + int linux_pread( + l_uint fd, + char *buf, + l_size_t nbyte, + l_loff_t offset + ); + } +18 AUE_PWRITE STD { + int linux_pwrite( + l_uint fd, + char *buf, + l_size_t nbyte, + l_loff_t offset + ); + } +19 AUE_READV NOPROTO { + int readv( + int fd, + struct iovec *iovp, + u_int iovcnt + ); + } +20 AUE_WRITEV NOPROTO { + int writev( + int fd, + struct iovec *iovp, + u_int iovcnt + ); + } +21 AUE_ACCESS STD { + int linux_access( + char *path, + l_int amode + ); + } +22 AUE_PIPE STD { + int linux_pipe( + l_ulong *pipefds + ); + } +23 AUE_SELECT STD { + int linux_select( + l_int nfds, + l_fd_set *readfds, + l_fd_set *writefds, + l_fd_set *exceptfds, + struct l_timeval *timeout + ); + } +24 AUE_NULL NOPROTO { + int sched_yield(void); + } +25 AUE_NULL STD { + int linux_mremap( + l_ulong addr, + l_ulong old_len, + l_ulong new_len, + l_ulong flags, + l_ulong new_addr + ); + } +26 AUE_MSYNC STD { + int linux_msync( + l_ulong addr, + l_size_t len, + l_int fl + ); + } +27 AUE_MINCORE STD { + int linux_mincore( + l_ulong start, + l_size_t len, + u_char *vec + ); + } +28 AUE_MADVISE STD { + int linux_madvise( + void *addr, + size_t len, + int behav + ); + } +29 AUE_NULL STD { + int linux_shmget( + l_key_t key, + l_size_t size, + l_int shmflg + ); + } +30 AUE_NULL STD { + int linux_shmat( + l_int shmid, + char *shmaddr, + l_int shmflg + ); + } +31 AUE_NULL STD { + int linux_shmctl( + l_int shmid, + l_int cmd, + struct l_shmid_ds *buf + ); + } +32 AUE_DUP NOPROTO { + int dup( + u_int fd + ); + } +33 AUE_DUP2 NOPROTO { + int dup2( + u_int from, + u_int to + ); + } +34 AUE_NULL STD { + int linux_pause(void); + } +35 AUE_NULL STD { + int linux_nanosleep( + const struct l_timespec *rqtp, + struct l_timespec *rmtp + ); + } +36 AUE_GETITIMER STD { + int linux_getitimer( + l_int which, + struct l_itimerval *itv + ); + } +37 AUE_NULL STD { + int linux_alarm( + l_uint secs + ); + } +38 AUE_SETITIMER STD { + int linux_setitimer( + l_int which, + struct l_itimerval *itv, + struct l_itimerval *oitv + ); + } +39 AUE_GETPID STD { + int linux_getpid(void); + } +40 AUE_SENDFILE STD { + int linux_sendfile( + l_int out, + l_int in, + l_long *offset, + l_size_t count + ); + } +41 AUE_SOCKET STD { + int linux_socket( + l_int domain, + l_int type, + l_int protocol + ); + } +42 AUE_CONNECT STD { + int linux_connect( + l_int s, + l_uintptr_t name, + l_int namelen + ); + } +43 AUE_ACCEPT STD { + int linux_accept( + l_int s, + l_uintptr_t addr, + l_uintptr_t namelen + ); + } +44 AUE_SENDTO STD { + int linux_sendto( + l_int s, + l_uintptr_t msg, + l_int len, + l_int flags, + l_uintptr_t to, + l_int tolen + ); + } +45 AUE_RECVFROM STD { + int linux_recvfrom( + l_int s, + l_uintptr_t buf, + l_size_t len, + l_int flags, + l_uintptr_t from, + l_uintptr_t fromlen + ); + } +46 AUE_SENDMSG STD { + int linux_sendmsg( + l_int s, + l_uintptr_t msg, + l_int flags + ); + } +47 AUE_RECVMSG STD { + int linux_recvmsg( + l_int s, + l_uintptr_t msg, + l_int flags + ); + } +48 AUE_NULL STD { + int linux_shutdown( + l_int s, + l_int how + ); + } +49 AUE_BIND STD { + int linux_bind( + l_int s, + l_uintptr_t name, + l_int namelen + ); + } +50 AUE_LISTEN STD { + int linux_listen( + l_int s, + l_int backlog + ); + } +51 AUE_GETSOCKNAME STD { + int linux_getsockname( + l_int s, + l_uintptr_t addr, + l_uintptr_t namelen + ); + } +52 AUE_GETPEERNAME STD { + int linux_getpeername( + l_int s, + l_uintptr_t addr, + l_uintptr_t namelen + ); + } +53 AUE_SOCKETPAIR STD { + int linux_socketpair( + l_int domain, + l_int type, + l_int protocol, + l_uintptr_t rsv + ); + } +54 AUE_SETSOCKOPT STD { + int linux_setsockopt( + l_int s, + l_int level, + l_int optname, + l_uintptr_t optval, + l_int optlen + ); + } +55 AUE_GETSOCKOPT STD { + int linux_getsockopt( + l_int s, + l_int level, + l_int optname, + l_uintptr_t optval, + l_uintptr_t optlen + ); + } +56 AUE_RFORK STD { + int linux_clone( + l_int flags, + void *stack, + void *parent_tidptr, + void *child_tidptr, + void *tls + ); + } +57 AUE_FORK STD { + int linux_fork(void); + } +58 AUE_VFORK STD { + int linux_vfork(void); + } +59 AUE_EXECVE STD { + int linux_execve( + char *path, + char **argp, + char **envp + ); + } +60 AUE_EXIT STD { + void linux_exit( + l_int rval + ); + } +61 AUE_WAIT4 STD { + int linux_wait4( + l_pid_t pid, + l_int *status, + l_int options, + struct rusage *rusage + ); + } +62 AUE_KILL STD { + int linux_kill( + l_int pid, + l_int signum + ); + } +63 AUE_NULL STD { + int linux_newuname( + struct l_new_utsname *buf + ); + } +64 AUE_NULL STD { + int linux_semget( + l_key_t key, + l_int nsems, + l_int semflg + ); + } +65 AUE_NULL STD { + int linux_semop( + l_int semid, + struct l_sembuf *tsops, + l_uint nsops + ); + } +66 AUE_NULL STD { + int linux_semctl( + l_int semid, + l_int semnum, + l_int cmd, + union l_semun arg + ); + } +67 AUE_NULL STD { + int linux_shmdt( + char *shmaddr + ); + } +68 AUE_NULL STD { + int linux_msgget( + l_key_t key, + l_int msgflg + ); + } +69 AUE_NULL STD { + int linux_msgsnd( + l_int msqid, + struct l_msgbuf *msgp, + l_size_t msgsz, + l_int msgflg + ); + } +70 AUE_NULL STD { + int linux_msgrcv( + l_int msqid, + struct l_msgbuf *msgp, + l_size_t msgsz, + l_long msgtyp, + l_int msgflg + ); + } +71 AUE_NULL STD { + int linux_msgctl( + l_int msqid, + l_int cmd, + struct l_msqid_ds *buf + ); + } +72 AUE_FCNTL STD { + int linux_fcntl( + l_uint fd, + l_uint cmd, + l_ulong arg + ); + } +73 AUE_FLOCK NOPROTO { + int flock( + int fd, + int how + ); + } +74 AUE_FSYNC NOPROTO { + int fsync( + int fd + ); + } +75 AUE_NULL STD { + int linux_fdatasync( + l_uint fd + ); + } +76 AUE_TRUNCATE STD { + int linux_truncate( + char *path, + l_ulong length + ); + } +77 AUE_FTRUNCATE STD { + int linux_ftruncate( + l_int fd, + l_long length + ); + } +78 AUE_GETDIRENTRIES STD { + int linux_getdents( + l_uint fd, + void *dent, + l_uint count + ); + } +79 AUE_GETCWD STD { + int linux_getcwd( + char *buf, + l_ulong bufsize + ); + } +80 AUE_CHDIR STD { + int linux_chdir( + char *path + ); + } +81 AUE_FCHDIR NOPROTO { + int fchdir( + int fd + ); + } +82 AUE_RENAME STD { + int linux_rename( + char *from, + char *to + ); + } +83 AUE_MKDIR STD { + int linux_mkdir( + char *path, + l_int mode + ); + } +84 AUE_RMDIR STD { + int linux_rmdir( + char *path + ); + } +85 AUE_CREAT STD { + int linux_creat( + char *path, + l_int mode + ); + } +86 AUE_LINK STD { + int linux_link( + char *path, + char *to + ); + } +87 AUE_UNLINK STD { + int linux_unlink( + char *path + ); + } +88 AUE_SYMLINK STD { + int linux_symlink( + char *path, + char *to + ); + } +89 AUE_READLINK STD { + int linux_readlink( + char *name, + char *buf, + l_int count + ); + } +90 AUE_CHMOD STD { + int linux_chmod( + char *path, + l_mode_t mode + ); + } +91 AUE_FCHMOD NOPROTO { + int fchmod( + int fd, + int mode + ); + } +92 AUE_LCHOWN STD { + int linux_chown( + char *path, + l_uid_t uid, + l_gid_t gid + ); + } +93 AUE_FCHOWN NOPROTO { + int fchown( + int fd, + int uid, + int gid + ); + } +94 AUE_LCHOWN STD { + int linux_lchown( + char *path, + l_uid_t uid, + l_gid_t gid + ); + } +95 AUE_UMASK NOPROTO { + int umask( + int newmask + ); + } +96 AUE_NULL NOPROTO { + int gettimeofday( + struct l_timeval *tp, + struct timezone *tzp + ); + } +97 AUE_GETRLIMIT STD { + int linux_getrlimit( + l_uint resource, + struct l_rlimit *rlim + ); + } +98 AUE_GETRUSAGE NOPROTO { + int getrusage( + int who, + struct rusage *rusage + ); + } +99 AUE_NULL STD { + int linux_sysinfo( + struct l_sysinfo *info + ); + } +100 AUE_NULL STD { + int linux_times( + struct l_times_argv *buf + ); + } +101 AUE_PTRACE STD { + int linux_ptrace( + l_long req, + l_long pid, + l_ulong addr, + l_ulong data + ); + } +102 AUE_GETUID STD { + int linux_getuid(void); + } +103 AUE_NULL STD { + int linux_syslog( + l_int type, + char *buf, + l_int len + ); + } +104 AUE_GETGID STD { + int linux_getgid(void); + } +105 AUE_SETUID NOPROTO { + int setuid( + uid_t uid + ); + } +106 AUE_SETGID NOPROTO { + int setgid( + gid_t gid + ); + } +107 AUE_GETEUID NOPROTO { + int geteuid(void); + } +108 AUE_GETEGID NOPROTO { + int getegid(void); + } +109 AUE_SETPGRP NOPROTO { + int setpgid( + int pid, + int pgid + ); + } +110 AUE_GETPPID STD { + int linux_getppid(void); + } +111 AUE_GETPGRP NOPROTO { + int getpgrp(void); + } +112 AUE_SETSID NOPROTO { + int setsid(void); + } +113 AUE_SETREUID NOPROTO { + int setreuid( + uid_t ruid, + uid_t euid + ); + } +114 AUE_SETREGID NOPROTO { + int setregid( + gid_t rgid, + gid_t egid + ); + } +115 AUE_GETGROUPS STD { + int linux_getgroups( + l_int gidsetsize, + l_gid_t *grouplist + ); + } +116 AUE_SETGROUPS STD { + int linux_setgroups( + l_int gidsetsize, + l_gid_t *grouplist + ); + } +117 AUE_SETRESUID NOPROTO { + int setresuid( + uid_t ruid, + uid_t euid, + uid_t suid + ); + } +118 AUE_GETRESUID NOPROTO { + int getresuid( + uid_t *ruid, + uid_t *euid, + uid_t *suid + ); + } +119 AUE_SETRESGID NOPROTO { + int setresgid( + gid_t rgid, + gid_t egid, + gid_t sgid + ); + } +120 AUE_GETRESGID NOPROTO { + int getresgid( + gid_t *rgid, + gid_t *egid, + gid_t *sgid + ); + } +121 AUE_GETPGID NOPROTO { + int getpgid( *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Jun 21 11:42:49 2020 Return-Path: Delivered-To: svn-src-head@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 D547C34B586; Sun, 21 Jun 2020 11:42:49 +0000 (UTC) (envelope-from yuripv@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 49qVyx5HqKz3XZw; Sun, 21 Jun 2020 11:42:49 +0000 (UTC) (envelope-from yuripv@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 B08F51CA3B; Sun, 21 Jun 2020 11:42:49 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LBgnAW091078; Sun, 21 Jun 2020 11:42:49 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LBgnDa091077; Sun, 21 Jun 2020 11:42:49 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202006211142.05LBgnDa091077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Sun, 21 Jun 2020 11:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362464 - head/usr.bin/w X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.bin/w X-SVN-Commit-Revision: 362464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 11:42:49 -0000 Author: yuripv Date: Sun Jun 21 11:42:49 2020 New Revision: 362464 URL: https://svnweb.freebsd.org/changeset/base/362464 Log: w: use locale-based string format specifiers Use locale-based string format specifiers when printing the process names/arguments. Reviewed by: pstef Differential Revision: https://reviews.freebsd.org/D25174 Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Sun Jun 21 10:09:34 2020 (r362463) +++ head/usr.bin/w/w.c Sun Jun 21 11:42:49 2020 (r362464) @@ -438,8 +438,8 @@ main(int argc, char *argv[]) if (ptr == NULL) ptr = "-"; xo_open_instance("process-entry"); - xo_emit("\t\t{:process-id/%-9d/%d} {:command/%s}\n", - dkp->ki_pid, ptr); + xo_emit("\t\t{:process-id/%-9d/%d} " + "{:command/%hs}\n", dkp->ki_pid, ptr); xo_close_instance("process-entry"); } xo_close_list("process-entry"); @@ -460,7 +460,7 @@ main(int argc, char *argv[]) t = ep->utmp.ut_tv.tv_sec; longattime = pr_attime(&t, &now); longidle = pr_idle(ep->idle); - xo_emit("{:command/%.*s/%@*@s}\n", + xo_emit("{:command/%.*hs/%@*@hs}\n", argwidth - longidle - longattime, ep->args); From owner-svn-src-head@freebsd.org Sun Jun 21 13:34:11 2020 Return-Path: Delivered-To: svn-src-head@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 A677434F96C; Sun, 21 Jun 2020 13:34:11 +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.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 49qYRR3vnXz3yx2; Sun, 21 Jun 2020 13:34:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 816851E196; Sun, 21 Jun 2020 13:34:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LDYBb0058411; Sun, 21 Jun 2020 13:34:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LDY91F058399; Sun, 21 Jun 2020 13:34:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006211334.05LDY91F058399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 21 Jun 2020 13:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin/boot0cfg X-SVN-Commit-Revision: 362466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:34:11 -0000 Author: hselasky Date: Sun Jun 21 13:34:08 2020 New Revision: 362466 URL: https://svnweb.freebsd.org/changeset/base/362466 Log: Improve wording to be more precise and clear. No functional change intended. s/Master Boot/Main Boot/ (also called MBR) MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/contrib/file/magic/Magdir/filesystems head/contrib/tcpdump/smbutil.c head/lib/geom/part/gpart.8 head/stand/efi/include/efipart.h head/stand/i386/boot0/boot0.S head/sys/dev/hptmv/vdevice.h head/sys/geom/part/g_part_mbr.c head/usr.bin/fortune/datfiles/freebsd-tips head/usr.bin/mkimg/mbr.c head/usr.sbin/boot0cfg/boot0cfg.8 head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/contrib/file/magic/Magdir/filesystems ============================================================================== --- head/contrib/file/magic/Magdir/filesystems Sun Jun 21 11:48:55 2020 (r362465) +++ head/contrib/file/magic/Magdir/filesystems Sun Jun 21 13:34:08 2020 (r362466) @@ -269,8 +269,8 @@ !:strength +65 >2 string OSBS OS/BS MBR # added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/ -# and https://en.wikipedia.org/wiki/Master_Boot_Record -# test for nearly all MS-DOS Master Boot Record initial program loader (IPL) is now done by +# and https://en.wikipedia.org/wiki/Main_Boot_Record +# test for nearly all MS-DOS Main Boot Record initial program loader (IPL) is now done by # characteristic assembler instructions: xor ax,ax;mov ss,ax;mov sp,7c00 >0 search/2 \x33\xc0\x8e\xd0\xbc\x00\x7c MS-MBR # Microsoft Windows 95A and early ( https://thestarman.pcministry.com/asm/mbr/STDMBR.htm ) @@ -436,7 +436,7 @@ >>>>>>>387 string Copyright\ (c)\ 1984,1998 >>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR) # -# tests for different MS-DOS Master Boot Records (MBR) moved and merged +# tests for different MS-DOS Main Boot Records (MBR) moved and merged # #>0x145 string Default:\ F \b, FREE-DOS MBR #>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR @@ -1087,7 +1087,7 @@ >11 ubyte x \b+ >11 use DOS-filename -# https://en.wikipedia.org/wiki/Master_boot_record#PTE +# https://en.wikipedia.org/wiki/Main_boot_record#PTE # display standard partition table 0 name partition-table #>0 ubyte x PARTITION-TABLE Modified: head/contrib/tcpdump/smbutil.c ============================================================================== --- head/contrib/tcpdump/smbutil.c Sun Jun 21 11:48:55 2020 (r362465) +++ head/contrib/tcpdump/smbutil.c Sun Jun 21 13:34:08 2020 (r362466) @@ -1339,7 +1339,7 @@ static const nt_err_code_struct nt_errors[] = { { 0xC00000A6, "STATUS_CANT_OPEN_ANONYMOUS" }, { 0xC00000A7, "STATUS_BAD_VALIDATION_CLASS" }, { 0xC00000A8, "STATUS_BAD_TOKEN_TYPE" }, - { 0xC00000A9, "STATUS_BAD_MASTER_BOOT_RECORD" }, + { 0xC00000A9, "STATUS_BAD_MAIN_BOOT_RECORD" }, { 0xC00000AA, "STATUS_INSTRUCTION_MISALIGNMENT" }, { 0xC00000AB, "STATUS_INSTANCE_NOT_AVAILABLE" }, { 0xC00000AC, "STATUS_PIPE_NOT_AVAILABLE" }, Modified: head/lib/geom/part/gpart.8 ============================================================================== --- head/lib/geom/part/gpart.8 Sun Jun 21 11:48:55 2020 (r362465) +++ head/lib/geom/part/gpart.8 Sun Jun 21 13:34:08 2020 (r362466) @@ -582,7 +582,7 @@ Requires the .Cm GEOM_PART_GPT kernel option. .It Cm MBR -Master Boot Record is used on PCs and removable media. +Main Boot Record is used on PCs and removable media. Requires the .Cm GEOM_PART_MBR kernel option. @@ -852,7 +852,7 @@ for MBR and .Qq Li "!0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" for GPT. .It Cm mbr -A partition that is sub-partitioned by a Master Boot Record (MBR). +A partition that is sub-partitioned by a Main Boot Record (MBR). This type is known as .Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. @@ -1020,7 +1020,7 @@ option. The GEOM PART class knows how to safely embed bootstrap code into specific partitioning scheme metadata without causing any damage. .Pp -The Master Boot Record (MBR) uses a 512-byte bootstrap code image, embedded +The Main Boot Record (MBR) uses a 512-byte bootstrap code image, embedded into the partition table's metadata area. There are two variants of this bootstrap code: .Pa /boot/mbr @@ -1256,7 +1256,7 @@ present as independent partition. .Em NOTE : This may break a mirrored volume and lead to data damage. .It Va kern.geom.part.mbr.enforce_chs : No 0 -Specify how the Master Boot Record (MBR) module does alignment. +Specify how the Main Boot Record (MBR) module does alignment. If this variable is set to a non-zero value, the module will automatically recalculate the user-specified offset and size for alignment with the CHS geometry. Modified: head/stand/efi/include/efipart.h ============================================================================== --- head/stand/efi/include/efipart.h Sun Jun 21 11:48:55 2020 (r362465) +++ head/stand/efi/include/efipart.h Sun Jun 21 13:34:08 2020 (r362466) @@ -18,7 +18,7 @@ Module Name: efipart.h Abstract: - Info about disk partitions and Master Boot Records + Info about disk partitions and Main Boot Records @@ -62,7 +62,7 @@ typedef struct { UINT8 Unknown[2]; MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; UINT16 Signature; -} MASTER_BOOT_RECORD; +} MAIN_BOOT_RECORD; #pragma pack() Modified: head/stand/i386/boot0/boot0.S ============================================================================== --- head/stand/i386/boot0/boot0.S Sun Jun 21 11:48:55 2020 (r362465) +++ head/stand/i386/boot0/boot0.S Sun Jun 21 13:34:08 2020 (r362466) @@ -53,7 +53,7 @@ /* * BOOT BLOCK STRUCTURE * - * This code implements a Master Boot Record (MBR) for an Intel/PC disk. + * This code implements a Main Boot Record (MBR) for an Intel/PC disk. * It is 512 bytes long and it is normally loaded by the BIOS (or another * bootloader) at 0:0x7c00. This code depends on %cs:%ip being 0:0x7c00 * @@ -68,7 +68,7 @@ * (called 'packet') or CHS mode, whether to force a drive number, * and whether to write back the user's selection back to disk. * - * As in every Master Boot Record, the partition table is at 0x1be, + * As in every Main Boot Record, the partition table is at 0x1be, * made of four 16-byte entries each containing: * * OFF SIZE DESCRIPTION Modified: head/sys/dev/hptmv/vdevice.h ============================================================================== --- head/sys/dev/hptmv/vdevice.h Sun Jun 21 11:48:55 2020 (r362465) +++ head/sys/dev/hptmv/vdevice.h Sun Jun 21 13:34:08 2020 (r362466) @@ -260,13 +260,13 @@ struct fdisk_partition_table ULONG numsect; /* number of sectors in partition */ }; -typedef struct _Master_Boot_Record +typedef struct _Main_Boot_Record { UCHAR bootinst[446]; /* space to hold actual boot code */ struct fdisk_partition_table parts[4]; USHORT signature; /* set to 0xAA55 to indicate PC MBR format */ } -Master_Boot_Record, *PMaster_Boot_Record; +Main_Boot_Record, *PMain_Boot_Record; #ifndef SUPPORT_ARRAY /* TODO: move it later */ Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Sun Jun 21 11:48:55 2020 (r362465) +++ head/sys/geom/part/g_part_mbr.c Sun Jun 21 13:34:08 2020 (r362466) @@ -54,7 +54,7 @@ FEATURE(geom_part_mbr, "GEOM partitioning class for MB SYSCTL_DECL(_kern_geom_part); static SYSCTL_NODE(_kern_geom_part, OID_AUTO, mbr, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "GEOM_PART_MBR Master Boot Record"); + "GEOM_PART_MBR Main Boot Record"); static u_int enforce_chs = 0; SYSCTL_UINT(_kern_geom_part_mbr, OID_AUTO, enforce_chs, Modified: head/usr.bin/fortune/datfiles/freebsd-tips ============================================================================== --- head/usr.bin/fortune/datfiles/freebsd-tips Sun Jun 21 11:48:55 2020 (r362465) +++ head/usr.bin/fortune/datfiles/freebsd-tips Sun Jun 21 13:34:08 2020 (r362466) @@ -40,7 +40,7 @@ Handy bash(1) prompt: PS1="\u@\h \w \!$ " Having trouble using fetch through a firewall? Try setting the environment variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % -If other operating systems have damaged your Master Boot Record, you can +If other operating systems have damaged your Main Boot Record, you can reinstall it with gpart(8). See "man gpart" for details. % Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Sun Jun 21 11:48:55 2020 (r362465) +++ head/usr.bin/mkimg/mbr.c Sun Jun 21 13:34:08 2020 (r362466) @@ -112,7 +112,7 @@ mbr_write(lba_t imgsz __unused, void *bootcode) static struct mkimg_scheme mbr_scheme = { .name = "mbr", - .description = "Master Boot Record", + .description = "Main Boot Record", .aliases = mbr_aliases, .metadata = mbr_metadata, .write = mbr_write, Modified: head/usr.sbin/boot0cfg/boot0cfg.8 ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.8 Sun Jun 21 11:48:55 2020 (r362465) +++ head/usr.sbin/boot0cfg/boot0cfg.8 Sun Jun 21 13:34:08 2020 (r362466) @@ -68,7 +68,7 @@ boot manager on the specified and allows various operational parameters to be configured. .Pp On PCs, a boot manager typically occupies sector 0 of a disk, which is -known as the Master Boot Record (MBR). +known as the Main Boot Record (MBR). The MBR contains both code (to which control is passed by the PC BIOS) and data (an embedded table of defined slices). .Pp Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Sun Jun 21 11:48:55 2020 (r362465) +++ head/usr.sbin/boot0cfg/boot0cfg.c Sun Jun 21 13:34:08 2020 (r362466) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define MBRSIZE 512 /* master boot record size */ +#define MBRSIZE 512 /* main boot record size */ #define OFF_VERSION 0x1b0 /* offset: version number, only boot0version */ #define OFF_SERIAL 0x1b8 /* offset: volume serial number */ From owner-svn-src-head@freebsd.org Sun Jun 21 13:45:54 2020 Return-Path: Delivered-To: svn-src-head@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 C199534FD77; Sun, 21 Jun 2020 13:45:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYhy3z1tz40rj; Sun, 21 Jun 2020 13:45:54 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4BB52D70C; Sun, 21 Jun 2020 13:45:54 +0000 (UTC) Date: Sun, 21 Jun 2020 13:45:54 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621134554.GA8649@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006211334.05LDY91F058399@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:45:55 -0000 On Sun, Jun 21, 2020 at 01:34:09PM +0000, Hans Petter Selasky wrote: > New Revision: 362466 > URL: https://svnweb.freebsd.org/changeset/base/362466 > > Log: > Improve wording to be more precise and clear. > No functional change intended. Please revert. > ... > -# https://en.wikipedia.org/wiki/Master_boot_record#PTE > +# https://en.wikipedia.org/wiki/Main_boot_record#PTE Wikipedia does not have an article with this name. ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 13:47:18 2020 Return-Path: Delivered-To: svn-src-head@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 37402350315; Sun, 21 Jun 2020 13:47:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYkY3ywvz418V; Sun, 21 Jun 2020 13:47:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6B27F26010B; Sun, 21 Jun 2020 15:47:15 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> From: Hans Petter Selasky Message-ID: <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> Date: Sun, 21 Jun 2020 15:46:56 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200621134554.GA8649@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qYkY3ywvz418V X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:47:18 -0000 On 2020-06-21 15:45, Alexey Dokuchaev wrote: >> ... >> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE >> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE > Wikipedia does not have an article with this name. Yes, it does: https://en.wikipedia.org/wiki/Main_boot_record No, need to revert. --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 13:47:35 2020 Return-Path: Delivered-To: svn-src-head@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 AF23534FEE3; Sun, 21 Jun 2020 13:47:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYks5zGdz416y; Sun, 21 Jun 2020 13:47:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1592747244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rEyWXX7BBjga/6Qhu9dvfmYh/rEzTC3E425PfNulwPA=; b=h+byDURqwCkHkYsg2Xr3w7ibCeKxTOPfVTT9aSvqQEFswQNsVcXe70CJVeSecmNpdJymIR z5JZk8sVUoSRiyDhT1gN/JjsH5mJEcE54ul/P1+jq+xm+NZbaa/i3jUHFm9zzFxYhLYCI2 9kdr0OHvH8L9nMyzTmqLi4mdCDdLZDQ= Received: from amy.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 3b69e61e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 21 Jun 2020 13:47:23 +0000 (UTC) Date: Sun, 21 Jun 2020 15:47:23 +0200 From: Emmanuel Vadot To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-Id: <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> In-Reply-To: <202006211334.05LDY91F058399@repo.freebsd.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qYks5zGdz416y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=h+byDURq; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-2.98 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.04)[-1.045]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.032]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.40)[-0.402]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:47:35 -0000 On Sun, 21 Jun 2020 13:34:09 +0000 (UTC) Hans Petter Selasky wrote: > Author: hselasky > Date: Sun Jun 21 13:34:08 2020 > New Revision: 362466 > URL: https://svnweb.freebsd.org/changeset/base/362466 > > Log: > Improve wording to be more precise and clear. > No functional change intended. > > s/Master Boot/Main Boot/ (also called MBR) > > MFC after: 1 week > Sponsored by: Mellanox Technologies Hans, please revert this. What's more clear about calling something that is called Master Boot Record something else ? What's next ? Will you contact the BBC so they redub all Doctor Who episode where "The Master" appears ? Contact Disney so the release a new version of Tron where the Master Control Program is call the Main Control Program ? -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sun Jun 21 13:48:37 2020 Return-Path: Delivered-To: svn-src-head@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 EFA0E35039F; Sun, 21 Jun 2020 13:48:37 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYm440X8z41Jr; Sun, 21 Jun 2020 13:48:36 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1592747314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4IV0MXGZ8lB4NRPJcjMH90wU1vQVxzqccaDKoyUNQ8k=; b=jkHZXEHxrwkZ2kYUbUA1OWfceU/lDvh+2jg8gDspQXlCYsyIlR03G19/YFkXPVCtNiQSff w0JnfEaedNDkRrvPg42+M2IDhK9TYm1GW7rtXIketqDS3g0syrl2IUOemiUBziNkY6K1/X 1jrPjq8HEaBHhAr0nPp9vh3rj31TvTE= Received: from amy.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id eb296369 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 21 Jun 2020 13:48:34 +0000 (UTC) Date: Sun, 21 Jun 2020 15:48:33 +0200 From: Emmanuel Vadot To: Hans Petter Selasky Cc: Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-Id: <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> In-Reply-To: <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qYm440X8z41Jr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=jkHZXEHx; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.05)[-1.051]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.66)[-0.657]; NEURAL_HAM_MEDIUM(-1.05)[-1.053]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:48:38 -0000 On Sun, 21 Jun 2020 15:46:56 +0200 Hans Petter Selasky wrote: > On 2020-06-21 15:45, Alexey Dokuchaev wrote: > >> ... > >> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE > >> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE > > Wikipedia does not have an article with this name. > > Yes, it does: > https://en.wikipedia.org/wiki/Main_boot_record > > No, need to revert. > > --HPS So because some random person on the net created a redirection MBR is now defined at Main Boot Record ? WFT -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sun Jun 21 13:51:38 2020 Return-Path: Delivered-To: svn-src-head@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 878303504B5; Sun, 21 Jun 2020 13:51:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYqZ0P6Qz41YC; Sun, 21 Jun 2020 13:51:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EDD8F26010B; Sun, 21 Jun 2020 15:51:35 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... From: Hans Petter Selasky To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> Message-ID: <71b0d0f5-6be3-aa46-2262-150a43c1e5a7@selasky.org> Date: Sun, 21 Jun 2020 15:51:16 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qYqZ0P6Qz41YC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.04 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-0.96)[-0.965]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.18)[0.183]; NEURAL_HAM_MEDIUM(-0.96)[-0.956]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:51:38 -0000 On 2020-06-21 15:46, Hans Petter Selasky wrote: > On 2020-06-21 15:45, Alexey Dokuchaev wrote: >>> ... >>> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE >>> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE >> Wikipedia does not have an article with this name. > > Yes, it does: > https://en.wikipedia.org/wiki/Main_boot_record > When you enter "main boot record" in the search field, it automagically redirects to "master boot record". --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 13:53:14 2020 Return-Path: Delivered-To: svn-src-head@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 05F543502FB; Sun, 21 Jun 2020 13:53:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYsN68p9z41t6; Sun, 21 Jun 2020 13:53:12 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 05LDr201097103 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 21 Jun 2020 13:53:07 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: hselasky@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 05LDqvmK018595 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 21 Jun 2020 20:52:57 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> From: Eugene Grosbein Message-ID: Date: Sun, 21 Jun 2020 20:52:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <202006211334.05LDY91F058399@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 49qYsN68p9z41t6 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [0.14 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.44)[-0.443]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_SPAM_SHORT(0.41)[0.412]; RCVD_COUNT_THREE(0.00)[3]; R_SPF_PERMFAIL(0.00)[empty SPF record]; NEURAL_SPAM_LONG(0.27)[0.269]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:53:14 -0000 21.06.2020 20:34, Hans Petter Selasky wrote: > Author: hselasky > Date: Sun Jun 21 13:34:08 2020 > New Revision: 362466 > URL: https://svnweb.freebsd.org/changeset/base/362466 > > Log: > Improve wording to be more precise and clear. > No functional change intended. > > s/Master Boot/Main Boot/ (also called MBR) Please revert. No one has rights to rewrite history and create such a mess, and Master Boot Record is historical term. From owner-svn-src-head@freebsd.org Sun Jun 21 13:53:50 2020 Return-Path: Delivered-To: svn-src-head@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 9B7EA350596; Sun, 21 Jun 2020 13:53:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYt63dSrz41s0; Sun, 21 Jun 2020 13:53:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6D066DD98; Sun, 21 Jun 2020 13:53:50 +0000 (UTC) Date: Sun, 21 Jun 2020 13:53:50 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621135350.GB8649@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:53:50 -0000 On Sun, Jun 21, 2020 at 03:46:56PM +0200, Hans Petter Selasky wrote: > On 2020-06-21 15:45, Alexey Dokuchaev wrote: > >> ... > >> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE > >> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE > > Wikipedia does not have an article with this name. > > Yes, it does: > https://en.wikipedia.org/wiki/Main_boot_record No, it doesn't. The fast that it does not return 404 does not mean it exists, this is how wikis work. Please read the contents. > No, need to revert. Just as we managed to cool down this shitstorm of controversial commits hitting the tree undiscussed, you're pouring more oil to the flames. This has to stop. Again, this commit must be reverted and DR opened with proposed changes if you feel they're warranted, because IMHO they are not: as with "master volume", MBR has its well defined meaning, there's no "slave boot record" and hence this change was totally uncalled for. ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 13:55:08 2020 Return-Path: Delivered-To: svn-src-head@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 D264A3505A2 for ; Sun, 21 Jun 2020 13:55:08 +0000 (UTC) (envelope-from mrvmurray@icloud.com) Received: from st43p00im-ztbu10063601.me.com (st43p00im-ztbu10063601.me.com [17.58.63.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qYvb67Cxz41vX for ; Sun, 21 Jun 2020 13:55:07 +0000 (UTC) (envelope-from mrvmurray@icloud.com) Received: from graphologist.grondar.org (grouter.grondar.org [88.96.155.38]) by st43p00im-ztbu10063601.me.com (Postfix) with ESMTPSA id D3358700729; Sun, 21 Jun 2020 13:55:05 +0000 (UTC) Content-Type: multipart/signed; boundary="Apple-Mail=_BCBEC4DE-5D3F-470E-ACF5-3013E46889CA"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... From: Mark Murray In-Reply-To: <71b0d0f5-6be3-aa46-2262-150a43c1e5a7@selasky.org> Date: Sun, 21 Jun 2020 14:55:03 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0A767B40-44BC-40B6-B12F-86DFEEDE0B8B@icloud.com> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <71b0d0f5-6be3-aa46-2262-150a43c1e5a7@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-21_06:2020-06-19, 2020-06-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=975 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2004280000 definitions=main-2006210111 X-Rspamd-Queue-Id: 49qYvb67Cxz41vX X-Spamd-Bar: --------- X-Spamd-Result: default: False [-9.76 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[icloud.com]; MV_CASE(0.50)[]; HAS_ATTACHMENT(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; DKIM_TRACE(0.00)[icloud.com:+]; DMARC_POLICY_ALLOW(-0.50)[icloud.com,quarantine]; NEURAL_HAM_SHORT(-0.96)[-0.963]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[icloud.com]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[17.58.63.174:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.020]; R_DKIM_ALLOW(-0.20)[icloud.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.08)[-1.075]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DWL_DNSWL_LOW(-1.00)[icloud.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[icloud.com:d:+,icloud.com:s:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[17.58.63.174:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:55:08 -0000 --Apple-Mail=_BCBEC4DE-5D3F-470E-ACF5-3013E46889CA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 21 Jun 2020, at 14:51, Hans Petter Selasky wrote: >=20 > On 2020-06-21 15:46, Hans Petter Selasky wrote: >> On 2020-06-21 15:45, Alexey Dokuchaev wrote: >>>> ... >>>> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE >>>> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE >>> Wikipedia does not have an article with this name. >> Yes, it does: >> https://en.wikipedia.org/wiki/Main_boot_record >=20 > When you enter "main boot record" in the search field, it = automagically redirects to "master boot record". No, it doesn't. "Wikipedia does not have an article with this exact = name." M -- --Apple-Mail=_BCBEC4DE-5D3F-470E-ACF5-3013E46889CA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAl7vZrcACgkQQlsJDh9C UqC0Tgf+Lu4XoG2lx5osWAjHFAYvxF5X51tN6FpkSW5fysX3Lj68pUx9bjKFvKYo lpXw4+L5TH3Jxjk17CfZ9S4F25rnejbIw76DYiziqN78TDVoTRgHq0JAFAjbmHaK C+0PaI5OmJfYwdVpDRPqdw2wpkFL+eXtp6lYZiyup5MIa27dTccFtNEN/qSQG3TZ lEKyMm4DrU0UIKukq6dKRX0zV1YjJKzKOqcAXv/u+kYy+ZOGKG+roDkuRHASNmoT pkCtUKmb8zGBgELLKICn4DDhLSqpcpZqxIabz83AeJvXDpvQd0sjfmtQOt1nPW3B JekeMCSjfX8sl46d5WqSKWEss4VNZw== =QC+k -----END PGP SIGNATURE----- --Apple-Mail=_BCBEC4DE-5D3F-470E-ACF5-3013E46889CA-- From owner-svn-src-head@freebsd.org Sun Jun 21 13:59:12 2020 Return-Path: Delivered-To: svn-src-head@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 7FA813508AA; Sun, 21 Jun 2020 13:59:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZ0J2spyz429N; Sun, 21 Jun 2020 13:59:12 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4ECA0DF56; Sun, 21 Jun 2020 13:59:12 +0000 (UTC) Date: Sun, 21 Jun 2020 13:59:12 +0000 From: Alexey Dokuchaev To: Emmanuel Vadot Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621135912.GC8649@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:59:12 -0000 On Sun, Jun 21, 2020 at 03:48:33PM +0200, Emmanuel Vadot wrote: > On Sun, 21 Jun 2020 15:46:56 +0200 > Hans Petter Selasky wrote: > > On 2020-06-21 15:45, Alexey Dokuchaev wrote: > > >> ... > > >> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE > > >> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE > > > Wikipedia does not have an article with this name. > > > > Yes, it does: > > https://en.wikipedia.org/wiki/Main_boot_record > > > > No, need to revert. > > So because some random person on the net created a redirection MBR is > now defined at Main Boot Record ? WFT There's no redirection; this article simply does not exist (well, did not exist several minutes ago as apparently someone had added a draft for it just now). ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 13:59:19 2020 Return-Path: Delivered-To: svn-src-head@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 231D4350668; Sun, 21 Jun 2020 13:59:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZ0N40dDz429g; Sun, 21 Jun 2020 13:59:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 80A1326010B; Sun, 21 Jun 2020 15:59:14 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... From: Hans Petter Selasky To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> Message-ID: Date: Sun, 21 Jun 2020 15:58:55 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qZ0N40dDz429g X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.05 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-0.97)[-0.966]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.17)[0.173]; NEURAL_HAM_MEDIUM(-0.95)[-0.954]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 13:59:19 -0000 On 2020-06-21 15:46, Hans Petter Selasky wrote: > On 2020-06-21 15:45, Alexey Dokuchaev wrote: >>> ... >>> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE >>> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE >> Wikipedia does not have an article with this name. > > Yes, it does: > https://en.wikipedia.org/wiki/Main_boot_record > The Link will be there in a bit: https://en.wikipedia.org/w/index.php?title=Draft:Main_boot_record&action=edit --HPS https://en.wikipedia.org/wiki/Master_Boot_record From owner-svn-src-head@freebsd.org Sun Jun 21 14:02:57 2020 Return-Path: Delivered-To: svn-src-head@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 2618E35093A; Sun, 21 Jun 2020 14:02:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZ4d0CDzz42Yf; Sun, 21 Jun 2020 14:02:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E549FE310; Sun, 21 Jun 2020 14:02:56 +0000 (UTC) Date: Sun, 21 Jun 2020 14:02:56 +0000 From: Alexey Dokuchaev To: Emmanuel Vadot Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621140256.GD8649@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> <20200621135912.GC8649@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200621135912.GC8649@FreeBSD.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:02:57 -0000 On Sun, Jun 21, 2020 at 01:59:12PM +0000, Alexey Dokuchaev wrote: > On Sun, Jun 21, 2020 at 03:48:33PM +0200, Emmanuel Vadot wrote: > > On Sun, 21 Jun 2020 15:46:56 +0200 > > Hans Petter Selasky wrote: > > > On 2020-06-21 15:45, Alexey Dokuchaev wrote: > > > >> ... > > > >> -#https://en.wikipedia.org/wiki/Master_boot_record#PTE > > > >> +#https://en.wikipedia.org/wiki/Main_boot_record#PTE > > > > Wikipedia does not have an article with this name. > > > > > > Yes, it does: > > > https://en.wikipedia.org/wiki/Main_boot_record > > > > > > No, need to revert. > > > > So because some random person on the net created a redirection MBR is > > now defined at Main Boot Record ? WFT > > There's no redirection; this article simply does not exist (well, did > not exist several minutes ago as apparently someone had added a draft > for it just now). Last edited by Hselasky (talk | contribs) 0 seconds ago. Ah, so you first make changes to FreeBSD and then attempt to edit the Wikipedia to look like it supports your views? Seriously Hans?! ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 14:09:36 2020 Return-Path: Delivered-To: svn-src-head@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 D93AB3505FC; Sun, 21 Jun 2020 14:09:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZDJ3gW1z435W; Sun, 21 Jun 2020 14:09:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BFD3226010B; Sun, 21 Jun 2020 16:09:34 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexey Dokuchaev , Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> <20200621135912.GC8649@FreeBSD.org> <20200621140256.GD8649@FreeBSD.org> From: Hans Petter Selasky Message-ID: <56610200-f560-1ca4-626d-b5c9e826dfe9@selasky.org> Date: Sun, 21 Jun 2020 16:09:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200621140256.GD8649@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qZDJ3gW1z435W X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:09:36 -0000 Hi Alexey, On 2020-06-21 16:02, Alexey Dokuchaev wrote: > Last edited by Hselasky (talk | contribs) 0 seconds ago. > > Ah, so you first make changes to FreeBSD and then attempt to edit the > Wikipedia to look like it supports your views? Seriously Hans?! This is a chicken an egg problem. It was easier to start with FreeBSD and the follow up on Wikipedia. Anyways it is a comment in a text file and if it is not fixed in a few days time, I'll fix the link back to what it was. I'm not running away. --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 14:27:58 2020 Return-Path: Delivered-To: svn-src-head@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 E7E0C350EC7; Sun, 21 Jun 2020 14:27:58 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZdV5sYWz43mW; Sun, 21 Jun 2020 14:27:58 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id BB085E79E; Sun, 21 Jun 2020 14:27:58 +0000 (UTC) Date: Sun, 21 Jun 2020 14:27:58 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621142758.GA39778@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> <20200621135912.GC8649@FreeBSD.org> <20200621140256.GD8649@FreeBSD.org> <56610200-f560-1ca4-626d-b5c9e826dfe9@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56610200-f560-1ca4-626d-b5c9e826dfe9@selasky.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:27:59 -0000 On Sun, Jun 21, 2020 at 04:09:15PM +0200, Hans Petter Selasky wrote: > On 2020-06-21 16:02, Alexey Dokuchaev wrote: > > Last edited by Hselasky (talk | contribs) 0 seconds ago. > > > > Ah, so you first make changes to FreeBSD and then attempt to edit the > > Wikipedia to look like it supports your views? Seriously Hans?! > > This is a chicken an egg problem. It was easier to start with FreeBSD > and the follow up on Wikipedia. There is no chicken and egg problem here Hans. You're inventing bogus and unsound terminology that does no good and only confuses our users, code readers, and makes us as a project look like idiots. Several people had asked you to revert the commit. It was not properly reviewed, it solves no existing problem, but creates one instead. Please don't "fix" what ain't broken. ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 14:38:28 2020 Return-Path: Delivered-To: svn-src-head@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 AEDFB351427; Sun, 21 Jun 2020 14:38:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZsc0plBz44WV; Sun, 21 Jun 2020 14:38:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B54DF260494; Sun, 21 Jun 2020 16:38:26 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> From: Hans Petter Selasky Message-ID: Date: Sun, 21 Jun 2020 16:38:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qZsc0plBz44WV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.39 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.002]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.07)[-0.067]; NEURAL_HAM_MEDIUM(-1.02)[-1.018]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:38:28 -0000 On 2020-06-21 15:47, Emmanuel Vadot wrote: > What's more clear about calling something that is called Master Boot > Record something else ? > What's next ? Will you contact the BBC so they redub all Doctor Who > episode where "The Master" appears ? Contact Disney so the release a > new version of Tron where the Master Control Program is call the Main > Control Program ? Hi Manu, I didn't know BBC made such episodes. And no, I won't contact BBC nor Disney about this. The point here is that the Master's Boot Record may be very badly perceived by some people. Do I need to explain that? --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 14:43:04 2020 Return-Path: Delivered-To: svn-src-head@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 1569B351635; Sun, 21 Jun 2020 14:43:04 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qZyv2JWWz44dC; Sun, 21 Jun 2020 14:43:03 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-il1-x130.google.com with SMTP id p5so13711127ile.6; Sun, 21 Jun 2020 07:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sT4swQQvzCKU6FKOIH6HjHEGgYFYZk7CbQdUlPKJOQs=; b=TuB58UbX1oeVVq8Y1VzZzv4Ex1REJtnfz+kCh3pGUOZJCTAX9z/jbvu5yaZ0fJhi3O ljDQYLeYhi7nyuXnv6ozAWfrc8YiPQ/EmPJoq5HAK/jinQDBwzVGnTXv06RhL4MHEzZj ndSkbplvBxaeldJ2GqOcvEmQUju98mZ9I+3V9MWl8a0eXVGdkPsiXf5HnyLQDsqj1Y4d Tab+Oakmgf7nTU12GKOjHa0fQFasd9Vv8F/mxAeKvuN+cBbrGq7/wymUmovmF8XqYKYK XWpD//etLpGCGfybfhL8ie8Fc+lHlP6/5vPz3fFXBVKcQsFWFlTuq3mZDj0n/GYi2vNQ 7zSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sT4swQQvzCKU6FKOIH6HjHEGgYFYZk7CbQdUlPKJOQs=; b=PeZxtRXq08SVDNauZ1I0JHo2Iwjv1nr1Jyfj165BBESeZLF0607D39xXB9FPBdTyFM rHO9W9CaoWM4jnDW04kFJY+VWFUjcFERutLYRAV5VMq/FQlSV2wYujNwDV4oWv4TIpIJ WyJrKrCAPzLecs2UGNDJvBI2J14/E92x8xTZHL3I4jxTLzsA53s5w++ys1D5mJeHtWgZ 2HxiO/m0ZhpD0C+PmX1ULlgh0/alNBxFG53hYYjdennGORMlSYGH4uX2a6TKSRdSKqCP dbd+Yz0K+jLIz8NV6KBEMBw44AiiiQhMpjbsSNDt+reuIyk38zXw9KCHOifL6oDmuvdE t3ig== X-Gm-Message-State: AOAM531j/tzdqDfJWAbEyJ6vC+GyANvOfSg7+vmB1OJ5mDBZ1Gr5XpTY gHmHQigD5lPjeBsPp14o462tiDkEX8lNR7DcjXSRKncU X-Google-Smtp-Source: ABdhPJwNEnMxFjndv2C6W+1srdCEUgvsIpMllTII3phALz7b/Kiv1SdIurkWmIA/Mq2k2qQ0wMrN8NESubo7XEu0d+8= X-Received: by 2002:a92:d38b:: with SMTP id o11mr12833542ilo.47.1592750582273; Sun, 21 Jun 2020 07:43:02 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> In-Reply-To: From: Justin Hibbits Date: Sun, 21 Jun 2020 09:42:54 -0500 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49qZyv2JWWz44dC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=alumni-cwru-edu.20150623.gappssmtp.com header.s=20150623 header.b=TuB58UbX; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=cwru.edu (policy=none); spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-2.31 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[alumni-cwru-edu.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.98)[-0.975]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-0.87)[-0.873]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[alumni-cwru-edu.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.36)[-0.365]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::130:from]; FORGED_SENDER(0.30)[jrh29@alumni.cwru.edu,chmeeedalf@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[jrh29@alumni.cwru.edu,chmeeedalf@gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[cwru.edu : SPF not aligned (relaxed), DKIM not aligned (relaxed), none] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:43:04 -0000 On Sun, Jun 21, 2020, 09:38 Hans Petter Selasky wrote: > On 2020-06-21 15:47, Emmanuel Vadot wrote: > > What's more clear about calling something that is called Master Boot > > Record something else ? > > What's next ? Will you contact the BBC so they redub all Doctor Who > > episode where "The Master" appears ? Contact Disney so the release a > > new version of Tron where the Master Control Program is call the Main > > Control Program ? > > Hi Manu, > > I didn't know BBC made such episodes. > > And no, I won't contact BBC nor Disney about this. > > The point here is that the Master's Boot Record may be very badly > perceived by some people. Do I need to explain that? > > --HPS > No it can't. It's an absurd change. - Justin > From owner-svn-src-head@freebsd.org Sun Jun 21 14:44:08 2020 Return-Path: Delivered-To: svn-src-head@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 7C4E535163B for ; Sun, 21 Jun 2020 14:44:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qb066THvz4585 for ; Sun, 21 Jun 2020 14:44:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2b.google.com with SMTP id y9so6802905qvs.4 for ; Sun, 21 Jun 2020 07:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7RXr4nct9J1TWUokvdDZ10qg2wioDo3Q/LAjlUGyKJc=; b=jsGXzxkh9NRnAx2x6gzHG7NRwIO/fJv4g6zjDwsI5aZSJX6Bk/Ufz39rL2W1ZLHapz karL0wSKQyvIPtpZ9n93Yi8JTychR1QqQBgzwtAmvynh2Ga9sVv/lJQ37zNykgvm5/gn RGf/TPNNd/u9WH2RO4qLlPciamjTwbOq6Y/cIIOsos+Xk37uwQgV9yLMwvbC8gdL7nYX fEs7gJr6VEAA6R/xmKX2Q/UKDWh4m4DnsFYfXk/d4YGrKBFYHBKdbOk14zjGD8C4JC85 o63cec+cFlIW+DM0GRaDRp/htyjzmFqoZryuhKGhpKFTBlY/WQQE9Nc98FO0yB8F2hep M5oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7RXr4nct9J1TWUokvdDZ10qg2wioDo3Q/LAjlUGyKJc=; b=LZw2qTjduf83qhOjFxjpbe+iTgsoVhP7zfgQEPblVbAUi140mljMAHK308RLGF2y8Z KdtSAAfhVP6J9HB4RHm3Yg6SFFUfEwT2U29JsBbTjJaqVB/UwizVleyqUhit06YEBfLT es+QpVzX3Z0ESvtzKum8/7npj5X9aMy056jTdLPLXgdk7AYyW/8hzIa7T1AF1ZQHC4+j qQNMgZupy8RHBrZSHmyhY/4XziNDDPaK3KJWsf1WDBHoq/y+5RWQ6TWa4OurVAofv0LC 6jEXnJGQ/88e3O+Mypnrbb1+tEBrzgRmLPwssvXGvztHowTdtnCm9jLSxvp3p9NDUUN2 iKng== X-Gm-Message-State: AOAM530ydemVVlB+zR/vtppW2Rf1K4/Gxq0YfKg7E4Avelfm+IKK9Prh Uvva+SDR/BGRXiJ1GLTskwQgiLnBlasfVxro8oqBxw== X-Google-Smtp-Source: ABdhPJw5zWG8Tu1Nzany/hd2bY6fH7KljFO+3OPYnaaJelVR9oCAX8wNKtoC78bZi84dXSeY/wrIQxS2Q9PsTW2nXuo= X-Received: by 2002:a05:6214:922:: with SMTP id dk2mr17864920qvb.87.1592750645773; Sun, 21 Jun 2020 07:44:05 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> In-Reply-To: From: Warner Losh Date: Sun, 21 Jun 2020 08:43:54 -0600 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49qb066THvz4585 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=jsGXzxkh; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.02 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.94)[-0.944]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.59)[-0.586]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.49)[-0.491]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2b:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:44:08 -0000 On Sun, Jun 21, 2020, 8:38 AM Hans Petter Selasky wrote: > On 2020-06-21 15:47, Emmanuel Vadot wrote: > > What's more clear about calling something that is called Master Boot > > Record something else ? > > What's next ? Will you contact the BBC so they redub all Doctor Who > > episode where "The Master" appears ? Contact Disney so the release a > > new version of Tron where the Master Control Program is call the Main > > Control Program ? > > Hi Manu, > > I didn't know BBC made such episodes. > > And no, I won't contact BBC nor Disney about this. > > The point here is that the Master's Boot Record may be very badly > perceived by some people. Do I need to explain that? > Please revert. Another part if the guidance was that industry standard terms should be used until the industry renames them. This makes FreeBSD unique for no good reason. There also is no slave boot record. Master here comes from the same place as master key. Warner > > From owner-svn-src-head@freebsd.org Sun Jun 21 14:45:47 2020 Return-Path: Delivered-To: svn-src-head@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 49813351B14; Sun, 21 Jun 2020 14:45:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qb226yHhz45Pc; Sun, 21 Jun 2020 14:45:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7F0C42601B2; Sun, 21 Jun 2020 16:45:45 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexey Dokuchaev Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621134554.GA8649@FreeBSD.org> <7a0ff2d5-83df-eeec-d9a5-065fac342dfc@selasky.org> <20200621154833.f12693f783334c86f325ee46@bidouilliste.com> <20200621135912.GC8649@FreeBSD.org> <20200621140256.GD8649@FreeBSD.org> <56610200-f560-1ca4-626d-b5c9e826dfe9@selasky.org> <20200621142758.GA39778@FreeBSD.org> From: Hans Petter Selasky Message-ID: Date: Sun, 21 Jun 2020 16:45:26 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200621142758.GA39778@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qb226yHhz45Pc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:45:47 -0000 Hi Alexey, On 2020-06-21 16:27, Alexey Dokuchaev wrote: > There is no chicken and egg problem here Hans. You're inventing bogus > and unsound terminology that does no good and only confuses our users, > code readers, and makes us as a project look like idiots. There is no unsound terminology: https://www.google.com/search?q=main+boot+record At least Google knows exactly what I mean, even without asking if I want to search for "main boot loader" or "master boot loader"! > Several people had asked you to revert the commit. It was not properly > reviewed, it solves no existing problem, but creates one instead. Like said, there no real breakage. And if you find more that is broken I will write it down, like the Wikipedia link and fix it. Please give me some time. --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 14:48:34 2020 Return-Path: Delivered-To: svn-src-head@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 80D2E351BB0; Sun, 21 Jun 2020 14:48:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qb5F6hRCz45VK; Sun, 21 Jun 2020 14:48:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 40FD92601A8; Sun, 21 Jun 2020 16:48:31 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Warner Losh Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> From: Hans Petter Selasky Message-ID: Date: Sun, 21 Jun 2020 16:48:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qb5F6hRCz45VK X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-0.98)[-0.976]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.04)[-1.039]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.69)[-0.695]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:48:34 -0000 On 2020-06-21 16:43, Warner Losh wrote: > Please revert. Another part if the guidance was that industry standard > terms should be used until the industry renames them. This makes FreeBSD > unique for no good reason. Hi Warner, Have you forgotten that FreeBSD is an industry leader in many areas and we are the ones making the standards of the future! --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 14:54:46 2020 Return-Path: Delivered-To: svn-src-head@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 4A7EB35210B for ; Sun, 21 Jun 2020 14:54:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qbDP2Xcrz46Gb for ; Sun, 21 Jun 2020 14:54:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id g13so475432qtv.8 for ; Sun, 21 Jun 2020 07:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I7NaErFiaxb3YABGfHqhXAzP/zFXvrV8p/B+8hWq1Hc=; b=a/2/OI81nLHl9E6yArjTVWu3xSORiFnQb1dPp3F9yNQ2FUgeKPU1iOad1+YnobrZD0 1w47p7N8B/MGPVhHcZzSdaK3r99VsKUF4DvVwVzzIh/xzFbcyfAwy8N3mZLD/Mywx5i6 SC7eUzuh7kUyIT5SyEND5QhCzxU4IYlgHhLmBkaMakHhxUxK+8PSTrMkguVx3XrRv2ML Zrf0QTUzEtp28qx+V5YOahax+0X8USsN30UHcC69CqDEBJdT4UZoqH1fp/L78d+4QGQL I4ZCqmeMD4BgCrq21XZ0uc7X6nflUT800vHFb2Nx5lBPHHHjaR4kIzcyqo6mce0mrbdS UTTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I7NaErFiaxb3YABGfHqhXAzP/zFXvrV8p/B+8hWq1Hc=; b=VUG+oQIgsxKhTPQDvrhCtCmHQ/wG4iLdOKYpTBDsKKF29VBuB7PV0ifL0OAR40jIK+ rp/WVWFa9KwBjtpmspNCQG5xV6HPRKr2XEna2zaWsTCLCmI0Wh80kSvgsLL4HDXAJCGM w/VTPCw113PxSg3wYUTK11b/7CavHA8TIL5HaqYb6rzl3V73jnD9dwSNu2awfDod7VgX znwvRLv5twM6G9QImEk2H/18kEnDSQhxRMsJkFEKcFk5kk4cUzDNh9Wn7PcVbaWJklLO b/AmdejUt/MHDwZFY0W/bXHhJXg4ZnlXu++8a/iwF2pPbZxKxedekE64NA3hogbVul/n JRuQ== X-Gm-Message-State: AOAM533Q2SNCQvZTnmDLLUNenYxWDOv41Z1Vbc61QP8wUW4mFD3O4LUP T/0cKVGEVrCosZfnY1K+NDF/JKhO0PWSTxIuEKB8mh+Z X-Google-Smtp-Source: ABdhPJyzX+liQzEPpUqUdVb694ZA4hYC9c50pq+diInyNqd9xeI0Burb1cm9qw5gz//qMrnw10w00HvANZBD2Ct6ebM= X-Received: by 2002:ac8:311d:: with SMTP id g29mr12761019qtb.242.1592751284340; Sun, 21 Jun 2020 07:54:44 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> In-Reply-To: From: Warner Losh Date: Sun, 21 Jun 2020 08:54:32 -0600 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49qbDP2Xcrz46Gb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=a/2/OI81; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::836) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.02 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.94)[-0.944]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.59)[-0.588]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.49)[-0.490]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::836:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:54:46 -0000 On Sun, Jun 21, 2020, 8:48 AM Hans Petter Selasky wrote: > On 2020-06-21 16:43, Warner Losh wrote: > > Please revert. Another part if the guidance was that industry standard > > terms should be used until the industry renames them. This makes FreeBSD > > unique for no good reason. > > Hi Warner, > > Have you forgotten that FreeBSD is an industry leader in many areas and > we are the ones making the standards of the future! > Please back this out. This is not a standard term and we are too small to innovate and set one here. Warner > From owner-svn-src-head@freebsd.org Sun Jun 21 14:59:26 2020 Return-Path: Delivered-To: svn-src-head@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 25D683520AE; Sun, 21 Jun 2020 14:59:26 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qbKn04jxz4694; Sun, 21 Jun 2020 14:59:24 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 05LExEon097764 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 21 Jun 2020 14:59:18 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: hps@selasky.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 05LExAff019049 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 21 Jun 2020 21:59:10 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky , Warner Losh References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> Cc: Emmanuel Vadot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <8d505631-55d6-5c6f-6373-c3559e7ee0bb@grosbein.net> Date: Sun, 21 Jun 2020 21:59:04 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 49qbKn04jxz4694 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-1.17 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.76)[-0.764]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_PERMFAIL(0.00)[empty SPF record]; NEURAL_SPAM_LONG(0.18)[0.183]; NEURAL_HAM_SHORT(-0.49)[-0.487]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 14:59:26 -0000 21.06.2020 21:48, Hans Petter Selasky wrote: > On 2020-06-21 16:43, Warner Losh wrote: >> Please revert. Another part if the guidance was that industry standard >> terms should be used until the industry renames them. This makes FreeBSD >> unique for no good reason. > > Hi Warner, > > Have you forgotten that FreeBSD is an industry leader in many areas and we are the ones making the standards of the future! Even if you are trying make "a precedent" of commit+backout here, it's still wrong. If you are serious... We've already seen really sad example of one of committers, please don't go that way, I really appreciate your past contributions. From owner-svn-src-head@freebsd.org Sun Jun 21 15:35:05 2020 Return-Path: Delivered-To: svn-src-head@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 31055352C87; Sun, 21 Jun 2020 15:35:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qc6w1Wqyz47js; Sun, 21 Jun 2020 15:35:03 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id r22so11947825qke.13; Sun, 21 Jun 2020 08:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S3e9th8Mq/WjWpgf42gqRHje9Nd3yZLaWy4b2GCHzZ8=; b=jpfY+fvj+2GaN1+DS7Nx+6IFyWaLWwgavDrBjs/Of0waQzUm2DSv3wIL7rMIJnzhQY 2rG2moTUvjcXUCIfmOD3CbDdCRl259In3Nn4ZTnynJPdIzH3lA5W5HVwEXWG5dLc/Tc8 rsWwHla0v2Ga4jyWusUfyTubmhpqtz5lILaaYBwNjBdjaMU0+ELBdCkECTT2F2TOr/hb aOWqux1usJkQDVVEGZ4hwyUEguaRYWk3lSgivda2TMQZtH9abgEE5/qv8Px26eReOBEA G96GXe2ApxRv+NOj7v50e/K32Zeaki97Ubjgwgyr7ycerFqywocY2vl8F52k0CUcufmB YCBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=S3e9th8Mq/WjWpgf42gqRHje9Nd3yZLaWy4b2GCHzZ8=; b=CQNiOCrKeEJqcjxhAPKLWAl5uybhwuD8LfnGTX3tKyXWBntSklnAEsqVGFaFi+2H4C WVbf3Put08uxOZH+b8SVMqjy4mjHENZdWJEirkK9lmel/ubIc9QJTOn2m5lr8D3DNB6N SB9xY6YQ4x+du6THz4xBqAEwOxflzOC4FW8WWkb18jCxpRYVC5l9TNqLTh9ZxZVpmbjM I6X4TThKiIcmI74T0Hq/nJrdosO12hTlGj8EbkUqrxA1q9k9lSuzd4vXJRfvcuK6Q1ZF o8qo7I8rhzi0o48x5v5kS4ylSscwSgOQVffgO/XPuvsdLXOVM2MsUbCh/iyX33gm1NQ9 CPcg== X-Gm-Message-State: AOAM5306JlFuLfsBoiMk0QLlDHyW3WkqFUlua8LsQOwD86xb38DkGsrt S84mCw1x9/7E5AQ0nBxW+9pZp75rnss= X-Google-Smtp-Source: ABdhPJygUUzEkUSqsEelK/PLoZTiX30n7kSZoHcGnXmXp6mORQyEmOJn1fFPBOgWfGUqJ5Nn7LZl2w== X-Received: by 2002:a37:2781:: with SMTP id n123mr12244489qkn.106.1592753702502; Sun, 21 Jun 2020 08:35:02 -0700 (PDT) Received: from spectre.mavhome.dp.ua ([2600:1700:3580:3560:228:f8ff:fe04:d12]) by smtp.gmail.com with ESMTPSA id g11sm11607658qkk.123.2020.06.21.08.35.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 08:35:01 -0700 (PDT) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> From: Alexander Motin Autocrypt: addr=mavbsd@gmail.com; prefer-encrypt=mutual; keydata= mQENBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAG0IkFsZXhhbmRlciBNb3RpbiA8bWF2YnNkQGdtYWlsLmNvbT6JAVQEEwEKAD4CGwMFCwkI BwMFFQoJCAsFFgMCAQACHgECF4AWIQTpjPPE5pzDzQ5XnVWDGMOVW6sifwUCWWDCtwUJDTHM ogAKCRCDGMOVW6sif7nYB/9TpvgdnxMVBT9aPaaGrFOToI8lV5eCUIB3ot6+VbfeMam0nkFZ GGoaXvDMdIf++1jFADTP+hcl1fIrrH1uy2ZS1tDu3Ngd6BUCAcHcbFEqEZnCwzQTkULHbYGJ pHxKAvQYIvrOTpBb4IBHBO44lOVC21VYj8ii6hTr1ACqYa4SbIaQobByWkWErHNGN9A64LFS rbir4mXJ0Bo0vgfj3jtoGEV8RrbYseYBR2NOaw+1GjRMjoJxyTMgU1XNDZHAVGHiw/KG2cR8 EH4rqj47fLWJLWZy/ffUsWmqDnWvqswbzZjQXT8B4Yls9aqum5pykoNKtbAFT8Xpb/Y9RE1s nkXTuQENBFOzxAwBCADmYFn9nCSLvufCMz9nZFxP7q497a+Dqqwf8hxllH+9S8+g9BYumQF4 A7ZnBSxj3zMlriwL0jPsZqILpO8wuIUQWL0MnJiIbqgatYztVqf2fpaaDzP9XA2C5/BZb5iP 3ONDIVGYd+OQwOI2FlmmTY0B1FlUNXz3+feb3VVTD0/2mxPBOQ2hen0pEZqhU5n2EZH27d8r VPDXVGqQ3CVWO3BD9pyQVTWT5ziDm0f2SIEsY46xuaN+Ml6KnrqfCb8BL/vzcpc87slxGUdR HRCM0P2tZ4f9I+DV7c2RKiluGk1pZkqm+sDfI4dTkjjqpGLH5xN538XGW8YuCEaDUGJZufUf ABEBAAGJATwEGAEKACYCGwwWIQTpjPPE5pzDzQ5XnVWDGMOVW6sifwUCWWDC2AUJDTHMzAAK CRCDGMOVW6sif06oB/0UBwpZL3nBNNutpcCqD/5tDIeCOUy0YKCSZ/EuxtQZ6qIWCZIi6gOs Xurqxg+zqnTQJddlG641m3SVfs73mt7yaDODGbmImKxml1scxV6liXD8DFPbAIfDEYIR7rgu b4D2+OU537cPf/p9IvBn1YUITqnqVBnUIODT3F74kpKAL4oOqafS3MYrJ9IK6FECrdeRnLEv WHEFoN4/R54qXOjLuNeh1/fBW9ddzRyanNoHkxy5EcrgRTqMiKgejfRio8zgCM8cbFXZfU3r 8BrK6eDOP0Rc1m0oLGzp2xO+OeJZrlWRn0XhI51JvER6fUNlFil5ad3sZWY7zqf7lRKQoJc+ tCJBbGV4YW5kZXIgTW90aW4gPG1hdmJzZEBnbWFpbC5jb20+uQENBFOzxAwBCADmYFn9nCSL vufCMz9nZFxP7q497a+Dqqwf8hxllH+9S8+g9BYumQF4A7ZnBSxj3zMlriwL0jPsZqILpO8w uIUQWL0MnJiIbqgatYztVqf2fpaaDzP9XA2C5/BZb5iP3ONDIVGYd+OQwOI2FlmmTY0B1FlU NXz3+feb3VVTD0/2mxPBOQ2hen0pEZqhU5n2EZH27d8rVPDXVGqQ3CVWO3BD9pyQVTWT5ziD m0f2SIEsY46xuaN+Ml6KnrqfCb8BL/vzcpc87slxGUdRHRCM0P2tZ4f9I+DV7c2RKiluGk1p Zkqm+sDfI4dTkjjqpGLH5xN538XGW8YuCEaDUGJZufUfABEBAAGJATwEGAEKACYCGwwWIQTp jPPE5pzDzQ5XnVWDGMOVW6sifwUCWWDC2AUJDTHMzAAKCRCDGMOVW6sif06oB/0UBwpZL3nB NNutpcCqD/5tDIeCOUy0YKCSZ/EuxtQZ6qIWCZIi6gOsXurqxg+zqnTQJddlG641m3SVfs73 mt7yaDODGbmImKxml1scxV6liXD8DFPbAIfDEYIR7rgub4D2+OU537cPf/p9IvBn1YUITqnq VBnUIODT3F74kpKAL4oOqafS3MYrJ9IK6FECrdeRnLEvWHEFoN4/R54qXOjLuNeh1/fBW9dd zRyanNoHkxy5EcrgRTqMiKgejfRio8zgCM8cbFXZfU3r8BrK6eDOP0Rc1m0oLGzp2xO+OeJZ rlWRn0XhI51JvER6fUNlFil5ad3sZWY7zqf7lRKQoJc+ Message-ID: <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> Date: Sun, 21 Jun 2020 11:35:00 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49qc6w1Wqyz47js X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=jpfY+fvj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::731 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-3.78 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.05)[-1.051]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.05)[-1.049]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::731:from]; NEURAL_HAM_SHORT(-0.68)[-0.684]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 15:35:05 -0000 On 21.06.2020 10:48, Hans Petter Selasky wrote: > On 2020-06-21 16:43, Warner Losh wrote: >> Please revert. Another part if the guidance was that industry standard >> terms should be used until the industry renames them. This makes FreeBSD >> unique for no good reason. > > Have you forgotten that FreeBSD is an industry leader in many areas and > we are the ones making the standards of the future! Please revert. This is not the area we should make standards at. Besides, you've modified contributed software (file and tcpdump) for no FreeBSD-specifc reason instead of properly upstreaming your change, if you really like so. -- Alexander Motin From owner-svn-src-head@freebsd.org Sun Jun 21 15:38:03 2020 Return-Path: Delivered-To: svn-src-head@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 4F4FC352CCF; Sun, 21 Jun 2020 15:38:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcBL38Sjz484Q; Sun, 21 Jun 2020 15:38:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7D5102601A8; Sun, 21 Jun 2020 17:38:00 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexander Motin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> From: Hans Petter Selasky Message-ID: <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> Date: Sun, 21 Jun 2020 17:37:41 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qcBL38Sjz484Q X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.64 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-0.88)[-0.884]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.948]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.51)[-0.512]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 15:38:03 -0000 On 2020-06-21 17:35, Alexander Motin wrote: > Please revert. This is not the area we should make standards at. > Besides, you've modified contributed software (file and tcpdump) for no > FreeBSD-specifc reason instead of properly upstreaming your change, if > you really like so. Noted. --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 15:52:14 2020 Return-Path: Delivered-To: svn-src-head@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 E6E8D353437; Sun, 21 Jun 2020 15:52:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcVk0C4bz49HL; Sun, 21 Jun 2020 15:52:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f196.google.com with SMTP id i1so13748829ils.11; Sun, 21 Jun 2020 08:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jkgIYO8tjb1Z4+dXKOxeyk0Cek0gEnbGp4YMCRDEJKA=; b=Dr63cL9U7LEhM0FRI9ZNgdE9RudzjxUOyGgtR+Wjard6Ap//uSkx2wEzFJ/wLdVioa xykk61Yplqbr2XvcZGegRSFVwsH2oCuGfovRllDBQOIbFlIEPF2OX9YP2lH75wfpCQGg +vGV5uF77K3g+XHgs3wUGeAaQPlx7LWurTtvwYxDLIzF15BDNPMbKe078o8RyIwTEd6i Th9Ev/gJXBwTl6mIMvglAt2pasT+b4hb/8YMdnqQcM8YTqwVVJGyP4Fy6GoZf3pRXIqr njasBdBGgwCzJrGbsFoL2dSaxkK5ypyBZRtnXjvl5+hQWN0QUGnJyP1ETTqnazLE3UdU 1RfQ== X-Gm-Message-State: AOAM533LH16wdSeC7ZU/JFR90ck/FuFWCYfvUh6bvzqqBE8O2yPxwsbU Et4hYbYq0OeceaE4lj9KJmR/qeTOriciTmsVHm8= X-Google-Smtp-Source: ABdhPJxqsY4aBQVS27r3Jd1PH7jPY/dMC0aYcD9YwySzokKSlrQdL5MMQdXaAaVSD5yuHGyzRwqZsp47BhMNjPK3lNI= X-Received: by 2002:a92:dccd:: with SMTP id b13mr12527569ilr.98.1592754732650; Sun, 21 Jun 2020 08:52:12 -0700 (PDT) MIME-Version: 1.0 References: <202006171011.05HABsxP061357@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Sun, 21 Jun 2020 11:52:00 -0400 Message-ID: Subject: Re: svn commit: r362261 - head/contrib/file/magic/Magdir To: Xin LI Cc: Antoine Brodin , src-committers , svn-src-all , svn-src-head , christos@netbsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49qcVk0C4bz49HL X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.196 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-1.10 / 15.00]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.04)[-0.037]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.88)[-0.876]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.19)[-0.190]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.196:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.196:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 15:52:15 -0000 On Wed, 17 Jun 2020 at 12:10, Xin Li wrote: > > Hi, > > On 6/17/20 3:11 AM, Antoine Brodin wrote: > > Author: antoine > > Date: Wed Jun 17 10:11:54 2020 > > New Revision: 362261 > > URL: https://svnweb.freebsd.org/changeset/base/362261 > > > > Log: > > Re-apply r333944 to unbreak ports > > Could you please file a bug against the upstream (Christos cc'ed), as it > may also affect other users? Also PR 246960. I'm still looking into things but I think that file upstream is correct and we just need to revert r362261. From owner-svn-src-head@freebsd.org Sun Jun 21 15:53:58 2020 Return-Path: Delivered-To: svn-src-head@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 A63DA353262; Sun, 21 Jun 2020 15:53:58 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcXj3W2yz49Yd; Sun, 21 Jun 2020 15:53:57 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: by mail-ot1-x344.google.com with SMTP id g7so11102763oti.13; Sun, 21 Jun 2020 08:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gVEEMNyRkoaVBAa8wQRJNggq2LtvryzCIUH9C/cc0uU=; b=mpQMF1NN5UGdWIaFcQpdQPaIWdo9pwFAzYoBE8SEALh2aFyhlDMMPxilwaqPHs32A1 qear6OHWQSpdfdm46YcMFDvY++ldbVS539TEz2IcDBj7jA/9Q7DSs9ixpFQ5s4XmKfLh +f/B0HY58sJUd+wfl+HuoE+XvepmJSLd44lDj0sD78GjYc3V5f/EsTLzNkgfqWau/6qE MAkdoaZIIO3G7wVig8tr+THIdbVZKU/o8M+8nURSA0RtAUB+ETOZc9IInnUtxZGCZfFe opKPNg9HmDLKckTXNA9oq6OzAR81JwiMsp0wycFlhaipx1KgQh8WCuWfLQh27gLm3ZK+ wrWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gVEEMNyRkoaVBAa8wQRJNggq2LtvryzCIUH9C/cc0uU=; b=dJOq2OHA3hYA5Zp86x/WcyTKg2Tk4kjTt9CPHO6iOQykl6MG724ycz6U1EWCIAFSGt PEKxwDrj76kXQEIeR8CUB+EOT8bVCnfOQTlSdCVZCc9WI4YlzvGAul226+YnH7Llpatn mhC5EudrQfzl54fCgzGVJR5VPfzyOG8zR/YEHBzWyFGh1F2BdswI7Sm7F1/nBXAKRit5 hSuLkim+TstRHJBJhtcQlA6nN4DoHh7WKoiiRBfPjpde5jyrfDuIsJyaTlZ5yR6uqvZy VSE/4/X3fC6T+/ksH9k8RswTlUEcyI5/VoMlYxOXIJOuls6CLmG8S7YGxEcTUqSuzhUk 6tQQ== X-Gm-Message-State: AOAM532HEsjeyl8qOG4FMIqaloRNfe8o1SHsptaa2TbZZC82CTX+nfXz 8u1ZOizfOaHL5nS8/he/YL1uuihubt4FMqyqiZ8= X-Google-Smtp-Source: ABdhPJyvQXPVfYoUTT6jcHl8IEbmc/h0hCIWJKq8mpNd084fGJduyh6AR+EfXrhy0q4LRhBoxYSrwtgHNFvd8O3xSeA= X-Received: by 2002:a9d:7f8c:: with SMTP id t12mr10903632otp.66.1592754836222; Sun, 21 Jun 2020 08:53:56 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> In-Reply-To: <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> From: Alexandr Kovalenko Date: Sun, 21 Jun 2020 16:53:55 +0100 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49qcXj3W2yz49Yd X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=mpQMF1NN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of alexandrkovalenko@gmail.com designates 2607:f8b0:4864:20::344 as permitted sender) smtp.mailfrom=alexandrkovalenko@gmail.com X-Spamd-Result: default: False [-3.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.06)[-1.064]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-1.06)[-1.061]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::344:from]; NEURAL_HAM_SHORT(-0.41)[-0.410]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 15:53:58 -0000 On Sun, Jun 21, 2020 at 4:38 PM Hans Petter Selasky wrote: > > On 2020-06-21 17:35, Alexander Motin wrote: > > Please revert. This is not the area we should make standards at. > > Besides, you've modified contributed software (file and tcpdump) for no > > FreeBSD-specifc reason instead of properly upstreaming your change, if > > you really like so. > > Noted. I wonder should we also rename Master's Degree? Would you throw away yours? https://en.wiktionary.org/wiki/master (engineering, computing) A device that is controlling other devices or is an authoritative source.a master wheela master database P.S. Making commit, then creating Wikipedia article based on commit and then using that wiki page to defend your commit - you don't feel that something is fishy here? -- Alexandr Kovalenko http://uafug.org.ua/ From owner-svn-src-head@freebsd.org Sun Jun 21 16:02:04 2020 Return-Path: Delivered-To: svn-src-head@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 263313539F8; Sun, 21 Jun 2020 16:02:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qck326pSz4BN8; Sun, 21 Jun 2020 16:02:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B16F726010C; Sun, 21 Jun 2020 18:01:59 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexandr Kovalenko Cc: Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> From: Hans Petter Selasky Message-ID: Date: Sun, 21 Jun 2020 18:01:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qck326pSz4BN8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.71 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-0.97)[-0.971]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.47)[-0.469]; NEURAL_HAM_MEDIUM(-0.97)[-0.975]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:02:04 -0000 On 2020-06-21 17:53, Alexandr Kovalenko wrote: > On Sun, Jun 21, 2020 at 4:38 PM Hans Petter Selasky wrote: >> >> On 2020-06-21 17:35, Alexander Motin wrote: >>> Please revert. This is not the area we should make standards at. >>> Besides, you've modified contributed software (file and tcpdump) for no >>> FreeBSD-specifc reason instead of properly upstreaming your change, if >>> you really like so. >> >> Noted. > > I wonder should we also rename Master's Degree? Would you throw away yours? > > https://en.wiktionary.org/wiki/master I don't see a problem if you have a main computer degree. Actually you have a very good point. Didn't think of that yet. I should be more proud of my Bachelor's than my Masters's apparently. > > (engineering, computing) A device that is controlling other devices or > is an authoritative source.a master wheela master database > > P.S. Making commit, then creating Wikipedia article based on commit > and then using that wiki page to defend your commit - you don't feel > that something is fishy here? > Isn't this within what is acceptable? Someone committed something, it broke something unforeseen, and we respond and fix it. FreeBSD head is for trying out things. And I did not MFC anything yet! --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 16:11:57 2020 Return-Path: Delivered-To: svn-src-head@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 1739C3540E1; Sun, 21 Jun 2020 16:11:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcxS6tyYz4CPw; Sun, 21 Jun 2020 16:11:56 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E0E9B108FD; Sun, 21 Jun 2020 16:11:56 +0000 (UTC) Date: Sun, 21 Jun 2020 16:11:56 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Cc: Alexandr Kovalenko , Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200621161156.GA66951@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:11:57 -0000 On Sun, Jun 21, 2020 at 06:01:40PM +0200, Hans Petter Selasky wrote: > On 2020-06-21 17:53, Alexandr Kovalenko wrote: > > I wonder should we also rename Master's Degree? Would you throw > > away yours? > > https://en.wiktionary.org/wiki/master > > I don't see a problem if you have a main computer degree. *facepalm* > Actually you have a very good point. Didn't think of that yet. I > should be more proud of my Bachelor's than my Masters's apparently. Hans, if you wanted to make reductio ad absurdum, that point is seen. Now, please revert the commit. We are *already losing developers* because of all this shit and it must be stopped. This is definitely not the right time to make such changes in such manner, leaving alone the need for the changes per se. ./danfe From owner-svn-src-head@freebsd.org Sun Jun 21 16:41:34 2020 Return-Path: Delivered-To: svn-src-head@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 41FAD354A56; Sun, 21 Jun 2020 16:41:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qdbf0lnmz4F19; Sun, 21 Jun 2020 16:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 71CAE26010C; Sun, 21 Jun 2020 18:41:32 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexey Dokuchaev Cc: Alexandr Kovalenko , Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> <20200621161156.GA66951@FreeBSD.org> From: Hans Petter Selasky Message-ID: <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> Date: Sun, 21 Jun 2020 18:41:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200621161156.GA66951@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qdbf0lnmz4F19 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:41:34 -0000 Hi Alexey, On 2020-06-21 18:11, Alexey Dokuchaev wrote: > On Sun, Jun 21, 2020 at 06:01:40PM +0200, Hans Petter Selasky wrote: >> On 2020-06-21 17:53, Alexandr Kovalenko wrote: >>> I wonder should we also rename Master's Degree? Would you throw >>> away yours? >>> https://en.wiktionary.org/wiki/master >> >> I don't see a problem if you have a main computer degree. > > *facepalm* If you got a Master's degree in South Africa under Apartheid, to many people that is still symbolic. https://en.wikipedia.org/wiki/Apartheid#Education Apartheid is not very long ago and the people that experienced this are still alive. > >> Actually you have a very good point. Didn't think of that yet. I >> should be more proud of my Bachelor's than my Masters's apparently. > > Hans, if you wanted to make reductio ad absurdum, that point is seen. > Now, please revert the commit. We are *already losing developers* > because of all this shit and it must be stopped. This is definitely > not the right time to make such changes in such manner, leaving alone > the need for the changes per se. Really? --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 16:54:19 2020 Return-Path: Delivered-To: svn-src-head@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 8D2E7354DD7; Sun, 21 Jun 2020 16:54:19 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qdtL4QJxz4FpL; Sun, 21 Jun 2020 16:54:18 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: by mail-oi1-x243.google.com with SMTP id t25so13466375oij.7; Sun, 21 Jun 2020 09:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ebFVgA5Fk+pRPLFzZmukN59lxwHQqHw6hnLf93bV2Mk=; b=dE3s7O+d7p9FX42DX3UeahKQR6zKfvYO5DOjpoaW7c7ThMjtKHR9NdG1xr53OEQ6Lv VFIH2LlgaF2kLDw+HGU8mVrHOMSvCjfjFRHbLrqEyi9XJ33wKFVZFkOSntYAjr6A3SPK bToDv328hy8u2Ov1XippvBUtmMby58UH4Q+wJzGfDIwkSsOFSO30YYg6bvAMoa7a+fa3 qqL2i0gYj82myGpB3wyQ6fD/T+vY0WIWNcwkJ0y0pI/N3duq7EWCB/cBRwak3t0hDwRw u6gAQ6ePgkXDYn2EuolJiHn8Zuo4r5mVVLE50MXSSR0JYcYL6I27+QyWWJffAUo5UkOx Cqmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ebFVgA5Fk+pRPLFzZmukN59lxwHQqHw6hnLf93bV2Mk=; b=H6QOvFqFQWKxkSWZEGuXoVPo7VZ1bDPTIJ3/A2im7zd7EeuodEvTDrBMg0ZWc9g2hG RueeZ8oO8c5Xo819gfbyom+0YBCB5JmLfVxQJTG+I8LuYyp+6iY2kkNmmXrivC0shVuU 1ssm4SFdkI2EQ5Ojk90ffoOyfzSlWRaVdBW7YPoF1O2ZU2ug5aFAuCsQyEJnJL4hdBy+ DxzChVmSdQqV3tPcy5HTmZBnBlFBYciti2vGF7hMWxT3qORs7uVUPls4ERVO7Vduo7RV r6zMerMVm7qwX1aTaXatG+dqLgL7wsBh1++bUGD0QHdQi4hXgl7eBd2WGeFX3u6nYxkW gYRA== X-Gm-Message-State: AOAM532fNf2IgAnT4boqYRT4lxAvRS4Ta+1objC//BhSR7EPZhaB7rt8 KWyXeQv8877kse4CBdFl41slyRTsN5bTaJ6Ixn8= X-Google-Smtp-Source: ABdhPJyyitt+U2N9NU760Ec1la0sj4sUmd5EoP2D9PD+iefmsY3gU8c9Hux0ekiPX2rhVZ32D5Pd5PMokNRKUCoAyHU= X-Received: by 2002:a54:4787:: with SMTP id o7mr10112081oic.137.1592758457359; Sun, 21 Jun 2020 09:54:17 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> <20200621161156.GA66951@FreeBSD.org> <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> In-Reply-To: <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> From: Alexandr Kovalenko Date: Sun, 21 Jun 2020 17:54:16 +0100 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Alexey Dokuchaev , Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49qdtL4QJxz4FpL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dE3s7O+d; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of alexandrkovalenko@gmail.com designates 2607:f8b0:4864:20::243 as permitted sender) smtp.mailfrom=alexandrkovalenko@gmail.com X-Spamd-Result: default: False [-4.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.07)[-1.065]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-1.06)[-1.060]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::243:from]; NEURAL_HAM_SHORT(-1.27)[-1.271]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:54:19 -0000 On Sun, Jun 21, 2020 at 5:41 PM Hans Petter Selasky wrote: > On 2020-06-21 18:11, Alexey Dokuchaev wrote: > > On Sun, Jun 21, 2020 at 06:01:40PM +0200, Hans Petter Selasky wrote: > >> On 2020-06-21 17:53, Alexandr Kovalenko wrote: > >>> I wonder should we also rename Master's Degree? Would you throw > >>> away yours? > >>> https://en.wiktionary.org/wiki/master > >> > >> I don't see a problem if you have a main computer degree. > > > > *facepalm* > > If you got a Master's degree in South Africa under Apartheid, to many > people that is still symbolic. > > https://en.wikipedia.org/wiki/Apartheid#Education > > Apartheid is not very long ago and the people that experienced this are > still alive. How is this relevant? Please let me know when you will find "slave boot record". Until then - please revert the commit. Also, I would recommend you educating yourself on the meaning of the word "context". > >> Actually you have a very good point. Didn't think of that yet. I > >> should be more proud of my Bachelor's than my Masters's apparently. > > > > Hans, if you wanted to make reductio ad absurdum, that point is seen. > > Now, please revert the commit. We are *already losing developers* > > because of all this shit and it must be stopped. This is definitely > > not the right time to make such changes in such manner, leaving alone > > the need for the changes per se. > > Really? Trying to be funny does not add you more credibility. -- Alexandr Kovalenko http://uafug.org.ua/ From owner-svn-src-head@freebsd.org Sun Jun 21 17:04:44 2020 Return-Path: Delivered-To: svn-src-head@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 92405355852; Sun, 21 Jun 2020 17:04:44 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qf6M5RLzz4HHQ; Sun, 21 Jun 2020 17:04:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 45C912600E7; Sun, 21 Jun 2020 19:04:42 +0200 (CEST) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexandr Kovalenko Cc: Alexey Dokuchaev , Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> <20200621161156.GA66951@FreeBSD.org> <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> From: Hans Petter Selasky Message-ID: <22d1600f-3188-c1ad-13a4-28b5069109ed@selasky.org> Date: Sun, 21 Jun 2020 19:04:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qf6M5RLzz4HHQ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.15 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-0.97)[-0.973]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.91)[-0.906]; NEURAL_HAM_MEDIUM(-0.98)[-0.975]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 17:04:44 -0000 Hi Alexandr, On 2020-06-21 18:54, Alexandr Kovalenko wrote: > On Sun, Jun 21, 2020 at 5:41 PM Hans Petter Selasky wrote: >> On 2020-06-21 18:11, Alexey Dokuchaev wrote: >>> On Sun, Jun 21, 2020 at 06:01:40PM +0200, Hans Petter Selasky wrote: >>>> On 2020-06-21 17:53, Alexandr Kovalenko wrote: >>>>> I wonder should we also rename Master's Degree? Would you throw >>>>> away yours? >>>>> https://en.wiktionary.org/wiki/master >>>> >>>> I don't see a problem if you have a main computer degree. >>> >>> *facepalm* >> >> If you got a Master's degree in South Africa under Apartheid, to many >> people that is still symbolic. >> >> https://en.wikipedia.org/wiki/Apartheid#Education >> >> Apartheid is not very long ago and the people that experienced this are >> still alive. > > How is this relevant? > > Please let me know when you will find "slave boot record". Until then > - please revert the commit. Because the people I am referring to never got a chance to write any boot loader at school. > > Also, I would recommend you educating yourself on the meaning of the > word "context". I didn't steer this commit discussion into the "Master's degree". > >>>> Actually you have a very good point. Didn't think of that yet. I >>>> should be more proud of my Bachelor's than my Masters's apparently. >>> >>> Hans, if you wanted to make reductio ad absurdum, that point is seen. >>> Now, please revert the commit. We are *already losing developers* >>> because of all this shit and it must be stopped. This is definitely >>> not the right time to make such changes in such manner, leaving alone >>> the need for the changes per se. >> >> Really? > > Trying to be funny does not add you more credibility. > --HPS From owner-svn-src-head@freebsd.org Sun Jun 21 18:09:46 2020 Return-Path: Delivered-To: svn-src-head@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 0688C35712E; Sun, 21 Jun 2020 18:09:46 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qgYP151dz4N78; Sun, 21 Jun 2020 18:09:44 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f50.google.com with SMTP id g139so7522734lfd.10; Sun, 21 Jun 2020 11:09:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=LX0I3JhOFaM4DfkgbbaZjlH/I3djh6tKduYI0KLq60M=; b=WI/z1tvhfufJBsYw5CRx26EyVN/x1MQIfp6BGV960cAEsVGmSZRm4DiOYRqFVAOekT t1to5FZHuolBt5bb2a+G+A6qLdJga9j4nI5bVYJA5le1a9sFadLrNYfIXCzMLIaW1xGr d6+zgzy2Sg5wd7tVyLg4qSzOSdAqZDxRay5vyM1T4253+Z8N5eg1iA9y5s/60Nti3JVa bmPV3tXJ1zcnQHw5yGDexUci+sYqz1X7te8Fvb9qoOgyUsb5MkVkkssVVPjs9Kvz24pI 3DkorwqRjBFr2RRsM7Jb3BzpmQE2jGdG+i3yNF+ccMTR3V5Rt2IcU4+p3e7L19jAsyqL s7bw== X-Gm-Message-State: AOAM532wB4ApahrERbN3S5bX2E9z6iFZKP4P77DigQClRNUURcWDElfL UGlaTV9vZbNprvanp5WKKEdH4Htyl60JIg== X-Google-Smtp-Source: ABdhPJwinqyP6ILMcJdeoHryKxRRheL8yHseQ+XGx4VitBQPUxz0FFHLqOGfihXdt0R6uYmyyPQt3w== X-Received: by 2002:ac2:5e6e:: with SMTP id a14mr7573047lfr.79.1592762982889; Sun, 21 Jun 2020 11:09:42 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id g22sm2878198lfb.43.2020.06.21.11.09.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 11:09:42 -0700 (PDT) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006211334.05LDY91F058399@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <60f79578-2210-205e-6620-0d922168ce66@FreeBSD.org> Date: Sun, 21 Jun 2020 21:09:41 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <202006211334.05LDY91F058399@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49qgYP151dz4N78 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.167.50 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.37 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.34)[-0.339]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.68)[-0.677]; NEURAL_HAM_SHORT(-0.36)[-0.360]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.50:from]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.50:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 18:09:46 -0000 On 21/06/2020 16:34, Hans Petter Selasky wrote: > Author: hselasky > Date: Sun Jun 21 13:34:08 2020 > New Revision: 362466 > URL: https://svnweb.freebsd.org/changeset/base/362466 > > Log: > Improve wording to be more precise and clear. > No functional change intended. > > s/Master Boot/Main Boot/ (also called MBR) Where does your hate for word 'master', especially in the technical context, come from? https://www.merriam-webster.com/dictionary/master > MFC after: 1 week > Sponsored by: Mellanox Technologies -- Andriy Gapon From owner-svn-src-head@freebsd.org Sun Jun 21 18:32:54 2020 Return-Path: Delivered-To: svn-src-head@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 DF5F9357C8D; Sun, 21 Jun 2020 18:32:54 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qh455dFxz4PlQ; Sun, 21 Jun 2020 18:32:53 +0000 (UTC) (envelope-from alexandr.kovalenko@gmail.com) Received: by mail-ot1-x334.google.com with SMTP id 97so11340998otg.3; Sun, 21 Jun 2020 11:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=peZcHf4ywJTuNcA3JdzbclCicVSOI9jGcOebBlscuuw=; b=XieAz33Myou5rJl7wiACJTZ8QtVHYD4hSBmkvjBiYXWQ9AZc++CpFVJdPb2gtaTgTj UIVqI0uUbApCtpqkkPqpeVZqg2bqGb8bM3bEaeRps/hT+RS6lnUO3UI//Z/3UUKerEA5 GoygwnQ5tgJdPWSK84hVhG3fXnJi2uNkDOqGY9Epbt9xRjb6pkg2AiWPbNs388NBnc3T ukrKRS8aBd/aJpfifxoCf76fZAglKejQyLp5FEOdSdcgpIcxaeZu7x7McFAjAVzK3egY Emgfdbej3OxHTUgAjlYe8vwuXuXSydxlVGatwCN7TgGHr+H5BYZCao9VOlImfA8L+p+j ux7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=peZcHf4ywJTuNcA3JdzbclCicVSOI9jGcOebBlscuuw=; b=QDLBLnqsBSS3pSdn5Mq9RVaNILpbBa2tUvVijpOKu2JbWhpLu5dvn5f9IYdwtF85Tt KPOQSYGjC+13vVQfb14JDudFTPhj7UAVsZJOSC+5qdrVfa0anz5cjlg7B89ZWKeHZiZ2 zX964Xh7oD3K3uYfpWhr8ghLNVbG74KFLmzwTeDZu+vY4B0a08TVOR6EwdlBQW2710uw uqTAJRJDhcMGNCnoww4LNhF8F6EhW2UT/NzuZtirsRySHjsWYuy64t74fRenB9ulVI0c wq3kgBFmXPAK+5EHpXlkoRDu2iZ4kAyrKurAnfIC+ia6uNXneTLuPPGC2FcR2jjlbCdp kB0w== X-Gm-Message-State: AOAM531/g+/1lH0SMrPysRETPJpaU9RyA0n0QUhETQfK/T3rSh5jVfGr M1kEj644Zu1Xr0nTXYCCzh9VJzLVIhmDo4nQhzY= X-Google-Smtp-Source: ABdhPJw4/8+wJ6OH80UaoNbpA4QaCskYwkLN0HMs5HqJJ1OkdMP2d47MOjDy5OhLstrh6itL+lsQ4o+q6TQ8BwJ/85A= X-Received: by 2002:a9d:6e03:: with SMTP id e3mr10370290otr.71.1592764372669; Sun, 21 Jun 2020 11:32:52 -0700 (PDT) MIME-Version: 1.0 References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> <20200621161156.GA66951@FreeBSD.org> <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> <22d1600f-3188-c1ad-13a4-28b5069109ed@selasky.org> In-Reply-To: <22d1600f-3188-c1ad-13a4-28b5069109ed@selasky.org> From: Alexandr Kovalenko Date: Sun, 21 Jun 2020 19:32:40 +0100 Message-ID: Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Hans Petter Selasky Cc: Alexey Dokuchaev , Alexander Motin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49qh455dFxz4PlQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XieAz33M; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of alexandrkovalenko@gmail.com designates 2607:f8b0:4864:20::334 as permitted sender) smtp.mailfrom=alexandrkovalenko@gmail.com X-Spamd-Result: default: False [-4.04 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.07)[-1.065]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-1.06)[-1.061]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::334:from]; NEURAL_HAM_SHORT(-0.91)[-0.909]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 18:32:54 -0000 On Sun, Jun 21, 2020, 18:04 Hans Petter Selasky wrote: > On 2020-06-21 18:54, Alexandr Kovalenko wrote: > > On Sun, Jun 21, 2020 at 5:41 PM Hans Petter Selasky > wrote: > >> On 2020-06-21 18:11, Alexey Dokuchaev wrote: > >>> On Sun, Jun 21, 2020 at 06:01:40PM +0200, Hans Petter Selasky wrote: > >>>> On 2020-06-21 17:53, Alexandr Kovalenko wrote: > >>>>> I wonder should we also rename Master's Degree? Would you throw > >>>>> away yours? > >>>>> https://en.wiktionary.org/wiki/master > >>>> > >>>> I don't see a problem if you have a main computer degree. > >>> > >>> *facepalm* > >> > >> If you got a Master's degree in South Africa under Apartheid, to many > >> people that is still symbolic. > >> > >> https://en.wikipedia.org/wiki/Apartheid#Education > >> > >> Apartheid is not very long ago and the people that experienced this are > >> still alive. > > > > How is this relevant? > > > > Please let me know when you will find "slave boot record". Until then > > - please revert the commit. > > Because the people I am referring to never got a chance to write any > boot loader at school. > And? How this is relevant? How this changes the fact that in "master boot record" word master has no relation to slavery? > > > > Also, I would recommend you educating yourself on the meaning of the > > word "context". > > I didn't steer this commit discussion into the "Master's degree". > To show you that you should consider the context. Master boot record, as well as master's degree, as well as many-many other usecases have no relation with slavery. Otherwise I would suggest you to write a letter to Oxford to completely remove word "master" from English language along with the letter to your MP to introduce a law which would make using word "master" punishable by death. I really feel the pain people feel about slavery and completely support them, but right here right now you are not helping, you are doing quite opposite. > >>>> Actually you have a very good point. Didn't think of that yet. I > >>>> should be more proud of my Bachelor's than my Masters's apparently. > >>> > >>> Hans, if you wanted to make reductio ad absurdum, that point is seen. > >>> Now, please revert the commit. We are *already losing developers* > >>> because of all this shit and it must be stopped. This is definitely > >>> not the right time to make such changes in such manner, leaving alone > >>> the need for the changes per se. > >> > >> Really? > > > > Trying to be funny does not add you more credibility. > > > > --HPS > From owner-svn-src-head@freebsd.org Sun Jun 21 18:40:17 2020 Return-Path: Delivered-To: svn-src-head@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 ED20B357B75; Sun, 21 Jun 2020 18:40:17 +0000 (UTC) (envelope-from kaktus@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 49qhDd61KKz4Q6K; Sun, 21 Jun 2020 18:40:17 +0000 (UTC) (envelope-from kaktus@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 C55112136E; Sun, 21 Jun 2020 18:40:17 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LIeHJk043864; Sun, 21 Jun 2020 18:40:17 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LIeHX5043863; Sun, 21 Jun 2020 18:40:17 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202006211840.05LIeHX5043863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sun, 21 Jun 2020 18:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362468 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 18:40:18 -0000 Author: kaktus Date: Sun Jun 21 18:40:17 2020 New Revision: 362468 URL: https://svnweb.freebsd.org/changeset/base/362468 Log: net.link.generic.ifdata..linkspecific: rework handler This OID was added in r17352 but the write path of IFDATA_LINKSPECIFIC seems unused as there are no in-base writers, and as far as I can tell we had issues with this code before, see PR 219472. Drop the write path to make the handler read-only as described in comments and man-pages. It can be marked as MPSAFE now. Reviewed by: bdragon, kib, melifaro, wollman Approved by: kib (mentor) Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25348 Modified: head/sys/net/if_mib.c Modified: head/sys/net/if_mib.c ============================================================================== --- head/sys/net/if_mib.c Sun Jun 21 16:06:01 2020 (r362467) +++ head/sys/net/if_mib.c Sun Jun 21 18:40:17 2020 (r362468) @@ -122,10 +122,6 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! error = SYSCTL_OUT(req, ifp->if_linkmib, ifp->if_linkmiblen); if (error || !req->newptr) goto out; - - error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen); - if (error) - goto out; break; case IFDATA_DRIVERNAME: @@ -152,6 +148,6 @@ out: } static SYSCTL_NODE(_net_link_generic, IFMIB_IFDATA, ifdata, - CTLFLAG_RW | CTLFLAG_NEEDGIANT, sysctl_ifdata, + CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ifdata, "Interface table"); From owner-svn-src-head@freebsd.org Sun Jun 21 18:48:17 2020 Return-Path: Delivered-To: svn-src-head@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 B56A5357EC3; Sun, 21 Jun 2020 18:48:17 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (gromit.grondar.org [IPv6:2a01:348:e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qhPs28rvz4Qx5; Sun, 21 Jun 2020 18:48:17 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from [2a02:8011:300b:42:bd7f:56d2:4b7f:6b54] by gromit.grondar.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1jn50h-0001nu-LO; Sun, 21 Jun 2020 19:48:07 +0100 Content-Type: multipart/signed; boundary="Apple-Mail=_19D3794F-9639-43C5-A73C-3DF58C9B852C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362466 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... From: Mark Murray In-Reply-To: <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> Date: Sun, 21 Jun 2020 19:47:06 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <16A0A173-657D-445A-ADF4-953EE979D588@FreeBSD.org> References: <202006211334.05LDY91F058399@repo.freebsd.org> <20200621154723.e2112fa798d35d78e16e3ccc@bidouilliste.com> <5331fb6e-6703-c107-01d5-bb7cae992c0f@gmail.com> <63ff11c4-72ed-146f-a1b9-52795abec0b1@selasky.org> <20200621161156.GA66951@FreeBSD.org> <9e258974-e27b-404e-5802-d37562d464ca@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49qhPs28rvz4Qx5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; ASN(0.00)[asn:39326, ipnet:2a01:348::/32, country:GB] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 18:48:17 -0000 --Apple-Mail=_19D3794F-9639-43C5-A73C-3DF58C9B852C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 21 Jun 2020, at 17:41, Hans Petter Selasky wrote: > If you got a Master's degree in South Africa under Apartheid, to many = people that is still symbolic. First I've heard of it (yes, I'm South African). > https://en.wikipedia.org/wiki/Apartheid#Education >=20 > Apartheid is not very long ago and the people that experienced this = are still alive. And many of those folks have MSc/MEng/MBA etc degrees, and are not = agitating to change them. M -- --Apple-Mail=_19D3794F-9639-43C5-A73C-3DF58C9B852C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAl7vqyoACgkQQlsJDh9C UqCRZwgAuBO+0x3smk2wXb9SFllt6BWTwhBLmEw7yoNHxWj0yLiwmmFeUpPbo9cV W8//LQz1+dNPXLj7ivGRtXZcn/sWth2+aZ41N7t52Oby0j/KjANJiBH/e54L7DyO MWKdHmPCdjqWPLba8Tkc/3JKpghMCJUDm0oKPc7gKYGaglyVUMLAf6WJjN0xe6ks IsGK4DPO96jS3bPiuVlTyOUr73AZXIDkgBnmFOnDV5wB6TUR74NEKFCfeQNH1I4K hvXiyhtOOQY9ZsdfHD5h9eAGdwsP+k4bfUx9qtKP6JsFifNL3sMoHpHPF4l9UEG+ 0D5RNdCNJCOJZyz0USZYw/hHfc1HtA== =vcIH -----END PGP SIGNATURE----- --Apple-Mail=_19D3794F-9639-43C5-A73C-3DF58C9B852C-- From owner-svn-src-head@freebsd.org Sun Jun 21 21:59:54 2020 Return-Path: Delivered-To: svn-src-head@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 C943D336399; Sun, 21 Jun 2020 21:59:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49qmfx2qw6z3TFZ; Sun, 21 Jun 2020 21:59:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05LLxjqM003979 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 22 Jun 2020 00:59:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05LLxjqM003979 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05LLxjVi003978; Mon, 22 Jun 2020 00:59:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 Jun 2020 00:59:45 +0300 From: Konstantin Belousov To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362294 - head/sys/dev/sound/pci/hda Message-ID: <20200621215945.GA2057@kib.kiev.ua> References: <202006180612.05I6C6EE013037@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006180612.05I6C6EE013037@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49qmfx2qw6z3TFZ X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [1.49 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_MEDIUM(0.25)[0.251]; NEURAL_SPAM_SHORT(0.34)[0.341]; NEURAL_SPAM_LONG(0.89)[0.893]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 21:59:54 -0000 On Thu, Jun 18, 2020 at 06:12:06AM +0000, Andriy Gapon wrote: > Author: avg > Date: Thu Jun 18 06:12:06 2020 > New Revision: 362294 > URL: https://svnweb.freebsd.org/changeset/base/362294 > > Log: > hdac_intr_handler: keep working until global interrupt status clears > > It is plausible that the hardware interrupts a host only when GIS goes > from zero to one. GIS is formed by OR-ing multiple hardware statuses, > so it's possible that a previously cleared status gets set again while > another status has not been cleared yet. Thus, there will be no new > interrupt as GIS always stayed set. If we don't re-examine GIS then we > can leave it set and never get another interrupt again. > > Without this change I frequently saw a problem where snd_hda would stop > working. Setting dev.hdac.1.polling=1 would bring it back to life and > afterwards I could set polling back to zero. Sometimes the problem > started right after a boot, sometimes it happened after resuming from > S3, frequently it would occur when sound output and input are active > concurrently (such as during conferencing). I looked at HDAC_INTSTS > while the sound was not working and I saw that both HDAC_INTSTS_GIS and > HDAC_INTSTS_CIS were set, but there were no interrupts. > > I have collected some statistics over a period of several days about how > many loops (calls to hdac_one_intr) the new code did for a single > interrupt: > +--------+--------------+ > |Loops |Times Happened| > +--------+--------------+ > |0 |301 | > |1 |12857746 | > |2 |280 | > |3 |2 | > |4+ |0 | > +--------+--------------+ > I believe that previously the sound would get stuck each time we had to loop > more than once. > > The tested hardware is: > hdac1: mem 0xfe680000-0xfe687fff at device 0.6 on pci4 > hdacc1: at cad 0 on hdac1 > > No objections: mav > MFC after: 5 weeks > Differential Revision: https://reviews.freebsd.org/D25128 > > Modified: > head/sys/dev/sound/pci/hda/hdac.c > > Modified: head/sys/dev/sound/pci/hda/hdac.c > ============================================================================== > --- head/sys/dev/sound/pci/hda/hdac.c Wed Jun 17 23:41:04 2020 (r362293) > +++ head/sys/dev/sound/pci/hda/hdac.c Thu Jun 18 06:12:06 2020 (r362294) > @@ -303,30 +303,13 @@ hdac_config_fetch(struct hdac_softc *sc, uint32_t *on, > } > } > > -/**************************************************************************** > - * void hdac_intr_handler(void *) > - * > - * Interrupt handler. Processes interrupts received from the hdac. > - ****************************************************************************/ > static void > -hdac_intr_handler(void *context) > +hdac_one_intr(struct hdac_softc *sc, uint32_t intsts) > { > - struct hdac_softc *sc; > device_t dev; > - uint32_t intsts; > uint8_t rirbsts; > int i; > > - sc = (struct hdac_softc *)context; > - hdac_lock(sc); > - > - /* Do we have anything to do? */ > - intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); > - if ((intsts & HDAC_INTSTS_GIS) == 0) { > - hdac_unlock(sc); > - return; > - } > - > /* Was this a controller interrupt? */ > if (intsts & HDAC_INTSTS_CIS) { > rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS); > @@ -346,16 +329,45 @@ hdac_intr_handler(void *context) > if ((intsts & (1 << i)) == 0) > continue; > HDAC_WRITE_1(&sc->mem, (i << 5) + HDAC_SDSTS, > - HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_SDSTS_BCIS ); > + HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_SDSTS_BCIS); > if ((dev = sc->streams[i].dev) != NULL) { > HDAC_STREAM_INTR(dev, > sc->streams[i].dir, sc->streams[i].stream); > } > } > } > +} > > - HDAC_WRITE_4(&sc->mem, HDAC_INTSTS, intsts); > - hdac_unlock(sc); > +/**************************************************************************** > + * void hdac_intr_handler(void *) > + * > + * Interrupt handler. Processes interrupts received from the hdac. > + ****************************************************************************/ > +static void > +hdac_intr_handler(void *context) > +{ > + struct hdac_softc *sc; > + uint32_t intsts; > + > + sc = (struct hdac_softc *)context; > + > + /* > + * Loop until HDAC_INTSTS_GIS gets clear. > + * It is plausible that hardware interrupts a host only when GIS goes > + * from zero to one. GIS is formed by OR-ing multiple hardware > + * statuses, so it's possible that a previously cleared status gets set > + * again while another status has not been cleared yet. Thus, there > + * will be no new interrupt as GIS always stayed set. If we don't > + * re-examine GIS then we can leave it set and never get an interrupt > + * again. > + */ > + intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); > + while ((intsts & HDAC_INTSTS_GIS) != 0) { > + hdac_lock(sc); > + hdac_one_intr(sc, intsts); > + hdac_unlock(sc); > + intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); > + } > } > > static void This commit (or rather, a merge of this commit to stable/12) causes an issue on my Apollo Lake machine. Look: hdac0@pci0:0:14:0: class=0x040300 card=0xa1821458 chip=0x5a988086 rev=0x0b hdr=0x00 vendor = 'Intel Corporation' device = 'Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster' class = multimedia subclass = HDA bar [10] = type Memory, range 64, base 0x91410000, size 16384, enabled bar [20] = type Memory, range 64, base 0x91000000, size 1048576, enabled cap 01[50] = powerspec 3 supports D0 D3 current D0 cap 09[80] = vendor (length 20) Intel cap 15 version 0 cap 05[60] = MSI supports 1 message, 64 bit DMAP base is 0xfffff80000000000. tom% sudo /usr/local/bin/kgdb ~/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full /dev/mem GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD] Reading symbols from /usr/home/kostik/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full... ... sched_switch (td=0xfffff8029d516000, newtd=0xfffff800025f4000, flags=) at ../../../kern/sched_ule.c:2143 2143 cpuid = PCPU_GET(cpuid); (kgdb) p/x *(unsigned int *)(0xfffff80000000000+0x91410000+0x24) INTSTS $1 = 0xc0000000 This causes the first interrupt handler to loop forever. And this is why: (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x5d) RIRBSTS $3 = 0x0 (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x4d) CORBSTS $4 = 0x0 (kgdb) p/x *(unsigned short *)(0xfffff80000000000+0x91410000+0xe) WAKESTS $5 = 0x5 So the SDIN State Change status bit is set, and nothing in the driver clears it, it seems. More, the EDS specifies that another reason for INTSTS CIS bit set may be the CORB Memory Error Indication (CMEI), and again it seems that driver never clears the reason. So as is the change perhaps helps for some situations, but also practically makes some systems to loose core in tight loop with interrupt priority, which causes weird machine misbehavior like unkillable processes and never finishing epochs. From owner-svn-src-head@freebsd.org Sun Jun 21 22:02:50 2020 Return-Path: Delivered-To: svn-src-head@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 24F563367EF; Sun, 21 Jun 2020 22:02:50 +0000 (UTC) (envelope-from mmacy@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 49qmkL04hyz3Tty; Sun, 21 Jun 2020 22:02:50 +0000 (UTC) (envelope-from mmacy@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 F1F1724197; Sun, 21 Jun 2020 22:02:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LM2n27071590; Sun, 21 Jun 2020 22:02:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LM2n3n071588; Sun, 21 Jun 2020 22:02:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202006212202.05LM2n3n071588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 21 Jun 2020 22:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362471 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 22:02:50 -0000 Author: mmacy Date: Sun Jun 21 22:02:49 2020 New Revision: 362471 URL: https://svnweb.freebsd.org/changeset/base/362471 Log: iflib: fix cloneattach fail and generalize pseudo device handling - a cloneattach failure will not currently be handled correctly, jump to the right target - pseudo devices are all treat as if they're ethernet devices - this often doesn't make sense MFC after: 1 week Sponsored by: Netgate, Inc. Differential Revision: https://reviews.freebsd.org/D25083 Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun Jun 21 20:30:11 2020 (r362470) +++ head/sys/net/iflib.c Sun Jun 21 22:02:49 2020 (r362471) @@ -4874,12 +4874,8 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc if ((err = IFDI_CLONEATTACH(ctx, clctx->cc_ifc, clctx->cc_name, clctx->cc_params)) != 0) { device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err); - goto fail_ctx_free; + goto fail_unlock; } - ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); - ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO); - #ifdef INVARIANTS if (scctx->isc_capabilities & IFCAP_TXCSUM) MPASS(scctx->isc_tx_csum_flags); @@ -4890,7 +4886,14 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc ifp->if_flags |= IFF_NOGROUP; if (sctx->isc_flags & IFLIB_PSEUDO) { - ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); + ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO); + if (sctx->isc_flags & IFLIB_PSEUDO_ETHER) { + ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); + } else { + if_attach(ctx->ifc_ifp); + bpfattach(ctx->ifc_ifp, DLT_NULL, sizeof(u_int32_t)); + } if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err); @@ -4913,6 +4916,10 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sc CTX_UNLOCK(ctx); return (0); } + ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); + ifmedia_add(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(ctx->ifc_mediap, IFM_ETHER | IFM_AUTO); + _iflib_pre_assert(scctx); ctx->ifc_txrx = *scctx->isc_txrx; @@ -5028,6 +5035,7 @@ int iflib_pseudo_deregister(if_ctx_t ctx) { if_t ifp = ctx->ifc_ifp; + if_shared_ctx_t sctx = ctx->ifc_sctx; iflib_txq_t txq; iflib_rxq_t rxq; int i, j; @@ -5037,7 +5045,13 @@ iflib_pseudo_deregister(if_ctx_t ctx) /* Unregister VLAN event handlers early */ iflib_unregister_vlan_handlers(ctx); - ether_ifdetach(ifp); + if ((sctx->isc_flags & IFLIB_PSEUDO) && + (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) { + bpfdetach(ifp); + if_detach(ifp); + } else { + ether_ifdetach(ifp); + } /* XXX drain any dependent tasks */ tqg = qgroup_if_io_tqg; for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { @@ -5362,13 +5376,22 @@ iflib_register(if_ctx_t ctx) driver_t *driver = sctx->isc_driver; device_t dev = ctx->ifc_dev; if_t ifp; + u_char type; + int iflags; if ((sctx->isc_flags & IFLIB_PSEUDO) == 0) _iflib_assert(sctx); CTX_LOCK_INIT(ctx); STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev)); - ifp = ctx->ifc_ifp = if_alloc(IFT_ETHER); + if (sctx->isc_flags & IFLIB_PSEUDO) { + if (sctx->isc_flags & IFLIB_PSEUDO_ETHER) + type = IFT_ETHER; + else + type = IFT_PPP; + } else + type = IFT_ETHER; + ifp = ctx->ifc_ifp = if_alloc(type); if (ifp == NULL) { device_printf(dev, "can not allocate ifnet structure\n"); return (ENOMEM); @@ -5393,9 +5416,14 @@ iflib_register(if_ctx_t ctx) if_settransmitfn(ifp, iflib_if_transmit); #endif if_setqflushfn(ifp, iflib_if_qflush); - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_KNOWSEPOCH); + iflags = IFF_MULTICAST | IFF_KNOWSEPOCH; + if ((sctx->isc_flags & IFLIB_PSEUDO) && + (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) + iflags |= IFF_POINTOPOINT; + else + iflags |= IFF_BROADCAST | IFF_SIMPLEX; + if_setflags(ifp, iflags); ctx->ifc_vlan_attach_event = EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx, EVENTHANDLER_PRI_FIRST); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sun Jun 21 20:30:11 2020 (r362470) +++ head/sys/net/iflib.h Sun Jun 21 22:02:49 2020 (r362471) @@ -375,6 +375,12 @@ typedef enum { * interrupts instead of doing combined RX/TX processing. */ #define IFLIB_SINGLE_IRQ_RX_ONLY 0x40000 +/* + * Don't need/want most of the niceties of + * emulating ethernet + */ +#define IFLIB_PSEUDO_ETHER 0x80000 + /* * These enum values are used in iflib_needs_restart to indicate to iflib From owner-svn-src-head@freebsd.org Sun Jun 21 22:09:30 2020 Return-Path: Delivered-To: svn-src-head@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 D2A5F3365EB; Sun, 21 Jun 2020 22:09:30 +0000 (UTC) (envelope-from bz@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 49qmt256vkz3V8l; Sun, 21 Jun 2020 22:09:30 +0000 (UTC) (envelope-from bz@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 A683324199; Sun, 21 Jun 2020 22:09:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LM9UW7071929; Sun, 21 Jun 2020 22:09:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LM9UAe071928; Sun, 21 Jun 2020 22:09:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202006212209.05LM9UAe071928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 21 Jun 2020 22:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362472 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 22:09:30 -0000 Author: bz Date: Sun Jun 21 22:09:30 2020 New Revision: 362472 URL: https://svnweb.freebsd.org/changeset/base/362472 Log: Rather than zeroing MAXVIFS times size of pointer [r362289] (still better than sizeof pointer before [r354857]), we need to zero MAXVIFS times the size of the struct. All good things come in threes; I hope this is it on this one. PR: 246629, 206583 Reported by: kib MFC after: ASAP Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Sun Jun 21 22:02:49 2020 (r362471) +++ head/sys/netinet/ip_mroute.c Sun Jun 21 22:09:30 2020 (r362472) @@ -740,7 +740,7 @@ X_ip_mrouter_done(void) if_allmulti(ifp, 0); } } - bzero((caddr_t)V_viftable, sizeof(V_viftable) * MAXVIFS); + bzero((caddr_t)V_viftable, sizeof(*V_viftable) * MAXVIFS); V_numvifs = 0; V_pim_assert_enabled = 0; From owner-svn-src-head@freebsd.org Sun Jun 21 23:12:57 2020 Return-Path: Delivered-To: svn-src-head@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 D1D9C338185; Sun, 21 Jun 2020 23:12:57 +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 49qpHF58K1z3ZQr; Sun, 21 Jun 2020 23:12:57 +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 ABED224CBF; Sun, 21 Jun 2020 23:12:57 +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 05LNCvJ5015100; Sun, 21 Jun 2020 23:12:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LNCv3X015098; Sun, 21 Jun 2020 23:12:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006212312.05LNCv3X015098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 21 Jun 2020 23:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362473 - in head: lib/libc/net sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: lib/libc/net sys/netinet X-SVN-Commit-Revision: 362473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 23:12:57 -0000 Author: tuexen Date: Sun Jun 21 23:12:56 2020 New Revision: 362473 URL: https://svnweb.freebsd.org/changeset/base/362473 Log: Cleanup the defintion of struct sctp_getaddresses. This stucture is used by the IPPROTO_SCTP level socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES, which are used by libc to implement sctp_getladdrs() and sctp_getpaddrs(). These changes allow an old libc to work on a newer kernel. Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Sun Jun 21 22:09:30 2020 (r362472) +++ head/lib/libc/net/sctp_sys_calls.c Sun Jun 21 23:12:56 2020 (r362473) @@ -406,7 +406,7 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } /* size required is returned in 'asoc' */ - opt_len = (socklen_t)((size_t)asoc + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)((size_t)asoc + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -419,9 +419,9 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd free(addrs); return (-1); } - *raddrs = (struct sockaddr *)&addrs->addr[0]; + *raddrs = &addrs->addr[0].sa; cnt = 0; - sa = (struct sockaddr *)&addrs->addr[0]; + sa = &addrs->addr[0].sa; lim = (caddr_t)addrs + opt_len; while (((caddr_t)sa < lim) && (sa->sa_len > 0)) { sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); @@ -436,7 +436,7 @@ sctp_freepaddrs(struct sockaddr *addrs) void *fr_addr; /* Take away the hidden association id */ - fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); + fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); /* Now free it */ free(fr_addr); } @@ -466,7 +466,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOTCONN; return (-1); } - opt_len = (socklen_t)(size_of_addresses + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)(size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -480,9 +480,9 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOMEM; return (-1); } - *raddrs = (struct sockaddr *)&addrs->addr[0]; + *raddrs = &addrs->addr[0].sa; cnt = 0; - sa = (struct sockaddr *)&addrs->addr[0]; + sa = &addrs->addr[0].sa; lim = (caddr_t)addrs + opt_len; while (((caddr_t)sa < lim) && (sa->sa_len > 0)) { sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); @@ -497,7 +497,7 @@ sctp_freeladdrs(struct sockaddr *addrs) void *fr_addr; /* Take away the hidden association id */ - fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); + fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); /* Now free it */ free(fr_addr); } Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun Jun 21 22:09:30 2020 (r362472) +++ head/sys/netinet/sctp_uio.h Sun Jun 21 23:12:56 2020 (r362473) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #define _NETINET_SCTP_UIO_H_ -#if ! defined(_KERNEL) +#if !defined(_KERNEL) #include #endif #include @@ -633,10 +633,15 @@ struct sctp_setpeerprim { uint8_t sspp_padding[4]; }; +union sctp_sockstore { + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + struct sockaddr sa; +}; + struct sctp_getaddresses { sctp_assoc_t sget_assoc_id; - /* addr is filled in for N * sockaddr_storage */ - struct sockaddr addr[1]; + union sctp_sockstore addr[]; }; struct sctp_status { @@ -1142,12 +1147,6 @@ struct sctpstat { #define SCTP_STAT_DECR_COUNTER32(_x) SCTP_STAT_DECR(_x) #define SCTP_STAT_DECR_COUNTER64(_x) SCTP_STAT_DECR(_x) #define SCTP_STAT_DECR_GAUGE32(_x) SCTP_STAT_DECR(_x) - -union sctp_sockstore { - struct sockaddr_in sin; - struct sockaddr_in6 sin6; - struct sockaddr sa; -}; /***********************************/ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jun 21 22:09:30 2020 (r362472) +++ head/sys/netinet/sctp_usrreq.c Sun Jun 21 23:12:56 2020 (r362473) @@ -989,7 +989,7 @@ sctp_shutdown(struct socket *so) * returns 0 on success, 1 on error */ static uint32_t -sctp_fill_user_address(struct sockaddr_storage *ss, struct sockaddr *sa) +sctp_fill_user_address(union sctp_sockstore *ss, struct sockaddr *sa) { #ifdef INET6 struct sockaddr_in6 lsa6; @@ -1010,7 +1010,7 @@ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - struct sockaddr_storage *sas, + union sctp_sockstore *addr, uint32_t vrf_id) { struct sctp_ifn *sctp_ifn; @@ -1125,18 +1125,18 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)sas); - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6)); + in6_sin_2_v4mapsin6(sin, &addr->sin6); + addr->sin6.sin6_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { #endif if (actual + sizeof(struct sockaddr_in) > limit) { return (actual); } - memcpy(sas, sin, sizeof(struct sockaddr_in)); - ((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in)); + memcpy(addr, sin, sizeof(struct sockaddr_in)); + addr->sin.sin_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in)); actual += sizeof(struct sockaddr_in); #ifdef INET6 } @@ -1188,9 +1188,9 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - memcpy(sas, sin6, sizeof(struct sockaddr_in6)); - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6)); + memcpy(addr, sin6, sizeof(struct sockaddr_in6)); + addr->sin6.sin6_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { continue; @@ -1217,24 +1217,24 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sa_len > limit) { return (actual); } - if (sctp_fill_user_address(sas, &laddr->ifa->address.sa)) + if (sctp_fill_user_address(addr, &laddr->ifa->address.sa)) continue; switch (laddr->ifa->address.sa.sa_family) { #ifdef INET case AF_INET: - ((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport; + addr->sin.sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; + addr->sin6.sin6_port = inp->sctp_lport; break; #endif default: /* TSNH */ break; } - sas = (struct sockaddr_storage *)((caddr_t)sas + sa_len); + addr = (union sctp_sockstore *)((caddr_t)addr + sa_len); actual += sa_len; } } @@ -1245,13 +1245,13 @@ static size_t sctp_fill_up_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - struct sockaddr_storage *sas) + union sctp_sockstore *addr) { size_t size = 0; SCTP_IPI_ADDR_RLOCK(); /* fill up addresses for the endpoint's default vrf */ - size = sctp_fill_up_addresses_vrf(inp, stcb, limit, sas, + size = sctp_fill_up_addresses_vrf(inp, stcb, limit, addr, inp->def_vrf_id); SCTP_IPI_ADDR_RUNLOCK(); return (size); @@ -2226,7 +2226,7 @@ flags_out: */ { size_t cpsz, left; - struct sockaddr_storage *sas; + union sctp_sockstore *addr; struct sctp_nets *net; struct sctp_getaddresses *saddr; @@ -2234,9 +2234,9 @@ flags_out: SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); if (stcb) { - left = (*optsize) - sizeof(sctp_assoc_t); - *optsize = sizeof(sctp_assoc_t); - sas = (struct sockaddr_storage *)&saddr->addr[0]; + left = *optsize - offsetof(struct sctp_getaddresses, addr); + *optsize = offsetof(struct sctp_getaddresses, addr); + addr = &saddr->addr[0]; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { switch (net->ro._l_addr.sa.sa_family) { @@ -2274,16 +2274,16 @@ flags_out: (net->ro._l_addr.sa.sa_family == AF_INET)) { /* Must map the address */ in6_sin_2_v4mapsin6(&net->ro._l_addr.sin, - (struct sockaddr_in6 *)sas); + &addr->sin6); } else { - memcpy(sas, &net->ro._l_addr, cpsz); + memcpy(addr, &net->ro._l_addr, cpsz); } #else - memcpy(sas, &net->ro._l_addr, cpsz); + memcpy(addr, &net->ro._l_addr, cpsz); #endif - ((struct sockaddr_in *)sas)->sin_port = stcb->rport; + addr->sin.sin_port = stcb->rport; - sas = (struct sockaddr_storage *)((caddr_t)sas + cpsz); + addr = (union sctp_sockstore *)((caddr_t)addr + cpsz); left -= cpsz; *optsize += cpsz; } @@ -2297,19 +2297,17 @@ flags_out: case SCTP_GET_LOCAL_ADDRESSES: { size_t limit, actual; - struct sockaddr_storage *sas; struct sctp_getaddresses *saddr; SCTP_CHECK_AND_CAST(saddr, optval, struct sctp_getaddresses, *optsize); SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); - sas = (struct sockaddr_storage *)&saddr->addr[0]; - limit = *optsize - sizeof(sctp_assoc_t); - actual = sctp_fill_up_addresses(inp, stcb, limit, sas); + limit = *optsize - offsetof(struct sctp_getaddresses, addr); + actual = sctp_fill_up_addresses(inp, stcb, limit, saddr->addr); if (stcb) { SCTP_TCB_UNLOCK(stcb); } - *optsize = sizeof(sctp_assoc_t) + actual; + *optsize = offsetof(struct sctp_getaddresses, addr) + actual; break; } case SCTP_PEER_ADDR_PARAMS: From owner-svn-src-head@freebsd.org Sun Jun 21 23:47:28 2020 Return-Path: Delivered-To: svn-src-head@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 63888338D5E; Sun, 21 Jun 2020 23:47:28 +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 49qq341zZBz3cT0; Sun, 21 Jun 2020 23:47:28 +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 3F4C1253A5; Sun, 21 Jun 2020 23:47: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 05LNlS5h033965; Sun, 21 Jun 2020 23:47:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LNlSb2033964; Sun, 21 Jun 2020 23:47:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006212347.05LNlSb2033964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 21 Jun 2020 23:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362474 - head/lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/lib/libc/net X-SVN-Commit-Revision: 362474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 23:47:28 -0000 Author: tuexen Date: Sun Jun 21 23:47:27 2020 New Revision: 362474 URL: https://svnweb.freebsd.org/changeset/base/362474 Log: Add include missing from my last commit. Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Sun Jun 21 23:12:56 2020 (r362473) +++ head/lib/libc/net/sctp_sys_calls.c Sun Jun 21 23:47:27 2020 (r362474) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-head@freebsd.org Mon Jun 22 01:10:40 2020 Return-Path: Delivered-To: svn-src-head@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 5EBC933A661; Mon, 22 Jun 2020 01:10:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qrv34Dv1z3gdB; Mon, 22 Jun 2020 01:10:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x741.google.com with SMTP id e11so4889626qkm.3; Sun, 21 Jun 2020 18:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b2GGEV2q1hpsnW5HsZYfl6k0p5QqxHN8l8/hlAxAq6E=; b=AKOj04QNFfWpkDJyxrfAh1W0H/pIQzUvfgUUvlg8ia69q8o56A22I3J/o9YScROW3c KDuOUBbts+3jIAlj33O20T2z+wKU6R4KHw2GzMInVTkVYR/5x9W0kNqW9GS8wi5cJXeM G5td12Ru0UNjhCJWkje0Rn14RF528JdFI16fPFerzHJKL2ggSO6dGiJaf/znwFeC7Efl +1i0iH3dK7zHEMHw78mg1oNfu8PA5gbQyZrU+lPovQi90Us19BBHU4hYDmfm+l3FUi7M ibeFk6iXGT6VnTxytPiUjA5zs/h87cVAEa+OWr2Q/L851/j6IK+LrN0Jg+AU5epHInR+ jwgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=b2GGEV2q1hpsnW5HsZYfl6k0p5QqxHN8l8/hlAxAq6E=; b=L2XsM9vVO8mg491u3P7heGf3Kpph/Vwm6T7UE3pOe5UVvffgM+hhYNJg0ZU9RHZedd lKVlO0UxqcU2SsSWZMDOQv/JDf7MgsFhsmkPi3TNXfMICQWWEOO7ZO79ELizj07PziIJ FnF4DUtl8zuB5x3OmEz3AlzYnOcUoOw0iL1nRTeVTwJu+0LCEyy8Ju559O1ZYhmJY7jP TmS1d5Kvd8j+8aRRoXC1bJ8bS8EdPTl2z2JzBi3ig+j6iaGN1Ea0s3QxPF/pHnN8hRKx OC6hWDkIz8iRRIBirS7sjcbOL5GbeZ2QnPAMyOl/KN8vMV9JtiUO5WFxKYBQMjjLhsHQ AJAA== X-Gm-Message-State: AOAM531XAerOfNbUmUmUp4PzPn1ohuVT6AQK3OaWo+1WGTTL3OWtlpRX Y2tiLVyxWILnabvzdRZI4P+o7u7IuMY= X-Google-Smtp-Source: ABdhPJyEN+NrvJtd4vqvQqbt7orVTbRA/1jxabeF+O1QxI/wYaJDwRP6ZnWvlqNUAaimhC295Cymgw== X-Received: by 2002:a37:6150:: with SMTP id v77mr13648170qkb.173.1592788238172; Sun, 21 Jun 2020 18:10:38 -0700 (PDT) Received: from raichu (bras-base-toroon0560w-grc-20-184-147-206-12.dsl.bell.ca. [184.147.206.12]) by smtp.gmail.com with ESMTPSA id w45sm6507294qtj.51.2020.06.21.18.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 18:10:37 -0700 (PDT) Sender: Mark Johnston Date: Sun, 21 Jun 2020 21:10:35 -0400 From: Mark Johnston To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf Message-ID: <20200622011035.GG85944@raichu> References: <202006181932.05IJWZYH009560@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 49qrv34Dv1z3gdB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=AKOj04QN; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::741 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.04)[-1.037]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.53)[-0.530]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::741:from]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[184.147.206.12:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 01:10:40 -0000 On Fri, Jun 19, 2020 at 08:33:35AM -0700, John Baldwin wrote: > On 6/18/20 12:32 PM, Mark Johnston wrote: > > Author: markj > > Date: Thu Jun 18 19:32:34 2020 > > New Revision: 362338 > > URL: https://svnweb.freebsd.org/changeset/base/362338 > > > > Log: > > Add the SCTP_SUPPORT kernel option. > > > > This is in preparation for enabling a loadable SCTP stack. Analogous to > > IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured > > in order to support a loadable SCTP implementation. > > > > Discussed with: tuexen > > MFC after: 2 weeks > > Sponsored by: The FreeBSD Foundation > > Do you want to add similar handling to sys/conf/config.mk that we have > for IPsec? Also, do we want to avoid building sctp.ko if it is in the > kernel like we do for ipsec.ko and/or only build it if the kernel contains > SCTP_SUPPORT? (For ipsec.ko we had to do that as it wouldn't compile, not > sure if the same is true for sctp.ko) Sorry for the delay. I think we do indeed want similar handling in config.mk, I will work on it. It is probably also reasonable to avoid compiling sctp.ko when SCTP_SUPPORT is not defined, though I can't see a reason that wouldn't work today since SCTP_SUPPORT is not used in any headers. From owner-svn-src-head@freebsd.org Mon Jun 22 03:14:44 2020 Return-Path: Delivered-To: svn-src-head@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 DEAAB33CD93; Mon, 22 Jun 2020 03:14:44 +0000 (UTC) (envelope-from freqlabs@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 49qvfD5NFBz43R7; Mon, 22 Jun 2020 03:14:44 +0000 (UTC) (envelope-from freqlabs@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 B3F6427AAA; Mon, 22 Jun 2020 03:14:44 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05M3Eimk063008; Mon, 22 Jun 2020 03:14:44 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M3Eic1063005; Mon, 22 Jun 2020 03:14:44 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006220314.05M3Eic1063005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Mon, 22 Jun 2020 03:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362477 - in head: . libexec/flua tools/build X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head: . libexec/flua tools/build X-SVN-Commit-Revision: 362477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 03:14:44 -0000 Author: freqlabs Date: Mon Jun 22 03:14:43 2020 New Revision: 362477 URL: https://svnweb.freebsd.org/changeset/base/362477 Log: flua: add ucl library libucl comes with a Lua library binding. Build it into flua. This lets us parse/generate config files in the various formats supported by libucl with flua. For example, the following script will detect the format of an object written to stdin as one of UCL config, JSON, or YAML and write it to stdout as pretty-printed JSON: local ucl = require('ucl') local parser = ucl.parser() parser:parse_string(io.read('*a')) local obj = parser:get_object() print(ucl.to_format(obj, 'json')) Reviewed by: kevans, pstef Approved by: mmacy (mentor) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25009 Modified: head/Makefile.inc1 head/libexec/flua/Makefile head/libexec/flua/linit_flua.c head/tools/build/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jun 22 01:31:08 2020 (r362476) +++ head/Makefile.inc1 Mon Jun 22 03:14:43 2020 (r362477) @@ -2112,8 +2112,8 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} # 13.0-CURRENT cycle, thus needs to be built on -older releases and stable # branches. .if ${BOOTSTRAPPING} < 1300059 -${_bt}-libexec/flua: ${_bt}-lib/liblua -_flua= lib/liblua libexec/flua +${_bt}-libexec/flua: ${_bt}-lib/liblua ${_bt}-lib/libucl +_flua= lib/liblua lib/libucl libexec/flua .endif # r245440 mtree -N support added Modified: head/libexec/flua/Makefile ============================================================================== --- head/libexec/flua/Makefile Mon Jun 22 01:31:08 2020 (r362476) +++ head/libexec/flua/Makefile Mon Jun 22 03:14:43 2020 (r362477) @@ -32,4 +32,10 @@ CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/l LIBADD+= edit .endif +UCLSRC?= ${SRCTOP}/contrib/libucl +.PATH: ${UCLSRC}/lua +SRCS+= lua_ucl.c +CFLAGS+= -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash +LIBADD+= ucl + .include Modified: head/libexec/flua/linit_flua.c ============================================================================== --- head/libexec/flua/linit_flua.c Mon Jun 22 01:31:08 2020 (r362476) +++ head/libexec/flua/linit_flua.c Mon Jun 22 03:14:43 2020 (r362477) @@ -36,6 +36,7 @@ #include "lauxlib.h" #include "lfs.h" #include "lposix.h" +#include "lua_ucl.h" /* ** these libs are loaded by lua.c and are readily available to any Lua @@ -59,6 +60,7 @@ static const luaL_Reg loadedlibs[] = { {"lfs", luaopen_lfs}, {"posix.sys.stat", luaopen_posix_sys_stat}, {"posix.unistd", luaopen_posix_unistd}, + {"ucl", luaopen_ucl}, {NULL, NULL} }; Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Mon Jun 22 01:31:08 2020 (r362476) +++ head/tools/build/Makefile Mon Jun 22 03:14:43 2020 (r362477) @@ -149,6 +149,7 @@ INSTALLDIR_LIST= \ lib/casper \ lib/geom \ usr/include/casper \ + usr/include/private/ucl \ usr/include/private/zstd \ usr/lib \ usr/libexec From owner-svn-src-head@freebsd.org Mon Jun 22 03:44:02 2020 Return-Path: Delivered-To: svn-src-head@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 5B96C33EB9E; Mon, 22 Jun 2020 03:44:02 +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 49qwJ21k93z45Rr; Mon, 22 Jun 2020 03:44:02 +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 3662227B5B; Mon, 22 Jun 2020 03:44:02 +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 05M3i2ta081532; Mon, 22 Jun 2020 03:44:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M3i2mS081531; Mon, 22 Jun 2020 03:44:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006220344.05M3i2mS081531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 22 Jun 2020 03:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362478 - head X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 03:44:02 -0000 Author: kevans Date: Mon Jun 22 03:44:01 2020 New Revision: 362478 URL: https://svnweb.freebsd.org/changeset/base/362478 Log: Squash liblzma build race As of r362452, liblzma depends on libmd but the buildworld build order hadn't been amended to document the new dependency. Reported by: jenkins via freqlabs X-MFC-With: r362452 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jun 22 03:14:43 2020 (r362477) +++ head/Makefile.inc1 Mon Jun 22 03:44:01 2020 (r362478) @@ -2774,7 +2774,7 @@ _lib_casper= lib/libcasper lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L -lib/liblzma__L: lib/libthr__L +lib/liblzma__L: lib/libmd__L lib/libthr__L lib/libzstd__L: lib/libthr__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} From owner-svn-src-head@freebsd.org Mon Jun 22 04:59:28 2020 Return-Path: Delivered-To: svn-src-head@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 D859A33FE40; Mon, 22 Jun 2020 04:59:28 +0000 (UTC) (envelope-from tmunro@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qxz45NZcz48gW; Mon, 22 Jun 2020 04:59:28 +0000 (UTC) (envelope-from tmunro@freebsd.org) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: tmunro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id AEAF22F2E9; Mon, 22 Jun 2020 04:59:28 +0000 (UTC) (envelope-from tmunro@freebsd.org) Received: by mail-ot1-f49.google.com with SMTP id u23so12043695otq.10; Sun, 21 Jun 2020 21:59:28 -0700 (PDT) X-Gm-Message-State: AOAM531ySueXr3EqPWT2Cd2VqblubUnhggMW63f5s+tJYfw2rCHsih03 mmaPIO+B9o+JGySwcT3aqrdUb9KNJKb0MSU+YEg= X-Google-Smtp-Source: ABdhPJyEZpi5XuHLyTfXSl4r3Wb1AJ8DueIxZ4RUq3p0KVQRARRMmjFDsUDiVIirgOSyZGMpbaPfpekxW6rBrSbNLsQ= X-Received: by 2002:a9d:1b6a:: with SMTP id l97mr10559044otl.325.1592801968047; Sun, 21 Jun 2020 21:59:28 -0700 (PDT) MIME-Version: 1.0 References: <202006210851.05L8pO5x083339@repo.freebsd.org> <20200621093540.GA41106@freefall.freebsd.org> In-Reply-To: <20200621093540.GA41106@freefall.freebsd.org> From: Thomas Munro Date: Mon, 22 Jun 2020 16:58:51 +1200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362460 - in head/sys: compat/cloudabi fs/devfs kern sys To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 04:59:28 -0000 On Sun, Jun 21, 2020 at 9:35 PM Piotr P. Stefaniak wrote: > On 2020-06-21 08:51:24, Thomas Munro wrote: > >Author: tmunro > >Date: Sun Jun 21 08:51:24 2020 > >New Revision: 362460 > >URL: https://svnweb.freebsd.org/changeset/base/362460 > > > >Log: > > vfs: track sequential reads and writes separately > > This sounds great to me! Have you considered MFC-ing this? Aside from whether it's a good idea, I wasn't assuming that was going to be possible (for example "Remove ->f_label from struct file" was not marked for MFC). I'm still trying to learn about the ABI stability rules... From owner-svn-src-head@freebsd.org Mon Jun 22 06:37:21 2020 Return-Path: Delivered-To: svn-src-head@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 0F2C7341A0B; Mon, 22 Jun 2020 06:37:21 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49r0801StVz4F48; Mon, 22 Jun 2020 06:37:19 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f195.google.com with SMTP id n24so17884614lji.10; Sun, 21 Jun 2020 23:37:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=VTjt9KwwIJJ8YuRSJAm2uFPBq00DsOpXv+04onUvWrE=; b=eQczvtPnLAMdRpKMrCVvsT7cj2BGohjV2/59GqtzjQKhL+Zee0a/KqgL612qOR7RjN HcTiajSEsES8K8ym/xjY08qA/GRT4++WfokMQ1Fg4lu4NEMd8CHHTn0uA5g290NwyVYu 0CyQEJ6X96uh3dEQPYGMutuxkOBF73z1Ib0ICDRYdn4lM9UyJE6r6gMuh8zoQlgaq9lG 5ek9W7Br/DIhSYOzHc2EebSFYkvM4gEM8dvFPOtHFkC38PPLwiyD/6Tbi0Lw7FdGT63h 4r2rkhBJgoJWdakaCGwJ/XYqJmMLZjQuKC9AvvmuVsgyGMKVygPscVcXx0I4LxqjVhZP CBGA== X-Gm-Message-State: AOAM531tEZrKXO9/L5scoZh/YhTw5RTkR6/I1PJrm8q6+ujEaYoaf70Y VkokTCp6/Wq6B/xcBI7a+7hwC58iIXw= X-Google-Smtp-Source: ABdhPJzMLBOhuw9b6R+W6CufhycbDlYQSsGR82jzW2Tk3rdw4BoFEu6R0nIwMVwF8KAf1x7aKS7o8g== X-Received: by 2002:a2e:9115:: with SMTP id m21mr7551523ljg.350.1592807837866; Sun, 21 Jun 2020 23:37:17 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id s62sm2205202lja.100.2020.06.21.23.37.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 23:37:16 -0700 (PDT) Subject: Re: svn commit: r362294 - head/sys/dev/sound/pci/hda To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006180612.05I6C6EE013037@repo.freebsd.org> <20200621215945.GA2057@kib.kiev.ua> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Mon, 22 Jun 2020 09:37:15 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200621215945.GA2057@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49r0801StVz4F48 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.195 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.25 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.96)[-0.959]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.33)[-0.329]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.195:from]; NEURAL_HAM_MEDIUM(-0.96)[-0.964]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.195:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 06:37:21 -0000 On 22/06/2020 00:59, Konstantin Belousov wrote: > This commit (or rather, a merge of this commit to stable/12) causes an issue > on my Apollo Lake machine. Look: > hdac0@pci0:0:14:0: class=0x040300 card=0xa1821458 chip=0x5a988086 rev=0x0b hdr=0x00 > vendor = 'Intel Corporation' > device = 'Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster' > class = multimedia > subclass = HDA > bar [10] = type Memory, range 64, base 0x91410000, size 16384, enabled > bar [20] = type Memory, range 64, base 0x91000000, size 1048576, enabled > cap 01[50] = powerspec 3 supports D0 D3 current D0 > cap 09[80] = vendor (length 20) Intel cap 15 version 0 > cap 05[60] = MSI supports 1 message, 64 bit > > DMAP base is 0xfffff80000000000. > tom% sudo /usr/local/bin/kgdb ~/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full /dev/mem > GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD] > Reading symbols from /usr/home/kostik/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full... > ... > sched_switch (td=0xfffff8029d516000, newtd=0xfffff800025f4000, > flags=) at ../../../kern/sched_ule.c:2143 > 2143 cpuid = PCPU_GET(cpuid); > (kgdb) p/x *(unsigned int *)(0xfffff80000000000+0x91410000+0x24) INTSTS > $1 = 0xc0000000 > This causes the first interrupt handler to loop forever. > > And this is why: > (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x5d) RIRBSTS > $3 = 0x0 > (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x4d) CORBSTS > $4 = 0x0 > (kgdb) p/x *(unsigned short *)(0xfffff80000000000+0x91410000+0xe) WAKESTS > $5 = 0x5 > So the SDIN State Change status bit is set, and nothing in the driver > clears it, it seems. > > More, the EDS specifies that another reason for INTSTS CIS bit set may > be the CORB Memory Error Indication (CMEI), and again it seems that driver > never clears the reason. > > So as is the change perhaps helps for some situations, but also > practically makes some systems to loose core in tight loop with interrupt > priority, which causes weird machine misbehavior like unkillable processes > and never finishing epochs. Kostik, thank you for the report and the debugging! It seems that the driver currently does do not much with the register 0xe (referred to by you as WAKESTS, by the code and the HDA specification as STATESTS). I think that we can just clear that register (documented as RW1C) More, I am surprised that the driver does not clear the register in hdac_attach2() when probing codecs. So, maybe something like a quick patch below. Also, I see that the driver never explicitly manages WAKEEN register. I think that it should. If we do not need or do not expect any wake events then we should clear the corresponding bits. So, maybe it would be better to just zero WAKEEN in attach and resume methods. Although, WAKEEN is documented as zero after reset, the specification has this note: These bits are only cleared by a power-on reset. Software must make no assumptions about how these bits are set and set them appropriately. Regarding CMEI, we never enable it by setting CMEIE and it should be zero after reset. So, we should never get that interrupt. The same applies to another potential interrupt source, RIRBOIS / RIRBOIC. Index: sys/dev/sound/pci/hda/hdac.c =================================================================== --- sys/dev/sound/pci/hda/hdac.c (revision 362383) +++ sys/dev/sound/pci/hda/hdac.c (working copy) @@ -312,6 +312,10 @@ hdac_one_intr(struct hdac_softc *sc, uint32_t ints /* Was this a controller interrupt? */ if (intsts & HDAC_INTSTS_CIS) { + /* XXX just clear SDIWAKE bits. */ + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, + HDAC_STATESTS_SDIWAKE_MASK); + rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS); /* Get as many responses that we can */ while (rirbsts & HDAC_RIRBSTS_RINTFL) { @@ -1530,6 +1534,7 @@ hdac_attach2(void *arg) device_printf(sc->dev, "Scanning HDA codecs ...\n"); ); statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS); + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, statests); hdac_unlock(sc); for (i = 0; i < HDAC_CODEC_MAX; i++) { if (HDAC_STATESTS_SDIWAKE(statests, i)) { -- Andriy Gapon From owner-svn-src-head@freebsd.org Mon Jun 22 07:29:09 2020 Return-Path: Delivered-To: svn-src-head@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 4C3AF342AF4; Mon, 22 Jun 2020 07:29:09 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49r1Hl4Rkvz4J50; Mon, 22 Jun 2020 07:29:07 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f54.google.com with SMTP id p18so12812699eds.7; Mon, 22 Jun 2020 00:29:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ds1AdJgiIe3/xv27T2ociFjULhJBqsdGKTuA0okfdxM=; b=JqKdFDTqFSnnRS1dqjmTOQRwACMQijkVlLstMjpRau7whq6kL1zJLVryLWPzMP9MZR AQCDPcsHSnjPAnEMHnubZ7i1D2hSWkqBZFC8X2V0+mDqsnVF/tgNx+3ke5SezDekxTK0 fIaGzTJlFSyVtjQ8/z74bMd3gGJRLuJlyUagfM885WiecRHLPs4f3EcRo4Zf7xVYTyoF 2fa3uJkx3VT+iyakhmMKXMf0n4QX9feE4nUZOt8Jilg7pNHug+UOtLzF+N93MTZXKU3A Rqbt7EhfXngr6tkvFRM9Y7FDQLaANcq7/3YuCXDyfhDsdKtTH+1T8+pSa4jmCfyXA0uR pwTg== X-Gm-Message-State: AOAM5326SlIWunkSCfmAtHb0EpJ1Y96VQY1UJceZTpVNETXvyfBg5SzT 65+6zUYuPz6pcvkEHl6BC2yrY+um X-Google-Smtp-Source: ABdhPJxJaWsGRtu+BxQ72I31doFlPhW/JnNtf6ErLJWtJyY/yOOdoJldgoWk7weFHTtnM6575E8n7A== X-Received: by 2002:aa7:c6d1:: with SMTP id b17mr16417941eds.39.1592810945631; Mon, 22 Jun 2020 00:29:05 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id dg24sm11412925edb.55.2020.06.22.00.29.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 00:29:04 -0700 (PDT) Subject: Re: svn commit: r362477 - in head: . libexec/flua tools/build To: Ryan Moeller , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006220314.05M3Eic1063005@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <5b27ac25-b2df-1539-db49-bfe6e9e1286a@FreeBSD.org> Date: Mon, 22 Jun 2020 09:29:05 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006220314.05M3Eic1063005@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49r1Hl4Rkvz4J50 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.33 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.95)[-0.952]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.98)[-0.981]; NEURAL_HAM_SHORT(-0.40)[-0.402]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.54:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.54:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 07:29:09 -0000 On 6/22/20 5:14 AM, Ryan Moeller wrote: > Author: freqlabs > Date: Mon Jun 22 03:14:43 2020 > New Revision: 362477 > URL: https://svnweb.freebsd.org/changeset/base/362477 > > Log: > flua: add ucl library > > libucl comes with a Lua library binding. Build it into flua. > > This lets us parse/generate config files in the various formats supported by > libucl with flua. For example, the following script will detect the format of > an object written to stdin as one of UCL config, JSON, or YAML and write it to > stdout as pretty-printed JSON: > > local ucl = require('ucl') > local parser = ucl.parser() > parser:parse_string(io.read('*a')) > local obj = parser:get_object() > print(ucl.to_format(obj, 'json')) > > Reviewed by: kevans, pstef > Approved by: mmacy (mentor) > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D25009 It sounds great! BTW, Is flua to be used by end users directly, or it is just a tool which should not be considered a public interface (like pjdlog.h)? Cheers, Mateusz From owner-svn-src-head@freebsd.org Mon Jun 22 07:35:24 2020 Return-Path: Delivered-To: svn-src-head@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 45438342E9D; Mon, 22 Jun 2020 07:35:24 +0000 (UTC) (envelope-from melifaro@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 49r1R00v4Mz4JJK; Mon, 22 Jun 2020 07:35:24 +0000 (UTC) (envelope-from melifaro@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 156E0AD6D; Mon, 22 Jun 2020 07:35:24 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05M7ZNwk022413; Mon, 22 Jun 2020 07:35:23 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M7ZNTV022411; Mon, 22 Jun 2020 07:35:23 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202006220735.05M7ZNTV022411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 22 Jun 2020 07:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362487 - in head/sys/dev/cxgbe: iw_cxgbe tom X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys/dev/cxgbe: iw_cxgbe tom X-SVN-Commit-Revision: 362487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 07:35:24 -0000 Author: melifaro Date: Mon Jun 22 07:35:23 2020 New Revision: 362487 URL: https://svnweb.freebsd.org/changeset/base/362487 Log: Switch cxgbe interface lookup to use fibX_lookup() from older fibX_lookup_nh_ext(). fibX_lookup_nh_ represents pre-epoch generation of fib kpi, providing less guarantees over pointer validness and requiring on-stack data copying. Reviewed by: np Differential Revision: https://reviews.freebsd.org/D24975 Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Jun 22 07:00:26 2020 (r362486) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Jun 22 07:35:23 2020 (r362487) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -537,32 +538,29 @@ static int get_ifnet_from_raddr(struct sockaddr_storage *raddr, struct ifnet **ifp) { int err = 0; + struct nhop_object *nh; if (raddr->ss_family == AF_INET) { struct sockaddr_in *raddr4 = (struct sockaddr_in *)raddr; - struct nhop4_extended nh4 = {0}; - err = fib4_lookup_nh_ext(RT_DEFAULT_FIB, raddr4->sin_addr, - NHR_REF, 0, &nh4); - *ifp = nh4.nh_ifp; - if (err) - fib4_free_nh_ext(RT_DEFAULT_FIB, &nh4); + nh = fib4_lookup(RT_DEFAULT_FIB, raddr4->sin_addr, 0, + NHR_NONE, 0); } else { struct sockaddr_in6 *raddr6 = (struct sockaddr_in6 *)raddr; - struct nhop6_extended nh6 = {0}; struct in6_addr addr6; uint32_t scopeid; memset(&addr6, 0, sizeof(addr6)); in6_splitscope((struct in6_addr *)&raddr6->sin6_addr, &addr6, &scopeid); - err = fib6_lookup_nh_ext(RT_DEFAULT_FIB, &addr6, scopeid, - NHR_REF, 0, &nh6); - *ifp = nh6.nh_ifp; - if (err) - fib6_free_nh_ext(RT_DEFAULT_FIB, &nh6); + nh = fib6_lookup(RT_DEFAULT_FIB, &addr6, scopeid, + NHR_NONE, 0); } + if (nh == NULL) + err = EHOSTUNREACH; + else + *ifp = nh->nh_ifp; CTR2(KTR_IW_CXGBE, "%s: return: %d", __func__, err); return err; } @@ -2589,6 +2587,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_ep *ep = NULL; struct ifnet *nh_ifp; /* Logical egress interface */ + struct epoch_tracker et; #ifdef VIMAGE struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context; struct vnet *vnet = rdma_id->route.addr.dev_addr.net; @@ -2639,9 +2638,11 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ ref_qp(ep); ep->com.thread = curthread; + NET_EPOCH_ENTER(et); CURVNET_SET(vnet); err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); if (err) { Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Mon Jun 22 07:00:26 2020 (r362486) +++ head/sys/dev/cxgbe/tom/t4_listen.c Mon Jun 22 07:35:23 2020 (r362487) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1052,10 +1053,9 @@ get_l2te_for_nexthop(struct port_info *pi, struct ifne struct l2t_entry *e; struct sockaddr_in6 sin6; struct sockaddr *dst = (void *)&sin6; + struct nhop_object *nh; if (inc->inc_flags & INC_ISIPV6) { - struct nhop6_basic nh6; - bzero(dst, sizeof(struct sockaddr_in6)); dst->sa_len = sizeof(struct sockaddr_in6); dst->sa_family = AF_INET6; @@ -1066,24 +1066,28 @@ get_l2te_for_nexthop(struct port_info *pi, struct ifne return (e); } - if (fib6_lookup_nh_basic(RT_DEFAULT_FIB, &inc->inc6_faddr, - 0, 0, 0, &nh6) != 0) + nh = fib6_lookup(RT_DEFAULT_FIB, &inc->inc6_faddr, 0, NHR_NONE, 0); + if (nh == NULL) return (NULL); - if (nh6.nh_ifp != ifp) + if (nh->nh_ifp != ifp) return (NULL); - ((struct sockaddr_in6 *)dst)->sin6_addr = nh6.nh_addr; + if (nh->nh_flags & NHF_GATEWAY) + ((struct sockaddr_in6 *)dst)->sin6_addr = nh->gw6_sa.sin6_addr; + else + ((struct sockaddr_in6 *)dst)->sin6_addr = inc->inc6_faddr; } else { - struct nhop4_basic nh4; - dst->sa_len = sizeof(struct sockaddr_in); dst->sa_family = AF_INET; - if (fib4_lookup_nh_basic(RT_DEFAULT_FIB, inc->inc_faddr, 0, 0, - &nh4) != 0) + nh = fib4_lookup(RT_DEFAULT_FIB, inc->inc_faddr, 0, NHR_NONE, 0); + if (nh == NULL) return (NULL); - if (nh4.nh_ifp != ifp) + if (nh->nh_ifp != ifp) return (NULL); - ((struct sockaddr_in *)dst)->sin_addr = nh4.nh_addr; + if (nh->nh_flags & NHF_GATEWAY) + ((struct sockaddr_in *)dst)->sin_addr = nh->gw4_sa.sin_addr; + else + ((struct sockaddr_in *)dst)->sin_addr = inc->inc_faddr; } e = t4_l2t_get(pi, ifp, dst); From owner-svn-src-head@freebsd.org Mon Jun 22 07:46:27 2020 Return-Path: Delivered-To: svn-src-head@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 E19D8343650; Mon, 22 Jun 2020 07:46:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49r1gl5lDqz4KRJ; Mon, 22 Jun 2020 07:46:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBF9BA8D3; Mon, 22 Jun 2020 07:46:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05M7kRu2028470; Mon, 22 Jun 2020 07:46:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M7kP63028458; Mon, 22 Jun 2020 07:46:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202006220746.05M7kP63028458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 22 Jun 2020 07:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362488 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin/boot0cfg X-SVN-Commit-Revision: 362488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 07:46:27 -0000 Author: bapt Date: Mon Jun 22 07:46:24 2020 New Revision: 362488 URL: https://svnweb.freebsd.org/changeset/base/362488 Log: Revert r362466 Such change should not have happen without prior discussion and review. With hat: transitioning core Modified: head/contrib/file/magic/Magdir/filesystems head/contrib/tcpdump/smbutil.c head/lib/geom/part/gpart.8 head/stand/efi/include/efipart.h head/stand/i386/boot0/boot0.S head/sys/dev/hptmv/vdevice.h head/sys/geom/part/g_part_mbr.c head/usr.bin/fortune/datfiles/freebsd-tips head/usr.bin/mkimg/mbr.c head/usr.sbin/boot0cfg/boot0cfg.8 head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/contrib/file/magic/Magdir/filesystems ============================================================================== --- head/contrib/file/magic/Magdir/filesystems Mon Jun 22 07:35:23 2020 (r362487) +++ head/contrib/file/magic/Magdir/filesystems Mon Jun 22 07:46:24 2020 (r362488) @@ -269,8 +269,8 @@ !:strength +65 >2 string OSBS OS/BS MBR # added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/ -# and https://en.wikipedia.org/wiki/Main_Boot_Record -# test for nearly all MS-DOS Main Boot Record initial program loader (IPL) is now done by +# and https://en.wikipedia.org/wiki/Master_Boot_Record +# test for nearly all MS-DOS Master Boot Record initial program loader (IPL) is now done by # characteristic assembler instructions: xor ax,ax;mov ss,ax;mov sp,7c00 >0 search/2 \x33\xc0\x8e\xd0\xbc\x00\x7c MS-MBR # Microsoft Windows 95A and early ( https://thestarman.pcministry.com/asm/mbr/STDMBR.htm ) @@ -436,7 +436,7 @@ >>>>>>>387 string Copyright\ (c)\ 1984,1998 >>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR) # -# tests for different MS-DOS Main Boot Records (MBR) moved and merged +# tests for different MS-DOS Master Boot Records (MBR) moved and merged # #>0x145 string Default:\ F \b, FREE-DOS MBR #>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR @@ -1087,7 +1087,7 @@ >11 ubyte x \b+ >11 use DOS-filename -# https://en.wikipedia.org/wiki/Main_boot_record#PTE +# https://en.wikipedia.org/wiki/Master_boot_record#PTE # display standard partition table 0 name partition-table #>0 ubyte x PARTITION-TABLE Modified: head/contrib/tcpdump/smbutil.c ============================================================================== --- head/contrib/tcpdump/smbutil.c Mon Jun 22 07:35:23 2020 (r362487) +++ head/contrib/tcpdump/smbutil.c Mon Jun 22 07:46:24 2020 (r362488) @@ -1339,7 +1339,7 @@ static const nt_err_code_struct nt_errors[] = { { 0xC00000A6, "STATUS_CANT_OPEN_ANONYMOUS" }, { 0xC00000A7, "STATUS_BAD_VALIDATION_CLASS" }, { 0xC00000A8, "STATUS_BAD_TOKEN_TYPE" }, - { 0xC00000A9, "STATUS_BAD_MAIN_BOOT_RECORD" }, + { 0xC00000A9, "STATUS_BAD_MASTER_BOOT_RECORD" }, { 0xC00000AA, "STATUS_INSTRUCTION_MISALIGNMENT" }, { 0xC00000AB, "STATUS_INSTANCE_NOT_AVAILABLE" }, { 0xC00000AC, "STATUS_PIPE_NOT_AVAILABLE" }, Modified: head/lib/geom/part/gpart.8 ============================================================================== --- head/lib/geom/part/gpart.8 Mon Jun 22 07:35:23 2020 (r362487) +++ head/lib/geom/part/gpart.8 Mon Jun 22 07:46:24 2020 (r362488) @@ -582,7 +582,7 @@ Requires the .Cm GEOM_PART_GPT kernel option. .It Cm MBR -Main Boot Record is used on PCs and removable media. +Master Boot Record is used on PCs and removable media. Requires the .Cm GEOM_PART_MBR kernel option. @@ -852,7 +852,7 @@ for MBR and .Qq Li "!0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" for GPT. .It Cm mbr -A partition that is sub-partitioned by a Main Boot Record (MBR). +A partition that is sub-partitioned by a Master Boot Record (MBR). This type is known as .Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" by GPT. @@ -1020,7 +1020,7 @@ option. The GEOM PART class knows how to safely embed bootstrap code into specific partitioning scheme metadata without causing any damage. .Pp -The Main Boot Record (MBR) uses a 512-byte bootstrap code image, embedded +The Master Boot Record (MBR) uses a 512-byte bootstrap code image, embedded into the partition table's metadata area. There are two variants of this bootstrap code: .Pa /boot/mbr @@ -1256,7 +1256,7 @@ present as independent partition. .Em NOTE : This may break a mirrored volume and lead to data damage. .It Va kern.geom.part.mbr.enforce_chs : No 0 -Specify how the Main Boot Record (MBR) module does alignment. +Specify how the Master Boot Record (MBR) module does alignment. If this variable is set to a non-zero value, the module will automatically recalculate the user-specified offset and size for alignment with the CHS geometry. Modified: head/stand/efi/include/efipart.h ============================================================================== --- head/stand/efi/include/efipart.h Mon Jun 22 07:35:23 2020 (r362487) +++ head/stand/efi/include/efipart.h Mon Jun 22 07:46:24 2020 (r362488) @@ -18,7 +18,7 @@ Module Name: efipart.h Abstract: - Info about disk partitions and Main Boot Records + Info about disk partitions and Master Boot Records @@ -62,7 +62,7 @@ typedef struct { UINT8 Unknown[2]; MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; UINT16 Signature; -} MAIN_BOOT_RECORD; +} MASTER_BOOT_RECORD; #pragma pack() Modified: head/stand/i386/boot0/boot0.S ============================================================================== --- head/stand/i386/boot0/boot0.S Mon Jun 22 07:35:23 2020 (r362487) +++ head/stand/i386/boot0/boot0.S Mon Jun 22 07:46:24 2020 (r362488) @@ -53,7 +53,7 @@ /* * BOOT BLOCK STRUCTURE * - * This code implements a Main Boot Record (MBR) for an Intel/PC disk. + * This code implements a Master Boot Record (MBR) for an Intel/PC disk. * It is 512 bytes long and it is normally loaded by the BIOS (or another * bootloader) at 0:0x7c00. This code depends on %cs:%ip being 0:0x7c00 * @@ -68,7 +68,7 @@ * (called 'packet') or CHS mode, whether to force a drive number, * and whether to write back the user's selection back to disk. * - * As in every Main Boot Record, the partition table is at 0x1be, + * As in every Master Boot Record, the partition table is at 0x1be, * made of four 16-byte entries each containing: * * OFF SIZE DESCRIPTION Modified: head/sys/dev/hptmv/vdevice.h ============================================================================== --- head/sys/dev/hptmv/vdevice.h Mon Jun 22 07:35:23 2020 (r362487) +++ head/sys/dev/hptmv/vdevice.h Mon Jun 22 07:46:24 2020 (r362488) @@ -260,13 +260,13 @@ struct fdisk_partition_table ULONG numsect; /* number of sectors in partition */ }; -typedef struct _Main_Boot_Record +typedef struct _Master_Boot_Record { UCHAR bootinst[446]; /* space to hold actual boot code */ struct fdisk_partition_table parts[4]; USHORT signature; /* set to 0xAA55 to indicate PC MBR format */ } -Main_Boot_Record, *PMain_Boot_Record; +Master_Boot_Record, *PMaster_Boot_Record; #ifndef SUPPORT_ARRAY /* TODO: move it later */ Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Mon Jun 22 07:35:23 2020 (r362487) +++ head/sys/geom/part/g_part_mbr.c Mon Jun 22 07:46:24 2020 (r362488) @@ -54,7 +54,7 @@ FEATURE(geom_part_mbr, "GEOM partitioning class for MB SYSCTL_DECL(_kern_geom_part); static SYSCTL_NODE(_kern_geom_part, OID_AUTO, mbr, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, - "GEOM_PART_MBR Main Boot Record"); + "GEOM_PART_MBR Master Boot Record"); static u_int enforce_chs = 0; SYSCTL_UINT(_kern_geom_part_mbr, OID_AUTO, enforce_chs, Modified: head/usr.bin/fortune/datfiles/freebsd-tips ============================================================================== --- head/usr.bin/fortune/datfiles/freebsd-tips Mon Jun 22 07:35:23 2020 (r362487) +++ head/usr.bin/fortune/datfiles/freebsd-tips Mon Jun 22 07:46:24 2020 (r362488) @@ -40,7 +40,7 @@ Handy bash(1) prompt: PS1="\u@\h \w \!$ " Having trouble using fetch through a firewall? Try setting the environment variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % -If other operating systems have damaged your Main Boot Record, you can +If other operating systems have damaged your Master Boot Record, you can reinstall it with gpart(8). See "man gpart" for details. % Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Mon Jun 22 07:35:23 2020 (r362487) +++ head/usr.bin/mkimg/mbr.c Mon Jun 22 07:46:24 2020 (r362488) @@ -112,7 +112,7 @@ mbr_write(lba_t imgsz __unused, void *bootcode) static struct mkimg_scheme mbr_scheme = { .name = "mbr", - .description = "Main Boot Record", + .description = "Master Boot Record", .aliases = mbr_aliases, .metadata = mbr_metadata, .write = mbr_write, Modified: head/usr.sbin/boot0cfg/boot0cfg.8 ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.8 Mon Jun 22 07:35:23 2020 (r362487) +++ head/usr.sbin/boot0cfg/boot0cfg.8 Mon Jun 22 07:46:24 2020 (r362488) @@ -68,7 +68,7 @@ boot manager on the specified and allows various operational parameters to be configured. .Pp On PCs, a boot manager typically occupies sector 0 of a disk, which is -known as the Main Boot Record (MBR). +known as the Master Boot Record (MBR). The MBR contains both code (to which control is passed by the PC BIOS) and data (an embedded table of defined slices). .Pp Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Mon Jun 22 07:35:23 2020 (r362487) +++ head/usr.sbin/boot0cfg/boot0cfg.c Mon Jun 22 07:46:24 2020 (r362488) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define MBRSIZE 512 /* main boot record size */ +#define MBRSIZE 512 /* master boot record size */ #define OFF_VERSION 0x1b0 /* offset: version number, only boot0version */ #define OFF_SERIAL 0x1b8 /* offset: volume serial number */ From owner-svn-src-head@freebsd.org Mon Jun 22 07:58:14 2020 Return-Path: Delivered-To: svn-src-head@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 885DD343D3E; Mon, 22 Jun 2020 07:58:14 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49r1xL34y3z4KyT; Mon, 22 Jun 2020 07:58:14 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 53F279BA; Mon, 22 Jun 2020 07:58:14 +0000 (UTC) Date: Mon, 22 Jun 2020 07:58:14 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362488 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... Message-ID: <20200622075814.GB3777@FreeBSD.org> References: <202006220746.05M7kP63028458@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006220746.05M7kP63028458@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 07:58:14 -0000 On Mon, Jun 22, 2020 at 07:46:25AM +0000, Baptiste Daroussin wrote: > New Revision: 362488 > URL: https://svnweb.freebsd.org/changeset/base/362488 > > Log: > Revert r362466 > > Such change should not have happen without prior discussion and review. Thank you Baptiste. ./danfe From owner-svn-src-head@freebsd.org Mon Jun 22 08:12:21 2020 Return-Path: Delivered-To: svn-src-head@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 B22C2344546; Mon, 22 Jun 2020 08:12:21 +0000 (UTC) (envelope-from andrew@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 49r2Fd4L1dz4MM4; Mon, 22 Jun 2020 08:12:21 +0000 (UTC) (envelope-from andrew@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 90278B176; Mon, 22 Jun 2020 08:12:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05M8CLao043361; Mon, 22 Jun 2020 08:12:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M8CLo9043360; Mon, 22 Jun 2020 08:12:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006220812.05M8CLo9043360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 22 Jun 2020 08:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362489 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 362489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 08:12:21 -0000 Author: andrew Date: Mon Jun 22 08:12:21 2020 New Revision: 362489 URL: https://svnweb.freebsd.org/changeset/base/362489 Log: Fix reboot command on the Raspberry Pi series. The Raspbery Pi computers do not properly implement PSCI. The canonical way to reset them is to set a watchdog timer and allow it to expire. Submitted by: Robert Crowston Differential Revision: https://reviews.freebsd.org/D25268 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Mon Jun 22 07:46:24 2020 (r362488) +++ head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c Mon Jun 22 08:12:21 2020 (r362489) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -89,10 +90,12 @@ struct bcmwd_softc { static struct ofw_compat_data compat_data[] = { {"broadcom,bcm2835-wdt", BSD_DTB}, {"brcm,bcm2835-pm-wdt", UPSTREAM_DTB}, + {"brcm,bcm2835-pm", UPSTREAM_DTB}, {NULL, 0} }; static void bcmwd_watchdog_fn(void *private, u_int cmd, int *error); +static void bcmwd_reboot_system(void *, int); static int bcmwd_probe(device_t dev) @@ -143,6 +146,15 @@ bcmwd_attach(device_t dev) mtx_init(&sc->mtx, "BCM2835 Watchdog", "bcmwd", MTX_DEF); EVENTHANDLER_REGISTER(watchdog_list, bcmwd_watchdog_fn, sc, 0); + /* + * Handle reboot events. This needs to happen with slightly greater + * priority than the PSCI handler, since PSCI reset is not properly + * implemented on the Pi and it just puts the Pi into a halt + * state. + */ + EVENTHANDLER_REGISTER(shutdown_final, bcmwd_reboot_system, sc, + SHUTDOWN_PRI_LAST-1); + return (0); } @@ -161,16 +173,17 @@ bcmwd_watchdog_fn(void *private, u_int cmd, int *error if (cmd > 0) { sec = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000000; if (sec == 0 || sec > 15) { - /* + /* * Can't arm * disable watchdog as watchdog(9) requires */ device_printf(sc->dev, "Can't arm, timeout must be between 1-15 seconds\n"); - WRITE(sc, BCM2835_RSTC_REG, + WRITE(sc, BCM2835_RSTC_REG, (BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) | BCM2835_RSTC_RESET); mtx_unlock(&sc->mtx); + *error = EINVAL; return; } @@ -187,7 +200,7 @@ bcmwd_watchdog_fn(void *private, u_int cmd, int *error *error = 0; } else - WRITE(sc, BCM2835_RSTC_REG, + WRITE(sc, BCM2835_RSTC_REG, (BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) | BCM2835_RSTC_RESET); @@ -208,6 +221,27 @@ bcmwd_watchdog_reset(void) (READ(bcmwd_lsc, BCM2835_RSTC_REG) & BCM2835_RSTC_WRCFG_CLR) | (BCM2835_PASSWORD << BCM2835_PASSWORD_SHIFT) | BCM2835_RSTC_WRCFG_FULL_RESET); +} + +static void +bcmwd_reboot_system(void *sc, int howto) +{ + int cmd, error = 0; + + /* Only handle reset. */ + if (howto & RB_HALT || howto & RB_POWEROFF) + return; + + printf("Resetting system ... "); + + cmd = WD_TO_1SEC; + bcmwd_watchdog_fn(sc, cmd, &error); + + /* Wait for watchdog timeout. */ + DELAY(2000000); + + /* Not reached ... one hopes. */ + printf("failed to reset (errno %d).\n", error); } static device_method_t bcmwd_methods[] = { From owner-svn-src-head@freebsd.org Mon Jun 22 08:23:17 2020 Return-Path: Delivered-To: svn-src-head@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 BF8A1344654; Mon, 22 Jun 2020 08:23:17 +0000 (UTC) (envelope-from dfr@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 49r2VF4gljz4MxF; Mon, 22 Jun 2020 08:23:17 +0000 (UTC) (envelope-from dfr@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 9BBE4B812; Mon, 22 Jun 2020 08:23:17 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05M8NH3k052525; Mon, 22 Jun 2020 08:23:17 GMT (envelope-from dfr@FreeBSD.org) Received: (from dfr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05M8NHdb052523; Mon, 22 Jun 2020 08:23:17 GMT (envelope-from dfr@FreeBSD.org) Message-Id: <202006220823.05M8NHdb052523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dfr set sender to dfr@FreeBSD.org using -f From: Doug Rabson Date: Mon, 22 Jun 2020 08:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362490 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: dfr X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 08:23:17 -0000 Author: dfr Date: Mon Jun 22 08:23:16 2020 New Revision: 362490 URL: https://svnweb.freebsd.org/changeset/base/362490 Log: Add some missing parts for supporting va_birthtime. Reviewed by: rmacklem Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfsport.h head/sys/fs/nfs/nfsproto.h Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Jun 22 08:12:21 2020 (r362489) +++ head/sys/fs/nfs/nfs_commonsubs.c Mon Jun 22 08:23:16 2020 (r362490) @@ -594,6 +594,8 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vatt NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEACCESSSET); if (vap->va_mtime.tv_sec != VNOVAL) NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEMODIFYSET); + if (vap->va_birthtime.tv_sec != VNOVAL) + NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMECREATE); (void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0, &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0, NULL); break; @@ -2043,8 +2045,15 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, break; case NFSATTRBIT_TIMECREATE: NFSM_DISSECT(tl, u_int32_t *, NFSX_V4TIME); - if (compare && !(*retcmpp)) - *retcmpp = NFSERR_ATTRNOTSUPP; + fxdr_nfsv4time(tl, &temptime); + if (compare) { + if (!(*retcmpp)) { + if (!NFS_CMPTIME(temptime, nap->na_btime)) + *retcmpp = NFSERR_NOTSAME; + } + } else if (nap != NULL) { + nap->na_btime = temptime; + } attrsum += NFSX_V4TIME; break; case NFSATTRBIT_TIMEDELTA: Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Mon Jun 22 08:12:21 2020 (r362489) +++ head/sys/fs/nfs/nfsport.h Mon Jun 22 08:23:16 2020 (r362490) @@ -649,6 +649,7 @@ struct nfsvattr { #define na_atime na_vattr.va_atime #define na_mtime na_vattr.va_mtime #define na_ctime na_vattr.va_ctime +#define na_btime na_vattr.va_birthtime #define na_gen na_vattr.va_gen #define na_flags na_vattr.va_flags #define na_rdev na_vattr.va_rdev Modified: head/sys/fs/nfs/nfsproto.h ============================================================================== --- head/sys/fs/nfs/nfsproto.h Mon Jun 22 08:12:21 2020 (r362489) +++ head/sys/fs/nfs/nfsproto.h Mon Jun 22 08:23:16 2020 (r362490) @@ -1127,6 +1127,7 @@ struct nfsv3_sattr { NFSATTRBM_SPACETOTAL | \ NFSATTRBM_SPACEUSED | \ NFSATTRBM_TIMEACCESS | \ + NFSATTRBM_TIMECREATE | \ NFSATTRBM_TIMEDELTA | \ NFSATTRBM_TIMEMETADATA | \ NFSATTRBM_TIMEMODIFY | \ @@ -1176,6 +1177,7 @@ struct nfsv3_sattr { (NFSATTRBM_MODE | \ NFSATTRBM_OWNER | \ NFSATTRBM_OWNERGROUP | \ + NFSATTRBM_TIMECREATE | \ NFSATTRBM_TIMEACCESSSET | \ NFSATTRBM_TIMEMODIFYSET) #define NFSATTRBIT_SETABLE2 \ From owner-svn-src-head@freebsd.org Mon Jun 22 08:41:12 2020 Return-Path: Delivered-To: svn-src-head@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 61440344F87; Mon, 22 Jun 2020 08:41:12 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49r2tv4LTSz4Ngr; Mon, 22 Jun 2020 08:41:11 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-lj1-x243.google.com with SMTP id a9so18293984ljn.6; Mon, 22 Jun 2020 01:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=O4Nrl0kQHwTCCbHdNqyypq5GjtnJUS6bdJQKBOapMnk=; b=mHK24itWAf3ZsDVkmfDHN61/r7j2fc+kkMaWNp9Aj2vRlLR3ZF7a8QpppEQnc6xPpo 38HZMhFJhEiQiTh7NXTgFMQWuUyxkxzBtVzB7K3SZhd/N6rNZS2QChQfFydb9f6bGtzv of3F7auC2x8EspT5nTaw5fiFPDTej5NF1pu+Eb8Snf3ouKEVwx+s2LNedmyL0gIpvbaT 7Dah5+m+jr4dIGY3M2P3LIi3f3scOPxdiyGw4R5Tl+qK2zYEB1nU8wzU65SA2SWzIOYl 4/uMwwT7LhvZ1wuEDdh4CKudH4Tkl/And5/p85En+F2qx4yDAdwV7wPu1UWsKob3xqej zb4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O4Nrl0kQHwTCCbHdNqyypq5GjtnJUS6bdJQKBOapMnk=; b=AgsDvR4WgeqBM/cFV3Kp1VqH/pHvbYzvSH1BQiOaMU4STpdnWwkSyLNw77jrb6M0qw LGXtV44w5nzh8jAdIaltDojz9ijyWvlSkWGcGtzgz9mxw6fVT3lYmlG8jzkwEFUTeOdq H3UxccwRGAJoiIC1/LS3wcRAUrKhK9e7cq5GRPR1er0KZ5RZnvD72m8RP9m3wYVI7OO/ yQHTdY9IQyszK1qFzaeE7xebyd7jaNWp0fkXmitthsCf4ZIpGlKhDAokjB7W5svcrblI Cv6l9qkKcnwm0wAUPvBIKyxLDzMqHDjUUH2J5FFDyD4w6n1JlxBw7vcavOPvnsOgEQ2s TEfg== X-Gm-Message-State: AOAM533NE9KS/Uywj88wRNglOyTrD3p0M9UvhrT9cdsoW7aTeA/qH0XU wgMo+hpzxxhSO5OWQFoPmfwVX2RD X-Google-Smtp-Source: ABdhPJxNDjlly01RrOzbSQ56MNPzjPLF4HD7IoBI3k5BMBdoQxaBD9qZwMiU6aRLACrCrqtLPg+MAA== X-Received: by 2002:a2e:8945:: with SMTP id b5mr6603650ljk.169.1592815269176; Mon, 22 Jun 2020 01:41:09 -0700 (PDT) Received: from [192.168.1.6] ([188.226.57.142]) by smtp.gmail.com with ESMTPSA id g5sm2601875ljk.93.2020.06.22.01.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 01:41:08 -0700 (PDT) Subject: Re: svn commit: r362452 - in head: contrib/xz/src/liblzma/check lib/liblzma share/mk To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006202132.05KLW781071057@repo.freebsd.org> From: Ruslan Garipov Message-ID: <25ecb60a-4038-3f30-5784-605cf8d0836f@gmail.com> Date: Mon, 22 Jun 2020 13:41:03 +0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006202132.05KLW781071057@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49r2tv4LTSz4Ngr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=mHK24itW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::243 as permitted sender) smtp.mailfrom=ruslanngaripov@gmail.com X-Spamd-Result: default: False [-3.69 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[188.226.57.142:received]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.03)[-1.031]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::243:from]; NEURAL_HAM_SHORT(-0.67)[-0.666]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 08:41:12 -0000 On 6/21/2020 2:32 AM, Xin LI wrote: > Author: delphij > Date: Sat Jun 20 21:32:07 2020 > New Revision: 362452 > URL: https://svnweb.freebsd.org/changeset/base/362452 > > Log: > liblzma: Make liblzma use libmd implementation of SHA256. I'm trying to update from r362172 (GENERIC-NODEBUG) to r362468 (a custom KERNCONF), and failing on buildworld: ===> lib/liblzma (obj,all,install) make[4]: /usr/obj/usr/src/i386.i386/lib/liblzma/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/i386.i386/tmp/usr/lib/libmd.a building shared library liblzma.so.5 cc -target i386-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/i386.i386/tmp ... tsort -q` -lmd -lpthread ld: error: unable to find library -lmd cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[4]: stopped in /usr/src/lib/liblzma As I've already mentioned I run FreeBSD 13.0-CURRENT x86 r362172 GENERIC-NODEBUG. The kernel/user land were built with the default kernel config and empty make.conf and src.conf. Now I'm trying to update to r362468 with custom kernel config, make.conf and src.conf. What should I show you from those files in order you can help me to fix the error? I just don't understand why libmd isn't built. Because the library currently exists as /lib/libmd.so.6 (therefore, it was build on the previous update to r362172), I believe I missed something in my config files. Thanks! > > MFC after: 2 weeks > PR: 200142 > > Deleted: > head/contrib/xz/src/liblzma/check/sha256.c > Modified: > head/lib/liblzma/Makefile > head/lib/liblzma/Symbol.map > head/lib/liblzma/config.h > head/share/mk/src.libnames.mk > > Modified: head/lib/liblzma/Makefile > ============================================================================== > --- head/lib/liblzma/Makefile Sat Jun 20 21:06:02 2020 (r362451) > +++ head/lib/liblzma/Makefile Sat Jun 20 21:32:07 2020 (r362452) > @@ -78,8 +78,7 @@ SRCS+= common.c \ > .PATH: ${LZMADIR}/check > SRCS+= check.c \ > crc32_table.c \ > - crc64_table.c \ > - sha256.c > + crc64_table.c > .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" > SRCS+= crc32_x86.S \ > crc64_x86.S > @@ -125,11 +124,11 @@ SRCS+= simple_coder.c \ > > .PATH: ${LZMADIR} > > -VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \ > +VERSION_MAJOR!= sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \ > ${LZMADIR}/api/lzma/version.h > -VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \ > +VERSION_MINOR!= sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \ > ${LZMADIR}/api/lzma/version.h > -VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \ > +VERSION_PATCH!= sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \ > ${LZMADIR}/api/lzma/version.h > > WARNS?= 3 > @@ -147,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ > -I${LZMADIR}/simple \ > -I${LZMADIR:H}/common > > -LIBADD+= pthread > +LIBADD+= md pthread > > VERSION_DEF= ${.CURDIR}/Versions.def > SYMBOL_MAPS= ${.CURDIR}/Symbol.map > @@ -160,10 +159,11 @@ FILESDIR= ${LIBDATADIR}/pkgconfig > > liblzma.pc: liblzma.pc.in > sed -e 's,@prefix@,/usr,g ; \ > - s,@exec_prefix@,/usr,g ; \ > + s,@exec_prefix@,/usr,g ; \ > s,@libdir@,/usr/lib,g ; \ > s,@includedir@,/usr/include,g ; \ > - s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ > + s,@LIBS@,-pthread -lmd,g ; \ > + s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \ > s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ > s,@PTHREAD_CFLAGS@,,g ; \ > s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET} > > Modified: head/lib/liblzma/Symbol.map > ============================================================================== > --- head/lib/liblzma/Symbol.map Sat Jun 20 21:06:02 2020 (r362451) > +++ head/lib/liblzma/Symbol.map Sat Jun 20 21:32:07 2020 (r362452) > @@ -180,9 +180,6 @@ XZprivate_1.0 { > lzma_raw_coder_memusage; > lzma_raw_decoder_init; > lzma_raw_encoder_init; > - lzma_sha256_finish; > - lzma_sha256_init; > - lzma_sha256_update; > lzma_simple_arm_decoder_init; > lzma_simple_arm_encoder_init; > lzma_simple_armthumb_decoder_init; > > Modified: head/lib/liblzma/config.h > ============================================================================== > --- head/lib/liblzma/config.h Sat Jun 20 21:06:02 2020 (r362451) > +++ head/lib/liblzma/config.h Sat Jun 20 21:32:07 2020 (r362452) > @@ -211,16 +211,13 @@ > /* #undef HAVE_SHA256INIT */ > > /* Define to 1 if the system has the type `SHA256_CTX'. */ > -/* FreeBSD - disabled libmd SHA256 for now */ > -/* #undef HAVE_SHA256_CTX */ > +#define HAVE_SHA256_CTX 1 > > /* Define to 1 if you have the header file. */ > -/* FreeBSD - disabled libmd SHA256 for now */ > -/* #undef HAVE_SHA256_H */ > +#define HAVE_SHA256_H 1 > > /* Define to 1 if you have the `SHA256_Init' function. */ > -/* FreeBSD - disabled libmd SHA256 for now */ > -/* #undef HAVE_SHA256_INIT */ > +#define HAVE_SHA256_INIT 1 > > /* Define to 1 if the system has the type `SHA2_CTX'. */ > /* #undef HAVE_SHA2_CTX */ > > Modified: head/share/mk/src.libnames.mk > ============================================================================== > --- head/share/mk/src.libnames.mk Sat Jun 20 21:06:02 2020 (r362451) > +++ head/share/mk/src.libnames.mk Sat Jun 20 21:32:07 2020 (r362452) > @@ -350,7 +350,7 @@ _DP_heimipcs= heimbase roken pthread > _DP_kafs5= asn1 krb5 roken > _DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc > _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err > -_DP_lzma= pthread > +_DP_lzma= md pthread > _DP_ucl= m > _DP_vmmapi= util > _DP_opencsd= cxxrt > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Mon Jun 22 08:54:05 2020 Return-Path: Delivered-To: svn-src-head@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 8EE6434558E; Mon, 22 Jun 2020 08:54:05 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49r39m6DTmz4PSD; Mon, 22 Jun 2020 08:54:04 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C10BD5C1DFF; Mon, 22 Jun 2020 04:47:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Jun 2020 04:47:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=c G9hs3LsQURPHMOHM2l71qBu72JB50Xf2w1/OYbqfIA=; b=bVes9+giIitNcG5Vn F6V2ldnGfnoDS+nvi5TPlCp2sv/AE5uqTpEsfaMnfzRJH1pVMBrE6kfYHO8GA5hz sl2V2eH3Tvj4uToq058btrwr+03KfWSqHasvgegcuF31j4PGrcOvXjumYndX0S9z ryZFT73X54+O6U9t29ttgPRm2lCcewmnugBkBlw+X6QD2XZXGxjWgrn79/ZpTAaP dpHHSrB/Sy1pvEU2EZxZQPZZ7lpED/reNKQttlkim7jx8TBIP0nXEuAwW6tiG8tc wKTrKxVMEBkBEN6cZkMoMCZhavM71Hp6MDxhRI0KPdP3J+GDM0WNvuCcsAoGrH1u Z3dXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=cG9hs3LsQURPHMOHM2l71qBu72JB50Xf2w1/OYbqf IA=; b=lkdf0uK9MMk7H2mnRne0+/cG+tiedr/VKrMY95+KyLGVRJ11nphSWp/ry BhhBGjvnHTMy9tHliXjogjWCTm81qS49bhFPc0+AreoMDlnnTy98F50vCLhAKhUg A8voqXOgAHj5C70/itEM7TKRtS5N8M6M7pr+nGZXQBqTM8XPecgXeDcukv+izf1F wx+AqCP9eRFeIeUx4kOjTlAjl+T3xd23HOTKrxZ93AzlFRO38Ex/Ql7LYHf7gY4y WjYm3Yvey8BptJcpW0P381SXT36tJhUnLwuaZIRQd+eCgBFCzxwKlmtBAVkhRBip tY01ofxPPYaDFHXFmKQPNfQe5tMjw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekvddguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihuhhrihhpvheshihurhhiphhvrdguvghvqeenucggtffrrghtth gvrhhnpeeikeetfedtfedtkefhffeuleejfeffgfffffeuhfehgfehjedvgeefheeivedu gfenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucfkphepledurddvgedtrdduvd egrddufeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhephihurhhiphhvseihuhhrihhpvhdruggvvh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 8B489306734E; Mon, 22 Jun 2020 04:47:47 -0400 (EDT) Subject: Re: svn commit: r362452 - in head: contrib/xz/src/liblzma/check lib/liblzma share/mk To: Ruslan Garipov , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006202132.05KLW781071057@repo.freebsd.org> <25ecb60a-4038-3f30-5784-605cf8d0836f@gmail.com> From: Yuri Pankov Message-ID: Date: Mon, 22 Jun 2020 11:47:45 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <25ecb60a-4038-3f30-5784-605cf8d0836f@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49r39m6DTmz4PSD X-Spamd-Bar: ++++++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=bVes9+gi; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=lkdf0uK9; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.28 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [14.82 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:66.111.4.28:c]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.28:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; FREEMAIL_TO(0.00)[gmail.com,FreeBSD.org,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.28:from]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.137:received]; R_DKIM_ALLOW(0.00)[yuripv.dev:s=fm1,messagingengine.com:s=fm3]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.54)[0.539]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; NEURAL_SPAM_MEDIUM(0.98)[0.982]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.90)[0.904]; URIBL_BLACK(7.50)[yuripv.dev:dkim]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 08:54:05 -0000 Ruslan Garipov wrote: > On 6/21/2020 2:32 AM, Xin LI wrote: >> Author: delphij >> Date: Sat Jun 20 21:32:07 2020 >> New Revision: 362452 >> URL: https://svnweb.freebsd.org/changeset/base/362452 >> >> Log: >> liblzma: Make liblzma use libmd implementation of SHA256. > I'm trying to update from r362172 (GENERIC-NODEBUG) to r362468 (a custom > KERNCONF), and failing on buildworld: [...] I think kevans took care of it in r362478. From owner-svn-src-head@freebsd.org Mon Jun 22 10:01:25 2020 Return-Path: Delivered-To: svn-src-head@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 587FB34617E; Mon, 22 Jun 2020 10:01:25 +0000 (UTC) (envelope-from 0mp@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 49r4gT1ZMbz4T5T; Mon, 22 Jun 2020 10:01:25 +0000 (UTC) (envelope-from 0mp@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 17584C6D5; Mon, 22 Jun 2020 10:01:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MA1OCs009820; Mon, 22 Jun 2020 10:01:24 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MA1OUd009819; Mon, 22 Jun 2020 10:01:24 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006221001.05MA1OUd009819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 22 Jun 2020 10:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362491 - head/sbin/rcorder X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/sbin/rcorder X-SVN-Commit-Revision: 362491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 10:01:25 -0000 Author: 0mp (doc,ports committer) Date: Mon Jun 22 10:01:24 2020 New Revision: 362491 URL: https://svnweb.freebsd.org/changeset/base/362491 Log: Improve the rcorder manual page - Fix formatting issues such as: - Use Ql instead of Dq Li as Li is deprecated - Address some mandoc warnings - Add arguments missing from the list of options (i.e., document "-k keep" instead of just "-k"). - Document that -k and -s can be specified multiple times - Use sshd instead of named for the example in the BUGS section, as named is not in the base system. Also, use Nm instead of Xr there as it is not the sshd binary that is required to be running, but the service. - Use Sy instead of Cm for KEYWORDS. Cm is reserved for command-line modifiers of the CLI. - Add an EXAMPLES section - Cross-reference service(8). MFC after: 2 weeks Modified: head/sbin/rcorder/rcorder.8 Modified: head/sbin/rcorder/rcorder.8 ============================================================================== --- head/sbin/rcorder/rcorder.8 Mon Jun 22 08:23:16 2020 (r362490) +++ head/sbin/rcorder/rcorder.8 Mon Jun 22 10:01:24 2020 (r362491) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 27, 2018 +.Dd June 22, 2020 .Dt RCORDER 8 .Os .Sh NAME @@ -62,30 +62,30 @@ and which indicate, for each file, which may be expected to be filled by that file. .Pp Within each file, a block containing a series of -.Dq Li REQUIRE , -.Dq Li PROVIDE , -.Dq Li BEFORE +.Ql REQUIRE , +.Ql PROVIDE , +.Ql BEFORE and -.Dq Li KEYWORD +.Ql KEYWORD lines must appear. The format of the lines is rigid. Each line must begin with a single .Ql # , followed by a single space, followed by -.Dq Li PROVIDE: , -.Dq Li REQUIRE: , -.Dq Li BEFORE: , +.Ql PROVIDE\&: , +.Ql REQUIRE\&: , +.Ql BEFORE\&: , or -.Dq Li KEYWORD: . +.Ql KEYWORD\&: . No deviation is permitted. Each dependency line is then followed by a series of conditions, separated by whitespace. Multiple -.Dq Li PROVIDE , -.Dq Li REQUIRE , -.Dq Li BEFORE +.Ql PROVIDE , +.Ql REQUIRE , +.Ql BEFORE and -.Dq Li KEYWORD +.Ql KEYWORD lines may appear, but all such lines must appear in a sequence without any intervening lines, as once a line that does not follow the format is reached, parsing stops. @@ -94,19 +94,21 @@ is reached, parsing stops. .\" that they can be deprecated at some point in the future. .Pp The options are as follows: -.Bl -tag -width indent -.It Fl k +.Bl -tag -width "-k keep" +.It Fl k Ar keep Add the specified keyword to the .Dq "keep list" . If any .Fl k option is given, only those files containing the matching keyword are listed. -.It Fl s +This option can be specified multiple times. +.It Fl s Ar skip Add the specified keyword to the .Dq "skip list" . If any .Fl s option is given, files containing the matching keyword are not listed. +This option can be specified multiple times. .El .Pp An example block follows: @@ -117,20 +119,20 @@ An example block follows: .Ed .Pp This block states that the file in which it appears depends upon the -.Dq Li networking , -.Dq Li syslog , +.Ql networking , +.Ql syslog , and -.Dq Li usr +.Ql usr conditions, and provides the -.Dq Li dns +.Ql dns and -.Dq Li nscd +.Ql nscd conditions. .Pp A file may contain zero -.Dq Li PROVIDE +.Ql PROVIDE lines, in which case it provides no conditions, and may contain zero -.Dq Li REQUIRE +.Ql REQUIRE lines, in which case it has no dependencies. There must be at least one file with no dependencies in the set of arguments passed to @@ -140,19 +142,36 @@ in order for it to find a starting place in the depend There are several .Em KEYWORDs in use: -.Bl -tag -width ".Cm shutdown" -offset indent -.It Cm firstboot, nojail, nojailvnet, nostart +.Bl -tag -width "shutdown" -offset indent +.It Sy firstboot , nojail , nojailvnet , nostart Used by .Xr rc 8 . -.It Cm resume +.It Sy resume Used by .Nm /etc/rc.resume (see .Xr acpiconf 8 ) -.It Cm shutdown +.It Sy shutdown Used by .Xr rc.shutdown 8 . .El +.Sh EXAMPLES +Print the dependency ordering of the services from the base system and +.Xr ports 7 : +.Bd -literal -offset indent +$ rcorder /etc/rc.d/* /usr/local/etc/rc.d/* +.Ed +.Pp +Count the number of services in the base system, which specify the +.Sy shutdown +keyword, while skipping those with +.Sy firstboot +and +.Sy nojailvnet : +.Bd -literal -offset indent +$ rcorder -k nostart -s firstboot -s nojailvnet /etc/rc.d/* | wc -l + 3 +.Ed .Sh DIAGNOSTICS The .Nm @@ -161,9 +180,9 @@ status if it encounters an error while processing the .Bl -diag .It "Requirement %s has no providers, aborting." No file has a -.Dq Li PROVIDE +.Ql PROVIDE line corresponding to a condition present in a -.Dq Li REQUIRE +.Ql REQUIRE line in another file. .It "Circular dependency on provision %s, aborting." A set of files has a circular dependency which was detected while @@ -175,7 +194,8 @@ processing the stated file. .Sh SEE ALSO .Xr acpiconf 8 , .Xr rc 8 , -.Xr rc.shutdown 8 +.Xr rc.shutdown 8 , +.Xr service 8 .Sh HISTORY The .Nm @@ -192,7 +212,7 @@ and .An Matthew R. Green Aq Mt mrg@eterna.com.au . .Sh BUGS The -.Dq Li REQUIRE +.Ql REQUIRE keyword is misleading: It does not describe which daemons have to be running before a script will be started. @@ -200,12 +220,12 @@ It describes which scripts must be placed before it in the dependency ordering. For example, if your script has a -.Dq Li REQUIRE +.Ql REQUIRE on -.Dq Li named , +.Ql sshd , it means the script must be placed after the -.Dq Li named +.Ql sshd script in the dependency ordering, not necessarily that it requires -.Xr named 8 +.Nm sshd to be started or enabled. From owner-svn-src-head@freebsd.org Mon Jun 22 10:32:41 2020 Return-Path: Delivered-To: svn-src-head@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 B1333347330; Mon, 22 Jun 2020 10:32:41 +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.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 49r5MY4BLBz4XjV; Mon, 22 Jun 2020 10:32:41 +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 8AEB5CE4F; Mon, 22 Jun 2020 10:32:41 +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 05MAWf6O032993; Mon, 22 Jun 2020 10:32:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MAWfNT032992; Mon, 22 Jun 2020 10:32:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006221032.05MAWfNT032992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 22 Jun 2020 10:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362492 - head/sys/dev/gpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/gpio X-SVN-Commit-Revision: 362492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 10:32:41 -0000 Author: avg Date: Mon Jun 22 10:32:41 2020 New Revision: 362492 URL: https://svnweb.freebsd.org/changeset/base/362492 Log: gpiobus_release_pin: remove incorrect prefix from error messages It's interesting that similar messages from gpiobus_acquire_pin never had any prefix while gpiobus_release_pin messages were prefixed with "gpiobus_acquire_pin". Anyway, the prefix is not that useful and can be deduced from context. MFC after: 2 weeks Modified: head/sys/dev/gpio/gpiobus.c Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Mon Jun 22 10:01:24 2020 (r362491) +++ head/sys/dev/gpio/gpiobus.c Mon Jun 22 10:32:41 2020 (r362492) @@ -421,13 +421,13 @@ gpiobus_release_pin(device_t bus, uint32_t pin) /* Consistency check. */ if (pin >= sc->sc_npins) { device_printf(bus, - "gpiobus_acquire_pin: invalid pin %d, max=%d\n", + "invalid pin %d, max=%d\n", pin, sc->sc_npins - 1); return (-1); } if (!sc->sc_pins[pin].mapped) { - device_printf(bus, "gpiobus_acquire_pin: pin %d is not mapped\n", pin); + device_printf(bus, "pin %d is not mapped\n", pin); return (-1); } sc->sc_pins[pin].mapped = 0; From owner-svn-src-head@freebsd.org Mon Jun 22 10:49:51 2020 Return-Path: Delivered-To: svn-src-head@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 5B6543479C5; Mon, 22 Jun 2020 10:49:51 +0000 (UTC) (envelope-from andrew@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 49r5lM1QxMz4Z2l; Mon, 22 Jun 2020 10:49:51 +0000 (UTC) (envelope-from andrew@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 2C5FECEF6; Mon, 22 Jun 2020 10:49:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MAnpJk039280; Mon, 22 Jun 2020 10:49:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MAnpJs039279; Mon, 22 Jun 2020 10:49:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006221049.05MAnpJs039279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 22 Jun 2020 10:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362493 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 362493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 10:49:51 -0000 Author: andrew Date: Mon Jun 22 10:49:50 2020 New Revision: 362493 URL: https://svnweb.freebsd.org/changeset/base/362493 Log: Translaate the PCI address when activating a resource When the PCI address != physical address we need to translate from the former to the latter before passing to the parent to map into the kernels virtual address space. Sponsored by: Innovate UK Modified: head/sys/dev/pci/pci_host_generic.c Modified: head/sys/dev/pci/pci_host_generic.c ============================================================================== --- head/sys/dev/pci/pci_host_generic.c Mon Jun 22 10:32:41 2020 (r362492) +++ head/sys/dev/pci/pci_host_generic.c Mon Jun 22 10:49:50 2020 (r362493) @@ -324,13 +324,11 @@ pci_host_generic_core_release_resource(device_t dev, d return (bus_generic_release_resource(dev, child, type, rid, res)); } -struct resource * -pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +static bool +generic_pcie_translate_resource(device_t dev, int type, rman_res_t start, + rman_res_t end, rman_res_t *new_start, rman_res_t *new_end) { struct generic_pcie_core_softc *sc; - struct resource *res; - struct rman *rm; uint64_t phys_base; uint64_t pci_base; uint64_t size; @@ -338,19 +336,6 @@ pci_host_generic_core_alloc_resource(device_t dev, dev bool found; sc = device_get_softc(dev); - -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) { - return (pci_domain_alloc_bus(sc->ecam, child, rid, start, end, - count, flags)); - } -#endif - - rm = generic_pcie_rman(sc, type, flags); - if (rm == NULL) - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, - type, rid, start, end, count, flags)); - /* Translate the address from a PCI address to a physical address */ switch (type) { case SYS_RES_IOPORT: @@ -378,25 +363,57 @@ pci_host_generic_core_alloc_resource(device_t dev, dev } if (type == space) { - start = start - pci_base + phys_base; - end = end - pci_base + phys_base; + *new_start = start - pci_base + phys_base; + *new_end = end - pci_base + phys_base; found = true; break; } } - if (!found) { - device_printf(dev, - "Failed to allocate %s resource %jx-%jx for %s\n", - type == SYS_RES_IOPORT ? "IOPORT" : "MEMORY", - (uintmax_t)start, (uintmax_t)end, - device_get_nameunit(child)); - return (NULL); - } break; default: + /* No translation for non-memory types */ + *new_start = start; + *new_end = end; + found = true; break; } + return (found); +} + +struct resource * +pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct generic_pcie_core_softc *sc; + struct resource *res; + struct rman *rm; + rman_res_t phys_start, phys_end; + + sc = device_get_softc(dev); + +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + if (type == PCI_RES_BUS) { + return (pci_domain_alloc_bus(sc->ecam, child, rid, start, end, + count, flags)); + } +#endif + + rm = generic_pcie_rman(sc, type, flags); + if (rm == NULL) + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + type, rid, start, end, count, flags)); + + /* Translate the address from a PCI address to a physical address */ + if (!generic_pcie_translate_resource(dev, type, start, end, &phys_start, + &phys_end)) { + device_printf(dev, + "Failed to translate resource %jx-%jx type %x for %s\n", + (uintmax_t)start, (uintmax_t)end, type, + device_get_nameunit(child)); + return (NULL); + } + if (bootverbose) { device_printf(dev, "rman_reserve_resource: start=%#jx, end=%#jx, count=%#jx\n", @@ -430,12 +447,21 @@ generic_pcie_activate_resource(device_t dev, device_t int rid, struct resource *r) { struct generic_pcie_core_softc *sc; + rman_res_t start, end; int res; sc = device_get_softc(dev); if ((res = rman_activate_resource(r)) != 0) return (res); + + start = rman_get_start(r); + end = rman_get_end(r); + if (!generic_pcie_translate_resource(dev, type, start, end, &start, + &end)) + return (EINVAL); + rman_set_start(r, start); + rman_set_end(r, end); return (BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r)); From owner-svn-src-head@freebsd.org Mon Jun 22 11:03:37 2020 Return-Path: Delivered-To: svn-src-head@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 7F89F347AAA; Mon, 22 Jun 2020 11:03:37 +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 49r63F2bsXz4b29; Mon, 22 Jun 2020 11:03:37 +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 5470AD2E5; Mon, 22 Jun 2020 11:03:37 +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 05MB3bV0051547; Mon, 22 Jun 2020 11:03:37 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MB3b2B051546; Mon, 22 Jun 2020 11:03:37 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006221103.05MB3b2B051546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 22 Jun 2020 11:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362495 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 362495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 11:03:37 -0000 Author: pstef Date: Mon Jun 22 11:03:36 2020 New Revision: 362495 URL: https://svnweb.freebsd.org/changeset/base/362495 Log: strtok(3): make it easier to find the RETURN VALUES section MFC after: 1 week Modified: head/lib/libc/string/strtok.3 Modified: head/lib/libc/string/strtok.3 ============================================================================== --- head/lib/libc/string/strtok.3 Mon Jun 22 10:52:30 2020 (r362494) +++ head/lib/libc/string/strtok.3 Mon Jun 22 11:03:36 2020 (r362495) @@ -97,7 +97,7 @@ The function may also be used to nest two parsing loops within one another, as long as separate context pointers are used. -.Pp +.Sh RETURN VALUES The .Fn strtok and From owner-svn-src-head@freebsd.org Mon Jun 22 12:36:06 2020 Return-Path: Delivered-To: svn-src-head@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 C450434A16F; Mon, 22 Jun 2020 12:36:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49r85y4nM5z4jCl; Mon, 22 Jun 2020 12:36:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F6ACE594; Mon, 22 Jun 2020 12:36:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MCa6OD007005; Mon, 22 Jun 2020 12:36:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MCa6Eb007003; Mon, 22 Jun 2020 12:36:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006221236.05MCa6Eb007003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 Jun 2020 12:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362496 - in head: share/man/man4 sys/dev/acpi_support X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/acpi_support X-SVN-Commit-Revision: 362496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 12:36:06 -0000 Author: markj Date: Mon Jun 22 12:36:05 2020 New Revision: 362496 URL: https://svnweb.freebsd.org/changeset/base/362496 Log: acpi_ibm(4): Add support for putting fans in disengaged mode. PR: 247306 Submitted by: Ali Abdallah MFC after: 2 weeks Modified: head/share/man/man4/acpi_ibm.4 head/sys/dev/acpi_support/acpi_ibm.c Modified: head/share/man/man4/acpi_ibm.4 ============================================================================== --- head/share/man/man4/acpi_ibm.4 Mon Jun 22 11:03:36 2020 (r362495) +++ head/share/man/man4/acpi_ibm.4 Mon Jun 22 12:36:05 2020 (r362496) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 19, 2015 +.Dd June 19, 2020 .Dt ACPI_IBM 4 .Os .Sh NAME @@ -292,7 +292,12 @@ fan control might overheat the ThinkPad and lead to pe is not set accordingly. .It Va dev.acpi_ibm.0.fan_level Indicates at what speed the fan should run when being in manual mode. -Values are ranging from 0 (off) to 7 (max). +Valid values range from 0 (off) to 7 (max) and 8. +Level 8 is used by the driver to set the fan in disengaged mode. +In this mode, the fan is set to spin freely and will quickly reach a very +high speed. +Use this mode only if absolutely necessary, e.g., if the system has reached its +critical temperature and it is about to shut down. The resulting speed differs from model to model. On a T41p this is as follows: .Pp @@ -305,6 +310,8 @@ off ~3600 RPM .It Li 6, 7 ~4300 RPM +.It Li 8 +~6400 RPM (Full-speed, disengaged) .El .It Va dev.acpi_ibm.0.fan_speed (read-only) Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Mon Jun 22 11:03:36 2020 (r362495) +++ head/sys/dev/acpi_support/acpi_ibm.c Mon Jun 22 12:36:05 2020 (r362496) @@ -2,6 +2,7 @@ * Copyright (c) 2004 Takanori Watanabe * Copyright (c) 2005 Markus Brueffer * All rights reserved. + * Copyright (c) 2020 Ali Abdallah * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -263,7 +264,8 @@ static struct { { .name = "fan_level", .method = ACPI_IBM_METHOD_FANLEVEL, - .description = "Fan level", + .description = "Fan level, 0-7 (recommended max), " + "8 (disengaged, full-speed)", }, { .name = "fan", @@ -829,7 +831,10 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int met */ if (!sc->fan_handle) { ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - val = val_ec & IBM_EC_MASK_FANLEVEL; + if (val_ec & IBM_EC_MASK_FANDISENGAGED) + val = 8; + else + val = val_ec & IBM_EC_MASK_FANLEVEL; } break; @@ -912,15 +917,23 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int met break; case ACPI_IBM_METHOD_FANLEVEL: - if (arg < 0 || arg > 7) + if (arg < 0 || arg > 8) return (EINVAL); if (!sc->fan_handle) { - /* Read the current fanstatus */ + /* Read the current fan status. */ ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - val = val_ec & (~IBM_EC_MASK_FANLEVEL); + val = val_ec & ~(IBM_EC_MASK_FANLEVEL | + IBM_EC_MASK_FANDISENGAGED); - return ACPI_EC_WRITE(sc->ec_dev, IBM_EC_FANSTATUS, val | arg, 1); + if (arg == 8) + /* Full speed, set the disengaged bit. */ + val |= 7 | IBM_EC_MASK_FANDISENGAGED; + else + val |= arg; + + return (ACPI_EC_WRITE(sc->ec_dev, IBM_EC_FANSTATUS, val, + 1)); } break; From owner-svn-src-head@freebsd.org Mon Jun 22 14:01:32 2020 Return-Path: Delivered-To: svn-src-head@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 5756434D4BB; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49rB0X1b1qz4rh1; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31CE1F525; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ME1Wm2057681; Mon, 22 Jun 2020 14:01:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ME1Vi8057677; Mon, 22 Jun 2020 14:01:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006221401.05ME1Vi8057677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 Jun 2020 14:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362497 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 14:01:32 -0000 Author: markj Date: Mon Jun 22 14:01:31 2020 New Revision: 362497 URL: https://svnweb.freebsd.org/changeset/base/362497 Log: Move the definition of SCTP's system_base_info into sctp_crc32.c. This file is the only SCTP source file compiled into the kernel when SCTP_SUPPORT is configured. sctp_delayed_checksum() references a couple of counters defined in system_base_info, so the change allows these counters to be referenced in a kernel compiled without "options SCTP". Submitted by: tuexen MFC with: r362338 Modified: head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Mon Jun 22 12:36:05 2020 (r362496) +++ head/sys/netinet/sctp_crc32.c Mon Jun 22 14:01:31 2020 (r362497) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef SCTP +#if defined(SCTP) || defined(SCTP_SUPPORT) #include #include #include @@ -117,6 +117,9 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset) } #if defined(SCTP) || defined(SCTP_SUPPORT) + +VNET_DEFINE(struct sctp_base_info, system_base_info); + /* * Compute and insert the SCTP checksum in network byte order for a given * mbuf chain m which contains an SCTP packet starting at offset. @@ -127,10 +130,8 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) uint32_t checksum; checksum = sctp_calculate_cksum(m, offset); -#ifdef SCTP SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); -#endif offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t)(m->m_pkthdr.len)) { Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Jun 22 12:36:05 2020 (r362496) +++ head/sys/netinet/sctp_pcb.c Mon Jun 22 14:01:31 2020 (r362497) @@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -VNET_DEFINE(struct sctp_base_info, system_base_info); - /* FIX: we don't handle multiple link local scopes */ /* "scopeless" replacement IN6_ARE_ADDR_EQUAL */ #ifdef INET6 From owner-svn-src-head@freebsd.org Mon Jun 22 14:36:14 2020 Return-Path: Delivered-To: svn-src-head@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 B2F3134E115; Mon, 22 Jun 2020 14:36:14 +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 49rBmZ48W7z4tc1; Mon, 22 Jun 2020 14:36:14 +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 89D7FF8FC; Mon, 22 Jun 2020 14:36:14 +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 05MEaERP080315; Mon, 22 Jun 2020 14:36:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MEaEM5080314; Mon, 22 Jun 2020 14:36:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006221436.05MEaEM5080314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 22 Jun 2020 14:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362498 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 14:36:14 -0000 Author: tuexen Date: Mon Jun 22 14:36:14 2020 New Revision: 362498 URL: https://svnweb.freebsd.org/changeset/base/362498 Log: No need to include netinet/sctp_crc32.h twice. Modified: head/sys/netinet/sctp_crc32.c Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Mon Jun 22 14:01:31 2020 (r362497) +++ head/sys/netinet/sctp_crc32.c Mon Jun 22 14:36:14 2020 (r362498) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #if defined(SCTP) || defined(SCTP_SUPPORT) #include -#include #include #endif From owner-svn-src-head@freebsd.org Mon Jun 22 17:07:01 2020 Return-Path: Delivered-To: svn-src-head@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 E90D6333EC8; Mon, 22 Jun 2020 17:07:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rG6Y5vGNz41sk; Mon, 22 Jun 2020 17:07:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.5] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 0DDC734D14; Mon, 22 Jun 2020 17:07:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r362488 - in head: contrib/file/magic/Magdir contrib/tcpdump lib/geom/part stand/efi/include stand/i386/boot0 sys/dev/hptmv sys/geom/part usr.bin/fortune/datfiles usr.bin/mkimg usr.sbin... To: Alexey Dokuchaev , Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006220746.05M7kP63028458@repo.freebsd.org> <20200622075814.GB3777@FreeBSD.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Mon, 22 Jun 2020 12:06:58 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200622075814.GB3777@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 17:07:02 -0000 On 22/06/2020 02:58, Alexey Dokuchaev wrote: > On Mon, Jun 22, 2020 at 07:46:25AM +0000, Baptiste Daroussin wrote: >> New Revision: 362488 >> URL: https://svnweb.freebsd.org/changeset/base/362488 >> >> Log: >> Revert r362466 >> >> Such change should not have happen without prior discussion and review. > Thank you Baptiste. > > ./danfe +1 Thank you From owner-svn-src-head@freebsd.org Mon Jun 22 17:25:21 2020 Return-Path: Delivered-To: svn-src-head@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 F087E334DFF; Mon, 22 Jun 2020 17:25:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49rGWj66zsz447L; Mon, 22 Jun 2020 17:25:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD82911C9C; Mon, 22 Jun 2020 17:25:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MHPLGv095180; Mon, 22 Jun 2020 17:25:21 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MHPLic095179; Mon, 22 Jun 2020 17:25:21 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006221725.05MHPLic095179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 22 Jun 2020 17:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362502 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 362502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 17:25:22 -0000 Author: eugen Date: Mon Jun 22 17:25:21 2020 New Revision: 362502 URL: https://svnweb.freebsd.org/changeset/base/362502 Log: network.subr: unobsolete gif_interfaces There are cases when gif_interfaces cannot be replaced with cloned_interfaces, such as tunnels with external IPv6 addresses and internal IPv4 or vice versa. Such configuration requires extra invocation of ifconfig(8) and supported with gif_interfaces only. MFC after: 1 week Modified: head/libexec/rc/network.subr Modified: head/libexec/rc/network.subr ============================================================================== --- head/libexec/rc/network.subr Mon Jun 22 16:05:00 2020 (r362501) +++ head/libexec/rc/network.subr Mon Jun 22 17:25:21 2020 (r362502) @@ -1369,9 +1369,6 @@ clone_up() fi esac done - if [ -n "$gif_interfaces" ]; then - warn "\$gif_interfaces is obsolete. Use \$cloned_interfaces instead." - fi for ifn in ${gif_interfaces}; do # Parse ifn:ifopt. OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS From owner-svn-src-head@freebsd.org Mon Jun 22 17:52:14 2020 Return-Path: Delivered-To: svn-src-head@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 68C8A335938; Mon, 22 Jun 2020 17:52:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49rH6k299nz4621; Mon, 22 Jun 2020 17:52:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 459CF12057; Mon, 22 Jun 2020 17:52:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MHqEv5013244; Mon, 22 Jun 2020 17:52:14 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MHqEND013243; Mon, 22 Jun 2020 17:52:14 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202006221752.05MHqEND013243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 22 Jun 2020 17:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362503 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 362503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 17:52:14 -0000 Author: eugen Date: Mon Jun 22 17:52:13 2020 New Revision: 362503 URL: https://svnweb.freebsd.org/changeset/base/362503 Log: Followup to r362502: rc.conf(5): unobsolete gif_interfaces There are cases when gif_interfaces cannot be replaced with cloned_interfaces, such as tunnels with external IPv6 addresses and internal IPv4 or vice versa. Such configuration requires extra invocation of ifconfig(8) and supported with gif_interfaces only. Fix manual page and provide some examples. MFC after: 1 week X-MFC-With: 362502 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Jun 22 17:25:21 2020 (r362502) +++ head/share/man/man5/rc.conf.5 Mon Jun 22 17:52:13 2020 (r362503) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2020 +.Dd June 23, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -1862,46 +1862,35 @@ Even if this variable is specified to .Dq :nosticky keyword can be used to override it on per interface basis. .It Va gif_interfaces -.Pq Vt str -This variable is deprecated in favor of -.Va cloned_interfaces . Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. -For each -.Xr gif -tunnel interface, set a variable named -.Va ifconfig_ Ns Aq Ar interface -with the parameters for the -.Xr ifconfig 8 -command to configure the link level for -.Ar interface -with the -.Cm tunnel -option. +A +.Va gifconfig_ Ns Aq Ar interface +variable is assumed to exist for each value of +.Ar interface . The value of this variable is used to configure the link layer of the tunnel using the .Cm tunnel option to .Xr ifconfig . +Additionally, this option ensures that each listed interface is created +via the +.Cm create +option to +.Xr ifconfig +before attempting to configure it. +.Pp For example, configure two .Xr gif interfaces with: -.Bd -literal -offset indent +.Bd -literal gif_interfaces="gif0 gif1" -ifconfig_gif0="tunnel src_addr0 dst_addr0" -ifconfig_gif1="tunnel src_addr1 dst_addr1" +gifconfig_gif0="100.64.0.1 100.64.0.2" +ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" +gifconfig_gif1="inet6 2a00::1 2a01::1" +ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252" .Ed -.Pp -Additionally, this option ensures that each listed interface is created -via the -.Cm create -option to -.Xr ifconfig . -This example also works with -.Va cloned_interfaces -instead of -.Va gif_interfaces . .It Va sppp_interfaces .Pq Vt str Set to the list of From owner-svn-src-head@freebsd.org Mon Jun 22 18:31:11 2020 Return-Path: Delivered-To: svn-src-head@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 A58903373A2; Mon, 22 Jun 2020 18:31:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rHzg3xsxz48m0; Mon, 22 Jun 2020 18:31:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from localhost (unknown [IPv6:2400:4051:a743:3c00:16:ceff:fe34:2700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: hrs) by smtp.freebsd.org (Postfix) with ESMTPSA id 8A20334FE6; Mon, 22 Jun 2020 18:31:10 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Date: Tue, 23 Jun 2020 03:29:31 +0900 (JST) Message-Id: <20200623.032931.1120831066907446116.hrs@FreeBSD.org> To: eugen@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362503 - head/share/man/man5 From: Hiroki Sato In-Reply-To: <202006221752.05MHqEND013243@repo.freebsd.org> References: <202006221752.05MHqEND013243@repo.freebsd.org> X-Old-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-PGPkey-fingerprint: 6C0D 2353 27CF 80C7 901E FDD2 DBB0 7DC6 6F1F 737F X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="--Security_Multipart(Tue_Jun_23_03_29_31_2020_442)--" Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 18:31:11 -0000 ----Security_Multipart(Tue_Jun_23_03_29_31_2020_442)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eugene Grosbein wrote in <202006221752.05MHqEND013243@repo.freebsd.org>: eu> Author: eugen eu> Date: Mon Jun 22 17:52:13 2020 eu> New Revision: 362503 eu> URL: https://svnweb.freebsd.org/changeset/base/362503 eu> eu> Log: eu> Followup to r362502: rc.conf(5): unobsolete gif_interfaces eu> eu> There are cases when gif_interfaces cannot be replaced eu> with cloned_interfaces, such as tunnels with external IPv6 addresses eu> and internal IPv4 or vice versa. Such configuration requires eu> extra invocation of ifconfig(8) and supported with gif_interfaces only. eu> eu> Fix manual page and provide some examples. eu> eu> MFC after: 1 week eu> X-MFC-With: 362502 (snip) eu> +Additionally, this option ensures that each listed interface is created eu> +via the eu> +.Cm create eu> +option to eu> +.Xr ifconfig eu> +before attempting to configure it. eu> +.Pp eu> For example, configure two eu> .Xr gif eu> interfaces with: eu> -.Bd -literal -offset indent eu> +.Bd -literal eu> gif_interfaces="gif0 gif1" eu> -ifconfig_gif0="tunnel src_addr0 dst_addr0" eu> -ifconfig_gif1="tunnel src_addr1 dst_addr1" eu> +gifconfig_gif0="100.64.0.1 100.64.0.2" eu> +ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" eu> +gifconfig_gif1="inet6 2a00::1 2a01::1" eu> +ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252" These cases should be able to express by the following: ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" ifconfig_gif0_alias0="inet tunnel 100.64.0.1 100.64.0.2" and ifconfig_gif1="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" ifconfig_gif1_ipv6="inet6 auto_linklocal" ifconfig_gif1_alias0="inet6 tunnel 2a00::1 2a01::1" Could you show more examples which cannot be covered by cloned_interfaces + ifconfig_*? I lost track of the discussions in the past (sorry) but want to revisit this to understand what was the limitation because it should also affect gre(8) and other tunnel pseudo-interfaces. -- Hiroki ----Security_Multipart(Tue_Jun_23_03_29_31_2020_442)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iMkEABMKAC4WIQRsDSNTJ8+Ax5Ae/dLbsH3Gbx9zfwUCXvD4ixAcaHJzQGZyZWVi c2Qub3JnAAoJENuwfcZvH3N/34wCCPQlRaFUvA7SPSPnVqom0duXc6QlmAlvCSgY r0tek1uOaXZ9aQD6HjvnnolbkYHYC0BDIqmVy3kvNLspuV2BLxOMAgkBqo/MtTDm pnSXCmouduJvif7ktmD83NvmIzQNfkgN1IyFpbcjWADu7uqYBjv37k7I7Hc0vIp4 aWn0N+1AAeA3HYw= =lCt/ -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Jun_23_03_29_31_2020_442)---- From owner-svn-src-head@freebsd.org Mon Jun 22 18:35:40 2020 Return-Path: Delivered-To: svn-src-head@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 37B10337758; Mon, 22 Jun 2020 18:35:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJ4r0p8sz49tG; Mon, 22 Jun 2020 18:35:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:3868:fe7c:fccd:367f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 7F17A35631; Mon, 22 Jun 2020 18:35:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006181932.05IJWZYH009560@repo.freebsd.org> <20200622011035.GG85944@raichu> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 22 Jun 2020 11:35:38 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200622011035.GG85944@raichu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 18:35:40 -0000 On 6/21/20 6:10 PM, Mark Johnston wrote: > On Fri, Jun 19, 2020 at 08:33:35AM -0700, John Baldwin wrote: >> On 6/18/20 12:32 PM, Mark Johnston wrote: >>> Author: markj >>> Date: Thu Jun 18 19:32:34 2020 >>> New Revision: 362338 >>> URL: https://svnweb.freebsd.org/changeset/base/362338 >>> >>> Log: >>> Add the SCTP_SUPPORT kernel option. >>> >>> This is in preparation for enabling a loadable SCTP stack. Analogous to >>> IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured >>> in order to support a loadable SCTP implementation. >>> >>> Discussed with: tuexen >>> MFC after: 2 weeks >>> Sponsored by: The FreeBSD Foundation >> >> Do you want to add similar handling to sys/conf/config.mk that we have >> for IPsec? Also, do we want to avoid building sctp.ko if it is in the >> kernel like we do for ipsec.ko and/or only build it if the kernel contains >> SCTP_SUPPORT? (For ipsec.ko we had to do that as it wouldn't compile, not >> sure if the same is true for sctp.ko) > > Sorry for the delay. > I think we do indeed want similar handling in config.mk, I will work on > it. It is probably also reasonable to avoid compiling sctp.ko when > SCTP_SUPPORT is not defined, though I can't see a reason that wouldn't > work today since SCTP_SUPPORT is not used in any headers. Ok. ipsec.ko mattered more when the build broke. Whether or not we compile "duplicate" modules for kernels is perhaps a larger question. I think I might favor that change, but it is a larger change that merits some thought. In particular, you want good code coverage for things like LINT builds, so maybe we really should still compile modules whenever possible. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jun 22 18:44:49 2020 Return-Path: Delivered-To: svn-src-head@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 CBF66337A6E; Mon, 22 Jun 2020 18:44:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJHP2fnNz4BcS; Mon, 22 Jun 2020 18:44:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05MIiffx003015 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 22 Jun 2020 21:44:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05MIiffx003015 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05MIifYX003014; Mon, 22 Jun 2020 21:44:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 Jun 2020 21:44:41 +0300 From: Konstantin Belousov To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362294 - head/sys/dev/sound/pci/hda Message-ID: <20200622184441.GA1783@kib.kiev.ua> References: <202006180612.05I6C6EE013037@repo.freebsd.org> <20200621215945.GA2057@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49rJHP2fnNz4BcS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 18:44:49 -0000 On Mon, Jun 22, 2020 at 09:37:15AM +0300, Andriy Gapon wrote: > On 22/06/2020 00:59, Konstantin Belousov wrote: > > This commit (or rather, a merge of this commit to stable/12) causes an issue > > on my Apollo Lake machine. Look: > > hdac0@pci0:0:14:0: class=0x040300 card=0xa1821458 chip=0x5a988086 rev=0x0b hdr=0x00 > > vendor = 'Intel Corporation' > > device = 'Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster' > > class = multimedia > > subclass = HDA > > bar [10] = type Memory, range 64, base 0x91410000, size 16384, enabled > > bar [20] = type Memory, range 64, base 0x91000000, size 1048576, enabled > > cap 01[50] = powerspec 3 supports D0 D3 current D0 > > cap 09[80] = vendor (length 20) Intel cap 15 version 0 > > cap 05[60] = MSI supports 1 message, 64 bit > > > > DMAP base is 0xfffff80000000000. > > tom% sudo /usr/local/bin/kgdb ~/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full /dev/mem > > GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD] > > Reading symbols from /usr/home/kostik/work/DEV/svn/RELENG_12/sys/amd64/compile/TOM/kernel.full... > > ... > > sched_switch (td=0xfffff8029d516000, newtd=0xfffff800025f4000, > > flags=) at ../../../kern/sched_ule.c:2143 > > 2143 cpuid = PCPU_GET(cpuid); > > (kgdb) p/x *(unsigned int *)(0xfffff80000000000+0x91410000+0x24) INTSTS > > $1 = 0xc0000000 > > This causes the first interrupt handler to loop forever. > > > > And this is why: > > (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x5d) RIRBSTS > > $3 = 0x0 > > (kgdb) p/x *(unsigned char *)(0xfffff80000000000+0x91410000+0x4d) CORBSTS > > $4 = 0x0 > > (kgdb) p/x *(unsigned short *)(0xfffff80000000000+0x91410000+0xe) WAKESTS > > $5 = 0x5 > > So the SDIN State Change status bit is set, and nothing in the driver > > clears it, it seems. > > > > More, the EDS specifies that another reason for INTSTS CIS bit set may > > be the CORB Memory Error Indication (CMEI), and again it seems that driver > > never clears the reason. > > > > So as is the change perhaps helps for some situations, but also > > practically makes some systems to loose core in tight loop with interrupt > > priority, which causes weird machine misbehavior like unkillable processes > > and never finishing epochs. > > > Kostik, > > thank you for the report and the debugging! > > It seems that the driver currently does do not much with the register 0xe > (referred to by you as WAKESTS, by the code and the HDA specification as STATESTS). > I think that we can just clear that register (documented as RW1C) > More, I am surprised that the driver does not clear the register in > hdac_attach2() when probing codecs. > > So, maybe something like a quick patch below. > > Also, I see that the driver never explicitly manages WAKEEN register. > I think that it should. > If we do not need or do not expect any wake events then we should clear the > corresponding bits. > So, maybe it would be better to just zero WAKEEN in attach and resume methods. > Although, WAKEEN is documented as zero after reset, the specification has this note: > These bits are only cleared by a power-on reset. Software must make no > assumptions about how these bits are set and set them appropriately. > > > Regarding CMEI, we never enable it by setting CMEIE and it should be zero after > reset. So, we should never get that interrupt. > The same applies to another potential interrupt source, RIRBOIS / RIRBOIC. > > Index: sys/dev/sound/pci/hda/hdac.c > =================================================================== > --- sys/dev/sound/pci/hda/hdac.c (revision 362383) > +++ sys/dev/sound/pci/hda/hdac.c (working copy) > @@ -312,6 +312,10 @@ hdac_one_intr(struct hdac_softc *sc, uint32_t ints > > /* Was this a controller interrupt? */ > if (intsts & HDAC_INTSTS_CIS) { > + /* XXX just clear SDIWAKE bits. */ > + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, > + HDAC_STATESTS_SDIWAKE_MASK); > + > rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS); > /* Get as many responses that we can */ > while (rirbsts & HDAC_RIRBSTS_RINTFL) { > @@ -1530,6 +1534,7 @@ hdac_attach2(void *arg) > device_printf(sc->dev, "Scanning HDA codecs ...\n"); > ); > statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS); > + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, statests); > hdac_unlock(sc); > for (i = 0; i < HDAC_CODEC_MAX; i++) { > if (HDAC_STATESTS_SDIWAKE(statests, i)) { > The patch worked, thanks. From owner-svn-src-head@freebsd.org Mon Jun 22 19:03:03 2020 Return-Path: Delivered-To: svn-src-head@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 4E5CF338582; Mon, 22 Jun 2020 19:03:03 +0000 (UTC) (envelope-from allanjude@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 49rJhR0zw9z4D7T; Mon, 22 Jun 2020 19:03:03 +0000 (UTC) (envelope-from allanjude@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 1D3BC1330C; Mon, 22 Jun 2020 19:03:03 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MJ32OF057802; Mon, 22 Jun 2020 19:03:02 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MJ32VW057800; Mon, 22 Jun 2020 19:03:02 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202006221903.05MJ32VW057800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Mon, 22 Jun 2020 19:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362505 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 362505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 19:03:03 -0000 Author: allanjude Date: Mon Jun 22 19:03:02 2020 New Revision: 362505 URL: https://svnweb.freebsd.org/changeset/base/362505 Log: MFOpenZFS: Add zio_ddt_free()+ddt_phys_decref() error handling The assumption in zio_ddt_free() is that ddt_phys_select() must always find a match. However, if that fails due to a damaged DDT or some other reason the code will NULL dereference in ddt_phys_decref(). While this should never happen it has been observed on various platforms. The result is that unless your willing to patch the ZFS code the pool is inaccessible. Therefore, we're choosing to more gracefully handle this case rather than leave it fatal. http://mail.opensolaris.org/pipermail/zfs-discuss/2012-February/050972.html https://github.com/openzfs/zfs/commit/5dc6af0eec29b119b731c793037fd77214fc9438 Reported by: Pierre Beyssac Obtained from: OpenZFS MFC after: 2 weeks Sponsored by: Klara Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Mon Jun 22 17:57:49 2020 (r362504) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Mon Jun 22 19:03:02 2020 (r362505) @@ -325,8 +325,10 @@ ddt_phys_addref(ddt_phys_t *ddp) void ddt_phys_decref(ddt_phys_t *ddp) { - ASSERT((int64_t)ddp->ddp_refcnt > 0); - ddp->ddp_refcnt--; + if (ddp) { + ASSERT((int64_t)ddp->ddp_refcnt > 0); + ddp->ddp_refcnt--; + } } void Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Jun 22 17:57:49 2020 (r362504) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Jun 22 19:03:02 2020 (r362505) @@ -2937,8 +2937,11 @@ zio_ddt_free(zio_t *zio) ddt_enter(ddt); freedde = dde = ddt_lookup(ddt, bp, B_TRUE); - ddp = ddt_phys_select(dde, bp); - ddt_phys_decref(ddp); + if (dde) { + ddp = ddt_phys_select(dde, bp); + if (ddp) + ddt_phys_decref(ddp); + } ddt_exit(ddt); return (zio); From owner-svn-src-head@freebsd.org Mon Jun 22 19:03:40 2020 Return-Path: Delivered-To: svn-src-head@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 67B2733870D; Mon, 22 Jun 2020 19:03:40 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJj80cSgz4Cvw; Mon, 22 Jun 2020 19:03:39 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 05MJ3cfM011717; Mon, 22 Jun 2020 12:03:38 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 05MJ3cRJ011716; Mon, 22 Jun 2020 12:03:38 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202006221903.05MJ3cRJ011716@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf In-Reply-To: To: John Baldwin Date: Mon, 22 Jun 2020 12:03:38 -0700 (PDT) CC: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49rJj80cSgz4Cvw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 19:03:40 -0000 > On 6/21/20 6:10 PM, Mark Johnston wrote: > > On Fri, Jun 19, 2020 at 08:33:35AM -0700, John Baldwin wrote: > >> On 6/18/20 12:32 PM, Mark Johnston wrote: > >>> Author: markj > >>> Date: Thu Jun 18 19:32:34 2020 > >>> New Revision: 362338 > >>> URL: https://svnweb.freebsd.org/changeset/base/362338 > >>> > >>> Log: > >>> Add the SCTP_SUPPORT kernel option. > >>> > >>> This is in preparation for enabling a loadable SCTP stack. Analogous to > >>> IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured > >>> in order to support a loadable SCTP implementation. > >>> > >>> Discussed with: tuexen > >>> MFC after: 2 weeks > >>> Sponsored by: The FreeBSD Foundation > >> > >> Do you want to add similar handling to sys/conf/config.mk that we have > >> for IPsec? Also, do we want to avoid building sctp.ko if it is in the > >> kernel like we do for ipsec.ko and/or only build it if the kernel contains > >> SCTP_SUPPORT? (For ipsec.ko we had to do that as it wouldn't compile, not > >> sure if the same is true for sctp.ko) > > > > Sorry for the delay. > > I think we do indeed want similar handling in config.mk, I will work on > > it. It is probably also reasonable to avoid compiling sctp.ko when > > SCTP_SUPPORT is not defined, though I can't see a reason that wouldn't > > work today since SCTP_SUPPORT is not used in any headers. > > Ok. ipsec.ko mattered more when the build broke. Whether or not we compile > "duplicate" modules for kernels is perhaps a larger question. I think I > might favor that change, but it is a larger change that merits some thought. > In particular, you want good code coverage for things like LINT builds, so > maybe we really should still compile modules whenever possible. As a person that builds a lot of stuff into his kernel, aka I run moduleless most of the time, I still would like the modules to build so I know I have not busted that with other changes. It is just too easy to do, IMHO. > -- > John Baldwin -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Jun 22 20:42:58 2020 Return-Path: Delivered-To: svn-src-head@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 A7B7433B6ED; Mon, 22 Jun 2020 20:42:58 +0000 (UTC) (envelope-from jkim@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 49rLvk43VWz4PHw; Mon, 22 Jun 2020 20:42:58 +0000 (UTC) (envelope-from jkim@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 83A4614340; Mon, 22 Jun 2020 20:42:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MKgw83023710; Mon, 22 Jun 2020 20:42:58 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MKgw2K023709; Mon, 22 Jun 2020 20:42:58 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006222042.05MKgw2K023709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 22 Jun 2020 20:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362509 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 362509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 20:42:58 -0000 Author: jkim Date: Mon Jun 22 20:42:58 2020 New Revision: 362509 URL: https://svnweb.freebsd.org/changeset/base/362509 Log: Assume all TSCs are synchronized for AMD Family 17h processors and later when it has passed the synchronization test. "Processor Programming Reference (PPR) for AMD Family 17h" states that the TSC uses a common reference for all sockets, cores and threads. MFC after: 1 month Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Mon Jun 22 19:15:50 2020 (r362508) +++ head/sys/x86/x86/tsc.c Mon Jun 22 20:42:58 2020 (r362509) @@ -526,6 +526,13 @@ retry: case CPU_VENDOR_AMD: case CPU_VENDOR_HYGON: /* + * Processor Programming Reference (PPR) for AMD + * Family 17h states that the TSC uses a common + * reference for all sockets, cores and threads. + */ + if (CPUID_TO_FAMILY(cpu_id) >= 0x17) + return (1000); + /* * Starting with Family 15h processors, TSC clock * source is in the north bridge. Check whether * we have a single-socket/multi-core platform. From owner-svn-src-head@freebsd.org Mon Jun 22 21:53:16 2020 Return-Path: Delivered-To: svn-src-head@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 2D43D33D1FE; Mon, 22 Jun 2020 21:53:16 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rNSr08Qtz4SvZ; Mon, 22 Jun 2020 21:53:16 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id E0DED19339; Mon, 22 Jun 2020 21:53:15 +0000 (UTC) Date: Mon, 22 Jun 2020 23:53:15 +0200 From: "Piotr P. Stefaniak" To: "Christian S.J. Peron" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358181 - head/usr.sbin/pstat Message-ID: <20200622215315.GC28243@freefall.freebsd.org> References: <202002202112.01KLCAKx000852@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202002202112.01KLCAKx000852@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 21:53:16 -0000 On 2020-02-20 21:12:10, Christian S.J. Peron wrote: >Author: csjp >Date: Thu Feb 20 21:12:10 2020 >New Revision: 358181 >URL: https://svnweb.freebsd.org/changeset/base/358181 > >Log: > - Implement -h (human readable) for the size of the underlying block disk. > Currently, the size of the swap device is unconditionally reported using > blocks, even if -h has been used. > - While here, switch to CONVERT_BLOCKS() instead of CONVERT() which will > avoid overflowing size counters (in human readable form see: r196244) > - Update the column headers to reflect that a size is being reported instead > of the block size units being used > > Before: > > $ swapinfo > Device 1K-blocks Used Avail Capacity > /dev/gpt/swapfs 1048576 0 1048576 0% In the above, the "1K-blocks" and "1048576" line up because both the header and the value have field width of hlen which is always set by getbsize(&hlen, &blocksize). In other words, the header name sets the width for the column. It is especially apparent when you compare output with BLOCKSIZE=1000000000 and BLOCKSIZE=1K. > After: > > $ swapinfo -h > Device Size Used Avail Capacity > /dev/gpt/swapfs 1.0G 0B 1.0G 0% Here the width for the header is sizeof "Size" and the width for values of the size is 8, so the header and the values don't make up a column. Since field width for all values of Size, Used, and Avail are hardcoded to 8 as well as the column headers, I think the best suggestion I can give is to change it like this: @@ -475,7 +475,7 @@ print_swap_header(void) if (humanflag) { header = SIZEHDR; - hlen = sizeof(SIZEHDR); + hlen = 8; /* as the hardcoded field width of values */ } else { header = getbsize(&hlen, &blocksize); } Although 8 seems to me a bit high. And too bad that humanize_number() is locale-agnostic. > Differential Revision: https://reviews.freebsd.org/D23758 > Reviewed by: kevans > MFC after: 3 weeks > >Modified: > head/usr.sbin/pstat/pstat.c From owner-svn-src-head@freebsd.org Mon Jun 22 22:07:57 2020 Return-Path: Delivered-To: svn-src-head@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 2ACC633DF7F; Mon, 22 Jun 2020 22:07:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rNnn0KwKz4VFX; Mon, 22 Jun 2020 22:07:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf42.google.com with SMTP id e2so8746303qvw.7; Mon, 22 Jun 2020 15:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3zgR0foZxLwVYUleASJIE3YTbNtAIpnYav3NrnIervE=; b=Q2ybW/TXZz3E8AQGgjJj4LcZV6cTRiOHEAKDxTqWos1ngdnM+jnhqQFOgshFJMfdxU QtrutJ+LL4SNbFMcBrlW/H8Taya8fAKyU53tCTIOvEaVBuQKyPJuebIrgs8gCMDx6xEF BDrlA+DaFY8Tz7JFURDOAsty0z7GN4m9UhpIO4047qBZymNhYvZ/tCzDCxHzkfQgMZNH 9Y49fH4tgBeq2yWKT9cGiE8Nib1Gjo/ceknsSxI7IIbh1XFeM1G2m/PfKhnZG6yROSN+ fPNouiFdcUCkWzNc+Z2STX+BZiGtDBo/5Sc5KYgMkq4rnJdXIrGAovs8bqbdmLJm/cRm /Yeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=3zgR0foZxLwVYUleASJIE3YTbNtAIpnYav3NrnIervE=; b=AB4cJzkUYmBumrrDCMBUn4KIVcVXcw7uUXRyXmPW8294cr2EtT9MLqh8XxvVslXUgd sl2+/MKP9RFpSRNXC2VzvJEZRUWmygFmrLrk2uyT6lG7ax9KXI2VbY3GcJtpdxxjLDIy kz1GCKbwuOtlYyU3tYuB1y+uMXrHlDe29NjM/Z4GJgL2H++HkzorTij6qlfdluJt6u05 nH5YNEzQf1a2FDX5acz1AWq2hQZbKQZaDAijPDo257kvqvAnRQEVCyO/5OaLKYxHy11B EUCfnpNwGcRXH/X86GW9cdYLPL2xgkQnDVilSD5nd1bbK8Ul+F/pjPsK0AEu25UBlru+ i14A== X-Gm-Message-State: AOAM531R1pOpXunEMy+JTblREnd4tVRrMENy0v7h8fhSfvA0NZyA3S9T MQ2wDaQNg9gnapZlYy4i8n65r1RVo4k= X-Google-Smtp-Source: ABdhPJxQKchJiItyDjUIoskjcOymybK+edgu/SU/OefcUHQDvp59UXUNP9irFIBvkdSpJlrdNiXsEQ== X-Received: by 2002:a05:6214:1543:: with SMTP id t3mr9713168qvw.89.1592863676111; Mon, 22 Jun 2020 15:07:56 -0700 (PDT) Received: from raichu (bras-base-toroon0560w-grc-20-184-147-206-12.dsl.bell.ca. [184.147.206.12]) by smtp.gmail.com with ESMTPSA id q47sm751771qta.16.2020.06.22.15.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 15:07:54 -0700 (PDT) Sender: Mark Johnston Date: Mon, 22 Jun 2020 18:07:52 -0400 From: Mark Johnston To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf Message-ID: <20200622220752.GB51374@raichu> References: <202006181932.05IJWZYH009560@repo.freebsd.org> <20200622011035.GG85944@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 49rNnn0KwKz4VFX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:07:57 -0000 On Mon, Jun 22, 2020 at 11:35:38AM -0700, John Baldwin wrote: > On 6/21/20 6:10 PM, Mark Johnston wrote: > > On Fri, Jun 19, 2020 at 08:33:35AM -0700, John Baldwin wrote: > >> On 6/18/20 12:32 PM, Mark Johnston wrote: > >>> Author: markj > >>> Date: Thu Jun 18 19:32:34 2020 > >>> New Revision: 362338 > >>> URL: https://svnweb.freebsd.org/changeset/base/362338 > >>> > >>> Log: > >>> Add the SCTP_SUPPORT kernel option. > >>> > >>> This is in preparation for enabling a loadable SCTP stack. Analogous to > >>> IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured > >>> in order to support a loadable SCTP implementation. > >>> > >>> Discussed with: tuexen > >>> MFC after: 2 weeks > >>> Sponsored by: The FreeBSD Foundation > >> > >> Do you want to add similar handling to sys/conf/config.mk that we have > >> for IPsec? Also, do we want to avoid building sctp.ko if it is in the > >> kernel like we do for ipsec.ko and/or only build it if the kernel contains > >> SCTP_SUPPORT? (For ipsec.ko we had to do that as it wouldn't compile, not > >> sure if the same is true for sctp.ko) > > > > Sorry for the delay. > > I think we do indeed want similar handling in config.mk, I will work on > > it. It is probably also reasonable to avoid compiling sctp.ko when > > SCTP_SUPPORT is not defined, though I can't see a reason that wouldn't > > work today since SCTP_SUPPORT is not used in any headers. > > Ok. ipsec.ko mattered more when the build broke. Whether or not we compile > "duplicate" modules for kernels is perhaps a larger question. I think I > might favor that change, but it is a larger change that merits some thought. > In particular, you want good code coverage for things like LINT builds, so > maybe we really should still compile modules whenever possible. I tend to assume that a buildkernel of GENERIC without any special flags will always build all modules (except those not available for the target platform of course), so I was a bit surprised to see that this isn't the case for ipsec.ko. As Rodney pointed out it provides marginally better coverage against build breaks. If you think we can restore the old behaviour for ipsec without too much work I think it'd be reasonable to change that and compile sctp.ko even when "options SCTP" is configured. I can't spot any similar cases in sys/modules/Makefile with a bit of skimming. From owner-svn-src-head@freebsd.org Mon Jun 22 22:11:52 2020 Return-Path: Delivered-To: svn-src-head@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 CF17133E298; Mon, 22 Jun 2020 22:11:52 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rNtJ2spyz4Vb0; Mon, 22 Jun 2020 22:11:51 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 05MMBiAh032106 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 22 Jun 2020 15:11:44 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 05MMBiw1032105; Mon, 22 Jun 2020 15:11:44 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 22 Jun 2020 15:11:44 -0700 From: Gleb Smirnoff To: Yuri Pankov , Zhihao Yuan Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362148 - head/contrib/nvi/common Message-ID: <20200622221144.GA31842@FreeBSD.org> References: <202006131411.05DEB2mP097868@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006131411.05DEB2mP097868@repo.freebsd.org> X-Rspamd-Queue-Id: 49rNtJ2spyz4Vb0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:11:52 -0000 Yuri, Zhihao, this commit totally broke Russian input for me in nvi. After exiting edit mode, nvi immediately converts all text to ???????. I don't have any special settings in my environment. All I have is "russian" class for my user which yields in these environment variables: declare -x LANG="ru_RU.UTF-8" declare -x MM_CHARSET="UTF-8" declare -x XTERM_LOCALE="ru_RU.UTF-8" I'm already digging into that problem, but may be you have a clue immediately. On Sat, Jun 13, 2020 at 02:11:02PM +0000, Yuri Pankov wrote: Y> Author: yuripv Y> Date: Sat Jun 13 14:11:02 2020 Y> New Revision: 362148 Y> URL: https://svnweb.freebsd.org/changeset/base/362148 Y> Y> Log: Y> nvi: fallback to ISO8859-1 as last resort Y> Y> Current logic of using user's locale encoding that is UTF-8 doesn't make Y> much sense if we already failed the looks_utf8() check and skipped Y> encoding set using "fileencoding" as being UTF-8 as well; fallback to Y> ISO8859-1 in that case. Y> Y> Reviewed by: Zhihao Yuan Y> Differential Revision: https://reviews.freebsd.org/D24919 Y> Y> Modified: Y> head/contrib/nvi/common/exf.c Y> Y> Modified: head/contrib/nvi/common/exf.c Y> ============================================================================== Y> --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020 (r362147) Y> +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020 (r362148) Y> @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp) Y> } Y> Y> /* Y> - * Detect UTF-8 and fallback to the locale/preset encoding. Y> + * 1. Check for valid UTF-8. Y> + * 2. Check if fallback fileencoding is set and is NOT UTF-8. Y> + * 3. Check if user locale's encoding is NOT UTF-8. Y> + * 4. Use ISO8859-1 as last resort. Y> * Y> * XXX Y> * A manually set O_FILEENCODING indicates the "fallback Y> @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp) Y> */ Y> if (looks_utf8(buf, blen) > 1) Y> o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); Y> - else if (!O_ISSET(sp, O_FILEENCODING) || Y> - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) Y> + else if (O_ISSET(sp, O_FILEENCODING) && Y> + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) Y> + /* Use fileencoding as is */ ; Y> + else if (strcasecmp(codeset(), "utf-8") != 0) Y> o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); Y> + else Y> + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); Y> Y> conv_enc(sp, O_FILEENCODING, 0); Y> #endif Y> _______________________________________________ Y> svn-src-all@freebsd.org mailing list Y> https://lists.freebsd.org/mailman/listinfo/svn-src-all Y> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Mon Jun 22 22:20:07 2020 Return-Path: Delivered-To: svn-src-head@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 19B4E33E69E; Mon, 22 Jun 2020 22:20:07 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49rP3p5SlRz4Vwl; Mon, 22 Jun 2020 22:20:06 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B8E5B5C0BFF; Mon, 22 Jun 2020 18:20:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Jun 2020 18:20:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=P 27tDNr+k+qQMq1deG8Lbs21fMUPrWQdkKpUGxnfrYQ=; b=fUGurQCjd1J0fIJh8 p7V9B15oNoWAH1vN9w68iavcFjBW8mi2sebtkpumMR084SGEXfTS5Rh9fQE2ckeN HqnJdINnhg0dCHFINDIp3Qwk2xuJdXQ8br5GmRuv6A2cqPXoXAW8tHWkPtXYjy7b fcX0dBSe7mVMjstcYFn0OXLBklpMVf/jUZ3pYRF495s8OUxJqobeIDfqtUCwQqK4 cazwyDCBEjeTqkiCXdn+FpGpBq1fAPBL7M4W3AOGtEp6vxjvnV86/94A2FsJxrRq JYZoXSRCiDtaWEwDh7i5knAtUB1Rsxje3h09Q31nVdHQm+vyyRls4kN6JpQtnmGl YwGsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=P27tDNr+k+qQMq1deG8Lbs21fMUPrWQdkKpUGxnfr YQ=; b=ujl4MJ/e/QfNX+n6CKSX9mo1Dd+QimASHrhBRoqL1ebH0yunuHGkMHBte MxXAyYPuG1RGAwUierjp1WBszhWzApoBPAenSKxA37kz2TlBMT4bx8LNrZKSbtOL /XD6mHAt1m+q+BH8yNepLjbjdYQ2GTYatG2n4tyd4JVG2xmICYcS/Ind7xPlAYKp diVgBDXCaRt3870Qm9ozfYO/yrckwDOC3/7lPNV+SwG5C9dVDC5LWT1c62UTis0o krFn9QdXVAdW4zd0h3dtbQjIFJ1gHtnwlC9G4Z3DuJ+DXte4gz1FjZWBfcMSVGDE vbsD9oQL4044H313pfqNtYyVKRrTw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekfedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihurhhiphhvseihuhhr ihhpvhdruggvvheqnecuggftrfgrthhtvghrnhepieekteeftdeftdekhfffueeljeefff fgffffuefhhefgheejvdegfeehieevudfgnecuffhomhgrihhnpehfrhgvvggsshgurdho rhhgnecukfhppeeluddrvdegtddruddvgedrudefjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 66156306741D; Mon, 22 Jun 2020 18:20:04 -0400 (EDT) Subject: Re: svn commit: r362148 - head/contrib/nvi/common To: Gleb Smirnoff , Yuri Pankov , Zhihao Yuan Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006131411.05DEB2mP097868@repo.freebsd.org> <20200622221144.GA31842@FreeBSD.org> From: Yuri Pankov Message-ID: <3fe4705c-e036-6999-b6b0-6e05f7cf8321@yuripv.dev> Date: Tue, 23 Jun 2020 01:20:01 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200622221144.GA31842@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49rP3p5SlRz4Vwl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:20:07 -0000 Gleb Smirnoff wrote: > Yuri, Zhihao, > > this commit totally broke Russian input for me in nvi. After > exiting edit mode, nvi immediately converts all text to ???????. > > I don't have any special settings in my environment. All I have > is "russian" class for my user which yields in these environment > variables: > > declare -x LANG="ru_RU.UTF-8" > declare -x MM_CHARSET="UTF-8" > declare -x XTERM_LOCALE="ru_RU.UTF-8" > > I'm already digging into that problem, but may be you have > a clue immediately. My bad, yes, I see the problem, looking into it. > On Sat, Jun 13, 2020 at 02:11:02PM +0000, Yuri Pankov wrote: > Y> Author: yuripv > Y> Date: Sat Jun 13 14:11:02 2020 > Y> New Revision: 362148 > Y> URL: https://svnweb.freebsd.org/changeset/base/362148 > Y> > Y> Log: > Y> nvi: fallback to ISO8859-1 as last resort > Y> > Y> Current logic of using user's locale encoding that is UTF-8 doesn't make > Y> much sense if we already failed the looks_utf8() check and skipped > Y> encoding set using "fileencoding" as being UTF-8 as well; fallback to > Y> ISO8859-1 in that case. > Y> > Y> Reviewed by: Zhihao Yuan > Y> Differential Revision: https://reviews.freebsd.org/D24919 > Y> > Y> Modified: > Y> head/contrib/nvi/common/exf.c > Y> > Y> Modified: head/contrib/nvi/common/exf.c > Y> ============================================================================== > Y> --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020 (r362147) > Y> +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020 (r362148) > Y> @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp) > Y> } > Y> > Y> /* > Y> - * Detect UTF-8 and fallback to the locale/preset encoding. > Y> + * 1. Check for valid UTF-8. > Y> + * 2. Check if fallback fileencoding is set and is NOT UTF-8. > Y> + * 3. Check if user locale's encoding is NOT UTF-8. > Y> + * 4. Use ISO8859-1 as last resort. > Y> * > Y> * XXX > Y> * A manually set O_FILEENCODING indicates the "fallback > Y> @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp) > Y> */ > Y> if (looks_utf8(buf, blen) > 1) > Y> o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); > Y> - else if (!O_ISSET(sp, O_FILEENCODING) || > Y> - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) > Y> + else if (O_ISSET(sp, O_FILEENCODING) && > Y> + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) > Y> + /* Use fileencoding as is */ ; > Y> + else if (strcasecmp(codeset(), "utf-8") != 0) > Y> o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); > Y> + else > Y> + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); > Y> > Y> conv_enc(sp, O_FILEENCODING, 0); > Y> #endif From owner-svn-src-head@freebsd.org Mon Jun 22 22:20:31 2020 Return-Path: Delivered-To: svn-src-head@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 602D533E734; Mon, 22 Jun 2020 22:20:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rP4H1mnRz4W3H; Mon, 22 Jun 2020 22:20:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:3868:fe7c:fccd:367f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C0BCB373CC; Mon, 22 Jun 2020 22:20:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006181932.05IJWZYH009560@repo.freebsd.org> <20200622011035.GG85944@raichu> <20200622220752.GB51374@raichu> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <5fcb4de8-f4a6-54b4-067c-058bf2b43871@FreeBSD.org> Date: Mon, 22 Jun 2020 15:20:29 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200622220752.GB51374@raichu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:20:31 -0000 On 6/22/20 3:07 PM, Mark Johnston wrote: > On Mon, Jun 22, 2020 at 11:35:38AM -0700, John Baldwin wrote: >> On 6/21/20 6:10 PM, Mark Johnston wrote: >>> On Fri, Jun 19, 2020 at 08:33:35AM -0700, John Baldwin wrote: >>>> On 6/18/20 12:32 PM, Mark Johnston wrote: >>>>> Author: markj >>>>> Date: Thu Jun 18 19:32:34 2020 >>>>> New Revision: 362338 >>>>> URL: https://svnweb.freebsd.org/changeset/base/362338 >>>>> >>>>> Log: >>>>> Add the SCTP_SUPPORT kernel option. >>>>> >>>>> This is in preparation for enabling a loadable SCTP stack. Analogous to >>>>> IPSEC/IPSEC_SUPPORT, the SCTP_SUPPORT kernel option must be configured >>>>> in order to support a loadable SCTP implementation. >>>>> >>>>> Discussed with: tuexen >>>>> MFC after: 2 weeks >>>>> Sponsored by: The FreeBSD Foundation >>>> >>>> Do you want to add similar handling to sys/conf/config.mk that we have >>>> for IPsec? Also, do we want to avoid building sctp.ko if it is in the >>>> kernel like we do for ipsec.ko and/or only build it if the kernel contains >>>> SCTP_SUPPORT? (For ipsec.ko we had to do that as it wouldn't compile, not >>>> sure if the same is true for sctp.ko) >>> >>> Sorry for the delay. >>> I think we do indeed want similar handling in config.mk, I will work on >>> it. It is probably also reasonable to avoid compiling sctp.ko when >>> SCTP_SUPPORT is not defined, though I can't see a reason that wouldn't >>> work today since SCTP_SUPPORT is not used in any headers. >> >> Ok. ipsec.ko mattered more when the build broke. Whether or not we compile >> "duplicate" modules for kernels is perhaps a larger question. I think I >> might favor that change, but it is a larger change that merits some thought. >> In particular, you want good code coverage for things like LINT builds, so >> maybe we really should still compile modules whenever possible. > > I tend to assume that a buildkernel of GENERIC without any special flags > will always build all modules (except those not available for the target > platform of course), so I was a bit surprised to see that this isn't the > case for ipsec.ko. As Rodney pointed out it provides marginally better > coverage against build breaks. If you think we can restore the old > behaviour for ipsec without too much work I think it'd be reasonable to > change that and compile sctp.ko even when "options SCTP" is configured. > I can't spot any similar cases in sys/modules/Makefile with a bit of > skimming. I don't think ipsec.ko is easily fixable when I looked at it. I think it is fine to leave sctp.ko building as part of GENERIC though. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jun 22 22:24:51 2020 Return-Path: Delivered-To: svn-src-head@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 A755A33E9B0 for ; Mon, 22 Jun 2020 22:24:51 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rP9G2n8qz4WMg; Mon, 22 Jun 2020 22:24:49 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 05MMOmRw032180 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 22 Jun 2020 15:24:48 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 05MMOmjY032179; Mon, 22 Jun 2020 15:24:48 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 22 Jun 2020 15:24:48 -0700 From: Gleb Smirnoff To: Yuri Pankov Cc: Yuri Pankov , Zhihao Yuan , svn-src-head@freebsd.org Subject: Re: svn commit: r362148 - head/contrib/nvi/common Message-ID: <20200622222448.GB31842@FreeBSD.org> References: <202006131411.05DEB2mP097868@repo.freebsd.org> <20200622221144.GA31842@FreeBSD.org> <3fe4705c-e036-6999-b6b0-6e05f7cf8321@yuripv.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fe4705c-e036-6999-b6b0-6e05f7cf8321@yuripv.dev> X-Rspamd-Queue-Id: 49rP9G2n8qz4WMg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:24:51 -0000 On Tue, Jun 23, 2020 at 01:20:01AM +0300, Yuri Pankov wrote: Y> Gleb Smirnoff wrote: Y> > Yuri, Zhihao, Y> > Y> > this commit totally broke Russian input for me in nvi. After Y> > exiting edit mode, nvi immediately converts all text to ???????. Y> > Y> > I don't have any special settings in my environment. All I have Y> > is "russian" class for my user which yields in these environment Y> > variables: Y> > Y> > declare -x LANG="ru_RU.UTF-8" Y> > declare -x MM_CHARSET="UTF-8" Y> > declare -x XTERM_LOCALE="ru_RU.UTF-8" Y> > Y> > I'm already digging into that problem, but may be you have Y> > a clue immediately. Y> Y> My bad, yes, I see the problem, looking into it. My first attempt was this fix: --- common/exf.c (revision 362200) +++ common/exf.c (working copy) @@ -1252,7 +1252,8 @@ file_encinit(SCR *sp) else if (O_ISSET(sp, O_FILEENCODING) && strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) /* Use fileencoding as is */ ; - else if (strcasecmp(codeset(), "utf-8") != 0) + else if (strncasecmp(codeset() + strlen(codeset()) - 5, "utf-8", 5) != + 0) o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); else o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); But it appeared to be not the case. To my surprise, codeset() which is wrapper around nl_langinfo() in my case returns US-ASCII. Y> > On Sat, Jun 13, 2020 at 02:11:02PM +0000, Yuri Pankov wrote: Y> > Y> Author: yuripv Y> > Y> Date: Sat Jun 13 14:11:02 2020 Y> > Y> New Revision: 362148 Y> > Y> URL: https://svnweb.freebsd.org/changeset/base/362148 Y> > Y> Y> > Y> Log: Y> > Y> nvi: fallback to ISO8859-1 as last resort Y> > Y> Y> > Y> Current logic of using user's locale encoding that is UTF-8 doesn't make Y> > Y> much sense if we already failed the looks_utf8() check and skipped Y> > Y> encoding set using "fileencoding" as being UTF-8 as well; fallback to Y> > Y> ISO8859-1 in that case. Y> > Y> Y> > Y> Reviewed by: Zhihao Yuan Y> > Y> Differential Revision: https://reviews.freebsd.org/D24919 Y> > Y> Y> > Y> Modified: Y> > Y> head/contrib/nvi/common/exf.c Y> > Y> Y> > Y> Modified: head/contrib/nvi/common/exf.c Y> > Y> ============================================================================== Y> > Y> --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020 (r362147) Y> > Y> +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020 (r362148) Y> > Y> @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp) Y> > Y> } Y> > Y> Y> > Y> /* Y> > Y> - * Detect UTF-8 and fallback to the locale/preset encoding. Y> > Y> + * 1. Check for valid UTF-8. Y> > Y> + * 2. Check if fallback fileencoding is set and is NOT UTF-8. Y> > Y> + * 3. Check if user locale's encoding is NOT UTF-8. Y> > Y> + * 4. Use ISO8859-1 as last resort. Y> > Y> * Y> > Y> * XXX Y> > Y> * A manually set O_FILEENCODING indicates the "fallback Y> > Y> @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp) Y> > Y> */ Y> > Y> if (looks_utf8(buf, blen) > 1) Y> > Y> o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); Y> > Y> - else if (!O_ISSET(sp, O_FILEENCODING) || Y> > Y> - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) Y> > Y> + else if (O_ISSET(sp, O_FILEENCODING) && Y> > Y> + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) Y> > Y> + /* Use fileencoding as is */ ; Y> > Y> + else if (strcasecmp(codeset(), "utf-8") != 0) Y> > Y> o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); Y> > Y> + else Y> > Y> + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); Y> > Y> Y> > Y> conv_enc(sp, O_FILEENCODING, 0); Y> > Y> #endif -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Mon Jun 22 22:39:18 2020 Return-Path: Delivered-To: svn-src-head@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 B73DA33ED9C for ; Mon, 22 Jun 2020 22:39:18 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rPTy38qvz4Whc; Mon, 22 Jun 2020 22:39:18 +0000 (UTC) (envelope-from lichray@gmail.com) Received: by mail-wr1-x42b.google.com with SMTP id h5so18469255wrc.7; Mon, 22 Jun 2020 15:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Kn032rc4I5Z8+r3s98vqIP0XxZrEnVIS4y4Wj/wTTzk=; b=X835OdVu+cn9squW8A+n5/sUZyBT2nWfMEmc4X6FbU6PhABTgNazCS7riNndPH1HTc qlnJl1C0ZxMohOt/O5VB25pX2ViLToIU5c9XUd0vHZifP4FuHUrpZdpyqwXS/gAWRlm4 yuA7/lqZipHlkAf9RpCgVGdCxHkL5w5j7DworF807dciOYrQbkZENpl4MFVGNLhNpE9G 0GhAXAnO0C1bZKnjzUVusGcoHzF2JRejwK83WCX3dTckBMiYOzWDx5ZZ2/9xXMJcI1sj n7FeEKhe+fCiHhcVaJcoWhIqOPgj/2MDflHMPsZQkZxut2ES18Yluo4Qo7qSPcBtc6Kn 1H2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kn032rc4I5Z8+r3s98vqIP0XxZrEnVIS4y4Wj/wTTzk=; b=S4JM1wwvPuQqKme4CLSqoO9oN9P5yDxi+4HBvFoecPbKlMphI2yknxixqTGx7A+zfy DmuP72iB+fhtTzTooeLdE02lS5LtLFz0peJFzOuaxEec1IdBDGrQsGEZtYUacn4OXcBk /lzB1BaVA8PPmrMgsgjkXlswQdYukgdkvU9da2NCXcLYPN+hJB1yIsNF8hLQ6gtrSGce bK5TMnQYTm0UGFmNH/0pYWlNfmlmYQ2ePRdtR1Oc4kPvPTc0+45C3BUdwIwOTNkp7XyK /8panIYq/qEUmctnvdViv1HLJ4vDPtk2NyBT55gpTbYXMQ+SWRGNtdMZhHXcuuKZC98s M1Mg== X-Gm-Message-State: AOAM5324RQmdDoz9SkFeo6d4JBPKZWXLN0+nNWHsa8erN5M6BYdpOn1Z PSBxEL7cX3ig+vipclQr6sgk7YDfmr2YvWr7aP3rbda9hJ8Veg== X-Google-Smtp-Source: ABdhPJxGL9cTH0Aw7/I2Mn3V32sq2dUj3vFywtgFW42Gwj++hjffdLaK7stMHtDQOCIZA4Vflx+zWMG1RZ7QA0ri57Q= X-Received: by 2002:a5d:56d0:: with SMTP id m16mr20801014wrw.194.1592865556534; Mon, 22 Jun 2020 15:39:16 -0700 (PDT) MIME-Version: 1.0 References: <202006131411.05DEB2mP097868@repo.freebsd.org> <20200622221144.GA31842@FreeBSD.org> <3fe4705c-e036-6999-b6b0-6e05f7cf8321@yuripv.dev> <20200622222448.GB31842@FreeBSD.org> In-Reply-To: <20200622222448.GB31842@FreeBSD.org> From: Zhihao Yuan Date: Mon, 22 Jun 2020 17:39:05 -0500 Message-ID: Subject: Re: svn commit: r362148 - head/contrib/nvi/common To: Gleb Smirnoff Cc: Yuri Pankov , Yuri Pankov , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49rPTy38qvz4Whc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:39:18 -0000 On Mon, Jun 22, 2020 at 5:24 PM Gleb Smirnoff wrote: > > My first attempt was this fix: > > --- common/exf.c (revision 362200) > +++ common/exf.c (working copy) > @@ -1252,7 +1252,8 @@ file_encinit(SCR *sp) > else if (O_ISSET(sp, O_FILEENCODING) && > strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) > /* Use fileencoding as is */ ; > - else if (strcasecmp(codeset(), "utf-8") != 0) > + else if (strncasecmp(codeset() + strlen(codeset()) - 5, "utf-8", > 5) != > + 0) > o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); > else > o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); > > But it appeared to be not the case. To my surprise, codeset() > which is wrapper around nl_langinfo() in my case returns US-ASCII. > > That sounds strange. 1. Can you set LC_CTYPE as well and see if anything changes? 2. Can you revert to the previous version and see what nl_langinfo gives? There is another issue... I'm sorry. I totally forgot what looks_utf8 actually does. Here is its behavior (encoding.c): Returns -1: invalid UTF-8 0: uses odd control characters, so doesn't look like text 1: 7-bit text 2: definitely UTF-8 text (valid high-bit set bytes) So if looks_utf8() > 1, it means the file itself is UTF-8 for sure. If you opened a file with 7-bit text or with control characters, :set fileencoding should set the encoding intended to write. But the HEAD behaviors is that you can't input Unicode. I'm reverting upstream. -- Zhihao Yuan, ID lichray The best way to predict the future is to invent it. _______________________________________________ From owner-svn-src-head@freebsd.org Mon Jun 22 22:56:09 2020 Return-Path: Delivered-To: svn-src-head@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 DAF3C33EFC4 for ; Mon, 22 Jun 2020 22:56:09 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49rPsP3JRSz4XXN; Mon, 22 Jun 2020 22:56:09 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id AA79B5C01EE; Mon, 22 Jun 2020 18:46:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Jun 2020 18:46:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=G fVclCuApheCkbKpPYpbmdYC62G1lcpwG8/oZyxNgS8=; b=MCU100109yAvuIc1o I6uQPngm7rA+s5opKsyKt7BWTB/KSgW2rlx7tca+S6oTsg2YNhcFChtbx0ZxM4ih AsMMDWpMAWTM5nGyRFejjkT/HL9oA9xgFwTMshFrZslPoK/Hb34RTi+dcncl/B0L GkTi0+CO1c/bUAznECWOOxPKJvFE43Ugcwn+k+JQXLtAT1uyWyhMjHorFDAObSYh QeQXBuI/eA+ogM+ab+sHWGy/bRrJ9erM81eyDB9zYZFhVQXo8Fd2kE5VR3eg3S1F YWirFH6r4Icviylpw657LR4aCrVkXy8DSbry4vRezM1JzsktqOK+q4mt50B/zmrF /vx8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=GfVclCuApheCkbKpPYpbmdYC62G1lcpwG8/oZyxNg S8=; b=r5x6rX6uZp12FBoQ3F0apucmdNr5UfcqTg8BLdRrFkh5ZI7y7NP1usYxX PXzkVNOuZrhbIZ10vTH9k1MSHO5tdSyRHInyQj+tYIve6IAn0N1Nk5/8f5fSz6k4 el0Mi9DLMtDp4VADjL7VJrwuiW1Re7B1BT4Gdw6o80z2rDJ54ALV2YS+K70Xica4 GQrKsgNDd+buqjCagxulbZssYJsxv4nfECZwceoHfc3J72G7rmuMywjKTlkUBj/f py0k46mL0i5bJgmcFipTUXxXtmb0fi+J2UOdID48sT9o6/ztdBwuH5HEe2wK6xJc lJFqj1RRN6JUnrCy7lC29rebdVTlQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekfedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihurhhiphhvseihuhhr ihhpvhdruggvvheqnecuggftrfgrthhtvghrnhepudeuffegtdehffdtffefkefhgfelie eitefghfeugeelfeduffegtdeufeekgfdvnecukfhppeeluddrvdegtddruddvgedrudef jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihuh hrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id B2E1630673FD; Mon, 22 Jun 2020 18:46:58 -0400 (EDT) Subject: Re: svn commit: r362148 - head/contrib/nvi/common To: Zhihao Yuan , Gleb Smirnoff Cc: Yuri Pankov , svn-src-head@freebsd.org References: <202006131411.05DEB2mP097868@repo.freebsd.org> <20200622221144.GA31842@FreeBSD.org> <3fe4705c-e036-6999-b6b0-6e05f7cf8321@yuripv.dev> <20200622222448.GB31842@FreeBSD.org> From: Yuri Pankov Message-ID: Date: Tue, 23 Jun 2020 01:46:57 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49rPsP3JRSz4XXN X-Spamd-Bar: ++++++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=MCU10010; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=r5x6rX6u; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.27 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [14.51 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:66.111.4.27:c]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.27:from]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.137:received]; R_DKIM_ALLOW(0.00)[yuripv.dev:s=fm1,messagingengine.com:s=fm3]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.26)[0.263]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; NEURAL_SPAM_MEDIUM(0.97)[0.966]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.88)[0.884]; URIBL_BLACK(7.50)[yuripv.dev:dkim]; RWL_MAILSPIKE_VERYGOOD(0.00)[66.111.4.27:from]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:56:09 -0000 Zhihao Yuan wrote: > On Mon, Jun 22, 2020 at 5:24 PM Gleb Smirnoff > wrote: > > > My first attempt was this fix: > > --- common/exf.c        (revision 362200) > +++ common/exf.c        (working copy) > @@ -1252,7 +1252,8 @@ file_encinit(SCR *sp) >         else if (O_ISSET(sp, O_FILEENCODING) && >             strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) >                 /* Use fileencoding as is */ ; > -       else if (strcasecmp(codeset(), "utf-8") != 0) > +       else if (strncasecmp(codeset() + strlen(codeset()) - 5, > "utf-8", 5) != > +           0) >                 o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); >         else >                 o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); > > But it appeared to be not the case. To my surprise, codeset() > which is wrapper around nl_langinfo() in my case returns US-ASCII. > > > That sounds strange. > >   1. Can you set LC_CTYPE as well and see >     if anything changes? >   2. Can you revert to the previous version >     and see what nl_langinfo gives? > > There is another issue... I'm sorry.  I totally forgot what > looks_utf8 actually does. > > Here is its behavior (encoding.c): > >  Returns >  -1: invalid UTF-8 >   0: uses odd control characters, so doesn't look like text >   1: 7-bit text >   2: definitely UTF-8 text (valid high-bit set bytes) > > So if looks_utf8() > 1, it means the file itself is UTF-8 > for sure.  If you opened a file with 7-bit text or with > control characters, :set fileencoding should set > the encoding intended to write.  But the HEAD > behaviors is that you can't input Unicode. > > I'm reverting upstream. Yes, I will revert for now. From owner-svn-src-head@freebsd.org Mon Jun 22 22:59:03 2020 Return-Path: Delivered-To: svn-src-head@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 EB49A33EB88; Mon, 22 Jun 2020 22:59:03 +0000 (UTC) (envelope-from yuripv@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 49rPwl5vVXz4XhY; Mon, 22 Jun 2020 22:59:03 +0000 (UTC) (envelope-from yuripv@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 C1A7B15F92; Mon, 22 Jun 2020 22:59:03 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MMx3lB003695; Mon, 22 Jun 2020 22:59:03 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MMx3eA003694; Mon, 22 Jun 2020 22:59:03 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202006222259.05MMx3eA003694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Mon, 22 Jun 2020 22:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362515 - head/contrib/nvi/common X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/contrib/nvi/common X-SVN-Commit-Revision: 362515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 22:59:04 -0000 Author: yuripv Date: Mon Jun 22 22:59:03 2020 New Revision: 362515 URL: https://svnweb.freebsd.org/changeset/base/362515 Log: Revert r362148. Breaks UTF-8 input for new or having only 7bit characters present files. Reported by: glebius Modified: head/contrib/nvi/common/exf.c Modified: head/contrib/nvi/common/exf.c ============================================================================== --- head/contrib/nvi/common/exf.c Mon Jun 22 22:43:09 2020 (r362514) +++ head/contrib/nvi/common/exf.c Mon Jun 22 22:59:03 2020 (r362515) @@ -1237,10 +1237,7 @@ file_encinit(SCR *sp) } /* - * 1. Check for valid UTF-8. - * 2. Check if fallback fileencoding is set and is NOT UTF-8. - * 3. Check if user locale's encoding is NOT UTF-8. - * 4. Use ISO8859-1 as last resort. + * Detect UTF-8 and fallback to the locale/preset encoding. * * XXX * A manually set O_FILEENCODING indicates the "fallback @@ -1249,13 +1246,9 @@ file_encinit(SCR *sp) */ if (looks_utf8(buf, blen) > 1) o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); - else if (O_ISSET(sp, O_FILEENCODING) && - strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) - /* Use fileencoding as is */ ; - else if (strcasecmp(codeset(), "utf-8") != 0) + else if (!O_ISSET(sp, O_FILEENCODING) || + !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); - else - o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); conv_enc(sp, O_FILEENCODING, 0); #endif From owner-svn-src-head@freebsd.org Mon Jun 22 23:13:15 2020 Return-Path: Delivered-To: svn-src-head@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 380A133EBD6; Mon, 22 Jun 2020 23:13:15 +0000 (UTC) (envelope-from gonzo@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 49rQF70nFvz4YBP; Mon, 22 Jun 2020 23:13:15 +0000 (UTC) (envelope-from gonzo@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 160C21604A; Mon, 22 Jun 2020 23:13:15 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MNDE49015564; Mon, 22 Jun 2020 23:13:14 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MNDEZm015563; Mon, 22 Jun 2020 23:13:14 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006222313.05MNDEZm015563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 22 Jun 2020 23:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362516 - head/contrib/ldns/drill X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/contrib/ldns/drill X-SVN-Commit-Revision: 362516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 23:13:15 -0000 Author: gonzo Date: Mon Jun 22 23:13:14 2020 New Revision: 362516 URL: https://svnweb.freebsd.org/changeset/base/362516 Log: Fix crash in drill(1) when IP has two subsequent dots Cherry-pick crash fix from the upstream repo PR: 226575 Reported by: Goran Mekić Obtained from: https://git.nlnetlabs.nl/ldns/commit/?id=98291475 MFC after: 2 weeks Modified: head/contrib/ldns/drill/drill.c Modified: head/contrib/ldns/drill/drill.c ============================================================================== --- head/contrib/ldns/drill/drill.c Mon Jun 22 22:59:03 2020 (r362515) +++ head/contrib/ldns/drill/drill.c Mon Jun 22 23:13:14 2020 (r362516) @@ -787,15 +787,17 @@ main(int argc, char *argv[]) qname = ldns_dname_new_frm_str(ip6_arpa_str); } else { qname = ldns_dname_new_frm_str(name); - qname_tmp = ldns_dname_reverse(qname); - ldns_rdf_deep_free(qname); - qname = qname_tmp; - qname_tmp = ldns_dname_new_frm_str("in-addr.arpa."); - status = ldns_dname_cat(qname, qname_tmp); - if (status != LDNS_STATUS_OK) { - error("%s", "could not create reverse address for ip4: %s\n", ldns_get_errorstr_by_id(status)); + if (qname) { + qname_tmp = ldns_dname_reverse(qname); + ldns_rdf_deep_free(qname); + qname = qname_tmp; + qname_tmp = ldns_dname_new_frm_str("in-addr.arpa."); + status = ldns_dname_cat(qname, qname_tmp); + if (status != LDNS_STATUS_OK) { + error("%s", "could not create reverse address for ip4: %s\n", ldns_get_errorstr_by_id(status)); + } + ldns_rdf_deep_free(qname_tmp); } - ldns_rdf_deep_free(qname_tmp); } if (!qname) { error("%s", "-x implies an ip address"); From owner-svn-src-head@freebsd.org Mon Jun 22 23:20:45 2020 Return-Path: Delivered-To: svn-src-head@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 70C2333F2F6; Mon, 22 Jun 2020 23:20:45 +0000 (UTC) (envelope-from jhb@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 49rQPn2cvWz4YQj; Mon, 22 Jun 2020 23:20:45 +0000 (UTC) (envelope-from jhb@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 5541C15D4D; Mon, 22 Jun 2020 23:20:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MNKjDn015981; Mon, 22 Jun 2020 23:20:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MNKivu015975; Mon, 22 Jun 2020 23:20:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006222320.05MNKivu015975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Jun 2020 23:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362517 - in head: share/man/man9 sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: share/man/man9 sys/opencrypto X-SVN-Commit-Revision: 362517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 23:20:45 -0000 Author: jhb Date: Mon Jun 22 23:20:43 2020 New Revision: 362517 URL: https://svnweb.freebsd.org/changeset/base/362517 Log: Add support to the crypto framework for separate AAD buffers. This permits requests to provide the AAD in a separate side buffer instead of as a region in the crypto request input buffer. This is useful when the main data buffer might not contain the full AAD (e.g. for TLS or IPsec with ESN). Unlike separate IVs which are constrained in size and stored in an array in struct cryptop, separate AAD is provided by the caller setting a new crp_aad pointer to the buffer. The caller must ensure the pointer remains valid and the buffer contents static until the request is completed (e.g. when the callback routine is invoked). As with separate output buffers, not all drivers support this feature. Consumers must request use of this feature via a new session flag. To aid in driver testing, kern.crypto.cryptodev_separate_aad can be set to force /dev/crypto requests to use a separate AAD buffer. Discussed with: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25288 Modified: head/share/man/man9/crypto_request.9 head/share/man/man9/crypto_session.9 head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptosoft.c Modified: head/share/man/man9/crypto_request.9 ============================================================================== --- head/share/man/man9/crypto_request.9 Mon Jun 22 23:13:14 2020 (r362516) +++ head/share/man/man9/crypto_request.9 Mon Jun 22 23:20:43 2020 (r362517) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 25, 2020 +.Dd June 22, 2020 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -181,7 +181,7 @@ The following regions are defined: .Bl -column "Payload Output" "Input/Output" .It Sy Region Ta Sy Buffer Ta Sy Description .It AAD Ta Input Ta -Additional Authenticated Data +Embedded Additional Authenticated Data .It IV Ta Input Ta Embedded IV or nonce .It Payload Ta Input Ta @@ -256,6 +256,15 @@ If the digests do not match, fail the request with .Er EBADMSG . .El +.Ss Request AAD +AEAD and Encrypt-then-Authenticate requests may optionally include +Additional Authenticated Data. +AAD may either be supplied in the AAD region of the input buffer or +as a single buffer pointed to by +.Fa crp_aad . +In either case, +.Fa crp_aad_length +always indicates the amount of AAD in bytes. .Ss Request IV and/or Nonce Some cryptographic operations require an IV or nonce as an input. An IV may be stored either in the IV region of the data buffer or in Modified: head/share/man/man9/crypto_session.9 ============================================================================== --- head/share/man/man9/crypto_session.9 Mon Jun 22 23:13:14 2020 (r362516) +++ head/share/man/man9/crypto_session.9 Mon Jun 22 23:20:43 2020 (r362517) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 25, 2020 +.Dd June 22, 2020 .Dt CRYPTO_SESSION 9 .Os .Sh NAME @@ -194,6 +194,13 @@ that is modified in-place, or requests with separate i buffers. Sessions without this flag only permit requests with a single buffer that is modified in-place. +.It Dv CSP_F_SEPARATE_AAD +Support requests that use a separate buffer for AAD rather than providing +AAD as a region in the input buffer. +Sessions with this flag set permit requests with AAD passed in either in +a region of the input buffer or in a single, virtually-contiguous buffer. +Sessions without this flag only permit requests with AAD passed in as +a region in the input buffer. .El .It Fa csp_ivlen If either the cipher or authentication algorithms require an explicit Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Mon Jun 22 23:13:14 2020 (r362516) +++ head/sys/opencrypto/crypto.c Mon Jun 22 23:20:43 2020 (r362517) @@ -755,7 +755,8 @@ check_csp(const struct crypto_session_params *csp) struct auth_hash *axf; /* Mode-independent checks. */ - if ((csp->csp_flags & ~CSP_F_SEPARATE_OUTPUT) != 0) + if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) != + 0) return (false); if (csp->csp_ivlen < 0 || csp->csp_cipher_klen < 0 || csp->csp_auth_klen < 0 || csp->csp_auth_mlen < 0) @@ -771,6 +772,8 @@ check_csp(const struct crypto_session_params *csp) return (false); if (csp->csp_flags & CSP_F_SEPARATE_OUTPUT) return (false); + if (csp->csp_flags & CSP_F_SEPARATE_AAD) + return (false); if (csp->csp_cipher_klen != 0 || csp->csp_ivlen != 0 || csp->csp_auth_alg != 0 || csp->csp_auth_klen != 0 || csp->csp_auth_mlen != 0) @@ -779,6 +782,8 @@ check_csp(const struct crypto_session_params *csp) case CSP_MODE_CIPHER: if (!alg_is_cipher(csp->csp_cipher_alg)) return (false); + if (csp->csp_flags & CSP_F_SEPARATE_AAD) + return (false); if (csp->csp_cipher_alg != CRYPTO_NULL_CBC) { if (csp->csp_cipher_klen == 0) return (false); @@ -795,6 +800,9 @@ check_csp(const struct crypto_session_params *csp) if (csp->csp_cipher_alg != 0 || csp->csp_cipher_klen != 0) return (false); + if (csp->csp_flags & CSP_F_SEPARATE_AAD) + return (false); + /* IV is optional for digests (e.g. GMAC). */ if (csp->csp_ivlen >= EALG_MAX_BLOCK_LEN) return (false); @@ -1306,16 +1314,27 @@ crp_sanity(struct cryptop *crp) break; } if (csp->csp_mode == CSP_MODE_AEAD || csp->csp_mode == CSP_MODE_ETA) { - KASSERT(crp->crp_aad_start == 0 || - crp->crp_aad_start < ilen, - ("invalid AAD start")); - KASSERT(crp->crp_aad_length != 0 || crp->crp_aad_start == 0, - ("AAD with zero length and non-zero start")); - KASSERT(crp->crp_aad_length == 0 || - crp->crp_aad_start + crp->crp_aad_length <= ilen, - ("AAD outside input length")); + if (crp->crp_aad == NULL) { + KASSERT(crp->crp_aad_start == 0 || + crp->crp_aad_start < ilen, + ("invalid AAD start")); + KASSERT(crp->crp_aad_length != 0 || + crp->crp_aad_start == 0, + ("AAD with zero length and non-zero start")); + KASSERT(crp->crp_aad_length == 0 || + crp->crp_aad_start + crp->crp_aad_length <= ilen, + ("AAD outside input length")); + } else { + KASSERT(csp->csp_flags & CSP_F_SEPARATE_AAD, + ("session doesn't support separate AAD buffer")); + KASSERT(crp->crp_aad_start == 0, + ("separate AAD buffer with non-zero AAD start")); + KASSERT(crp->crp_aad_length != 0, + ("separate AAD buffer with zero length")); + } } else { - KASSERT(crp->crp_aad_start == 0 && crp->crp_aad_length == 0, + KASSERT(crp->crp_aad == NULL && crp->crp_aad_start == 0 && + crp->crp_aad_length == 0, ("AAD region in request not supporting AAD")); } if (csp->csp_ivlen == 0) { Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Mon Jun 22 23:13:14 2020 (r362516) +++ head/sys/opencrypto/cryptodev.c Mon Jun 22 23:20:43 2020 (r362517) @@ -283,6 +283,7 @@ struct cryptop_data { char *buf; char *obuf; + char *aad; bool done; }; @@ -297,6 +298,11 @@ SYSCTL_BOOL(_kern_crypto, OID_AUTO, cryptodev_use_outp &use_outputbuffers, 0, "Use separate output buffers for /dev/crypto requests."); +static bool use_separate_aad; +SYSCTL_BOOL(_kern_crypto, OID_AUTO, cryptodev_separate_aad, CTLFLAG_RW, + &use_separate_aad, 0, + "Use separate AAD buffer for /dev/crypto requests."); + static int cryptof_ioctl(struct file *, u_long, void *, struct ucred *, struct thread *); static int cryptof_stat(struct file *, struct stat *, @@ -604,6 +610,14 @@ cryptof_ioctl( else csp.csp_mode = CSP_MODE_DIGEST; + switch (csp.csp_mode) { + case CSP_MODE_AEAD: + case CSP_MODE_ETA: + if (use_separate_aad) + csp.csp_flags |= CSP_F_SEPARATE_AAD; + break; + } + if (txform) { csp.csp_cipher_alg = txform->type; csp.csp_cipher_klen = sop->keylen; @@ -819,14 +833,19 @@ bail: static int cryptodev_cb(struct cryptop *); static struct cryptop_data * -cod_alloc(struct csession *cse, size_t len, struct thread *td) +cod_alloc(struct csession *cse, size_t aad_len, size_t len, struct thread *td) { struct cryptop_data *cod; cod = malloc(sizeof(struct cryptop_data), M_XDATA, M_WAITOK | M_ZERO); cod->cse = cse; - cod->buf = malloc(len, M_XDATA, M_WAITOK); + if (crypto_get_params(cse->cses)->csp_flags & CSP_F_SEPARATE_AAD) { + if (aad_len != 0) + cod->aad = malloc(aad_len, M_XDATA, M_WAITOK); + cod->buf = malloc(len, M_XDATA, M_WAITOK); + } else + cod->buf = malloc(aad_len + len, M_XDATA, M_WAITOK); if (crypto_get_params(cse->cses)->csp_flags & CSP_F_SEPARATE_OUTPUT) cod->obuf = malloc(len, M_XDATA, M_WAITOK); return (cod); @@ -836,6 +855,7 @@ static void cod_free(struct cryptop_data *cod) { + free(cod->aad, M_XDATA); free(cod->obuf, M_XDATA); free(cod->buf, M_XDATA); free(cod, M_XDATA); @@ -881,7 +901,7 @@ cryptodev_op( } } - cod = cod_alloc(cse, cop->len + cse->hashsize, td); + cod = cod_alloc(cse, 0, cop->len + cse->hashsize, td); crp = crypto_getreq(cse->cses, M_WAITOK); @@ -1087,29 +1107,38 @@ cryptodev_aead( } } - cod = cod_alloc(cse, caead->aadlen + caead->len + cse->hashsize, td); + cod = cod_alloc(cse, caead->aadlen, caead->len + cse->hashsize, td); crp = crypto_getreq(cse->cses, M_WAITOK); - error = copyin(caead->aad, cod->buf, caead->aadlen); + if (cod->aad != NULL) + error = copyin(caead->aad, cod->aad, caead->aadlen); + else + error = copyin(caead->aad, cod->buf, caead->aadlen); if (error) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } + crp->crp_aad = cod->aad; crp->crp_aad_start = 0; crp->crp_aad_length = caead->aadlen; - error = copyin(caead->src, cod->buf + caead->aadlen, caead->len); + if (cod->aad != NULL) + crp->crp_payload_start = 0; + else + crp->crp_payload_start = caead->aadlen; + error = copyin(caead->src, cod->buf + crp->crp_payload_start, + caead->len); if (error) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); goto bail; } - crp->crp_payload_start = caead->aadlen; crp->crp_payload_length = caead->len; if (caead->op == COP_ENCRYPT && cod->obuf != NULL) - crp->crp_digest_start = caead->len; + crp->crp_digest_start = crp->crp_payload_output_start + + caead->len; else - crp->crp_digest_start = caead->aadlen + caead->len; + crp->crp_digest_start = crp->crp_payload_start + caead->len; switch (cse->mode) { case CSP_MODE_AEAD: @@ -1136,7 +1165,7 @@ cryptodev_aead( } crp->crp_flags = CRYPTO_F_CBIMM | (caead->flags & COP_F_BATCH); - crypto_use_buf(crp, cod->buf, caead->aadlen + caead->len + + crypto_use_buf(crp, cod->buf, crp->crp_payload_start + caead->len + cse->hashsize); if (cod->obuf != NULL) crypto_use_output_buf(crp, cod->obuf, caead->len + Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Mon Jun 22 23:13:14 2020 (r362516) +++ head/sys/opencrypto/cryptodev.h Mon Jun 22 23:20:43 2020 (r362517) @@ -384,6 +384,7 @@ struct crypto_session_params { int csp_flags; #define CSP_F_SEPARATE_OUTPUT 0x0001 /* Requests can use separate output */ +#define CSP_F_SEPARATE_AAD 0x0002 /* Requests can use separate AAD */ int csp_ivlen; /* IV length in bytes. */ @@ -479,6 +480,7 @@ struct cryptop { struct crypto_buffer crp_buf; struct crypto_buffer crp_obuf; + void *crp_aad; /* AAD buffer. */ int crp_aad_start; /* Location of AAD. */ int crp_aad_length; /* 0 => no AAD. */ int crp_iv_start; /* Location of IV. IV length is from Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Mon Jun 22 23:13:14 2020 (r362516) +++ head/sys/opencrypto/cryptosoft.c Mon Jun 22 23:20:43 2020 (r362517) @@ -335,8 +335,11 @@ swcr_authcompute(struct swcr_session *ses, struct cryp bcopy(sw->sw_ictx, &ctx, axf->ctxsize); - err = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, - axf->Update, &ctx); + if (crp->crp_aad != NULL) + err = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); + else + err = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, + axf->Update, &ctx); if (err) return err; @@ -503,7 +506,7 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp blksz = GMAC_BLOCK_LEN; KASSERT(axf->blocksize == blksz, ("%s: axf block size mismatch", __func__)); - + swe = &ses->swcr_encdec; exf = swe->sw_exf; KASSERT(axf->blocksize == exf->native_blocksize, @@ -520,26 +523,39 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp axf->Reinit(&ctx, iv, ivlen); /* Supply MAC with AAD */ - crypto_cursor_init(&cc_in, &crp->crp_buf); - crypto_cursor_advance(&cc_in, crp->crp_aad_start); - for (resid = crp->crp_aad_length; resid >= blksz; resid -= len) { - len = crypto_cursor_seglen(&cc_in); - if (len >= blksz) { - inblk = crypto_cursor_segbase(&cc_in); - len = rounddown(MIN(len, resid), blksz); - crypto_cursor_advance(&cc_in, len); - } else { - len = blksz; - crypto_cursor_copydata(&cc_in, len, blk); - inblk = blk; + if (crp->crp_aad != NULL) { + len = rounddown(crp->crp_aad_length, blksz); + if (len != 0) + axf->Update(&ctx, crp->crp_aad, len); + if (crp->crp_aad_length != len) { + memset(blk, 0, blksz); + memcpy(blk, (char *)crp->crp_aad + len, + crp->crp_aad_length - len); + axf->Update(&ctx, blk, blksz); } - axf->Update(&ctx, inblk, len); + } else { + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_aad_start); + for (resid = crp->crp_aad_length; resid >= blksz; + resid -= len) { + len = crypto_cursor_seglen(&cc_in); + if (len >= blksz) { + inblk = crypto_cursor_segbase(&cc_in); + len = rounddown(MIN(len, resid), blksz); + crypto_cursor_advance(&cc_in, len); + } else { + len = blksz; + crypto_cursor_copydata(&cc_in, len, blk); + inblk = blk; + } + axf->Update(&ctx, inblk, len); + } + if (resid > 0) { + memset(blk, 0, blksz); + crypto_cursor_copydata(&cc_in, resid, blk); + axf->Update(&ctx, blk, blksz); + } } - if (resid > 0) { - memset(blk, 0, blksz); - crypto_cursor_copydata(&cc_in, resid, blk); - axf->Update(&ctx, blk, blksz); - } exf->reinit(swe->sw_kschedule, iv); @@ -607,7 +623,7 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp error = EBADMSG; goto out; } - + /* tag matches, decrypt data */ crypto_cursor_init(&cc_in, &crp->crp_buf); crypto_cursor_advance(&cc_in, crp->crp_payload_start); @@ -675,8 +691,11 @@ swcr_ccm_cbc_mac(struct swcr_session *ses, struct cryp ctx.aes_cbc_mac_ctx.cryptDataLength = 0; axf->Reinit(&ctx, iv, ivlen); - error = crypto_apply(crp, crp->crp_payload_start, - crp->crp_payload_length, axf->Update, &ctx); + if (crp->crp_aad != NULL) + error = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); + else + error = crypto_apply(crp, crp->crp_payload_start, + crp->crp_payload_length, axf->Update, &ctx); if (error) return (error); @@ -724,7 +743,7 @@ swcr_ccm(struct swcr_session *ses, struct cryptop *crp blksz = AES_BLOCK_LEN; KASSERT(axf->blocksize == blksz, ("%s: axf block size mismatch", __func__)); - + swe = &ses->swcr_encdec; exf = swe->sw_exf; KASSERT(axf->blocksize == exf->native_blocksize, @@ -748,8 +767,11 @@ swcr_ccm(struct swcr_session *ses, struct cryptop *crp axf->Reinit(&ctx, iv, ivlen); /* Supply MAC with AAD */ - error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, - axf->Update, &ctx); + if (crp->crp_aad != NULL) + error = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); + else + error = crypto_apply(crp, crp->crp_aad_start, + crp->crp_aad_length, axf->Update, &ctx); if (error) return (error); @@ -1013,7 +1035,7 @@ swcr_setup_auth(struct swcr_session *ses, swa->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if (swa->sw_ictx == NULL) return (ENOBUFS); - + switch (csp->csp_auth_alg) { case CRYPTO_SHA1_HMAC: case CRYPTO_SHA2_224_HMAC: @@ -1236,7 +1258,8 @@ static int swcr_probesession(device_t dev, const struct crypto_session_params *csp) { - if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT)) != 0) + if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) != + 0) return (EINVAL); switch (csp->csp_mode) { case CSP_MODE_COMPRESS: From owner-svn-src-head@freebsd.org Mon Jun 22 23:22:14 2020 Return-Path: Delivered-To: svn-src-head@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 5635733F6F7; Mon, 22 Jun 2020 23:22:14 +0000 (UTC) (envelope-from jhb@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 49rQRV1fGlz4Ys3; Mon, 22 Jun 2020 23:22:14 +0000 (UTC) (envelope-from jhb@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 33C5615FFB; Mon, 22 Jun 2020 23:22:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MNMEaZ020062; Mon, 22 Jun 2020 23:22:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MNMEjd020044; Mon, 22 Jun 2020 23:22:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006222322.05MNMEjd020044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Jun 2020 23:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362518 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 362518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 23:22:14 -0000 Author: jhb Date: Mon Jun 22 23:22:13 2020 New Revision: 362518 URL: https://svnweb.freebsd.org/changeset/base/362518 Log: Add support for requests with separate AAD to aesni(4). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25289 Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Mon Jun 22 23:20:43 2020 (r362517) +++ head/sys/crypto/aesni/aesni.c Mon Jun 22 23:22:13 2020 (r362518) @@ -254,7 +254,8 @@ aesni_probesession(device_t dev, const struct crypto_s struct aesni_softc *sc; sc = device_get_softc(dev); - if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT)) != 0) + if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) != + 0) return (EINVAL); switch (csp->csp_mode) { case CSP_MODE_DIGEST: @@ -697,8 +698,11 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c authbuf = NULL; if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16 || csp->csp_cipher_alg == CRYPTO_AES_CCM_16) { - authbuf = aesni_cipher_alloc(crp, crp->crp_aad_start, - crp->crp_aad_length, &authallocated); + if (crp->crp_aad != NULL) + authbuf = crp->crp_aad; + else + authbuf = aesni_cipher_alloc(crp, crp->crp_aad_start, + crp->crp_aad_length, &authallocated); if (authbuf == NULL) { error = ENOMEM; goto out; @@ -850,8 +854,12 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry hmac_key[i] = 0 ^ HMAC_IPAD_VAL; ses->hash_update(&sctx, hmac_key, sizeof(hmac_key)); - crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, - ses->hash_update, &sctx); + if (crp->crp_aad != NULL) + ses->hash_update(&sctx, crp->crp_aad, + crp->crp_aad_length); + else + crypto_apply(crp, crp->crp_aad_start, + crp->crp_aad_length, ses->hash_update, &sctx); if (CRYPTO_HAS_OUTPUT_BUFFER(crp) && CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) crypto_apply_buf(&crp->crp_obuf, @@ -876,8 +884,12 @@ aesni_cipher_mac(struct aesni_session *ses, struct cry } else { ses->hash_init(&sctx); - crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, - ses->hash_update, &sctx); + if (crp->crp_aad != NULL) + ses->hash_update(&sctx, crp->crp_aad, + crp->crp_aad_length); + else + crypto_apply(crp, crp->crp_aad_start, + crp->crp_aad_length, ses->hash_update, &sctx); if (CRYPTO_HAS_OUTPUT_BUFFER(crp) && CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) crypto_apply_buf(&crp->crp_obuf, From owner-svn-src-head@freebsd.org Mon Jun 22 23:41:34 2020 Return-Path: Delivered-To: svn-src-head@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 8B5D0340181; Mon, 22 Jun 2020 23:41:34 +0000 (UTC) (envelope-from jhb@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 49rQsp3Bdsz4ZbQ; Mon, 22 Jun 2020 23:41:34 +0000 (UTC) (envelope-from jhb@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 68D0D166A2; Mon, 22 Jun 2020 23:41:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MNfYnZ032509; Mon, 22 Jun 2020 23:41:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MNfY57032508; Mon, 22 Jun 2020 23:41:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006222341.05MNfY57032508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Jun 2020 23:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362519 - head/sys/dev/cxgbe/crypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 362519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 23:41:34 -0000 Author: jhb Date: Mon Jun 22 23:41:33 2020 New Revision: 362519 URL: https://svnweb.freebsd.org/changeset/base/362519 Log: Add support for requests with separate AAD to ccr(4). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25290 Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Mon Jun 22 23:22:13 2020 (r362518) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Mon Jun 22 23:41:33 2020 (r362519) @@ -387,7 +387,6 @@ ccr_write_ulptx_sgl(struct ccr_softc *sc, void *dst, i usgl->sge[i / 2].addr[i & 1] = htobe64(ss->ss_paddr); ss++; } - } static bool @@ -919,8 +918,13 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s imm_len = 0; sglist_reset(sc->sg_ulptx); if (crp->crp_aad_length != 0) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, - crp->crp_aad_start, crp->crp_aad_length); + if (crp->crp_aad != NULL) + error = sglist_append(sc->sg_ulptx, + crp->crp_aad, crp->crp_aad_length); + else + error = sglist_append_sglist(sc->sg_ulptx, + sc->sg_input, crp->crp_aad_start, + crp->crp_aad_length); if (error) return (error); } @@ -938,11 +942,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } - /* - * Any auth-only data before the cipher region is marked as AAD. - * Auth-data that overlaps with the cipher region is placed in - * the auth section. - */ + /* Any AAD comes after the IV. */ if (crp->crp_aad_length != 0) { aad_start = iv_len + 1; aad_stop = aad_start + crp->crp_aad_length - 1; @@ -1054,8 +1054,11 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s dst += iv_len; if (imm_len != 0) { if (crp->crp_aad_length != 0) { - crypto_copydata(crp, crp->crp_aad_start, - crp->crp_aad_length, dst); + if (crp->crp_aad != NULL) + memcpy(dst, crp->crp_aad, crp->crp_aad_length); + else + crypto_copydata(crp, crp->crp_aad_start, + crp->crp_aad_length, dst); dst += crp->crp_aad_length; } crypto_copydata(crp, crp->crp_payload_start, @@ -1224,8 +1227,13 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s imm_len = 0; sglist_reset(sc->sg_ulptx); if (crp->crp_aad_length != 0) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, - crp->crp_aad_start, crp->crp_aad_length); + if (crp->crp_aad != NULL) + error = sglist_append(sc->sg_ulptx, + crp->crp_aad, crp->crp_aad_length); + else + error = sglist_append_sglist(sc->sg_ulptx, + sc->sg_input, crp->crp_aad_start, + crp->crp_aad_length); if (error) return (error); } @@ -1337,8 +1345,11 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s dst += iv_len; if (imm_len != 0) { if (crp->crp_aad_length != 0) { - crypto_copydata(crp, crp->crp_aad_start, - crp->crp_aad_length, dst); + if (crp->crp_aad != NULL) + memcpy(dst, crp->crp_aad, crp->crp_aad_length); + else + crypto_copydata(crp, crp->crp_aad_start, + crp->crp_aad_length, dst); dst += crp->crp_aad_length; } crypto_copydata(crp, crp->crp_payload_start, @@ -1438,11 +1449,24 @@ ccr_gcm_soft(struct ccr_session *s, struct cryptop *cr axf->Reinit(auth_ctx, iv, sizeof(iv)); /* MAC the AAD. */ - for (i = 0; i < crp->crp_aad_length; i += sizeof(block)) { - len = imin(crp->crp_aad_length - i, sizeof(block)); - crypto_copydata(crp, crp->crp_aad_start + i, len, block); - bzero(block + len, sizeof(block) - len); - axf->Update(auth_ctx, block, sizeof(block)); + if (crp->crp_aad != NULL) { + len = rounddown(crp->crp_aad_length, sizeof(block)); + if (len != 0) + axf->Update(auth_ctx, crp->crp_aad, len); + if (crp->crp_aad_length != len) { + memset(block, 0, sizeof(block)); + memcpy(block, (char *)crp->crp_aad + len, + crp->crp_aad_length - len); + axf->Update(auth_ctx, block, sizeof(block)); + } + } else { + for (i = 0; i < crp->crp_aad_length; i += sizeof(block)) { + len = imin(crp->crp_aad_length - i, sizeof(block)); + crypto_copydata(crp, crp->crp_aad_start + i, len, + block); + bzero(block + len, sizeof(block) - len); + axf->Update(auth_ctx, block, sizeof(block)); + } } exf->reinit(kschedule, iv); @@ -1679,8 +1703,13 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s sglist_reset(sc->sg_ulptx); if (crp->crp_aad_length != 0) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, - crp->crp_aad_start, crp->crp_aad_length); + if (crp->crp_aad != NULL) + error = sglist_append(sc->sg_ulptx, + crp->crp_aad, crp->crp_aad_length); + else + error = sglist_append_sglist(sc->sg_ulptx, + sc->sg_input, crp->crp_aad_start, + crp->crp_aad_length); if (error) return (error); } @@ -1788,8 +1817,11 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s if (sgl_nsegs == 0) { dst += b0_len; if (crp->crp_aad_length != 0) { - crypto_copydata(crp, crp->crp_aad_start, - crp->crp_aad_length, dst); + if (crp->crp_aad != NULL) + memcpy(dst, crp->crp_aad, crp->crp_aad_length); + else + crypto_copydata(crp, crp->crp_aad_start, + crp->crp_aad_length, dst); dst += crp->crp_aad_length; } crypto_copydata(crp, crp->crp_payload_start, @@ -1905,12 +1937,14 @@ ccr_ccm_soft(struct ccr_session *s, struct cryptop *cr axf->Reinit(auth_ctx, iv, sizeof(iv)); /* MAC the AAD. */ - for (i = 0; i < crp->crp_aad_length; i += sizeof(block)) { - len = imin(crp->crp_aad_length - i, sizeof(block)); - crypto_copydata(crp, crp->crp_aad_start + i, len, block); - bzero(block + len, sizeof(block) - len); - axf->Update(auth_ctx, block, sizeof(block)); - } + if (crp->crp_aad != NULL) + error = axf->Update(auth_ctx, crp->crp_aad, + crp->crp_aad_length); + else + error = crypto_apply(crp, crp->crp_aad_start, + crp->crp_aad_length, axf->Update, auth_ctx); + if (error) + goto out; exf->reinit(kschedule, iv); @@ -2339,7 +2373,8 @@ ccr_probesession(device_t dev, const struct crypto_ses { unsigned int cipher_mode; - if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT)) != 0) + if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) != + 0) return (EINVAL); switch (csp->csp_mode) { case CSP_MODE_DIGEST: From owner-svn-src-head@freebsd.org Tue Jun 23 00:02:28 2020 Return-Path: Delivered-To: svn-src-head@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 C2D1334033E; Tue, 23 Jun 2020 00:02:28 +0000 (UTC) (envelope-from jhb@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 49rRKw4s0vz4bdL; Tue, 23 Jun 2020 00:02:28 +0000 (UTC) (envelope-from jhb@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 A1C501673B; Tue, 23 Jun 2020 00:02:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N02SQF046211; Tue, 23 Jun 2020 00:02:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N02Sum046210; Tue, 23 Jun 2020 00:02:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006230002.05N02Sum046210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 23 Jun 2020 00:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362523 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 362523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 00:02:28 -0000 Author: jhb Date: Tue Jun 23 00:02:28 2020 New Revision: 362523 URL: https://svnweb.freebsd.org/changeset/base/362523 Log: Store the AAD in a separate buffer for KTLS. For TLS 1.2 this permits reusing one of the existing iovecs without always having to duplicate both. While here, only duplicate the output iovec for TLS 1.3 if it will be used. Reviewed by: gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25291 Modified: head/sys/opencrypto/ktls_ocf.c Modified: head/sys/opencrypto/ktls_ocf.c ============================================================================== --- head/sys/opencrypto/ktls_ocf.c Mon Jun 22 23:55:06 2020 (r362522) +++ head/sys/opencrypto/ktls_ocf.c Tue Jun 23 00:02:28 2020 (r362523) @@ -112,25 +112,24 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, struct cryptop *crp; struct ocf_session *os; struct ocf_operation *oo; - struct iovec *iov, *out_iov; int i, error; uint16_t tls_comp_len; bool inplace; os = tls->cipher; - oo = malloc(sizeof(*oo) + (iovcnt + 2) * sizeof(*iov) * 2, M_KTLS_OCF, - M_WAITOK | M_ZERO); + oo = malloc(sizeof(*oo) + (iovcnt + 1) * sizeof(struct iovec), + M_KTLS_OCF, M_WAITOK | M_ZERO); oo->os = os; - iov = oo->iov; - out_iov = iov + iovcnt + 2; - uio.uio_iov = iov; + uio.uio_iov = iniov; + uio.uio_iovcnt = iovcnt; uio.uio_offset = 0; uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; - out_uio.uio_iov = out_iov; + out_uio.uio_iov = outiov; + out_uio.uio_iovcnt = iovcnt; out_uio.uio_offset = 0; out_uio.uio_segflg = UIO_SYSSPACE; out_uio.uio_td = curthread; @@ -149,26 +148,18 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, ad.tls_vmajor = hdr->tls_vmajor; ad.tls_vminor = hdr->tls_vminor; ad.tls_length = htons(tls_comp_len); - iov[0].iov_base = &ad; - iov[0].iov_len = sizeof(ad); - crp->crp_aad_start = 0; + crp->crp_aad = &ad; crp->crp_aad_length = sizeof(ad); - /* Copy iov's. */ - memcpy(iov + 1, iniov, iovcnt * sizeof(*iov)); - uio.uio_iovcnt = iovcnt + 1; - memcpy(out_iov, outiov, iovcnt * sizeof(*out_iov)); - out_uio.uio_iovcnt = iovcnt; - /* Compute payload length and determine if encryption is in place. */ inplace = true; - crp->crp_payload_start = sizeof(ad); + crp->crp_payload_start = 0; for (i = 0; i < iovcnt; i++) { if (iniov[i].iov_base != outiov[i].iov_base) inplace = false; crp->crp_payload_length += iniov[i].iov_len; } - uio.uio_resid = sizeof(ad) + crp->crp_payload_length; + uio.uio_resid = crp->crp_payload_length; out_uio.uio_resid = crp->crp_payload_length; if (inplace) @@ -176,8 +167,11 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, else tag_uio = &out_uio; - tag_uio->uio_iov[tag_uio->uio_iovcnt].iov_base = trailer; - tag_uio->uio_iov[tag_uio->uio_iovcnt].iov_len = AES_GMAC_HASH_LEN; + /* Duplicate iovec and append vector for tag. */ + memcpy(oo->iov, tag_uio->uio_iov, iovcnt * sizeof(struct iovec)); + tag_uio->uio_iov = oo->iov; + tag_uio->uio_iov[iovcnt].iov_base = trailer; + tag_uio->uio_iov[iovcnt].iov_len = AES_GMAC_HASH_LEN; tag_uio->uio_iovcnt++; crp->crp_digest_start = tag_uio->uio_resid; tag_uio->uio_resid += AES_GMAC_HASH_LEN; @@ -238,23 +232,12 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, os = tls->cipher; - oo = malloc(sizeof(*oo) + (iovcnt + 2) * sizeof(*iov) * 2, M_KTLS_OCF, + oo = malloc(sizeof(*oo) + (iovcnt + 1) * sizeof(*iov) * 2, M_KTLS_OCF, M_WAITOK | M_ZERO); oo->os = os; iov = oo->iov; - out_iov = iov + iovcnt + 2; - uio.uio_iov = iov; - uio.uio_offset = 0; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_td = curthread; - - out_uio.uio_iov = out_iov; - out_uio.uio_offset = 0; - out_uio.uio_segflg = UIO_SYSSPACE; - out_uio.uio_td = curthread; - crp = crypto_getreq(os->sid, M_WAITOK); /* Setup the nonce. */ @@ -266,52 +249,56 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, ad.tls_vmajor = hdr->tls_vmajor; ad.tls_vminor = hdr->tls_vminor; ad.tls_length = hdr->tls_length; - iov[0].iov_base = &ad; - iov[0].iov_len = sizeof(ad); - crp->crp_aad_start = 0; + crp->crp_aad = &ad; crp->crp_aad_length = sizeof(ad); - /* Copy iov's. */ - memcpy(iov + 1, iniov, iovcnt * sizeof(*iov)); - uio.uio_iovcnt = iovcnt + 1; - memcpy(out_iov, outiov, iovcnt * sizeof(*out_iov)); - out_uio.uio_iovcnt = iovcnt; - /* Compute payload length and determine if encryption is in place. */ inplace = true; - crp->crp_payload_start = sizeof(ad); + crp->crp_payload_start = 0; for (i = 0; i < iovcnt; i++) { if (iniov[i].iov_base != outiov[i].iov_base) inplace = false; crp->crp_payload_length += iniov[i].iov_len; } - uio.uio_resid = sizeof(ad) + crp->crp_payload_length; - out_uio.uio_resid = crp->crp_payload_length; - /* - * Always include the full trailer as input to get the - * record_type even if only the first byte is used. - */ + /* Store the record type as the first byte of the trailer. */ trailer[0] = record_type; crp->crp_payload_length++; - iov[iovcnt + 1].iov_base = trailer; - iov[iovcnt + 1].iov_len = AES_GMAC_HASH_LEN + 1; - uio.uio_iovcnt++; - uio.uio_resid += AES_GMAC_HASH_LEN + 1; - if (inplace) { - crp->crp_digest_start = uio.uio_resid - AES_GMAC_HASH_LEN; - } else { - out_iov[iovcnt] = iov[iovcnt + 1]; - out_uio.uio_iovcnt++; - out_uio.uio_resid += AES_GMAC_HASH_LEN + 1; - crp->crp_digest_start = out_uio.uio_resid - AES_GMAC_HASH_LEN; + crp->crp_digest_start = crp->crp_payload_length; + + /* + * Duplicate the input iov to append the trailer. Always + * include the full trailer as input to get the record_type + * even if only the first byte is used. + */ + memcpy(iov, iniov, iovcnt * sizeof(*iov)); + iov[iovcnt].iov_base = trailer; + iov[iovcnt].iov_len = AES_GMAC_HASH_LEN + 1; + uio.uio_iov = iov; + uio.uio_iovcnt = iovcnt + 1; + uio.uio_offset = 0; + uio.uio_resid = crp->crp_payload_length + AES_GMAC_HASH_LEN; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_td = curthread; + crypto_use_uio(crp, &uio); + + if (!inplace) { + /* Duplicate the output iov to append the trailer. */ + memcpy(out_iov, outiov, iovcnt * sizeof(*out_iov)); + out_iov[iovcnt] = iov[iovcnt]; + + out_uio.uio_iov = out_iov; + out_uio.uio_iovcnt = iovcnt + 1; + out_uio.uio_offset = 0; + out_uio.uio_resid = crp->crp_payload_length + + AES_GMAC_HASH_LEN; + out_uio.uio_segflg = UIO_SYSSPACE; + out_uio.uio_td = curthread; + crypto_use_output_uio(crp, &out_uio); } crp->crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; crp->crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; - crypto_use_uio(crp, &uio); - if (!inplace) - crypto_use_output_uio(crp, &out_uio); crp->crp_opaque = oo; crp->crp_callback = ktls_ocf_callback; @@ -368,7 +355,7 @@ ktls_ocf_try(struct socket *so, struct ktls_session *t int error; memset(&csp, 0, sizeof(csp)); - csp.csp_flags |= CSP_F_SEPARATE_OUTPUT; + csp.csp_flags |= CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD; switch (tls->params.cipher_algorithm) { case CRYPTO_AES_NIST_GCM_16: From owner-svn-src-head@freebsd.org Tue Jun 23 04:58:37 2020 Return-Path: Delivered-To: svn-src-head@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 DD508349293; Tue, 23 Jun 2020 04:58:37 +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.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 49rYvd5Zmjz40kf; Tue, 23 Jun 2020 04:58:37 +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 BAE9D1ACEF; Tue, 23 Jun 2020 04:58:37 +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 05N4wbtg025690; Tue, 23 Jun 2020 04:58:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N4wb8B025688; Tue, 23 Jun 2020 04:58:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006230458.05N4wb8B025688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 23 Jun 2020 04:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362530 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 362530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 04:58:37 -0000 Author: avg Date: Tue Jun 23 04:58:36 2020 New Revision: 362530 URL: https://svnweb.freebsd.org/changeset/base/362530 Log: teach ena driver about RSS kernel option Networking is broken if the driver configures its (virtual) hardware to use a hash algorithm (or a key) different from the one that the network stack (software RSS) uses. This can be seen with connections initiated from the host. The PCB will be placed into the hash table based on the hash value calculated by the software. The hardware-calculated hash value in reponse packets will be different, so the PCB won't be found. Tested with a kernel compiled with 'options RSS' on an instance with ena driver. Reviewed by: mw, adrian MFC after: 2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D24733 Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena_datapath.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jun 23 03:32:58 2020 (r362529) +++ head/sys/dev/ena/ena.c Tue Jun 23 04:58:36 2020 (r362530) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_rss.h" + #include #include #include @@ -61,6 +63,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef RSS +#include +#endif #include #include @@ -2700,6 +2705,16 @@ ena_rss_init_default(struct ena_adapter *adapter) } } +#ifdef RSS + uint8_t rss_algo = rss_gethashalgo(); + if (rss_algo == RSS_HASH_TOEPLITZ) { + uint8_t hash_key[RSS_KEYSIZE]; + + rss_getkey(hash_key); + rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ, + hash_key, RSS_KEYSIZE, 0xFFFFFFFF); + } else +#endif rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_CRC32, NULL, ENA_HASH_KEY_SIZE, 0xFFFFFFFF); if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) { Modified: head/sys/dev/ena/ena_datapath.c ============================================================================== --- head/sys/dev/ena/ena_datapath.c Tue Jun 23 03:32:58 2020 (r362529) +++ head/sys/dev/ena/ena_datapath.c Tue Jun 23 04:58:36 2020 (r362530) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_rss.h" #include "ena.h" #include "ena_datapath.h" #ifdef DEV_NETMAP @@ -335,6 +336,19 @@ ena_rx_hash_mbuf(struct ena_ring *rx_ring, struct ena_ if (likely(ENA_FLAG_ISSET(ENA_FLAG_RSS_ACTIVE, adapter))) { mbuf->m_pkthdr.flowid = ena_rx_ctx->hash; + +#ifdef RSS + /* + * Hardware and software RSS are in agreement only when both are + * configured to Toeplitz algorithm. This driver configures + * that algorithm only when software RSS is enabled and uses it. + */ + if (adapter->ena_dev->rss.hash_func != ENA_ADMIN_TOEPLITZ && + ena_rx_ctx->l3_proto != ENA_ETH_IO_L3_PROTO_UNKNOWN) { + M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE_HASH); + return; + } +#endif if (ena_rx_ctx->frag && (ena_rx_ctx->l3_proto != ENA_ETH_IO_L3_PROTO_UNKNOWN)) { From owner-svn-src-head@freebsd.org Tue Jun 23 06:42:40 2020 Return-Path: Delivered-To: svn-src-head@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 DDC4D34B296; Tue, 23 Jun 2020 06:42:40 +0000 (UTC) (envelope-from tsoome@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 49rcCh5rK3z45ZY; Tue, 23 Jun 2020 06:42:40 +0000 (UTC) (envelope-from tsoome@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 BF0061BA6E; Tue, 23 Jun 2020 06:42:40 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N6geYG092077; Tue, 23 Jun 2020 06:42:40 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N6gdF9092071; Tue, 23 Jun 2020 06:42:39 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202006230642.05N6gdF9092071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 23 Jun 2020 06:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362531 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs... X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/ope... X-SVN-Commit-Revision: 362531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 06:42:40 -0000 Author: tsoome Date: Tue Jun 23 06:42:39 2020 New Revision: 362531 URL: https://svnweb.freebsd.org/changeset/base/362531 Log: MFOpenZFS: Add basic zfs ioc input nvpair validation We want newer versions of libzfs_core to run against an existing zfs kernel module (i.e. a deferred reboot or module reload after an update). Programmatically document, via a zfs_ioc_key_t, the valid arguments for the ioc commands that rely on nvpair input arguments (i.e. non legacy commands from libzfs_core). Automatically verify the expected pairs before dispatching a command. This initial phase focuses on the non-legacy ioctls. A follow-on change can address the legacy ioctl input from the zfs_cmd_t. The zfs_ioc_key_t for zfs_keys_channel_program looks like: static const zfs_ioc_key_t zfs_keys_channel_program[] = { {"program", DATA_TYPE_STRING, 0}, {"arg", DATA_TYPE_UNKNOWN, 0}, {"sync", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, {"instrlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, {"memlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, }; Introduce four input errors to identify specific input failures (in addition to generic argument value errors like EINVAL, ERANGE, EBADF, and E2BIG). ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type Reviewed by: allanjude Obtained from: OpenZFS Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25393 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 23 04:58:36 2020 (r362530) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 23 06:42:39 2020 (r362531) @@ -7235,7 +7235,7 @@ zfs_do_bookmark(int argc, char **argv) fnvlist_free(nvl); if (ret != 0) { - const char *err_msg; + const char *err_msg = NULL; char errbuf[1024]; (void) snprintf(errbuf, sizeof (errbuf), @@ -7259,11 +7259,13 @@ zfs_do_bookmark(int argc, char **argv) err_msg = "out of space"; break; default: - err_msg = "unknown error"; + (void) zfs_standard_error(g_zfs, ret, errbuf); break; } - (void) fprintf(stderr, "%s: %s\n", errbuf, - dgettext(TEXT_DOMAIN, err_msg)); + if (err_msg != NULL) { + (void) fprintf(stderr, "%s: %s\n", errbuf, + dgettext(TEXT_DOMAIN, err_msg)); + } } return (ret != 0); @@ -7280,7 +7282,7 @@ zfs_do_channel_program(int argc, char **argv) char c; char *progbuf, *filename, *poolname; size_t progsize, progread; - nvlist_t *outnvl; + nvlist_t *outnvl = NULL; uint64_t instrlimit = ZCP_DEFAULT_INSTRLIMIT; uint64_t memlimit = ZCP_DEFAULT_MEMLIMIT; boolean_t sync_flag = B_TRUE, json_output = B_FALSE; @@ -7420,7 +7422,8 @@ zfs_do_channel_program(int argc, char **argv) * falling back on strerror() for an unexpected return code. */ char *errstring = NULL; - if (nvlist_exists(outnvl, ZCP_RET_ERROR)) { + const char *msg = gettext("Channel program execution failed"); + if (outnvl != NULL && nvlist_exists(outnvl, ZCP_RET_ERROR)) { (void) nvlist_lookup_string(outnvl, ZCP_RET_ERROR, &errstring); if (errstring == NULL) @@ -7449,12 +7452,11 @@ zfs_do_channel_program(int argc, char **argv) "programs must be run as root."; break; default: - errstring = strerror(ret); + (void) zfs_standard_error(g_zfs, ret, msg); } } - (void) fprintf(stderr, - gettext("Channel program execution failed:\n%s\n"), - errstring); + if (errstring != NULL) + (void) fprintf(stderr, "%s:\n%s\n", msg, errstring); } else { if (json_output) { (void) nvlist_print_json(stdout, outnvl); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jun 23 04:58:36 2020 (r362530) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jun 23 06:42:39 2020 (r362531) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek. All rights reserved. - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. + * Copyright (c) 2011, 2020 by Delphix. All rights reserved. * Copyright 2019 Joyent, Inc. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -142,6 +142,7 @@ typedef enum zfs_error { EZFS_INITIALIZING, /* currently initializing */ EZFS_NO_INITIALIZE, /* no active initialize */ EZFS_WRONG_PARENT, /* invalid parent dataset (e.g ZVOL) */ + EZFS_IOC_NOTSUPPORTED, /* operation not supported by zfs module */ EZFS_UNKNOWN } zfs_error_t; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Tue Jun 23 04:58:36 2020 (r362530) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Tue Jun 23 06:42:39 2020 (r362531) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2019 Joyent, Inc. - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. + * Copyright (c) 2011, 2018 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov * Copyright (c) 2017 Datto Inc. */ @@ -207,6 +207,9 @@ libzfs_error_description(libzfs_handle_t *hdl) case EZFS_NOTSUP: return (dgettext(TEXT_DOMAIN, "operation not supported " "on this dataset")); + case EZFS_IOC_NOTSUPPORTED: + return (dgettext(TEXT_DOMAIN, "operation not supported by " + "zfs kernel module")); case EZFS_ACTIVE_SPARE: return (dgettext(TEXT_DOMAIN, "pool has active shared spare " "device")); @@ -433,6 +436,22 @@ zfs_standard_error_fmt(libzfs_handle_t *hdl, int error case EREMOTEIO: zfs_verror(hdl, EZFS_ACTIVE_POOL, fmt, ap); break; + case ZFS_ERR_IOC_CMD_UNAVAIL: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs " + "module does not support this operation. A reboot may " + "be required to enable this operation.")); + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); + break; + case ZFS_ERR_IOC_ARG_UNAVAIL: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs " + "module does not support an option for this operation. " + "A reboot may be required to enable this option.")); + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); + break; + case ZFS_ERR_IOC_ARG_REQUIRED: + case ZFS_ERR_IOC_ARG_BADTYPE: + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); + break; default: zfs_error_aux(hdl, strerror(error)); zfs_verror(hdl, EZFS_UNKNOWN, fmt, ap); @@ -541,6 +560,22 @@ zpool_standard_error_fmt(libzfs_handle_t *hdl, int err break; case ZFS_ERR_WRONG_PARENT: zfs_verror(hdl, EZFS_WRONG_PARENT, fmt, ap); + break; + case ZFS_ERR_IOC_CMD_UNAVAIL: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs " + "module does not support this operation. A reboot may " + "be required to enable this operation.")); + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); + break; + case ZFS_ERR_IOC_ARG_UNAVAIL: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs " + "module does not support an option for this operation. " + "A reboot may be required to enable this option.")); + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); + break; + case ZFS_ERR_IOC_ARG_REQUIRED: + case ZFS_ERR_IOC_ARG_BADTYPE: + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); break; default: zfs_error_aux(hdl, strerror(error)); Modified: head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Jun 23 04:58:36 2020 (r362530) +++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c Tue Jun 23 06:42:39 2020 (r362531) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2012, 2017 by Delphix. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 RackTop Systems. @@ -80,6 +80,9 @@ #include #include #include +#ifdef ZFS_DEBUG +#include +#endif #include #include #include @@ -99,6 +102,42 @@ static int g_fd = -1; static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; static int g_refcount; +#ifdef ZFS_DEBUG +static zfs_ioc_t fail_ioc_cmd; +static zfs_errno_t fail_ioc_err; + +static void +libzfs_core_debug_ioc(void) +{ + /* + * To test running newer user space binaries with kernel's + * that don't yet support an ioctl or a new ioctl arg we + * provide an override to intentionally fail an ioctl. + * + * USAGE: + * The override variable, ZFS_IOC_TEST, is of the form "cmd:err" + * + * For example, to fail a ZFS_IOC_POOL_CHECKPOINT with a + * ZFS_ERR_IOC_CMD_UNAVAIL, the string would be "0x5a4d:1029" + * + * $ sudo sh -c "ZFS_IOC_TEST=0x5a4d:1029 zpool checkpoint tank" + * cannot checkpoint 'tank': the loaded zfs module does not support + * this operation. A reboot may be required to enable this operation. + */ + if (fail_ioc_cmd == 0) { + char *ioc_test = getenv("ZFS_IOC_TEST"); + unsigned int ioc_num = 0, ioc_err = 0; + + if (ioc_test != NULL && + sscanf(ioc_test, "%i:%i", &ioc_num, &ioc_err) == 2 && + ioc_num < ZFS_IOC_LAST) { + fail_ioc_cmd = ioc_num; + fail_ioc_err = ioc_err; + } + } +} +#endif + int libzfs_core_init(void) { @@ -111,6 +150,10 @@ libzfs_core_init(void) } } g_refcount++; + +#ifdef ZFS_DEBUG + libzfs_core_debug_ioc(); +#endif (void) pthread_mutex_unlock(&g_lock); return (0); @@ -146,6 +189,11 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name, ASSERT3S(g_refcount, >, 0); VERIFY3S(g_fd, !=, -1); + +#ifdef ZFS_DEBUG + if (ioc == fail_ioc_cmd) + return (fail_ioc_err); +#endif if (name != NULL) (void) strlcpy(zc.zc_name, name, sizeof (zc.zc_name)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jun 23 04:58:36 2020 (r362530) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jun 23 06:42:39 2020 (r362531) @@ -27,7 +27,7 @@ * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. + * Copyright (c) 2011, 2018 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -61,8 +61,9 @@ * * zfs_ioc_t ioc * The ioctl request number, which userland will pass to ioctl(2). - * The ioctl numbers can change from release to release, because - * the caller (libzfs) must be matched to the kernel. + * We want newer versions of libzfs and libzfs_core to run against + * existing zfs kernel modules (i.e. a deferred reboot after an update). + * Therefore the ioctl numbers cannot change from release to release. * * zfs_secpolicy_func_t *secpolicy * This function will be called before the zfs_ioc_func_t, to @@ -88,6 +89,10 @@ * Multiple checks can be or-ed together (e.g. POOL_CHECK_SUSPENDED | * POOL_CHECK_READONLY). * + * zfs_ioc_key_t *nvl_keys + * The list of expected/allowable innvl input keys. This list is used + * to validate the nvlist input to the ioctl. + * * boolean_t smush_outnvlist * If smush_outnvlist is true, then the output is presumed to be a * list of errors, and it will be "smushed" down to fit into the @@ -136,7 +141,17 @@ * use the outnvl if they succeed, because the caller can not * distinguish between the operation failing, and * deserialization failing. + * + * + * IOCTL Interface Errors + * + * The following ioctl input errors can be returned: + * ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel + * ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel + * ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing + * ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type */ + #ifdef __FreeBSD__ #include "opt_kstack_pages.h" #endif @@ -208,6 +223,10 @@ #include "lua.h" #include "lauxlib.h" +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) nitems(x) +#endif + static struct cdev *zfsdev; extern void zfs_init(void); @@ -222,7 +241,38 @@ typedef int zfs_ioc_legacy_func_t(zfs_cmd_t *); typedef int zfs_ioc_func_t(const char *, nvlist_t *, nvlist_t *); typedef int zfs_secpolicy_func_t(zfs_cmd_t *, nvlist_t *, cred_t *); +/* + * IOC Keys are used to document and validate user->kernel interface inputs. + * See zfs_keys_recv_new for an example declaration. Any key name that is not + * listed will be rejected as input. + * + * The keyname 'optional' is always allowed, and must be an nvlist if present. + * Arguments which older kernels can safely ignore can be placed under the + * "optional" key. + * + * When adding new keys to an existing ioc for new functionality, consider: + * - adding an entry into zfs_sysfs.c zfs_features[] list + * - updating the libzfs_input_check.c test utility + * + * Note: in the ZK_WILDCARDLIST case, the name serves as documentation + * for the expected name (bookmark, snapshot, property, etc) but there + * is no validation in the preflight zfs_check_input_nvpairs() check. + */ typedef enum { + ZK_OPTIONAL = 1 << 0, /* pair is optional */ + ZK_WILDCARDLIST = 1 << 1, /* one or more unspecified key names */ +} ioc_key_flag_t; + +/* DATA_TYPE_ANY is used when zkey_type can vary. */ +#define DATA_TYPE_ANY DATA_TYPE_UNKNOWN + +typedef struct zfs_ioc_key { + const char *zkey_name; + data_type_t zkey_type; + ioc_key_flag_t zkey_flags; +} zfs_ioc_key_t; + +typedef enum { NO_NAME, POOL_NAME, DATASET_NAME, @@ -244,6 +294,8 @@ typedef struct zfs_ioc_vec { zfs_ioc_poolcheck_t zvec_pool_check; boolean_t zvec_smush_outnvlist; const char *zvec_name; + const zfs_ioc_key_t *zvec_nvl_keys; + size_t zvec_nvl_key_count; } zfs_ioc_vec_t; /* This array is indexed by zfs_userquota_prop_t */ @@ -865,8 +917,8 @@ zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, nvlist_t *i nvpair_t *pair, *nextpair; int error = 0; - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) != 0) - return (SET_ERROR(EINVAL)); + snaps = fnvlist_lookup_nvlist(innvl, "snaps"); + for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nextpair) { nextpair = nvlist_next_nvpair(snaps, pair); @@ -1042,8 +1094,8 @@ zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t *innvl, int error; nvpair_t *pair; - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) != 0) - return (SET_ERROR(EINVAL)); + snaps = fnvlist_lookup_nvlist(innvl, "snaps"); + for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { char *name = nvpair_name(pair); @@ -1063,7 +1115,7 @@ zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t *innvl, } /* - * Check for permission to create each snapshot in the nvlist. + * Check for permission to create each bookmark in the nvlist. */ /* ARGSUSED */ static int @@ -1292,9 +1344,7 @@ zfs_secpolicy_hold(zfs_cmd_t *zc, nvlist_t *innvl, cre nvlist_t *holds; int error; - error = nvlist_lookup_nvlist(innvl, "holds", &holds); - if (error != 0) - return (SET_ERROR(EINVAL)); + holds = fnvlist_lookup_nvlist(innvl, "holds"); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { @@ -1349,12 +1399,14 @@ zfs_secpolicy_tmp_snapshot(zfs_cmd_t *zc, nvlist_t *in return (0); error = zfs_secpolicy_snapshot_perms(zc->zc_name, cr); - if (error == 0) - error = zfs_secpolicy_hold(zc, innvl, cr); - if (error == 0) - error = zfs_secpolicy_release(zc, innvl, cr); - if (error == 0) - error = zfs_secpolicy_destroy(zc, innvl, cr); + if (innvl != NULL) { + if (error == 0) + error = zfs_secpolicy_hold(zc, innvl, cr); + if (error == 0) + error = zfs_secpolicy_release(zc, innvl, cr); + if (error == 0) + error = zfs_secpolicy_destroy(zc, innvl, cr); + } return (error); } @@ -3309,6 +3361,13 @@ zfs_fill_zplprops_root(uint64_t spa_vers, nvlist_t *cr * * outnvl: propname -> error code (int32) */ + +static const zfs_ioc_key_t zfs_keys_create[] = { + {"type", DATA_TYPE_INT32, 0}, + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, + {"hidden_args", DATA_TYPE_NVLIST, ZK_OPTIONAL}, +}; + static int zfs_ioc_create(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -3316,13 +3375,10 @@ zfs_ioc_create(const char *fsname, nvlist_t *innvl, nv zfs_creat_t zct = { 0 }; nvlist_t *nvprops = NULL; void (*cbfunc)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx); - int32_t type32; dmu_objset_type_t type; boolean_t is_insensitive = B_FALSE; - if (nvlist_lookup_int32(innvl, "type", &type32) != 0) - return (SET_ERROR(EINVAL)); - type = type32; + type = (dmu_objset_type_t)fnvlist_lookup_int32(innvl, "type"); (void) nvlist_lookup_nvlist(innvl, "props", &nvprops); switch (type) { @@ -3427,6 +3483,12 @@ zfs_ioc_create(const char *fsname, nvlist_t *innvl, nv * * outnvl: propname -> error code (int32) */ +static const zfs_ioc_key_t zfs_keys_clone[] = { + {"origin", DATA_TYPE_STRING, 0}, + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, + {"hidden_args", DATA_TYPE_NVLIST, ZK_OPTIONAL}, +}; + static int zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -3434,8 +3496,7 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvl nvlist_t *nvprops = NULL; char *origin_name; - if (nvlist_lookup_string(innvl, "origin", &origin_name) != 0) - return (SET_ERROR(EINVAL)); + origin_name = fnvlist_lookup_string(innvl, "origin"); (void) nvlist_lookup_nvlist(innvl, "props", &nvprops); if (strchr(fsname, '@') || @@ -3460,6 +3521,10 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvl return (error); } +static const zfs_ioc_key_t zfs_keys_remap[] = { + /* no nvl keys */ +}; + /* ARGSUSED */ static int zfs_ioc_remap(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3479,6 +3544,11 @@ zfs_ioc_remap(const char *fsname, nvlist_t *innvl, nvl * * outnvl: snapshot -> error code (int32) */ +static const zfs_ioc_key_t zfs_keys_snapshot[] = { + {"snaps", DATA_TYPE_NVLIST, 0}, + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, +}; + static int zfs_ioc_snapshot(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -3494,8 +3564,7 @@ zfs_ioc_snapshot(const char *poolname, nvlist_t *innvl if ((error = zfs_check_userprops(props)) != 0) return (error); - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) != 0) - return (SET_ERROR(EINVAL)); + snaps = fnvlist_lookup_nvlist(innvl, "snaps"); poollen = strlen(poolname); for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { @@ -3546,6 +3615,10 @@ zfs_ioc_snapshot(const char *poolname, nvlist_t *innvl /* * innvl: "message" -> string */ +static const zfs_ioc_key_t zfs_keys_log_history[] = { + {"message", DATA_TYPE_STRING, 0}, +}; + /* ARGSUSED */ static int zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) @@ -3569,10 +3642,7 @@ zfs_ioc_log_history(const char *unused, nvlist_t *innv if (error != 0) return (error); - if (nvlist_lookup_string(innvl, "message", &message) != 0) { - spa_close(spa, FTAG); - return (SET_ERROR(EINVAL)); - } + message = fnvlist_lookup_string(innvl, "message"); if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY) { spa_close(spa, FTAG); @@ -3585,6 +3655,10 @@ zfs_ioc_log_history(const char *unused, nvlist_t *innv } #ifdef __FreeBSD__ +static const zfs_ioc_key_t zfs_keys_nextboot[] = { + {"command", DATA_TYPE_STRING, 0}, +}; + static int zfs_ioc_nextboot(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) { @@ -3602,9 +3676,7 @@ zfs_ioc_nextboot(const char *unused, nvlist_t *innvl, if (nvlist_lookup_uint64(innvl, ZPOOL_CONFIG_GUID, &vdev_guid) != 0) return (EINVAL); - if (nvlist_lookup_string(innvl, - "command", &command) != 0) - return (EINVAL); + command = fnvlist_lookup_string(innvl, "command"); mutex_enter(&spa_namespace_lock); spa = spa_by_guid(pool_guid, vdev_guid); @@ -3721,6 +3793,11 @@ zfs_destroy_unmount_origin(const char *fsname) * outnvl: snapshot -> error code (int32) * */ +static const zfs_ioc_key_t zfs_keys_destroy_snaps[] = { + {"snaps", DATA_TYPE_NVLIST, 0}, + {"defer", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, +}; + /* ARGSUSED */ static int zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3730,8 +3807,7 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t * nvpair_t *pair; boolean_t defer; - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) != 0) - return (SET_ERROR(EINVAL)); + snaps = fnvlist_lookup_nvlist(innvl, "snaps"); defer = nvlist_exists(innvl, "defer"); poollen = strlen(poolname); @@ -3764,6 +3840,10 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t * * outnvl: bookmark -> error code (int32) * */ +static const zfs_ioc_key_t zfs_keys_bookmark[] = { + {"...", DATA_TYPE_STRING, ZK_WILDCARDLIST}, +}; + /* ARGSUSED */ static int zfs_ioc_bookmark(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3801,6 +3881,10 @@ zfs_ioc_bookmark(const char *poolname, nvlist_t *innvl * } * */ +static const zfs_ioc_key_t zfs_keys_get_bookmarks[] = { + {"...", DATA_TYPE_BOOLEAN, ZK_WILDCARDLIST | ZK_OPTIONAL}, +}; + static int zfs_ioc_get_bookmarks(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -3815,6 +3899,10 @@ zfs_ioc_get_bookmarks(const char *fsname, nvlist_t *in * outnvl: bookmark -> error code (int32) * */ +static const zfs_ioc_key_t zfs_keys_destroy_bookmarks[] = { + {"...", DATA_TYPE_BOOLEAN, ZK_WILDCARDLIST}, +}; + static int zfs_ioc_destroy_bookmarks(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3847,6 +3935,14 @@ zfs_ioc_destroy_bookmarks(const char *poolname, nvlist return (error); } +static const zfs_ioc_key_t zfs_keys_channel_program[] = { + {"program", DATA_TYPE_STRING, 0}, + {"arg", DATA_TYPE_ANY, 0}, + {"sync", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, + {"instrlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, + {"memlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, +}; + static int zfs_ioc_channel_program(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3856,9 +3952,7 @@ zfs_ioc_channel_program(const char *poolname, nvlist_t boolean_t sync_flag; nvpair_t *nvarg = NULL; - if (0 != nvlist_lookup_string(innvl, ZCP_ARG_PROGRAM, &program)) { - return (EINVAL); - } + program = fnvlist_lookup_string(innvl, ZCP_ARG_PROGRAM); if (0 != nvlist_lookup_boolean_value(innvl, ZCP_ARG_SYNC, &sync_flag)) { sync_flag = B_TRUE; } @@ -3868,9 +3962,7 @@ zfs_ioc_channel_program(const char *poolname, nvlist_t if (0 != nvlist_lookup_uint64(innvl, ZCP_ARG_MEMLIMIT, &memlimit)) { memlimit = ZCP_DEFAULT_MEMLIMIT; } - if (0 != nvlist_lookup_nvpair(innvl, ZCP_ARG_ARGLIST, &nvarg)) { - return (EINVAL); - } + nvarg = fnvlist_lookup_nvpair(innvl, ZCP_ARG_ARGLIST); if (instrlimit == 0 || instrlimit > zfs_lua_max_instrlimit) return (EINVAL); @@ -3885,6 +3977,10 @@ zfs_ioc_channel_program(const char *poolname, nvlist_t * innvl: unused * outnvl: empty */ +static const zfs_ioc_key_t zfs_keys_pool_checkpoint[] = { + /* no nvl keys */ +}; + /* ARGSUSED */ static int zfs_ioc_pool_checkpoint(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) @@ -3896,6 +3992,10 @@ zfs_ioc_pool_checkpoint(const char *poolname, nvlist_t * innvl: unused * outnvl: empty */ +static const zfs_ioc_key_t zfs_keys_pool_discard_checkpoint[] = { + /* no nvl keys */ +}; + /* ARGSUSED */ static int zfs_ioc_pool_discard_checkpoint(const char *poolname, nvlist_t *innvl, @@ -3955,6 +4055,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) * } * */ +static const zfs_ioc_key_t zfs_keys_pool_initialize[] = { + {ZPOOL_INITIALIZE_COMMAND, DATA_TYPE_UINT64, 0}, + {ZPOOL_INITIALIZE_VDEVS, DATA_TYPE_NVLIST, 0} +}; + static int zfs_ioc_pool_initialize(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -4020,6 +4125,10 @@ zfs_ioc_pool_initialize(const char *poolname, nvlist_t * outnvl: "target" -> name of most recent snapshot * } */ +static const zfs_ioc_key_t zfs_keys_rollback[] = { + {"target", DATA_TYPE_STRING, ZK_OPTIONAL}, +}; + /* ARGSUSED */ static int zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) @@ -5167,13 +5276,33 @@ zfs_ioc_clear(zfs_cmd_t *zc) return (error); } +/* + * Reopen all the vdevs associated with the pool. + * + * innvl: { + * "scrub_restart" -> when true and scrub is running, allow to restart + * scrub as the side effect of the reopen (boolean). + * } + * + * outnvl is unused + */ +static const zfs_ioc_key_t zfs_keys_pool_reopen[] = { + {"scrub_restart", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, +}; + static int -zfs_ioc_pool_reopen(zfs_cmd_t *zc) +zfs_ioc_pool_reopen(const char *pool, nvlist_t *innvl, nvlist_t *outnvl) { spa_t *spa; int error; + boolean_t scrub_restart = B_TRUE; - error = spa_open(zc->zc_name, &spa, FTAG); + if (innvl) { + scrub_restart = fnvlist_lookup_boolean_value(innvl, + "scrub_restart"); + } + + error = spa_open(pool, &spa, FTAG); if (error != 0) return (error); @@ -5185,7 +5314,8 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) * the scan as a side effect of the reopen. Otherwise, let * vdev_open() decided if a resilver is required. */ - spa->spa_scrub_reopen = dsl_scan_resilvering(spa->spa_dsl_pool); + spa->spa_scrub_reopen = (!scrub_restart && + dsl_scan_resilvering(spa->spa_dsl_pool)); vdev_reopen(spa->spa_root_vdev); spa->spa_scrub_reopen = B_FALSE; @@ -5193,6 +5323,7 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) spa_close(spa, FTAG); return (0); } + /* * inputs: * zc_name name of filesystem @@ -5789,6 +5920,11 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc) * ... * } */ +static const zfs_ioc_key_t zfs_keys_hold[] = { + {"holds", DATA_TYPE_NVLIST, 0}, + {"cleanup_fd", DATA_TYPE_INT32, ZK_OPTIONAL}, +}; + /* ARGSUSED */ static int zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist) @@ -5799,9 +5935,7 @@ zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_ int error; minor_t minor = 0; - error = nvlist_lookup_nvlist(args, "holds", &holds); - if (error != 0) - return (SET_ERROR(EINVAL)); + holds = fnvlist_lookup_nvlist(args, "holds"); /* make sure the user didn't pass us any invalid (empty) tags */ for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; @@ -5836,11 +5970,14 @@ zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_ * ... * } */ +static const zfs_ioc_key_t zfs_keys_get_holds[] = { + /* no nvl keys */ +}; + /* ARGSUSED */ static int zfs_ioc_get_holds(const char *snapname, nvlist_t *args, nvlist_t *outnvl) { - ASSERT3P(args, ==, NULL); return (dsl_dataset_get_holds(snapname, outnvl)); } @@ -5855,6 +5992,10 @@ zfs_ioc_get_holds(const char *snapname, nvlist_t *args * ... * } */ +static const zfs_ioc_key_t zfs_keys_release[] = { + {"...", DATA_TYPE_NVLIST, ZK_WILDCARDLIST}, +}; + /* ARGSUSED */ static int zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist) @@ -5913,6 +6054,10 @@ zfs_ioc_space_written(zfs_cmd_t *zc) * "uncompressed" -> uncompressed space in bytes * } */ +static const zfs_ioc_key_t zfs_keys_space_snaps[] = { + {"firstsnap", DATA_TYPE_STRING, 0}, +}; + static int zfs_ioc_space_snaps(const char *lastsnap, nvlist_t *innvl, nvlist_t *outnvl) { @@ -5922,8 +6067,7 @@ zfs_ioc_space_snaps(const char *lastsnap, nvlist_t *in char *firstsnap; uint64_t used, comp, uncomp; - if (nvlist_lookup_string(innvl, "firstsnap", &firstsnap) != 0) - return (SET_ERROR(EINVAL)); + firstsnap = fnvlist_lookup_string(innvl, "firstsnap"); error = dsl_pool_hold(lastsnap, FTAG, &dp); if (error != 0) @@ -5991,6 +6135,17 @@ zfs_ioc_unjail(zfs_cmd_t *zc) * * outnvl is unused */ +static const zfs_ioc_key_t zfs_keys_send_new[] = { + {"fd", DATA_TYPE_INT32, 0}, + {"fromsnap", DATA_TYPE_STRING, ZK_OPTIONAL}, + {"largeblockok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"embedok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"compressok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"resume_object", DATA_TYPE_UINT64, ZK_OPTIONAL}, + {"resume_offset", DATA_TYPE_UINT64, ZK_OPTIONAL}, +}; + /* ARGSUSED */ static int zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) @@ -6006,9 +6161,7 @@ zfs_ioc_send_new(const char *snapname, nvlist_t *innvl uint64_t resumeobj = 0; uint64_t resumeoff = 0; - error = nvlist_lookup_int32(innvl, "fd", &fd); - if (error != 0) - return (SET_ERROR(EINVAL)); + fd = fnvlist_lookup_int32(innvl, "fd"); (void) nvlist_lookup_string(innvl, "fromsnap", &fromname); @@ -6065,6 +6218,15 @@ zfs_ioc_send_new(const char *snapname, nvlist_t *innvl * "space" -> bytes of space (uint64) * } */ +static const zfs_ioc_key_t zfs_keys_send_space[] = { + {"from", DATA_TYPE_STRING, ZK_OPTIONAL}, + {"fromsnap", DATA_TYPE_STRING, ZK_OPTIONAL}, + {"largeblockok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"embedok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"compressok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, + {"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, +}; + static int zfs_ioc_send_space(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) { @@ -6153,6 +6315,10 @@ out: * * onvl is unused */ +static const zfs_ioc_key_t zfs_keys_pool_sync[] = { + {"force", DATA_TYPE_BOOLEAN_VALUE, 0}, +}; + /* ARGSUSED */ static int zfs_ioc_pool_sync(const char *pool, nvlist_t *innvl, nvlist_t *onvl) @@ -6206,7 +6372,7 @@ static void zfs_ioctl_register(const char *name, zfs_ioc_t ioc, zfs_ioc_func_t *func, zfs_secpolicy_func_t *secpolicy, zfs_ioc_namecheck_t namecheck, zfs_ioc_poolcheck_t pool_check, boolean_t smush_outnvlist, - boolean_t allow_log) + boolean_t allow_log, const zfs_ioc_key_t *nvl_keys, size_t num_keys) { zfs_ioc_vec_t *vec = &zfs_ioc_vec[ioc - ZFS_IOC_FIRST]; @@ -6225,6 +6391,8 @@ zfs_ioctl_register(const char *name, zfs_ioc_t ioc, zf vec->zvec_pool_check = pool_check; vec->zvec_smush_outnvlist = smush_outnvlist; vec->zvec_allow_log = allow_log; + vec->zvec_nvl_keys = nvl_keys; + vec->zvec_nvl_key_count = num_keys; } static void @@ -6287,89 +6455,115 @@ zfs_ioctl_init(void) { zfs_ioctl_register("snapshot", ZFS_IOC_SNAPSHOT, zfs_ioc_snapshot, zfs_secpolicy_snapshot, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_snapshot, ARRAY_SIZE(zfs_keys_snapshot)); zfs_ioctl_register("log_history", ZFS_IOC_LOG_HISTORY, zfs_ioc_log_history, zfs_secpolicy_log_history, NO_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_FALSE, + zfs_keys_log_history, ARRAY_SIZE(zfs_keys_log_history)); zfs_ioctl_register("space_snaps", ZFS_IOC_SPACE_SNAPS, zfs_ioc_space_snaps, zfs_secpolicy_read, DATASET_NAME, - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, + zfs_keys_space_snaps, ARRAY_SIZE(zfs_keys_space_snaps)); zfs_ioctl_register("send", ZFS_IOC_SEND_NEW, zfs_ioc_send_new, zfs_secpolicy_send_new, DATASET_NAME, - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, + zfs_keys_send_new, ARRAY_SIZE(zfs_keys_send_new)); zfs_ioctl_register("send_space", ZFS_IOC_SEND_SPACE, zfs_ioc_send_space, zfs_secpolicy_read, DATASET_NAME, - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, + zfs_keys_send_space, ARRAY_SIZE(zfs_keys_send_space)); zfs_ioctl_register("create", ZFS_IOC_CREATE, zfs_ioc_create, zfs_secpolicy_create_clone, DATASET_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_create, ARRAY_SIZE(zfs_keys_create)); zfs_ioctl_register("clone", ZFS_IOC_CLONE, zfs_ioc_clone, zfs_secpolicy_create_clone, DATASET_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_clone, ARRAY_SIZE(zfs_keys_clone)); zfs_ioctl_register("remap", ZFS_IOC_REMAP, zfs_ioc_remap, zfs_secpolicy_remap, DATASET_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE, + zfs_keys_remap, ARRAY_SIZE(zfs_keys_remap)); zfs_ioctl_register("destroy_snaps", ZFS_IOC_DESTROY_SNAPS, zfs_ioc_destroy_snaps, zfs_secpolicy_destroy_snaps, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_destroy_snaps, ARRAY_SIZE(zfs_keys_destroy_snaps)); zfs_ioctl_register("hold", ZFS_IOC_HOLD, zfs_ioc_hold, zfs_secpolicy_hold, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_hold, ARRAY_SIZE(zfs_keys_hold)); zfs_ioctl_register("release", ZFS_IOC_RELEASE, zfs_ioc_release, zfs_secpolicy_release, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_release, ARRAY_SIZE(zfs_keys_release)); zfs_ioctl_register("get_holds", ZFS_IOC_GET_HOLDS, zfs_ioc_get_holds, zfs_secpolicy_read, DATASET_NAME, - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, + zfs_keys_get_holds, ARRAY_SIZE(zfs_keys_get_holds)); zfs_ioctl_register("rollback", ZFS_IOC_ROLLBACK, zfs_ioc_rollback, zfs_secpolicy_rollback, DATASET_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE, + zfs_keys_rollback, ARRAY_SIZE(zfs_keys_rollback)); zfs_ioctl_register("bookmark", ZFS_IOC_BOOKMARK, zfs_ioc_bookmark, zfs_secpolicy_bookmark, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_bookmark, ARRAY_SIZE(zfs_keys_bookmark)); zfs_ioctl_register("get_bookmarks", ZFS_IOC_GET_BOOKMARKS, zfs_ioc_get_bookmarks, zfs_secpolicy_read, DATASET_NAME, - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, + zfs_keys_get_bookmarks, ARRAY_SIZE(zfs_keys_get_bookmarks)); zfs_ioctl_register("destroy_bookmarks", ZFS_IOC_DESTROY_BOOKMARKS, zfs_ioc_destroy_bookmarks, zfs_secpolicy_destroy_bookmarks, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_destroy_bookmarks, + ARRAY_SIZE(zfs_keys_destroy_bookmarks)); zfs_ioctl_register("channel_program", ZFS_IOC_CHANNEL_PROGRAM, zfs_ioc_channel_program, zfs_secpolicy_config, POOL_NAME, POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, - B_TRUE); + B_TRUE, zfs_keys_channel_program, + ARRAY_SIZE(zfs_keys_channel_program)); zfs_ioctl_register("zpool_checkpoint", ZFS_IOC_POOL_CHECKPOINT, zfs_ioc_pool_checkpoint, zfs_secpolicy_config, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_pool_checkpoint, ARRAY_SIZE(zfs_keys_pool_checkpoint)); zfs_ioctl_register("zpool_discard_checkpoint", ZFS_IOC_POOL_DISCARD_CHECKPOINT, zfs_ioc_pool_discard_checkpoint, zfs_secpolicy_config, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, + zfs_keys_pool_discard_checkpoint, + ARRAY_SIZE(zfs_keys_pool_discard_checkpoint)); zfs_ioctl_register("initialize", ZFS_IOC_POOL_INITIALIZE, zfs_ioc_pool_initialize, zfs_secpolicy_config, POOL_NAME, - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jun 23 07:33:30 2020 Return-Path: Delivered-To: svn-src-head@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 2FD6F34C79D; Tue, 23 Jun 2020 07:33:30 +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.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 49rdLL0Wgpz48Jk; Tue, 23 Jun 2020 07:33:30 +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 0CFAA1C9D8; Tue, 23 Jun 2020 07:33:30 +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 05N7XTSs022652; Tue, 23 Jun 2020 07:33:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N7XTVU022650; Tue, 23 Jun 2020 07:33:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <202006230733.05N7XTVU022650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 23 Jun 2020 07:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362532 - in head/sys/dev/cxgbe: . crypto X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . crypto X-SVN-Commit-Revision: 362532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 07:33:30 -0000 Author: np Date: Tue Jun 23 07:33:29 2020 New Revision: 362532 URL: https://svnweb.freebsd.org/changeset/base/362532 Log: cxgbe(4): Add a tx_len16_to_desc helper. No functional change. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/crypto/t4_kern_tls.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue Jun 23 06:42:39 2020 (r362531) +++ head/sys/dev/cxgbe/adapter.h Tue Jun 23 07:33:29 2020 (r362532) @@ -1347,4 +1347,12 @@ write_via_memwin(struct adapter *sc, int idx, uint32_t return (rw_via_memwin(sc, idx, addr, (void *)(uintptr_t)val, len, 1)); } + +/* Number of len16 -> number of descriptors */ +static inline int +tx_len16_to_desc(int len16) +{ + + return (howmany(len16, EQ_ESIZE / 16)); +} #endif Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Tue Jun 23 06:42:39 2020 (r362531) +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Tue Jun 23 07:33:29 2020 (r362532) @@ -1375,7 +1375,7 @@ ktls_write_tcp_options(struct sge_txq *txq, void *dst, pktlen = m->m_len; ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; len16 = howmany(sizeof(struct fw_eth_tx_pkt_wr) + ctrl, 16); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -1475,7 +1475,7 @@ ktls_write_tunnel_packet(struct sge_txq *txq, void *ds pktlen = m->m_len + m_tls->m_len; ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; len16 = howmany(sizeof(struct fw_eth_tx_pkt_wr) + ctrl, 16); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -2116,7 +2116,7 @@ ktls_write_tcp_fin(struct sge_txq *txq, void *dst, str pktlen = m->m_len; ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; len16 = howmany(sizeof(struct fw_eth_tx_pkt_wr) + ctrl, 16); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Jun 23 06:42:39 2020 (r362531) +++ head/sys/dev/cxgbe/t4_sge.c Tue Jun 23 07:33:29 2020 (r362532) @@ -2708,7 +2708,7 @@ start_wrq_wr(struct sge_wrq *wrq, int len16, struct wr void *w; MPASS(len16 > 0); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc > 0 && ndesc <= SGE_MAX_WR_NDESC); EQ_LOCK(eq); @@ -2920,10 +2920,9 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) M_ASSERTPKTHDR(m0); MPASS(m0->m_nextpkt == NULL); - if (available < howmany(mbuf_len16(m0), EQ_ESIZE / 16)) { - MPASS(howmany(mbuf_len16(m0), EQ_ESIZE / 16) <= 64); + if (available < tx_len16_to_desc(mbuf_len16(m0))) { available += reclaim_tx_descs(txq, 64); - if (available < howmany(mbuf_len16(m0), EQ_ESIZE / 16)) + if (available < tx_len16_to_desc(mbuf_len16(m0))) break; /* out of descriptors */ } @@ -4678,7 +4677,7 @@ write_txpkt_vm_wr(struct adapter *sc, struct sge_txq * ctrl = sizeof(struct cpl_tx_pkt_core); if (needs_tso(m0)) ctrl += sizeof(struct cpl_tx_pkt_lso_core); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -4789,7 +4788,7 @@ write_raw_wr(struct sge_txq *txq, void *wr, struct mbu int len16, ndesc; len16 = mbuf_len16(m0); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); dst = wr; @@ -4842,7 +4841,7 @@ write_txpkt_wr(struct adapter *sc, struct sge_txq *txq sizeof(struct cpl_tx_pkt_core) + pktlen, 16); nsegs = 0; } - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -4948,7 +4947,7 @@ try_txpkts(struct mbuf *m, struct mbuf *n, struct txpk l2 = txpkts0_len16(nsegs2); } txp->len16 = howmany(sizeof(struct fw_eth_tx_pkts_wr), 16) + l1 + l2; - needed = howmany(txp->len16, EQ_ESIZE / 16); + needed = tx_len16_to_desc(txp->len16); if (needed > SGE_MAX_WR_NDESC || needed > available) return (1); @@ -4985,7 +4984,7 @@ add_to_txpkts(struct mbuf *m, struct txpkts *txp, u_in len16 = txpkts0_len16(nsegs); else len16 = txpkts1_len16(); - needed = howmany(txp->len16 + len16, EQ_ESIZE / 16); + needed = tx_len16_to_desc(txp->len16 + len16); if (needed > SGE_MAX_WR_NDESC || needed > available) return (1); @@ -5026,7 +5025,7 @@ write_txpkts_wr(struct adapter *sc, struct sge_txq *tx MPASS(txp->len16 <= howmany(SGE_MAX_WR_LEN, 16)); MPASS(available > 0 && available < eq->sidx); - ndesc = howmany(txp->len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(txp->len16); MPASS(ndesc <= available); MPASS(wr == (void *)&eq->desc[eq->pidx]); From owner-svn-src-head@freebsd.org Tue Jun 23 07:48:49 2020 Return-Path: Delivered-To: svn-src-head@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 2463A34CC45; Tue, 23 Jun 2020 07:48:49 +0000 (UTC) (envelope-from fernape@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 49rdh106kVz49Cj; Tue, 23 Jun 2020 07:48:49 +0000 (UTC) (envelope-from fernape@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 F384B1C9ED; Tue, 23 Jun 2020 07:48:48 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N7mmru028967; Tue, 23 Jun 2020 07:48:48 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N7mmae028966; Tue, 23 Jun 2020 07:48:48 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006230748.05N7mmae028966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 23 Jun 2020 07:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362533 - head/usr.bin/hexdump X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/hexdump X-SVN-Commit-Revision: 362533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 07:48:49 -0000 Author: fernape (ports committer) Date: Tue Jun 23 07:48:48 2020 New Revision: 362533 URL: https://svnweb.freebsd.org/changeset/base/362533 Log: od(1): Add EXAMPLES section * Add two small examples showing the use of -a, -c, -j and -N * While here, remove obsolete .Tn reported by mandoc(1) Approved by: 0mp@ Differential Revision: https://reviews.freebsd.org/D25372 Modified: head/usr.bin/hexdump/od.1 Modified: head/usr.bin/hexdump/od.1 ============================================================================== --- head/usr.bin/hexdump/od.1 Tue Jun 23 07:33:29 2020 (r362532) +++ head/usr.bin/hexdump/od.1 Tue Jun 23 07:48:48 2020 (r362533) @@ -143,7 +143,7 @@ is a string containing one or more of the following ki .Bl -tag -width indent .It Cm a Named characters -.Pq Tn ASCII . +.Pq ASCII . Control characters are displayed using the following names: .Bl -column "000 NUL" "001 SOH" "002 STX" "003 ETX" "004 EOT" "005 ENQ" .It "000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ" @@ -243,6 +243,24 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Dump stdin and show the output using named characters and C-style escaped +characters: +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | od -a -c +0000000 F r e e B S D : sp T h e sp p o w + F r e e B S D : T h e p o w +0000020 e r sp t o sp s e r v e nl + e r t o s e r v e \en +0000034 +.Ed +.Pp +Dump stdin skipping the first 13 bytes using named characters and dumping no +more than 5 bytes: +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | od -An -a -j 13 -N 5 + p o w e r +.Ed .Sh COMPATIBILITY The traditional .Fl s From owner-svn-src-head@freebsd.org Tue Jun 23 10:05:07 2020 Return-Path: Delivered-To: svn-src-head@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 9E0DD350187; Tue, 23 Jun 2020 10:05:07 +0000 (UTC) (envelope-from fernape@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 49rhjH3dz3z4JHY; Tue, 23 Jun 2020 10:05:07 +0000 (UTC) (envelope-from fernape@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 779701EAAB; Tue, 23 Jun 2020 10:05:07 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NA57Oo015086; Tue, 23 Jun 2020 10:05:07 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NA57bs015085; Tue, 23 Jun 2020 10:05:07 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006231005.05NA57bs015085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 23 Jun 2020 10:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362534 - head/usr.bin/tee X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/tee X-SVN-Commit-Revision: 362534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:05:07 -0000 Author: fernape (ports committer) Date: Tue Jun 23 10:05:07 2020 New Revision: 362534 URL: https://svnweb.freebsd.org/changeset/base/362534 Log: tee(1): Add EXAMPLES section Add one simple example Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25337 Modified: head/usr.bin/tee/tee.1 Modified: head/usr.bin/tee/tee.1 ============================================================================== --- head/usr.bin/tee/tee.1 Tue Jun 23 07:48:48 2020 (r362533) +++ head/usr.bin/tee/tee.1 Tue Jun 23 10:05:07 2020 (r362534) @@ -31,7 +31,7 @@ .\" @(#)tee.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 18, 2020 +.Dd June 23, 2020 .Dt TEE 1 .Os .Sh NAME @@ -75,7 +75,9 @@ option. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -Send echoed message both to stdout and to the greetings file: +Send echoed message both to stdout and to the +.Pa greetings.txt +file: .Bd -literal -offset indent $ echo "Hello" | tee greetings.txt Hello From owner-svn-src-head@freebsd.org Tue Jun 23 10:15:09 2020 Return-Path: Delivered-To: svn-src-head@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 9164935074E; Tue, 23 Jun 2020 10:15:09 +0000 (UTC) (envelope-from fernape@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 49rhws3LKBz4KC3; Tue, 23 Jun 2020 10:15:09 +0000 (UTC) (envelope-from fernape@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 699E11EE0C; Tue, 23 Jun 2020 10:15:09 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NAF9Bm020949; Tue, 23 Jun 2020 10:15:09 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NAF9Px020948; Tue, 23 Jun 2020 10:15:09 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006231015.05NAF9Px020948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 23 Jun 2020 10:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362535 - head/usr.bin/colrm X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/colrm X-SVN-Commit-Revision: 362535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:15:09 -0000 Author: fernape (ports committer) Date: Tue Jun 23 10:15:08 2020 New Revision: 362535 URL: https://svnweb.freebsd.org/changeset/base/362535 Log: colrm(1): Add EXAMPLES section Add a couple of simple examples Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25196 Modified: head/usr.bin/colrm/colrm.1 Modified: head/usr.bin/colrm/colrm.1 ============================================================================== --- head/usr.bin/colrm/colrm.1 Tue Jun 23 10:05:07 2020 (r362534) +++ head/usr.bin/colrm/colrm.1 Tue Jun 23 10:15:08 2020 (r362535) @@ -28,7 +28,7 @@ .\" @(#)colrm.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 2015 +.Dd June 23, 2020 .Dt COLRM 1 .Os .Sh NAME @@ -75,6 +75,26 @@ as described in .Xr environ 7 . .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Show columns below 3 (c) and above 5 (e) +.Bd -literal -offset indent +$ echo -e "abcdefgh\en12345678" | colrm 3 5 +abfgh +12678 +.Ed +.Pp +Specifying a start column bigger than the number of columns in the file is +allowed and shows all the columns: +.Bd -literal -offset indent +$ echo "abcdefgh" | colrm 100 +abcdefgh +.Ed +.Pp +Using 1 as start column will show nothing: +.Bd -literal -offset indent +$ echo "abcdefgh" | colrm 1 + +.Ed .Sh SEE ALSO .Xr awk 1 , .Xr column 1 , From owner-svn-src-head@freebsd.org Tue Jun 23 10:22:58 2020 Return-Path: Delivered-To: svn-src-head@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 F0F33350C37; Tue, 23 Jun 2020 10:22:58 +0000 (UTC) (envelope-from 0mp@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 49rj5t65hxz4KfG; Tue, 23 Jun 2020 10:22:58 +0000 (UTC) (envelope-from 0mp@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 CC9F71EF88; Tue, 23 Jun 2020 10:22:58 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NAMwwx027187; Tue, 23 Jun 2020 10:22:58 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NAMwSO027186; Tue, 23 Jun 2020 10:22:58 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006231022.05NAMwSO027186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 23 Jun 2020 10:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362536 - head/usr.bin/tee X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/tee X-SVN-Commit-Revision: 362536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:22:59 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 23 10:22:58 2020 New Revision: 362536 URL: https://svnweb.freebsd.org/changeset/base/362536 Log: tee.1: Add a missing article Modified: head/usr.bin/tee/tee.1 Modified: head/usr.bin/tee/tee.1 ============================================================================== --- head/usr.bin/tee/tee.1 Tue Jun 23 10:15:08 2020 (r362535) +++ head/usr.bin/tee/tee.1 Tue Jun 23 10:22:58 2020 (r362536) @@ -75,7 +75,7 @@ option. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -Send echoed message both to stdout and to the +Send the echoed message both to stdout and to the .Pa greetings.txt file: .Bd -literal -offset indent From owner-svn-src-head@freebsd.org Tue Jun 23 10:27:42 2020 Return-Path: Delivered-To: svn-src-head@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 67259350C50; Tue, 23 Jun 2020 10:27:42 +0000 (UTC) (envelope-from 0mp@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 49rjCL1zj8z4L4x; Tue, 23 Jun 2020 10:27:42 +0000 (UTC) (envelope-from 0mp@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 3F81C1EF8F; Tue, 23 Jun 2020 10:27:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NARgrG027440; Tue, 23 Jun 2020 10:27:42 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NARg5o027439; Tue, 23 Jun 2020 10:27:42 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006231027.05NARg5o027439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 23 Jun 2020 10:27:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362537 - head/usr.bin/colrm X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/colrm X-SVN-Commit-Revision: 362537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:27:42 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 23 10:27:41 2020 New Revision: 362537 URL: https://svnweb.freebsd.org/changeset/base/362537 Log: colrm.1: Add a missing colon Modified: head/usr.bin/colrm/colrm.1 Modified: head/usr.bin/colrm/colrm.1 ============================================================================== --- head/usr.bin/colrm/colrm.1 Tue Jun 23 10:22:58 2020 (r362536) +++ head/usr.bin/colrm/colrm.1 Tue Jun 23 10:27:41 2020 (r362537) @@ -76,7 +76,7 @@ as described in .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -Show columns below 3 (c) and above 5 (e) +Show columns below 3 (c) and above 5 (e): .Bd -literal -offset indent $ echo -e "abcdefgh\en12345678" | colrm 3 5 abfgh From owner-svn-src-head@freebsd.org Tue Jun 23 10:40:13 2020 Return-Path: Delivered-To: svn-src-head@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 C3207351229; Tue, 23 Jun 2020 10:40:13 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49rjTn2Cpvz4LXC; Tue, 23 Jun 2020 10:40:12 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 19B3F5F81CBD; Tue, 23 Jun 2020 13:40:10 +0300 (MSK) Received: from iva1-bc1861525829.qloud-c.yandex.net (iva1-bc1861525829.qloud-c.yandex.net [2a02:6b8:c0c:a0e:0:640:bc18:6152]) by mxback3j.mail.yandex.net (mxback/Yandex) with ESMTP id wVQakZMYCF-e9Z0TrKr; Tue, 23 Jun 2020 13:40:10 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1592908810; bh=KxH+vh+SlRFMM6QgQMWeVV/nsWzDaLvxTFqZMjBglKk=; h=In-Reply-To:From:To:Subject:Cc:Date:References:Message-ID; b=XC5nzgMpfC7QXr6yG3yJjt5QfyjU6T9lyZgnE5157YceuLdFQnASJ1/txZHfgjLqR cN/pPfpWxMJ9PoH4LvRZZkePprzK4UGWGGl75z7QhAE9sDqYxk11ryvPooAz899FsV 2fiEkywONGis6MY1ylUFg/LpgqrjwNx8jG5rXd7w= Received: by iva1-bc1861525829.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id MY52xOWiKj-e9Zu9MAC; Tue, 23 Jun 2020 13:40:09 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: svn commit: r362338 - in head: share/man/man4 sys/conf sys/kern sys/netinet sys/netinet6 sys/netipsec sys/netpfil/pf To: John Baldwin , Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006181932.05IJWZYH009560@repo.freebsd.org> <20200622011035.GG85944@raichu> <20200622220752.GB51374@raichu> <5fcb4de8-f4a6-54b4-067c-058bf2b43871@FreeBSD.org> From: "Andrey V. Elsukov" Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <271824e9-3454-e6fd-8bb0-c3c032832b26@yandex.ru> Date: Tue, 23 Jun 2020 13:39:38 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <5fcb4de8-f4a6-54b4-067c-058bf2b43871@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49rjTn2Cpvz4LXC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13238, ipnet:37.140.128.0/18, country:RU] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:40:13 -0000 On 23.06.2020 01:20, John Baldwin wrote: >> I tend to assume that a buildkernel of GENERIC without any special flags >> will always build all modules (except those not available for the target >> platform of course), so I was a bit surprised to see that this isn't the >> case for ipsec.ko. As Rodney pointed out it provides marginally better >> coverage against build breaks. If you think we can restore the old >> behaviour for ipsec without too much work I think it'd be reasonable to >> change that and compile sctp.ko even when "options SCTP" is configured. >> I can't spot any similar cases in sys/modules/Makefile with a bit of >> skimming. > > I don't think ipsec.ko is easily fixable when I looked at it. I think it > is fine to leave sctp.ko building as part of GENERIC though. Hi, I'm sorry, I missed these changes, but in the past there weren't any problems in building ipsec.ko module with/without any possible options. I'll try to look what happened and what can be do to fix this at the weekend. -- WBR, Andrey V. Elsukov From owner-svn-src-head@freebsd.org Tue Jun 23 10:56:15 2020 Return-Path: Delivered-To: svn-src-head@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 B942F35163D; Tue, 23 Jun 2020 10:56:15 +0000 (UTC) (envelope-from 0mp@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 49rjrH4JZbz4MN2; Tue, 23 Jun 2020 10:56:15 +0000 (UTC) (envelope-from 0mp@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 8ADE21F4AA; Tue, 23 Jun 2020 10:56:15 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NAuFX8045524; Tue, 23 Jun 2020 10:56:15 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NAuFEJ045523; Tue, 23 Jun 2020 10:56:15 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006231056.05NAuFEJ045523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 23 Jun 2020 10:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362538 - head/usr.sbin/service X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/service X-SVN-Commit-Revision: 362538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 10:56:15 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 23 10:56:15 2020 New Revision: 362538 URL: https://svnweb.freebsd.org/changeset/base/362538 Log: Fix a typo and sort options MFC after: 1 week Modified: head/usr.sbin/service/service.8 Modified: head/usr.sbin/service/service.8 ============================================================================== --- head/usr.sbin/service/service.8 Tue Jun 23 10:27:41 2020 (r362537) +++ head/usr.sbin/service/service.8 Tue Jun 23 10:56:15 2020 (r362538) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2018 +.Dd June 23, 2020 .Dt SERVICE 8 .Os .Sh NAME @@ -92,14 +92,14 @@ this is usually .Pa /usr/local/etc/rc.d . All files will be listed whether they are an actual rc.d script or not. +.It Fl R +Restart all enabled local services. .It Fl r Generate the .Xr rcorder 8 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. .El @@ -129,7 +129,7 @@ service -j dns named status service -rv .Ed .Pp -The following programmable completion entry can be use in +The following programmable completion entry can be used in .Xr bash 1 for the names of the rc.d scripts: .Bd -literal -offset -ident From owner-svn-src-head@freebsd.org Tue Jun 23 11:40:12 2020 Return-Path: Delivered-To: svn-src-head@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 664F6352679; Tue, 23 Jun 2020 11:40:12 +0000 (UTC) (envelope-from lwhsu@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 49rkq024P7z4Ppc; Tue, 23 Jun 2020 11:40:12 +0000 (UTC) (envelope-from lwhsu@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 3E23E1FE24; Tue, 23 Jun 2020 11:40:12 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NBeCrW070005; Tue, 23 Jun 2020 11:40:12 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NBeC4f070004; Tue, 23 Jun 2020 11:40:12 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006231140.05NBeC4f070004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 23 Jun 2020 11:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362539 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 362539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 11:40:12 -0000 Author: lwhsu Date: Tue Jun 23 11:40:11 2020 New Revision: 362539 URL: https://svnweb.freebsd.org/changeset/base/362539 Log: Mention CI system information in development(7) Approved by: 0mp, bcr MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25340 Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 ============================================================================== --- head/share/man/man7/development.7 Tue Jun 23 10:56:15 2020 (r362538) +++ head/share/man/man7/development.7 Tue Jun 23 11:40:11 2020 (r362539) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2019 +.Dd June 23, 2020 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -103,6 +103,14 @@ suggest improvements, and, eventually, allows them to commit it: .Pp .Lk https://reviews.FreeBSD.org +.Pp +To check the latest +.Fx +build and test status of CURRENT and STABLE branches, +the continuous integration system is at: +.Pp +.Lk https://ci.FreeBSD.org +.Pp .Sh EXAMPLES Check out the CURRENT branch, build it, and install, overwriting the current system: From owner-svn-src-head@freebsd.org Tue Jun 23 13:57:53 2020 Return-Path: Delivered-To: svn-src-head@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 B1A5A355CD3; Tue, 23 Jun 2020 13:57:53 +0000 (UTC) (envelope-from tychon@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 49rnss4DqDz4Ycx; Tue, 23 Jun 2020 13:57:53 +0000 (UTC) (envelope-from tychon@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 883AF21379; Tue, 23 Jun 2020 13:57:53 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NDvrvw055515; Tue, 23 Jun 2020 13:57:53 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NDvrGT055514; Tue, 23 Jun 2020 13:57:53 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <202006231357.05NDvrGT055514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Tue, 23 Jun 2020 13:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362540 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: tychon X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 13:57:53 -0000 Author: tychon Date: Tue Jun 23 13:57:53 2020 New Revision: 362540 URL: https://svnweb.freebsd.org/changeset/base/362540 Log: To avoid a startup script race change net.bpf.optimize_writers from CTLFLAG_RW to CTLFLAG_RWTUN to allow it to be modified by a loader tunable. Sponsored by: Dell EMC Isilon Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Jun 23 11:40:11 2020 (r362539) +++ head/sys/net/bpf.c Tue Jun 23 13:57:53 2020 (r362540) @@ -227,7 +227,7 @@ static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_ VNET_DEFINE_STATIC(int, bpf_optimize_writers) = 0; #define V_bpf_optimize_writers VNET(bpf_optimize_writers) -SYSCTL_INT(_net_bpf, OID_AUTO, optimize_writers, CTLFLAG_VNET | CTLFLAG_RW, +SYSCTL_INT(_net_bpf, OID_AUTO, optimize_writers, CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(bpf_optimize_writers), 0, "Do not send packets until BPF program is set"); From owner-svn-src-head@freebsd.org Tue Jun 23 15:14:55 2020 Return-Path: Delivered-To: svn-src-head@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 375823300CC; Tue, 23 Jun 2020 15:14:55 +0000 (UTC) (envelope-from thj@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 49rqZl0m9Wz3RW4; Tue, 23 Jun 2020 15:14:55 +0000 (UTC) (envelope-from thj@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 156B3225BC; Tue, 23 Jun 2020 15:14:55 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NFEs3D004681; Tue, 23 Jun 2020 15:14:54 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NFEs8f004680; Tue, 23 Jun 2020 15:14:54 GMT (envelope-from thj@FreeBSD.org) Message-Id: <202006231514.05NFEs8f004680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Tue, 23 Jun 2020 15:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362541 - head/usr.sbin/pkg X-SVN-Group: head X-SVN-Commit-Author: thj X-SVN-Commit-Paths: head/usr.sbin/pkg X-SVN-Commit-Revision: 362541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 15:14:55 -0000 Author: thj Date: Tue Jun 23 15:14:54 2020 New Revision: 362541 URL: https://svnweb.freebsd.org/changeset/base/362541 Log: pkg: Provide a friendlier message when bootstrap fails due to address resolution The current message when bootstapping pkg fails for any reason implies that pkg is not available. We have the error code from fetch so if bootstrap failed due to address resolution say so. Reviewed by: bapt, bz Approved by: bz (co-mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25323 Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Tue Jun 23 13:57:53 2020 (r362540) +++ head/usr.sbin/pkg/pkg.c Tue Jun 23 15:14:54 2020 (r362541) @@ -915,10 +915,15 @@ bootstrap_pkg(bool force) fetchfail: warnx("Error fetching %s: %s", url, fetchLastErrString); - fprintf(stderr, "A pre-built version of pkg could not be found for " - "your system.\n"); - fprintf(stderr, "Consider changing PACKAGESITE or installing it from " - "ports: 'ports-mgmt/pkg'.\n"); + if (fetchLastErrCode == FETCH_RESOLV) { + fprintf(stderr, "Address resolution failed for %s.\n", packagesite); + fprintf(stderr, "Consider changing PACKAGESITE.\n"); + } else { + fprintf(stderr, "A pre-built version of pkg could not be found for " + "your system.\n"); + fprintf(stderr, "Consider changing PACKAGESITE or installing it from " + "ports: 'ports-mgmt/pkg'.\n"); + } cleanup: if (fd_sig != -1) { From owner-svn-src-head@freebsd.org Tue Jun 23 15:32:06 2020 Return-Path: Delivered-To: svn-src-head@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 1421E3304DB; Tue, 23 Jun 2020 15:32:06 +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.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 49rqyY6bKbz3RtX; Tue, 23 Jun 2020 15:32:05 +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 DD8B522C05; Tue, 23 Jun 2020 15:32:05 +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 05NFW5gf016472; Tue, 23 Jun 2020 15:32:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NFW55r016471; Tue, 23 Jun 2020 15:32:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006231532.05NFW55r016471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 Jun 2020 15:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362542 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 362542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 15:32:06 -0000 Author: emaste Date: Tue Jun 23 15:32:05 2020 New Revision: 362542 URL: https://svnweb.freebsd.org/changeset/base/362542 Log: arm64 armreg.h: fix TCR_TBI1 definition Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D25411 Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Tue Jun 23 15:14:54 2020 (r362541) +++ head/sys/arm64/include/armreg.h Tue Jun 23 15:32:05 2020 (r362542) @@ -782,7 +782,7 @@ #define TCR_HA_SHIFT 39 #define TCR_HA (1UL << TCR_HA_SHIFT) #define TCR_TBI1_SHIFT 38 -#define TCR_TBI1 (1UL << TCR_TBI1_SHIFT +#define TCR_TBI1 (1UL << TCR_TBI1_SHIFT) #define TCR_TBI0_SHIFT 37 #define TCR_TBI0 (1U << TCR_TBI0_SHIFT) #define TCR_ASID_SHIFT 36 From owner-svn-src-head@freebsd.org Tue Jun 23 15:36:06 2020 Return-Path: Delivered-To: svn-src-head@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 6502E33080C; Tue, 23 Jun 2020 15:36:06 +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.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 49rr3B1vPmz3SdV; Tue, 23 Jun 2020 15:36:06 +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 382D522B9C; Tue, 23 Jun 2020 15:36:06 +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 05NFa6bM016738; Tue, 23 Jun 2020 15:36:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NFa67D016737; Tue, 23 Jun 2020 15:36:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006231536.05NFa67D016737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 23 Jun 2020 15:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362543 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 362543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 15:36:06 -0000 Author: emaste Date: Tue Jun 23 15:36:05 2020 New Revision: 362543 URL: https://svnweb.freebsd.org/changeset/base/362543 Log: ldconfig: remove i386 aout invocation aout support in ldconfig hasn't been required since FreeBSD 2.x. Anyone still using FreeBSD 2 shared libraries can use a FreeBSD 2 ldconfig to generate aout ldconfig hints. Reviewed by: dim, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24883 Modified: head/libexec/rc/rc.d/ldconfig Modified: head/libexec/rc/rc.d/ldconfig ============================================================================== --- head/libexec/rc/rc.d/ldconfig Tue Jun 23 15:32:05 2020 (r362542) +++ head/libexec/rc/rc.d/ldconfig Tue Jun 23 15:36:05 2020 (r362543) @@ -85,22 +85,6 @@ ldconfig_start() ${ldconfig} -soft ${_ins} ${_LDC} ;; esac - - # Legacy aout support for i386 only - case ${machine_arch} in - i386) - # Default the a.out ldconfig path. - : ${ldconfig_paths_aout=${ldconfig_paths}} - _LDC="" - for i in /usr/lib/aout ${ldconfig_paths_aout} /etc/ld.so.conf; do - if [ -r "${i}" ]; then - _LDC="${_LDC} ${i}" - fi - done - check_startmsgs && echo 'a.out ldconfig path:' ${_LDC} - ${ldconfig} -aout ${_ins} ${_LDC} - ;; - esac fi } From owner-svn-src-head@freebsd.org Tue Jun 23 16:30:00 2020 Return-Path: Delivered-To: svn-src-head@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 5AF7E332356; Tue, 23 Jun 2020 16:30:00 +0000 (UTC) (envelope-from freqlabs@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 49rsFN1ptcz3X5C; Tue, 23 Jun 2020 16:30:00 +0000 (UTC) (envelope-from freqlabs@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 3991123131; Tue, 23 Jun 2020 16:30:00 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NGU0es047937; Tue, 23 Jun 2020 16:30:00 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NGU0VQ047936; Tue, 23 Jun 2020 16:30:00 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006231630.05NGU0VQ047936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Tue, 23 Jun 2020 16:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362544 - head/lib/libdevdctl X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/lib/libdevdctl X-SVN-Commit-Revision: 362544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 16:30:00 -0000 Author: freqlabs Date: Tue Jun 23 16:29:59 2020 New Revision: 362544 URL: https://svnweb.freebsd.org/changeset/base/362544 Log: libdevdctl: Force full match of "timestamp" field name OpenZFS generates events with a "zio_timestamp" field, which gets mistaken for "timestamp" by libdevdctl due to imprecise string matching. Then later it is assumed a "timestamp" field exists when it doesn't and an exception is thrown. Add a space to the search string so we match exactly "timestamp" rather than anything with that as a suffix. Approved by: mav (mentor) MFC after: 3 days Sponsored by: iXsystems, Inc. Modified: head/lib/libdevdctl/event.cc Modified: head/lib/libdevdctl/event.cc ============================================================================== --- head/lib/libdevdctl/event.cc Tue Jun 23 15:36:05 2020 (r362543) +++ head/lib/libdevdctl/event.cc Tue Jun 23 16:29:59 2020 (r362544) @@ -427,7 +427,7 @@ Event::TimestampEventString(std::string &eventString) * Add a timestamp as the final field of the event if it is * not already present. */ - if (eventString.find("timestamp=") == string::npos) { + if (eventString.find(" timestamp=") == string::npos) { const size_t bufsize = 32; // Long enough for a 64-bit int timeval now; char timebuf[bufsize]; From owner-svn-src-head@freebsd.org Tue Jun 23 16:43:49 2020 Return-Path: Delivered-To: svn-src-head@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 2048F3328A5; Tue, 23 Jun 2020 16:43:49 +0000 (UTC) (envelope-from cem@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 49rsYJ74wvz3Y5C; Tue, 23 Jun 2020 16:43:48 +0000 (UTC) (envelope-from cem@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 EE4DF234D2; Tue, 23 Jun 2020 16:43:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NGhmKq060083; Tue, 23 Jun 2020 16:43:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NGhmpE060082; Tue, 23 Jun 2020 16:43:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006231643.05NGhmpE060082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 23 Jun 2020 16:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362545 - head/usr.bin/sort X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/sort X-SVN-Commit-Revision: 362545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 16:43:49 -0000 Author: cem Date: Tue Jun 23 16:43:48 2020 New Revision: 362545 URL: https://svnweb.freebsd.org/changeset/base/362545 Log: sort(1): Fix two wchar-related bugs in radixsort Sort(1)'s radixsort implementation was broken for multibyte LC_CTYPEs in at least two ways: * In actual radix sort, it would only bucket the least significant byte from each wchar, ignoring the 24 most-significant bits of each unicode character. * In degenerate cases / "fast paths," it would fall back to another sorting algorithm (default: mergesort) with a bogus comparator offset. The string comparison functions in sort(1) take an offset in units of the operating character size. However, radixsort was passing an offset in units of bytes. The byte offset must be divided by sizeof(wchar_t). This revision addresses both discovered issues. Some example testcases: $ (echo 耳 ; echo 脳 ; echo 耳) | \ LC_CTYPE=ja_JP.UTF-8 LC_COLLATE=C LANG=C sort --radixsort --debug $ (echo 耳 ; echo 脳 ; echo 耳) | \ LC_CTYPE=C LC_COLLATE=C LANG=C sort --radixsort --debug $ (for i in $(jot 34); do echo 耳耳耳耳耳; echo 耳耳耳耳脳; echo 耳耳耳耳脴; done) | \ LC_CTYPE=ja_JP.UTF-8 LC_COLLATE=C LANG=C sort --radixsort --debug PR: 247494 Reported by: knu MFC after: I do not intend to, but parties interested in stable might want to Modified: head/usr.bin/sort/radixsort.c Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Tue Jun 23 16:29:59 2020 (r362544) +++ head/usr.bin/sort/radixsort.c Tue Jun 23 16:43:48 2020 (r362545) @@ -258,14 +258,28 @@ add_leaf(struct sort_level *sl, struct sort_list_item static inline int get_wc_index(struct sort_list_item *sli, size_t level) { + const size_t wcfact = (MB_CUR_MAX == 1) ? 1 : sizeof(wchar_t); const struct key_value *kv; const struct bwstring *bws; kv = get_key_from_keys_array(&sli->ka, 0); bws = kv->k; - if ((BWSLEN(bws) > level)) - return (unsigned char) BWS_GET(bws,level); + if ((BWSLEN(bws) * wcfact > level)) { + wchar_t res; + + /* + * Sort wchar strings a byte at a time, rather than a single + * byte from each wchar. + */ + res = (wchar_t)BWS_GET(bws, level / wcfact); + /* Sort most-significant byte first. */ + if (level % wcfact < wcfact - 1) + res = (res >> (8 * (wcfact - 1 - (level % wcfact)))); + + return (res & 0xff); + } + return (-1); } @@ -317,6 +331,7 @@ free_sort_level(struct sort_level *sl) static void run_sort_level_next(struct sort_level *sl) { + const size_t wcfact = (MB_CUR_MAX == 1) ? 1 : sizeof(wchar_t); struct sort_level *slc; size_t i, sln, tosort_num; @@ -333,8 +348,16 @@ run_sort_level_next(struct sort_level *sl) sort_left_dec(1); goto end; case (2): + /* + * Radixsort only processes a single byte at a time. In wchar + * mode, this can be a subset of the length of a character. + * list_coll_offset() offset is in units of wchar, not bytes. + * So to calculate the offset, we must divide by + * sizeof(wchar_t) and round down to the index of the first + * character this level references. + */ if (list_coll_offset(&(sl->tosort[0]), &(sl->tosort[1]), - sl->level) > 0) { + sl->level / wcfact) > 0) { sl->sorted[sl->start_position++] = sl->tosort[1]; sl->sorted[sl->start_position] = sl->tosort[0]; } else { @@ -348,7 +371,13 @@ run_sort_level_next(struct sort_level *sl) if (TINY_NODE(sl) || (sl->level > 15)) { listcoll_t func; - func = get_list_call_func(sl->level); + /* + * Collate comparison offset is in units of + * character-width, so we must divide the level (bytes) + * by operating character width (wchar_t or char). See + * longer comment above. + */ + func = get_list_call_func(sl->level / wcfact); sl->leaves = sl->tosort; sl->leaves_num = sl->tosort_num; From owner-svn-src-head@freebsd.org Tue Jun 23 17:17:14 2020 Return-Path: Delivered-To: svn-src-head@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 10F7E333576; Tue, 23 Jun 2020 17:17:14 +0000 (UTC) (envelope-from mhorne@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 49rtHs6lTHz3b2k; Tue, 23 Jun 2020 17:17:13 +0000 (UTC) (envelope-from mhorne@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 E2EC923EAE; Tue, 23 Jun 2020 17:17:13 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NHHDPn078835; Tue, 23 Jun 2020 17:17:13 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NHHD5B078834; Tue, 23 Jun 2020 17:17:13 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006231717.05NHHD5B078834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 23 Jun 2020 17:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362546 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 362546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 17:17:14 -0000 Author: mhorne Date: Tue Jun 23 17:17:13 2020 New Revision: 362546 URL: https://svnweb.freebsd.org/changeset/base/362546 Log: arch(7): small corrections for RISC-V Document that RISC-V supports multiple page sizes: 4K, 2M, and 1G. RISC-V's long double is always 128-bits wide, therefore quad precision. Mention __riscv_float_abi_soft, which can be used to differentiate between riscv64 and riscv64sf in userland code. MFC after: 3 days Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Tue Jun 23 16:43:48 2020 (r362545) +++ head/share/man/man7/arch.7 Tue Jun 23 17:17:13 2020 (r362546) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2020 +.Dd June 23, 2020 .Dt ARCH 7 .Os .Sh NAME @@ -256,8 +256,8 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta 4K .It powerpcspe Ta 4K .It powerpc64 Ta 4K -.It riscv64 Ta 4K -.It riscv64sf Ta 4K +.It riscv64 Ta 4K, 2M, 1G +.It riscv64sf Ta 4K, 2M, 1G .El .Ss Floating Point .Bl -column -offset indent "Architecture" "float, double" "long double" @@ -279,8 +279,8 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta hard Ta hard, double precision .It powerpcspe Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision -.It riscv64 Ta hard Ta hard, double precision -.It riscv64sf Ta soft Ta soft, double precision +.It riscv64 Ta hard Ta hard, quad precision +.It riscv64sf Ta soft Ta soft, quad precision .El .Ss Default Tool Chain .Fx @@ -358,7 +358,7 @@ Architecture-specific macros: .It powerpcspe Ta Dv __powerpc__, Dv __SPE__ .It powerpc64 Ta Dv __powerpc__, Dv __powerpc64__ .It riscv64 Ta Dv __riscv, Dv __riscv_xlen == 64 -.It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64 +.It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64, Dv __riscv_float_abi_soft .El .Pp Compilers may define additional variants of architecture-specific macros. From owner-svn-src-head@freebsd.org Tue Jun 23 18:16:31 2020 Return-Path: Delivered-To: svn-src-head@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 6509B334FBD; Tue, 23 Jun 2020 18:16:31 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rvcH25bcz3fGf; Tue, 23 Jun 2020 18:16:31 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id DA7EA17F78; Tue, 23 Jun 2020 18:16:30 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-lj1-f177.google.com with SMTP id q19so24566465lji.2; Tue, 23 Jun 2020 11:16:30 -0700 (PDT) X-Gm-Message-State: AOAM532er/ACd+oewMa/+LzAvv0KF4u9BnFx5gTJZT7JNzpbMuErPlQ2 1XGhW5rirWXzF55Vik7uIKqzv2iOTjyjf11WeIs= X-Google-Smtp-Source: ABdhPJzv6uIXeAaoP5SXPxHZfxF5Ay1kUoAsO+/MowmTnze/kgb1QKSrJxfm3ZI3ZqIlniLRpyfaLi1UeUOho37pX5M= X-Received: by 2002:a2e:b611:: with SMTP id r17mr11574018ljn.321.1592936189120; Tue, 23 Jun 2020 11:16:29 -0700 (PDT) MIME-Version: 1.0 References: <202006230642.05N6gdF9092071@repo.freebsd.org> In-Reply-To: <202006230642.05N6gdF9092071@repo.freebsd.org> From: Matthew Macy Date: Tue, 23 Jun 2020 11:16:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362531 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzfs_core/common sys/cddl/contrib/opensolaris/uts/common/fs... To: Toomas Soome Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 18:16:31 -0000 Are you planning on MFCing this? That=E2=80=99s the main value to MFVs at t= his point. Thanks. On Mon, Jun 22, 2020 at 23:42 Toomas Soome wrote: > Author: tsoome > Date: Tue Jun 23 06:42:39 2020 > New Revision: 362531 > URL: https://svnweb.freebsd.org/changeset/base/362531 > > Log: > MFOpenZFS: Add basic zfs ioc input nvpair validation > > We want newer versions of libzfs_core to run against an existing > zfs kernel module (i.e. a deferred reboot or module reload after > an update). > > Programmatically document, via a zfs_ioc_key_t, the valid arguments > for the ioc commands that rely on nvpair input arguments (i.e. non > legacy commands from libzfs_core). Automatically verify the expected > pairs before dispatching a command. > > This initial phase focuses on the non-legacy ioctls. A follow-on > change can address the legacy ioctl input from the zfs_cmd_t. > > The zfs_ioc_key_t for zfs_keys_channel_program looks like: > > static const zfs_ioc_key_t zfs_keys_channel_program[] =3D { > {"program", DATA_TYPE_STRING, 0}, > {"arg", DATA_TYPE_UNKNOWN, 0}, > {"sync", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, > {"instrlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, > {"memlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, > }; > > Introduce four input errors to identify specific input failures > (in addition to generic argument value errors like EINVAL, ERANGE, > EBADF, and E2BIG). > > ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel > ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel > ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing > ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type > > Reviewed by: allanjude > Obtained from: OpenZFS > Sponsored by: Netflix, Klara Inc. > Differential Revision: https://reviews.freebsd.org/D25393 > > Modified: > head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c > head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h > > Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 23 > 04:58:36 2020 (r362530) > +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 23 > 06:42:39 2020 (r362531) > @@ -7235,7 +7235,7 @@ zfs_do_bookmark(int argc, char **argv) > fnvlist_free(nvl); > > if (ret !=3D 0) { > - const char *err_msg; > + const char *err_msg =3D NULL; > char errbuf[1024]; > > (void) snprintf(errbuf, sizeof (errbuf), > @@ -7259,11 +7259,13 @@ zfs_do_bookmark(int argc, char **argv) > err_msg =3D "out of space"; > break; > default: > - err_msg =3D "unknown error"; > + (void) zfs_standard_error(g_zfs, ret, errbuf); > break; > } > - (void) fprintf(stderr, "%s: %s\n", errbuf, > - dgettext(TEXT_DOMAIN, err_msg)); > + if (err_msg !=3D NULL) { > + (void) fprintf(stderr, "%s: %s\n", errbuf, > + dgettext(TEXT_DOMAIN, err_msg)); > + } > } > > return (ret !=3D 0); > @@ -7280,7 +7282,7 @@ zfs_do_channel_program(int argc, char **argv) > char c; > char *progbuf, *filename, *poolname; > size_t progsize, progread; > - nvlist_t *outnvl; > + nvlist_t *outnvl =3D NULL; > uint64_t instrlimit =3D ZCP_DEFAULT_INSTRLIMIT; > uint64_t memlimit =3D ZCP_DEFAULT_MEMLIMIT; > boolean_t sync_flag =3D B_TRUE, json_output =3D B_FALSE; > @@ -7420,7 +7422,8 @@ zfs_do_channel_program(int argc, char **argv) > * falling back on strerror() for an unexpected return > code. > */ > char *errstring =3D NULL; > - if (nvlist_exists(outnvl, ZCP_RET_ERROR)) { > + const char *msg =3D gettext("Channel program execution > failed"); > + if (outnvl !=3D NULL && nvlist_exists(outnvl, > ZCP_RET_ERROR)) { > (void) nvlist_lookup_string(outnvl, > ZCP_RET_ERROR, &errstring); > if (errstring =3D=3D NULL) > @@ -7449,12 +7452,11 @@ zfs_do_channel_program(int argc, char **argv) > "programs must be run as root."; > break; > default: > - errstring =3D strerror(ret); > + (void) zfs_standard_error(g_zfs, ret, msg= ); > } > } > - (void) fprintf(stderr, > - gettext("Channel program execution failed:\n%s\n"), > - errstring); > + if (errstring !=3D NULL) > + (void) fprintf(stderr, "%s:\n%s\n", msg, > errstring); > } else { > if (json_output) { > (void) nvlist_print_json(stdout, outnvl); > > Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jun 2= 3 > 04:58:36 2020 (r362530) > +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Jun 2= 3 > 06:42:39 2020 (r362531) > @@ -22,7 +22,7 @@ > /* > * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights > reserved. > * Copyright (c) 2011 Pawel Jakub Dawidek. All rights reserved. > - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. > + * Copyright (c) 2011, 2020 by Delphix. All rights reserved. > * Copyright 2019 Joyent, Inc. > * Copyright (c) 2012 Martin Matuska . All rights > reserved. > * Copyright (c) 2013 Steven Hartland. All rights reserved. > @@ -142,6 +142,7 @@ typedef enum zfs_error { > EZFS_INITIALIZING, /* currently initializing */ > EZFS_NO_INITIALIZE, /* no active initialize */ > EZFS_WRONG_PARENT, /* invalid parent dataset (e.g ZVOL) */ > + EZFS_IOC_NOTSUPPORTED, /* operation not supported by zfs module = */ > EZFS_UNKNOWN > } zfs_error_t; > > > Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c > Tue Jun 23 04:58:36 2020 (r362530) > +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c > Tue Jun 23 06:42:39 2020 (r362531) > @@ -22,7 +22,7 @@ > /* > * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights > reserved. > * Copyright 2019 Joyent, Inc. > - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. > + * Copyright (c) 2011, 2018 by Delphix. All rights reserved. > * Copyright 2016 Igor Kozhukhov > * Copyright (c) 2017 Datto Inc. > */ > @@ -207,6 +207,9 @@ libzfs_error_description(libzfs_handle_t *hdl) > case EZFS_NOTSUP: > return (dgettext(TEXT_DOMAIN, "operation not supported " > "on this dataset")); > + case EZFS_IOC_NOTSUPPORTED: > + return (dgettext(TEXT_DOMAIN, "operation not supported by= " > + "zfs kernel module")); > case EZFS_ACTIVE_SPARE: > return (dgettext(TEXT_DOMAIN, "pool has active shared > spare " > "device")); > @@ -433,6 +436,22 @@ zfs_standard_error_fmt(libzfs_handle_t *hdl, int err= or > case EREMOTEIO: > zfs_verror(hdl, EZFS_ACTIVE_POOL, fmt, ap); > break; > + case ZFS_ERR_IOC_CMD_UNAVAIL: > + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs = " > + "module does not support this operation. A reboot may= " > + "be required to enable this operation.")); > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > + break; > + case ZFS_ERR_IOC_ARG_UNAVAIL: > + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs = " > + "module does not support an option for this operation= . > " > + "A reboot may be required to enable this option.")); > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > + break; > + case ZFS_ERR_IOC_ARG_REQUIRED: > + case ZFS_ERR_IOC_ARG_BADTYPE: > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > + break; > default: > zfs_error_aux(hdl, strerror(error)); > zfs_verror(hdl, EZFS_UNKNOWN, fmt, ap); > @@ -541,6 +560,22 @@ zpool_standard_error_fmt(libzfs_handle_t *hdl, int e= rr > break; > case ZFS_ERR_WRONG_PARENT: > zfs_verror(hdl, EZFS_WRONG_PARENT, fmt, ap); > + break; > + case ZFS_ERR_IOC_CMD_UNAVAIL: > + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs = " > + "module does not support this operation. A reboot may= " > + "be required to enable this operation.")); > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > + break; > + case ZFS_ERR_IOC_ARG_UNAVAIL: > + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "the loaded zfs = " > + "module does not support an option for this operation= . > " > + "A reboot may be required to enable this option.")); > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > + break; > + case ZFS_ERR_IOC_ARG_REQUIRED: > + case ZFS_ERR_IOC_ARG_BADTYPE: > + zfs_verror(hdl, EZFS_IOC_NOTSUPPORTED, fmt, ap); > break; > default: > zfs_error_aux(hdl, strerror(error)); > > Modified: > head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c > Tue Jun 23 04:58:36 2020 (r362530) > +++ head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c > Tue Jun 23 06:42:39 2020 (r362531) > @@ -20,7 +20,7 @@ > */ > > /* > - * Copyright (c) 2012, 2017 by Delphix. All rights reserved. > + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. > * Copyright (c) 2013 Steven Hartland. All rights reserved. > * Copyright (c) 2014 Integros [integros.com] > * Copyright 2017 RackTop Systems. > @@ -80,6 +80,9 @@ > #include > #include > #include > +#ifdef ZFS_DEBUG > +#include > +#endif > #include > #include > #include > @@ -99,6 +102,42 @@ static int g_fd =3D -1; > static pthread_mutex_t g_lock =3D PTHREAD_MUTEX_INITIALIZER; > static int g_refcount; > > +#ifdef ZFS_DEBUG > +static zfs_ioc_t fail_ioc_cmd; > +static zfs_errno_t fail_ioc_err; > + > +static void > +libzfs_core_debug_ioc(void) > +{ > + /* > + * To test running newer user space binaries with kernel's > + * that don't yet support an ioctl or a new ioctl arg we > + * provide an override to intentionally fail an ioctl. > + * > + * USAGE: > + * The override variable, ZFS_IOC_TEST, is of the form "cmd:err" > + * > + * For example, to fail a ZFS_IOC_POOL_CHECKPOINT with a > + * ZFS_ERR_IOC_CMD_UNAVAIL, the string would be "0x5a4d:1029" > + * > + * $ sudo sh -c "ZFS_IOC_TEST=3D0x5a4d:1029 zpool checkpoint tank= " > + * cannot checkpoint 'tank': the loaded zfs module does not suppo= rt > + * this operation. A reboot may be required to enable this > operation. > + */ > + if (fail_ioc_cmd =3D=3D 0) { > + char *ioc_test =3D getenv("ZFS_IOC_TEST"); > + unsigned int ioc_num =3D 0, ioc_err =3D 0; > + > + if (ioc_test !=3D NULL && > + sscanf(ioc_test, "%i:%i", &ioc_num, &ioc_err) =3D=3D = 2 && > + ioc_num < ZFS_IOC_LAST) { > + fail_ioc_cmd =3D ioc_num; > + fail_ioc_err =3D ioc_err; > + } > + } > +} > +#endif > + > int > libzfs_core_init(void) > { > @@ -111,6 +150,10 @@ libzfs_core_init(void) > } > } > g_refcount++; > + > +#ifdef ZFS_DEBUG > + libzfs_core_debug_ioc(); > +#endif > (void) pthread_mutex_unlock(&g_lock); > > return (0); > @@ -146,6 +189,11 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name, > > ASSERT3S(g_refcount, >, 0); > VERIFY3S(g_fd, !=3D, -1); > + > +#ifdef ZFS_DEBUG > + if (ioc =3D=3D fail_ioc_cmd) > + return (fail_ioc_err); > +#endif > > if (name !=3D NULL) > (void) strlcpy(zc.zc_name, name, sizeof (zc.zc_name)); > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > Tue Jun 23 04:58:36 2020 (r362530) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > Tue Jun 23 06:42:39 2020 (r362531) > @@ -27,7 +27,7 @@ > * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. > * Copyright 2015 Nexenta Systems, Inc. All rights reserved. > * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. > - * Copyright (c) 2011, 2017 by Delphix. All rights reserved. > + * Copyright (c) 2011, 2018 by Delphix. All rights reserved. > * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. > * Copyright (c) 2013 Steven Hartland. All rights reserved. > * Copyright (c) 2014 Integros [integros.com] > @@ -61,8 +61,9 @@ > * > * zfs_ioc_t ioc > * The ioctl request number, which userland will pass to ioctl(2). > - * The ioctl numbers can change from release to release, because > - * the caller (libzfs) must be matched to the kernel. > + * We want newer versions of libzfs and libzfs_core to run against > + * existing zfs kernel modules (i.e. a deferred reboot after an update= ). > + * Therefore the ioctl numbers cannot change from release to release. > * > * zfs_secpolicy_func_t *secpolicy > * This function will be called before the zfs_ioc_func_t, to > @@ -88,6 +89,10 @@ > * Multiple checks can be or-ed together (e.g. POOL_CHECK_SUSPENDED | > * POOL_CHECK_READONLY). > * > + * zfs_ioc_key_t *nvl_keys > + * The list of expected/allowable innvl input keys. This list is used > + * to validate the nvlist input to the ioctl. > + * > * boolean_t smush_outnvlist > * If smush_outnvlist is true, then the output is presumed to be a > * list of errors, and it will be "smushed" down to fit into the > @@ -136,7 +141,17 @@ > * use the outnvl if they succeed, because the caller can not > * distinguish between the operation failing, and > * deserialization failing. > + * > + * > + * IOCTL Interface Errors > + * > + * The following ioctl input errors can be returned: > + * ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kern= el > + * ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by > kernel > + * ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing > + * ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type > */ > + > #ifdef __FreeBSD__ > #include "opt_kstack_pages.h" > #endif > @@ -208,6 +223,10 @@ > #include "lua.h" > #include "lauxlib.h" > > +#ifndef ARRAY_SIZE > +#define ARRAY_SIZE(x) nitems(x) > +#endif > + > static struct cdev *zfsdev; > > extern void zfs_init(void); > @@ -222,7 +241,38 @@ typedef int zfs_ioc_legacy_func_t(zfs_cmd_t *); > typedef int zfs_ioc_func_t(const char *, nvlist_t *, nvlist_t *); > typedef int zfs_secpolicy_func_t(zfs_cmd_t *, nvlist_t *, cred_t *); > > +/* > + * IOC Keys are used to document and validate user->kernel interface > inputs. > + * See zfs_keys_recv_new for an example declaration. Any key name that i= s > not > + * listed will be rejected as input. > + * > + * The keyname 'optional' is always allowed, and must be an nvlist if > present. > + * Arguments which older kernels can safely ignore can be placed under t= he > + * "optional" key. > + * > + * When adding new keys to an existing ioc for new functionality, > consider: > + * - adding an entry into zfs_sysfs.c zfs_features[] list > + * - updating the libzfs_input_check.c test utility > + * > + * Note: in the ZK_WILDCARDLIST case, the name serves as documentation > + * for the expected name (bookmark, snapshot, property, etc) but there > + * is no validation in the preflight zfs_check_input_nvpairs() check. > + */ > typedef enum { > + ZK_OPTIONAL =3D 1 << 0, /* pair is optional */ > + ZK_WILDCARDLIST =3D 1 << 1, /* one or more unspecified key > names */ > +} ioc_key_flag_t; > + > +/* DATA_TYPE_ANY is used when zkey_type can vary. */ > +#define DATA_TYPE_ANY DATA_TYPE_UNKNOWN > + > +typedef struct zfs_ioc_key { > + const char *zkey_name; > + data_type_t zkey_type; > + ioc_key_flag_t zkey_flags; > +} zfs_ioc_key_t; > + > +typedef enum { > NO_NAME, > POOL_NAME, > DATASET_NAME, > @@ -244,6 +294,8 @@ typedef struct zfs_ioc_vec { > zfs_ioc_poolcheck_t zvec_pool_check; > boolean_t zvec_smush_outnvlist; > const char *zvec_name; > + const zfs_ioc_key_t *zvec_nvl_keys; > + size_t zvec_nvl_key_count; > } zfs_ioc_vec_t; > > /* This array is indexed by zfs_userquota_prop_t */ > @@ -865,8 +917,8 @@ zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, nvlist_t *= i > nvpair_t *pair, *nextpair; > int error =3D 0; > > - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) !=3D 0) > - return (SET_ERROR(EINVAL)); > + snaps =3D fnvlist_lookup_nvlist(innvl, "snaps"); > + > for (pair =3D nvlist_next_nvpair(snaps, NULL); pair !=3D NULL; > pair =3D nextpair) { > nextpair =3D nvlist_next_nvpair(snaps, pair); > @@ -1042,8 +1094,8 @@ zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t > *innvl, > int error; > nvpair_t *pair; > > - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) !=3D 0) > - return (SET_ERROR(EINVAL)); > + snaps =3D fnvlist_lookup_nvlist(innvl, "snaps"); > + > for (pair =3D nvlist_next_nvpair(snaps, NULL); pair !=3D NULL; > pair =3D nvlist_next_nvpair(snaps, pair)) { > char *name =3D nvpair_name(pair); > @@ -1063,7 +1115,7 @@ zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t > *innvl, > } > > /* > - * Check for permission to create each snapshot in the nvlist. > + * Check for permission to create each bookmark in the nvlist. > */ > /* ARGSUSED */ > static int > @@ -1292,9 +1344,7 @@ zfs_secpolicy_hold(zfs_cmd_t *zc, nvlist_t *innvl, > cre > nvlist_t *holds; > int error; > > - error =3D nvlist_lookup_nvlist(innvl, "holds", &holds); > - if (error !=3D 0) > - return (SET_ERROR(EINVAL)); > + holds =3D fnvlist_lookup_nvlist(innvl, "holds"); > > for (pair =3D nvlist_next_nvpair(holds, NULL); pair !=3D NULL; > pair =3D nvlist_next_nvpair(holds, pair)) { > @@ -1349,12 +1399,14 @@ zfs_secpolicy_tmp_snapshot(zfs_cmd_t *zc, nvlist_= t > *in > return (0); > > error =3D zfs_secpolicy_snapshot_perms(zc->zc_name, cr); > - if (error =3D=3D 0) > - error =3D zfs_secpolicy_hold(zc, innvl, cr); > - if (error =3D=3D 0) > - error =3D zfs_secpolicy_release(zc, innvl, cr); > - if (error =3D=3D 0) > - error =3D zfs_secpolicy_destroy(zc, innvl, cr); > + if (innvl !=3D NULL) { > + if (error =3D=3D 0) > + error =3D zfs_secpolicy_hold(zc, innvl, cr); > + if (error =3D=3D 0) > + error =3D zfs_secpolicy_release(zc, innvl, cr); > + if (error =3D=3D 0) > + error =3D zfs_secpolicy_destroy(zc, innvl, cr); > + } > return (error); > } > > @@ -3309,6 +3361,13 @@ zfs_fill_zplprops_root(uint64_t spa_vers, nvlist_t > *cr > * > * outnvl: propname -> error code (int32) > */ > + > +static const zfs_ioc_key_t zfs_keys_create[] =3D { > + {"type", DATA_TYPE_INT32, 0}, > + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, > + {"hidden_args", DATA_TYPE_NVLIST, ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_create(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) > { > @@ -3316,13 +3375,10 @@ zfs_ioc_create(const char *fsname, nvlist_t > *innvl, nv > zfs_creat_t zct =3D { 0 }; > nvlist_t *nvprops =3D NULL; > void (*cbfunc)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx)= ; > - int32_t type32; > dmu_objset_type_t type; > boolean_t is_insensitive =3D B_FALSE; > > - if (nvlist_lookup_int32(innvl, "type", &type32) !=3D 0) > - return (SET_ERROR(EINVAL)); > - type =3D type32; > + type =3D (dmu_objset_type_t)fnvlist_lookup_int32(innvl, "type"); > (void) nvlist_lookup_nvlist(innvl, "props", &nvprops); > > switch (type) { > @@ -3427,6 +3483,12 @@ zfs_ioc_create(const char *fsname, nvlist_t *innvl= , > nv > * > * outnvl: propname -> error code (int32) > */ > +static const zfs_ioc_key_t zfs_keys_clone[] =3D { > + {"origin", DATA_TYPE_STRING, 0}, > + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, > + {"hidden_args", DATA_TYPE_NVLIST, ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) > { > @@ -3434,8 +3496,7 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, > nvl > nvlist_t *nvprops =3D NULL; > char *origin_name; > > - if (nvlist_lookup_string(innvl, "origin", &origin_name) !=3D 0) > - return (SET_ERROR(EINVAL)); > + origin_name =3D fnvlist_lookup_string(innvl, "origin"); > (void) nvlist_lookup_nvlist(innvl, "props", &nvprops); > > if (strchr(fsname, '@') || > @@ -3460,6 +3521,10 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, > nvl > return (error); > } > > +static const zfs_ioc_key_t zfs_keys_remap[] =3D { > + /* no nvl keys */ > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_remap(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) > @@ -3479,6 +3544,11 @@ zfs_ioc_remap(const char *fsname, nvlist_t *innvl, > nvl > * > * outnvl: snapshot -> error code (int32) > */ > +static const zfs_ioc_key_t zfs_keys_snapshot[] =3D { > + {"snaps", DATA_TYPE_NVLIST, 0}, > + {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_snapshot(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl= ) > { > @@ -3494,8 +3564,7 @@ zfs_ioc_snapshot(const char *poolname, nvlist_t > *innvl > if ((error =3D zfs_check_userprops(props)) !=3D 0) > return (error); > > - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) !=3D 0) > - return (SET_ERROR(EINVAL)); > + snaps =3D fnvlist_lookup_nvlist(innvl, "snaps"); > poollen =3D strlen(poolname); > for (pair =3D nvlist_next_nvpair(snaps, NULL); pair !=3D NULL; > pair =3D nvlist_next_nvpair(snaps, pair)) { > @@ -3546,6 +3615,10 @@ zfs_ioc_snapshot(const char *poolname, nvlist_t > *innvl > /* > * innvl: "message" -> string > */ > +static const zfs_ioc_key_t zfs_keys_log_history[] =3D { > + {"message", DATA_TYPE_STRING, 0}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnv= l) > @@ -3569,10 +3642,7 @@ zfs_ioc_log_history(const char *unused, nvlist_t > *innv > if (error !=3D 0) > return (error); > > - if (nvlist_lookup_string(innvl, "message", &message) !=3D 0) { > - spa_close(spa, FTAG); > - return (SET_ERROR(EINVAL)); > - } > + message =3D fnvlist_lookup_string(innvl, "message"); > > if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY) { > spa_close(spa, FTAG); > @@ -3585,6 +3655,10 @@ zfs_ioc_log_history(const char *unused, nvlist_t > *innv > } > > #ifdef __FreeBSD__ > +static const zfs_ioc_key_t zfs_keys_nextboot[] =3D { > + {"command", DATA_TYPE_STRING, 0}, > +}; > + > static int > zfs_ioc_nextboot(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) > { > @@ -3602,9 +3676,7 @@ zfs_ioc_nextboot(const char *unused, nvlist_t > *innvl, > if (nvlist_lookup_uint64(innvl, > ZPOOL_CONFIG_GUID, &vdev_guid) !=3D 0) > return (EINVAL); > - if (nvlist_lookup_string(innvl, > - "command", &command) !=3D 0) > - return (EINVAL); > + command =3D fnvlist_lookup_string(innvl, "command"); > > mutex_enter(&spa_namespace_lock); > spa =3D spa_by_guid(pool_guid, vdev_guid); > @@ -3721,6 +3793,11 @@ zfs_destroy_unmount_origin(const char *fsname) > * outnvl: snapshot -> error code (int32) > * > */ > +static const zfs_ioc_key_t zfs_keys_destroy_snaps[] =3D { > + {"snaps", DATA_TYPE_NVLIST, 0}, > + {"defer", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t > *outnvl) > @@ -3730,8 +3807,7 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_= t > * > nvpair_t *pair; > boolean_t defer; > > - if (nvlist_lookup_nvlist(innvl, "snaps", &snaps) !=3D 0) > - return (SET_ERROR(EINVAL)); > + snaps =3D fnvlist_lookup_nvlist(innvl, "snaps"); > defer =3D nvlist_exists(innvl, "defer"); > > poollen =3D strlen(poolname); > @@ -3764,6 +3840,10 @@ zfs_ioc_destroy_snaps(const char *poolname, > nvlist_t * > * outnvl: bookmark -> error code (int32) > * > */ > +static const zfs_ioc_key_t zfs_keys_bookmark[] =3D { > + {"...", DATA_TYPE_STRING, ZK_WILDCARDLIST}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_bookmark(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl= ) > @@ -3801,6 +3881,10 @@ zfs_ioc_bookmark(const char *poolname, nvlist_t > *innvl > * } > * > */ > +static const zfs_ioc_key_t zfs_keys_get_bookmarks[] =3D { > + {"...", DATA_TYPE_BOOLEAN, ZK_WILDCARDLIST | > ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_get_bookmarks(const char *fsname, nvlist_t *innvl, nvlist_t > *outnvl) > { > @@ -3815,6 +3899,10 @@ zfs_ioc_get_bookmarks(const char *fsname, nvlist_t > *in > * outnvl: bookmark -> error code (int32) > * > */ > +static const zfs_ioc_key_t zfs_keys_destroy_bookmarks[] =3D { > + {"...", DATA_TYPE_BOOLEAN, ZK_WILDCARDLIST}, > +}; > + > static int > zfs_ioc_destroy_bookmarks(const char *poolname, nvlist_t *innvl, > nvlist_t *outnvl) > @@ -3847,6 +3935,14 @@ zfs_ioc_destroy_bookmarks(const char *poolname, > nvlist > return (error); > } > > +static const zfs_ioc_key_t zfs_keys_channel_program[] =3D { > + {"program", DATA_TYPE_STRING, 0}, > + {"arg", DATA_TYPE_ANY, 0}, > + {"sync", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, > + {"instrlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, > + {"memlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_channel_program(const char *poolname, nvlist_t *innvl, > nvlist_t *outnvl) > @@ -3856,9 +3952,7 @@ zfs_ioc_channel_program(const char *poolname, > nvlist_t > boolean_t sync_flag; > nvpair_t *nvarg =3D NULL; > > - if (0 !=3D nvlist_lookup_string(innvl, ZCP_ARG_PROGRAM, &program)= ) { > - return (EINVAL); > - } > + program =3D fnvlist_lookup_string(innvl, ZCP_ARG_PROGRAM); > if (0 !=3D nvlist_lookup_boolean_value(innvl, ZCP_ARG_SYNC, > &sync_flag)) { > sync_flag =3D B_TRUE; > } > @@ -3868,9 +3962,7 @@ zfs_ioc_channel_program(const char *poolname, > nvlist_t > if (0 !=3D nvlist_lookup_uint64(innvl, ZCP_ARG_MEMLIMIT, &memlimi= t)) > { > memlimit =3D ZCP_DEFAULT_MEMLIMIT; > } > - if (0 !=3D nvlist_lookup_nvpair(innvl, ZCP_ARG_ARGLIST, &nvarg)) = { > - return (EINVAL); > - } > + nvarg =3D fnvlist_lookup_nvpair(innvl, ZCP_ARG_ARGLIST); > > if (instrlimit =3D=3D 0 || instrlimit > zfs_lua_max_instrlimit) > return (EINVAL); > @@ -3885,6 +3977,10 @@ zfs_ioc_channel_program(const char *poolname, > nvlist_t > * innvl: unused > * outnvl: empty > */ > +static const zfs_ioc_key_t zfs_keys_pool_checkpoint[] =3D { > + /* no nvl keys */ > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_pool_checkpoint(const char *poolname, nvlist_t *innvl, nvlist_t > *outnvl) > @@ -3896,6 +3992,10 @@ zfs_ioc_pool_checkpoint(const char *poolname, > nvlist_t > * innvl: unused > * outnvl: empty > */ > +static const zfs_ioc_key_t zfs_keys_pool_discard_checkpoint[] =3D { > + /* no nvl keys */ > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_pool_discard_checkpoint(const char *poolname, nvlist_t *innvl, > @@ -3955,6 +4055,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) > * } > * > */ > +static const zfs_ioc_key_t zfs_keys_pool_initialize[] =3D { > + {ZPOOL_INITIALIZE_COMMAND, DATA_TYPE_UINT64, 0}, > + {ZPOOL_INITIALIZE_VDEVS, DATA_TYPE_NVLIST, 0} > +}; > + > static int > zfs_ioc_pool_initialize(const char *poolname, nvlist_t *innvl, nvlist_t > *outnvl) > { > @@ -4020,6 +4125,10 @@ zfs_ioc_pool_initialize(const char *poolname, > nvlist_t > * outnvl: "target" -> name of most recent snapshot > * } > */ > +static const zfs_ioc_key_t zfs_keys_rollback[] =3D { > + {"target", DATA_TYPE_STRING, ZK_OPTIONAL}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) > @@ -5167,13 +5276,33 @@ zfs_ioc_clear(zfs_cmd_t *zc) > return (error); > } > > +/* > + * Reopen all the vdevs associated with the pool. > + * > + * innvl: { > + * "scrub_restart" -> when true and scrub is running, allow to restart > + * scrub as the side effect of the reopen (boolean). > + * } > + * > + * outnvl is unused > + */ > +static const zfs_ioc_key_t zfs_keys_pool_reopen[] =3D { > + {"scrub_restart", DATA_TYPE_BOOLEAN_VALUE, > ZK_OPTIONAL}, > +}; > + > static int > -zfs_ioc_pool_reopen(zfs_cmd_t *zc) > +zfs_ioc_pool_reopen(const char *pool, nvlist_t *innvl, nvlist_t *outnvl) > { > spa_t *spa; > int error; > + boolean_t scrub_restart =3D B_TRUE; > > - error =3D spa_open(zc->zc_name, &spa, FTAG); > + if (innvl) { > + scrub_restart =3D fnvlist_lookup_boolean_value(innvl, > + "scrub_restart"); > + } > + > + error =3D spa_open(pool, &spa, FTAG); > if (error !=3D 0) > return (error); > > @@ -5185,7 +5314,8 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) > * the scan as a side effect of the reopen. Otherwise, let > * vdev_open() decided if a resilver is required. > */ > - spa->spa_scrub_reopen =3D dsl_scan_resilvering(spa->spa_dsl_pool)= ; > + spa->spa_scrub_reopen =3D (!scrub_restart && > + dsl_scan_resilvering(spa->spa_dsl_pool)); > vdev_reopen(spa->spa_root_vdev); > spa->spa_scrub_reopen =3D B_FALSE; > > @@ -5193,6 +5323,7 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) > spa_close(spa, FTAG); > return (0); > } > + > /* > * inputs: > * zc_name name of filesystem > @@ -5789,6 +5920,11 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc) > * ... > * } > */ > +static const zfs_ioc_key_t zfs_keys_hold[] =3D { > + {"holds", DATA_TYPE_NVLIST, 0}, > + {"cleanup_fd", DATA_TYPE_INT32, ZK_OPTIONAL}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist) > @@ -5799,9 +5935,7 @@ zfs_ioc_hold(const char *pool, nvlist_t *args, > nvlist_ > int error; > minor_t minor =3D 0; > > - error =3D nvlist_lookup_nvlist(args, "holds", &holds); > - if (error !=3D 0) > - return (SET_ERROR(EINVAL)); > + holds =3D fnvlist_lookup_nvlist(args, "holds"); > > /* make sure the user didn't pass us any invalid (empty) tags */ > for (pair =3D nvlist_next_nvpair(holds, NULL); pair !=3D NULL; > @@ -5836,11 +5970,14 @@ zfs_ioc_hold(const char *pool, nvlist_t *args, > nvlist_ > * ... > * } > */ > +static const zfs_ioc_key_t zfs_keys_get_holds[] =3D { > + /* no nvl keys */ > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_get_holds(const char *snapname, nvlist_t *args, nvlist_t *outnvl= ) > { > - ASSERT3P(args, =3D=3D, NULL); > return (dsl_dataset_get_holds(snapname, outnvl)); > } > > @@ -5855,6 +5992,10 @@ zfs_ioc_get_holds(const char *snapname, nvlist_t > *args > * ... > * } > */ > +static const zfs_ioc_key_t zfs_keys_release[] =3D { > + {"...", DATA_TYPE_NVLIST, ZK_WILDCARDLIST}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist) > @@ -5913,6 +6054,10 @@ zfs_ioc_space_written(zfs_cmd_t *zc) > * "uncompressed" -> uncompressed space in bytes > * } > */ > +static const zfs_ioc_key_t zfs_keys_space_snaps[] =3D { > + {"firstsnap", DATA_TYPE_STRING, 0}, > +}; > + > static int > zfs_ioc_space_snaps(const char *lastsnap, nvlist_t *innvl, nvlist_t > *outnvl) > { > @@ -5922,8 +6067,7 @@ zfs_ioc_space_snaps(const char *lastsnap, nvlist_t > *in > char *firstsnap; > uint64_t used, comp, uncomp; > > - if (nvlist_lookup_string(innvl, "firstsnap", &firstsnap) !=3D 0) > - return (SET_ERROR(EINVAL)); > + firstsnap =3D fnvlist_lookup_string(innvl, "firstsnap"); > > error =3D dsl_pool_hold(lastsnap, FTAG, &dp); > if (error !=3D 0) > @@ -5991,6 +6135,17 @@ zfs_ioc_unjail(zfs_cmd_t *zc) > * > * outnvl is unused > */ > +static const zfs_ioc_key_t zfs_keys_send_new[] =3D { > + {"fd", DATA_TYPE_INT32, 0}, > + {"fromsnap", DATA_TYPE_STRING, ZK_OPTIONAL}, > + {"largeblockok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"embedok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"compressok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"resume_object", DATA_TYPE_UINT64, ZK_OPTIONAL}, > + {"resume_offset", DATA_TYPE_UINT64, ZK_OPTIONAL}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl= ) > @@ -6006,9 +6161,7 @@ zfs_ioc_send_new(const char *snapname, nvlist_t > *innvl > uint64_t resumeobj =3D 0; > uint64_t resumeoff =3D 0; > > - error =3D nvlist_lookup_int32(innvl, "fd", &fd); > - if (error !=3D 0) > - return (SET_ERROR(EINVAL)); > + fd =3D fnvlist_lookup_int32(innvl, "fd"); > > (void) nvlist_lookup_string(innvl, "fromsnap", &fromname); > > @@ -6065,6 +6218,15 @@ zfs_ioc_send_new(const char *snapname, nvlist_t > *innvl > * "space" -> bytes of space (uint64) > * } > */ > +static const zfs_ioc_key_t zfs_keys_send_space[] =3D { > + {"from", DATA_TYPE_STRING, ZK_OPTIONAL}, > + {"fromsnap", DATA_TYPE_STRING, ZK_OPTIONAL}, > + {"largeblockok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"embedok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"compressok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > + {"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, > +}; > + > static int > zfs_ioc_send_space(const char *snapname, nvlist_t *innvl, nvlist_t > *outnvl) > { > @@ -6153,6 +6315,10 @@ out: > * > * onvl is unused > */ > +static const zfs_ioc_key_t zfs_keys_pool_sync[] =3D { > + {"force", DATA_TYPE_BOOLEAN_VALUE, 0}, > +}; > + > /* ARGSUSED */ > static int > zfs_ioc_pool_sync(const char *pool, nvlist_t *innvl, nvlist_t *onvl) > @@ -6206,7 +6372,7 @@ static void > zfs_ioctl_register(const char *name, zfs_ioc_t ioc, zfs_ioc_func_t *func= , > zfs_secpolicy_func_t *secpolicy, zfs_ioc_namecheck_t namecheck, > zfs_ioc_poolcheck_t pool_check, boolean_t smush_outnvlist, > - boolean_t allow_log) > + boolean_t allow_log, const zfs_ioc_key_t *nvl_keys, size_t num_keys) > { > zfs_ioc_vec_t *vec =3D &zfs_ioc_vec[ioc - ZFS_IOC_FIRST]; > > @@ -6225,6 +6391,8 @@ zfs_ioctl_register(const char *name, zfs_ioc_t ioc, > zf > vec->zvec_pool_check =3D pool_check; > vec->zvec_smush_outnvlist =3D smush_outnvlist; > vec->zvec_allow_log =3D allow_log; > + vec->zvec_nvl_keys =3D nvl_keys; > + vec->zvec_nvl_key_count =3D num_keys; > } > > static void > @@ -6287,89 +6455,115 @@ zfs_ioctl_init(void) > { > zfs_ioctl_register("snapshot", ZFS_IOC_SNAPSHOT, > zfs_ioc_snapshot, zfs_secpolicy_snapshot, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_snapshot, ARRAY_SIZE(zfs_keys_snapshot)); > > zfs_ioctl_register("log_history", ZFS_IOC_LOG_HISTORY, > zfs_ioc_log_history, zfs_secpolicy_log_history, NO_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_FALSE)= ; > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_FALSE, > + zfs_keys_log_history, ARRAY_SIZE(zfs_keys_log_history)); > > zfs_ioctl_register("space_snaps", ZFS_IOC_SPACE_SNAPS, > zfs_ioc_space_snaps, zfs_secpolicy_read, DATASET_NAME, > - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); > + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, > + zfs_keys_space_snaps, ARRAY_SIZE(zfs_keys_space_snaps)); > > zfs_ioctl_register("send", ZFS_IOC_SEND_NEW, > zfs_ioc_send_new, zfs_secpolicy_send_new, DATASET_NAME, > - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); > + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, > + zfs_keys_send_new, ARRAY_SIZE(zfs_keys_send_new)); > > zfs_ioctl_register("send_space", ZFS_IOC_SEND_SPACE, > zfs_ioc_send_space, zfs_secpolicy_read, DATASET_NAME, > - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); > + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, > + zfs_keys_send_space, ARRAY_SIZE(zfs_keys_send_space)); > > zfs_ioctl_register("create", ZFS_IOC_CREATE, > zfs_ioc_create, zfs_secpolicy_create_clone, DATASET_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_create, ARRAY_SIZE(zfs_keys_create)); > > zfs_ioctl_register("clone", ZFS_IOC_CLONE, > zfs_ioc_clone, zfs_secpolicy_create_clone, DATASET_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_clone, ARRAY_SIZE(zfs_keys_clone)); > > zfs_ioctl_register("remap", ZFS_IOC_REMAP, > zfs_ioc_remap, zfs_secpolicy_remap, DATASET_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE, > + zfs_keys_remap, ARRAY_SIZE(zfs_keys_remap)); > > zfs_ioctl_register("destroy_snaps", ZFS_IOC_DESTROY_SNAPS, > zfs_ioc_destroy_snaps, zfs_secpolicy_destroy_snaps, POOL_NAME= , > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_destroy_snaps, ARRAY_SIZE(zfs_keys_destroy_snaps)); > > zfs_ioctl_register("hold", ZFS_IOC_HOLD, > zfs_ioc_hold, zfs_secpolicy_hold, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_hold, ARRAY_SIZE(zfs_keys_hold)); > zfs_ioctl_register("release", ZFS_IOC_RELEASE, > zfs_ioc_release, zfs_secpolicy_release, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_release, ARRAY_SIZE(zfs_keys_release)); > > zfs_ioctl_register("get_holds", ZFS_IOC_GET_HOLDS, > zfs_ioc_get_holds, zfs_secpolicy_read, DATASET_NAME, > - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); > + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, > + zfs_keys_get_holds, ARRAY_SIZE(zfs_keys_get_holds)); > > zfs_ioctl_register("rollback", ZFS_IOC_ROLLBACK, > zfs_ioc_rollback, zfs_secpolicy_rollback, DATASET_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_FALSE, B_TRUE, > + zfs_keys_rollback, ARRAY_SIZE(zfs_keys_rollback)); > > zfs_ioctl_register("bookmark", ZFS_IOC_BOOKMARK, > zfs_ioc_bookmark, zfs_secpolicy_bookmark, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_bookmark, ARRAY_SIZE(zfs_keys_bookmark)); > > zfs_ioctl_register("get_bookmarks", ZFS_IOC_GET_BOOKMARKS, > zfs_ioc_get_bookmarks, zfs_secpolicy_read, DATASET_NAME, > - POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE); > + POOL_CHECK_SUSPENDED, B_FALSE, B_FALSE, > + zfs_keys_get_bookmarks, ARRAY_SIZE(zfs_keys_get_bookmarks)); > > zfs_ioctl_register("destroy_bookmarks", ZFS_IOC_DESTROY_BOOKMARKS= , > zfs_ioc_destroy_bookmarks, zfs_secpolicy_destroy_bookmarks, > POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_destroy_bookmarks, > + ARRAY_SIZE(zfs_keys_destroy_bookmarks)); > > zfs_ioctl_register("channel_program", ZFS_IOC_CHANNEL_PROGRAM, > zfs_ioc_channel_program, zfs_secpolicy_config, > POOL_NAME, POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE= , > - B_TRUE); > + B_TRUE, zfs_keys_channel_program, > + ARRAY_SIZE(zfs_keys_channel_program)); > > zfs_ioctl_register("zpool_checkpoint", ZFS_IOC_POOL_CHECKPOINT, > zfs_ioc_pool_checkpoint, zfs_secpolicy_config, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_pool_checkpoint, > ARRAY_SIZE(zfs_keys_pool_checkpoint)); > > zfs_ioctl_register("zpool_discard_checkpoint", > ZFS_IOC_POOL_DISCARD_CHECKPOINT, > zfs_ioc_pool_discard_checkpoint, > zfs_secpolicy_config, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > + zfs_keys_pool_discard_checkpoint, > + ARRAY_SIZE(zfs_keys_pool_discard_checkpoint)); > > zfs_ioctl_register("initialize", ZFS_IOC_POOL_INITIALIZE, > zfs_ioc_pool_initialize, zfs_secpolicy_config, POOL_NAME, > - POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE); > + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@freebsd.org Tue Jun 23 18:19:23 2020 Return-Path: Delivered-To: svn-src-head@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 905D83350B1; Tue, 23 Jun 2020 18:19:23 +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 49rvgb24HVz3fYL; Tue, 23 Jun 2020 18:19:23 +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 4215924B09; Tue, 23 Jun 2020 18:19:23 +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 05NIJNb0016664; Tue, 23 Jun 2020 18:19:23 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NIJNc0016663; Tue, 23 Jun 2020 18:19:23 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006231819.05NIJNc0016663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Tue, 23 Jun 2020 18:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362547 - head/usr.sbin/pstat X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/usr.sbin/pstat X-SVN-Commit-Revision: 362547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 18:19:23 -0000 Author: pstef Date: Tue Jun 23 18:19:22 2020 New Revision: 362547 URL: https://svnweb.freebsd.org/changeset/base/362547 Log: pstat(8): improve the Size header width after r358181 All size values use fields of width 8. Also, all other headers use fields of width 8. Make the Size header added in r358181 use 8 characters as well. Modified: head/usr.sbin/pstat/pstat.c Modified: head/usr.sbin/pstat/pstat.c ============================================================================== --- head/usr.sbin/pstat/pstat.c Tue Jun 23 17:17:13 2020 (r362546) +++ head/usr.sbin/pstat/pstat.c Tue Jun 23 18:19:22 2020 (r362547) @@ -475,7 +475,7 @@ print_swap_header(void) if (humanflag) { header = SIZEHDR; - hlen = sizeof(SIZEHDR); + hlen = 8; /* as the hardcoded field width of values */ } else { header = getbsize(&hlen, &blocksize); } From owner-svn-src-head@freebsd.org Tue Jun 23 18:24:16 2020 Return-Path: Delivered-To: svn-src-head@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 492983350F7; Tue, 23 Jun 2020 18:24:16 +0000 (UTC) (envelope-from 0mp@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 49rvnD1G4Nz3g80; Tue, 23 Jun 2020 18:24:16 +0000 (UTC) (envelope-from 0mp@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 26674246DD; Tue, 23 Jun 2020 18:24:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NIOGCj022657; Tue, 23 Jun 2020 18:24:16 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NIOGWC022656; Tue, 23 Jun 2020 18:24:16 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006231824.05NIOGWC022656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 23 Jun 2020 18:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362548 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 362548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 18:24:16 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 23 18:24:15 2020 New Revision: 362548 URL: https://svnweb.freebsd.org/changeset/base/362548 Log: Update documentation after dropping support for i386 aout from ldconfig The i386 aout invocation was removed from rc.d/ldconfig in r362543. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jun 23 18:19:22 2020 (r362547) +++ head/share/man/man5/rc.conf.5 Tue Jun 23 18:24:15 2020 (r362548) @@ -3635,13 +3635,6 @@ will always be added first, so they need not appear in Set to the list of 32-bit compatibility shared library paths to use with .Xr ldconfig 8 . -.It Va ldconfig_paths_aout -.Pq Vt str -Set to the list of shared library paths to use with -.Xr ldconfig 8 -legacy -.Xr a.out 5 -support. .It Va ldconfig_insecure .Pq Vt bool The From owner-svn-src-head@freebsd.org Tue Jun 23 18:25:32 2020 Return-Path: Delivered-To: svn-src-head@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 AE8FD33551B; Tue, 23 Jun 2020 18:25:32 +0000 (UTC) (envelope-from cem@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 49rvph418vz3gMq; Tue, 23 Jun 2020 18:25:32 +0000 (UTC) (envelope-from cem@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 7AE2F24B2E; Tue, 23 Jun 2020 18:25:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NIPWZv022768; Tue, 23 Jun 2020 18:25:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NIPW4A022767; Tue, 23 Jun 2020 18:25:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006231825.05NIPW4A022767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 23 Jun 2020 18:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362549 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 362549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 18:25:32 -0000 Author: cem Date: Tue Jun 23 18:25:31 2020 New Revision: 362549 URL: https://svnweb.freebsd.org/changeset/base/362549 Log: kmod.mk: Don't split out debug symbols if requested Ports bsd.kmod.mk explicitly sets MK_KERNEL_SYMBOLS=no to prevent auto- splitting of debuginfo from kernel modules. If that knob is set, don't split out a .ko.debug and .ko from .ko.full; just generate a .ko with debuginfo and leave it be. Otherwise, with DEBUG_FLAGS set and MK_KERNEL_SYMBOLS=no, we would helpfully strip out the debuginfo from the .ko.full and then not install it. That is not the desired result a WITH_DEBUG port kmod build. Reviewed by: emaste, jhb Differential Revision: https://reviews.freebsd.org/D24835 Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Jun 23 18:24:15 2020 (r362548) +++ head/sys/conf/kmod.mk Tue Jun 23 18:25:31 2020 (r362549) @@ -215,7 +215,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} PROG= ${KMOD}.ko .endif -.if !defined(DEBUG_FLAGS) +.if !defined(DEBUG_FLAGS) || ${MK_KERNEL_SYMBOLS} == "no" FULLPROG= ${PROG} .else FULLPROG= ${PROG}.full @@ -319,7 +319,7 @@ ${_ILINKS}: CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} -.if defined(DEBUG_FLAGS) +.if defined(DEBUG_FLAGS) && ${MK_KERNEL_SYMBOLS} != "no" CLEANFILES+= ${FULLPROG} ${PROG}.debug .endif From owner-svn-src-head@freebsd.org Tue Jun 23 18:35:01 2020 Return-Path: Delivered-To: svn-src-head@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 220233358D3; Tue, 23 Jun 2020 18:35:01 +0000 (UTC) (envelope-from 0mp@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 49rw1d056dz3gn9; Tue, 23 Jun 2020 18:35:01 +0000 (UTC) (envelope-from 0mp@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 EE086246F0; Tue, 23 Jun 2020 18:35:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NIZ0OR029270; Tue, 23 Jun 2020 18:35:00 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NIZ00N029269; Tue, 23 Jun 2020 18:35:00 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006231835.05NIZ00N029269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 23 Jun 2020 18:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362550 - head/libexec/rc X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/libexec/rc X-SVN-Commit-Revision: 362550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 18:35:01 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 23 18:35:00 2020 New Revision: 362550 URL: https://svnweb.freebsd.org/changeset/base/362550 Log: Remove ldconfig_paths_aout from rc.conf after r362543 Approved by: imp Differential Revision: https://reviews.freebsd.org/D25415 Modified: head/libexec/rc/rc.conf Modified: head/libexec/rc/rc.conf ============================================================================== --- head/libexec/rc/rc.conf Tue Jun 23 18:25:31 2020 (r362549) +++ head/libexec/rc/rc.conf Tue Jun 23 18:35:00 2020 (r362550) @@ -653,8 +653,6 @@ ldconfig32_paths="/usr/lib32 /usr/lib32/compat" ldconfigsoft_paths="/usr/libsoft /usr/libsoft/compat /usr/local/libsoft" # soft float compatibility shared library search paths # Note: temporarily with extra stuff for transition -ldconfig_paths_aout="/usr/lib/compat/aout /usr/local/lib/aout" - # a.out shared library search paths ldconfig_local_dirs="/usr/local/libdata/ldconfig" # Local directories with ldconfig configuration files. ldconfig_local32_dirs="/usr/local/libdata/ldconfig32" From owner-svn-src-head@freebsd.org Tue Jun 23 19:14:39 2020 Return-Path: Delivered-To: svn-src-head@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 3878F336685; Tue, 23 Jun 2020 19:14:39 +0000 (UTC) (envelope-from lwhsu@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 49rwvM0kLyz40Tk; Tue, 23 Jun 2020 19:14:39 +0000 (UTC) (envelope-from lwhsu@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 140CD25681; Tue, 23 Jun 2020 19:14:39 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NJEciP053428; Tue, 23 Jun 2020 19:14:38 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NJEcAl053425; Tue, 23 Jun 2020 19:14:38 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006231914.05NJEcAl053425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 23 Jun 2020 19:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362551 - in head/usr.sbin: fstyp/tests makefs/tests X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head/usr.sbin: fstyp/tests makefs/tests X-SVN-Commit-Revision: 362551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 19:14:39 -0000 Author: lwhsu Date: Tue Jun 23 19:14:38 2020 New Revision: 362551 URL: https://svnweb.freebsd.org/changeset/base/362551 Log: Revert r362390, those tests are fixed by r362418 PR: 247425 Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Modified: head/usr.sbin/fstyp/tests/fstyp_test.sh ============================================================================== --- head/usr.sbin/fstyp/tests/fstyp_test.sh Tue Jun 23 18:35:00 2020 (r362550) +++ head/usr.sbin/fstyp/tests/fstyp_test.sh Tue Jun 23 19:14:38 2020 (r362551) @@ -197,9 +197,6 @@ ufs1_head() { atf_set "descr" "fstyp(8) should detect UFS version 1 filesystems" } ufs1_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi atf_check -s exit:0 mkdir dir atf_check -s exit:0 -o ignore makefs -Z -s 64m ufs.img dir atf_check -s exit:0 -o inline:"ufs\n" fstyp ufs.img @@ -211,9 +208,6 @@ ufs2_head() { atf_set "descr" "fstyp(8) should detect UFS version 2 filesystems" } ufs2_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi atf_check -s exit:0 mkdir dir atf_check -s exit:0 -o ignore makefs -o version=2 -Z -s 64m ufs.img dir atf_check -s exit:0 -o inline:"ufs\n" fstyp ufs.img @@ -225,9 +219,6 @@ ufs2_label_head() { atf_set "descr" "fstyp(8) can read the label on a UFS v2 filesystem" } ufs2_label_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi atf_check -s exit:0 mkdir dir atf_check -s exit:0 -o ignore makefs -o version=2,label="foo" -Z -s 64m ufs.img dir atf_check -s exit:0 -o inline:"ufs foo\n" fstyp -l ufs.img Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Tue Jun 23 18:35:00 2020 (r362550) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Tue Jun 23 19:14:38 2020 (r362551) @@ -106,10 +106,6 @@ D_flag_cleanup() atf_test_case F_flag cleanup F_flag_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ @@ -129,10 +125,6 @@ F_flag_cleanup() atf_test_case from_mtree_spec_file cleanup from_mtree_spec_file_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ @@ -154,10 +146,6 @@ from_mtree_spec_file_cleanup() atf_test_case from_multiple_dirs cleanup from_multiple_dirs_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - test_inputs_dir2=$TMPDIR/inputs2 create_test_inputs @@ -180,10 +168,6 @@ from_multiple_dirs_cleanup() atf_test_case from_single_dir cleanup from_single_dir_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - create_test_inputs atf_check -e empty -o not-empty -s exit:0 \ @@ -200,10 +184,6 @@ from_single_dir_cleanup() atf_test_case o_flag_version_1 cleanup o_flag_version_1_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - ffs_version=1 platform=$(uname) @@ -236,10 +216,6 @@ o_flag_version_1_cleanup() atf_test_case o_flag_version_2 cleanup o_flag_version_2_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/247425" - fi - ffs_version=2 platform=$(uname) From owner-svn-src-head@freebsd.org Tue Jun 23 20:02:56 2020 Return-Path: Delivered-To: svn-src-head@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 6CC273378DB; Tue, 23 Jun 2020 20:02:56 +0000 (UTC) (envelope-from dougm@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 49rxz42LmHz43gM; Tue, 23 Jun 2020 20:02:56 +0000 (UTC) (envelope-from dougm@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 4BF9525B39; Tue, 23 Jun 2020 20:02:56 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NK2ukR084320; Tue, 23 Jun 2020 20:02:56 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NK2ttr084317; Tue, 23 Jun 2020 20:02:55 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <202006232002.05NK2ttr084317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Tue, 23 Jun 2020 20:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362552 - in head/sys: compat/linuxkpi/common/include/linux sys X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux sys X-SVN-Commit-Revision: 362552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 20:02:56 -0000 Author: dougm Date: Tue Jun 23 20:02:55 2020 New Revision: 362552 URL: https://svnweb.freebsd.org/changeset/base/362552 Log: Define RB_SET_PARENT to do all assignments to rb parent pointers. Define RB_SWAP_CHILD to replace the child of a parent with its twin, and use it in 4 places. Use RB_SET in rb_link_node to remove the only linuxkpi reference to color, and then drop color- and parent-related definitions that are defined and used only in rbtree.h. This is intended to be entirely cosmetic, with no impact on program behavior, and leave RB_PARENT and RB_SET_PARENT as the only ways to read and write rb parent pointers. Reviewed by: markj, kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D25264 Modified: head/sys/compat/linuxkpi/common/include/linux/rbtree.h head/sys/sys/tree.h Modified: head/sys/compat/linuxkpi/common/include/linux/rbtree.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rbtree.h Tue Jun 23 19:14:38 2020 (r362551) +++ head/sys/compat/linuxkpi/common/include/linux/rbtree.h Tue Jun 23 20:02:55 2020 (r362552) @@ -56,17 +56,11 @@ int panic_cmp(struct rb_node *one, struct rb_node *two RB_HEAD(linux_root, rb_node); RB_PROTOTYPE(linux_root, rb_node, __entry, panic_cmp); -#define rb_parent(r) RB_PARENT(r, __entry) -#define rb_color(r) RB_COLOR(r, __entry) -#define rb_is_red(r) (rb_color(r) == RB_RED) -#define rb_is_black(r) (rb_color(r) == RB_BLACK) -#define rb_set_parent(r, p) rb_parent((r)) = (p) -#define rb_set_color(r, c) rb_color((r)) = (c) #define rb_entry(ptr, type, member) container_of(ptr, type, member) #define RB_EMPTY_ROOT(root) RB_EMPTY((struct linux_root *)root) -#define RB_EMPTY_NODE(node) (rb_parent(node) == node) -#define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) +#define RB_EMPTY_NODE(node) (RB_PARENT(node, __entry) == node) +#define RB_CLEAR_NODE(node) (RB_SET_PARENT(node, node, __entry)) #define rb_insert_color(node, root) \ linux_root_RB_INSERT_COLOR((struct linux_root *)(root), (node)) @@ -81,9 +75,7 @@ static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link) { - rb_set_parent(node, parent); - rb_set_color(node, RB_RED); - node->__entry.rbe_left = node->__entry.rbe_right = NULL; + RB_SET(node, parent, __entry); *rb_link = node; } @@ -91,20 +83,12 @@ static inline void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root) { - struct rb_node *p; - p = rb_parent(victim); - if (p) { - if (p->rb_left == victim) - p->rb_left = new; - else - p->rb_right = new; - } else - root->rb_node = new; + RB_SWAP_CHILD((struct linux_root *)root, victim, new, __entry); if (victim->rb_left) - rb_set_parent(victim->rb_left, new); + RB_SET_PARENT(victim->rb_left, new, __entry); if (victim->rb_right) - rb_set_parent(victim->rb_right, new); + RB_SET_PARENT(victim->rb_right, new, __entry); *new = *victim; } Modified: head/sys/sys/tree.h ============================================================================== --- head/sys/sys/tree.h Tue Jun 23 19:14:38 2020 (r362551) +++ head/sys/sys/tree.h Tue Jun 23 20:02:55 2020 (r362552) @@ -325,8 +325,12 @@ struct { \ #define RB_ROOT(head) (head)->rbh_root #define RB_EMPTY(head) (RB_ROOT(head) == NULL) +#define RB_SET_PARENT(dst, src, field) do { \ + RB_PARENT(dst, field) = src; \ +} while (/*CONSTCOND*/ 0) + #define RB_SET(elm, parent, field) do { \ - RB_PARENT(elm, field) = parent; \ + RB_SET_PARENT(elm, parent, field); \ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ RB_COLOR(elm, field) = RB_RED; \ } while (/*CONSTCOND*/ 0) @@ -344,37 +348,36 @@ struct { \ #define RB_AUGMENT(x) break #endif +#define RB_SWAP_CHILD(head, out, in, field) do { \ + if (RB_PARENT(out, field) == NULL) \ + RB_ROOT(head) = (in); \ + else if ((out) == RB_LEFT(RB_PARENT(out, field), field)) \ + RB_LEFT(RB_PARENT(out, field), field) = (in); \ + else \ + RB_RIGHT(RB_PARENT(out, field), field) = (in); \ +} while (/*CONSTCOND*/ 0) + #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ (tmp) = RB_RIGHT(elm, field); \ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ - RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + RB_SET_PARENT(RB_RIGHT(elm, field), elm, field); \ } \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ + RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \ + RB_SWAP_CHILD(head, elm, tmp, field); \ RB_LEFT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ + RB_SET_PARENT(elm, tmp, field); \ RB_AUGMENT(elm); \ } while (/*CONSTCOND*/ 0) #define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ (tmp) = RB_LEFT(elm, field); \ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ - RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + RB_SET_PARENT(RB_LEFT(elm, field), elm, field); \ } \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ + RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \ + RB_SWAP_CHILD(head, elm, tmp, field); \ RB_RIGHT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ + RB_SET_PARENT(elm, tmp, field); \ RB_AUGMENT(elm); \ } while (/*CONSTCOND*/ 0) @@ -545,11 +548,11 @@ name##_RB_REMOVE_COLOR(struct name *head, struct type attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ - struct type *child, *old, *parent, *parent_old, *right; \ + struct type *child, *old, *parent, *right; \ int color; \ \ old = elm; \ - parent_old = parent = RB_PARENT(elm, field); \ + parent = RB_PARENT(elm, field); \ right = RB_RIGHT(elm, field); \ color = RB_COLOR(elm, field); \ if (RB_LEFT(elm, field) == NULL) \ @@ -568,20 +571,15 @@ name##_RB_REMOVE(struct name *head, struct type *elm) child = RB_RIGHT(elm, field); \ parent = RB_PARENT(elm, field); \ RB_LEFT(parent, field) = child; \ - RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + RB_SET_PARENT(RB_RIGHT(old, field), elm, field); \ } \ - RB_PARENT(RB_LEFT(old, field), field) = elm; \ + RB_SET_PARENT(RB_LEFT(old, field), elm, field); \ color = RB_COLOR(elm, field); \ elm->field = old->field; \ } \ - if (parent_old == NULL) \ - RB_ROOT(head) = elm; \ - else if (RB_LEFT(parent_old, field) == old) \ - RB_LEFT(parent_old, field) = elm; \ - else \ - RB_RIGHT(parent_old, field) = elm; \ + RB_SWAP_CHILD(head, old, elm, field); \ if (child != NULL) { \ - RB_PARENT(child, field) = parent; \ + RB_SET_PARENT(child, parent, field); \ RB_COLOR(child, field) = RB_BLACK; \ } else if (color != RB_RED && parent != NULL) \ name##_RB_REMOVE_COLOR(head, parent); \ From owner-svn-src-head@freebsd.org Tue Jun 23 20:23:56 2020 Return-Path: Delivered-To: svn-src-head@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 EADDA337DD6; Tue, 23 Jun 2020 20:23:56 +0000 (UTC) (envelope-from vmaffione@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 49ryRJ5ffwz450L; Tue, 23 Jun 2020 20:23:56 +0000 (UTC) (envelope-from vmaffione@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 BD6FC262D4; Tue, 23 Jun 2020 20:23:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NKNuE0097086; Tue, 23 Jun 2020 20:23:56 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NKNupS097085; Tue, 23 Jun 2020 20:23:56 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006232023.05NKNupS097085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 23 Jun 2020 20:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362553 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 20:23:57 -0000 Author: vmaffione Date: Tue Jun 23 20:23:56 2020 New Revision: 362553 URL: https://svnweb.freebsd.org/changeset/base/362553 Log: iflib: netmap: fix rsync index overrun In the current iflib_netmap_rxsync, there is nothing that prevents kring->nr_hwtail to overrun kring->nr_hwcur during the descriptor import phase. This may cause errors in netmap applications, such as: em1 RX0: fail 'head < kring->nr_hwcur || head > kring->nr_hwtail' h 795 c 795 t 282 rh 795 rc 795 rt 282 hc 282 ht 282 Reviewed by: gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25252 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Jun 23 20:02:55 2020 (r362552) +++ head/sys/net/iflib.c Tue Jun 23 20:23:56 2020 (r362553) @@ -1099,6 +1099,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl * rxr->next_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { + uint32_t hwtail_lim = nm_prev(kring->nr_hwcur, lim); int crclen = iflib_crcstrip ? 0 : 4; int error, avail; @@ -1108,7 +1109,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl nm_i = netmap_idx_n2k(kring, nic_i); avail = ctx->isc_rxd_available(ctx->ifc_softc, rxq->ifr_id, nic_i, USHRT_MAX); - for (n = 0; avail > 0; n++, avail--) { + for (n = 0; avail > 0 && nm_i != hwtail_lim; n++, avail--) { rxd_info_zero(&ri); ri.iri_frags = rxq->ifr_frags; ri.iri_qsidx = kring->ring_id; From owner-svn-src-head@freebsd.org Tue Jun 23 21:11:41 2020 Return-Path: Delivered-To: svn-src-head@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 48BBB339997; Tue, 23 Jun 2020 21:11:41 +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 49rzVP1CTZz481q; Tue, 23 Jun 2020 21:11:41 +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 24D9526E60; Tue, 23 Jun 2020 21:11:41 +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 05NLBfZ5025426; Tue, 23 Jun 2020 21:11:41 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NLBfXD025425; Tue, 23 Jun 2020 21:11:41 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202006232111.05NLBfXD025425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 23 Jun 2020 21:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362557 - head/sbin/dump X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sbin/dump X-SVN-Commit-Revision: 362557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 21:11:41 -0000 Author: cperciva Date: Tue Jun 23 21:11:40 2020 New Revision: 362557 URL: https://svnweb.freebsd.org/changeset/base/362557 Log: Clean up some function and variable names. The change from "slave" processes to "minion" processes to "worker" processes left some less-than-coherent names: 1. "enslave" turned into the ungrammatical "enworker". 2. "slp" (SLave Pointer) turned into "mlp" (Minion [L] Pointer?). Convert "enworker" to "create_workers" (the function in question forks off 3 worker processes), and replace "mlp" with "wp" (Worker Pointer) and "tmlp" with "twp" (Temporary Worker Pointer). Reviewed by: imp, cem, danfe Differential Revision: https://reviews.freebsd.org/D25403 Modified: head/sbin/dump/tape.c Modified: head/sbin/dump/tape.c ============================================================================== --- head/sbin/dump/tape.c Tue Jun 23 20:48:43 2020 (r362556) +++ head/sbin/dump/tape.c Tue Jun 23 21:11:40 2020 (r362557) @@ -76,7 +76,7 @@ static FILE *popenfp = NULL; static int atomic(ssize_t (*)(), int, char *, int); static void worker(int, int); -static void enworker(void); +static void create_workers(void); static void flushtape(void); static void killall(void); static void rollforward(void); @@ -108,7 +108,7 @@ static struct worker { char (*tblock)[TP_BSIZE]; /* buffer for data blocks */ struct req *req; /* buffer for requests */ } workers[WORKERS+1]; -static struct worker *mlp; +static struct worker *wp; static char (*nextblock)[TP_BSIZE]; @@ -152,11 +152,11 @@ alloctape(void) (((long)&buf[ntrec + 1] + pgoff) &~ pgoff); workers[i].req = (struct req *)workers[i].tblock - ntrec - 1; } - mlp = &workers[0]; - mlp->count = 1; - mlp->tapea = 0; - mlp->firstrec = 0; - nextblock = mlp->tblock; + wp = &workers[0]; + wp->count = 1; + wp->tapea = 0; + wp->firstrec = 0; + nextblock = wp->tblock; return(1); } @@ -164,8 +164,8 @@ void writerec(char *dp, int isspcl) { - mlp->req[trecno].dblk = (ufs2_daddr_t)0; - mlp->req[trecno].count = 1; + wp->req[trecno].dblk = (ufs2_daddr_t)0; + wp->req[trecno].count = 1; /* Can't do a structure assignment due to alignment problems */ bcopy(dp, *(nextblock)++, sizeof (union u_spcl)); if (isspcl) @@ -185,8 +185,8 @@ dumpblock(ufs2_daddr_t blkno, int size) dblkno = fsbtodb(sblock, blkno); tpblks = size >> tp_bshift; while ((avail = MIN(tpblks, ntrec - trecno)) > 0) { - mlp->req[trecno].dblk = dblkno; - mlp->req[trecno].count = avail; + wp->req[trecno].dblk = dblkno; + wp->req[trecno].count = avail; trecno += avail; spcl.c_tapea += avail; if (trecno >= ntrec) @@ -232,27 +232,27 @@ flushtape(void) int i, blks, got; int64_t lastfirstrec; - int siz = (char *)nextblock - (char *)mlp->req; + int siz = (char *)nextblock - (char *)wp->req; - mlp->req[trecno].count = 0; /* Sentinel */ + wp->req[trecno].count = 0; /* Sentinel */ - if (atomic(write, mlp->fd, (char *)mlp->req, siz) != siz) + if (atomic(write, wp->fd, (char *)wp->req, siz) != siz) quit("error writing command pipe: %s\n", strerror(errno)); - mlp->sent = 1; /* we sent a request, read the response later */ + wp->sent = 1; /* we sent a request, read the response later */ - lastfirstrec = mlp->firstrec; + lastfirstrec = wp->firstrec; - if (++mlp >= &workers[WORKERS]) - mlp = &workers[0]; + if (++wp >= &workers[WORKERS]) + wp = &workers[0]; /* Read results back from next worker */ - if (mlp->sent) { - if (atomic(read, mlp->fd, (char *)&got, sizeof got) + if (wp->sent) { + if (atomic(read, wp->fd, (char *)&got, sizeof got) != sizeof got) { perror(" DUMP: error reading command pipe in master"); dumpabort(0); } - mlp->sent = 0; + wp->sent = 0; /* Check for end of tape */ if (got < writesize) { @@ -288,11 +288,11 @@ flushtape(void) if (spcl.c_addr[i] != 0) blks++; } - mlp->count = lastspclrec + blks + 1 - spcl.c_tapea; - mlp->tapea = spcl.c_tapea; - mlp->firstrec = lastfirstrec + ntrec; - mlp->inode = curino; - nextblock = mlp->tblock; + wp->count = lastspclrec + blks + 1 - spcl.c_tapea; + wp->tapea = spcl.c_tapea; + wp->firstrec = lastfirstrec + ntrec; + wp->inode = curino; + nextblock = wp->tblock; trecno = 0; asize += tenths; blockswritten += ntrec; @@ -396,12 +396,12 @@ void rollforward(void) { struct req *p, *q, *prev; - struct worker *tmlp; + struct worker *twp; int i, size, got; int64_t savedtapea; union u_spcl *ntb, *otb; - tmlp = &workers[WORKERS]; - ntb = (union u_spcl *)tmlp->tblock[1]; + twp = &workers[WORKERS]; + ntb = (union u_spcl *)twp->tblock[1]; /* * Each of the N workers should have requests that need to @@ -410,15 +410,15 @@ rollforward(void) * each worker in turn. */ for (i = 0; i < WORKERS; i++) { - q = &tmlp->req[1]; - otb = (union u_spcl *)mlp->tblock; + q = &twp->req[1]; + otb = (union u_spcl *)wp->tblock; /* - * For each request in the current worker, copy it to tmlp. + * For each request in the current worker, copy it to twp. */ prev = NULL; - for (p = mlp->req; p->count > 0; p += p->count) { + for (p = wp->req; p->count > 0; p += p->count) { *q = *p; if (p->dblk == 0) *ntb++ = *otb++; /* copy the datablock also */ @@ -433,26 +433,26 @@ rollforward(void) ntb--; q -= 1; q->count = 0; - q = &tmlp->req[0]; + q = &twp->req[0]; if (i == 0) { q->dblk = 0; q->count = 1; trecno = 0; - nextblock = tmlp->tblock; + nextblock = twp->tblock; savedtapea = spcl.c_tapea; - spcl.c_tapea = mlp->tapea; + spcl.c_tapea = wp->tapea; startnewtape(0); spcl.c_tapea = savedtapea; lastspclrec = savedtapea - 1; } size = (char *)ntb - (char *)q; - if (atomic(write, mlp->fd, (char *)q, size) != size) { + if (atomic(write, wp->fd, (char *)q, size) != size) { perror(" DUMP: error writing command pipe"); dumpabort(0); } - mlp->sent = 1; - if (++mlp >= &workers[WORKERS]) - mlp = &workers[0]; + wp->sent = 1; + if (++wp >= &workers[WORKERS]) + wp = &workers[0]; q->count = 1; @@ -464,19 +464,19 @@ rollforward(void) */ q->dblk = prev->dblk + prev->count * (TP_BSIZE / DEV_BSIZE); - ntb = (union u_spcl *)tmlp->tblock; + ntb = (union u_spcl *)twp->tblock; } else { /* * It wasn't a disk block. Copy the data to its * new location in the buffer. */ q->dblk = 0; - *((union u_spcl *)tmlp->tblock) = *ntb; - ntb = (union u_spcl *)tmlp->tblock[1]; + *((union u_spcl *)twp->tblock) = *ntb; + ntb = (union u_spcl *)twp->tblock[1]; } } - mlp->req[0] = *q; - nextblock = mlp->tblock; + wp->req[0] = *q; + nextblock = wp->tblock; if (q->dblk == 0) nextblock++; trecno = 1; @@ -485,13 +485,13 @@ rollforward(void) * Clear the first workers' response. One hopes that it * worked ok, otherwise the tape is much too short! */ - if (mlp->sent) { - if (atomic(read, mlp->fd, (char *)&got, sizeof got) + if (wp->sent) { + if (atomic(read, wp->fd, (char *)&got, sizeof got) != sizeof got) { perror(" DUMP: error reading command pipe in master"); dumpabort(0); } - mlp->sent = 0; + wp->sent = 0; if (got != writesize) { quit("EOT detected at start of the tape!\n"); @@ -634,7 +634,7 @@ restore_check_point: } } - enworker(); /* Share open tape file descriptor with workers */ + create_workers(); /* Share open tape file descriptor with workers */ if (popenout) close(tapefd); /* Give up our copy of it. */ signal(SIGINFO, infosch); @@ -643,18 +643,18 @@ restore_check_point: blocksthisvol = 0; if (top) newtape++; /* new tape signal */ - spcl.c_count = mlp->count; + spcl.c_count = wp->count; /* * measure firstrec in TP_BSIZE units since restore doesn't * know the correct ntrec value... */ - spcl.c_firstrec = mlp->firstrec; + spcl.c_firstrec = wp->firstrec; spcl.c_volume++; spcl.c_type = TS_TAPE; - writeheader((ino_t)mlp->inode); + writeheader((ino_t)wp->inode); if (tapeno > 1) msg("Volume %d begins with blocks from inode %d\n", - tapeno, mlp->inode); + tapeno, wp->inode); } } @@ -699,7 +699,7 @@ proceed(int signo __unused) } void -enworker(void) +create_workers(void) { int cmd[2]; int i, j; @@ -712,7 +712,7 @@ enworker(void) signal(SIGUSR2, proceed); /* Worker sends SIGUSR2 to next worker */ for (i = 0; i < WORKERS; i++) { - if (i == mlp - &workers[0]) { + if (i == wp - &workers[0]) { caught = 1; } else { caught = 0; @@ -785,17 +785,17 @@ worker(int cmd, int worker_number) /* * Get list of blocks to dump, read the blocks into tape buffer */ - while ((nread = atomic(read, cmd, (char *)mlp->req, reqsiz)) == reqsiz) { - struct req *p = mlp->req; + while ((nread = atomic(read, cmd, (char *)wp->req, reqsiz)) == reqsiz) { + struct req *p = wp->req; for (trecno = 0; trecno < ntrec; trecno += p->count, p += p->count) { if (p->dblk) { - blkread(p->dblk, mlp->tblock[trecno], + blkread(p->dblk, wp->tblock[trecno], p->count * TP_BSIZE); } else { if (p->count != 1 || atomic(read, cmd, - (char *)mlp->tblock[trecno], + (char *)wp->tblock[trecno], TP_BSIZE) != TP_BSIZE) quit("master/worker protocol botched.\n"); } @@ -816,11 +816,11 @@ worker(int cmd, int worker_number) while (eot_count < 10 && size < writesize) { #ifdef RDUMP if (host) - wrote = rmtwrite(mlp->tblock[0]+size, + wrote = rmtwrite(wp->tblock[0]+size, writesize-size); else #endif - wrote = write(tapefd, mlp->tblock[0]+size, + wrote = write(tapefd, wp->tblock[0]+size, writesize-size); #ifdef WRITEDEBUG printf("worker %d wrote %d\n", worker_number, wrote); From owner-svn-src-head@freebsd.org Tue Jun 23 21:17:13 2020 Return-Path: Delivered-To: svn-src-head@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 AD1C03395FF; Tue, 23 Jun 2020 21:17:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49rzcn44w4z48mX; Tue, 23 Jun 2020 21:17:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D70326E6A; Tue, 23 Jun 2020 21:17:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NLHDlD027991; Tue, 23 Jun 2020 21:17:13 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NLHDg3027990; Tue, 23 Jun 2020 21:17:13 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202006232117.05NLHDg3027990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 23 Jun 2020 21:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362558 - head/lib/libufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/lib/libufs X-SVN-Commit-Revision: 362558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 21:17:13 -0000 Author: mckusick Date: Tue Jun 23 21:17:13 2020 New Revision: 362558 URL: https://svnweb.freebsd.org/changeset/base/362558 Log: Align comments in struct uufsd structure. No semantic change. Sponsored by: Netflix Modified: head/lib/libufs/libufs.h Modified: head/lib/libufs/libufs.h ============================================================================== --- head/lib/libufs/libufs.h Tue Jun 23 21:11:40 2020 (r362557) +++ head/lib/libufs/libufs.h Tue Jun 23 21:17:13 2020 (r362558) @@ -44,30 +44,28 @@ union dinodep { * userland ufs disk. */ struct uufsd { - const char *d_name; /* disk name */ - int d_ufs; /* decimal UFS version */ - int d_fd; /* raw device file descriptor */ - long d_bsize; /* device bsize */ - ufs2_daddr_t d_sblock; /* superblock location */ - struct csum *d_sbcsum; /* Superblock summary info */ - caddr_t d_inoblock; /* inode block */ - uint32_t d_inomin; /* low inode (not ino_t for ABI compat) */ - uint32_t d_inomax; /* high inode (not ino_t for ABI compat) */ - union dinodep d_dp; /* pointer to currently active inode */ + const char *d_name; /* disk name */ + int d_ufs; /* decimal UFS version */ + int d_fd; /* raw device file descriptor */ + long d_bsize; /* device bsize */ + ufs2_daddr_t d_sblock; /* superblock location */ + struct csum *d_sbcsum; /* Superblock summary info */ + caddr_t d_inoblock; /* inode block */ + uint32_t d_inomin; /* low ino, not ino_t for ABI compat */ + uint32_t d_inomax; /* high ino, not ino_t for ABI compat */ + union dinodep d_dp; /* pointer to currently active inode */ union { - struct fs d_fs; /* filesystem information */ - char d_sb[MAXBSIZE]; - /* superblock as buffer */ + struct fs d_fs; /* filesystem information */ + char d_sb[MAXBSIZE]; /* superblock as buffer */ } d_sbunion; union { - struct cg d_cg; /* cylinder group */ - char d_buf[MAXBSIZE]; - /* cylinder group storage */ + struct cg d_cg; /* cylinder group */ + char d_buf[MAXBSIZE]; /* cylinder group storage */ } d_cgunion; - int d_ccg; /* current cylinder group */ - int d_lcg; /* last cylinder group (in d_cg) */ - const char *d_error; /* human readable disk error */ - int d_mine; /* internal flags */ + int d_ccg; /* current cylinder group */ + int d_lcg; /* last cylinder group (in d_cg) */ + const char *d_error; /* human readable disk error */ + int d_mine; /* internal flags */ #define d_fs d_sbunion.d_fs #define d_sb d_sbunion.d_sb #define d_cg d_cgunion.d_cg From owner-svn-src-head@freebsd.org Tue Jun 23 21:28:27 2020 Return-Path: Delivered-To: svn-src-head@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 7B40E339B41; Tue, 23 Jun 2020 21:28:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49rzsl2kKsz49GK; Tue, 23 Jun 2020 21:28:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EFFA26F86; Tue, 23 Jun 2020 21:28:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NLSRgV034049; Tue, 23 Jun 2020 21:28:27 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NLSQXI034045; Tue, 23 Jun 2020 21:28:26 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202006232128.05NLSQXI034045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 23 Jun 2020 21:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362559 - in head: lib/libufs sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: lib/libufs sbin/fsck_ffs X-SVN-Commit-Revision: 362559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 21:28:27 -0000 Author: mckusick Date: Tue Jun 23 21:28:26 2020 New Revision: 362559 URL: https://svnweb.freebsd.org/changeset/base/362559 Log: The libufs library needs to track and free the new fs_si structure in addition to the fs_csp structure that it references. PR: 247425 Sponsored by: Netflix Modified: head/lib/libufs/libufs.h head/lib/libufs/sblock.c head/lib/libufs/type.c head/sbin/fsck_ffs/setup.c Modified: head/lib/libufs/libufs.h ============================================================================== --- head/lib/libufs/libufs.h Tue Jun 23 21:17:13 2020 (r362558) +++ head/lib/libufs/libufs.h Tue Jun 23 21:28:26 2020 (r362559) @@ -49,7 +49,7 @@ struct uufsd { int d_fd; /* raw device file descriptor */ long d_bsize; /* device bsize */ ufs2_daddr_t d_sblock; /* superblock location */ - struct csum *d_sbcsum; /* Superblock summary info */ + struct fs_summary_info *d_si; /* Superblock summary info */ caddr_t d_inoblock; /* inode block */ uint32_t d_inomin; /* low ino, not ino_t for ABI compat */ uint32_t d_inomax; /* high ino, not ino_t for ABI compat */ Modified: head/lib/libufs/sblock.c ============================================================================== --- head/lib/libufs/sblock.c Tue Jun 23 21:17:13 2020 (r362558) +++ head/lib/libufs/sblock.c Tue Jun 23 21:28:26 2020 (r362559) @@ -88,7 +88,7 @@ sbread(struct uufsd *disk) disk->d_ufs = 2; disk->d_bsize = fs->fs_fsize / fsbtodb(fs, 1); disk->d_sblock = fs->fs_sblockloc / disk->d_bsize; - disk->d_sbcsum = fs->fs_csp; + disk->d_si = fs->fs_si; return (0); } Modified: head/lib/libufs/type.c ============================================================================== --- head/lib/libufs/type.c Tue Jun 23 21:17:13 2020 (r362558) +++ head/lib/libufs/type.c Tue Jun 23 21:28:26 2020 (r362559) @@ -69,9 +69,10 @@ ufs_disk_close(struct uufsd *disk) free((char *)(uintptr_t)disk->d_name); disk->d_name = NULL; } - if (disk->d_sbcsum != NULL) { - free(disk->d_sbcsum); - disk->d_sbcsum = NULL; + if (disk->d_si != NULL) { + free(disk->d_si->si_csp); + free(disk->d_si); + disk->d_si = NULL; } return (0); } @@ -164,7 +165,7 @@ again: if ((ret = stat(name, &st)) < 0) { disk->d_mine = 0; disk->d_ufs = 0; disk->d_error = NULL; - disk->d_sbcsum = NULL; + disk->d_si = NULL; if (oname != name) { name = strdup(name); Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Tue Jun 23 21:17:13 2020 (r362558) +++ head/sbin/fsck_ffs/setup.c Tue Jun 23 21:28:26 2020 (r362559) @@ -216,7 +216,7 @@ setup(char *dev) disk.d_ufs = (sblock.fs_magic == FS_UFS1_MAGIC) ? 1 : 2; disk.d_bsize = sblock.fs_fsize / fsbtodb(&sblock, 1); disk.d_sblock = sblock.fs_sblockloc / disk.d_bsize; - disk.d_sbcsum = sblock.fs_csp; + disk.d_si = sblock.fs_si; if (skipclean && ckclean && sblock.fs_clean) { pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n"); From owner-svn-src-head@freebsd.org Tue Jun 23 21:37:13 2020 Return-Path: Delivered-To: svn-src-head@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 9DF7E339FE0; Tue, 23 Jun 2020 21:37:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49s03s3lHMz4BY3; Tue, 23 Jun 2020 21:37:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 775FE26F7F; Tue, 23 Jun 2020 21:37:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NLbD4Q040667; Tue, 23 Jun 2020 21:37:13 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NLbDB4040666; Tue, 23 Jun 2020 21:37:13 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202006232137.05NLbDB4040666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 23 Jun 2020 21:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362560 - head/lib/libufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/lib/libufs X-SVN-Commit-Revision: 362560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 21:37:13 -0000 Author: mckusick Date: Tue Jun 23 21:37:12 2020 New Revision: 362560 URL: https://svnweb.freebsd.org/changeset/base/362560 Log: Correctly describe the return values for the libufs library sbget() and sbput() functions that respectively read and write the superblock. PR: 247425 Sponsored by: Netflix Modified: head/lib/libufs/sbread.3 Modified: head/lib/libufs/sbread.3 ============================================================================== --- head/lib/libufs/sbread.3 Tue Jun 23 21:28:26 2020 (r362559) +++ head/lib/libufs/sbread.3 Tue Jun 23 21:37:12 2020 (r362560) @@ -109,28 +109,30 @@ function will write to all the alternate superblock lo .Fa all value is non-zero. .Sh RETURN VALUES -.Rv -std sbget sbput sbread sbwrite -.Sh ERRORS +.Rv -std sbread sbwrite The .Fn sbget and +.Fn sbput +functions return the value 0 if successful; +otherwise they return one of the errors described below. +.Sh ERRORS +The errors returned by +.Fn sbget +and .Fn sbread -functions may fail and set -.Va errno -for any of the errors specified for the library function +include any of the errors specified for the library function .Xr bread 3 . -Additionally, it may follow the +Additionally, they may follow the .Xr libufs 3 error methodologies in situations where no usable superblock could be found. .Pp -The +The errors returned by .Fn sbput and .Fn sbwrite -functions may fail and set -.Va errno -for any of the errors specified for the library function +include any of the errors specified for the library function .Xr bwrite 3 . .Sh SEE ALSO .Xr bread 3 , From owner-svn-src-head@freebsd.org Tue Jun 23 21:44:01 2020 Return-Path: Delivered-To: svn-src-head@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 F410833A7A8; Tue, 23 Jun 2020 21:44:00 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49s0Ch6JTTz4C8V; Tue, 23 Jun 2020 21:44:00 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D393726A7A; Tue, 23 Jun 2020 21:44:00 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NLi0Vn046626; Tue, 23 Jun 2020 21:44:00 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NLi0tN046625; Tue, 23 Jun 2020 21:44:00 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202006232144.05NLi0tN046625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 23 Jun 2020 21:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362561 - head/sys/geom/journal X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/geom/journal X-SVN-Commit-Revision: 362561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 21:44:01 -0000 Author: mckusick Date: Tue Jun 23 21:44:00 2020 New Revision: 362561 URL: https://svnweb.freebsd.org/changeset/base/362561 Log: Optimize g_journal's superblock update by noting that the summary information is neither read nor written so it need not be written out when updating the superblock. PR: 247425 Sponsored by: Netflix Modified: head/sys/geom/journal/g_journal_ufs.c Modified: head/sys/geom/journal/g_journal_ufs.c ============================================================================== --- head/sys/geom/journal/g_journal_ufs.c Tue Jun 23 21:37:12 2020 (r362560) +++ head/sys/geom/journal/g_journal_ufs.c Tue Jun 23 21:44:00 2020 (r362561) @@ -68,7 +68,6 @@ g_journal_ufs_clean(struct mount *mp) static void g_journal_ufs_dirty(struct g_consumer *cp) { - struct fs_summary_info *fs_si; struct fs *fs; int error; @@ -81,15 +80,18 @@ g_journal_ufs_dirty(struct g_consumer *cp) ("g_journal_ufs_dirty: non-NULL fs %p\n", fs)); return; } + /* + * Do not use or change summary information, so free it now + * to avoid unnecessarily writing it back out in ffs_sbput(). + */ + g_free(fs->fs_csp); + g_free(fs->fs_si); + fs->fs_si = NULL; + GJ_DEBUG(0, "clean=%d flags=0x%x", fs->fs_clean, fs->fs_flags); fs->fs_clean = 0; fs->fs_flags |= FS_NEEDSFSCK | FS_UNCLEAN; - fs_si = fs->fs_si; - fs->fs_si = NULL; error = ffs_sbput(cp, fs, fs->fs_sblockloc, g_use_g_write_data); - fs->fs_si = fs_si; - g_free(fs->fs_csp); - g_free(fs->fs_si); g_free(fs); if (error != 0) { GJ_DEBUG(0, "Cannot mark file system %s as dirty " From owner-svn-src-head@freebsd.org Tue Jun 23 22:47:55 2020 Return-Path: Delivered-To: svn-src-head@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 5707033B7C4; Tue, 23 Jun 2020 22:47:55 +0000 (UTC) (envelope-from dougm@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 49s1dR1ds3z4G3q; Tue, 23 Jun 2020 22:47:55 +0000 (UTC) (envelope-from dougm@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 3368A27F1B; Tue, 23 Jun 2020 22:47:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NMltIN083763; Tue, 23 Jun 2020 22:47:55 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NMltFt083762; Tue, 23 Jun 2020 22:47:55 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <202006232247.05NMltFt083762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Tue, 23 Jun 2020 22:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362562 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 22:47:55 -0000 Author: dougm Date: Tue Jun 23 22:47:54 2020 New Revision: 362562 URL: https://svnweb.freebsd.org/changeset/base/362562 Log: In r362552, RB_SET_PARENT is defined, and use in parens in RB_CLEAR_NODE. But it is not an expression, and ought not to be enclosed in parens. Remove them. Approved by: markj Differential Revision: https://reviews.freebsd.org/D25421 Modified: head/sys/compat/linuxkpi/common/include/linux/rbtree.h Modified: head/sys/compat/linuxkpi/common/include/linux/rbtree.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/rbtree.h Tue Jun 23 21:44:00 2020 (r362561) +++ head/sys/compat/linuxkpi/common/include/linux/rbtree.h Tue Jun 23 22:47:54 2020 (r362562) @@ -60,7 +60,7 @@ RB_PROTOTYPE(linux_root, rb_node, __entry, panic_cmp); #define RB_EMPTY_ROOT(root) RB_EMPTY((struct linux_root *)root) #define RB_EMPTY_NODE(node) (RB_PARENT(node, __entry) == node) -#define RB_CLEAR_NODE(node) (RB_SET_PARENT(node, node, __entry)) +#define RB_CLEAR_NODE(node) RB_SET_PARENT(node, node, __entry) #define rb_insert_color(node, root) \ linux_root_RB_INSERT_COLOR((struct linux_root *)(root), (node)) From owner-svn-src-head@freebsd.org Tue Jun 23 23:05:05 2020 Return-Path: Delivered-To: svn-src-head@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 EF76633C34E; Tue, 23 Jun 2020 23:05:05 +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 49s21F5gXXz4H3J; Tue, 23 Jun 2020 23:05:05 +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 BE0F027E47; Tue, 23 Jun 2020 23:05:05 +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 05NN55jM095372; Tue, 23 Jun 2020 23:05:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NN55l2095371; Tue, 23 Jun 2020 23:05:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006232305.05NN55l2095371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 23 Jun 2020 23:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362563 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 23:05:06 -0000 Author: tuexen Date: Tue Jun 23 23:05:05 2020 New Revision: 362563 URL: https://svnweb.freebsd.org/changeset/base/362563 Log: Fix alignment issue manifesting in the userland stack. MFC after: 1 wwek Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Jun 23 22:47:54 2020 (r362562) +++ head/sys/netinet/sctp_usrreq.c Tue Jun 23 23:05:05 2020 (r362563) @@ -989,15 +989,15 @@ sctp_shutdown(struct socket *so) * returns 0 on success, 1 on error */ static uint32_t -sctp_fill_user_address(union sctp_sockstore *ss, struct sockaddr *sa) +sctp_fill_user_address(struct sockaddr *dst, struct sockaddr *src) { #ifdef INET6 struct sockaddr_in6 lsa6; - sa = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)sa, + src = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)src, &lsa6); #endif - memcpy(ss, sa, sa->sa_len); + memcpy(dst, src, src->sa_len); return (0); } @@ -1010,7 +1010,7 @@ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - union sctp_sockstore *addr, + struct sockaddr *addr, uint32_t vrf_id) { struct sctp_ifn *sctp_ifn; @@ -1125,9 +1125,9 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - in6_sin_2_v4mapsin6(sin, &addr->sin6); - addr->sin6.sin6_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); + in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)&addr); + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { #endif @@ -1135,8 +1135,8 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, return (actual); } memcpy(addr, sin, sizeof(struct sockaddr_in)); - addr->sin.sin_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in)); + ((struct sockaddr_in *)addr)->sin_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in)); actual += sizeof(struct sockaddr_in); #ifdef INET6 } @@ -1189,8 +1189,8 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, return (actual); } memcpy(addr, sin6, sizeof(struct sockaddr_in6)); - addr->sin6.sin6_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { continue; @@ -1222,19 +1222,19 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, switch (laddr->ifa->address.sa.sa_family) { #ifdef INET case AF_INET: - addr->sin.sin_port = inp->sctp_lport; + ((struct sockaddr_in *)addr)->sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - addr->sin6.sin6_port = inp->sctp_lport; + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; break; #endif default: /* TSNH */ break; } - addr = (union sctp_sockstore *)((caddr_t)addr + sa_len); + addr = (struct sockaddr *)((caddr_t)addr + sa_len); actual += sa_len; } } @@ -1245,7 +1245,7 @@ static size_t sctp_fill_up_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - union sctp_sockstore *addr) + struct sockaddr *addr) { size_t size = 0; @@ -2226,7 +2226,7 @@ flags_out: */ { size_t cpsz, left; - union sctp_sockstore *addr; + struct sockaddr *addr; struct sctp_nets *net; struct sctp_getaddresses *saddr; @@ -2236,7 +2236,7 @@ flags_out: if (stcb) { left = *optsize - offsetof(struct sctp_getaddresses, addr); *optsize = offsetof(struct sctp_getaddresses, addr); - addr = &saddr->addr[0]; + addr = &saddr->addr[0].sa; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { switch (net->ro._l_addr.sa.sa_family) { @@ -2274,16 +2274,16 @@ flags_out: (net->ro._l_addr.sa.sa_family == AF_INET)) { /* Must map the address */ in6_sin_2_v4mapsin6(&net->ro._l_addr.sin, - &addr->sin6); + (struct sockaddr_in6 *)&addr); } else { memcpy(addr, &net->ro._l_addr, cpsz); } #else memcpy(addr, &net->ro._l_addr, cpsz); #endif - addr->sin.sin_port = stcb->rport; + ((struct sockaddr_in *)addr)->sin_port = stcb->rport; - addr = (union sctp_sockstore *)((caddr_t)addr + cpsz); + addr = (struct sockaddr *)((caddr_t)addr + cpsz); left -= cpsz; *optsize += cpsz; } @@ -2303,7 +2303,7 @@ flags_out: SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); limit = *optsize - offsetof(struct sctp_getaddresses, addr); - actual = sctp_fill_up_addresses(inp, stcb, limit, saddr->addr); + actual = sctp_fill_up_addresses(inp, stcb, limit, &saddr->addr[0].sa); if (stcb) { SCTP_TCB_UNLOCK(stcb); } From owner-svn-src-head@freebsd.org Tue Jun 23 23:52:44 2020 Return-Path: Delivered-To: svn-src-head@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 BF1F033CF9E; Tue, 23 Jun 2020 23:52:44 +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 49s34D4j1Fz4Jmr; Tue, 23 Jun 2020 23:52:44 +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 9C95C88C7; Tue, 23 Jun 2020 23:52:44 +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 05NNqil9026296; Tue, 23 Jun 2020 23:52:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NNqiTf026293; Tue, 23 Jun 2020 23:52:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006232352.05NNqiTf026293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 23 Jun 2020 23:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362564 - in head/stand: common efi/include efi/libefi X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: common efi/include efi/libefi X-SVN-Commit-Revision: 362564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 23:52:44 -0000 Author: kevans Date: Tue Jun 23 23:52:43 2020 New Revision: 362564 URL: https://svnweb.freebsd.org/changeset/base/362564 Log: stand: remove redundant declarations These are picked out by the amd64-gcc6 build; time() is declared in and delay() is declared in . These are the correct places for these in stand/, so remove the duplicate declarations and make sure the delay() consumer in libefi that depended on the extra delay() declaration includes . MFC after: 1 week Modified: head/stand/common/bootstrap.h head/stand/efi/include/efilib.h head/stand/efi/libefi/efihttp.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Tue Jun 23 23:05:05 2020 (r362563) +++ head/stand/common/bootstrap.h Tue Jun 23 23:52:43 2020 (r362564) @@ -345,8 +345,6 @@ void delay(int delay); void dev_cleanup(void); -time_t time(time_t *tloc); - #ifndef CTASSERT #define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") #endif Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Tue Jun 23 23:05:05 2020 (r362563) +++ head/stand/efi/include/efilib.h Tue Jun 23 23:52:43 2020 (r362564) @@ -113,7 +113,6 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABL EFI_STATUS main(int argc, CHAR16 *argv[]); void efi_exit(EFI_STATUS status) __dead2; -void delay(int usecs); /* EFI environment initialization. */ void efi_init_environment(void); Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Tue Jun 23 23:05:05 2020 (r362563) +++ head/stand/efi/libefi/efihttp.c Tue Jun 23 23:52:43 2020 (r362564) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-svn-src-head@freebsd.org Wed Jun 24 00:41:42 2020 Return-Path: Delivered-To: svn-src-head@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 BCDD033E2E4; Wed, 24 Jun 2020 00:41:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s48k4fRlz4MJh; Wed, 24 Jun 2020 00:41:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9B0F71B24F; Wed, 24 Jun 2020 00:41:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f170.google.com with SMTP id e13so335714qkg.5; Tue, 23 Jun 2020 17:41:42 -0700 (PDT) X-Gm-Message-State: AOAM531si08kS5DmATrr/nWn3J87YPboXWKpo+1Q6W6ME0YEhPlTp2bo zNSFXAej0pFiu6Sn4S13ZzS/X/tgWEhb2Lfeo5I= X-Google-Smtp-Source: ABdhPJwVqbYNwovxXBTKJIKH+sMBZZuZPFLx7RKTu9yVggLOUvolFODsD2PGjg/CAVq1RchUYoK5Kpd2KcMCPvz0SME= X-Received: by 2002:a37:bcb:: with SMTP id 194mr11169362qkl.103.1592959302179; Tue, 23 Jun 2020 17:41:42 -0700 (PDT) MIME-Version: 1.0 References: <202006181809.05II9G8p054025@repo.freebsd.org> In-Reply-To: <202006181809.05II9G8p054025@repo.freebsd.org> From: Kyle Evans Date: Tue, 23 Jun 2020 19:41:29 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib To: Jung-uk Kim Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 00:41:42 -0000 On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > > Author: jkim > Date: Thu Jun 18 18:09:16 2020 > New Revision: 362333 > URL: https://svnweb.freebsd.org/changeset/base/362333 > > Log: > MFV: r362286 > > Merge flex 2.6.4. > Hi, I'm looking at getting amd64 world buildable again by gcc6; this seems to give it some gas: /usr/src/contrib/flex/src/main.c: In function 'check_options': /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] if ((slash = strrchr(M4, '/')) != NULL) { The following trivial patch seems to make gcc6 happy again. diff --git a/contrib/flex/src/main.c b/contrib/flex/src/main.c index 711e387b1b5..97e043c6275 100644 --- a/contrib/flex/src/main.c +++ b/contrib/flex/src/main.c @@ -342,7 +342,7 @@ void check_options (void) /* Setup the filter chain. */ output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); if ( !(m4 = getenv("M4"))) { - char *slash; + const char *slash; m4 = M4; if ((slash = strrchr(M4, '/')) != NULL) { m4 = slash+1; From owner-svn-src-head@freebsd.org Wed Jun 24 01:07:30 2020 Return-Path: Delivered-To: svn-src-head@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 62F7A33F084; Wed, 24 Jun 2020 01:07:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s4kV1b2Fz4MwL; Wed, 24 Jun 2020 01:07:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 10FFB1ACA4; Wed, 24 Jun 2020 01:07:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head References: <202006181809.05II9G8p054025@repo.freebsd.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Organization: FreeBSD.org Message-ID: Date: Tue, 23 Jun 2020 21:07:23 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 01:07:30 -0000 On 20. 6. 23., Kyle Evans wrote: > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: >> >> Author: jkim >> Date: Thu Jun 18 18:09:16 2020 >> New Revision: 362333 >> URL: https://svnweb.freebsd.org/changeset/base/362333 >> >> Log: >> MFV: r362286 >> >> Merge flex 2.6.4. >> > > Hi, > > I'm looking at getting amd64 world buildable again by gcc6; this seems > to give it some gas: > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > 'const' qualifier from pointer target type > [-Werror=discarded-qualifiers] > if ((slash = strrchr(M4, '/')) != NULL) { > > The following trivial patch seems to make gcc6 happy again. > > diff --git a/contrib/flex/src/main.c b/contrib/flex/src/main.c > index 711e387b1b5..97e043c6275 100644 > --- a/contrib/flex/src/main.c > +++ b/contrib/flex/src/main.c > @@ -342,7 +342,7 @@ void check_options (void) > /* Setup the filter chain. */ > output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); > if ( !(m4 = getenv("M4"))) { > - char *slash; > + const char *slash; > m4 = M4; > if ((slash = strrchr(M4, '/')) != NULL) { > m4 = slash+1; Hmm... It looks like a false positive and I am little reluctant to change the vendor code. Can you just add "-Wno-discarded-qualifiers" or something to CWARNFLAGS.gcc in share/mk/bsd.sys.mk for some WARNS level? Jung-uk Kim From owner-svn-src-head@freebsd.org Wed Jun 24 01:15:53 2020 Return-Path: Delivered-To: svn-src-head@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 BD6F233F3B1; Wed, 24 Jun 2020 01:15:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s4w94MB9z4NcN; Wed, 24 Jun 2020 01:15:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 8B3D11ADAF; Wed, 24 Jun 2020 01:15:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f177.google.com with SMTP id c139so363151qkg.12; Tue, 23 Jun 2020 18:15:53 -0700 (PDT) X-Gm-Message-State: AOAM533Zp3HMU+hApSQn0Vl9xB8Q15czuuEevxdTBlupztpQ5eHHMjGy W9jdLs/u3F8uun/NP25DbHmVw2Nv+gml1jjF+3M= X-Google-Smtp-Source: ABdhPJypN9Q9Oz7z/Uq1taxFSapUNAYcXGTaAPdoJqnpG/mEQw2riF2lhG3M9A4f/S4dspWs42b5W5GIU0vNmY4qe4k= X-Received: by 2002:a05:620a:218e:: with SMTP id g14mr6568463qka.430.1592961353092; Tue, 23 Jun 2020 18:15:53 -0700 (PDT) MIME-Version: 1.0 References: <202006181809.05II9G8p054025@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 23 Jun 2020 20:15:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib To: Jung-uk Kim Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 01:15:53 -0000 On Tue, Jun 23, 2020 at 8:07 PM Jung-uk Kim wrote: > > On 20. 6. 23., Kyle Evans wrote: > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > >> > >> Author: jkim > >> Date: Thu Jun 18 18:09:16 2020 > >> New Revision: 362333 > >> URL: https://svnweb.freebsd.org/changeset/base/362333 > >> > >> Log: > >> MFV: r362286 > >> > >> Merge flex 2.6.4. > >> > > > > Hi, > > > > I'm looking at getting amd64 world buildable again by gcc6; this seems > > to give it some gas: > > > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > > 'const' qualifier from pointer target type > > [-Werror=discarded-qualifiers] > > if ((slash = strrchr(M4, '/')) != NULL) { > > > > The following trivial patch seems to make gcc6 happy again. > > > > diff --git a/contrib/flex/src/main.c b/contrib/flex/src/main.c > > index 711e387b1b5..97e043c6275 100644 > > --- a/contrib/flex/src/main.c > > +++ b/contrib/flex/src/main.c > > @@ -342,7 +342,7 @@ void check_options (void) > > /* Setup the filter chain. */ > > output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); > > if ( !(m4 = getenv("M4"))) { > > - char *slash; > > + const char *slash; > > m4 = M4; > > if ((slash = strrchr(M4, '/')) != NULL) { > > m4 = slash+1; > > Hmm... It looks like a false positive and I am little reluctant to > change the vendor code. > > Can you just add "-Wno-discarded-qualifiers" or something to > CWARNFLAGS.gcc in share/mk/bsd.sys.mk for some WARNS level? > Do we not have a working relationship with an upstream on this one to sort it out? It's debatably correct; M4 is effectively a const string (string literal, as far as I can tell) and strrchr promises a little more than it should because we really shouldn't mutate the result in that kind of scenario. In this case, the result isn't mutated, but it certainly looks like it could be with the current declaration of slash. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Wed Jun 24 01:49:19 2020 Return-Path: Delivered-To: svn-src-head@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 DF89933FB2B; Wed, 24 Jun 2020 01:49:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s5fl5d0Vz4Pmg; Wed, 24 Jun 2020 01:49:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id AC7AD1B917; Wed, 24 Jun 2020 01:49:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head References: <202006181809.05II9G8p054025@repo.freebsd.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Organization: FreeBSD.org Message-ID: <9371c80b-1038-489b-6998-feb5013d6257@FreeBSD.org> Date: Tue, 23 Jun 2020 21:49:16 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 01:49:19 -0000 On 20. 6. 23., Kyle Evans wrote: > On Tue, Jun 23, 2020 at 8:07 PM Jung-uk Kim wrote: >> >> On 20. 6. 23., Kyle Evans wrote: >>> On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: >>>> >>>> Author: jkim >>>> Date: Thu Jun 18 18:09:16 2020 >>>> New Revision: 362333 >>>> URL: https://svnweb.freebsd.org/changeset/base/362333 >>>> >>>> Log: >>>> MFV: r362286 >>>> >>>> Merge flex 2.6.4. >>>> >>> >>> Hi, >>> >>> I'm looking at getting amd64 world buildable again by gcc6; this seems >>> to give it some gas: >>> >>> /usr/src/contrib/flex/src/main.c: In function 'check_options': >>> /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards >>> 'const' qualifier from pointer target type >>> [-Werror=discarded-qualifiers] >>> if ((slash = strrchr(M4, '/')) != NULL) { >>> >>> The following trivial patch seems to make gcc6 happy again. >>> >>> diff --git a/contrib/flex/src/main.c b/contrib/flex/src/main.c >>> index 711e387b1b5..97e043c6275 100644 >>> --- a/contrib/flex/src/main.c >>> +++ b/contrib/flex/src/main.c >>> @@ -342,7 +342,7 @@ void check_options (void) >>> /* Setup the filter chain. */ >>> output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); >>> if ( !(m4 = getenv("M4"))) { >>> - char *slash; >>> + const char *slash; >>> m4 = M4; >>> if ((slash = strrchr(M4, '/')) != NULL) { >>> m4 = slash+1; >> >> Hmm... It looks like a false positive and I am little reluctant to >> change the vendor code. >> >> Can you just add "-Wno-discarded-qualifiers" or something to >> CWARNFLAGS.gcc in share/mk/bsd.sys.mk for some WARNS level? >> > > Do we not have a working relationship with an upstream on this one to > sort it out? Not really. You may file an issue or a pull request but I don't see much activity from the author recently. https://github.com/westes/flex Jung-uk Kim > It's debatably correct; M4 is effectively a const string (string > literal, as far as I can tell) and strrchr promises a little more than > it should because we really shouldn't mutate the result in that kind > of scenario. In this case, the result isn't mutated, but it certainly > looks like it could be with the current declaration of slash. From owner-svn-src-head@freebsd.org Wed Jun 24 01:51:08 2020 Return-Path: Delivered-To: svn-src-head@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 CB8E933FD2F; Wed, 24 Jun 2020 01:51:08 +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.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 49s5hr5FHrz4Q3K; Wed, 24 Jun 2020 01:51:08 +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 AED46A1B1; Wed, 24 Jun 2020 01:51:08 +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 05O1p8W5094165; Wed, 24 Jun 2020 01:51:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O1p5P7094156; Wed, 24 Jun 2020 01:51:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006240151.05O1p5P7094156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 24 Jun 2020 01:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362568 - in head: contrib/ntp contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/lib/isc/win32/include/isc contrib/ntp/libntp contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntp... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/ntp contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/lib/isc/win32/include/isc contrib/ntp/libntp contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntpdc contrib/ntp/ntpq contr... X-SVN-Commit-Revision: 362568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 01:51:08 -0000 Author: cy Date: Wed Jun 24 01:51:05 2020 New Revision: 362568 URL: https://svnweb.freebsd.org/changeset/base/362568 Log: MFV r362565: Update 4.2.8p14 --> 4.2.8p15 Summary: Systems that use a CMAC algorithm in ntp.keys will not release a bit of memory on each packet that uses a CMAC keyid, eventually causing ntpd to run out of memory and fail. The CMAC cleanup from https://bugs.ntp.org/3447, part of ntp-4.2.8p11, introduced a bug whereby the CMAC data structure was no longer completely removed. MFC after: 3 days Security: NTP Bug 3661 Modified: head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/NEWS head/contrib/ntp/config.h.in head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/drivers/driver40-ja.html head/contrib/ntp/html/drivers/driver40.html head/contrib/ntp/include/l_stdlib.h head/contrib/ntp/include/ntp.h head/contrib/ntp/include/ntp_config.h head/contrib/ntp/include/recvbuff.h head/contrib/ntp/lib/isc/win32/include/isc/int.h head/contrib/ntp/libntp/a_md5encrypt.c head/contrib/ntp/libntp/decodenetnum.c head/contrib/ntp/libntp/recvbuff.c head/contrib/ntp/libntp/strdup.c head/contrib/ntp/libntp/timexsup.c head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntp_request.c head/contrib/ntp/ntpd/ntp_timer.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/refclock_jjy.c head/contrib/ntp/ntpd/refclock_nmea.c head/contrib/ntp/ntpd/refclock_palisade.c head/contrib/ntp/ntpd/refclock_parse.c head/contrib/ntp/ntpdate/ntpdate.c head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/crypto.c head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/version.c head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/usr.sbin/ntp/config.h head/usr.sbin/ntp/scripts/mkver Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/ChangeLog Wed Jun 24 01:51:05 2020 (r362568) @@ -1,4 +1,33 @@ --- +(4.2.8p15) 2020/06/23 Released by Harlan Stenn +(4.2.8p15) 2020/06/23 Released by Harlan Stenn + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merge of 3592 and 3596 + - fixed a bad merge that happened before 4.2.8-p14. Thanks to + Sylar Tao for noticing this! +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- (4.2.8p14) 2020/03/03 Released by Harlan Stenn * [Sec 3610] process_control() should bail earlier on short packets. stenn@ Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/CommitLog Wed Jun 24 01:51:05 2020 (r362568) @@ -1,3 +1,700 @@ +ChangeSet@1.3911, 2020-06-23 02:22:19-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P15 + TAG: NTP_4_2_8P15 + + ChangeLog@1.1985 +1 -0 + NTP_4_2_8P15 + + ntpd/invoke-ntp.conf.texi@1.222 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntp.keys.texi@1.207 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntpd.texi@1.521 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5man@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5mdoc@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.html@1.204 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.conf.man.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.mdoc.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5man@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5mdoc@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.html@1.202 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.keys.man.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.mdoc.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd-opts.c@1.544 +7 -7 + NTP_4_2_8P15 + + ntpd/ntpd-opts.h@1.543 +3 -3 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdman@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdmdoc@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.man.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.mdoc.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpdc/invoke-ntpdc.texi@1.518 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.c@1.537 +7 -7 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.h@1.536 +3 -3 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.html@1.364 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpq/invoke-ntpq.texi@1.528 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq-opts.c@1.546 +7 -7 + NTP_4_2_8P15 + + ntpq/ntpq-opts.h@1.544 +3 -3 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqman@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqmdoc@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.man.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.mdoc.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.520 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.c@1.539 +7 -7 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.html@1.188 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + packageinfo.sh@1.546 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.110 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.html@1.111 +1 -1 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.man.in@1.109 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.114 +1 -1 + NTP_4_2_8P15 + + scripts/invoke-plot_summary.texi@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/invoke-summary.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.342 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait-opts@1.78 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.html@1.360 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.man.in@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.html@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/invoke-ntptrace.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptraceman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.html@1.133 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.mdoc.in@1.119 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary-opts@1.81 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summaryman@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summarymdoc@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.html@1.135 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.man.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.mdoc.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/summary-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summaryman@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summarymdoc@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.html@1.134 +2 -2 + NTP_4_2_8P15 + + scripts/summary.man.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.mdoc.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/invoke-update-leap.texi@1.30 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap-opts@1.31 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapman@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapmdoc@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.html@1.31 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.man.in@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.mdoc.in@1.30 +2 -2 + NTP_4_2_8P15 + + sntp/invoke-sntp.texi@1.520 +2 -2 + NTP_4_2_8P15 + + sntp/sntp-opts.c@1.540 +7 -7 + NTP_4_2_8P15 + + sntp/sntp-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + sntp/sntp.1sntpman@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.1sntpmdoc@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.html@1.536 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.man.in@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.mdoc.in@1.355 +2 -2 + NTP_4_2_8P15 + + util/invoke-ntp-keygen.texi@1.523 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen-opts.c@1.542 +7 -7 + NTP_4_2_8P15 + + util/ntp-keygen-opts.h@1.540 +3 -3 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenman@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenmdoc@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.html@1.196 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.man.in@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.mdoc.in@1.351 +2 -2 + NTP_4_2_8P15 + +ChangeSet@1.3910, 2020-06-23 02:05:32-07:00, ntpreleng@ntp-build.tal1.ntfo.org + ntp-4.2.8p15 + + packageinfo.sh@1.545 +1 -1 + ntp-4.2.8p15 + +ChangeSet@1.3908, 2020-06-09 07:12:27-04:00, stenn@psp-deb2.ntp.org + p15 updates + + ChangeLog@1.1983 +1 -1 + p15 updates + + NEWS@1.214 +1 -1 + p15 updates + +ChangeSet@1.3896.1.22, 2020-06-09 07:09:18-04:00, stenn@psp-deb2.ntp.org + 3670 + + ChangeLog@1.1974.1.14 +1 -1 + 3670 + + NEWS@1.205.1.7 +3 -1 + 3670 + +ChangeSet@1.3896.1.21, 2020-06-09 08:39:26+02:00, perlinger@ntp.org + [Bug 3670] Deleted statements come back + + ChangeLog@1.1974.1.13 +3 -0 + [Bug 3670] Deleted statements come back + + ntpd/ntp_proto.c@1.437 +4 -19 + [Bug 3670] Deleted statements come back + +ChangeSet@1.3906, 2020-05-31 09:52:14+00:00, stenn@psp-deb1.ntp.org + update the expected releease date + + NEWS@1.213 +1 -1 + update the expected releease date + +ChangeSet@1.3896.9.3, 2020-05-31 09:49:39+00:00, stenn@psp-deb1.ntp.org + Update ChangeLog and NEWS files for 3644 + + ChangeLog@1.1974.1.12 +1 -3 + Update ChangeLog and NEWS files for 3644 + + NEWS@1.205.1.6 +2 -1 + Update ChangeLog and NEWS files for 3644 + +ChangeSet@1.3896.9.2, 2020-05-31 09:47:05+00:00, stenn@psp-deb1.ntp.org + [Bug 3644]: Do we want to log an event in this case? + + ntpd/ntp_timer.c@1.99 +2 -0 + [Bug 3644]: Do we want to log an event in this case? + +ChangeSet@1.3896.9.1, 2020-05-31 11:13:45+02:00, perlinger@ntp.org + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ChangeLog@1.1974.1.11 +3 -0 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + include/ntp.h@1.233 +1 -1 + [Bug 3644] Unsynchronized server [...] selected as candidate + - comment typo + + ntpd/ntp_proto.c@1.436 +2 -3 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ntpd/ntp_timer.c@1.98 +24 -9 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + - according to DLM, we should go S16/UNSYNCED if we have no proper orphan config + +ChangeSet@1.3896.1.19, 2020-05-25 12:42:46+02:00, nb241700@md2g3rcc.ad001.siemens.net + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues + + libntp/decodenetnum.c@1.21 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues ('sa_family_t' is POSIX, now ANSI/MSVC) + + libntp/strdup.c@1.11 +3 -3 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (typo+cast in memchr replacement) + + ports/winnt/include/config.h@1.117 +2 -0 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (have memchr() and strnlen() in MSVC) + +ChangeSet@1.3896.1.18, 2020-05-22 06:07:28+00:00, stenn@psp-deb1.ntp.org + Update NEWS file with 3667 + + NEWS@1.205.1.5 +3 -1 + Update NEWS file with 3667 + +ChangeSet@1.3896.1.17, 2020-05-22 06:05:45+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1974.1.10 +2 -4 + cleanup + +ChangeSet@1.3896.1.16, 2020-05-22 06:04:57+00:00, stenn@psp-deb1.ntp.org + indentation tweaks + + tests/libntp/sockaddrtest.c@1.5 +7 -7 + indentation tweaks + +ChangeSet@1.3896.1.15, 2020-05-20 09:44:15+02:00, perlinger@ntp.org + [Bug 3667] decodenetnum fails with numeric port + + ChangeLog@1.1974.1.9 +4 -0 + [Bug 3667] decodenetnum fails with numeric port + + configure.ac@1.619 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + include/l_stdlib.h@1.21 +9 -0 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + libntp/decodenetnum.c@1.20 +123 -77 + [Bug 3667] decodenetnum fails with numeric port + - rewrite in terms of inet_pton() and strtoul(), no getaddrinfo() any more + + libntp/strdup.c@1.10 +29 -3 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + tests/libntp/decodenetnum.c@1.13 +94 -6 + [Bug 3667] decodenetnum fails with numeric port + - additional tests + + tests/libntp/netof.c@1.10 +2 -0 + Bug 3667 - decodenetnum fails with numeric port + - clear address buffers before use + + tests/libntp/run-decodenetnum.c@1.14 +8 -2 + [Bug 3667] decodenetnum fails with numeric port + - regenerated + + tests/libntp/sockaddrtest.c@1.4 +2 -1 + [Bug 3667] decodenetnum fails with numeric port + - include scope id in IPv6 compare + +ChangeSet@1.3896.1.14, 2020-05-14 03:45:40-07:00, harlan@psp-at0.tal1.ntfo.org + Added 3660 to the NEWS file + + NEWS@1.205.1.4 +3 -1 + Added 3660 to the NEWS file + +ChangeSet@1.3896.8.1, 2020-05-14 03:14:44-07:00, harlan@psp-at0.tal1.ntfo.org + [Bug 3660] Manycast orphan mode startup discovery problem + + ChangeLog@1.1974.8.1 +5 -0 + [Bug 3660] Manycast orphan mode startup discovery problem + + ntpd/ntp_proto.c@1.432.2.1 +2 -1 + [Bug 3660] Manycast orphan mode startup discovery problem + +ChangeSet@1.3896.1.12, 2020-05-10 11:26:21+00:00, stenn@psp-deb1.ntp.org + Update NEWS + + NEWS@1.205.1.3 +3 -1 + Update NEWS + +ChangeSet@1.3896.1.11, 2020-05-10 09:44:50+00:00, stenn@psp-deb1.ntp.org + Merge cleanup + + ChangeLog@1.1974.1.7 +2 -4 + Merge cleanup + +ChangeSet@1.3896.1.10, 2020-05-09 08:20:44+02:00, perlinger@ntp.org + [Bug 3666] avoid unlimited receive buffer allocation + + BitKeeper/etc/ignore@1.95 +1 -0 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) ignore the '.vs' directory of VS2017 & above + + ChangeLog@1.1974.1.6 +4 -0 + [Bug 3666] avoid unlimited receive buffer allocation + + include/recvbuff.h@1.28 +23 -7 + [Bug 3666] avoid unlimited receive buffer allocation + - buffer count limit is 4096 now, always enforced + - API change for urgent buffers + + lib/isc/win32/include/isc/int.h@1.5 +3 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) define standard reserved macros only if not yet defined! + + libntp/recvbuff.c@1.44 +131 -73 + [Bug 3666] avoid unlimited receive buffer allocation + - don't exceed RECV_TOOMANY allocated buffers + - keep emergency reserve for clocks + + libntp/timexsup.c@1.3 +3 -4 + [bug 3666] avoid unlimited receive buffer allocation + - (sidekick) fix some warnings of clang on lp64 targets + + ntpd/ntp_io.c@1.432 +23 -13 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpd/refclock_parse.c@1.89 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpdate/ntpdate.c@1.106 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - get_free_recv_buffer() API change + + ports/winnt/libntp/messages.h@1.3 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) regenerated + + ports/winnt/ntpd/ntp_iocompletionport.c@1.81 +63 -38 + [Bug 3666] avoid unlimited receive buffer allocation + - reuse last buffer ASAP if no new buffer available + - typos and some internal renaming + + tests/libntp/recvbuff.c@1.8 +2 -2 + [Bug 3666] avoid unlimited receive buffer allocation + - internal API changes + +ChangeSet@1.3896.1.9, 2020-05-05 03:53:50+00:00, stenn@psp-deb1.ntp.org + Update NEWS with 3639 + + NEWS@1.205.1.2 +3 -1 + Update NEWS with 3639 + +ChangeSet@1.3896.1.7, 2020-04-20 08:14:39+00:00, stenn@psp-deb1.ntp.org + NEWS and bug 3664 + + NEWS@1.205.1.1 +2 -1 + NEWS and bug 3664 + +ChangeSet@1.3896.7.1, 2020-04-16 17:50:44+02:00, burnicki@psp-deb1.ntp.org + Enable openSSL CMAC support on Windows. + + ChangeLog@1.1974.7.1 +2 -0 + Enable openSSL CMAC support on Windows. + + ports/winnt/include/config.h@1.116 +2 -0 + Enable openSSL CMAC support on Windows. + +ChangeSet@1.3899, 2020-04-11 09:59:23+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.206 +1 -0 + update + +ChangeSet@1.3896.1.5, 2020-04-11 09:35:19+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.205 +2 -2 + update + +ChangeSet@1.3896.1.3, 2020-04-11 08:10:59+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.204 +3 -1 + update + +ChangeSet@1.3896.2.3, 2020-04-11 07:21:36+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.203 +1 -0 + update + +ChangeSet@1.3896.3.3, 2020-04-11 07:12:47+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.202 +22 -0 + update + +ChangeSet@1.3896.6.4, 2020-04-07 17:51:25+02:00, burnicki@psp-deb1.ntp.org + [Bug 3662] Fix build errors on Windows with VS2008. + + ChangeLog@1.1974.6.1 +2 -0 + [Bug 3662] Fix build errors on Windows with VS2008. + +ChangeSet@1.3896.6.3, 2020-04-07 17:49:08+02:00, burnicki@psp-deb1.ntp.org + Fix unused variable warning in ntpdate.c. + + ntpdate/ntpdate.c@1.105 +2 -1 + Fix unused variable warning. + +ChangeSet@1.3896.6.2, 2020-04-07 17:48:25+02:00, burnicki@psp-deb1.ntp.org + Fix compiling refclock_palisade.c + Don't have variable declarations after code. + + ntpd/refclock_palisade.c@1.49 +25 -23 + Don't have variable declarations after code. + +ChangeSet@1.3896.6.1, 2020-04-07 17:47:02+02:00, burnicki@psp-deb1.ntp.org + Fix prototype in ntpd/refclock_nmea.c + + ntpd/refclock_nmea.c@1.85 +1 -1 + Fix prototype in ntpd/refclock_nmea.c + +ChangeSet@1.3896.5.1, 2020-04-05 10:10:12+02:00, perlinger@ntp.org + [Bug 3646] Avoid sync with unsync orphan + + ChangeLog@1.1974.5.1 +4 -0 + [Bug 3646] Avoid sync with unsync orphan + + ntpd/ntp_proto.c@1.432.1.1 +21 -0 + [Bug 3646] Avoid sync with unsync orphan + +ChangeSet@1.3896.4.1, 2020-04-05 09:53:25+02:00, perlinger@ntp.org + [Bug 3653] Refclock jitter RMS calculation + + ChangeLog@1.1974.4.1 +4 -0 + [Bug 3653] Refclock jitter RMS calculation + + ntpd/ntp_refclock.c@1.132 +36 -36 + [Bug 3653] Refclock jitter RMS calculation + +ChangeSet@1.3896.3.1, 2020-04-04 08:57:51+02:00, perlinger@ntp.org + [Bug 3655] ntpdc memstats hash counts + + ChangeLog@1.1974.3.1 +4 -0 + [Bug 3655] ntpdc memstats hash counts + + ntpd/ntp_request.c@1.132 +1 -1 + [Bug 3655] ntpdc memstats hash counts + +ChangeSet@1.3896.2.1, 2020-04-04 08:48:51+02:00, perlinger@ntp.org + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ChangeLog@1.1974.2.1 +3 -0 + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ntpd/ntp_proto.c@1.433 +3 -2 + [Bug 3657] Wrong "Autokey group mismatch" debug message + +ChangeSet@1.3896.1.1, 2020-04-04 08:38:06+02:00, perlinger@ntp.org + [Bug 3659] ntp-4.2.8p14 fails to build + + ChangeLog@1.1974.1.1 +3 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + + include/ntp_config.h@1.90 +0 -10 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + + ntpd/ntp_config.c@1.376 +10 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + +ChangeSet@1.3897, 2020-04-01 16:49:43+02:00, perlinger@ntp.org + [Bug 3661] memory leak with AES128CMAC keys + + ChangeLog@1.1975 +3 -0 + [Bug 3661] memory leak with AES128CMAC keys + + libntp/a_md5encrypt.c@1.52 +1 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + + sntp/crypto.c@1.40 +2 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P14 TAG: NTP_4_2_8P14 @@ -675,7 +1372,7 @@ ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng ntpd/ntp_config.c@1.374 +2 -2 provide get_pollskew() for simulator -ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org +ChangeSet@1.3844.25.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P13 TAG: NTP_4_2_8P13 (currently on 1.3894) @@ -933,7 +1630,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp ChangeSet@1.3879, 2020-02-17 08:11:42+00:00, stenn@psp-deb1.ntp.org updates - ChangeLog@1.1968.34.1 +2 -0 + ChangeLog@1.1968.35.1 +2 -0 ChangeSet@1.3877.1.2, 2020-02-08 23:00:11+00:00, stenn@psp-deb1.ntp.org html/confopt.html cleanup @@ -1288,6 +1985,22 @@ ChangeSet@1.3878, 2020-01-29 06:03:13+00:00, stenn@psp ntpd/ntp_proto.c@1.427.1.1 +8 -0 Initial pass at fixes for bug 3596 + +ChangeSet@1.3844.24.1, 2020-01-21 12:49:14+00:00, abe@psp-deb1.ntp.org + driver40.html, refclock_jjy.c, driver40-ja.html, ChangeLog: + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ChangeLog@1.1968.34.1 +3 -0 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40-ja.html@1.8 +10 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40.html@1.23 +9 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ntpd/refclock_jjy.c@1.37 +76 -32 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. ChangeSet@1.3873.4.2, 2020-01-18 04:46:30-05:00, stenn@psp-deb2.ntp.org [Bug 3637] Emit the version of ntpd in saveconfig Modified: head/contrib/ntp/NEWS ============================================================================== --- head/contrib/ntp/NEWS Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/NEWS Wed Jun 24 01:51:05 2020 (r362568) @@ -1,4 +1,42 @@ --- +NTP 4.2.8p15 (Harlan Stenn , 2020 Jun 23) + +Focus: Security, Bug fixes + +Severity: MEDIUM + +This release fixes one vulnerability: Associations that use CMAC +authentication between ntpd from versions 4.2.8p11/4.3.97 and +4.2.8p14/4.3.100 will leak a small amount of memory for each packet. +Eventually, ntpd will run out of memory and abort. + +It also fixes 13 other bugs. + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merger between 3592 and 3596 + - Thanks to Sylar Tao +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- NTP 4.2.8p14 (Harlan Stenn , 2020 Mar 03) Focus: Security, Bug fixes, enhancements. Modified: head/contrib/ntp/config.h.in ============================================================================== --- head/contrib/ntp/config.h.in Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/config.h.in Wed Jun 24 01:51:05 2020 (r362568) @@ -583,6 +583,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + /* Define to 1 if you have the `memlk' function. */ #undef HAVE_MEMLK @@ -894,6 +897,9 @@ /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY + +/* Define to 1 if you have the `strnlen' function. */ +#undef HAVE_STRNLEN /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H Modified: head/contrib/ntp/configure ============================================================================== --- head/contrib/ntp/configure Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/configure Wed Jun 24 01:51:05 2020 (r362568) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p14. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p15. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p14' -PACKAGE_STRING='ntp 4.2.8p14' +PACKAGE_VERSION='4.2.8p15' +PACKAGE_STRING='ntp 4.2.8p15' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -1617,7 +1617,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p14 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1687,7 +1687,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p14:";; + short | recursive ) echo "Configuration of ntp 4.2.8p15:";; esac cat <<\_ACEOF @@ -1930,7 +1930,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p14 +ntp configure 4.2.8p15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2639,7 +2639,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p14, which was +It was created by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3640,7 +3640,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p14' + VERSION='4.2.8p15' cat >>confdefs.h <<_ACEOF @@ -27308,7 +27308,7 @@ _ACEOF fi done -for ac_func in strdup strerror setrlimit strchr +for ac_func in strdup strnlen memchr strerror setrlimit strchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -34174,7 +34174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p14, which was +This file was extended by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34241,7 +34241,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p14 +ntp config.status 4.2.8p15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/ntp/configure.ac ============================================================================== --- head/contrib/ntp/configure.ac Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/configure.ac Wed Jun 24 01:51:05 2020 (r362568) @@ -912,7 +912,7 @@ case "$host" in ;; esac AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid setvbuf]) -AC_CHECK_FUNCS([strdup strerror setrlimit strchr]) +AC_CHECK_FUNCS([strdup strnlen memchr strerror setrlimit strchr]) case "$host" in *-*-aix[[4-9]]*) # XXX only verified thru AIX6. Modified: head/contrib/ntp/html/drivers/driver40-ja.html ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/ntp/html/drivers/driver40.html ============================================================================== --- head/contrib/ntp/html/drivers/driver40.html Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/html/drivers/driver40.html Wed Jun 24 01:51:05 2020 (r362568) @@ -52,14 +52,20 @@
server   127.127.40.X   mode 1

-
fudge   127.127.40.X   time1 0.NNN   flag1 0|1
+
fudge   127.127.40.X   time1 0.NNN   flag1 0|1   flag2 0|1   time2 H

Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.

-

Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

+

Time2 may specify a grace period in hours after the 'adjusted' reply of the STUS command stopped coming.
This hours is effective when both flag1 and flag2 are set to 1.

+

Flag1 has no effect for time synchronization unless flag2 is set to 1.
When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

0 (Default)DCST and STUS commands are not issued
1DCST and STUS commands are issued
+

Flag2 enables the time synchronization only when the reply of the STUS is 'adjusted'. When this functionality is used, flag1 must be set to 1 together.

+ + + +
0 (Default)Always
1'adjusted' only

@@ -193,6 +199,7 @@
  • CITIZEN T.I.C. CO.,LTD.   JJY-200   http://www.tic-citizen.co.jp/ (Japanese only)


    +

    The JJY-200 became the end of sales in 2013.


    NTP configuration ( ntp.conf )

    Modified: head/contrib/ntp/include/l_stdlib.h ============================================================================== --- head/contrib/ntp/include/l_stdlib.h Wed Jun 24 01:29:40 2020 (r362567) +++ head/contrib/ntp/include/l_stdlib.h Wed Jun 24 01:51:05 2020 (r362568) @@ -221,4 +221,13 @@ extern int errno; extern int h_errno; #endif +#ifndef HAVE_MEMCHR +extern void *memchr(const void *s, int c, size_t n); +#endif + +#ifndef HAVE_STRNLEN +extern size_t strnlen(const char *s, size_t n); +#endif + + #endif /* L_STDLIB_H */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jun 24 02:08:09 2020 Return-Path: Delivered-To: svn-src-head@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 4432733FFB3; Wed, 24 Jun 2020 02:08:09 +0000 (UTC) (envelope-from jkim@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 49s64T13CMz4RFr; Wed, 24 Jun 2020 02:08:09 +0000 (UTC) (envelope-from jkim@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 1F7C0A604; Wed, 24 Jun 2020 02:08:09 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O289ZJ005908; Wed, 24 Jun 2020 02:08:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O288Tp005904; Wed, 24 Jun 2020 02:08:08 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006240208.05O288Tp005904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 24 Jun 2020 02:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362569 - in head: libexec/ftpd usr.bin/localedef usr.sbin/rrenumd X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: libexec/ftpd usr.bin/localedef usr.sbin/rrenumd X-SVN-Commit-Revision: 362569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 02:08:09 -0000 Author: jkim Date: Wed Jun 24 02:08:08 2020 New Revision: 362569 URL: https://svnweb.freebsd.org/changeset/base/362569 Log: Fix build with recent byacc. Modified: head/libexec/ftpd/ftpcmd.y head/usr.bin/localedef/localedef.c head/usr.bin/localedef/localedef.h head/usr.sbin/rrenumd/parser.y Modified: head/libexec/ftpd/ftpcmd.y ============================================================================== --- head/libexec/ftpd/ftpcmd.y Wed Jun 24 01:51:05 2020 (r362568) +++ head/libexec/ftpd/ftpcmd.y Wed Jun 24 02:08:08 2020 (r362569) @@ -74,6 +74,8 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #include "pathnames.h" +#define yylex ftpcmd_yylex + off_t restart_point; static int cmd_type; Modified: head/usr.bin/localedef/localedef.c ============================================================================== --- head/usr.bin/localedef/localedef.c Wed Jun 24 01:51:05 2020 (r362568) +++ head/usr.bin/localedef/localedef.c Wed Jun 24 02:08:08 2020 (r362569) @@ -273,7 +273,9 @@ main(int argc, char **argv) init_numeric(); init_time(); +#if YYDEBUG yydebug = 0; +#endif (void) setlocale(LC_ALL, ""); Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Wed Jun 24 01:51:05 2020 (r362568) +++ head/usr.bin/localedef/localedef.h Wed Jun 24 02:08:08 2020 (r362569) @@ -47,7 +47,9 @@ extern int mb_cur_max; extern int mb_cur_min; extern int last_kw; extern int verbose; +#if YYDEBUG extern int yydebug; +#endif extern int lineno; extern int undefok; /* mostly ignore undefined symbols */ extern int warnok; Modified: head/usr.sbin/rrenumd/parser.y ============================================================================== --- head/usr.sbin/rrenumd/parser.y Wed Jun 24 01:51:05 2020 (r362568) +++ head/usr.sbin/rrenumd/parser.y Wed Jun 24 02:08:08 2020 (r362569) @@ -141,7 +141,7 @@ statement: debug_statement: DEBUG_CMD flag EOS { -#ifdef YYDEBUG +#if YYDEBUG yydebug = $2; #endif /* YYDEBUG */ } From owner-svn-src-head@freebsd.org Wed Jun 24 07:25:54 2020 Return-Path: Delivered-To: svn-src-head@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 E02C4345C76; Wed, 24 Jun 2020 07:25:54 +0000 (UTC) (envelope-from lwhsu@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 49sF765jZmz3SD8; Wed, 24 Jun 2020 07:25:54 +0000 (UTC) (envelope-from lwhsu@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 BF758E06E; Wed, 24 Jun 2020 07:25:54 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O7Psw2002249; Wed, 24 Jun 2020 07:25:54 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O7PsuO002248; Wed, 24 Jun 2020 07:25:54 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006240725.05O7PsuO002248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 24 Jun 2020 07:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362573 - head/tests/sys/geom/class/gate X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/geom/class/gate X-SVN-Commit-Revision: 362573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 07:25:54 -0000 Author: lwhsu Date: Wed Jun 24 07:25:54 2020 New Revision: 362573 URL: https://svnweb.freebsd.org/changeset/base/362573 Log: Temporarily skip unstable sys.geom.class.gate.ggate_test.ggated on i386 in CI PR: 244737 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/geom/class/gate/ggate_test.sh Modified: head/tests/sys/geom/class/gate/ggate_test.sh ============================================================================== --- head/tests/sys/geom/class/gate/ggate_test.sh Wed Jun 24 06:35:50 2020 (r362572) +++ head/tests/sys/geom/class/gate/ggate_test.sh Wed Jun 24 07:25:54 2020 (r362573) @@ -16,6 +16,11 @@ ggated_head() ggated_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/244737" + fi + load_ggate us=$(alloc_ggate_dev) From owner-svn-src-head@freebsd.org Wed Jun 24 10:09:18 2020 Return-Path: Delivered-To: svn-src-head@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 2790234A2E6; Wed, 24 Jun 2020 10:09:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sJld7507z3ckw; Wed, 24 Jun 2020 10:09:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id DADF91EE39; Wed, 24 Jun 2020 10:09:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.10.156.45] (unknown [45.85.81.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 774946E005; Wed, 24 Jun 2020 12:09:15 +0200 (CEST) From: Dimitry Andric Message-Id: <2FBF81D0-9EA3-4F46-9E3E-7EDE852962C1@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_79D897FD-2ACA-4D1F-BA55-4EAD2EC975A3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib Date: Wed, 24 Jun 2020 12:09:03 +0200 In-Reply-To: Cc: Jung-uk Kim , src-committers , svn-src-all , svn-src-head To: Kyle Evans References: <202006181809.05II9G8p054025@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 10:09:18 -0000 --Apple-Mail=_79D897FD-2ACA-4D1F-BA55-4EAD2EC975A3 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: >> >> Author: jkim >> Date: Thu Jun 18 18:09:16 2020 >> New Revision: 362333 >> URL: https://svnweb.freebsd.org/changeset/base/362333 >> >> Log: >> MFV: r362286 >> >> Merge flex 2.6.4. >> > > Hi, > > I'm looking at getting amd64 world buildable again by gcc6; this seems > to give it some gas: > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > 'const' qualifier from pointer target type > [-Werror=discarded-qualifiers] > if ((slash = strrchr(M4, '/')) != NULL) { > > The following trivial patch seems to make gcc6 happy again. This is a strange one. As gcc6 has been removed from ports, I had to resort to an older 12-STABLE box which still had it, but no matter what I try, I cannot get the warning that is being produced by the CI system. What does it do differently? Also, the warning is indeed bogus, as strrchr() returns a non-const char pointer. As I can't reproduce it, I also can't verify which gcc version fixes the bogus warning. -Dimitry --Apple-Mail=_79D897FD-2ACA-4D1F-BA55-4EAD2EC975A3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXvMmQAAKCRCwXqMKLiCW o5lWAKCAZDl/tBqgKpzUFos58HcuwdhHtwCeOW/37V5em/h8Npgv+/IyyEJ++rI= =VwQf -----END PGP SIGNATURE----- --Apple-Mail=_79D897FD-2ACA-4D1F-BA55-4EAD2EC975A3-- From owner-svn-src-head@freebsd.org Wed Jun 24 12:15:28 2020 Return-Path: Delivered-To: svn-src-head@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 A5ABE34CEFF; Wed, 24 Jun 2020 12:15:28 +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 49sMYD3sW9z44HH; Wed, 24 Jun 2020 12:15:28 +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 66017115D8; Wed, 24 Jun 2020 12:15:28 +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 05OCFSuM083793; Wed, 24 Jun 2020 12:15:28 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OCFSkZ083792; Wed, 24 Jun 2020 12:15:28 GMT (envelope-from mw@FreeBSD.org) Message-Id: <202006241215.05OCFSkZ083792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Wed, 24 Jun 2020 12:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362574 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 362574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 12:15:28 -0000 Author: mw Date: Wed Jun 24 12:15:27 2020 New Revision: 362574 URL: https://svnweb.freebsd.org/changeset/base/362574 Log: Fix AccessWidth and BitWidth parsing in SPCR table The ACPI Specification defines a Generic Address Structure (GAS), which is used to describe UART controller register layout in the SPCR table. The driver responsible for parsing it (uart_cpu_acpi) wrongly associates the Access Size field to the uart_bas's regshft and the register BitWidth to the regiowidth - according to the definitions it should be opposite. This problem remained hidden most likely because the majority of platforms use 32-bit registers (BitWidth) which are accessed with the according size (Dword). However on Marvell Armada 8k / Cn913x platforms, the 32-bit registers should be accessed with Byte granulity, which unveiled the issue. This patch fixes above by proper values assignment and slightly improved parsing. Note that handling of the AccessWidth set to EFI_ACPI_6_0_UNDEFINED is needed to work around a buggy SPCR table on EC2 x86 "bare metal" instances. Reviewed by: manu, imp, cperciva, greg_unrelenting.technology Obtained from: Semihalf MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25373 Modified: head/sys/dev/uart/uart_cpu_acpi.c Modified: head/sys/dev/uart/uart_cpu_acpi.c ============================================================================== --- head/sys/dev/uart/uart_cpu_acpi.c Wed Jun 24 07:25:54 2020 (r362573) +++ head/sys/dev/uart/uart_cpu_acpi.c Wed Jun 24 12:15:27 2020 (r362574) @@ -120,11 +120,46 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *d (int)spcr->SerialPort.SpaceId); goto out; } - if (spcr->SerialPort.AccessWidth == 0) + switch (spcr->SerialPort.AccessWidth) { + case 0: /* EFI_ACPI_6_0_UNDEFINED */ + /* FALLTHROUGH */ + case 1: /* EFI_ACPI_6_0_BYTE */ + di->bas.regiowidth = 1; + break; + case 2: /* EFI_ACPI_6_0_WORD */ + di->bas.regiowidth = 2; + break; + case 3: /* EFI_ACPI_6_0_DWORD */ + di->bas.regiowidth = 4; + break; + case 4: /* EFI_ACPI_6_0_QWORD */ + di->bas.regiowidth = 8; + break; + default: + printf("UART unsupported access width: %d!\n", + (int)spcr->SerialPort.AccessWidth); + goto out; + } + switch (spcr->SerialPort.BitWidth) { + case 0: + /* FALLTHROUGH */ + case 8: di->bas.regshft = 0; - else - di->bas.regshft = spcr->SerialPort.AccessWidth - 1; - di->bas.regiowidth = spcr->SerialPort.BitWidth / 8; + break; + case 16: + di->bas.regshft = 1; + break; + case 32: + di->bas.regshft = 2; + break; + case 64: + di->bas.regshft = 3; + break; + default: + printf("UART unsupported bit width: %d!\n", + (int)spcr->SerialPort.BitWidth); + goto out; + } switch (spcr->BaudRate) { case 0: /* Special value; means "keep current value unchanged". */ From owner-svn-src-head@freebsd.org Wed Jun 24 12:17:41 2020 Return-Path: Delivered-To: svn-src-head@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 0E63A34D567; Wed, 24 Jun 2020 12:17:41 +0000 (UTC) (envelope-from trasz@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 49sMbm6d46z44NS; Wed, 24 Jun 2020 12:17:40 +0000 (UTC) (envelope-from trasz@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 DEC6611910; Wed, 24 Jun 2020 12:17:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OCHeoS083931; Wed, 24 Jun 2020 12:17:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OCHeOm083930; Wed, 24 Jun 2020 12:17:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006241217.05OCHeOm083930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 24 Jun 2020 12:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362575 - head/tests/sys/auditpipe X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/tests/sys/auditpipe X-SVN-Commit-Revision: 362575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 12:17:41 -0000 Author: trasz Date: Wed Jun 24 12:17:40 2020 New Revision: 362575 URL: https://svnweb.freebsd.org/changeset/base/362575 Log: Make sys.auditpipe depend on /dev/auditpipe. This fixes a few failures on armv7. MFC after: 2 weeks Sponsored by: DARPA Modified: head/tests/sys/auditpipe/Makefile Modified: head/tests/sys/auditpipe/Makefile ============================================================================== --- head/tests/sys/auditpipe/Makefile Wed Jun 24 12:15:27 2020 (r362574) +++ head/tests/sys/auditpipe/Makefile Wed Jun 24 12:17:40 2020 (r362575) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys/auditpipe ATF_TESTS_C= auditpipe_test TEST_METADATA+= required_user="root" +TEST_METADATA+= required_files="/dev/auditpipe" WARNS?= 6 .include From owner-svn-src-head@freebsd.org Wed Jun 24 13:11:20 2020 Return-Path: Delivered-To: svn-src-head@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 8605F34E9D4; Wed, 24 Jun 2020 13:11:20 +0000 (UTC) (envelope-from mhorne@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 49sNnh333Nz471j; Wed, 24 Jun 2020 13:11:20 +0000 (UTC) (envelope-from mhorne@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 63CF91216C; Wed, 24 Jun 2020 13:11:20 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ODBKej017749; Wed, 24 Jun 2020 13:11:20 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ODBJkg017747; Wed, 24 Jun 2020 13:11:19 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006241311.05ODBJkg017747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 24 Jun 2020 13:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362576 - in head/lib: libc/tests/gen libc/tests/stdlib msun/tests X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/lib: libc/tests/gen libc/tests/stdlib msun/tests X-SVN-Commit-Revision: 362576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:11:20 -0000 Author: mhorne Date: Wed Jun 24 13:11:19 2020 New Revision: 362576 URL: https://svnweb.freebsd.org/changeset/base/362576 Log: Enable long double tests on RISC-V Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for platforms whose long double is larger than their double. I could not find this explicitly documented anywhere, but it is implied by the definitions in NetBSD's sys/arch/${arch}/include/math.h headers, and the following assertion from the UBSAN code: #ifdef __HAVE_LONG_DOUBLE long double LD; ASSERT(sizeof(LD) > sizeof(uint64_t)); #endif RISC-V has 128-bit long doubles, so enable the tests on this platform, and update the comments to better explain the purpose of this flag. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25419 Modified: head/lib/libc/tests/gen/Makefile head/lib/libc/tests/stdlib/Makefile head/lib/msun/tests/Makefile Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Wed Jun 24 12:17:40 2020 (r362575) +++ head/lib/libc/tests/gen/Makefile Wed Jun 24 13:11:19 2020 (r362576) @@ -35,11 +35,12 @@ posix_spawn_test_FILESPACKAGE= ${PACKAGE} CFLAGS+= -DTEST_LONG_DOUBLE -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Wed Jun 24 12:17:40 2020 (r362575) +++ head/lib/libc/tests/stdlib/Makefile Wed Jun 24 13:11:19 2020 (r362576) @@ -19,11 +19,12 @@ ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test # All architectures on FreeBSD have fenv.h CFLAGS+= -D__HAVE_FENV -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Wed Jun 24 12:17:40 2020 (r362575) +++ head/lib/msun/tests/Makefile Wed Jun 24 13:11:19 2020 (r362576) @@ -10,11 +10,12 @@ CFLAGS+= -DHAVE_FENV_H # For isqemu.h CFLAGS+= -I${TESTSRC:H}/libc/gen -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif From owner-svn-src-head@freebsd.org Wed Jun 24 13:12:37 2020 Return-Path: Delivered-To: svn-src-head@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 EC2A034E06F; Wed, 24 Jun 2020 13:12:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sNq95xppz47B7; Wed, 24 Jun 2020 13:12:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C20AD20678; Wed, 24 Jun 2020 13:12:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f176.google.com with SMTP id l17so1686798qki.9; Wed, 24 Jun 2020 06:12:37 -0700 (PDT) X-Gm-Message-State: AOAM531nYm9GlIdak8eZ0pf25I3SOqU5dDy1SKTjWq+CpvU2ZstyKSch RjaR6ks10Vn+t+gua802cnRKXHL8ye++HMZ1gOk= X-Google-Smtp-Source: ABdhPJwNBXFlQCM5Ds7HVts7Oo1mSTMVfJd84K2k0sl7+MLvcV7XsAqMwtzGhbIadRN8LfMMmmsnZpUUqZyQY+0F0Y8= X-Received: by 2002:a05:620a:218e:: with SMTP id g14mr8696126qka.430.1593004357398; Wed, 24 Jun 2020 06:12:37 -0700 (PDT) MIME-Version: 1.0 References: <202006181809.05II9G8p054025@repo.freebsd.org> <2FBF81D0-9EA3-4F46-9E3E-7EDE852962C1@FreeBSD.org> In-Reply-To: <2FBF81D0-9EA3-4F46-9E3E-7EDE852962C1@FreeBSD.org> From: Kyle Evans Date: Wed, 24 Jun 2020 08:12:27 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib To: Dimitry Andric Cc: Jung-uk Kim , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:12:38 -0000 On Wed, Jun 24, 2020 at 5:09 AM Dimitry Andric wrote: > > On 24 Jun 2020, at 02:41, Kyle Evans wrote: > > > > On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim wrote: > >> > >> Author: jkim > >> Date: Thu Jun 18 18:09:16 2020 > >> New Revision: 362333 > >> URL: https://svnweb.freebsd.org/changeset/base/362333 > >> > >> Log: > >> MFV: r362286 > >> > >> Merge flex 2.6.4. > >> > > > > Hi, > > > > I'm looking at getting amd64 world buildable again by gcc6; this seems > > to give it some gas: > > > > /usr/src/contrib/flex/src/main.c: In function 'check_options': > > /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards > > 'const' qualifier from pointer target type > > [-Werror=discarded-qualifiers] > > if ((slash = strrchr(M4, '/')) != NULL) { > > > > The following trivial patch seems to make gcc6 happy again. > > This is a strange one. As gcc6 has been removed from ports, I had to > resort to an older 12-STABLE box which still had it, but no matter what > I try, I cannot get the warning that is being produced by the CI system. > What does it do differently? > > Also, the warning is indeed bogus, as strrchr() returns a non-const char > pointer. As I can't reproduce it, I also can't verify which gcc version > fixes the bogus warning. > It's bogus, but it's also not-even-wrong given that strrchr doesn't do anything to make it actually safe to mutate *strrchr() in a scenario like this where the input is apparently a string literal. I consider it an anti-footgun measure to make sure we've constified slash here. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Wed Jun 24 13:42:43 2020 Return-Path: Delivered-To: svn-src-head@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 A513134F585; Wed, 24 Jun 2020 13:42:43 +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 49sPTv3tlBz48dr; Wed, 24 Jun 2020 13:42:43 +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 8095212A01; Wed, 24 Jun 2020 13:42:43 +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 05ODghIl039265; Wed, 24 Jun 2020 13:42:43 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ODght3039263; Wed, 24 Jun 2020 13:42:43 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202006241342.05ODght3039263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 24 Jun 2020 13:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362577 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:42:43 -0000 Author: rscheff Date: Wed Jun 24 13:42:42 2020 New Revision: 362577 URL: https://svnweb.freebsd.org/changeset/base/362577 Log: TCP: make after-idle work for transactional sessions. The use of t_rcvtime as proxy for the last transmission fails for transactional IO, where the client requests data before the server can respond with a bulk transfer. Set aside a dedicated variable to actually track the last locally sent segment going forward. Reported by: rrs Reviewed by: rrs, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25016 Modified: head/sys/netinet/tcp_output.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Jun 24 13:11:19 2020 (r362576) +++ head/sys/netinet/tcp_output.c Wed Jun 24 13:42:42 2020 (r362577) @@ -260,7 +260,8 @@ tcp_output(struct tcpcb *tp) * to send, then transmit; otherwise, investigate further. */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); - if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur) + if (idle && (((ticks - tp->t_rcvtime) >= tp->t_rxtcur) || + (tp->t_sndtime && ((ticks - tp->t_sndtime) >= tp->t_rxtcur)))) cc_after_idle(tp); tp->t_flags &= ~TF_LASTIDLE; if (idle) { @@ -1502,6 +1503,7 @@ out: * Time this transmission if not a retransmission and * not currently timing anything. */ + tp->t_sndtime = ticks; if (tp->t_rtttime == 0) { tp->t_rtttime = ticks; tp->t_rtseq = startseq; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Jun 24 13:11:19 2020 (r362576) +++ head/sys/netinet/tcp_var.h Wed Jun 24 13:42:42 2020 (r362577) @@ -188,8 +188,9 @@ struct tcpcb { tcp_seq snd_wl2; /* window update seg ack number */ tcp_seq irs; /* initial receive sequence number */ - tcp_seq iss; /* initial send sequence number */ - u_int t_acktime; + tcp_seq iss; /* initial send sequence number */ + u_int t_acktime; /* RACK and BBR incoming new data was acked */ + u_int t_sndtime; /* time last data was sent */ u_int ts_recent_age; /* when last updated */ tcp_seq snd_recover; /* for use in NewReno Fast Recovery */ uint16_t cl4_spare; /* Spare to adjust CL 4 */ From owner-svn-src-head@freebsd.org Wed Jun 24 13:52:54 2020 Return-Path: Delivered-To: svn-src-head@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 0599234F7A7; Wed, 24 Jun 2020 13:52:54 +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 49sPjd6Lldz49T8; Wed, 24 Jun 2020 13:52:53 +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 D4E6F12671; Wed, 24 Jun 2020 13:52:53 +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 05ODqrxm045630; Wed, 24 Jun 2020 13:52:53 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ODqrZp045629; Wed, 24 Jun 2020 13:52:53 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202006241352.05ODqrZp045629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 24 Jun 2020 13:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362580 - head/sys/netinet/cc X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: head/sys/netinet/cc X-SVN-Commit-Revision: 362580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:52:54 -0000 Author: rscheff Date: Wed Jun 24 13:52:53 2020 New Revision: 362580 URL: https://svnweb.freebsd.org/changeset/base/362580 Log: TCP: fix cubic RTO reaction. Proper TCP Cubic operation requires the knowledge of the maximum congestion window prior to the last congestion event. This restores and improves a bugfix previously added by jtl@ but subsequently removed due to a revert. Reported by: chengc_netapp.com Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25133 Modified: head/sys/netinet/cc/cc_cubic.c Modified: head/sys/netinet/cc/cc_cubic.c ============================================================================== --- head/sys/netinet/cc/cc_cubic.c Wed Jun 24 13:49:30 2020 (r362579) +++ head/sys/netinet/cc/cc_cubic.c Wed Jun 24 13:52:53 2020 (r362580) @@ -313,10 +313,15 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * timeout has fired more than once, as there is a reasonable * chance the first one is a false alarm and may not indicate * congestion. + * This will put Cubic firmly into the concave / TCP friendly + * region, for a slower ramp-up after two consecutive RTOs. */ if (CCV(ccv, t_rxtshift) >= 2) { cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->t_last_cong = ticks; + cubic_data->max_cwnd = CCV(ccv, snd_cwnd_prev); + cubic_data->K = cubic_k(cubic_data->max_cwnd / + CCV(ccv, t_maxseg)); } break; } From owner-svn-src-head@freebsd.org Wed Jun 24 14:47:52 2020 Return-Path: Delivered-To: svn-src-head@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 74F0535066E; Wed, 24 Jun 2020 14:47:52 +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 49sQx41Z9Jz4DTD; Wed, 24 Jun 2020 14:47:52 +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 2C3D313784; Wed, 24 Jun 2020 14:47:52 +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 05OElqfY076654; Wed, 24 Jun 2020 14:47:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OElpnd076653; Wed, 24 Jun 2020 14:47:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006241447.05OElpnd076653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 24 Jun 2020 14:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362581 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 14:47:52 -0000 Author: tuexen Date: Wed Jun 24 14:47:51 2020 New Revision: 362581 URL: https://svnweb.freebsd.org/changeset/base/362581 Log: Fix the acconting for fragmented unordered messages when using interleaving. This was reported for the userland stack in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19321 MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Jun 24 13:52:53 2020 (r362580) +++ head/sys/netinet/sctp_indata.c Wed Jun 24 14:47:51 2020 (r362581) @@ -1111,6 +1111,16 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct #endif SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); + if (asoc->size_on_all_streams >= control->length) { + asoc->size_on_all_streams -= control->length; + } else { +#ifdef INVARIANTS + panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, control->length); +#else + asoc->size_on_all_streams = 0; +#endif + } + sctp_ucount_decr(asoc->cnt_on_all_streams); control->on_strm_q = 0; } if (control->on_read_q == 0) { @@ -1391,7 +1401,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc } /* Must be added to the stream-in queue */ if (created_control) { - if (unordered == 0) { + if ((unordered == 0) || (asoc->idata_supported)) { sctp_ucount_incr(asoc->cnt_on_all_streams); } if (sctp_place_control_in_stream(strm, asoc, control)) { From owner-svn-src-head@freebsd.org Wed Jun 24 15:05:43 2020 Return-Path: Delivered-To: svn-src-head@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 55292350EE9; Wed, 24 Jun 2020 15:05:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49sRKg0yQgz4Fn2; Wed, 24 Jun 2020 15:05:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15C461373E; Wed, 24 Jun 2020 15:05:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OF5gw1088923; Wed, 24 Jun 2020 15:05:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OF5gu0088922; Wed, 24 Jun 2020 15:05:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006241505.05OF5gu0088922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 24 Jun 2020 15:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362582 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 362582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 15:05:43 -0000 Author: markj Date: Wed Jun 24 15:05:42 2020 New Revision: 362582 URL: https://svnweb.freebsd.org/changeset/base/362582 Log: ipfw(8): In fill_ip6(), use a single statement for both "me" and "me6". Submitted by: Neel Chauhan Reviewed by: rgrimes, Lutz Donnerhacke MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24403 Modified: head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/ipv6.c ============================================================================== --- head/sbin/ipfw/ipv6.c Wed Jun 24 14:47:51 2020 (r362581) +++ head/sbin/ipfw/ipv6.c Wed Jun 24 15:05:42 2020 (r362582) @@ -342,13 +342,8 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, stru if (strcmp(av, "any") == 0) return (1); - - if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ - cmd->o.len |= F_INSN_SIZE(ipfw_insn); - return (1); - } - - if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ + /* Set the data for "me" opt */ + if (strcmp(av, "me") == 0 || strcmp(av, "me6") == 0) { cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } From owner-svn-src-head@freebsd.org Wed Jun 24 15:20:01 2020 Return-Path: Delivered-To: svn-src-head@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 EEF86351407; Wed, 24 Jun 2020 15:20:01 +0000 (UTC) (envelope-from mhorne@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 49sRf960lMz4H0c; Wed, 24 Jun 2020 15:20:01 +0000 (UTC) (envelope-from mhorne@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 C946A137EB; Wed, 24 Jun 2020 15:20:01 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OFK1k2095196; Wed, 24 Jun 2020 15:20:01 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OFK1Bm095191; Wed, 24 Jun 2020 15:20:01 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006241520.05OFK1Bm095191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 24 Jun 2020 15:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362583 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 362583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 15:20:02 -0000 Author: mhorne Date: Wed Jun 24 15:20:00 2020 New Revision: 362583 URL: https://svnweb.freebsd.org/changeset/base/362583 Log: Handle load from loader(8) In locore, we must detect and handle different arguments passed by loader(8) compared to what we recieve when booting directly via SBI firmware. Currently we receive the hart ID in a0 and a pointer to the device tree blob in a1. loader(8) provides only a pointer to its metadata in a0. The solution to this is to add an additional entry point, _alt_start. This will be placed first in the .text section, so SBI firmware will enter here, and jump to the common pagetable setup shortly after. Since loader(8) understands our ELF kernel, it will enter at the ELF's entry address, which points to _start. This approach leads to very little guesswork as to which way we booted. Fix-up initriscv() to parse the loader's metadata, continuing to use fake_preload_metadata() in the SBI direct boot case. Reviewed by: markj, jrtc27 (asm portion) Differential Revision: https://reviews.freebsd.org/D24912 Modified: head/sys/riscv/include/machdep.h head/sys/riscv/riscv/genassym.c head/sys/riscv/riscv/locore.S head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/include/machdep.h ============================================================================== --- head/sys/riscv/include/machdep.h Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/include/machdep.h Wed Jun 24 15:20:00 2020 (r362583) @@ -43,12 +43,12 @@ struct riscv_bootparams { vm_offset_t kern_stack; vm_offset_t dtbp_virt; /* Device tree blob virtual addr */ vm_offset_t dtbp_phys; /* Device tree blob physical addr */ + vm_offset_t modulep; /* loader(8) metadata */ }; extern vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; extern u_int physmap_idx; -vm_offset_t fake_preload_metadata(struct riscv_bootparams *rbp); void initriscv(struct riscv_bootparams *); #endif /* _MACHINE_MACHDEP_H_ */ Modified: head/sys/riscv/riscv/genassym.c ============================================================================== --- head/sys/riscv/riscv/genassym.c Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/riscv/genassym.c Wed Jun 24 15:20:00 2020 (r362583) @@ -107,3 +107,4 @@ ASSYM(RISCV_BOOTPARAMS_KERN_STACK, offsetof(struct ris kern_stack)); ASSYM(RISCV_BOOTPARAMS_DTBP_VIRT, offsetof(struct riscv_bootparams, dtbp_virt)); ASSYM(RISCV_BOOTPARAMS_DTBP_PHYS, offsetof(struct riscv_bootparams, dtbp_phys)); +ASSYM(RISCV_BOOTPARAMS_MODULEP, offsetof(struct riscv_bootparams, modulep)); Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/riscv/locore.S Wed Jun 24 15:20:00 2020 (r362583) @@ -46,24 +46,24 @@ .globl kernbase .set kernbase, KERNBASE - /* Trap entries */ .text - - /* Reset vector */ - .text - .globl _start -_start: +/* + * Alternate entry point. Used when booting via SBI firmware. It must be placed + * at the beginning of the .text section. Arguments are as follows: + * - a0 = hart ID + * - a1 = dtbp + * + * Multiple CPUs might enter from this point, so we perform a hart lottery and + * send the losers to mpentry. + */ + .globl _alt_start +_alt_start: /* Set the global pointer */ .option push .option norelax lla gp, __global_pointer$ .option pop - /* - * a0 = hart id - * a1 = dtbp - */ - /* Pick a hart to run the boot process. */ lla t0, hart_lottery li t1, 1 @@ -75,11 +75,43 @@ _start: */ beqz t0, 1f j mpentry +1: + /* Store the boot hart */ + lla t0, boot_hart + sw a0, 0(t0) + /* Load zero as modulep */ + mv a0, zero + j pagetables + +/* + * Main entry point. This routine is marked as the ELF entry, and is where + * loader(8) will enter the kernel. Arguments are as follows: + * - a0 = modulep + * - a1 = ??? + * + * It is expected that only a single CPU will enter here. + */ + .globl _start +_start: + /* Set the global pointer */ +.option push +.option norelax + lla gp, __global_pointer$ +.option pop + /* - * Page tables + * Zero a1 to indicate that we have no DTB pointer. It is already + * included in the loader(8) metadata. */ -1: + mv a1, zero + + /* + * Page tables setup + * a0 - modulep or zero + * a1 - zero or dtbp + */ +pagetables: /* Get the kernel's load address */ jal get_physmem @@ -107,7 +139,7 @@ _start: li t2, 512 /* Build 512 entries */ add t3, t4, t2 li t5, 0 -2: +1: li t0, (PTE_KERN | PTE_X) slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */ or t5, t0, t2 @@ -115,7 +147,7 @@ _start: addi s1, s1, PTE_SIZE addi t4, t4, 1 - bltu t4, t3, 2b + bltu t4, t3, 1b /* Create an L1 page for early devmap */ lla s1, pagetable_l1 @@ -135,6 +167,9 @@ _start: add t0, s1, a5 sd t6, (t0) + /* Check if we have a DTB that needs to be mapped */ + beqz a1, 2f + /* Create an L2 page superpage for DTB */ lla s1, pagetable_l2_devmap mv s2, a1 @@ -156,6 +191,7 @@ _start: /* Page tables END */ /* Setup supervisor trap vector */ +2: lla t0, va sub t0, t0, s9 li t1, KERNBASE @@ -201,12 +237,6 @@ va: addi s0, s0, 8 bltu s0, s1, 1b -#ifdef SMP - /* Store boot hart id. */ - la t0, boot_hart - sw a0, 0(t0) -#endif - /* Fill riscv_bootparams */ la t0, pagetable_l1 sd t0, RISCV_BOOTPARAMS_KERN_L1PT(sp) @@ -222,6 +252,8 @@ va: add t0, t0, t1 sd t0, RISCV_BOOTPARAMS_DTBP_VIRT(sp) sd a1, RISCV_BOOTPARAMS_DTBP_PHYS(sp) + + sd a0, RISCV_BOOTPARAMS_MODULEP(sp) mv a0, sp call _C_LABEL(initriscv) /* Off we go */ Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Wed Jun 24 15:05:42 2020 (r362582) +++ head/sys/riscv/riscv/machdep.c Wed Jun 24 15:20:00 2020 (r362583) @@ -122,7 +122,9 @@ int64_t dcache_line_size; /* The minimum D cache line int64_t icache_line_size; /* The minimum I cache line size */ int64_t idcache_line_size; /* The minimum cache line size */ -uint32_t boot_hart; /* The hart we booted on. */ +#define BOOT_HART_INVALID 0xffffffff +uint32_t boot_hart = BOOT_HART_INVALID; /* The hart we booted on. */ + cpuset_t all_harts; extern int *end; @@ -723,12 +725,11 @@ cache_setup(void) /* * Fake up a boot descriptor table. - * RISCVTODO: This needs to be done via loader (when it's available). */ -vm_offset_t +static void fake_preload_metadata(struct riscv_bootparams *rvbp) { - static uint32_t fake_preload[35]; + static uint32_t fake_preload[48]; vm_offset_t lastaddr; size_t fake_size, dtb_size; @@ -771,6 +772,14 @@ fake_preload_metadata(struct riscv_bootparams *rvbp) memmove((void *)lastaddr, (const void *)rvbp->dtbp_virt, dtb_size); lastaddr = roundup(lastaddr + dtb_size, sizeof(int)); + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_METADATA | MODINFOMD_KERNEND); + PRELOAD_PUSH_VALUE(uint32_t, sizeof(vm_offset_t)); + PRELOAD_PUSH_VALUE(vm_offset_t, lastaddr); + + PRELOAD_PUSH_VALUE(uint32_t, MODINFO_METADATA | MODINFOMD_HOWTO); + PRELOAD_PUSH_VALUE(uint32_t, sizeof(int)); + PRELOAD_PUSH_VALUE(int, RB_VERBOSE); + /* End marker */ PRELOAD_PUSH_VALUE(uint32_t, 0); PRELOAD_PUSH_VALUE(uint32_t, 0); @@ -789,7 +798,38 @@ fake_preload_metadata(struct riscv_bootparams *rvbp) printf("FDT phys (%lx-%lx), kernel phys (%lx-%lx)\n", rvbp->dtbp_phys, rvbp->dtbp_phys + dtb_size, rvbp->kern_phys, rvbp->kern_phys + (lastaddr - KERNBASE)); +} +static vm_offset_t +parse_metadata(void) +{ + caddr_t kmdp; + vm_offset_t lastaddr; +#ifdef DDB + vm_offset_t ksym_start, ksym_end; +#endif + char *kern_envp; + + /* Find the kernel address */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + KASSERT(kmdp != NULL, ("No preload metadata found!")); + + /* Read the boot metadata */ + boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); + lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); + kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); + if (kern_envp != NULL) + init_static_kenv(kern_envp, 0); +#ifdef DDB + ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); + ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); + db_fetch_ksymtab(ksym_start, ksym_end); +#endif +#ifdef FDT + try_load_dtb(kmdp); +#endif return (lastaddr); } @@ -801,14 +841,16 @@ initriscv(struct riscv_bootparams *rvbp) int mem_regions_sz; vm_offset_t lastaddr; vm_size_t kernlen; - caddr_t kmdp; +#ifdef FDT + phandle_t chosen; + uint32_t hart; +#endif TSRAW(&thread0, TS_ENTER, __func__, NULL); /* Set the pcpu data, this is needed by pmap_bootstrap */ pcpup = &__pcpu[0]; pcpu_init(pcpup, 0, sizeof(struct pcpu)); - pcpup->pc_hart = boot_hart; /* Set the pcpu pointer */ __asm __volatile("mv tp, %0" :: "r"(pcpup)); @@ -818,22 +860,31 @@ initriscv(struct riscv_bootparams *rvbp) /* Initialize SBI interface. */ sbi_init(); - /* Set the module data location */ - lastaddr = fake_preload_metadata(rvbp); + /* Parse the boot metadata. */ + if (rvbp->modulep != 0) { + preload_metadata = (caddr_t)rvbp->modulep; + } else { + fake_preload_metadata(rvbp); + } + lastaddr = parse_metadata(); - /* Find the kernel address */ - kmdp = preload_search_by_type("elf kernel"); - if (kmdp == NULL) - kmdp = preload_search_by_type("elf64 kernel"); - - boothowto = RB_VERBOSE | RB_SINGLE; - boothowto = RB_VERBOSE; - - kern_envp = NULL; - #ifdef FDT - try_load_dtb(kmdp); + /* + * Look for the boot hart ID. This was either passed in directly from + * the SBI firmware and handled by locore, or was stored in the device + * tree by an earlier boot stage. + */ + chosen = OF_finddevice("/chosen"); + if (OF_getencprop(chosen, "boot-hartid", &hart, sizeof(hart)) != -1) { + boot_hart = hart; + } +#endif + if (boot_hart == BOOT_HART_INVALID) { + panic("Boot hart ID was not properly set"); + } + pcpup->pc_hart = boot_hart; +#ifdef FDT /* * Exclude reserved memory specified by the device tree. Typically, * this contains an entry for memory used by the runtime SBI firmware. From owner-svn-src-head@freebsd.org Wed Jun 24 15:21:12 2020 Return-Path: Delivered-To: svn-src-head@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 A604F35113B; Wed, 24 Jun 2020 15:21:12 +0000 (UTC) (envelope-from mhorne@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 49sRgX3z3Kz4HKP; Wed, 24 Jun 2020 15:21:12 +0000 (UTC) (envelope-from mhorne@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 83AFD13AEF; Wed, 24 Jun 2020 15:21:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OFLCHC096814; Wed, 24 Jun 2020 15:21:12 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OFLCPT096813; Wed, 24 Jun 2020 15:21:12 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006241521.05OFLCPT096813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 24 Jun 2020 15:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362584 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 362584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 15:21:12 -0000 Author: mhorne Date: Wed Jun 24 15:21:12 2020 New Revision: 362584 URL: https://svnweb.freebsd.org/changeset/base/362584 Log: Only invalidate the early DTB mapping if it exists This temporary mapping will become optional. Booting via loader(8) means that the DTB will have already been copied into the kernel's staging area, and is therefore covered by the early KVA mappings. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D24911 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Wed Jun 24 15:20:00 2020 (r362583) +++ head/sys/riscv/riscv/pmap.c Wed Jun 24 15:21:12 2020 (r362584) @@ -619,8 +619,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, * possibility of an aliased mapping in the future. */ l2p = pmap_l2(kernel_pmap, VM_EARLY_DTB_ADDRESS); - KASSERT((pmap_load(l2p) & PTE_V) != 0, ("dtpb not mapped")); - pmap_clear(l2p); + if ((pmap_load(l2p) & PTE_V) != 0) + pmap_clear(l2p); sfence_vma(); From owner-svn-src-head@freebsd.org Wed Jun 24 15:46:34 2020 Return-Path: Delivered-To: svn-src-head@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 4CBC4351949; Wed, 24 Jun 2020 15:46:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49sSDp1GhNz4Jrk; Wed, 24 Jun 2020 15:46:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 229E2142BD; Wed, 24 Jun 2020 15:46:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OFkX9q014266; Wed, 24 Jun 2020 15:46:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OFkXNQ014265; Wed, 24 Jun 2020 15:46:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006241546.05OFkXNQ014265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 24 Jun 2020 15:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362585 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 362585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 15:46:34 -0000 Author: markj Date: Wed Jun 24 15:46:33 2020 New Revision: 362585 URL: https://svnweb.freebsd.org/changeset/base/362585 Log: ipfw(4): make O_IPVER/ipversion match IPv4 or 6, not just IPv4. Submitted by: Neel Chauhan Reviewed by: Lutz Donnerhacke MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25227 Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Wed Jun 24 15:21:12 2020 (r362584) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed Jun 24 15:46:33 2020 (r362585) @@ -2225,7 +2225,7 @@ do { \ break; case O_IPVER: - match = (is_ipv4 && + match = ((is_ipv4 || is_ipv6) && cmd->arg1 == ip->ip_v); break; From owner-svn-src-head@freebsd.org Wed Jun 24 17:03:44 2020 Return-Path: Delivered-To: svn-src-head@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 E6045353C3E; Wed, 24 Jun 2020 17:03:44 +0000 (UTC) (envelope-from cem@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 49sTxr5cVCz4PYb; Wed, 24 Jun 2020 17:03:44 +0000 (UTC) (envelope-from cem@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 BBE52150D7; Wed, 24 Jun 2020 17:03:44 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OH3i6E063212; Wed, 24 Jun 2020 17:03:44 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OH3htJ063205; Wed, 24 Jun 2020 17:03:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006241703.05OH3htJ063205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 24 Jun 2020 17:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362587 - in head: . lib/clang/libclang share/mk targets/pseudo/bootstrap-tools targets/pseudo/clang tools/build/mk tools/build/options usr.bin/clang X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . lib/clang/libclang share/mk targets/pseudo/bootstrap-tools targets/pseudo/clang tools/build/mk tools/build/options usr.bin/clang X-SVN-Commit-Revision: 362587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 17:03:45 -0000 Author: cem Date: Wed Jun 24 17:03:42 2020 New Revision: 362587 URL: https://svnweb.freebsd.org/changeset/base/362587 Log: Add WITH_CLANG_FORMAT option clang-format is enabled conditional on either WITH_CLANG_EXTRAS or WITH_CLANG_FORMAT. Some sources in libclang are build conditional on either rule, and obviously the clang-format binary itself depends on the rule. clang-format could still use a manual page. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D25427 Added: head/tools/build/options/WITH_CLANG_FORMAT (contents, props changed) Modified: head/Makefile.inc1 head/lib/clang/libclang/Makefile head/share/mk/src.opts.mk head/targets/pseudo/bootstrap-tools/Makefile head/targets/pseudo/clang/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 24 16:17:58 2020 (r362586) +++ head/Makefile.inc1 Wed Jun 24 17:03:42 2020 (r362587) @@ -676,7 +676,7 @@ BSARGS= DESTDIR= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \ MK_INCLUDES=yes @@ -697,7 +697,7 @@ TMAKE= \ SSP_CFLAGS= \ -DNO_LINT \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no # cross-tools stage @@ -2577,6 +2577,7 @@ NXBMAKEARGS+= \ SSP_CFLAGS= \ MK_CASPER=no \ MK_CLANG_EXTRAS=no \ + MK_CLANG_FORMAT=no \ MK_CLANG_FULL=no \ MK_CTF=no \ MK_DEBUG_FILES=no \ Modified: head/lib/clang/libclang/Makefile ============================================================================== --- head/lib/clang/libclang/Makefile Wed Jun 24 16:17:58 2020 (r362586) +++ head/lib/clang/libclang/Makefile Wed Jun 24 17:03:42 2020 (r362587) @@ -22,7 +22,7 @@ SRCDIR= clang/lib # Explanation of different SRCS variants below: # SRCS_MIN: always required, even for bootstrap -# SRCS_EXT: required for MK_CLANG_EXTRAS +# SRCS_EXT: required for MK_CLANG_EXTRAS || MK_CLANG_FORMAT # SRCS_FUL: required for MK_CLANG_FULL # SRCS_LDB: required for MK_LLDB @@ -686,7 +686,7 @@ SRCS_MIN+= Tooling/RefactoringCallbacks.cpp SRCS_MIN+= Tooling/Tooling.cpp SRCS_ALL+= ${SRCS_MIN} -.if ${MK_CLANG_EXTRAS} != "no" +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no" SRCS_ALL+= ${SRCS_EXT} .endif .if ${MK_CLANG_FULL} != "no" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 24 16:17:58 2020 (r362586) +++ head/share/mk/src.opts.mk Wed Jun 24 17:03:42 2020 (r362587) @@ -202,6 +202,7 @@ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ BSD_GREP \ CLANG_EXTRAS \ + CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ GNU_GREP_COMPAT \ @@ -482,6 +483,7 @@ MK_LLDB:= no .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no +MK_CLANG_FORMAT:= no MK_CLANG_FULL:= no MK_LLVM_COV:= no .endif Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Wed Jun 24 16:17:58 2020 (r362586) +++ head/targets/pseudo/bootstrap-tools/Makefile Wed Jun 24 17:03:42 2020 (r362587) @@ -43,7 +43,7 @@ BSARGS= DESTDIR= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ + MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Wed Jun 24 16:17:58 2020 (r362586) +++ head/targets/pseudo/clang/Makefile.depend Wed Jun 24 17:03:42 2020 (r362587) @@ -42,7 +42,6 @@ DIRDEPS+= \ .if ${MK_CLANG_EXTRAS} == "yes" DIRDEPS+= \ usr.bin/clang/bugpoint \ - usr.bin/clang/clang-format \ usr.bin/clang/llc \ usr.bin/clang/lli \ usr.bin/clang/llvm-ar \ @@ -69,6 +68,10 @@ DIRDEPS+= \ usr.bin/clang/llvm-xray \ usr.bin/clang/opt \ +.endif + +.if ${MK_CLANG_EXTRAS} == "yes" || ${MK_CLANG_FORMAT} == "yes" +DIRDEPS+= usr.bin/clang/clang-format .endif .if ${MK_LLD} == "yes" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 24 16:17:58 2020 (r362586) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 24 17:03:42 2020 (r362587) @@ -1481,7 +1481,6 @@ OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz .if ${MK_CLANG_EXTRAS} == no OLD_FILES+=usr/bin/bugpoint -OLD_FILES+=usr/bin/clang-format OLD_FILES+=usr/bin/llc OLD_FILES+=usr/bin/lli OLD_FILES+=usr/bin/llvm-as @@ -1515,6 +1514,10 @@ OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz +.endif + +.if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no +OLD_FILES+=usr/bin/clang-format .endif .if ${MK_CPP} == no Added: head/tools/build/options/WITH_CLANG_FORMAT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_CLANG_FORMAT Wed Jun 24 17:03:42 2020 (r362587) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build clang-format. Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Wed Jun 24 16:17:58 2020 (r362586) +++ head/usr.bin/clang/Makefile Wed Jun 24 17:03:42 2020 (r362587) @@ -18,7 +18,6 @@ SUBDIR+= llvm-symbolizer .if ${MK_CLANG_EXTRAS} != "no" SUBDIR+= bugpoint -SUBDIR+= clang-format SUBDIR+= llc SUBDIR+= lli SUBDIR+= llvm-as @@ -40,6 +39,10 @@ SUBDIR+= llvm-pdbutil SUBDIR+= llvm-rtdyld SUBDIR+= llvm-xray SUBDIR+= opt +.endif + +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no" +SUBDIR+= clang-format .endif .if ${MK_LLD} != "no" From owner-svn-src-head@freebsd.org Wed Jun 24 17:31:22 2020 Return-Path: Delivered-To: svn-src-head@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 5F22135450C; Wed, 24 Jun 2020 17:31:22 +0000 (UTC) (envelope-from cem@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 49sVYk1wg0z4RMY; Wed, 24 Jun 2020 17:31:22 +0000 (UTC) (envelope-from cem@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 3D52F15542; Wed, 24 Jun 2020 17:31:22 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OHVMpI079274; Wed, 24 Jun 2020 17:31:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OHVM7g079273; Wed, 24 Jun 2020 17:31:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006241731.05OHVM7g079273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 24 Jun 2020 17:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362588 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 362588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 17:31:22 -0000 Author: cem Date: Wed Jun 24 17:31:21 2020 New Revision: 362588 URL: https://svnweb.freebsd.org/changeset/base/362588 Log: Regenerate src.conf.5 after r362587 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Jun 24 17:03:42 2020 (r362587) +++ head/share/man/man5/src.conf.5 Wed Jun 24 17:31:21 2020 (r362588) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 6, 2020 +.Dd June 24, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -321,6 +321,8 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_EXTRAS .It +.Va WITHOUT_CLANG_FORMAT +.It .Va WITHOUT_CLANG_FULL .It .Va WITHOUT_LLVM_COV @@ -333,6 +335,8 @@ enabled unless an alternate compiler is provided via X .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint and clang-format. +.It Va WITH_CLANG_FORMAT +Set to build clang-format. .It Va WITHOUT_CLANG_FULL Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. @@ -441,6 +445,8 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_EXTRAS .It +.Va WITHOUT_CLANG_FORMAT +.It .Va WITHOUT_CLANG_FULL .It .Va WITHOUT_DTRACE_TESTS @@ -1623,6 +1629,8 @@ When set, it enforces these options: .Va WITHOUT_CLANG .It .Va WITHOUT_CLANG_EXTRAS +.It +.Va WITHOUT_CLANG_FORMAT .It .Va WITHOUT_CLANG_FULL .It From owner-svn-src-head@freebsd.org Wed Jun 24 17:54:30 2020 Return-Path: Delivered-To: svn-src-head@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 7D4BB355991; Wed, 24 Jun 2020 17:54:30 +0000 (UTC) (envelope-from jhb@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 49sW4N6dHyz3VGv; Wed, 24 Jun 2020 17:54:28 +0000 (UTC) (envelope-from jhb@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 0A933159EE; Wed, 24 Jun 2020 17:54:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OHsQ3l018095; Wed, 24 Jun 2020 17:54:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OHsPvS018050; Wed, 24 Jun 2020 17:54:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006241754.05OHsPvS018050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 Jun 2020 17:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/lib/csu: aarch64 arm i386 riscv X-SVN-Commit-Revision: 362589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 17:54:30 -0000 Author: jhb Date: Wed Jun 24 17:54:24 2020 New Revision: 362589 URL: https://svnweb.freebsd.org/changeset/base/362589 Log: Always compile the brand and ignore init ELF notes standalone. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25374 Modified: head/lib/csu/aarch64/Makefile head/lib/csu/aarch64/crt1_s.S head/lib/csu/arm/Makefile head/lib/csu/arm/crt1_s.S head/lib/csu/i386/Makefile head/lib/csu/i386/crt1_s.S head/lib/csu/riscv/Makefile head/lib/csu/riscv/crt1_s.S Modified: head/lib/csu/aarch64/Makefile ============================================================================== --- head/lib/csu/aarch64/Makefile Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/aarch64/Makefile Wed Jun 24 17:54:24 2020 (r362589) @@ -18,20 +18,21 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} -crt1.o: crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} .include Modified: head/lib/csu/aarch64/crt1_s.S ============================================================================== --- head/lib/csu/aarch64/crt1_s.S Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/aarch64/crt1_s.S Wed Jun 24 17:54:24 2020 (r362589) @@ -32,9 +32,6 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" - ENTRY(_start) mov x3, x2 /* cleanup */ add x1, x0, #8 /* load argv */ Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/arm/Makefile Wed Jun 24 17:54:24 2020 (r362589) @@ -18,23 +18,24 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o crt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -crt1.o: crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} .include Modified: head/lib/csu/arm/crt1_s.S ============================================================================== --- head/lib/csu/arm/crt1_s.S Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/arm/crt1_s.S Wed Jun 24 17:54:24 2020 (r362589) @@ -44,8 +44,9 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" +#include +#include +#include "notes.h" ENTRY(_start) mov r5, r2 /* cleanup */ Modified: head/lib/csu/i386/Makefile ============================================================================== --- head/lib/csu/i386/Makefile Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/i386/Makefile Wed Jun 24 17:54:24 2020 (r362589) @@ -18,22 +18,23 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} -crt1.o: crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} ${OBJCOPY} --localize-symbol _start1 Scrt1.o .include Modified: head/lib/csu/i386/crt1_s.S ============================================================================== --- head/lib/csu/i386/crt1_s.S Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/i386/crt1_s.S Wed Jun 24 17:54:24 2020 (r362589) @@ -25,9 +25,6 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" - .text .align 4 .globl _start Modified: head/lib/csu/riscv/Makefile ============================================================================== --- head/lib/csu/riscv/Makefile Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/riscv/Makefile Wed Jun 24 17:54:24 2020 (r362589) @@ -18,20 +18,21 @@ FILESDIR= ${LIBDIR} .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o +CLEANFILES+= crtbrand.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o +gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} -crt1.o: crt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o +crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crt1_s.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o +Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} .include Modified: head/lib/csu/riscv/crt1_s.S ============================================================================== --- head/lib/csu/riscv/crt1_s.S Wed Jun 24 17:31:21 2020 (r362588) +++ head/lib/csu/riscv/crt1_s.S Wed Jun 24 17:54:24 2020 (r362589) @@ -36,9 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" -#include "ignore_init_note.S" - ENTRY(_start) mv a3, a2 # cleanup addi a1, a0, 8 # get argv From owner-svn-src-head@freebsd.org Wed Jun 24 18:40:43 2020 Return-Path: Delivered-To: svn-src-head@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 AEEC5340819; Wed, 24 Jun 2020 18:40:43 +0000 (UTC) (envelope-from cem@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 49sX5l48b6z3yMX; Wed, 24 Jun 2020 18:40:43 +0000 (UTC) (envelope-from cem@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 89E0F16519; Wed, 24 Jun 2020 18:40:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OIehCl052415; Wed, 24 Jun 2020 18:40:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OIehlS052414; Wed, 24 Jun 2020 18:40:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006241840.05OIehlS052414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 24 Jun 2020 18:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362590 - head X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 18:40:43 -0000 Author: cem Date: Wed Jun 24 18:40:43 2020 New Revision: 362590 URL: https://svnweb.freebsd.org/changeset/base/362590 Log: Update .clang-format with style(9) header-sorting Thanks to work done in the NetBSD clang-format project. No functional change. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D25428 Modified: head/.clang-format Modified: head/.clang-format ============================================================================== --- head/.clang-format Wed Jun 24 17:54:24 2020 (r362589) +++ head/.clang-format Wed Jun 24 18:40:43 2020 (r362590) @@ -64,7 +64,54 @@ TabWidth: 8 ColumnLimit: 80 UseTab: Always SpaceAfterCStyleCast: false -SortIncludes: false +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^\"opt_.*\.h\"' + Priority: 1 + SortPriority: 10 + - Regex: '^' + Priority: 2 + SortPriority: 20 + - Regex: '^' + Priority: 2 + SortPriority: 21 + - Regex: '^' + Priority: 2 + SortPriority: 22 + - Regex: '^' + Priority: 3 + SortPriority: 30 + - Regex: '^ Delivered-To: svn-src-head@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 4B973340EC2; Wed, 24 Jun 2020 18:51:02 +0000 (UTC) (envelope-from ngie@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 49sXKf1NyJz3ynw; Wed, 24 Jun 2020 18:51:02 +0000 (UTC) (envelope-from ngie@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 28555163D7; Wed, 24 Jun 2020 18:51:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OIp2CN057899; Wed, 24 Jun 2020 18:51:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OIp2gh057898; Wed, 24 Jun 2020 18:51:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202006241851.05OIp2gh057898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 24 Jun 2020 18:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362591 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 18:51:02 -0000 Author: ngie Date: Wed Jun 24 18:51:01 2020 New Revision: 362591 URL: https://svnweb.freebsd.org/changeset/base/362591 Log: Add `kern.features.witness` Adding `kern.features.witness` helps expose whether or not the kernel has `options WITNESS` enabled, so the `feature_present(3)` API can be used to query whether or not witness(9) is built into the kernel. This support is helpful with userspace applications (generally speaking, tests), as it can be queried to determine whether or not tests related to WITNESS should be run. MFC after: 1 week Reviewed by: cem, darrick.freebsd_gmail.com Differential Revision: https://reviews.freebsd.org/D25302 Sponsored by: DellEMC Isilon Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Wed Jun 24 18:40:43 2020 (r362590) +++ head/sys/kern/subr_witness.c Wed Jun 24 18:51:01 2020 (r362591) @@ -361,6 +361,8 @@ static int witness_output(const char *fmt, ...) __prin static int witness_voutput(const char *fmt, va_list ap) __printflike(1, 0); static void witness_setflag(struct lock_object *lock, int flag, int set); +FEATURE(witness, "kernel has witness(9) support"); + static SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "Witness Locking"); From owner-svn-src-head@freebsd.org Wed Jun 24 19:51:04 2020 Return-Path: Delivered-To: svn-src-head@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 3AF283421A2; Wed, 24 Jun 2020 19:51:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49sYfw0s4fz42K9; Wed, 24 Jun 2020 19:51:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 189D3170CE; Wed, 24 Jun 2020 19:51:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OJp36F095922; Wed, 24 Jun 2020 19:51:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OJp3Bi095920; Wed, 24 Jun 2020 19:51:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006241951.05OJp3Bi095920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 24 Jun 2020 19:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362592 - in head: share/man/man4 sys/dev/acpi_support X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/acpi_support X-SVN-Commit-Revision: 362592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 19:51:04 -0000 Author: markj Date: Wed Jun 24 19:51:03 2020 New Revision: 362592 URL: https://svnweb.freebsd.org/changeset/base/362592 Log: acpi_ibm(4): Rename disengaged mode to unthrottled mode. This mode was added in r362496. Rename it to make the meaning more clear. PR: 247306 Suggested by: rpokala Submitted by: Ali Abdallah MFC with: r362496 Modified: head/share/man/man4/acpi_ibm.4 head/sys/dev/acpi_support/acpi_ibm.c Modified: head/share/man/man4/acpi_ibm.4 ============================================================================== --- head/share/man/man4/acpi_ibm.4 Wed Jun 24 18:51:01 2020 (r362591) +++ head/share/man/man4/acpi_ibm.4 Wed Jun 24 19:51:03 2020 (r362592) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 19, 2020 +.Dd June 24, 2020 .Dt ACPI_IBM 4 .Os .Sh NAME @@ -293,7 +293,7 @@ is not set accordingly. .It Va dev.acpi_ibm.0.fan_level Indicates at what speed the fan should run when being in manual mode. Valid values range from 0 (off) to 7 (max) and 8. -Level 8 is used by the driver to set the fan in disengaged mode. +Level 8 is used by the driver to set the fan in unthrottled mode. In this mode, the fan is set to spin freely and will quickly reach a very high speed. Use this mode only if absolutely necessary, e.g., if the system has reached its @@ -311,7 +311,7 @@ off .It Li 6, 7 ~4300 RPM .It Li 8 -~6400 RPM (Full-speed, disengaged) +~6400 RPM (Full-speed, unthrottled) .El .It Va dev.acpi_ibm.0.fan_speed (read-only) Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Wed Jun 24 18:51:01 2020 (r362591) +++ head/sys/dev/acpi_support/acpi_ibm.c Wed Jun 24 19:51:03 2020 (r362592) @@ -106,7 +106,7 @@ ACPI_MODULE_NAME("IBM") #define IBM_EC_MASK_MUTE (1 << 6) #define IBM_EC_FANSTATUS 0x2F #define IBM_EC_MASK_FANLEVEL 0x3f -#define IBM_EC_MASK_FANDISENGAGED (1 << 6) +#define IBM_EC_MASK_FANUNTHROTTLED (1 << 6) #define IBM_EC_MASK_FANSTATUS (1 << 7) #define IBM_EC_FANSPEED 0x84 @@ -265,7 +265,7 @@ static struct { .name = "fan_level", .method = ACPI_IBM_METHOD_FANLEVEL, .description = "Fan level, 0-7 (recommended max), " - "8 (disengaged, full-speed)", + "8 (unthrottled, full-speed)", }, { .name = "fan", @@ -831,7 +831,7 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int met */ if (!sc->fan_handle) { ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); - if (val_ec & IBM_EC_MASK_FANDISENGAGED) + if (val_ec & IBM_EC_MASK_FANUNTHROTTLED) val = 8; else val = val_ec & IBM_EC_MASK_FANLEVEL; @@ -924,11 +924,11 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int met /* Read the current fan status. */ ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1); val = val_ec & ~(IBM_EC_MASK_FANLEVEL | - IBM_EC_MASK_FANDISENGAGED); + IBM_EC_MASK_FANUNTHROTTLED); if (arg == 8) - /* Full speed, set the disengaged bit. */ - val |= 7 | IBM_EC_MASK_FANDISENGAGED; + /* Full speed, set the unthrottled bit. */ + val |= 7 | IBM_EC_MASK_FANUNTHROTTLED; else val |= arg; From owner-svn-src-head@freebsd.org Wed Jun 24 22:42:47 2020 Return-Path: Delivered-To: svn-src-head@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 3581B344E96; Wed, 24 Jun 2020 22:42:47 +0000 (UTC) (envelope-from cem@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 49sdT30ffWz4BpC; Wed, 24 Jun 2020 22:42:47 +0000 (UTC) (envelope-from cem@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 11C3D19486; Wed, 24 Jun 2020 22:42:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OMgkoQ007517; Wed, 24 Jun 2020 22:42:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OMgk1K007516; Wed, 24 Jun 2020 22:42:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006242242.05OMgk1K007516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 24 Jun 2020 22:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362595 - head X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 22:42:47 -0000 Author: cem Date: Wed Jun 24 22:42:46 2020 New Revision: 362595 URL: https://svnweb.freebsd.org/changeset/base/362595 Log: Update .clang-format type and foreach macros lists No functional change. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D25429 Modified: head/.clang-format Modified: head/.clang-format ============================================================================== --- head/.clang-format Wed Jun 24 20:23:37 2020 (r362594) +++ head/.clang-format Wed Jun 24 22:42:46 2020 (r362595) @@ -29,30 +29,53 @@ CompactNamespaces: true DerivePointerAlignment: false DisableFormat: false ForEachMacros: + - ARB_ARRFOREACH + - ARB_ARRFOREACH_REVWCOND + - ARB_ARRFOREACH_REVERSE + - ARB_FOREACH + - ARB_FOREACH_FROM + - ARB_FOREACH_SAFE + - ARB_FOREACH_REVERSE + - ARB_FOREACH_REVERSE_FROM + - ARB_FOREACH_REVERSE_SAFE + - CPU_FOREACH + - FOREACH_THREAD_IN_PROC + - FOREACH_PROC_IN_SYSTEM + - FOREACH_PRISON_CHILD + - FOREACH_PRISON_DESCENDANT + - FOREACH_PRISON_DESCENDANT_LOCKED + - FOREACH_PRISON_DESCENDANT_LOCKED_LEVEL + - MNT_VNODE_FOREACH_ALL + - MNT_VNODE_FOREACH_ACTIVE + - RB_FOREACH + - RB_FOREACH_FROM + - RB_FOREACH_SAFE + - RB_FOREACH_REVERSE + - RB_FOREACH_REVERSE_FROM + - RB_FOREACH_REVERSE_SAFE - SLIST_FOREACH + - SLIST_FOREACH_FROM + - SLIST_FOREACH_FROM_SAFE - SLIST_FOREACH_SAFE + - SLIST_FOREACH_PREVPTR + - SPLAY_FOREACH - LIST_FOREACH + - LIST_FOREACH_FROM + - LIST_FOREACH_FROM_SAFE - LIST_FOREACH_SAFE - STAILQ_FOREACH + - STAILQ_FOREACH_FROM + - STAILQ_FOREACH_FROM_SAFE - STAILQ_FOREACH_SAFE - TAILQ_FOREACH - - TAILQ_FOREACH_SAFE + - TAILQ_FOREACH_FROM + - TAILQ_FOREACH_FROM_SAFE - TAILQ_FOREACH_REVERSE + - TAILQ_FOREACH_REVERSE_FROM + - TAILQ_FOREACH_REVERSE_FROM_SAFE - TAILQ_FOREACH_REVERSE_SAFE - - RB_FOREACH - - RB_FOREACH_SAFE - - RB_FOREACH_FROM - - RB_FOREACH_REVERSE - - RB_FOREACH_REVERSE_FROM - - RB_FOREACH_REVERSE_SAFE - - FOREACH_THREAD_IN_PROC - - FOREACH_PROC_IN_SYSTEM - - FOREACH_PRISON_CHILD - - FOREACH_PRISON_DESCENDANT - - FOREACH_PRISON_DESCENDANT_LOCKED - - FOREACH_PRISON_DESCENDANT_LOCKED_LEVEL - - MNT_VNODE_FOREACH_ALL - - MNT_VNODE_FOREACH_ACTIVE + - TAILQ_FOREACH_SAFE + - VM_MAP_ENTRY_FOREACH IndentCaseLabels: false IndentPPDirectives: None Language: Cpp @@ -113,12 +136,35 @@ IncludeCategories: SortPriority: 100 SortIncludes: true KeepEmptyLinesAtTheStartOfBlocks: true -# The options below will only be supported starting with clang 9.0: -# TODO-CLANG-9: TypenameMacros: -# TODO-CLANG-9: - SLIST_HEAD -# TODO-CLANG-9: - SLIST_ENTRY -# TODO-CLANG-9: - TAILQ_ENTRY -# TODO-CLANG-9: - TAILQ_HEAD -# TODO-CLANG-9: - STAILQ_ENTRY -# TODO-CLANG-9: - STAILQ_HEAD -... +TypenameMacros: + - ARB_ELMTYPE + - ARB_HEAD + - ARB8_HEAD + - ARB16_HEAD + - ARB32_HEAD + - ARB_ENTRY + - ARB8_ENTRY + - ARB16_ENTRY + - ARB32_ENTRY + - LIST_CLASS_ENTRY + - LIST_CLASS_HEAD + - LIST_ENTRY + - LIST_HEAD + - QUEUE_TYPEOF + - RB_ENTRY + - RB_HEAD + - SLIST_CLASS_HEAD + - SLIST_CLASS_ENTRY + - SLIST_HEAD + - SLIST_ENTRY + - SMR_POINTER + - SPLAY_ENTRY + - SPLAY_HEAD + - STAILQ_CLASS_ENTRY + - STAILQ_CLASS_HEAD + - STAILQ_ENTRY + - STAILQ_HEAD + - TAILQ_CLASS_ENTRY + - TAILQ_CLASS_HEAD + - TAILQ_ENTRY + - TAILQ_HEAD From owner-svn-src-head@freebsd.org Wed Jun 24 23:22:36 2020 Return-Path: Delivered-To: svn-src-head@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 A9421345F1E; Wed, 24 Jun 2020 23:22:36 +0000 (UTC) (envelope-from cem@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 49sfM044p6z4DVn; Wed, 24 Jun 2020 23:22:36 +0000 (UTC) (envelope-from cem@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 877C2199F8; Wed, 24 Jun 2020 23:22:36 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ONMamF031725; Wed, 24 Jun 2020 23:22:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ONMatQ031724; Wed, 24 Jun 2020 23:22:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006242322.05ONMatQ031724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 24 Jun 2020 23:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362596 - head X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 23:22:36 -0000 Author: cem Date: Wed Jun 24 23:22:36 2020 New Revision: 362596 URL: https://svnweb.freebsd.org/changeset/base/362596 Log: Clang-format: Avoid hardcoded LLVM include-order style Reported by: emaste Modified: head/.clang-format Modified: head/.clang-format ============================================================================== --- head/.clang-format Wed Jun 24 22:42:46 2020 (r362595) +++ head/.clang-format Wed Jun 24 23:22:36 2020 (r362596) @@ -134,6 +134,12 @@ IncludeCategories: - Regex: '^\".*\.h\"' Priority: 10 SortPriority: 100 +# LLVM's header include ordering style is almost the exact opposite of ours. +# Unfortunately, they have hard-coded their preferences into clang-format. +# Clobbering this regular expression to avoid matching prevents non-system +# headers from being forcibly moved to the top of the include list. +# http://llvm.org/docs/CodingStandards.html#include-style +IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING' SortIncludes: true KeepEmptyLinesAtTheStartOfBlocks: true TypenameMacros: From owner-svn-src-head@freebsd.org Thu Jun 25 00:09:43 2020 Return-Path: Delivered-To: svn-src-head@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 DFC6C347146; Thu, 25 Jun 2020 00:09:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49sgPM5bYGz4GhH; Thu, 25 Jun 2020 00:09:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB45E1A035; Thu, 25 Jun 2020 00:09:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P09hxb056676; Thu, 25 Jun 2020 00:09:43 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P09hUA056675; Thu, 25 Jun 2020 00:09:43 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202006250009.05P09hUA056675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 25 Jun 2020 00:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362599 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 362599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 00:09:43 -0000 Author: wulf Date: Thu Jun 25 00:09:43 2020 New Revision: 362599 URL: https://svnweb.freebsd.org/changeset/base/362599 Log: atkbd/evdev: recognize the Chromebook menu key as F13 like Linux does. This is the key on the right side of the function keys, with the "hamburger menu" icon on it. Submitted by: GregV MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25390 Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c ============================================================================== --- head/sys/dev/evdev/evdev_utils.c Thu Jun 25 00:01:24 2020 (r362598) +++ head/sys/dev/evdev/evdev_utils.c Thu Jun 25 00:09:43 2020 (r362599) @@ -140,7 +140,7 @@ static uint16_t evdev_at_set1_scancodes[] = { KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT, NONE, NONE, KEY_102ND, KEY_F11, KEY_F12, NONE, NONE, NONE, - NONE, NONE, NONE, NONE, + NONE, KEY_F13, NONE, NONE, /* 0x60 - 0x7f */ NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, From owner-svn-src-head@freebsd.org Thu Jun 25 00:18:43 2020 Return-Path: Delivered-To: svn-src-head@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 925F234757F; Thu, 25 Jun 2020 00:18:43 +0000 (UTC) (envelope-from cem@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 49sgbl37LWz4Gty; Thu, 25 Jun 2020 00:18:43 +0000 (UTC) (envelope-from cem@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 66B791A4BF; Thu, 25 Jun 2020 00:18:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P0IheI062945; Thu, 25 Jun 2020 00:18:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P0IgEi062942; Thu, 25 Jun 2020 00:18:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006250018.05P0IgEi062942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 25 Jun 2020 00:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362600 - in head: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve X-SVN-Commit-Revision: 362600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 00:18:43 -0000 Author: cem Date: Thu Jun 25 00:18:42 2020 New Revision: 362600 URL: https://svnweb.freebsd.org/changeset/base/362600 Log: bhyve(8): For prototyping, reattempt decode in userspace If userspace has a newer bhyve than the kernel, it may be able to decode and emulate some instructions vmm.ko is unaware of. In this scenario, reset decoder state and try again. Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D24464 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/include/vmm_instruction_emul.h head/sys/amd64/vmm/vmm_instruction_emul.c head/usr.sbin/bhyve/bhyverun.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Thu Jun 25 00:09:43 2020 (r362599) +++ head/sys/amd64/include/vmm.h Thu Jun 25 00:18:42 2020 (r362600) @@ -546,6 +546,9 @@ _Static_assert(_Alignof(struct vie_op) == 2, "ABI"); struct vie { uint8_t inst[VIE_INST_SIZE]; /* instruction bytes */ uint8_t num_valid; /* size of the instruction */ + +/* The following fields are all zeroed upon restart. */ +#define vie_startzero num_processed uint8_t num_processed; uint8_t addrsize:4, opsize:4; /* address and operand sizes */ Modified: head/sys/amd64/include/vmm_instruction_emul.h ============================================================================== --- head/sys/amd64/include/vmm_instruction_emul.h Thu Jun 25 00:09:43 2020 (r362599) +++ head/sys/amd64/include/vmm_instruction_emul.h Thu Jun 25 00:18:42 2020 (r362600) @@ -105,6 +105,7 @@ int vm_gla2gpa_nofault(struct vm *vm, int vcpuid, stru uint64_t gla, int prot, uint64_t *gpa, int *is_fault); #endif /* _KERNEL */ +void vie_restart(struct vie *vie); void vie_init(struct vie *vie, const char *inst_bytes, int inst_length); /* Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 25 00:09:43 2020 (r362599) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Thu Jun 25 00:18:42 2020 (r362600) @@ -53,7 +53,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #define KASSERT(exp,msg) assert((exp)) @@ -1990,22 +1992,36 @@ vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum vm_r return (0); } +/* + * Prepare a partially decoded vie for a 2nd attempt. + */ void -vie_init(struct vie *vie, const char *inst_bytes, int inst_length) +vie_restart(struct vie *vie) { - KASSERT(inst_length >= 0 && inst_length <= VIE_INST_SIZE, - ("%s: invalid instruction length (%d)", __func__, inst_length)); + _Static_assert( + offsetof(struct vie, inst) < offsetof(struct vie, vie_startzero) && + offsetof(struct vie, num_valid) < offsetof(struct vie, vie_startzero), + "restart should not erase instruction length or contents"); - bzero(vie, sizeof(struct vie)); + memset((char *)vie + offsetof(struct vie, vie_startzero), 0, + sizeof(*vie) - offsetof(struct vie, vie_startzero)); vie->base_register = VM_REG_LAST; vie->index_register = VM_REG_LAST; vie->segment_register = VM_REG_LAST; +} - if (inst_length) { - bcopy(inst_bytes, vie->inst, inst_length); - vie->num_valid = inst_length; - } +void +vie_init(struct vie *vie, const char *inst_bytes, int inst_length) +{ + KASSERT(inst_length >= 0 && inst_length <= VIE_INST_SIZE, + ("%s: invalid instruction length (%d)", __func__, inst_length)); + + vie_restart(vie); + memset(vie->inst, 0, sizeof(vie->inst)); + if (inst_length != 0) + memcpy(vie->inst, inst_bytes, inst_length); + vie->num_valid = inst_length; } #ifdef _KERNEL Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 00:09:43 2020 (r362599) +++ head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 00:18:42 2020 (r362600) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #ifndef WITHOUT_CAPSICUM #include #endif +#include #include #include "bhyverun.h" @@ -746,12 +747,26 @@ vmexit_mtrap(struct vmctx *ctx, struct vm_exit *vmexit static int vmexit_inst_emul(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { - int err, i; + int err, i, cs_d; struct vie *vie; + enum vm_cpu_mode mode; stats.vmexit_inst_emul++; vie = &vmexit->u.inst_emul.vie; + if (!vie->decoded) { + /* + * Attempt to decode in userspace as a fallback. This allows + * updating instruction decode in bhyve without rebooting the + * kernel (rapid prototyping), albeit with much slower + * emulation. + */ + vie_restart(vie); + mode = vmexit->u.inst_emul.paging.cpu_mode; + cs_d = vmexit->u.inst_emul.cs_d; + (void)vmm_decode_instruction(mode, cs_d, vie); + } + err = emulate_mem(ctx, *pvcpu, vmexit->u.inst_emul.gpa, vie, &vmexit->u.inst_emul.paging); From owner-svn-src-head@freebsd.org Thu Jun 25 00:24:17 2020 Return-Path: Delivered-To: svn-src-head@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 2EDCB347756; Thu, 25 Jun 2020 00:24:17 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49sgk85DlXz4HD0; Thu, 25 Jun 2020 00:24:16 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 05P0O782022298; Wed, 24 Jun 2020 17:24:07 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 05P0O7HG022297; Wed, 24 Jun 2020 17:24:07 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202006250024.05P0O7HG022297@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362600 - in head: sys/amd64/include sys/amd64/vmm usr.sbin/bhyve In-Reply-To: <202006250018.05P0IgEi062942@repo.freebsd.org> To: Conrad Meyer Date: Wed, 24 Jun 2020 17:24:07 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49sgk85DlXz4HD0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 00:24:17 -0000 > Author: cem > Date: Thu Jun 25 00:18:42 2020 > New Revision: 362600 > URL: https://svnweb.freebsd.org/changeset/base/362600 > > Log: > bhyve(8): For prototyping, reattempt decode in userspace > > If userspace has a newer bhyve than the kernel, it may be able to decode > and emulate some instructions vmm.ko is unaware of. In this scenario, > reset decoder state and try again. This is pretty darn cool. Thanks! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Jun 25 08:15:11 2020 Return-Path: Delivered-To: svn-src-head@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 C138C355159; Thu, 25 Jun 2020 08:15:11 +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 49st9W4tyKz3X0Q; Thu, 25 Jun 2020 08:15:11 +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 A2AA62012A; Thu, 25 Jun 2020 08:15:11 +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 05P8FBu5059934; Thu, 25 Jun 2020 08:15:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P8FAcW059926; Thu, 25 Jun 2020 08:15:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006250815.05P8FAcW059926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 25 Jun 2020 08:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362609 - in head: contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/Basic/Targets contrib/llvm-project/clang/lib/Driver contrib/llvm-project/clang/lib/Driv... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/Basic/Targets contrib/llvm-project/clang/lib/Driver contrib/llvm-project/clang/lib/Driver/ToolChains/Arch contri... X-SVN-Commit-Revision: 362609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 08:15:11 -0000 Author: dim Date: Thu Jun 25 08:15:10 2020 New Revision: 362609 URL: https://svnweb.freebsd.org/changeset/base/362609 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.0-129-gd24d5c8e308. Getting closer to 10.0.1-rc2. MFC after: 3 weeks Added: head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFLiveness.h - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFLiveness.h head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFRegisters.h - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFRegisters.h head/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFGraph.cpp head/contrib/llvm-project/llvm/lib/CodeGen/RDFLiveness.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFLiveness.cpp head/contrib/llvm-project/llvm/lib/CodeGen/RDFRegisters.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFRegisters.cpp head/contrib/llvm-project/llvm/lib/Target/X86/ImmutableGraph.h - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/Target/X86/ImmutableGraph.h head/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectThunks.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86IndirectThunks.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp - copied unchanged from r362594, vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp Deleted: head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.h head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.h head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.h head/contrib/llvm-project/llvm/lib/Target/X86/X86RetpolineThunks.cpp Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h head/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp head/contrib/llvm-project/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm-project/llvm/include/llvm/Support/ManagedStatic.h head/contrib/llvm-project/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm-project/llvm/lib/LTO/LTO.cpp head/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp head/contrib/llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.h head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.cpp head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.h head/contrib/llvm-project/llvm/lib/Target/PowerPC/P9InstrResources.td head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrVSX.td head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm-project/llvm/lib/Target/X86/X86.h head/contrib/llvm-project/llvm/lib/Target/X86/X86.td head/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm-project/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm-project/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm-project/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/lib/clang/include/VCSVersion.inc head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/clang/libllvm/Makefile Directory Properties: head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/clang/ (props changed) head/contrib/llvm-project/llvm/ (props changed) Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Thu Jun 25 06:39:18 2020 (r362608) +++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Thu Jun 25 08:15:10 2020 (r362609) @@ -2267,6 +2267,14 @@ def mspeculative_load_hardening : Flag<["-"], "mspecul Group, Flags<[CoreOption,CC1Option]>; def mno_speculative_load_hardening : Flag<["-"], "mno-speculative-load-hardening">, Group, Flags<[CoreOption]>; +def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Enable all mitigations for Load Value Injection (LVI)">; +def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Disable mitigations for Load Value Injection (LVI)">; +def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">; +def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">; def mrelax : Flag<["-"], "mrelax">, Group, HelpText<"Enable linker relaxation">; Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h Thu Jun 25 06:39:18 2020 (r362608) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h Thu Jun 25 08:15:10 2020 (r362609) @@ -276,11 +276,12 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public T break; case 'Q': // Memory operand that is an offset from a register (it is // usually better to use `m' or `es' in asm statements) + Info.setAllowsRegister(); + LLVM_FALLTHROUGH; case 'Z': // Memory operand that is an indexed or indirect from a // register (it is usually better to use `m' or `es' in // asm statements) Info.setAllowsMemory(); - Info.setAllowsRegister(); break; case 'R': // AIX TOC entry case 'a': // Address operand that is an indexed or indirect from a Modified: head/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp Thu Jun 25 06:39:18 2020 (r362608) +++ head/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp Thu Jun 25 08:15:10 2020 (r362609) @@ -454,8 +454,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, << lastArgumentForMask(D, Args, Kinds & NeedsLTO) << "-flto"; } - if ((Kinds & SanitizerKind::ShadowCallStack) && - TC.getTriple().getArch() == llvm::Triple::aarch64 && + if ((Kinds & SanitizerKind::ShadowCallStack) && TC.getTriple().isAArch64() && !llvm::AArch64::isX18ReservedByDefault(TC.getTriple()) && !Args.hasArg(options::OPT_ffixed_x18)) { D.Diag(diag::err_drv_argument_only_allowed_with) Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp Thu Jun 25 06:39:18 2020 (r362608) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp Thu Jun 25 08:15:10 2020 (r362609) @@ -954,15 +954,12 @@ SanitizerMask ToolChain::getSupportedSanitizers() cons if (getTriple().getArch() == llvm::Triple::x86 || getTriple().getArch() == llvm::Triple::x86_64 || getTriple().getArch() == llvm::Triple::arm || - getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::wasm32 || - getTriple().getArch() == llvm::Triple::wasm64) + getTriple().getArch() == llvm::Triple::wasm64 || getTriple().isAArch64()) Res |= SanitizerKind::CFIICall; - if (getTriple().getArch() == llvm::Triple::x86_64 || - getTriple().getArch() == llvm::Triple::aarch64) + if (getTriple().getArch() == llvm::Triple::x86_64 || getTriple().isAArch64()) Res |= SanitizerKind::ShadowCallStack; - if (getTriple().getArch() == llvm::Triple::aarch64 || - getTriple().getArch() == llvm::Triple::aarch64_be) + if (getTriple().isAArch64()) Res |= SanitizerKind::MemTag; return Res; } Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp Thu Jun 25 06:39:18 2020 (r362608) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp Thu Jun 25 08:15:10 2020 (r362609) @@ -147,6 +147,7 @@ void x86::getX86TargetFeatures(const Driver &D, const // flags). This is a bit hacky but keeps existing usages working. We should // consider deprecating this and instead warn if the user requests external // retpoline thunks and *doesn't* request some form of retpolines. + auto SpectreOpt = clang::driver::options::ID::OPT_INVALID; if (Args.hasArgNoClaim(options::OPT_mretpoline, options::OPT_mno_retpoline, options::OPT_mspeculative_load_hardening, options::OPT_mno_speculative_load_hardening)) { @@ -154,12 +155,14 @@ void x86::getX86TargetFeatures(const Driver &D, const false)) { Features.push_back("+retpoline-indirect-calls"); Features.push_back("+retpoline-indirect-branches"); + SpectreOpt = options::OPT_mretpoline; } else if (Args.hasFlag(options::OPT_mspeculative_load_hardening, options::OPT_mno_speculative_load_hardening, false)) { // On x86, speculative load hardening relies on at least using retpolines // for indirect calls. Features.push_back("+retpoline-indirect-calls"); + SpectreOpt = options::OPT_mspeculative_load_hardening; } } else if (Args.hasFlag(options::OPT_mretpoline_external_thunk, options::OPT_mno_retpoline_external_thunk, false)) { @@ -167,6 +170,26 @@ void x86::getX86TargetFeatures(const Driver &D, const // eventually switch to an error here. Features.push_back("+retpoline-indirect-calls"); Features.push_back("+retpoline-indirect-branches"); + SpectreOpt = options::OPT_mretpoline_external_thunk; + } + + auto LVIOpt = clang::driver::options::ID::OPT_INVALID; + if (Args.hasFlag(options::OPT_mlvi_hardening, options::OPT_mno_lvi_hardening, + false)) { + Features.push_back("+lvi-load-hardening"); + Features.push_back("+lvi-cfi"); // load hardening implies CFI protection + LVIOpt = options::OPT_mlvi_hardening; + } else if (Args.hasFlag(options::OPT_mlvi_cfi, options::OPT_mno_lvi_cfi, + false)) { + Features.push_back("+lvi-cfi"); + LVIOpt = options::OPT_mlvi_cfi; + } + + if (SpectreOpt != clang::driver::options::ID::OPT_INVALID && + LVIOpt != clang::driver::options::ID::OPT_INVALID) { + D.Diag(diag::err_drv_argument_not_allowed_with) + << D.getOpts().getOptionName(SpectreOpt) + << D.getOpts().getOptionName(LVIOpt); } // Now add any that the user explicitly requested on the command line, Copied: head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h (from r362594, vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h Thu Jun 25 08:15:10 2020 (r362609, copy of r362594, vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h) @@ -0,0 +1,968 @@ +//===- RDFGraph.h -----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Target-independent, SSA-based data flow graph for register data flow (RDF) +// for a non-SSA program representation (e.g. post-RA machine code). +// +// +// *** Introduction +// +// The RDF graph is a collection of nodes, each of which denotes some element +// of the program. There are two main types of such elements: code and refe- +// rences. Conceptually, "code" is something that represents the structure +// of the program, e.g. basic block or a statement, while "reference" is an +// instance of accessing a register, e.g. a definition or a use. Nodes are +// connected with each other based on the structure of the program (such as +// blocks, instructions, etc.), and based on the data flow (e.g. reaching +// definitions, reached uses, etc.). The single-reaching-definition principle +// of SSA is generally observed, although, due to the non-SSA representation +// of the program, there are some differences between the graph and a "pure" +// SSA representation. +// +// +// *** Implementation remarks +// +// Since the graph can contain a large number of nodes, memory consumption +// was one of the major design considerations. As a result, there is a single +// base class NodeBase which defines all members used by all possible derived +// classes. The members are arranged in a union, and a derived class cannot +// add any data members of its own. Each derived class only defines the +// functional interface, i.e. member functions. NodeBase must be a POD, +// which implies that all of its members must also be PODs. +// Since nodes need to be connected with other nodes, pointers have been +// replaced with 32-bit identifiers: each node has an id of type NodeId. +// There are mapping functions in the graph that translate between actual +// memory addresses and the corresponding identifiers. +// A node id of 0 is equivalent to nullptr. +// +// +// *** Structure of the graph +// +// A code node is always a collection of other nodes. For example, a code +// node corresponding to a basic block will contain code nodes corresponding +// to instructions. In turn, a code node corresponding to an instruction will +// contain a list of reference nodes that correspond to the definitions and +// uses of registers in that instruction. The members are arranged into a +// circular list, which is yet another consequence of the effort to save +// memory: for each member node it should be possible to obtain its owner, +// and it should be possible to access all other members. There are other +// ways to accomplish that, but the circular list seemed the most natural. +// +// +- CodeNode -+ +// | | <---------------------------------------------------+ +// +-+--------+-+ | +// |FirstM |LastM | +// | +-------------------------------------+ | +// | | | +// V V | +// +----------+ Next +----------+ Next Next +----------+ Next | +// | |----->| |-----> ... ----->| |----->-+ +// +- Member -+ +- Member -+ +- Member -+ +// +// The order of members is such that related reference nodes (see below) +// should be contiguous on the member list. +// +// A reference node is a node that encapsulates an access to a register, +// in other words, data flowing into or out of a register. There are two +// major kinds of reference nodes: defs and uses. A def node will contain +// the id of the first reached use, and the id of the first reached def. +// Each def and use will contain the id of the reaching def, and also the +// id of the next reached def (for def nodes) or use (for use nodes). +// The "next node sharing the same reaching def" is denoted as "sibling". +// In summary: +// - Def node contains: reaching def, sibling, first reached def, and first +// reached use. +// - Use node contains: reaching def and sibling. +// +// +-- DefNode --+ +// | R2 = ... | <---+--------------------+ +// ++---------+--+ | | +// |Reached |Reached | | +// |Def |Use | | +// | | |Reaching |Reaching +// | V |Def |Def +// | +-- UseNode --+ Sib +-- UseNode --+ Sib Sib +// | | ... = R2 |----->| ... = R2 |----> ... ----> 0 +// | +-------------+ +-------------+ +// V +// +-- DefNode --+ Sib +// | R2 = ... |----> ... +// ++---------+--+ +// | | +// | | +// ... ... +// +// To get a full picture, the circular lists connecting blocks within a +// function, instructions within a block, etc. should be superimposed with +// the def-def, def-use links shown above. +// To illustrate this, consider a small example in a pseudo-assembly: +// foo: +// add r2, r0, r1 ; r2 = r0+r1 +// addi r0, r2, 1 ; r0 = r2+1 +// ret r0 ; return value in r0 +// +// The graph (in a format used by the debugging functions) would look like: +// +// DFG dump:[ +// f1: Function foo +// b2: === %bb.0 === preds(0), succs(0): +// p3: phi [d4(,d12,u9):] +// p5: phi [d6(,,u10):] +// s7: add [d8(,,u13):, u9(d4):, u10(d6):] +// s11: addi [d12(d4,,u15):, u13(d8):] +// s14: ret [u15(d12):] +// ] +// +// The f1, b2, p3, etc. are node ids. The letter is prepended to indicate the +// kind of the node (i.e. f - function, b - basic block, p - phi, s - state- +// ment, d - def, u - use). +// The format of a def node is: +// dN(rd,d,u):sib, +// where +// N - numeric node id, +// R - register being defined +// rd - reaching def, +// d - reached def, +// u - reached use, +// sib - sibling. +// The format of a use node is: +// uN[!](rd):sib, +// where +// N - numeric node id, +// R - register being used, +// rd - reaching def, +// sib - sibling. +// Possible annotations (usually preceding the node id): +// + - preserving def, +// ~ - clobbering def, +// " - shadow ref (follows the node id), +// ! - fixed register (appears after register name). +// +// The circular lists are not explicit in the dump. +// +// +// *** Node attributes +// +// NodeBase has a member "Attrs", which is the primary way of determining +// the node's characteristics. The fields in this member decide whether +// the node is a code node or a reference node (i.e. node's "type"), then +// within each type, the "kind" determines what specifically this node +// represents. The remaining bits, "flags", contain additional information +// that is even more detailed than the "kind". +// CodeNode's kinds are: +// - Phi: Phi node, members are reference nodes. +// - Stmt: Statement, members are reference nodes. +// - Block: Basic block, members are instruction nodes (i.e. Phi or Stmt). +// - Func: The whole function. The members are basic block nodes. +// RefNode's kinds are: +// - Use. +// - Def. +// +// Meaning of flags: +// - Preserving: applies only to defs. A preserving def is one that can +// preserve some of the original bits among those that are included in +// the register associated with that def. For example, if R0 is a 32-bit +// register, but a def can only change the lower 16 bits, then it will +// be marked as preserving. +// - Shadow: a reference that has duplicates holding additional reaching +// defs (see more below). +// - Clobbering: applied only to defs, indicates that the value generated +// by this def is unspecified. A typical example would be volatile registers +// after function calls. +// - Fixed: the register in this def/use cannot be replaced with any other +// register. A typical case would be a parameter register to a call, or +// the register with the return value from a function. +// - Undef: the register in this reference the register is assumed to have +// no pre-existing value, even if it appears to be reached by some def. +// This is typically used to prevent keeping registers artificially live +// in cases when they are defined via predicated instructions. For example: +// r0 = add-if-true cond, r10, r11 (1) +// r0 = add-if-false cond, r12, r13, implicit r0 (2) +// ... = r0 (3) +// Before (1), r0 is not intended to be live, and the use of r0 in (3) is +// not meant to be reached by any def preceding (1). However, since the +// defs in (1) and (2) are both preserving, these properties alone would +// imply that the use in (3) may indeed be reached by some prior def. +// Adding Undef flag to the def in (1) prevents that. The Undef flag +// may be applied to both defs and uses. +// - Dead: applies only to defs. The value coming out of a "dead" def is +// assumed to be unused, even if the def appears to be reaching other defs +// or uses. The motivation for this flag comes from dead defs on function +// calls: there is no way to determine if such a def is dead without +// analyzing the target's ABI. Hence the graph should contain this info, +// as it is unavailable otherwise. On the other hand, a def without any +// uses on a typical instruction is not the intended target for this flag. +// +// *** Shadow references +// +// It may happen that a super-register can have two (or more) non-overlapping +// sub-registers. When both of these sub-registers are defined and followed +// by a use of the super-register, the use of the super-register will not +// have a unique reaching def: both defs of the sub-registers need to be +// accounted for. In such cases, a duplicate use of the super-register is +// added and it points to the extra reaching def. Both uses are marked with +// a flag "shadow". Example: +// Assume t0 is a super-register of r0 and r1, r0 and r1 do not overlap: +// set r0, 1 ; r0 = 1 +// set r1, 1 ; r1 = 1 +// addi t1, t0, 1 ; t1 = t0+1 +// +// The DFG: +// s1: set [d2(,,u9):] +// s3: set [d4(,,u10):] +// s5: addi [d6(,,):, u7"(d2):, u8"(d4):] +// +// The statement s5 has two use nodes for t0: u7" and u9". The quotation +// mark " indicates that the node is a shadow. +// + +#ifndef LLVM_LIB_TARGET_HEXAGON_RDFGRAPH_H +#define LLVM_LIB_TARGET_HEXAGON_RDFGRAPH_H + +#include "RDFRegisters.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/MC/LaneBitmask.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/MathExtras.h" +#include +#include +#include +#include +#include +#include +#include +#include + +// RDF uses uint32_t to refer to registers. This is to ensure that the type +// size remains specific. In other places, registers are often stored using +// unsigned. +static_assert(sizeof(uint32_t) == sizeof(unsigned), "Those should be equal"); + +namespace llvm { + +class MachineBasicBlock; +class MachineDominanceFrontier; +class MachineDominatorTree; +class MachineFunction; +class MachineInstr; +class MachineOperand; +class raw_ostream; +class TargetInstrInfo; +class TargetRegisterInfo; + +namespace rdf { + + using NodeId = uint32_t; + + struct DataFlowGraph; + + struct NodeAttrs { + enum : uint16_t { + None = 0x0000, // Nothing + + // Types: 2 bits + TypeMask = 0x0003, + Code = 0x0001, // 01, Container + Ref = 0x0002, // 10, Reference + + // Kind: 3 bits + KindMask = 0x0007 << 2, + Def = 0x0001 << 2, // 001 + Use = 0x0002 << 2, // 010 + Phi = 0x0003 << 2, // 011 + Stmt = 0x0004 << 2, // 100 + Block = 0x0005 << 2, // 101 + Func = 0x0006 << 2, // 110 + + // Flags: 7 bits for now + FlagMask = 0x007F << 5, + Shadow = 0x0001 << 5, // 0000001, Has extra reaching defs. + Clobbering = 0x0002 << 5, // 0000010, Produces unspecified values. + PhiRef = 0x0004 << 5, // 0000100, Member of PhiNode. + Preserving = 0x0008 << 5, // 0001000, Def can keep original bits. + Fixed = 0x0010 << 5, // 0010000, Fixed register. + Undef = 0x0020 << 5, // 0100000, Has no pre-existing value. + Dead = 0x0040 << 5, // 1000000, Does not define a value. + }; + + static uint16_t type(uint16_t T) { return T & TypeMask; } + static uint16_t kind(uint16_t T) { return T & KindMask; } + static uint16_t flags(uint16_t T) { return T & FlagMask; } + + static uint16_t set_type(uint16_t A, uint16_t T) { + return (A & ~TypeMask) | T; + } + + static uint16_t set_kind(uint16_t A, uint16_t K) { + return (A & ~KindMask) | K; + } + + static uint16_t set_flags(uint16_t A, uint16_t F) { + return (A & ~FlagMask) | F; + } + + // Test if A contains B. + static bool contains(uint16_t A, uint16_t B) { + if (type(A) != Code) + return false; + uint16_t KB = kind(B); + switch (kind(A)) { + case Func: + return KB == Block; + case Block: + return KB == Phi || KB == Stmt; + case Phi: + case Stmt: + return type(B) == Ref; + } + return false; + } + }; + + struct BuildOptions { + enum : unsigned { + None = 0x00, + KeepDeadPhis = 0x01, // Do not remove dead phis during build. + }; + }; + + template struct NodeAddr { + NodeAddr() = default; + NodeAddr(T A, NodeId I) : Addr(A), Id(I) {} + + // Type cast (casting constructor). The reason for having this class + // instead of std::pair. + template NodeAddr(const NodeAddr &NA) + : Addr(static_cast(NA.Addr)), Id(NA.Id) {} + + bool operator== (const NodeAddr &NA) const { + assert((Addr == NA.Addr) == (Id == NA.Id)); + return Addr == NA.Addr; + } + bool operator!= (const NodeAddr &NA) const { + return !operator==(NA); + } + + T Addr = nullptr; + NodeId Id = 0; + }; + + struct NodeBase; + + // Fast memory allocation and translation between node id and node address. + // This is really the same idea as the one underlying the "bump pointer + // allocator", the difference being in the translation. A node id is + // composed of two components: the index of the block in which it was + // allocated, and the index within the block. With the default settings, + // where the number of nodes per block is 4096, the node id (minus 1) is: + // + // bit position: 11 0 + // +----------------------------+--------------+ + // | Index of the block |Index in block| + // +----------------------------+--------------+ + // + // The actual node id is the above plus 1, to avoid creating a node id of 0. + // + // This method significantly improved the build time, compared to using maps + // (std::unordered_map or DenseMap) to translate between pointers and ids. + struct NodeAllocator { + // Amount of storage for a single node. + enum { NodeMemSize = 32 }; + + NodeAllocator(uint32_t NPB = 4096) + : NodesPerBlock(NPB), BitsPerIndex(Log2_32(NPB)), + IndexMask((1 << BitsPerIndex)-1) { + assert(isPowerOf2_32(NPB)); + } + + NodeBase *ptr(NodeId N) const { + uint32_t N1 = N-1; + uint32_t BlockN = N1 >> BitsPerIndex; + uint32_t Offset = (N1 & IndexMask) * NodeMemSize; + return reinterpret_cast(Blocks[BlockN]+Offset); + } + + NodeId id(const NodeBase *P) const; + NodeAddr New(); + void clear(); + + private: + void startNewBlock(); + bool needNewBlock(); + + uint32_t makeId(uint32_t Block, uint32_t Index) const { + // Add 1 to the id, to avoid the id of 0, which is treated as "null". + return ((Block << BitsPerIndex) | Index) + 1; + } + + const uint32_t NodesPerBlock; + const uint32_t BitsPerIndex; + const uint32_t IndexMask; + char *ActiveEnd = nullptr; + std::vector Blocks; + using AllocatorTy = BumpPtrAllocatorImpl; + AllocatorTy MemPool; + }; + + using RegisterSet = std::set; + + struct TargetOperandInfo { + TargetOperandInfo(const TargetInstrInfo &tii) : TII(tii) {} + virtual ~TargetOperandInfo() = default; + + virtual bool isPreserving(const MachineInstr &In, unsigned OpNum) const; + virtual bool isClobbering(const MachineInstr &In, unsigned OpNum) const; + virtual bool isFixedReg(const MachineInstr &In, unsigned OpNum) const; + + const TargetInstrInfo &TII; + }; + + // Packed register reference. Only used for storage. + struct PackedRegisterRef { + RegisterId Reg; + uint32_t MaskId; + }; + + struct LaneMaskIndex : private IndexedSet { + LaneMaskIndex() = default; + + LaneBitmask getLaneMaskForIndex(uint32_t K) const { + return K == 0 ? LaneBitmask::getAll() : get(K); + } + + uint32_t getIndexForLaneMask(LaneBitmask LM) { + assert(LM.any()); + return LM.all() ? 0 : insert(LM); + } + + uint32_t getIndexForLaneMask(LaneBitmask LM) const { + assert(LM.any()); + return LM.all() ? 0 : find(LM); + } + }; + + struct NodeBase { + public: + // Make sure this is a POD. + NodeBase() = default; + + uint16_t getType() const { return NodeAttrs::type(Attrs); } + uint16_t getKind() const { return NodeAttrs::kind(Attrs); } + uint16_t getFlags() const { return NodeAttrs::flags(Attrs); } + NodeId getNext() const { return Next; } + + uint16_t getAttrs() const { return Attrs; } + void setAttrs(uint16_t A) { Attrs = A; } + void setFlags(uint16_t F) { setAttrs(NodeAttrs::set_flags(getAttrs(), F)); } + + // Insert node NA after "this" in the circular chain. + void append(NodeAddr NA); + + // Initialize all members to 0. + void init() { memset(this, 0, sizeof *this); } + + void setNext(NodeId N) { Next = N; } + + protected: + uint16_t Attrs; + uint16_t Reserved; + NodeId Next; // Id of the next node in the circular chain. + // Definitions of nested types. Using anonymous nested structs would make + // this class definition clearer, but unnamed structs are not a part of + // the standard. + struct Def_struct { + NodeId DD, DU; // Ids of the first reached def and use. + }; + struct PhiU_struct { + NodeId PredB; // Id of the predecessor block for a phi use. + }; + struct Code_struct { + void *CP; // Pointer to the actual code. + NodeId FirstM, LastM; // Id of the first member and last. + }; + struct Ref_struct { + NodeId RD, Sib; // Ids of the reaching def and the sibling. + union { + Def_struct Def; + PhiU_struct PhiU; + }; + union { + MachineOperand *Op; // Non-phi refs point to a machine operand. + PackedRegisterRef PR; // Phi refs store register info directly. + }; + }; + + // The actual payload. + union { + Ref_struct Ref; + Code_struct Code; + }; + }; + // The allocator allocates chunks of 32 bytes for each node. The fact that + // each node takes 32 bytes in memory is used for fast translation between + // the node id and the node address. + static_assert(sizeof(NodeBase) <= NodeAllocator::NodeMemSize, + "NodeBase must be at most NodeAllocator::NodeMemSize bytes"); + + using NodeList = SmallVector, 4>; + using NodeSet = std::set; + + struct RefNode : public NodeBase { + RefNode() = default; + + RegisterRef getRegRef(const DataFlowGraph &G) const; + + MachineOperand &getOp() { + assert(!(getFlags() & NodeAttrs::PhiRef)); + return *Ref.Op; + } + + void setRegRef(RegisterRef RR, DataFlowGraph &G); + void setRegRef(MachineOperand *Op, DataFlowGraph &G); + + NodeId getReachingDef() const { + return Ref.RD; + } + void setReachingDef(NodeId RD) { + Ref.RD = RD; + } + + NodeId getSibling() const { + return Ref.Sib; + } + void setSibling(NodeId Sib) { + Ref.Sib = Sib; + } + + bool isUse() const { + assert(getType() == NodeAttrs::Ref); + return getKind() == NodeAttrs::Use; + } + + bool isDef() const { + assert(getType() == NodeAttrs::Ref); + return getKind() == NodeAttrs::Def; + } + + template + NodeAddr getNextRef(RegisterRef RR, Predicate P, bool NextOnly, + const DataFlowGraph &G); + NodeAddr getOwner(const DataFlowGraph &G); + }; + + struct DefNode : public RefNode { + NodeId getReachedDef() const { + return Ref.Def.DD; + } + void setReachedDef(NodeId D) { + Ref.Def.DD = D; + } + NodeId getReachedUse() const { + return Ref.Def.DU; + } + void setReachedUse(NodeId U) { + Ref.Def.DU = U; + } + + void linkToDef(NodeId Self, NodeAddr DA); + }; + + struct UseNode : public RefNode { + void linkToDef(NodeId Self, NodeAddr DA); + }; + + struct PhiUseNode : public UseNode { + NodeId getPredecessor() const { + assert(getFlags() & NodeAttrs::PhiRef); + return Ref.PhiU.PredB; + } + void setPredecessor(NodeId B) { + assert(getFlags() & NodeAttrs::PhiRef); + Ref.PhiU.PredB = B; + } + }; + + struct CodeNode : public NodeBase { + template T getCode() const { + return static_cast(Code.CP); + } + void setCode(void *C) { + Code.CP = C; + } + + NodeAddr getFirstMember(const DataFlowGraph &G) const; + NodeAddr getLastMember(const DataFlowGraph &G) const; + void addMember(NodeAddr NA, const DataFlowGraph &G); + void addMemberAfter(NodeAddr MA, NodeAddr NA, + const DataFlowGraph &G); + void removeMember(NodeAddr NA, const DataFlowGraph &G); + + NodeList members(const DataFlowGraph &G) const; + template + NodeList members_if(Predicate P, const DataFlowGraph &G) const; + }; + + struct InstrNode : public CodeNode { + NodeAddr getOwner(const DataFlowGraph &G); + }; + + struct PhiNode : public InstrNode { + MachineInstr *getCode() const { + return nullptr; + } + }; + + struct StmtNode : public InstrNode { + MachineInstr *getCode() const { + return CodeNode::getCode(); + } + }; + + struct BlockNode : public CodeNode { + MachineBasicBlock *getCode() const { + return CodeNode::getCode(); + } + + void addPhi(NodeAddr PA, const DataFlowGraph &G); + }; + + struct FuncNode : public CodeNode { + MachineFunction *getCode() const { + return CodeNode::getCode(); + } + + NodeAddr findBlock(const MachineBasicBlock *BB, + const DataFlowGraph &G) const; + NodeAddr getEntryBlock(const DataFlowGraph &G); + }; + + struct DataFlowGraph { + DataFlowGraph(MachineFunction &mf, const TargetInstrInfo &tii, + const TargetRegisterInfo &tri, const MachineDominatorTree &mdt, + const MachineDominanceFrontier &mdf, const TargetOperandInfo &toi); + + NodeBase *ptr(NodeId N) const; + template T ptr(NodeId N) const { + return static_cast(ptr(N)); + } + + NodeId id(const NodeBase *P) const; + + template NodeAddr addr(NodeId N) const { + return { ptr(N), N }; + } + + NodeAddr getFunc() const { return Func; } + MachineFunction &getMF() const { return MF; } + const TargetInstrInfo &getTII() const { return TII; } + const TargetRegisterInfo &getTRI() const { return TRI; } + const PhysicalRegisterInfo &getPRI() const { return PRI; } + const MachineDominatorTree &getDT() const { return MDT; } + const MachineDominanceFrontier &getDF() const { return MDF; } + const RegisterAggr &getLiveIns() const { return LiveIns; } + + struct DefStack { + DefStack() = default; + + bool empty() const { return Stack.empty() || top() == bottom(); } + + private: + using value_type = NodeAddr; + struct Iterator { + using value_type = DefStack::value_type; + + Iterator &up() { Pos = DS.nextUp(Pos); return *this; } + Iterator &down() { Pos = DS.nextDown(Pos); return *this; } + + value_type operator*() const { + assert(Pos >= 1); + return DS.Stack[Pos-1]; + } + const value_type *operator->() const { + assert(Pos >= 1); + return &DS.Stack[Pos-1]; + } + bool operator==(const Iterator &It) const { return Pos == It.Pos; } + bool operator!=(const Iterator &It) const { return Pos != It.Pos; } + + private: + friend struct DefStack; + + Iterator(const DefStack &S, bool Top); + + // Pos-1 is the index in the StorageType object that corresponds to + // the top of the DefStack. + const DefStack &DS; + unsigned Pos; + }; + + public: + using iterator = Iterator; + + iterator top() const { return Iterator(*this, true); } + iterator bottom() const { return Iterator(*this, false); } + unsigned size() const; + + void push(NodeAddr DA) { Stack.push_back(DA); } + void pop(); + void start_block(NodeId N); + void clear_block(NodeId N); + + private: + friend struct Iterator; + + using StorageType = std::vector; + + bool isDelimiter(const StorageType::value_type &P, NodeId N = 0) const { + return (P.Addr == nullptr) && (N == 0 || P.Id == N); + } + + unsigned nextUp(unsigned P) const; + unsigned nextDown(unsigned P) const; + + StorageType Stack; + }; + + // Make this std::unordered_map for speed of accessing elements. + // Map: Register (physical or virtual) -> DefStack + using DefStackMap = std::unordered_map; + + void build(unsigned Options = BuildOptions::None); + void pushAllDefs(NodeAddr IA, DefStackMap &DM); + void markBlock(NodeId B, DefStackMap &DefM); + void releaseBlock(NodeId B, DefStackMap &DefM); + + PackedRegisterRef pack(RegisterRef RR) { + return { RR.Reg, LMI.getIndexForLaneMask(RR.Mask) }; + } + PackedRegisterRef pack(RegisterRef RR) const { + return { RR.Reg, LMI.getIndexForLaneMask(RR.Mask) }; + } + RegisterRef unpack(PackedRegisterRef PR) const { + return RegisterRef(PR.Reg, LMI.getLaneMaskForIndex(PR.MaskId)); + } + + RegisterRef makeRegRef(unsigned Reg, unsigned Sub) const; + RegisterRef makeRegRef(const MachineOperand &Op) const; + RegisterRef restrictRef(RegisterRef AR, RegisterRef BR) const; + + NodeAddr getNextRelated(NodeAddr IA, + NodeAddr RA) const; + NodeAddr getNextImp(NodeAddr IA, + NodeAddr RA, bool Create); + NodeAddr getNextImp(NodeAddr IA, + NodeAddr RA) const; + NodeAddr getNextShadow(NodeAddr IA, + NodeAddr RA, bool Create); + NodeAddr getNextShadow(NodeAddr IA, + NodeAddr RA) const; + + NodeList getRelatedRefs(NodeAddr IA, + NodeAddr RA) const; + + NodeAddr findBlock(MachineBasicBlock *BB) const { + return BlockNodes.at(BB); + } + + void unlinkUse(NodeAddr UA, bool RemoveFromOwner) { + unlinkUseDF(UA); + if (RemoveFromOwner) + removeFromOwner(UA); + } + + void unlinkDef(NodeAddr DA, bool RemoveFromOwner) { + unlinkDefDF(DA); + if (RemoveFromOwner) + removeFromOwner(DA); + } + + // Some useful filters. + template + static bool IsRef(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == Kind; + } + + template + static bool IsCode(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Code && + BA.Addr->getKind() == Kind; + } + + static bool IsDef(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == NodeAttrs::Def; + } + + static bool IsUse(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == NodeAttrs::Use; + } + + static bool IsPhi(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Code && + BA.Addr->getKind() == NodeAttrs::Phi; + } + + static bool IsPreservingDef(const NodeAddr DA) { + uint16_t Flags = DA.Addr->getFlags(); + return (Flags & NodeAttrs::Preserving) && !(Flags & NodeAttrs::Undef); + } + + private: + void reset(); + + RegisterSet getLandingPadLiveIns() const; + + NodeAddr newNode(uint16_t Attrs); + NodeAddr cloneNode(const NodeAddr B); + NodeAddr newUse(NodeAddr Owner, + MachineOperand &Op, uint16_t Flags = NodeAttrs::None); + NodeAddr newPhiUse(NodeAddr Owner, + RegisterRef RR, NodeAddr PredB, + uint16_t Flags = NodeAttrs::PhiRef); + NodeAddr newDef(NodeAddr Owner, + MachineOperand &Op, uint16_t Flags = NodeAttrs::None); + NodeAddr newDef(NodeAddr Owner, + RegisterRef RR, uint16_t Flags = NodeAttrs::PhiRef); + NodeAddr newPhi(NodeAddr Owner); + NodeAddr newStmt(NodeAddr Owner, + MachineInstr *MI); + NodeAddr newBlock(NodeAddr Owner, + MachineBasicBlock *BB); + NodeAddr newFunc(MachineFunction *MF); + + template + std::pair,NodeAddr> + locateNextRef(NodeAddr IA, NodeAddr RA, + Predicate P) const; + + using BlockRefsMap = std::map; + + void buildStmt(NodeAddr BA, MachineInstr &In); + void recordDefsForDF(BlockRefsMap &PhiM, NodeAddr BA); + void buildPhis(BlockRefsMap &PhiM, RegisterSet &AllRefs, + NodeAddr BA); + void removeUnusedPhis(); + + void pushClobbers(NodeAddr IA, DefStackMap &DM); + void pushDefs(NodeAddr IA, DefStackMap &DM); + template void linkRefUp(NodeAddr IA, + NodeAddr TA, DefStack &DS); + template void linkStmtRefs(DefStackMap &DefM, + NodeAddr SA, Predicate P); + void linkBlockRefs(DefStackMap &DefM, NodeAddr BA); + + void unlinkUseDF(NodeAddr UA); + void unlinkDefDF(NodeAddr DA); + + void removeFromOwner(NodeAddr RA) { + NodeAddr IA = RA.Addr->getOwner(*this); + IA.Addr->removeMember(RA, *this); + } + + MachineFunction &MF; + const TargetInstrInfo &TII; + const TargetRegisterInfo &TRI; + const PhysicalRegisterInfo PRI; + const MachineDominatorTree &MDT; + const MachineDominanceFrontier &MDF; + const TargetOperandInfo &TOI; + + RegisterAggr LiveIns; + NodeAddr Func; + NodeAllocator Memory; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Jun 25 08:58:39 2020 Return-Path: Delivered-To: svn-src-head@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 F26D0355E3C; Thu, 25 Jun 2020 08:58:39 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sv7f3KPdz3YZj; Thu, 25 Jun 2020 08:58:38 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f66.google.com with SMTP id mb16so5172377ejb.4; Thu, 25 Jun 2020 01:58:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=deSaEDixFJnBmy4akb7NJXvqI76I6XKPkhoSzzGCbF4=; b=mz2cOPNAdCx/iC9orzRQVeYVgwPns2RYXzt2zJlVdRqedb48uEuROBcffLq8kPhP83 1+ObNpYR9nY5/fhhS8sO2/pg29kbIjwVMLNSCCjxpLQuWFbpKM2DcIeLc3Af8rZT4rzg dM1URTJC826Heo8SzI0m9FkczpmKEreGuq2NI3TEHmoTUTmyGNXiiqdiL8a6ju4TKrW0 KnXHQucoaN/bk6uOGeU63j4pJh8hrmhsxb9RKfRPbn+sS8ZKcavGZmeS9ZGkKmeBMZKQ QvFTMIy6F9hhwyNdsayeamTChDBolV1AQU9SEqBjNvXt/R1D9/yRyC9+3MUk/3TCDmOs 5sDg== X-Gm-Message-State: AOAM5325s1qi6TAofbsWm3InNqj1KRHdqRuP+txZlan1NWngMh9mK9ip RzRdCnWsRTKvkGSWpBVmILq4NLwymAM= X-Google-Smtp-Source: ABdhPJyG/hfKtznq5seQEcTqbgmQMGgcomOLEg2NhzdjCnfU3LlBBgPkxLlX71EmRlROevD7knC/tw== X-Received: by 2002:a17:906:c14f:: with SMTP id dp15mr5416657ejc.454.1593075516611; Thu, 25 Jun 2020 01:58:36 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id c4sm16837792ejb.17.2020.06.25.01.58.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 01:58:36 -0700 (PDT) Subject: Re: svn commit: r362587 - in head: . lib/clang/libclang share/mk targets/pseudo/bootstrap-tools targets/pseudo/clang tools/build/mk tools/build/options usr.bin/clang To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006241703.05OH3htJ063205@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: Date: Thu, 25 Jun 2020 10:58:35 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006241703.05OH3htJ063205@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49sv7f3KPdz3YZj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.218.66 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.93 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; RWL_MAILSPIKE_GOOD(0.00)[209.85.218.66:from]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.86)[-0.863]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.74)[-0.741]; NEURAL_HAM_SHORT(-0.32)[-0.324]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.66:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 08:58:40 -0000 On 6/24/20 7:03 PM, Conrad Meyer wrote: > Author: cem > Date: Wed Jun 24 17:03:42 2020 > New Revision: 362587 > URL: https://svnweb.freebsd.org/changeset/base/362587 > > Log: > Add WITH_CLANG_FORMAT option > > clang-format is enabled conditional on either WITH_CLANG_EXTRAS or > WITH_CLANG_FORMAT. Some sources in libclang are build conditional on > either rule, and obviously the clang-format binary itself depends on the > rule. > > clang-format could still use a manual page. There is only --help available, right? From owner-svn-src-head@freebsd.org Thu Jun 25 11:41:29 2020 Return-Path: Delivered-To: svn-src-head@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 0F81D35899F; Thu, 25 Jun 2020 11:41:29 +0000 (UTC) (envelope-from lwhsu@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 49sylX6lF5z3xwF; Thu, 25 Jun 2020 11:41:28 +0000 (UTC) (envelope-from lwhsu@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 C87BE22715; Thu, 25 Jun 2020 11:41:28 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PBfSRK087509; Thu, 25 Jun 2020 11:41:28 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PBfS6m087508; Thu, 25 Jun 2020 11:41:28 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006251141.05PBfS6m087508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 25 Jun 2020 11:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362610 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 362610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 11:41:29 -0000 Author: lwhsu Date: Thu Jun 25 11:41:28 2020 New Revision: 362610 URL: https://svnweb.freebsd.org/changeset/base/362610 Log: Update tests(7) as kyua(1) was imported to base in r359260 PR: 247151 Reported by: 0mp Reviewed by: 0mp, asomers, bcr, emaste, markj Suggested from: brooks, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25339 Modified: head/share/man/man7/tests.7 Modified: head/share/man/man7/tests.7 ============================================================================== --- head/share/man/man7/tests.7 Thu Jun 25 08:15:10 2020 (r362609) +++ head/share/man/man7/tests.7 Thu Jun 25 11:41:28 2020 (r362610) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 2, 2019 +.Dd June 25, 2020 .Dt TESTS 7 .Os .Sh NAME @@ -61,10 +61,6 @@ some of its optional features. For information on writing the tests, see .Xr atf 7 . .Ss Installing the test suite -The test suite is installed by default as of -.Fx -11.0-RELEASE. -.Pp If the .Pa /usr/tests directory is missing, then you will have to enable the build of the test @@ -102,11 +98,7 @@ third-party packages or manual modifications to config introduce unexpected failures. .El .Ss Running the tests -First, you will need to install the -.Sq devel/kyua -package from -.Xr ports 7 . -Then use the following command to run the whole test suite: +Use the following command to run the whole test suite: .Bd -literal -offset indent $ kyua test -k /usr/tests/Kyuafile .Ed @@ -158,7 +150,7 @@ skipped. .Pp Test suites are configured by defining their configuration variables in -.Pa /usr/local/etc/kyua/kyua.conf . +.Pa /etc/kyua/kyua.conf . The format of this file is detailed in .Xr kyua.conf 5 . .Pp @@ -205,8 +197,8 @@ For more details please refer to: .Lk https://www.freebsd.org/support.html "Problem Reporting" .El .Sh FILES -.Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX -.It Pa /usr/local/etc/kyua/kyua.conf +.Bl -tag -compact -width "/etc/kyua/kyua.conf" +.It Pa /etc/kyua/kyua.conf System-wide configuration file for .Xr kyua 1 . .It Pa ~/.kyua/kyua.conf @@ -230,7 +222,9 @@ Top-level test suite definition file. The .Fx Test Suite first appeared in -.Fx 10.1 . +.Fx 10.1 +and was installed by default in +.Fx 11.0 . .Pp The .Nm @@ -238,5 +232,12 @@ manual page first appeared in .Nx 6.0 and was later ported to .Fx 10.1 . +.Pp +The test driver, +.Xr kyua 1 , +was imported as part of the base system in +.Fx 13.0 , +previously being available only in +.Xr ports 7 . .Sh AUTHORS .An Julio Merino Aq Mt jmmv@FreeBSD.org From owner-svn-src-head@freebsd.org Thu Jun 25 12:31:06 2020 Return-Path: Delivered-To: svn-src-head@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 64B33359EE5; Thu, 25 Jun 2020 12:31:06 +0000 (UTC) (envelope-from kaktus@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 49szrp26CLz41mx; Thu, 25 Jun 2020 12:31:06 +0000 (UTC) (envelope-from kaktus@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 43B8522C41; Thu, 25 Jun 2020 12:31:06 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PCV62M014905; Thu, 25 Jun 2020 12:31:06 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PCV6Ej014904; Thu, 25 Jun 2020 12:31:06 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202006251231.05PCV6Ej014904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Thu, 25 Jun 2020 12:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362611 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 362611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 12:31:06 -0000 Author: kaktus Date: Thu Jun 25 12:31:05 2020 New Revision: 362611 URL: https://svnweb.freebsd.org/changeset/base/362611 Log: man page of select(2) should mention pselect(2) Reviewed by: bcr (manpages), kib, trasz Approved by: kib (mentor) MFC after: 7 days Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25169 Modified: head/lib/libc/sys/select.2 Modified: head/lib/libc/sys/select.2 ============================================================================== --- head/lib/libc/sys/select.2 Thu Jun 25 11:41:28 2020 (r362610) +++ head/lib/libc/sys/select.2 Thu Jun 25 12:31:05 2020 (r362611) @@ -28,7 +28,7 @@ .\" @(#)select.2 8.2 (Berkeley) 3/25/94 .\" $FreeBSD$ .\" -.Dd November 17, 2002 +.Dd June 25, 2020 .Dt SELECT 2 .Os .Sh NAME @@ -172,6 +172,7 @@ was invalid. .Xr gettimeofday 2 , .Xr kqueue 2 , .Xr poll 2 , +.Xr pselect 2 , .Xr read 2 , .Xr recv 2 , .Xr send 2 , From owner-svn-src-head@freebsd.org Thu Jun 25 12:35:21 2020 Return-Path: Delivered-To: svn-src-head@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 CA8FC359F3A; Thu, 25 Jun 2020 12:35:21 +0000 (UTC) (envelope-from kaktus@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 49szxj4tn3z42Mr; Thu, 25 Jun 2020 12:35:21 +0000 (UTC) (envelope-from kaktus@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 9E94E230FE; Thu, 25 Jun 2020 12:35:21 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PCZLWJ018915; Thu, 25 Jun 2020 12:35:21 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PCZLTX018913; Thu, 25 Jun 2020 12:35:21 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202006251235.05PCZLTX018913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Thu, 25 Jun 2020 12:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362612 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 12:35:21 -0000 Author: kaktus Date: Thu Jun 25 12:35:20 2020 New Revision: 362612 URL: https://svnweb.freebsd.org/changeset/base/362612 Log: bhyve: allow for automatic destruction on power-off Introduce -D flag that allows for the VM to be destroyed on guest initiated power-off by the bhyve(8) process itself. This is quality of life change that allows for simpler deployments without the need for bhyvectl --destroy. Requested by: swills Reviewed by: 0mp (manpages), grehan, kib, swills Approved by: kib (mentor) MFC after: 2 weeks Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25414 Modified: head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Thu Jun 25 12:31:05 2020 (r362611) +++ head/usr.sbin/bhyve/bhyve.8 Thu Jun 25 12:35:20 2020 (r362612) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2020 +.Dd Jun 25, 2020 .Dt BHYVE 8 .Os .Sh NAME @@ -32,7 +32,7 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl AabCeHhPSuWwxY +.Op Fl AabCDeHhPSuWwxY .Oo .Sm off .Fl c\~ @@ -131,6 +131,8 @@ If a is specified more than once the last one has precedence. .It Fl C Include guest memory in core file. +.It Fl D +Destroy the VM on guest initiated power-off. .It Fl e Force .Nm Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 12:31:05 2020 (r362611) +++ head/usr.sbin/bhyve/bhyverun.c Thu Jun 25 12:35:20 2020 (r362612) @@ -197,6 +197,7 @@ static int gdb_port = 0; static int guest_vmexit_on_hlt, guest_vmexit_on_pause; static int virtio_msix = 1; static int x2apic_mode = 0; /* default is xAPIC */ +static int destroy_on_poweroff = 0; static int strictio; static int strictmsr = 1; @@ -236,7 +237,7 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-abehuwxACHPSWY]\n" + "Usage: %s [-abehuwxACDHPSWY]\n" " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" " %*s [-g ] [-l ]\n" " %*s [-m mem] [-p vcpu:hostcpu] [-s ] [-U uuid] \n" @@ -244,6 +245,7 @@ usage(int code) " -A: create ACPI tables\n" " -c: number of cpus and/or topology specification\n" " -C: include guest memory in core file\n" + " -D: destroy on power-off\n" " -e: exit on unhandled I/O access\n" " -g: gdb port\n" " -h: help\n" @@ -815,6 +817,8 @@ vmexit_suspend(struct vmctx *ctx, struct vm_exit *vmex case VM_SUSPEND_RESET: exit(0); case VM_SUSPEND_POWEROFF: + if (destroy_on_poweroff) + vm_destroy(ctx); exit(1); case VM_SUSPEND_HALT: exit(2); @@ -1101,9 +1105,9 @@ main(int argc, char *argv[]) memflags = 0; #ifdef BHYVE_SNAPSHOT - optstr = "abehuwxACHIPSWYp:g:G:c:s:m:l:U:r:"; + optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:U:r:"; #else - optstr = "abehuwxACHIPSWYp:g:G:c:s:m:l:U:"; + optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:U:"; #endif while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { @@ -1115,6 +1119,9 @@ main(int argc, char *argv[]) break; case 'b': bvmcons = 1; + break; + case 'D': + destroy_on_poweroff = 1; break; case 'p': if (pincpu_parse(optarg) != 0) { From owner-svn-src-head@freebsd.org Thu Jun 25 12:46:17 2020 Return-Path: Delivered-To: svn-src-head@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 1E26635A5D0; Thu, 25 Jun 2020 12:46:17 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49t0BH64dgz42rl; Thu, 25 Jun 2020 12:46:15 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f53.google.com with SMTP id p20so5759604ejd.13; Thu, 25 Jun 2020 05:46:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ecjxn1R1G1pq7d8/OZIKEHuZVtHz85FRr1gus34/v4c=; b=obZsYpTr5UkhrXqv+qCnWmIyw62w3oSQWXKkFNYiNNHCLGaLoGFsaL/7XBdH91Ixdm ET11TY3dc6PF+2YbEaag+2fMYIO5sQ6knu60551rR4l0s6qvQU2JWKLlIbCnpfhHTTHW p/N526d0g1ptYLTDBfHDigiELMkITq+Bw9Qfs697UXR+cG5HeIIztIpHkXpqCKSghaSE pRICdi4RNqXh3b1ZBkuLypnGZdTXxSrMtm35TOx9pmHDvc/eFoP1bHzw81f5p/yGBI09 i2/VoyaWUiV+2apEX+Xnlbi0uaYcG7kEbl+8IFrKxvXMWhxt5Y1ERZwve8fpMkdbnydx QY4g== X-Gm-Message-State: AOAM533NV1DTRdqZ3Jpv4Hl83Qrf/MXNr2kQBU1+H/zKAOgELsSnqJpk JymyBv7d7ta6MyaxVozikZOvnuCXH4HDAg== X-Google-Smtp-Source: ABdhPJxGhEVHpXlt1+w+gBQVONMI+5IsC8rcPtpVioirGgxBUKnCldAf8wo3X40O1NPnC4iJQhWRKA== X-Received: by 2002:a17:906:5f98:: with SMTP id a24mr8099772eju.241.1593089174085; Thu, 25 Jun 2020 05:46:14 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id x16sm5429037edr.52.2020.06.25.05.46.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 05:46:13 -0700 (PDT) Subject: Re: svn commit: r362612 - head/usr.sbin/bhyve To: Pawel Biernacki , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006251235.05PCZLTX018913@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: Date: Thu, 25 Jun 2020 14:46:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006251235.05PCZLTX018913@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49t0BH64dgz42rl X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.218.53 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; RWL_MAILSPIKE_GOOD(0.00)[209.85.218.53:from]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.86)[-0.865]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.72)[-0.720]; NEURAL_SPAM_SHORT(0.23)[0.229]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.53:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 12:46:17 -0000 On 6/25/20 2:35 PM, Pawel Biernacki wrote: > Author: kaktus > Date: Thu Jun 25 12:35:20 2020 > New Revision: 362612 > URL: https://svnweb.freebsd.org/changeset/base/362612 > > Log: > bhyve: allow for automatic destruction on power-off > > Introduce -D flag that allows for the VM to be destroyed on guest initiated > power-off by the bhyve(8) process itself. > This is quality of life change that allows for simpler deployments without > the need for bhyvectl --destroy. > > Requested by: swills > Reviewed by: 0mp (manpages), grehan, kib, swills > Approved by: kib (mentor) > MFC after: 2 weeks > Sponsored by: Mysterious Code Ltd. > Differential Revision: https://reviews.freebsd.org/D25414 Relnotes: yes? From owner-svn-src-head@freebsd.org Thu Jun 25 15:21:23 2020 Return-Path: Delivered-To: svn-src-head@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 368B935D14B; Thu, 25 Jun 2020 15:21:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49t3dH0jwlz4BwJ; Thu, 25 Jun 2020 15:21:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13FC32515C; Thu, 25 Jun 2020 15:21:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PFLMWv023005; Thu, 25 Jun 2020 15:21:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PFLMQt023000; Thu, 25 Jun 2020 15:21:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006251521.05PFLMQt023000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 Jun 2020 15:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362613 - in head/sys: dev/md fs/tmpfs kern vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: dev/md fs/tmpfs kern vm X-SVN-Commit-Revision: 362613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 15:21:23 -0000 Author: markj Date: Thu Jun 25 15:21:21 2020 New Revision: 362613 URL: https://svnweb.freebsd.org/changeset/base/362613 Log: Call swap_pager_freespace() from vm_object_page_remove(). All vm_object_page_remove() callers, except linux_invalidate_mapping_pages() in the LinuxKPI, free swap space when removing a range of pages from an object. The LinuxKPI case appears to be an unintentional omission that could result in leaked swap blocks, so unconditionally free swap space in vm_object_page_remove() to protect against similar bugs in the future. Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25329 Modified: head/sys/dev/md/md.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/uipc_shm.c head/sys/vm/vm_map.c head/sys/vm/vm_object.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Thu Jun 25 12:35:20 2020 (r362612) +++ head/sys/dev/md/md.c Thu Jun 25 15:21:21 2020 (r362613) @@ -1566,8 +1566,6 @@ mdresize(struct md_s *sc, struct md_req *mdr) if (newpages < oldpages) { VM_OBJECT_WLOCK(sc->object); vm_object_page_remove(sc->object, newpages, 0, 0); - swap_pager_freespace(sc->object, newpages, - oldpages - newpages); swap_release_by_cred(IDX_TO_OFF(oldpages - newpages), sc->cred); sc->object->charge = IDX_TO_OFF(newpages); Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Thu Jun 25 12:35:20 2020 (r362612) +++ head/sys/fs/tmpfs/tmpfs_subr.c Thu Jun 25 15:21:21 2020 (r362613) @@ -1517,11 +1517,8 @@ retry: /* * Release any swap space and free any whole pages. */ - if (newpages < oldpages) { - swap_pager_freespace(uobj, newpages, oldpages - - newpages); + if (newpages < oldpages) vm_object_page_remove(uobj, newpages, 0, 0); - } } uobj->size = newpages; VM_OBJECT_WUNLOCK(uobj); Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Thu Jun 25 12:35:20 2020 (r362612) +++ head/sys/kern/uipc_shm.c Thu Jun 25 15:21:21 2020 (r362613) @@ -540,14 +540,9 @@ retry: } delta = IDX_TO_OFF(object->size - nobjsize); - /* Toss in memory pages. */ if (nobjsize < object->size) vm_object_page_remove(object, nobjsize, object->size, 0); - - /* Toss pages from swap. */ - if (object->type == OBJT_SWAP) - swap_pager_freespace(object, nobjsize, delta); /* Free the swap accounted for shm */ swap_release_by_cred(delta, object->cred); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jun 25 12:35:20 2020 (r362612) +++ head/sys/vm/vm_map.c Thu Jun 25 15:21:21 2020 (r362613) @@ -3644,7 +3644,7 @@ static void vm_map_entry_delete(vm_map_t map, vm_map_entry_t entry) { vm_object_t object; - vm_pindex_t offidxstart, offidxend, count, size1; + vm_pindex_t offidxstart, offidxend, size1; vm_size_t size; vm_map_entry_unlink(map, entry, UNLINK_MERGE_NONE); @@ -3673,9 +3673,8 @@ vm_map_entry_delete(vm_map_t map, vm_map_entry_t entry KASSERT(entry->cred == NULL || object->cred == NULL || (entry->eflags & MAP_ENTRY_NEEDS_COPY), ("OVERCOMMIT vm_map_entry_delete: both cred %p", entry)); - count = atop(size); offidxstart = OFF_TO_IDX(entry->offset); - offidxend = offidxstart + count; + offidxend = offidxstart + atop(size); VM_OBJECT_WLOCK(object); if (object->ref_count != 1 && ((object->flags & OBJ_ONEMAPPING) != 0 || @@ -3690,9 +3689,6 @@ vm_map_entry_delete(vm_map_t map, vm_map_entry_t entry */ vm_object_page_remove(object, offidxstart, offidxend, OBJPR_NOTMAPPED); - if (object->type == OBJT_SWAP) - swap_pager_freespace(object, offidxstart, - count); if (offidxend >= object->size && offidxstart < object->size) { size1 = object->size; Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Jun 25 12:35:20 2020 (r362612) +++ head/sys/vm/vm_object.c Thu Jun 25 15:21:21 2020 (r362613) @@ -2121,6 +2121,12 @@ wired: vm_page_free(p); } vm_object_pip_wakeup(object); + + if (object->type == OBJT_SWAP) { + if (end == 0) + end = object->size; + swap_pager_freespace(object, start, end - start); + } } /* @@ -2288,9 +2294,6 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset if (next_pindex < prev_object->size) { vm_object_page_remove(prev_object, next_pindex, next_pindex + next_size, 0); - if (prev_object->type == OBJT_SWAP) - swap_pager_freespace(prev_object, - next_pindex, next_size); #if 0 if (prev_object->cred != NULL) { KASSERT(prev_object->charge >= From owner-svn-src-head@freebsd.org Thu Jun 25 15:25:00 2020 Return-Path: Delivered-To: svn-src-head@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 C1ACC35D370; Thu, 25 Jun 2020 15:25:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49t3jS4l3Lz4CTF; Thu, 25 Jun 2020 15:25:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CFD525349; Thu, 25 Jun 2020 15:25:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PFP0aR024226; Thu, 25 Jun 2020 15:25:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PFP0iP024225; Thu, 25 Jun 2020 15:25:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006251525.05PFP0iP024225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 Jun 2020 15:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362614 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 362614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 15:25:00 -0000 Author: markj Date: Thu Jun 25 15:25:00 2020 New Revision: 362614 URL: https://svnweb.freebsd.org/changeset/base/362614 Log: Add SCTP_SUPPORT handling to config.mk. Reviewed by: jhb, tuexen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25402 Modified: head/sys/conf/config.mk Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Thu Jun 25 15:21:21 2020 (r362613) +++ head/sys/conf/config.mk Thu Jun 25 15:25:00 2020 (r362614) @@ -44,6 +44,10 @@ opt_printf.h: echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET} opt_scsi.h: echo "#define SCSI_DELAY 15000" > ${.TARGET} +.if ${MK_SCTP_SUPPORT} != "no" +opt_sctp.h: + @echo "#define SCTP_SUPPORT 1" > ${.TARGET} +.endif opt_wlan.h: echo "#define IEEE80211_DEBUG 1" > ${.TARGET} echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} @@ -64,6 +68,9 @@ KERN_OPTS+= INET6 .endif .if ${MK_IPSEC_SUPPORT} != "no" KERN_OPTS+= IPSEC_SUPPORT +.endif +.if ${MK_SCTP_SUPPORT} != "no" +KERN_OPTS+= SCTP_SUPPORT .endif .elif !defined(KERN_OPTS) # Add all the options that are mentioned in any opt_*.h file when we From owner-svn-src-head@freebsd.org Thu Jun 25 15:32:41 2020 Return-Path: Delivered-To: svn-src-head@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 967CE35D829; Thu, 25 Jun 2020 15:32:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49t3tJ5K7xz4Cpy; Thu, 25 Jun 2020 15:32:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x82f.google.com with SMTP id i16so4905327qtr.7; Thu, 25 Jun 2020 08:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jTjnjjxxhD5596aFPVT5QLIw9bOLij8m1fNyH7Y5iSg=; b=IqV20Dfg7Y0A93a+vLot43jeAB0JxuOYTCrwnc/aOBxkGyCVkJExskV1nGa1tD1Z2+ g0NO8egoM4KgTtzE7Sz632UtuiWnNgoPj8zpf0Ws2mfx2jNk7RsHjYqphT9gYXNnx8wk 28NgkUQrWf/fUrrvVYgYg4fObTHB30tTYhKxUhm0pTfJnRshoezXm1fDqzDOzTc9Kq+D FSJ8iwRt9rJO2rNUvbOwhCef8h3iDUgj2wQxJscPmBNVa7Xagmvg9iUSteTg8PDeB2aQ CUmrYDGE7+SiO0uD+ZhAqvLu+L8zpJnW9n6rzz1ucjQ6T1PETDa/imuGViZPYCVDQ8Y/ SxmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=jTjnjjxxhD5596aFPVT5QLIw9bOLij8m1fNyH7Y5iSg=; b=O6AwjWid811cJd487Yi/PybbuEdIs5ayCpjOCIPujVkrDX+Q654OqTrLTYgTlOWqSj kSrIGFpdLAYuVp0TZ/e2wS8myF95Bb0EfmrIJzu561vMekQ55bdXvGsU06nCEWtzw9I1 4EAkLsOzy7iEYtj0PE3vmfXL1ZQSP9Lh8eDJi2AYMoB8RuwjHNiLTyG7ICiY1bwn251P GlTP2yxlNmMg36od+45wjacSHJjkH8PG4U/ZVGxNZ+ig6QHHekN2LErPLQPI2F60HoDj rp9hbDJFCt2sdvqhSVka+9GcbXu+RSJx7UdPvDd54lLdMw9pmhbD9IJl6qsZw//ey/tn bSdQ== X-Gm-Message-State: AOAM533tMGwOenG6pX2urIw1D9vUE1N0oJnp85LuJI6e8ukFYOphg47m OVz7xzjQgvwZFAjNTiv/ex2pEGBaFldQag== X-Google-Smtp-Source: ABdhPJxwAvRpfG4/nnbFQtRMLB9CTR0EgpG+gz0pPBpg307IrvbCw5wUK8qw9TZN8Bt2ZR8HcF/EMw== X-Received: by 2002:ac8:3981:: with SMTP id v1mr29015554qte.134.1593099159481; Thu, 25 Jun 2020 08:32:39 -0700 (PDT) Received: from raichu (bras-base-toroon0560w-grc-20-184-147-206-12.dsl.bell.ca. [184.147.206.12]) by smtp.gmail.com with ESMTPSA id i14sm5369055qkl.105.2020.06.25.08.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 08:32:38 -0700 (PDT) Sender: Mark Johnston Date: Thu, 25 Jun 2020 11:32:36 -0400 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362613 - in head/sys: dev/md fs/tmpfs kern vm Message-ID: <20200625153236.GB2969@raichu> References: <202006251521.05PFLMQt023000@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006251521.05PFLMQt023000@repo.freebsd.org> X-Rspamd-Queue-Id: 49t3tJ5K7xz4Cpy X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=IqV20Dfg; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::82f as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-1.93 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.995]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.97)[-0.970]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_NOT_FQDN(0.50)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.26)[-0.263]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82f:from]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[184.147.206.12:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 15:32:41 -0000 On Thu, Jun 25, 2020 at 03:21:22PM +0000, Mark Johnston wrote: > Author: markj > Date: Thu Jun 25 15:21:21 2020 > New Revision: 362613 > URL: https://svnweb.freebsd.org/changeset/base/362613 > > Log: > Call swap_pager_freespace() from vm_object_page_remove(). > > All vm_object_page_remove() callers, except > linux_invalidate_mapping_pages() in the LinuxKPI, free swap space when > removing a range of pages from an object. The LinuxKPI case appears to > be an unintentional omission that could result in leaked swap blocks, so > unconditionally free swap space in vm_object_page_remove() to protect > against similar bugs in the future. > > Reviewed by: alc, kib > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D25329 I forgot to add an MFC tag. I intend to MFC this commit. From owner-svn-src-head@freebsd.org Thu Jun 25 16:46:28 2020 Return-Path: Delivered-To: svn-src-head@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 2D50D35F2CC; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@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 49t5WS0PPpz4Jj8; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@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 08BAF25DF2; Thu, 25 Jun 2020 16:46:28 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PGkRxF073089; Thu, 25 Jun 2020 16:46:27 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PGkRG5073088; Thu, 25 Jun 2020 16:46:27 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006251646.05PGkRG5073088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 25 Jun 2020 16:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362615 - head/usr.bin/limits X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/limits X-SVN-Commit-Revision: 362615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 16:46:28 -0000 Author: fernape (ports committer) Date: Thu Jun 25 16:46:27 2020 New Revision: 362615 URL: https://svnweb.freebsd.org/changeset/base/362615 Log: limits(1): Add EXAMPLES section * Add four examples showing flags -e, -b, -d, -s * Remove extra space at the end of the line reported by igor Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25426 Modified: head/usr.bin/limits/limits.1 Modified: head/usr.bin/limits/limits.1 ============================================================================== --- head/usr.bin/limits/limits.1 Thu Jun 25 15:25:00 2020 (r362614) +++ head/usr.bin/limits/limits.1 Thu Jun 25 16:46:27 2020 (r362615) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2020 +.Dd June 25, 2020 .Dt LIMITS 1 .Os .Sh NAME @@ -376,6 +376,44 @@ exits with a status of .Dv EXIT_SUCCESS . When run in command mode and execution of the command succeeds, the exit status will be whatever the executed program returns. +.Sh EXAMPLES +Show current stack size limit: +.Bd -literal -offset indent +$ limits -s +Resource limits (current): + stacksize 524288 kB +.Ed +.Pp +Try to run +.Xr ls 1 +with 1 byte of +.Va datasize +limit: +.Bd -literal -offset indent +$ limits -d 1b ls +Data segment size exceeds process limit +Abort trap +.Ed +.Pp +Produce +.Ql eval mode +output to limit +.Va sbsize +to 1 byte. +Output obtained when command is run from +.Xr sh 1 : +.Bd -literal -offset indent +$ limits -e -b 1b +ulimit -b 512; +.Ed +.Pp +Same as above from +.Xr csh 1 +.Bd -literal -offset indent +% limits -e -b 1b +limit -h sbsize 512; +limit sbsize 512; +.Ed .Sh SEE ALSO .Xr csh 1 , .Xr env 1 , @@ -396,7 +434,7 @@ utility first appeared in The .Nm utility was written by -.An David Nugent Aq Mt davidn@FreeBSD.org . +.An David Nugent Aq Mt davidn@FreeBSD.org . .Sh BUGS The .Nm From owner-svn-src-head@freebsd.org Thu Jun 25 17:04:24 2020 Return-Path: Delivered-To: svn-src-head@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 8F8A835F832; Thu, 25 Jun 2020 17:04:24 +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.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 49t5w83STlz4Kxg; Thu, 25 Jun 2020 17:04:24 +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 71CF52634C; Thu, 25 Jun 2020 17:04:24 +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 05PH4Of4085317; Thu, 25 Jun 2020 17:04:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PH4MEO085308; Thu, 25 Jun 2020 17:04:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <202006251704.05PH4MEO085308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 Jun 2020 17:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362616 - in head/sys/dev/cxgbe: . crypto cxgbei tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . crypto cxgbei tom X-SVN-Commit-Revision: 362616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 17:04:24 -0000 Author: np Date: Thu Jun 25 17:04:22 2020 New Revision: 362616 URL: https://svnweb.freebsd.org/changeset/base/362616 Log: cxgbe(4): Add a pointer to the adapter softc in vi_info. There were quite a few places where port_info was being accessed only to get to the adapter. Reviewed by: jhb@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25432 Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/crypto/t4_kern_tls.c head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/t4_vf.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/adapter.h Thu Jun 25 17:04:22 2020 (r362616) @@ -190,6 +190,7 @@ enum { struct vi_info { device_t dev; struct port_info *pi; + struct adapter *adapter; struct ifnet *ifp; struct pfil_head *pfil; @@ -953,22 +954,22 @@ struct adapter { #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) #define for_each_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.txq[vi->first_txq], iter = 0; \ + for (q = &vi->adapter->sge.txq[vi->first_txq], iter = 0; \ iter < vi->ntxq; ++iter, ++q) #define for_each_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.rxq[vi->first_rxq], iter = 0; \ + for (q = &vi->adapter->sge.rxq[vi->first_rxq], iter = 0; \ iter < vi->nrxq; ++iter, ++q) #define for_each_ofld_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.ofld_txq[vi->first_ofld_txq], iter = 0; \ + for (q = &vi->adapter->sge.ofld_txq[vi->first_ofld_txq], iter = 0; \ iter < vi->nofldtxq; ++iter, ++q) #define for_each_ofld_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.ofld_rxq[vi->first_ofld_rxq], iter = 0; \ + for (q = &vi->adapter->sge.ofld_rxq[vi->first_ofld_rxq], iter = 0; \ iter < vi->nofldrxq; ++iter, ++q) #define for_each_nm_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.nm_txq[vi->first_nm_txq], iter = 0; \ + for (q = &vi->adapter->sge.nm_txq[vi->first_nm_txq], iter = 0; \ iter < vi->nnmtxq; ++iter, ++q) #define for_each_nm_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.nm_rxq[vi->first_nm_rxq], iter = 0; \ + for (q = &vi->adapter->sge.nm_rxq[vi->first_nm_rxq], iter = 0; \ iter < vi->nnmrxq; ++iter, ++q) #define for_each_vi(_pi, _iter, _vi) \ for ((_vi) = (_pi)->vi, (_iter) = 0; (_iter) < (_pi)->nvi; \ Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Jun 25 17:04:22 2020 (r362616) @@ -587,7 +587,7 @@ cxgbe_tls_tag_alloc(struct ifnet *ifp, union if_snd_ta } vi = ifp->if_softc; - sc = vi->pi->adapter; + sc = vi->adapter; tlsp = alloc_tlspcb(ifp, vi, M_WAITOK); Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Jun 25 17:04:22 2020 (r362616) @@ -673,7 +673,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) MPASS(tp->tod != NULL); MPASS(tp->t_toe != NULL); toep = tp->t_toe; - MPASS(toep->vi->pi->adapter == icc->sc); + MPASS(toep->vi->adapter == icc->sc); icc->toep = toep; icc->cwt = cxgbei_select_worker_thread(icc); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/t4_main.c Thu Jun 25 17:04:22 2020 (r362616) @@ -1345,6 +1345,7 @@ t4_attach(device_t dev) pi->nvi = num_vis; for_each_vi(pi, j, vi) { vi->pi = pi; + vi->adapter = sc; vi->qsize_rxq = t4_qsize_rxq; vi->qsize_txq = t4_qsize_txq; @@ -1748,11 +1749,11 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_capabilities = T4_CAP; ifp->if_capenable = T4_CAP_ENABLE; #ifdef TCP_OFFLOAD - if (vi->nofldrxq != 0 && (vi->pi->adapter->flags & KERN_TLS_OK) == 0) + if (vi->nofldrxq != 0 && (vi->adapter->flags & KERN_TLS_OK) == 0) ifp->if_capabilities |= IFCAP_TOE; #endif #ifdef RATELIMIT - if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) { + if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) { ifp->if_capabilities |= IFCAP_TXRTLMT; ifp->if_capenable |= IFCAP_TXRTLMT; } @@ -1763,12 +1764,12 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_hw_tsomax = IP_MAXPACKET; ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; #ifdef RATELIMIT - if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif ifp->if_hw_tsomaxsegsize = 65536; #ifdef KERN_TLS - if (vi->pi->adapter->flags & KERN_TLS_OK) { + if (vi->adapter->flags & KERN_TLS_OK) { ifp->if_capabilities |= IFCAP_TXTLS; ifp->if_capenable |= IFCAP_TXTLS; } @@ -1908,7 +1909,7 @@ static void cxgbe_init(void *arg) { struct vi_info *vi = arg; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4init") != 0) return; @@ -2228,7 +2229,7 @@ vi_get_counter(struct ifnet *ifp, ift_counter c) struct vi_info *vi = ifp->if_softc; struct fw_vi_stats_vf *s = &vi->stats; - vi_refresh_stats(vi->pi->adapter, vi); + vi_refresh_stats(vi->adapter, vi); switch (c) { case IFCOUNTER_IPACKETS: @@ -2762,7 +2763,7 @@ vcxgbe_detach(device_t dev) struct adapter *sc; vi = device_get_softc(dev); - sc = vi->pi->adapter; + sc = vi->adapter; doom_vi(sc, vi); @@ -5766,7 +5767,7 @@ hashen_to_hashconfig(int hashen) int vi_full_init(struct vi_info *vi) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct ifnet *ifp = vi->ifp; uint16_t *rss; struct sge_rxq *rxq; @@ -6196,7 +6197,7 @@ void vi_tick(void *arg) { struct vi_info *vi = arg; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; vi_refresh_stats(sc, vi); @@ -7183,7 +7184,7 @@ static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc, i; struct sge_rxq *rxq; uint8_t v; @@ -7220,7 +7221,7 @@ static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc; idx = vi->pktc_idx; @@ -7250,7 +7251,7 @@ static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int qsize, rc; qsize = vi->qsize_rxq; @@ -7280,7 +7281,7 @@ static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int qsize, rc; qsize = vi->qsize_txq; @@ -9875,7 +9876,7 @@ static int sysctl_holdoff_tmr_idx_ofld(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc, i; struct sge_ofld_rxq *ofld_rxq; uint8_t v; @@ -9912,7 +9913,7 @@ static int sysctl_holdoff_pktc_idx_ofld(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc; idx = vi->ofld_pktc_idx; Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/t4_netmap.c Thu Jun 25 17:04:22 2020 (r362616) @@ -125,7 +125,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq { int rc, cntxt_id, i; __be32 v; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_params *sp = &sc->params.sge; struct netmap_adapter *na = NA(vi->ifp); struct fw_iq_cmd c; @@ -245,7 +245,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq static int free_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = -t4_iq_free(sc, sc->mbox, sc->pf, 0, FW_IQ_TYPE_FL_INT_CAP, @@ -262,7 +262,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq { int rc, cntxt_id; size_t len; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct netmap_adapter *na = NA(vi->ifp); struct fw_eq_eth_cmd c; @@ -335,7 +335,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq static int free_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq *nm_txq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, nm_txq->cntxt_id); @@ -562,7 +562,7 @@ cxgbe_netmap_reg(struct netmap_adapter *na, int on) { struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4nmreg"); @@ -817,7 +817,7 @@ cxgbe_netmap_txsync(struct netmap_kring *kring, int fl struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[vi->first_nm_txq + kring->ring_id]; const u_int head = kring->rhead; u_int reclaimed = 0; @@ -881,7 +881,7 @@ cxgbe_netmap_rxsync(struct netmap_kring *kring, int fl struct netmap_ring *ring = kring->ring; struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq + kring->ring_id]; u_int const head = kring->rhead; u_int n; @@ -1038,7 +1038,7 @@ void service_nm_rxq(struct sge_nm_rxq *nm_rxq) { struct vi_info *vi = nm_rxq->vi; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct ifnet *ifp = vi->ifp; struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = na->rx_rings[nm_rxq->nid]; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/t4_sge.c Thu Jun 25 17:04:22 2020 (r362616) @@ -2149,7 +2149,7 @@ void t4_update_fl_bufsize(struct ifnet *ifp) { struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_rxq *rxq; #ifdef TCP_OFFLOAD struct sge_ofld_rxq *ofld_rxq; @@ -2881,8 +2881,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) struct sge_eq *eq = &txq->eq; struct ifnet *ifp = txq->ifp; struct vi_info *vi = ifp->if_softc; - struct port_info *pi = vi->pi; - struct adapter *sc = pi->adapter; + struct adapter *sc = vi->adapter; u_int total, remaining; /* # of packets */ u_int available, dbdiff; /* # of hardware descriptors */ u_int n, next_cidx; @@ -3498,7 +3497,7 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int struct sysctl_oid *oid) { int rc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sysctl_oid_list *children; char name[16]; @@ -3628,7 +3627,7 @@ alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm struct sysctl_ctx_list *ctx; char name[16]; size_t len; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct netmap_adapter *na = NA(vi->ifp); MPASS(na != NULL); @@ -3694,7 +3693,7 @@ alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm static int free_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (vi->flags & VI_INIT_DONE) MPASS(nm_rxq->iq_cntxt_id == INVALID_NM_RXQ_CNTXT_ID); @@ -3760,7 +3759,7 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm static int free_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (vi->flags & VI_INIT_DONE) MPASS(nm_txq->cntxt_id == INVALID_NM_TXQ_CNTXT_ID); @@ -4270,7 +4269,7 @@ static int free_txq(struct vi_info *vi, struct sge_txq *txq) { int rc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_eq *eq = &txq->eq; rc = free_eq(sc, eq); Modified: head/sys/dev/cxgbe/t4_vf.c ============================================================================== --- head/sys/dev/cxgbe/t4_vf.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/t4_vf.c Thu Jun 25 17:04:22 2020 (r362616) @@ -702,6 +702,7 @@ t4vf_attach(device_t dev) for_each_vi(pi, j, vi) { vi->pi = pi; + vi->adapter = sc; vi->qsize_rxq = t4_qsize_rxq; vi->qsize_txq = t4_qsize_txq; Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/tom/t4_listen.c Thu Jun 25 17:04:22 2020 (r362616) @@ -1444,7 +1444,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_ ifp = synqe->syn->m_pkthdr.rcvif; vi = ifp->if_softc; - KASSERT(vi->pi->adapter == sc, + KASSERT(vi->adapter == sc, ("%s: vi %p, sc %p mismatch", __func__, vi, sc)); if (__predict_false(inp->inp_flags & INP_DROPPED)) { Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Thu Jun 25 16:46:27 2020 (r362615) +++ head/sys/dev/cxgbe/tom/t4_tom.c Thu Jun 25 17:04:22 2020 (r362616) @@ -970,7 +970,7 @@ calc_options0(struct vi_info *vi, struct conn_params * MPASS(cp->opt0_bufsize >= 0 && cp->opt0_bufsize <= M_RCV_BUFSIZ); opt0 |= V_RCV_BUFSIZ(cp->opt0_bufsize); - MPASS(cp->l2t_idx >= 0 && cp->l2t_idx < vi->pi->adapter->vres.l2t.size); + MPASS(cp->l2t_idx >= 0 && cp->l2t_idx < vi->adapter->vres.l2t.size); opt0 |= V_L2T_IDX(cp->l2t_idx); opt0 |= V_SMAC_SEL(vi->smt_idx); @@ -1045,7 +1045,7 @@ calc_options2(struct vi_info *vi, struct conn_params * uint64_t select_ntuple(struct vi_info *vi, struct l2t_entry *e) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct tp_params *tp = &sc->params.tp; uint64_t ntuple = 0; From owner-svn-src-head@freebsd.org Thu Jun 25 17:44:14 2020 Return-Path: Delivered-To: svn-src-head@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 CD636340887; Thu, 25 Jun 2020 17:44:14 +0000 (UTC) (envelope-from dougm@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 49t6p64XKjz4MnX; Thu, 25 Jun 2020 17:44:14 +0000 (UTC) (envelope-from dougm@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 7E40626D5E; Thu, 25 Jun 2020 17:44:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PHiEZ6009740; Thu, 25 Jun 2020 17:44:14 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PHiEUu009739; Thu, 25 Jun 2020 17:44:14 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <202006251744.05PHiEUu009739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 25 Jun 2020 17:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362617 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 362617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 17:44:14 -0000 Author: dougm Date: Thu Jun 25 17:44:14 2020 New Revision: 362617 URL: https://svnweb.freebsd.org/changeset/base/362617 Log: Eliminate the color field from the RB element struct. Identify the color of a node (or, really, the color of the link from the parent to the node) by using one of the last two bits of the parent pointer in that parent node. Adjust rebalancing methods to account for where colors are stored, and the fact that null children have a color too. Adjust RB_PARENT and RB_SET_PARENT to account for this change. Reviewed by: markj Tested by: pho, hselasky Differential Revision: https://reviews.freebsd.org/D25418 Modified: head/sys/sys/tree.h Modified: head/sys/sys/tree.h ============================================================================== --- head/sys/sys/tree.h Thu Jun 25 17:04:22 2020 (r362616) +++ head/sys/sys/tree.h Thu Jun 25 17:44:14 2020 (r362617) @@ -307,38 +307,60 @@ struct name { \ (root)->rbh_root = NULL; \ } while (/*CONSTCOND*/ 0) -#define RB_BLACK 0 -#define RB_RED 1 #define RB_ENTRY(type) \ struct { \ struct type *rbe_left; /* left element */ \ struct type *rbe_right; /* right element */ \ struct type *rbe_parent; /* parent element */ \ - int rbe_color; /* node color */ \ } #define RB_LEFT(elm, field) (elm)->field.rbe_left #define RB_RIGHT(elm, field) (elm)->field.rbe_right -#define RB_PARENT(elm, field) (elm)->field.rbe_parent -#define RB_COLOR(elm, field) (elm)->field.rbe_color -#define RB_ISRED(elm, field) ((elm) != NULL && RB_COLOR(elm, field) == RB_RED) + +/* + * With the expectation that any object of struct type has an + * address that is a multiple of 4, and that therefore the + * 2 least significant bits of a pointer to struct type are + * always zero, this implementation sets those bits to indicate + * that the left or right child of the tree node is "red". + */ +#define RB_UP(elm, field) (elm)->field.rbe_parent +#define RB_BITS(elm, field) *(__uintptr_t *)&RB_UP(elm, field) +#define RB_RED_L (__uintptr_t)1 +#define RB_RED_R (__uintptr_t)2 +#define RB_RED_MASK (__uintptr_t)3 +#define RB_FLIP_LEFT(elm, field) (RB_BITS(elm, field) ^= RB_RED_L) +#define RB_FLIP_RIGHT(elm, field) (RB_BITS(elm, field) ^= RB_RED_R) +#define RB_RED_LEFT(elm, field) ((RB_BITS(elm, field) & RB_RED_L) != 0) +#define RB_RED_RIGHT(elm, field) ((RB_BITS(elm, field) & RB_RED_R) != 0) +#define RB_PARENT(elm, field) ((__typeof(RB_UP(elm, field))) \ + (RB_BITS(elm, field) & ~RB_RED_MASK)) + +/* + * This header may appear in user code where 'bool' is not defined, + * so it defines its own boolean type to avoid breaking that code. + */ +#define RB_BOOL int +#define RB_TRUE 1 +#define RB_FALSE 0 + #define RB_ROOT(head) (head)->rbh_root #define RB_EMPTY(head) (RB_ROOT(head) == NULL) #define RB_SET_PARENT(dst, src, field) do { \ - RB_PARENT(dst, field) = src; \ + RB_BITS(dst, field) &= RB_RED_MASK; \ + RB_BITS(dst, field) |= (__uintptr_t)src; \ } while (/*CONSTCOND*/ 0) #define RB_SET(elm, parent, field) do { \ - RB_SET_PARENT(elm, parent, field); \ + RB_UP(elm, field) = parent; \ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ - RB_COLOR(elm, field) = RB_RED; \ } while (/*CONSTCOND*/ 0) -#define RB_SET_BLACKRED(black, red, field) do { \ - RB_COLOR(black, field) = RB_BLACK; \ - RB_COLOR(red, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) +#define RB_COLOR(elm, field) (RB_PARENT(elm, field) == NULL ? RB_FALSE : \ + RB_LEFT(RB_PARENT(elm, field), field) == elm ? \ + RB_RED_LEFT(RB_PARENT(elm, field), field) : \ + RB_RED_RIGHT(RB_PARENT(elm, field), field)) /* * Something to be invoked in a loop at the root of every modified subtree, @@ -442,106 +464,123 @@ struct { \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ - struct type *parent, *gparent, *tmp; \ - while (RB_ISRED((parent = RB_PARENT(elm, field)), field)) { \ - gparent = RB_PARENT(parent, field); \ - if (parent == RB_LEFT(gparent, field)) { \ - tmp = RB_RIGHT(gparent, field); \ - if (RB_ISRED(tmp, field)) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ + struct type *gparent, *parent; \ + while ((parent = RB_PARENT(elm, field)) != NULL) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_FLIP_LEFT(parent, field); \ + else \ + RB_FLIP_RIGHT(parent, field); \ + if ((gparent = RB_PARENT(parent, field)) == NULL) \ + break; \ + if (RB_RED_LEFT(gparent, field) && \ + RB_RED_RIGHT(gparent, field)) { \ + RB_FLIP_LEFT(gparent, field); \ + RB_FLIP_RIGHT(gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_RED_LEFT(gparent, field) && \ + parent == RB_LEFT(gparent, field)) { \ if (RB_RIGHT(parent, field) == elm) { \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = parent; \ + RB_ROTATE_LEFT(head, parent, elm, field);\ + RB_FLIP_RIGHT(parent, field); \ + RB_FLIP_LEFT(elm, field); \ parent = elm; \ - elm = tmp; \ } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_RIGHT(head, gparent, tmp, field); \ - } else { \ - tmp = RB_LEFT(gparent, field); \ - if (RB_ISRED(tmp, field)) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ + RB_ROTATE_RIGHT(head, gparent, parent, field); \ + RB_FLIP_LEFT(gparent, field); \ + RB_FLIP_RIGHT(parent, field); \ + } else if (RB_RED_RIGHT(gparent, field) && \ + parent == RB_RIGHT(gparent, field)) { \ if (RB_LEFT(parent, field) == elm) { \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = parent; \ + RB_ROTATE_RIGHT(head, parent, elm, field);\ + RB_FLIP_LEFT(parent, field); \ + RB_FLIP_RIGHT(elm, field); \ parent = elm; \ - elm = tmp; \ } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_LEFT(head, gparent, tmp, field); \ + RB_ROTATE_LEFT(head, gparent, parent, field); \ + RB_FLIP_RIGHT(gparent, field); \ + RB_FLIP_LEFT(parent, field); \ } \ + break; \ } \ - RB_COLOR(head->rbh_root, field) = RB_BLACK; \ } #define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ attr void \ -name##_RB_REMOVE_COLOR(struct name *head, struct type *parent) \ +name##_RB_REMOVE_COLOR(struct name *head, struct type *par) \ { \ - struct type *elm, *tmp; \ - elm = NULL; \ + struct type *gpr, *sib, *nec; \ + RB_BOOL left_elm, left_par, red_gpr; \ + left_par = (RB_LEFT(par, field) == NULL); \ do { \ - if (RB_LEFT(parent, field) == elm) { \ - tmp = RB_RIGHT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = RB_RIGHT(parent, field); \ + left_elm = left_par; \ + if (left_elm ? \ + !RB_RED_RIGHT(par, field) : \ + !RB_RED_LEFT(par, field)) { \ + gpr = RB_PARENT(par, field); \ + left_par = gpr != NULL && \ + RB_LEFT(gpr, field) == par; \ + red_gpr = gpr == NULL ? \ + RB_TRUE: RB_COLOR(par, field); \ + } \ + if (left_elm) { \ + if (RB_RED_RIGHT(par, field)) { \ + red_gpr = RB_TRUE; \ + RB_ROTATE_LEFT(head, par, gpr, field); \ + RB_FLIP_RIGHT(par, field); \ + RB_FLIP_LEFT(gpr, field); \ } \ - if (RB_ISRED(RB_RIGHT(tmp, field), field)) \ - RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ - else if (RB_ISRED(RB_LEFT(tmp, field), field)) { \ - struct type *oleft; \ - RB_ROTATE_RIGHT(head, tmp, oleft, field); \ - RB_COLOR(oleft, field) = RB_BLACK; \ - tmp = oleft; \ + sib = RB_RIGHT(par, field); \ + if (RB_RED_RIGHT(sib, field)) { \ + if (RB_RED_LEFT(sib, field)) { \ + RB_FLIP_LEFT(sib, field); \ + RB_FLIP_RIGHT(par, field); \ + } \ + RB_FLIP_RIGHT(sib, field); \ + } else if (RB_RED_LEFT(sib, field)) { \ + RB_ROTATE_RIGHT(head, sib, nec, field); \ + RB_FLIP_LEFT(sib, field); \ + sib = nec; \ } else { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ + RB_FLIP_RIGHT(par, field); \ + par = gpr; \ continue; \ } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ + RB_ROTATE_LEFT(head, par, sib, field); \ + return; \ } else { \ - tmp = RB_LEFT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = RB_LEFT(parent, field); \ + if (RB_RED_LEFT(par, field)) { \ + red_gpr = RB_TRUE; \ + RB_ROTATE_RIGHT(head, par, gpr, field); \ + RB_FLIP_LEFT(par, field); \ + RB_FLIP_RIGHT(gpr, field); \ } \ - if (RB_ISRED(RB_LEFT(tmp, field), field)) \ - RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ - else if (RB_ISRED(RB_RIGHT(tmp, field), field)) { \ - struct type *oright; \ - RB_ROTATE_LEFT(head, tmp, oright, field); \ - RB_COLOR(oright, field) = RB_BLACK; \ - tmp = oright; \ - } else if (!RB_ISRED(RB_LEFT(tmp, field), field)) { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ + sib = RB_LEFT(par, field); \ + if (RB_RED_LEFT(sib, field)) { \ + if (RB_RED_RIGHT(sib, field)) { \ + RB_FLIP_RIGHT(sib, field); \ + RB_FLIP_LEFT(par, field); \ + } \ + RB_FLIP_LEFT(sib, field); \ + } else if (RB_RED_RIGHT(sib, field)) { \ + RB_ROTATE_LEFT(head, sib, nec, field); \ + RB_FLIP_RIGHT(sib, field); \ + sib = nec; \ + } else { \ + RB_FLIP_LEFT(par, field); \ + par = gpr; \ continue; \ } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ + RB_ROTATE_RIGHT(head, par, sib, field); \ + return; \ } \ - } while (!RB_ISRED(elm, field) && parent != NULL); \ - RB_COLOR(elm, field) = RB_BLACK; \ + } while (!red_gpr); \ + if (gpr == NULL); \ + else if (left_par) \ + RB_FLIP_LEFT(gpr, field); \ + else \ + RB_FLIP_RIGHT(gpr, field); \ } #define RB_GENERATE_REMOVE(name, type, field, attr) \ @@ -549,12 +588,11 @@ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ struct type *child, *old, *parent, *right; \ - int color; \ + RB_BOOL red; \ \ old = elm; \ parent = RB_PARENT(elm, field); \ right = RB_RIGHT(elm, field); \ - color = RB_COLOR(elm, field); \ if (RB_LEFT(elm, field) == NULL) \ elm = child = right; \ else if (right == NULL) \ @@ -562,6 +600,9 @@ name##_RB_REMOVE(struct name *head, struct type *elm) else { \ if ((child = RB_LEFT(right, field)) == NULL) { \ child = RB_RIGHT(right, field); \ + red = RB_RED_RIGHT(old, field); \ + if (red) \ + RB_FLIP_RIGHT(old, field); \ RB_RIGHT(old, field) = child; \ parent = elm = right; \ } else { \ @@ -570,18 +611,27 @@ name##_RB_REMOVE(struct name *head, struct type *elm) while ((child = RB_LEFT(elm, field)) != NULL); \ child = RB_RIGHT(elm, field); \ parent = RB_PARENT(elm, field); \ + red = RB_RED_LEFT(parent, field); \ + if (red) \ + RB_FLIP_LEFT(parent, field); \ RB_LEFT(parent, field) = child; \ RB_SET_PARENT(RB_RIGHT(old, field), elm, field); \ } \ RB_SET_PARENT(RB_LEFT(old, field), elm, field); \ - color = RB_COLOR(elm, field); \ elm->field = old->field; \ } \ + if (elm == child) { \ + red = RB_COLOR(old, field); \ + if (!red); \ + else if (RB_LEFT(parent, field) == old) \ + RB_FLIP_LEFT(parent, field); \ + else \ + RB_FLIP_RIGHT(parent, field); \ + } \ RB_SWAP_CHILD(head, old, elm, field); \ - if (child != NULL) { \ + if (child != NULL) \ RB_SET_PARENT(child, parent, field); \ - RB_COLOR(child, field) = RB_BLACK; \ - } else if (color != RB_RED && parent != NULL) \ + else if (!red && parent != NULL) \ name##_RB_REMOVE_COLOR(head, parent); \ while (parent != NULL) { \ RB_AUGMENT(parent); \ @@ -610,13 +660,12 @@ name##_RB_INSERT(struct name *head, struct type *elm) return (tmp); \ } \ RB_SET(elm, parent, field); \ - if (parent != NULL) { \ - if (comp < 0) \ - RB_LEFT(parent, field) = elm; \ - else \ - RB_RIGHT(parent, field) = elm; \ - } else \ + if (parent == NULL) \ RB_ROOT(head) = elm; \ + else if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ while (elm != NULL) { \ RB_AUGMENT(elm); \ From owner-svn-src-head@freebsd.org Thu Jun 25 19:12:28 2020 Return-Path: Delivered-To: svn-src-head@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 78C2D34274D; Thu, 25 Jun 2020 19:12:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49t8lw2j43z4Sbt; Thu, 25 Jun 2020 19:12:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5815327E96; Thu, 25 Jun 2020 19:12:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PJCSxv064704; Thu, 25 Jun 2020 19:12:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PJCS3A064703; Thu, 25 Jun 2020 19:12:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006251912.05PJCS3A064703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 Jun 2020 19:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362618 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 362618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:12:28 -0000 Author: markj Date: Thu Jun 25 19:12:27 2020 New Revision: 362618 URL: https://svnweb.freebsd.org/changeset/base/362618 Log: Add SCTP_SUPPORT to the default kernel options. Otherwise out-of-tree module builds will be broken for a lack of a definition of MK_SCTP_SUPPORT. Reported by: Michael Butler MFC with: r362614 Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Thu Jun 25 17:44:14 2020 (r362617) +++ head/sys/conf/kern.opts.mk Thu Jun 25 19:12:27 2020 (r362618) @@ -42,6 +42,7 @@ __DEFAULT_YES_OPTIONS = \ KERNEL_SYMBOLS \ NETGRAPH \ PF \ + SCTP_SUPPORT \ SOURCELESS_HOST \ SOURCELESS_UCODE \ TESTS \ From owner-svn-src-head@freebsd.org Thu Jun 25 19:27:22 2020 Return-Path: Delivered-To: svn-src-head@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 9044B34312B; Thu, 25 Jun 2020 19:27:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49t9563JScz4THv; Thu, 25 Jun 2020 19:27:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CAA68405; Thu, 25 Jun 2020 19:27:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PJRMuw071078; Thu, 25 Jun 2020 19:27:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PJRMi0071077; Thu, 25 Jun 2020 19:27:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006251927.05PJRMi0071077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 Jun 2020 19:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362619 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 362619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:27:22 -0000 Author: markj Date: Thu Jun 25 19:27:22 2020 New Revision: 362619 URL: https://svnweb.freebsd.org/changeset/base/362619 Log: ipfw: Support the literal IPv6 address syntax in the fwd command. Discussed with: rgrimes, Lutz Donnerhacke Submitted by: Neel Chauhan MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24011 Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Thu Jun 25 19:12:27 2020 (r362618) +++ head/sbin/ipfw/ipfw2.c Thu Jun 25 19:27:22 2020 (r362619) @@ -3990,8 +3990,7 @@ chkarg: * IPv4 a.b.c.d,port * IPv4 a.b.c.d:port * IPv6 w:x:y::z,port - * The ':' can only be used with hostname and IPv4 address. - * XXX-BZ Should we also support [w:x:y::z]:port? + * IPv6 [w:x:y::z]:port */ struct sockaddr_storage result; struct addrinfo *res; @@ -4001,33 +4000,45 @@ chkarg: NEED1("missing forward address[:port]"); - /* - * locate the address-port separator (':' or ',') - */ - s = strchr(*av, ','); - if (s == NULL) { - /* Distinguish between IPv4:port and IPv6 cases. */ - s = strchr(*av, ':'); - if (s && strchr(s+1, ':')) - s = NULL; /* no port */ - } - - port_number = 0; - if (s != NULL) { - /* Terminate host portion and set s to start of port. */ - *(s++) = '\0'; - i = strtoport(s, &end, 0 /* base */, 0 /* proto */); - if (s == end) - errx(EX_DATAERR, - "illegal forwarding port ``%s''", s); - port_number = (u_short)i; - } - if (_substrcmp(*av, "tablearg") == 0) { family = PF_INET; ((struct sockaddr_in*)&result)->sin_addr.s_addr = INADDR_ANY; } else { + /* + * Are we an bracket-enclosed IPv6 address? + */ + if (strchr(*av, '[')) + (*av)++; + + /* + * locate the address-port separator (':' or ',') + */ + s = strchr(*av, ','); + if (s == NULL) { + s = strchr(*av, ']'); + /* Prevent erroneous parsing on brackets. */ + if (s != NULL) + *(s++) = '\0'; + else + s = *av; + + /* Distinguish between IPv4:port and IPv6 cases. */ + s = strchr(s, ':'); + if (s && strchr(s+1, ':')) + s = NULL; /* no port */ + } + + if (s != NULL) { + /* Terminate host portion and set s to start of port. */ + *(s++) = '\0'; + i = strtoport(s, &end, 0 /* base */, 0 /* proto */); + if (s == end) + errx(EX_DATAERR, + "illegal forwarding port ``%s''", s); + port_number = (u_short)i; + } + /* * Resolve the host name or address to a family and a * network representation of the address. From owner-svn-src-head@freebsd.org Thu Jun 25 19:35:38 2020 Return-Path: Delivered-To: svn-src-head@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 20736343316; Thu, 25 Jun 2020 19:35:38 +0000 (UTC) (envelope-from gordon@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 49t9Gd75L5z4Tr8; Thu, 25 Jun 2020 19:35:37 +0000 (UTC) (envelope-from gordon@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 EA40B81F2; Thu, 25 Jun 2020 19:35:37 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PJZbHw077014; Thu, 25 Jun 2020 19:35:37 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PJZbJ2077013; Thu, 25 Jun 2020 19:35:37 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202006251935.05PJZbJ2077013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Thu, 25 Jun 2020 19:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362620 - head/secure/lib/libcrypto X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: head/secure/lib/libcrypto X-SVN-Commit-Revision: 362620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:35:38 -0000 Author: gordon Date: Thu Jun 25 19:35:37 2020 New Revision: 362620 URL: https://svnweb.freebsd.org/changeset/base/362620 Log: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility. This define caused a couple of symbols to disappear. To keep ABI compatibility, we are going to keep the symbols exposed, but leave SSLv3 as not in the default config (this is what OPENSSL_NO_SSL3 achieves). The ramifications of this is an application can still use SSLv3 if it specifically calls the SSLv3_method family of APIs. Reported by: kib, others Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25451 Modified: head/secure/lib/libcrypto/opensslconf.h.in Modified: head/secure/lib/libcrypto/opensslconf.h.in ============================================================================== --- head/secure/lib/libcrypto/opensslconf.h.in Thu Jun 25 19:27:22 2020 (r362619) +++ head/secure/lib/libcrypto/opensslconf.h.in Thu Jun 25 19:35:37 2020 (r362620) @@ -79,9 +79,6 @@ extern "C" { #ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 #endif -#ifndef OPENSSL_NO_SSL3_METHOD -# define OPENSSL_NO_SSL3_METHOD -#endif #ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN #endif From owner-svn-src-head@freebsd.org Thu Jun 25 19:35:47 2020 Return-Path: Delivered-To: svn-src-head@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 550A23431DD; Thu, 25 Jun 2020 19:35:47 +0000 (UTC) (envelope-from vmaffione@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 49t9Gn0w8fz4V4h; Thu, 25 Jun 2020 19:35:44 +0000 (UTC) (envelope-from vmaffione@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 6996983AF; Thu, 25 Jun 2020 19:35:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PJZiZR077064; Thu, 25 Jun 2020 19:35:44 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PJZiWs077063; Thu, 25 Jun 2020 19:35:44 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006251935.05PJZiWs077063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 25 Jun 2020 19:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362621 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:35:47 -0000 Author: vmaffione Date: Thu Jun 25 19:35:43 2020 New Revision: 362621 URL: https://svnweb.freebsd.org/changeset/base/362621 Log: iflib: netmap: add per-tx-queue netmap support Reviewed by: gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25253 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Jun 25 19:35:37 2020 (r362620) +++ head/sys/net/iflib.c Thu Jun 25 19:35:43 2020 (r362621) @@ -1235,7 +1235,9 @@ iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t tx uint16_t txqid; txqid = txq->ift_id; - kring = NA(ctx->ifc_ifp)->tx_rings[txqid]; + kring = netmap_kring_on(NA(ctx->ifc_ifp), txqid, NR_TX); + if (kring == NULL) + return; if (kring->nr_hwcur != nm_next(kring->nr_hwtail, kring->nkr_num_slots - 1)) { bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, @@ -3756,20 +3758,12 @@ _task_fn_tx(void *context) #ifdef IFLIB_DIAGNOSTICS txq->ift_cpu_exec_count[curcpu]++; #endif - if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) + if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) return; #ifdef DEV_NETMAP - if (if_getcapenable(ifp) & IFCAP_NETMAP) { - bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, - BUS_DMASYNC_POSTREAD); - if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false)) - netmap_tx_irq(ifp, txq->ift_id); - if (ctx->ifc_flags & IFC_LEGACY) - IFDI_INTR_ENABLE(ctx); - else - IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); - return; - } + if ((if_getcapenable(ifp) & IFCAP_NETMAP) && + netmap_tx_irq(ifp, txq->ift_id)) + goto skip_ifmp; #endif #ifdef ALTQ if (ALTQ_IS_ENABLED(&ifp->if_snd)) @@ -3784,6 +3778,9 @@ _task_fn_tx(void *context) */ if (abdicate) ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE); +#ifdef DEV_NETMAP +skip_ifmp: +#endif if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else From owner-svn-src-head@freebsd.org Thu Jun 25 19:44:25 2020 Return-Path: Delivered-To: svn-src-head@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 7F2AA3432E9; Thu, 25 Jun 2020 19:44:25 +0000 (UTC) (envelope-from vmaffione@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 49t9Sn2CVfz4Vtv; Thu, 25 Jun 2020 19:44:25 +0000 (UTC) (envelope-from vmaffione@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 28B038806; Thu, 25 Jun 2020 19:44:25 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PJiPHD083568; Thu, 25 Jun 2020 19:44:25 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PJiOkA083567; Thu, 25 Jun 2020 19:44:24 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006251944.05PJiOkA083567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 25 Jun 2020 19:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362622 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 19:44:25 -0000 Author: vmaffione Date: Thu Jun 25 19:44:24 2020 New Revision: 362622 URL: https://svnweb.freebsd.org/changeset/base/362622 Log: iflib: netmap: add support for partial ring openings Reviewed by: gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25254 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Jun 25 19:35:43 2020 (r362621) +++ head/sys/net/iflib.c Thu Jun 25 19:44:24 2020 (r362622) @@ -1189,7 +1189,7 @@ iflib_netmap_attach(if_ctx_t ctx) return (netmap_attach(&na)); } -static void +static int iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq) { struct netmap_adapter *na = NA(ctx->ifc_ifp); @@ -1197,7 +1197,7 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq) slot = netmap_reset(na, NR_TX, txq->ift_id, 0); if (slot == NULL) - return; + return (0); for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxd[0]; i++) { /* @@ -1211,21 +1211,24 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq) netmap_load_map(na, txq->ift_buf_tag, txq->ift_sds.ifsd_map[i], NMB(na, slot + si)); } + return (1); } -static void +static int iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq) { struct netmap_adapter *na = NA(ctx->ifc_ifp); - struct netmap_kring *kring = na->rx_rings[rxq->ifr_id]; + struct netmap_kring *kring; struct netmap_slot *slot; uint32_t nm_i; slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0); if (slot == NULL) - return; + return (0); + kring = na->rx_rings[rxq->ifr_id]; nm_i = netmap_idx_n2k(kring, 0); netmap_fl_refill(rxq, kring, nm_i, true); + return (1); } static void @@ -1256,8 +1259,8 @@ iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t tx #define iflib_netmap_detach(ifp) netmap_detach(ifp) #else -#define iflib_netmap_txq_init(ctx, txq) -#define iflib_netmap_rxq_init(ctx, rxq) +#define iflib_netmap_txq_init(ctx, txq) (0) +#define iflib_netmap_rxq_init(ctx, rxq) (0) #define iflib_netmap_detach(ifp) #define iflib_netmap_attach(ctx) (0) @@ -2368,10 +2371,8 @@ iflib_init_locked(if_ctx_t ctx) IFDI_INIT(ctx); MPASS(if_getdrvflags(ifp) == i); for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) { - /* XXX this should really be done on a per-queue basis */ - if (if_getcapenable(ifp) & IFCAP_NETMAP) { - MPASS(rxq->ifr_id == i); - iflib_netmap_rxq_init(ctx, rxq); + if (iflib_netmap_rxq_init(ctx, rxq) > 0) { + /* This rxq is in netmap mode. Skip normal init. */ continue; } for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) { From owner-svn-src-head@freebsd.org Thu Jun 25 20:04:36 2020 Return-Path: Delivered-To: svn-src-head@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 7324B3441A2; Thu, 25 Jun 2020 20:04:36 +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 49t9w42PzBz4X7m; Thu, 25 Jun 2020 20:04:36 +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 4E1DC8BD7; Thu, 25 Jun 2020 20:04:36 +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 05PK4aj2096205; Thu, 25 Jun 2020 20:04:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PK4aXH096204; Thu, 25 Jun 2020 20:04:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006252004.05PK4aXH096204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 25 Jun 2020 20:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362623 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 362623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:04:36 -0000 Author: dim Date: Thu Jun 25 20:04:35 2020 New Revision: 362623 URL: https://svnweb.freebsd.org/changeset/base/362623 Log: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. MFC after: 3 days Modified: head/lib/libkvm/kvm_getswapinfo.3 Modified: head/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- head/lib/libkvm/kvm_getswapinfo.3 Thu Jun 25 19:44:24 2020 (r362622) +++ head/lib/libkvm/kvm_getswapinfo.3 Thu Jun 25 20:04:35 2020 (r362623) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-head@freebsd.org Thu Jun 25 20:17:38 2020 Return-Path: Delivered-To: svn-src-head@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 ABC6934451F; Thu, 25 Jun 2020 20:17:38 +0000 (UTC) (envelope-from jhb@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 49tBC63wvMz4XXF; Thu, 25 Jun 2020 20:17:38 +0000 (UTC) (envelope-from jhb@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 7DA9E8966; Thu, 25 Jun 2020 20:17:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKHc60002595; Thu, 25 Jun 2020 20:17:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKHZkb002580; Thu, 25 Jun 2020 20:17:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252017.05PKHZkb002580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362624 - in head/sys: crypto/aesni crypto/via dev/cxgbe/crypto dev/random geom geom/eli kern netinet/netdump opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: crypto/aesni crypto/via dev/cxgbe/crypto dev/random geom geom/eli kern netinet/netdump opencrypto X-SVN-Commit-Revision: 362624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:17:38 -0000 Author: jhb Date: Thu Jun 25 20:17:34 2020 New Revision: 362624 URL: https://svnweb.freebsd.org/changeset/base/362624 Log: Use zfree() instead of explicit_bzero() and free(). In addition to reducing lines of code, this also ensures that the full allocation is always zeroed avoiding possible bugs with incorrect lengths passed to explicit_bzero(). Suggested by: cem Reviewed by: cem, delphij Approved by: csprng (cem) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25435 Modified: head/sys/crypto/aesni/aesni.c head/sys/crypto/via/padlock_cipher.c head/sys/dev/cxgbe/crypto/t4_kern_tls.c head/sys/dev/random/randomdev.c head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli_ctl.c head/sys/geom/eli/g_eli_key_cache.c head/sys/geom/geom_dev.c head/sys/kern/kern_environment.c head/sys/kern/kern_shutdown.c head/sys/kern/uipc_ktls.c head/sys/netinet/netdump/netdump_client.c head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptosoft.c head/sys/opencrypto/ktls_ocf.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/crypto/aesni/aesni.c Thu Jun 25 20:17:34 2020 (r362624) @@ -808,18 +808,12 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c crp->crp_payload_length, outbuf); out: - if (allocated) { - explicit_bzero(buf, crp->crp_payload_length); - free(buf, M_AESNI); - } - if (authallocated) { - explicit_bzero(authbuf, crp->crp_aad_length); - free(authbuf, M_AESNI); - } - if (outallocated) { - explicit_bzero(outbuf, crp->crp_payload_length); - free(outbuf, M_AESNI); - } + if (allocated) + zfree(buf, M_AESNI); + if (authallocated) + zfree(authbuf, M_AESNI); + if (outallocated) + zfree(outbuf, M_AESNI); explicit_bzero(iv, sizeof(iv)); explicit_bzero(tag, sizeof(tag)); return (error); Modified: head/sys/crypto/via/padlock_cipher.c ============================================================================== --- head/sys/crypto/via/padlock_cipher.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/crypto/via/padlock_cipher.c Thu Jun 25 20:17:34 2020 (r362624) @@ -234,8 +234,7 @@ padlock_cipher_process(struct padlock_session *ses, st crypto_copyback(crp, crp->crp_payload_start, crp->crp_payload_length, abuf); - explicit_bzero(buf, crp->crp_payload_length + 16); - free(buf, M_PADLOCK); + zfree(buf, M_PADLOCK); } return (0); } Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Jun 25 20:17:34 2020 (r362624) @@ -2337,8 +2337,7 @@ cxgbe_tls_tag_free(struct m_snd_tag *mst) if (tlsp->tx_key_addr >= 0) free_keyid(tlsp, tlsp->tx_key_addr); - explicit_bzero(&tlsp->keyctx, sizeof(&tlsp->keyctx)); - free(tlsp, M_CXGBE); + zfree(tlsp, M_CXGBE); } void Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/dev/random/randomdev.c Thu Jun 25 20:17:34 2020 (r362624) @@ -241,8 +241,7 @@ int if (error == ERESTART || error == EINTR) error = 0; - explicit_bzero(random_buf, bufsize); - free(random_buf, M_ENTROPY); + zfree(random_buf, M_ENTROPY); return (error); } Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/geom/eli/g_eli.c Thu Jun 25 20:17:34 2020 (r362624) @@ -388,10 +388,7 @@ g_eli_resize(struct g_consumer *cp) } iofail: explicit_bzero(&md, sizeof(md)); - if (sector != NULL) { - explicit_bzero(sector, pp->sectorsize); - free(sector, M_ELI); - } + zfree(sector, M_ELI); } oldsize = sc->sc_mediasize; Modified: head/sys/geom/eli/g_eli_ctl.c ============================================================================== --- head/sys/geom/eli/g_eli_ctl.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/geom/eli/g_eli_ctl.c Thu Jun 25 20:17:34 2020 (r362624) @@ -655,8 +655,7 @@ g_eli_ctl_configure(struct gctl_req *req, struct g_cla prov, error); } explicit_bzero(&md, sizeof(md)); - explicit_bzero(sector, pp->sectorsize); - free(sector, M_ELI); + zfree(sector, M_ELI); } } @@ -759,8 +758,7 @@ g_eli_ctl_setkey(struct gctl_req *req, struct g_class explicit_bzero(&md, sizeof(md)); error = g_write_data(cp, pp->mediasize - pp->sectorsize, sector, pp->sectorsize); - explicit_bzero(sector, pp->sectorsize); - free(sector, M_ELI); + zfree(sector, M_ELI); if (error != 0) { gctl_error(req, "Cannot store metadata on %s (error=%d).", pp->name, error); @@ -875,8 +873,7 @@ g_eli_ctl_delkey(struct gctl_req *req, struct g_class (void)g_io_flush(cp); } explicit_bzero(&md, sizeof(md)); - explicit_bzero(sector, pp->sectorsize); - free(sector, M_ELI); + zfree(sector, M_ELI); if (*all) G_ELI_DEBUG(1, "All keys removed from %s.", pp->name); else Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/geom/eli/g_eli_key_cache.c Thu Jun 25 20:17:34 2020 (r362624) @@ -118,8 +118,7 @@ g_eli_key_allocate(struct g_eli_softc *sc, uint64_t ke keysearch.gek_keyno = keyno; ekey = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); if (ekey != NULL) { - explicit_bzero(key, sizeof(*key)); - free(key, M_ELI); + zfree(key, M_ELI); key = ekey; TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); } else { @@ -175,8 +174,7 @@ g_eli_key_remove(struct g_eli_softc *sc, struct g_eli_ RB_REMOVE(g_eli_key_tree, &sc->sc_ekeys_tree, key); TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); sc->sc_ekeys_allocated--; - explicit_bzero(key, sizeof(*key)); - free(key, M_ELI); + zfree(key, M_ELI); } void Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/geom/geom_dev.c Thu Jun 25 20:17:34 2020 (r362624) @@ -614,10 +614,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data kda->kda_encryptedkey = encryptedkey; error = g_dev_setdumpdev(dev, kda); } - if (encryptedkey != NULL) { - explicit_bzero(encryptedkey, kda->kda_encryptedkeysize); - free(encryptedkey, M_TEMP); - } + zfree(encryptedkey, M_TEMP); explicit_bzero(kda, sizeof(*kda)); break; } Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/kern/kern_environment.c Thu Jun 25 20:17:34 2020 (r362624) @@ -607,8 +607,7 @@ kern_unsetenv(const char *name) kenvp[i++] = kenvp[j]; kenvp[i] = NULL; mtx_unlock(&kenv_lock); - explicit_bzero(oldenv, strlen(oldenv)); - free(oldenv, M_KENV); + zfree(oldenv, M_KENV); return (0); } mtx_unlock(&kenv_lock); Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/kern/kern_shutdown.c Thu Jun 25 20:17:34 2020 (r362624) @@ -1058,8 +1058,7 @@ kerneldumpcrypto_create(size_t blocksize, uint8_t encr return (kdc); failed: - explicit_bzero(kdc, sizeof(*kdc) + dumpkeysize); - free(kdc, M_EKCD); + zfree(kdc, M_EKCD); return (NULL); } @@ -1156,8 +1155,7 @@ kerneldumpcomp_destroy(struct dumperinfo *di) if (kdcomp == NULL) return; compressor_fini(kdcomp->kdc_stream); - explicit_bzero(kdcomp->kdc_buf, di->maxiosize); - free(kdcomp->kdc_buf, M_DUMPER); + zfree(kdcomp->kdc_buf, M_DUMPER); free(kdcomp, M_DUMPER); } @@ -1171,23 +1169,14 @@ free_single_dumper(struct dumperinfo *di) if (di == NULL) return; - if (di->blockbuf != NULL) { - explicit_bzero(di->blockbuf, di->blocksize); - free(di->blockbuf, M_DUMPER); - } + zfree(di->blockbuf, M_DUMPER); kerneldumpcomp_destroy(di); #ifdef EKCD - if (di->kdcrypto != NULL) { - explicit_bzero(di->kdcrypto, sizeof(*di->kdcrypto) + - di->kdcrypto->kdc_dumpkeysize); - free(di->kdcrypto, M_EKCD); - } + zfree(di->kdcrypto, M_EKCD); #endif - - explicit_bzero(di, sizeof(*di)); - free(di, M_DUMPER); + zfree(di, M_DUMPER); } /* Registration of dumpers */ Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/kern/uipc_ktls.c Thu Jun 25 20:17:34 2020 (r362624) @@ -682,15 +682,12 @@ ktls_cleanup(struct ktls_session *tls) #endif } if (tls->params.auth_key != NULL) { - explicit_bzero(tls->params.auth_key, tls->params.auth_key_len); - free(tls->params.auth_key, M_KTLS); + zfree(tls->params.auth_key, M_KTLS); tls->params.auth_key = NULL; tls->params.auth_key_len = 0; } if (tls->params.cipher_key != NULL) { - explicit_bzero(tls->params.cipher_key, - tls->params.cipher_key_len); - free(tls->params.cipher_key, M_KTLS); + zfree(tls->params.cipher_key, M_KTLS); tls->params.cipher_key = NULL; tls->params.cipher_key_len = 0; } Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/netinet/netdump/netdump_client.c Thu Jun 25 20:17:34 2020 (r362624) @@ -642,11 +642,7 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, c dumper.mediasize = 0; error = dumper_insert(&dumper, conf->kda_iface, conf); - if (encryptedkey != NULL) { - explicit_bzero(encryptedkey, - conf->kda_encryptedkeysize); - free(encryptedkey, M_TEMP); - } + zfree(encryptedkey, M_TEMP); if (error != 0) netdump_unconfigure(); break; Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/opencrypto/crypto.c Thu Jun 25 20:17:34 2020 (r362624) @@ -897,8 +897,7 @@ crypto_deletesession(crypto_session_t cses) cap = cses->cap; - explicit_bzero(cses->softc, cap->cc_session_size); - free(cses->softc, M_CRYPTO_DATA); + zfree(cses->softc, M_CRYPTO_DATA); uma_zfree(cryptoses_zone, cses); CRYPTO_DRIVER_LOCK(); Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/opencrypto/cryptosoft.c Thu Jun 25 20:17:34 2020 (r362624) @@ -1428,27 +1428,14 @@ static void swcr_freesession(device_t dev, crypto_session_t cses) { struct swcr_session *ses; - struct swcr_auth *swa; - struct auth_hash *axf; ses = crypto_get_driver_session(cses); mtx_destroy(&ses->swcr_lock); zfree(ses->swcr_encdec.sw_kschedule, M_CRYPTO_DATA); - - axf = ses->swcr_auth.sw_axf; - if (axf != NULL) { - swa = &ses->swcr_auth; - if (swa->sw_ictx != NULL) { - explicit_bzero(swa->sw_ictx, axf->ctxsize); - free(swa->sw_ictx, M_CRYPTO_DATA); - } - if (swa->sw_octx != NULL) { - explicit_bzero(swa->sw_octx, axf->ctxsize); - free(swa->sw_octx, M_CRYPTO_DATA); - } - } + zfree(ses->swcr_auth.sw_ictx, M_CRYPTO_DATA); + zfree(ses->swcr_auth.sw_octx, M_CRYPTO_DATA); } /* Modified: head/sys/opencrypto/ktls_ocf.c ============================================================================== --- head/sys/opencrypto/ktls_ocf.c Thu Jun 25 20:04:35 2020 (r362623) +++ head/sys/opencrypto/ktls_ocf.c Thu Jun 25 20:17:34 2020 (r362624) @@ -343,8 +343,7 @@ ktls_ocf_free(struct ktls_session *tls) os = tls->cipher; crypto_freesession(os->sid); mtx_destroy(&os->lock); - explicit_bzero(os, sizeof(*os)); - free(os, M_KTLS_OCF); + zfree(os, M_KTLS_OCF); } static int From owner-svn-src-head@freebsd.org Thu Jun 25 20:18:56 2020 Return-Path: Delivered-To: svn-src-head@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 84D7B3446B1; Thu, 25 Jun 2020 20:18:56 +0000 (UTC) (envelope-from jhb@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 49tBDc2vFWz4Xkj; Thu, 25 Jun 2020 20:18:56 +0000 (UTC) (envelope-from jhb@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 5EB5D8CBC; Thu, 25 Jun 2020 20:18:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKIus1002707; Thu, 25 Jun 2020 20:18:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKIuwH002706; Thu, 25 Jun 2020 20:18:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252018.05PKIuwH002706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362625 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 362625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:18:56 -0000 Author: jhb Date: Thu Jun 25 20:18:55 2020 New Revision: 362625 URL: https://svnweb.freebsd.org/changeset/base/362625 Log: Zero the temporary HMAC key in hmac_init_pad(). Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25436 Modified: head/sys/opencrypto/crypto.c Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Thu Jun 25 20:17:34 2020 (r362624) +++ head/sys/opencrypto/crypto.c Thu Jun 25 20:18:55 2020 (r362625) @@ -444,6 +444,7 @@ hmac_init_pad(struct auth_hash *axf, const char *key, axf->Init(auth_ctx); axf->Update(auth_ctx, hmac_key, axf->blocksize); + explicit_bzero(hmac_key, sizeof(hmac_key)); } void From owner-svn-src-head@freebsd.org Thu Jun 25 20:20:24 2020 Return-Path: Delivered-To: svn-src-head@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 47A93344562; Thu, 25 Jun 2020 20:20:24 +0000 (UTC) (envelope-from jhb@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 49tBGJ18cCz4Xqj; Thu, 25 Jun 2020 20:20:24 +0000 (UTC) (envelope-from jhb@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 22CDD8D23; Thu, 25 Jun 2020 20:20:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKKN4q002861; Thu, 25 Jun 2020 20:20:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKKNcZ002853; Thu, 25 Jun 2020 20:20:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252020.05PKKNcZ002853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362626 - in head/sys: crypto/armv8 crypto/via dev/glxsb geom/eli X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: crypto/armv8 crypto/via dev/glxsb geom/eli X-SVN-Commit-Revision: 362626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:20:24 -0000 Author: jhb Date: Thu Jun 25 20:20:22 2020 New Revision: 362626 URL: https://svnweb.freebsd.org/changeset/base/362626 Log: Use zfree() instead of bzero() and free(). These bzero's should have been explicit_bzero's. Reviewed by: cem, delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25437 Modified: head/sys/crypto/armv8/armv8_crypto.c head/sys/crypto/via/padlock_hash.c head/sys/dev/glxsb/glxsb_hash.c head/sys/geom/eli/g_eli.c Modified: head/sys/crypto/armv8/armv8_crypto.c ============================================================================== --- head/sys/crypto/armv8/armv8_crypto.c Thu Jun 25 20:18:55 2020 (r362625) +++ head/sys/crypto/armv8/armv8_crypto.c Thu Jun 25 20:20:22 2020 (r362626) @@ -357,10 +357,8 @@ armv8_crypto_cipher_process(struct armv8_crypto_sessio fpu_kern_leave(curthread, ctx); RELEASE_CTX(i, ctx); } - if (allocated) { - bzero(buf, crp->crp_payload_length); - free(buf, M_ARMV8_CRYPTO); - } + if (allocated) + zfree(buf, M_ARMV8_CRYPTO); return (0); } Modified: head/sys/crypto/via/padlock_hash.c ============================================================================== --- head/sys/crypto/via/padlock_hash.c Thu Jun 25 20:18:55 2020 (r362625) +++ head/sys/crypto/via/padlock_hash.c Thu Jun 25 20:20:22 2020 (r362626) @@ -199,8 +199,7 @@ padlock_sha_free(void *vctx) ctx = vctx; if (ctx->psc_buf != NULL) { - //bzero(ctx->psc_buf, ctx->psc_size); - free(ctx->psc_buf, M_PADLOCK); + zfree(ctx->psc_buf, M_PADLOCK); ctx->psc_buf = NULL; ctx->psc_offset = 0; ctx->psc_size = 0; @@ -415,14 +414,12 @@ padlock_hash_free(struct padlock_session *ses) if (ses->ses_ictx != NULL) { padlock_free_ctx(ses->ses_axf, ses->ses_ictx); - bzero(ses->ses_ictx, ses->ses_axf->ctxsize); - free(ses->ses_ictx, M_PADLOCK); + zfree(ses->ses_ictx, M_PADLOCK); ses->ses_ictx = NULL; } if (ses->ses_octx != NULL) { padlock_free_ctx(ses->ses_axf, ses->ses_octx); - bzero(ses->ses_octx, ses->ses_axf->ctxsize); - free(ses->ses_octx, M_PADLOCK); + zfree(ses->ses_octx, M_PADLOCK); ses->ses_octx = NULL; } } Modified: head/sys/dev/glxsb/glxsb_hash.c ============================================================================== --- head/sys/dev/glxsb/glxsb_hash.c Thu Jun 25 20:18:55 2020 (r362625) +++ head/sys/dev/glxsb/glxsb_hash.c Thu Jun 25 20:20:22 2020 (r362626) @@ -145,13 +145,11 @@ glxsb_hash_free(struct glxsb_session *ses) { if (ses->ses_ictx != NULL) { - bzero(ses->ses_ictx, ses->ses_axf->ctxsize); - free(ses->ses_ictx, M_GLXSB); + zfree(ses->ses_ictx, M_GLXSB); ses->ses_ictx = NULL; } if (ses->ses_octx != NULL) { - bzero(ses->ses_octx, ses->ses_axf->ctxsize); - free(ses->ses_octx, M_GLXSB); + zfree(ses->ses_octx, M_GLXSB); ses->ses_octx = NULL; } } Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Jun 25 20:18:55 2020 (r362625) +++ head/sys/geom/eli/g_eli.c Thu Jun 25 20:20:22 2020 (r362626) @@ -1005,8 +1005,7 @@ failed: g_destroy_consumer(cp); g_destroy_geom(gp); g_eli_key_destroy(sc); - bzero(sc, sizeof(*sc)); - free(sc, M_ELI); + zfree(sc, M_ELI); return (NULL); } @@ -1049,8 +1048,7 @@ g_eli_destroy(struct g_eli_softc *sc, boolean_t force) mtx_destroy(&sc->sc_queue_mtx); gp->softc = NULL; g_eli_key_destroy(sc); - bzero(sc, sizeof(*sc)); - free(sc, M_ELI); + zfree(sc, M_ELI); G_ELI_DEBUG(0, "Device %s destroyed.", gp->name); g_wither_geom_close(gp, ENXIO); From owner-svn-src-head@freebsd.org Thu Jun 25 20:21:35 2020 Return-Path: Delivered-To: svn-src-head@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 3A911344769; Thu, 25 Jun 2020 20:21:35 +0000 (UTC) (envelope-from jhb@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 49tBHg0v55z4Y9S; Thu, 25 Jun 2020 20:21:35 +0000 (UTC) (envelope-from jhb@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 1A1AE8D36; Thu, 25 Jun 2020 20:21:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKLYJO004476; Thu, 25 Jun 2020 20:21:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKLYKF004475; Thu, 25 Jun 2020 20:21:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252021.05PKLYKF004475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362627 - head/sys/dev/glxsb X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/glxsb X-SVN-Commit-Revision: 362627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:21:35 -0000 Author: jhb Date: Thu Jun 25 20:21:34 2020 New Revision: 362627 URL: https://svnweb.freebsd.org/changeset/base/362627 Log: Explicitly zero hash results and context in glxsb_authcompute(). Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25438 Modified: head/sys/dev/glxsb/glxsb_hash.c Modified: head/sys/dev/glxsb/glxsb_hash.c ============================================================================== --- head/sys/dev/glxsb/glxsb_hash.c Thu Jun 25 20:20:22 2020 (r362626) +++ head/sys/dev/glxsb/glxsb_hash.c Thu Jun 25 20:21:34 2020 (r362627) @@ -65,7 +65,7 @@ glxsb_hash_key_setup(struct glxsb_session *ses, const static int glxsb_authcompute(struct glxsb_session *ses, struct cryptop *crp) { - u_char hash[HASH_MAX_LEN], hash2[HASH_MAX_LEN]; + u_char hash[HASH_MAX_LEN]; struct auth_hash *axf; union authctx ctx; int error; @@ -86,17 +86,22 @@ glxsb_authcompute(struct glxsb_session *ses, struct cr bcopy(ses->ses_octx, &ctx, axf->ctxsize); axf->Update(&ctx, hash, axf->hashsize); axf->Final(hash, &ctx); + explicit_bzero(&ctx, sizeof(ctx)); /* Verify or inject the authentication data */ if (crp->crp_op & CRYPTO_OP_VERIFY_DIGEST) { + u_char hash2[HASH_MAX_LEN]; + crypto_copydata(crp, crp->crp_digest_start, ses->ses_mlen, hash2); if (timingsafe_bcmp(hash, hash2, ses->ses_mlen) != 0) - return (EBADMSG); + error = EBADMSG; + explicit_bzero(hash2, sizeof(hash2)); } else crypto_copyback(crp, crp->crp_digest_start, ses->ses_mlen, hash); - return (0); + explicit_bzero(hash, sizeof(hash)); + return (error); } int From owner-svn-src-head@freebsd.org Thu Jun 25 20:22:45 2020 Return-Path: Delivered-To: svn-src-head@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 522ED34446A; Thu, 25 Jun 2020 20:22:45 +0000 (UTC) (envelope-from jhb@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 49tBK11RKnz4YHT; Thu, 25 Jun 2020 20:22:45 +0000 (UTC) (envelope-from jhb@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 2C97089DF; Thu, 25 Jun 2020 20:22:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKMjUJ008855; Thu, 25 Jun 2020 20:22:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKMjnX008854; Thu, 25 Jun 2020 20:22:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252022.05PKMjnX008854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362628 - head/sys/dev/cesa X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cesa X-SVN-Commit-Revision: 362628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:22:45 -0000 Author: jhb Date: Thu Jun 25 20:22:44 2020 New Revision: 362628 URL: https://svnweb.freebsd.org/changeset/base/362628 Log: Explicitly zero the temporary auth context used to generate HMAC state. Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25439 Modified: head/sys/dev/cesa/cesa.c Modified: head/sys/dev/cesa/cesa.c ============================================================================== --- head/sys/dev/cesa/cesa.c Thu Jun 25 20:21:34 2020 (r362627) +++ head/sys/dev/cesa/cesa.c Thu Jun 25 20:22:44 2020 (r362628) @@ -459,6 +459,7 @@ cesa_set_mkey(struct cesa_session *cs, int alg, const hin[i] = htobe32(hin[i]); hout[i] = htobe32(hout[i]); } + explicit_bzero(&auth_ctx, sizeof(auth_ctx)); } static int From owner-svn-src-head@freebsd.org Thu Jun 25 20:25:36 2020 Return-Path: Delivered-To: svn-src-head@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 C976C344A38; Thu, 25 Jun 2020 20:25:36 +0000 (UTC) (envelope-from jhb@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 49tBNJ52vzz4Yg6; Thu, 25 Jun 2020 20:25:36 +0000 (UTC) (envelope-from jhb@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 8E7C989E6; Thu, 25 Jun 2020 20:25:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKPaSV009038; Thu, 25 Jun 2020 20:25:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKPZp9009034; Thu, 25 Jun 2020 20:25:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252025.05PKPZp9009034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362629 - in head/sys/geom: bde eli shsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/geom: bde eli shsec X-SVN-Commit-Revision: 362629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:25:36 -0000 Author: jhb Date: Thu Jun 25 20:25:35 2020 New Revision: 362629 URL: https://svnweb.freebsd.org/changeset/base/362629 Log: Use explicit_bzero() instead of bzero() for sensitive data. Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25441 Modified: head/sys/geom/bde/g_bde.c head/sys/geom/bde/g_bde_lock.c head/sys/geom/eli/g_eli.c head/sys/geom/shsec/g_shsec.c Modified: head/sys/geom/bde/g_bde.c ============================================================================== --- head/sys/geom/bde/g_bde.c Thu Jun 25 20:22:44 2020 (r362628) +++ head/sys/geom/bde/g_bde.c Thu Jun 25 20:25:35 2020 (r362629) @@ -88,7 +88,7 @@ g_bde_orphan(struct g_consumer *cp) gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) g_wither_provider(pp, ENXIO); - bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ + explicit_bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } @@ -163,7 +163,7 @@ g_bde_create_geom(struct gctl_req *req, struct g_class error = g_bde_decrypt_lock(sc, pass, key, mediasize, sectorsize, NULL); - bzero(sc->sha2, sizeof sc->sha2); + explicit_bzero(sc->sha2, sizeof sc->sha2); if (error) break; kp = &sc->key; @@ -195,9 +195,9 @@ g_bde_create_geom(struct gctl_req *req, struct g_class break; } while (0); if (pass != NULL) - bzero(pass, SHA512_DIGEST_LENGTH); + explicit_bzero(pass, SHA512_DIGEST_LENGTH); if (key != NULL) - bzero(key, 16); + explicit_bzero(key, 16); if (error == 0) return; g_access(cp, -1, -1, -1); @@ -255,7 +255,7 @@ g_bde_destroy_geom(struct gctl_req *req, struct g_clas while (sc->dead != 2 && !LIST_EMPTY(&pp->consumers)) tsleep(sc, PRIBIO, "g_bdedie", hz); mtx_destroy(&sc->worklist_mutex); - bzero(&sc->key, sizeof sc->key); + explicit_bzero(&sc->key, sizeof sc->key); g_free(sc); g_wither_geom(gp, ENXIO); return (0); Modified: head/sys/geom/bde/g_bde_lock.c ============================================================================== --- head/sys/geom/bde/g_bde_lock.c Thu Jun 25 20:22:44 2020 (r362628) +++ head/sys/geom/bde/g_bde_lock.c Thu Jun 25 20:25:35 2020 (r362629) @@ -316,9 +316,9 @@ g_bde_keyloc_encrypt(u_char *sha2, uint64_t v0, uint64 AES_init(&ci); AES_makekey(&ki, DIR_ENCRYPT, G_BDE_KKEYBITS, sha2 + 0); AES_encrypt(&ci, &ki, buf, output, sizeof buf); - bzero(buf, sizeof buf); - bzero(&ci, sizeof ci); - bzero(&ki, sizeof ki); + explicit_bzero(buf, sizeof buf); + explicit_bzero(&ci, sizeof ci); + explicit_bzero(&ki, sizeof ki); return (0); } @@ -333,9 +333,9 @@ g_bde_keyloc_decrypt(u_char *sha2, void *input, uint64 AES_makekey(&ki, DIR_DECRYPT, G_BDE_KKEYBITS, sha2 + 0); AES_decrypt(&ci, &ki, input, buf, sizeof buf); *output = le64dec(buf); - bzero(buf, sizeof buf); - bzero(&ci, sizeof ci); - bzero(&ki, sizeof ki); + explicit_bzero(buf, sizeof buf); + explicit_bzero(&ci, sizeof ci); + explicit_bzero(&ki, sizeof ki); return(0); } Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Jun 25 20:22:44 2020 (r362628) +++ head/sys/geom/eli/g_eli.c Thu Jun 25 20:25:35 2020 (r362629) @@ -1126,7 +1126,7 @@ g_eli_keyfiles_clear(const char *provider) data = preload_fetch_addr(keyfile); size = preload_fetch_size(keyfile); if (data != NULL && size != 0) - bzero(data, size); + explicit_bzero(data, size); } } @@ -1261,7 +1261,7 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, pkcs5v2_genkey(dkey, sizeof(dkey), md.md_salt, sizeof(md.md_salt), passphrase, md.md_iterations); - bzero(passphrase, sizeof(passphrase)); + explicit_bzero(passphrase, sizeof(passphrase)); g_eli_crypto_hmac_update(&ctx, dkey, sizeof(dkey)); explicit_bzero(dkey, sizeof(dkey)); } @@ -1272,7 +1272,7 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, * Decrypt Master-Key. */ error = g_eli_mkey_decrypt_any(&md, key, mkey, &nkey); - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); if (error == -1) { if (i == tries) { G_ELI_DEBUG(0, @@ -1305,8 +1305,8 @@ have_key: * We have correct key, let's attach provider. */ gp = g_eli_create(NULL, mp, pp, &md, mkey, nkey); - bzero(mkey, sizeof(mkey)); - bzero(&md, sizeof(md)); + explicit_bzero(mkey, sizeof(mkey)); + explicit_bzero(&md, sizeof(md)); if (gp == NULL) { G_ELI_DEBUG(0, "Cannot create device %s%s.", pp->name, G_ELI_SUFFIX); Modified: head/sys/geom/shsec/g_shsec.c ============================================================================== --- head/sys/geom/shsec/g_shsec.c Thu Jun 25 20:22:44 2020 (r362628) +++ head/sys/geom/shsec/g_shsec.c Thu Jun 25 20:25:35 2020 (r362629) @@ -269,7 +269,7 @@ g_shsec_done(struct bio *bp) (ssize_t)pbp->bio_length); } } - bzero(bp->bio_data, bp->bio_length); + explicit_bzero(bp->bio_data, bp->bio_length); uma_zfree(g_shsec_zone, bp->bio_data); g_destroy_bio(bp); pbp->bio_inbed++; @@ -384,7 +384,7 @@ failure: TAILQ_REMOVE(&queue, cbp, bio_queue); bp->bio_children--; if (cbp->bio_data != NULL) { - bzero(cbp->bio_data, cbp->bio_length); + explicit_bzero(cbp->bio_data, cbp->bio_length); uma_zfree(g_shsec_zone, cbp->bio_data); } g_destroy_bio(cbp); From owner-svn-src-head@freebsd.org Thu Jun 25 20:29:29 2020 Return-Path: Delivered-To: svn-src-head@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 AB383344C8D; Thu, 25 Jun 2020 20:29:29 +0000 (UTC) (envelope-from mav@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 49tBSn3yJDz4Yxb; Thu, 25 Jun 2020 20:29:29 +0000 (UTC) (envelope-from mav@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 831528CEA; Thu, 25 Jun 2020 20:29:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKTTpf009246; Thu, 25 Jun 2020 20:29:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKTTqN009245; Thu, 25 Jun 2020 20:29:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006252029.05PKTTqN009245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 25 Jun 2020 20:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362630 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 362630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:29:29 -0000 Author: mav Date: Thu Jun 25 20:29:29 2020 New Revision: 362630 URL: https://svnweb.freebsd.org/changeset/base/362630 Log: Fix few panics on NVMe's timing out initialization requests. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Thu Jun 25 20:25:35 2020 (r362629) +++ head/sys/dev/nvme/nvme_ctrlr.c Thu Jun 25 20:29:29 2020 (r362630) @@ -1056,11 +1056,20 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) if (resetting) nvme_qpair_reset(&ctrlr->adminq); - for (i = 0; i < ctrlr->num_io_queues; i++) - nvme_qpair_reset(&ctrlr->ioq[i]); + if (ctrlr->ioq != NULL) { + for (i = 0; i < ctrlr->num_io_queues; i++) + nvme_qpair_reset(&ctrlr->ioq[i]); + } nvme_admin_qpair_enable(&ctrlr->adminq); + /* + * If it was a reset on initialization command timeout, just + * return here, letting initialization code fail gracefully. + */ + if (resetting && !ctrlr->is_initialized) + return; + if (nvme_ctrlr_identify(ctrlr) != 0) { nvme_ctrlr_fail(ctrlr); return; @@ -1115,7 +1124,6 @@ void nvme_ctrlr_start_config_hook(void *arg) { struct nvme_controller *ctrlr = arg; - int status; /* * Reset controller twice to ensure we do a transition from cc.en==1 to @@ -1123,19 +1131,15 @@ nvme_ctrlr_start_config_hook(void *arg) * controller was left in when boot handed off to OS. Linux doesn't do * this, however. If we adopt that policy, see also nvme_ctrlr_resume(). */ - status = nvme_ctrlr_hw_reset(ctrlr); - if (status != 0) { + if (nvme_ctrlr_hw_reset(ctrlr) != 0) { +fail: nvme_ctrlr_fail(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); return; } - status = nvme_ctrlr_hw_reset(ctrlr); - if (status != 0) { - nvme_ctrlr_fail(ctrlr); - config_intrhook_disestablish(&ctrlr->config_hook); - return; - } + if (nvme_ctrlr_hw_reset(ctrlr) != 0) + goto fail; nvme_qpair_reset(&ctrlr->adminq); nvme_admin_qpair_enable(&ctrlr->adminq); @@ -1144,7 +1148,7 @@ nvme_ctrlr_start_config_hook(void *arg) nvme_ctrlr_construct_io_qpairs(ctrlr) == 0) nvme_ctrlr_start(ctrlr, false); else - nvme_ctrlr_fail(ctrlr); + goto fail; nvme_sysctl_initialize_ctrlr(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); @@ -1454,10 +1458,12 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev nvme_ctrlr_hmb_enable(ctrlr, false, false); nvme_ctrlr_delete_qpairs(ctrlr); } + nvme_ctrlr_hmb_free(ctrlr); + } + if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_destroy(&ctrlr->ioq[i]); free(ctrlr->ioq, M_NVME); - nvme_ctrlr_hmb_free(ctrlr); } nvme_admin_qpair_destroy(&ctrlr->adminq); From owner-svn-src-head@freebsd.org Thu Jun 25 20:30:31 2020 Return-Path: Delivered-To: svn-src-head@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 44D5434496B; Thu, 25 Jun 2020 20:30:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49tBTz0qC9z4Z1p; Thu, 25 Jun 2020 20:30:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1770389E9; Thu, 25 Jun 2020 20:30:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKUUWE009383; Thu, 25 Jun 2020 20:30:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKUUnB009382; Thu, 25 Jun 2020 20:30:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006252030.05PKUUnB009382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 25 Jun 2020 20:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362631 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:30:31 -0000 Author: markj Date: Thu Jun 25 20:30:30 2020 New Revision: 362631 URL: https://svnweb.freebsd.org/changeset/base/362631 Log: Implement an approximation of Linux MADV_DONTNEED semantics. Linux MADV_DONTNEED is not advisory: it has side effects for anonymous memory, and some system software depends on that. In particular, MADV_DONTNEED causes anonymous pages to be discarded. If the mapping is a private mapping of a named object then subsequent faults are to repopulate the range from that object, otherwise pages will be zero-filled. For mappings of non-anonymous objects, Linux MADV_DONTNEED can be implemented in the same way as our MADV_DONTNEED. This implementation differs from Linux semantics in its handling of private mappings, inherited through fork(), of non-anonymous objects. After applying MADV_DONTNEED, subsequent faults will repopulate the mapping from the parent object rather than the root of the shadow chain. PR: 230160 Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25330 Modified: head/sys/compat/linux/linux_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Thu Jun 25 20:29:29 2020 (r362630) +++ head/sys/compat/linux/linux_mmap.c Thu Jun 25 20:30:30 2020 (r362631) @@ -38,9 +38,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -48,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -242,6 +245,98 @@ linux_mprotect_common(struct thread *td, uintptr_t add return (kern_mprotect(td, addr, len, prot)); } +/* + * Implement Linux madvise(MADV_DONTNEED), which has unusual semantics: for + * anonymous memory, pages in the range are immediately discarded. + */ +static int +linux_madvise_dontneed(struct thread *td, vm_offset_t start, vm_offset_t end) +{ + vm_map_t map; + vm_map_entry_t entry; + vm_object_t backing_object, object; + vm_offset_t estart, eend; + vm_pindex_t pstart, pend; + int error; + + map = &td->td_proc->p_vmspace->vm_map; + + if (!vm_map_range_valid(map, start, end)) + return (EINVAL); + start = trunc_page(start); + end = round_page(end); + + error = 0; + vm_map_lock_read(map); + if (!vm_map_lookup_entry(map, start, &entry)) + entry = vm_map_entry_succ(entry); + for (; entry->start < end; entry = vm_map_entry_succ(entry)) { + if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) + continue; + + if (entry->wired_count != 0) { + error = EINVAL; + break; + } + + object = entry->object.vm_object; + if (object == NULL) + continue; + + pstart = OFF_TO_IDX(entry->offset); + if (start > entry->start) { + pstart += atop(start - entry->start); + estart = start; + } else { + estart = entry->start; + } + pend = OFF_TO_IDX(entry->offset) + + atop(entry->end - entry->start); + if (entry->end > end) { + pend -= atop(entry->end - end); + eend = end; + } else { + eend = entry->end; + } + + if ((object->flags & (OBJ_ANON | OBJ_ONEMAPPING)) == + (OBJ_ANON | OBJ_ONEMAPPING)) { + /* + * Singly-mapped anonymous memory is discarded. This + * does not match Linux's semantics when the object + * belongs to a shadow chain of length > 1, since + * subsequent faults may retrieve pages from an + * intermediate anonymous object. However, handling + * this case correctly introduces a fair bit of + * complexity. + */ + VM_OBJECT_WLOCK(object); + if ((object->flags & OBJ_ONEMAPPING) != 0) { + vm_object_collapse(object); + vm_object_page_remove(object, pstart, pend, 0); + backing_object = object->backing_object; + if (backing_object != NULL && + (backing_object->flags & OBJ_ANON) != 0) + linux_msg(td, + "possibly incorrect MADV_DONTNEED"); + VM_OBJECT_WUNLOCK(object); + continue; + } + VM_OBJECT_WUNLOCK(object); + } + + /* + * Handle shared mappings. Remove them outright instead of + * calling pmap_advise(), for consistency with Linux. + */ + pmap_remove(map->pmap, estart, eend); + vm_object_madvise(object, pstart, pend, MADV_DONTNEED); + } + vm_map_unlock_read(map); + + return (error); +} + int linux_madvise_common(struct thread *td, uintptr_t addr, size_t len, int behav) { @@ -256,7 +351,7 @@ linux_madvise_common(struct thread *td, uintptr_t addr case LINUX_MADV_WILLNEED: return (kern_madvise(td, addr, len, MADV_WILLNEED)); case LINUX_MADV_DONTNEED: - return (kern_madvise(td, addr, len, MADV_DONTNEED)); + return (linux_madvise_dontneed(td, addr, addr + len)); case LINUX_MADV_FREE: return (kern_madvise(td, addr, len, MADV_FREE)); case LINUX_MADV_REMOVE: From owner-svn-src-head@freebsd.org Thu Jun 25 20:31:07 2020 Return-Path: Delivered-To: svn-src-head@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 E1322344CAE; Thu, 25 Jun 2020 20:31:07 +0000 (UTC) (envelope-from jhb@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 49tBVg5gzMz4Z52; Thu, 25 Jun 2020 20:31:07 +0000 (UTC) (envelope-from jhb@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 BE2C88DAA; Thu, 25 Jun 2020 20:31:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKV7bs011789; Thu, 25 Jun 2020 20:31:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKV6nd011785; Thu, 25 Jun 2020 20:31:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252031.05PKV6nd011785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 20:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362632 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 362632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:31:07 -0000 Author: jhb Date: Thu Jun 25 20:31:06 2020 New Revision: 362632 URL: https://svnweb.freebsd.org/changeset/base/362632 Log: Use zfree() to explicitly zero IPsec keys. Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25442 Modified: head/sys/netipsec/key.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_tcp.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu Jun 25 20:30:30 2020 (r362631) +++ head/sys/netipsec/key.c Thu Jun 25 20:31:06 2020 (r362632) @@ -3060,27 +3060,19 @@ key_cleansav(struct secasvar *sav) if (sav->flags & SADB_X_EXT_F_CLONED) return; /* - * Cleanup xform state. Note that zeroize'ing causes the - * keys to be cleared; otherwise we must do it ourself. + * Cleanup xform state. */ if (sav->tdb_xform != NULL) { sav->tdb_xform->xf_zeroize(sav); sav->tdb_xform = NULL; - } else { - if (sav->key_auth != NULL) - bzero(sav->key_auth->key_data, _KEYLEN(sav->key_auth)); - if (sav->key_enc != NULL) - bzero(sav->key_enc->key_data, _KEYLEN(sav->key_enc)); } if (sav->key_auth != NULL) { - if (sav->key_auth->key_data != NULL) - free(sav->key_auth->key_data, M_IPSEC_MISC); + zfree(sav->key_auth->key_data, M_IPSEC_MISC); free(sav->key_auth, M_IPSEC_MISC); sav->key_auth = NULL; } if (sav->key_enc != NULL) { - if (sav->key_enc->key_data != NULL) - free(sav->key_enc->key_data, M_IPSEC_MISC); + zfree(sav->key_enc->key_data, M_IPSEC_MISC); free(sav->key_enc, M_IPSEC_MISC); sav->key_enc = NULL; } Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Thu Jun 25 20:30:30 2020 (r362631) +++ head/sys/netipsec/xform_ah.c Thu Jun 25 20:31:06 2020 (r362632) @@ -250,9 +250,6 @@ int ah_zeroize(struct secasvar *sav) { - if (sav->key_auth) - bzero(sav->key_auth->key_data, _KEYLEN(sav->key_auth)); - crypto_freesession(sav->tdb_cryptoid); sav->tdb_cryptoid = NULL; sav->tdb_authalgxform = NULL; Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Thu Jun 25 20:30:30 2020 (r362631) +++ head/sys/netipsec/xform_esp.c Thu Jun 25 20:31:06 2020 (r362632) @@ -243,11 +243,9 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) static int esp_zeroize(struct secasvar *sav) { - /* NB: ah_zerorize free's the crypto session state */ + /* NB: ah_zeroize free's the crypto session state */ int error = ah_zeroize(sav); - if (sav->key_enc) - bzero(sav->key_enc->key_data, _KEYLEN(sav->key_enc)); sav->tdb_encalgxform = NULL; sav->tdb_xform = NULL; return error; Modified: head/sys/netipsec/xform_tcp.c ============================================================================== --- head/sys/netipsec/xform_tcp.c Thu Jun 25 20:30:30 2020 (r362631) +++ head/sys/netipsec/xform_tcp.c Thu Jun 25 20:31:06 2020 (r362632) @@ -365,8 +365,6 @@ static int tcpsignature_zeroize(struct secasvar *sav) { - if (sav->key_auth != NULL) - bzero(sav->key_auth->key_data, _KEYLEN(sav->key_auth)); sav->tdb_xform = NULL; return (0); } From owner-svn-src-head@freebsd.org Thu Jun 25 20:43:22 2020 Return-Path: Delivered-To: svn-src-head@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 9EDBF344E96; Thu, 25 Jun 2020 20:43:22 +0000 (UTC) (envelope-from vmaffione@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 49tBmp3nkVz4Ztt; Thu, 25 Jun 2020 20:43:22 +0000 (UTC) (envelope-from vmaffione@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 7CC39921F; Thu, 25 Jun 2020 20:43:22 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PKhMn4021070; Thu, 25 Jun 2020 20:43:22 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PKhMHH021069; Thu, 25 Jun 2020 20:43:22 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006252043.05PKhMHH021069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 25 Jun 2020 20:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362633 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 362633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 20:43:22 -0000 Author: vmaffione Date: Thu Jun 25 20:43:21 2020 New Revision: 362633 URL: https://svnweb.freebsd.org/changeset/base/362633 Log: iflib: fix compilation issue introduced in r362621 The ifp local variable is useful even without netmap and altq, as it is used to check for IFF_DRV_RUNNING. MFC after: 2 weeks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Jun 25 20:31:06 2020 (r362632) +++ head/sys/net/iflib.c Thu Jun 25 20:43:21 2020 (r362633) @@ -3751,9 +3751,7 @@ _task_fn_tx(void *context) { iflib_txq_t txq = context; if_ctx_t ctx = txq->ift_ctx; -#if defined(ALTQ) || defined(DEV_NETMAP) if_t ifp = ctx->ifc_ifp; -#endif int abdicate = ctx->ifc_sysctl_tx_abdicate; #ifdef IFLIB_DIAGNOSTICS From owner-svn-src-head@freebsd.org Thu Jun 25 21:30:31 2020 Return-Path: Delivered-To: svn-src-head@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 2F8D2345F19; Thu, 25 Jun 2020 21:30:31 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tCqB6Dqqz4dR9; Thu, 25 Jun 2020 21:30:30 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x329.google.com with SMTP id k15so6686208otp.8; Thu, 25 Jun 2020 14:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PI4984xs7veRrbC0k7BnClPjxQBqwJ/j7P1CS/kVOCU=; b=XsVeEZP4uf/qhCYZfLnzcMcBteMefcgLhnvsCSFv7HwOuXolDTrSqPJgegjiNP1XdS bZuMyr64NZ4aiBXTbm+x4FR/RvMrw7sBbw50Ezz61Qh6qn4FYbVL1Q2J5PKIwvkwd3Nw 6Ep4HUIjZTtxrjrToTMYPjjN7yHkmW2AYO7tXhGd9SP4QV5vRifKHEh7sw0or766zwE/ a0iGfRqasnKerlMvtqMx/Rt1kJUedntU3Da9oS5f+Q4dJ9g+G+/bz1t4TwLpCrQB6NGa yv8vtr3NGo3F6F7/I8THfOQ+6ags2Yy6GF6blw+Mnl9k5oKa2nUgAhWWL0KnGSsD3nMY vdSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PI4984xs7veRrbC0k7BnClPjxQBqwJ/j7P1CS/kVOCU=; b=LY7EU7CwZLJGeHMQpLljcADr0ESc+AFcySq7yZkI9l1dorLFZo8ezrnYTeV5AH8TSf /hzTh9swpFeshZBtQ7VwORzcIzw25UE8SD1/tXdRKybtvcEgLcMWueKjT/fu8EzDEIhk xeGLoTg6R9BaAtXYWzlcx68/hQ/NVNxKN2jE+2hIhrYzFZL3zaEkg6PT92hKZTpW6UW2 y0QsOZy9M1yRpavlJhnyDtCqGUjaIqEctFwglkxl9Bj4CgIk/IfGpWWael47vUorNEWx ZqhoZb6lQ6lqpVI1DA7t4jT/Zepwg0YcZEqk3k4w4KfvZGwijA/HIOKtmb5yld7+i5ZJ irHw== X-Gm-Message-State: AOAM530ewa65i7n/g9yOzAW9S33bowWc1fAW+RBeQN/oMHXatBAzXKl+ lgIH1FstWG3wEzcZ/UacUI6ng81QIfhSlV4gEyh109qN X-Google-Smtp-Source: ABdhPJxsQy8/6J4GIYEYJpoPJa3axHbVAu0wJMz4MW6pE1kuvRWF6ZC4k7o3p9D8DZAZbxOMotd6Q3mVfygvr4T0frE= X-Received: by 2002:a9d:378a:: with SMTP id x10mr28240844otb.117.1593120629396; Thu, 25 Jun 2020 14:30:29 -0700 (PDT) MIME-Version: 1.0 References: <202006251935.05PJZbJ2077013@repo.freebsd.org> In-Reply-To: <202006251935.05PJZbJ2077013@repo.freebsd.org> From: Benjamin Kaduk Date: Thu, 25 Jun 2020 14:30:18 -0700 Message-ID: Subject: Re: svn commit: r362620 - head/secure/lib/libcrypto To: Gordon Tetlow Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49tCqB6Dqqz4dR9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 21:30:31 -0000 On Thu, Jun 25, 2020 at 12:35 PM Gordon Tetlow wrote: > Author: gordon > Date: Thu Jun 25 19:35:37 2020 > New Revision: 362620 > URL: https://svnweb.freebsd.org/changeset/base/362620 > > Log: > Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility. > > This define caused a couple of symbols to disappear. To keep ABI > compatibility, we are going to keep the symbols exposed, but leave SSLv3 > as > not in the default config (this is what OPENSSL_NO_SSL3 achieves). The > ramifications of this is an application can still use SSLv3 if it > specifically calls the SSLv3_method family of APIs. > > I think I've seen some distros that keep the functinos around but just have them always return failure. -Ben From owner-svn-src-head@freebsd.org Thu Jun 25 21:34:44 2020 Return-Path: Delivered-To: svn-src-head@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 6EBBE345DDD; Thu, 25 Jun 2020 21:34:44 +0000 (UTC) (envelope-from dab@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 49tCw42KV0z4dks; Thu, 25 Jun 2020 21:34:44 +0000 (UTC) (envelope-from dab@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 4B0AB9A31; Thu, 25 Jun 2020 21:34:44 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PLYi23052265; Thu, 25 Jun 2020 21:34:44 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PLYiks052264; Thu, 25 Jun 2020 21:34:44 GMT (envelope-from dab@FreeBSD.org) Message-Id: <202006252134.05PLYiks052264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 25 Jun 2020 21:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362634 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 362634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 21:34:44 -0000 Author: dab Date: Thu Jun 25 21:34:43 2020 New Revision: 362634 URL: https://svnweb.freebsd.org/changeset/base/362634 Log: Add CAP_EVENT to pidfiles. CAP_EVENT was omitted on pidfiles (in pidfile_open()). There seems no reason why a process that creates and writes a pidfile cannot monitor events on that file. This mod adds the capability. Reviewed by: cem@ MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25363 Modified: head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Thu Jun 25 20:43:21 2020 (r362633) +++ head/lib/libutil/pidfile.c Thu Jun 25 21:34:43 2020 (r362634) @@ -196,7 +196,7 @@ pidfile_open(const char *pathp, mode_t mode, pid_t *pi } if (cap_rights_limit(fd, cap_rights_init(&caprights, CAP_PWRITE, - CAP_FSTAT, CAP_FTRUNCATE)) < 0 && + CAP_FSTAT, CAP_FTRUNCATE, CAP_EVENT)) < 0 && errno != ENOSYS) { goto failed; } From owner-svn-src-head@freebsd.org Thu Jun 25 23:57:31 2020 Return-Path: Delivered-To: svn-src-head@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 1DB1A348355; Thu, 25 Jun 2020 23:57:31 +0000 (UTC) (envelope-from jhb@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 49tH4p75lgz3WYN; Thu, 25 Jun 2020 23:57:30 +0000 (UTC) (envelope-from jhb@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 EF059B634; Thu, 25 Jun 2020 23:57:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PNvUhs037277; Thu, 25 Jun 2020 23:57:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PNvU3S037276; Thu, 25 Jun 2020 23:57:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252357.05PNvU3S037276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 23:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362635 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 362635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 23:57:31 -0000 Author: jhb Date: Thu Jun 25 23:57:30 2020 New Revision: 362635 URL: https://svnweb.freebsd.org/changeset/base/362635 Log: Enter and exit the network epoch for async IPsec callbacks. When an IPsec packet has been encrypted or decrypted, the next step in the packet's traversal through the network stack is invoked from a crypto worker thread, not from the original calling thread. These threads need to enter the network epoch before passing packets down to IP output routines or up to transport protocols. Reviewed by: ae Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25444 Modified: head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Thu Jun 25 21:34:43 2020 (r362634) +++ head/sys/netipsec/ipsec_input.c Thu Jun 25 23:57:30 2020 (r362635) @@ -278,6 +278,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar int protoff) { IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); + struct epoch_tracker et; struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; @@ -424,7 +425,9 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar if (saidx->mode == IPSEC_MODE_TUNNEL) error = ipsec_if_input(m, sav, af); if (error == 0) { + NET_EPOCH_ENTER(et); error = netisr_queue_src(isr_prot, (uintptr_t)sav->spi, m); + NET_EPOCH_EXIT(et); if (error) { IPSEC_ISTAT(sproto, qfull); DPRINTF(("%s: queue full; proto %u packet dropped\n", @@ -489,6 +492,7 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar int protoff) { IPSEC_DEBUG_DECLARE(char buf[IPSEC_ADDRSTRLEN]); + struct epoch_tracker et; struct ipsec_ctx_data ctx; struct xform_history *xh; struct secasindex *saidx; @@ -621,8 +625,10 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar if (saidx->mode == IPSEC_MODE_TUNNEL) error = ipsec_if_input(m, sav, af); if (error == 0) { + NET_EPOCH_ENTER(et); error = netisr_queue_src(isr_prot, (uintptr_t)sav->spi, m); + NET_EPOCH_EXIT(et); if (error) { IPSEC_ISTAT(sproto, qfull); DPRINTF(("%s: queue full; proto %u packet" @@ -638,11 +644,12 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar */ nest = 0; nxt = nxt8; + NET_EPOCH_ENTER(et); while (nxt != IPPROTO_DONE) { if (V_ip6_hdrnestlimit && (++nest > V_ip6_hdrnestlimit)) { IP6STAT_INC(ip6s_toomanyhdr); error = EINVAL; - goto bad; + goto bad_epoch; } /* @@ -653,7 +660,7 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar IP6STAT_INC(ip6s_tooshort); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); error = EINVAL; - goto bad; + goto bad_epoch; } /* * Enforce IPsec policy checking if we are seeing last header. @@ -663,12 +670,15 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar if ((inet6sw[ip6_protox[nxt]].pr_flags & PR_LASTHDR) != 0 && ipsec6_in_reject(m, NULL)) { error = EINVAL; - goto bad; + goto bad_epoch; } nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &skip, nxt); } + NET_EPOCH_EXIT(et); key_freesav(&sav); return (0); +bad_epoch: + NET_EPOCH_EXIT(et); bad: key_freesav(&sav); if (m) Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Thu Jun 25 21:34:43 2020 (r362634) +++ head/sys/netipsec/ipsec_output.c Thu Jun 25 23:57:30 2020 (r362635) @@ -688,6 +688,7 @@ int ipsec_process_done(struct mbuf *m, struct secpolicy *sp, struct secasvar *sav, u_int idx) { + struct epoch_tracker et; struct xform_history *xh; struct secasindex *saidx; struct m_tag *mtag; @@ -789,19 +790,25 @@ ipsec_process_done(struct mbuf *m, struct secpolicy *s * We're done with IPsec processing, transmit the packet using the * appropriate network protocol (IP or IPv6). */ + NET_EPOCH_ENTER(et); switch (saidx->dst.sa.sa_family) { #ifdef INET case AF_INET: key_freesav(&sav); - return ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL); + error = ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL); + break; #endif /* INET */ #ifdef INET6 case AF_INET6: key_freesav(&sav); - return ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); + error = ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); + break; #endif /* INET6 */ + default: + panic("ipsec_process_done"); } - panic("ipsec_process_done"); + NET_EPOCH_EXIT(et); + return (error); bad: m_freem(m); key_freesav(&sav); From owner-svn-src-head@freebsd.org Thu Jun 25 23:59:17 2020 Return-Path: Delivered-To: svn-src-head@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 F250434892D; Thu, 25 Jun 2020 23:59:17 +0000 (UTC) (envelope-from jhb@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 49tH6s66jsz3WZR; Thu, 25 Jun 2020 23:59:17 +0000 (UTC) (envelope-from jhb@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 CD46FB3E4; Thu, 25 Jun 2020 23:59:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05PNxHci037402; Thu, 25 Jun 2020 23:59:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05PNxGIR037396; Thu, 25 Jun 2020 23:59:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006252359.05PNxGIR037396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Jun 2020 23:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362636 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 362636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 23:59:18 -0000 Author: jhb Date: Thu Jun 25 23:59:16 2020 New Revision: 362636 URL: https://svnweb.freebsd.org/changeset/base/362636 Log: Simplify IPsec transform-specific teardown. - Rename from the teardown callback from 'zeroize' to 'cleanup' since this no longer zeroes keys. - Change the callback return type to void. Nothing checked the return value and it was always zero. - Don't have esp call into ah since it no longer needs to depend on this to clear the auth key. Instead, both are now private and self-contained. Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25443 Modified: head/sys/netipsec/key.c head/sys/netipsec/xform.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_tcp.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/key.c Thu Jun 25 23:59:16 2020 (r362636) @@ -3059,11 +3059,8 @@ key_cleansav(struct secasvar *sav) } if (sav->flags & SADB_X_EXT_F_CLONED) return; - /* - * Cleanup xform state. - */ if (sav->tdb_xform != NULL) { - sav->tdb_xform->xf_zeroize(sav); + sav->tdb_xform->xf_cleanup(sav); sav->tdb_xform = NULL; } if (sav->key_auth != NULL) { Modified: head/sys/netipsec/xform.h ============================================================================== --- head/sys/netipsec/xform.h Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/xform.h Thu Jun 25 23:59:16 2020 (r362636) @@ -89,7 +89,7 @@ struct xformsw { u_short xf_type; /* xform ID */ const char *xf_name; /* human-readable name */ int (*xf_init)(struct secasvar*, struct xformsw*); /* setup */ - int (*xf_zeroize)(struct secasvar*); /* cleanup */ + void (*xf_cleanup)(struct secasvar*); /* cleanup */ int (*xf_input)(struct mbuf*, struct secasvar*, /* input */ int, int); int (*xf_output)(struct mbuf*, /* output */ @@ -112,7 +112,6 @@ struct crypto_session_params; int xform_ah_authsize(const struct auth_hash *); int ah_init0(struct secasvar *, struct xformsw *, struct crypto_session_params *); -extern int ah_zeroize(struct secasvar *sav); extern size_t ah_hdrsiz(struct secasvar *); /* XF_ESP */ Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/xform_ah.c Thu Jun 25 23:59:16 2020 (r362636) @@ -241,20 +241,13 @@ ah_init(struct secasvar *sav, struct xformsw *xsp) crypto_newsession(&sav->tdb_cryptoid, &csp, V_crypto_support); } -/* - * Paranoia. - * - * NB: public for use by esp_zeroize (XXX). - */ -int -ah_zeroize(struct secasvar *sav) +static void +ah_cleanup(struct secasvar *sav) { crypto_freesession(sav->tdb_cryptoid); sav->tdb_cryptoid = NULL; sav->tdb_authalgxform = NULL; - sav->tdb_xform = NULL; - return 0; } /* @@ -1141,7 +1134,7 @@ static struct xformsw ah_xformsw = { .xf_type = XF_AH, .xf_name = "IPsec AH", .xf_init = ah_init, - .xf_zeroize = ah_zeroize, + .xf_cleanup = ah_cleanup, .xf_input = ah_input, .xf_output = ah_output, }; Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/xform_esp.c Thu Jun 25 23:59:16 2020 (r362636) @@ -237,18 +237,14 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) return error; } -/* - * Paranoia. - */ -static int -esp_zeroize(struct secasvar *sav) +static void +esp_cleanup(struct secasvar *sav) { - /* NB: ah_zeroize free's the crypto session state */ - int error = ah_zeroize(sav); + crypto_freesession(sav->tdb_cryptoid); + sav->tdb_cryptoid = NULL; + sav->tdb_authalgxform = NULL; sav->tdb_encalgxform = NULL; - sav->tdb_xform = NULL; - return error; } /* @@ -964,7 +960,7 @@ static struct xformsw esp_xformsw = { .xf_type = XF_ESP, .xf_name = "IPsec ESP", .xf_init = esp_init, - .xf_zeroize = esp_zeroize, + .xf_cleanup = esp_cleanup, .xf_input = esp_input, .xf_output = esp_output, }; Modified: head/sys/netipsec/xform_ipcomp.c ============================================================================== --- head/sys/netipsec/xform_ipcomp.c Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/xform_ipcomp.c Thu Jun 25 23:59:16 2020 (r362636) @@ -179,15 +179,14 @@ ipcomp_init(struct secasvar *sav, struct xformsw *xsp) } /* - * ipcomp_zeroize() used when IPCA is deleted + * ipcomp_cleanup() used when IPCA is deleted */ -static int -ipcomp_zeroize(struct secasvar *sav) +static void +ipcomp_cleanup(struct secasvar *sav) { crypto_freesession(sav->tdb_cryptoid); sav->tdb_cryptoid = NULL; - return 0; } /* @@ -739,7 +738,7 @@ static struct xformsw ipcomp_xformsw = { .xf_type = XF_IPCOMP, .xf_name = "IPcomp", .xf_init = ipcomp_init, - .xf_zeroize = ipcomp_zeroize, + .xf_cleanup = ipcomp_cleanup, .xf_input = ipcomp_input, .xf_output = ipcomp_output, }; Modified: head/sys/netipsec/xform_tcp.c ============================================================================== --- head/sys/netipsec/xform_tcp.c Thu Jun 25 23:57:30 2020 (r362635) +++ head/sys/netipsec/xform_tcp.c Thu Jun 25 23:59:16 2020 (r362636) @@ -361,19 +361,16 @@ tcpsignature_init(struct secasvar *sav, struct xformsw /* * Called when the SA is deleted. */ -static int -tcpsignature_zeroize(struct secasvar *sav) +static void +tcpsignature_cleanup(struct secasvar *sav) { - - sav->tdb_xform = NULL; - return (0); } static struct xformsw tcpsignature_xformsw = { .xf_type = XF_TCPSIGNATURE, .xf_name = "TCP-MD5", .xf_init = tcpsignature_init, - .xf_zeroize = tcpsignature_zeroize, + .xf_cleanup = tcpsignature_cleanup, }; static const struct tcpmd5_methods tcpmd5_methods = { From owner-svn-src-head@freebsd.org Fri Jun 26 00:01:32 2020 Return-Path: Delivered-To: svn-src-head@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 61075348949; Fri, 26 Jun 2020 00:01:32 +0000 (UTC) (envelope-from jhb@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 49tH9S11Gyz3Wjp; Fri, 26 Jun 2020 00:01:32 +0000 (UTC) (envelope-from jhb@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 03B7FB753; Fri, 26 Jun 2020 00:01:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q01V7e042329; Fri, 26 Jun 2020 00:01:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q01V4h042328; Fri, 26 Jun 2020 00:01:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006260001.05Q01V4h042328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 Jun 2020 00:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362637 - head/sys/dev/cxgbe/crypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 362637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 00:01:32 -0000 Author: jhb Date: Fri Jun 26 00:01:31 2020 New Revision: 362637 URL: https://svnweb.freebsd.org/changeset/base/362637 Log: Reduce contention on per-adapter lock. - Move temporary sglists into the session structure and protect them with a per-session lock instead of a per-adapter lock. - Retire an unused session field, and move a debugging field under INVARIANTS to avoid using the session lock for completion handling when INVARIANTS isn't enabled. - Use counter_u64 for per-adapter statistics. Note that this helps for cases where multiple sessions are used (e.g. multiple IPsec SAs or multiple KTLS connections). It does not help for workloads that use a single session (e.g. a single GELI volume). Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25457 Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Thu Jun 25 23:59:16 2020 (r362636) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Fri Jun 26 00:01:31 2020 (r362637) @@ -170,8 +170,9 @@ struct ccr_port { }; struct ccr_session { - bool active; +#ifdef INVARIANTS int pending; +#endif enum { HASH, HMAC, BLKCIPHER, ETA, GCM, CCM } mode; struct ccr_port *port; union { @@ -180,16 +181,7 @@ struct ccr_session { struct ccr_session_ccm_mac ccm_mac; }; struct ccr_session_blkcipher blkcipher; -}; - -struct ccr_softc { - struct adapter *adapter; - device_t dev; - uint32_t cid; struct mtx lock; - bool detaching; - struct ccr_port ports[MAX_NPORTS]; - u_int port_mask; /* * Pre-allocate S/G lists used when preparing a work request. @@ -205,7 +197,17 @@ struct ccr_softc { struct sglist *sg_output; struct sglist *sg_ulptx; struct sglist *sg_dsgl; +}; +struct ccr_softc { + struct adapter *adapter; + device_t dev; + uint32_t cid; + struct mtx lock; + bool detaching; + struct ccr_port ports[MAX_NPORTS]; + u_int port_mask; + /* * Pre-allocate a dummy output buffer for the IV and AAD for * AEAD requests. @@ -214,24 +216,23 @@ struct ccr_softc { struct sglist *sg_iv_aad; /* Statistics. */ - uint64_t stats_blkcipher_encrypt; - uint64_t stats_blkcipher_decrypt; - uint64_t stats_hash; - uint64_t stats_hmac; - uint64_t stats_eta_encrypt; - uint64_t stats_eta_decrypt; - uint64_t stats_gcm_encrypt; - uint64_t stats_gcm_decrypt; - uint64_t stats_ccm_encrypt; - uint64_t stats_ccm_decrypt; - uint64_t stats_wr_nomem; - uint64_t stats_inflight; - uint64_t stats_mac_error; - uint64_t stats_pad_error; - uint64_t stats_bad_session; - uint64_t stats_sglist_error; - uint64_t stats_process_error; - uint64_t stats_sw_fallback; + counter_u64_t stats_blkcipher_encrypt; + counter_u64_t stats_blkcipher_decrypt; + counter_u64_t stats_hash; + counter_u64_t stats_hmac; + counter_u64_t stats_eta_encrypt; + counter_u64_t stats_eta_decrypt; + counter_u64_t stats_gcm_encrypt; + counter_u64_t stats_gcm_decrypt; + counter_u64_t stats_ccm_encrypt; + counter_u64_t stats_ccm_decrypt; + counter_u64_t stats_wr_nomem; + counter_u64_t stats_inflight; + counter_u64_t stats_mac_error; + counter_u64_t stats_pad_error; + counter_u64_t stats_sglist_error; + counter_u64_t stats_process_error; + counter_u64_t stats_sw_fallback; }; /* @@ -307,8 +308,7 @@ ccr_phys_dsgl_len(int nsegs) } static void -ccr_write_phys_dsgl(struct ccr_softc *sc, struct ccr_session *s, void *dst, - int nsegs) +ccr_write_phys_dsgl(struct ccr_session *s, void *dst, int nsegs) { struct sglist *sg; struct cpl_rx_phys_dsgl *cpl; @@ -317,7 +317,7 @@ ccr_write_phys_dsgl(struct ccr_softc *sc, struct ccr_s size_t seglen; u_int i, j; - sg = sc->sg_dsgl; + sg = s->sg_dsgl; cpl = dst; cpl->op_to_tid = htobe32(V_CPL_RX_PHYS_DSGL_OPCODE(CPL_RX_PHYS_DSGL) | V_CPL_RX_PHYS_DSGL_ISRDMA(0)); @@ -366,14 +366,14 @@ ccr_ulptx_sgl_len(int nsegs) } static void -ccr_write_ulptx_sgl(struct ccr_softc *sc, void *dst, int nsegs) +ccr_write_ulptx_sgl(struct ccr_session *s, void *dst, int nsegs) { struct ulptx_sgl *usgl; struct sglist *sg; struct sglist_seg *ss; int i; - sg = sc->sg_ulptx; + sg = s->sg_ulptx; MPASS(nsegs == sg->sg_nseg); ss = &sg->sg_segs[0]; usgl = dst; @@ -496,12 +496,12 @@ ccr_hash(struct ccr_softc *sc, struct ccr_session *s, sgl_len = 0; } else { imm_len = 0; - sglist_reset(sc->sg_ulptx); - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + sglist_reset(s->sg_ulptx); + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); - sgl_nsegs = sc->sg_ulptx->sg_nseg; + sgl_nsegs = s->sg_ulptx->sg_nseg; sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } @@ -510,7 +510,7 @@ ccr_hash(struct ccr_softc *sc, struct ccr_session *s, return (EFBIG); wr = alloc_wrqe(wr_len, s->port->txq); if (wr == NULL) { - sc->stats_wr_nomem++; + counter_u64_add(sc->stats_wr_nomem, 1); return (ENOMEM); } crwr = wrtod(wr); @@ -564,7 +564,7 @@ ccr_hash(struct ccr_softc *sc, struct ccr_session *s, crypto_copydata(crp, crp->crp_payload_start, crp->crp_payload_length, dst); else - ccr_write_ulptx_sgl(sc, dst, sgl_nsegs); + ccr_write_ulptx_sgl(s, dst, sgl_nsegs); /* XXX: TODO backpressure */ t4_wrq_tx(sc->adapter, wr); @@ -620,16 +620,16 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session else op_type = CHCR_DECRYPT_OP; - sglist_reset(sc->sg_dsgl); + sglist_reset(s->sg_dsgl); if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_payload_output_start, crp->crp_payload_length); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); - dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN); + dsgl_nsegs = ccr_count_sgl(s->sg_dsgl, DSGL_SGE_MAXLEN); if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE) return (EFBIG); dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs); @@ -650,12 +650,12 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session sgl_len = 0; } else { imm_len = 0; - sglist_reset(sc->sg_ulptx); - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + sglist_reset(s->sg_ulptx); + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); - sgl_nsegs = sc->sg_ulptx->sg_nseg; + sgl_nsegs = s->sg_ulptx->sg_nseg; sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } @@ -665,7 +665,7 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session return (EFBIG); wr = alloc_wrqe(wr_len, s->port->txq); if (wr == NULL) { - sc->stats_wr_nomem++; + counter_u64_add(sc->stats_wr_nomem, 1); return (ENOMEM); } crwr = wrtod(wr); @@ -737,7 +737,7 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session } dst = (char *)(crwr + 1) + kctx_len; - ccr_write_phys_dsgl(sc, s, dst, dsgl_nsegs); + ccr_write_phys_dsgl(s, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; memcpy(dst, iv, iv_len); dst += iv_len; @@ -745,7 +745,7 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session crypto_copydata(crp, crp->crp_payload_start, crp->crp_payload_length, dst); else - ccr_write_ulptx_sgl(sc, dst, sgl_nsegs); + ccr_write_ulptx_sgl(s, dst, sgl_nsegs); /* XXX: TODO backpressure */ t4_wrq_tx(sc->adapter, wr); @@ -846,30 +846,30 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s MAX_REQUEST_SIZE) return (EFBIG); } - sglist_reset(sc->sg_dsgl); - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_iv_aad, 0, + sglist_reset(s->sg_dsgl); + error = sglist_append_sglist(s->sg_dsgl, sc->sg_iv_aad, 0, iv_len + crp->crp_aad_length); if (error) return (error); if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_payload_output_start, crp->crp_payload_length); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_ENCRYPT_OP) { if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_digest_start, hash_size_in_response); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN); + dsgl_nsegs = ccr_count_sgl(s->sg_dsgl, DSGL_SGE_MAXLEN); if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE) return (EFBIG); dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs); @@ -916,29 +916,29 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s sgl_len = 0; } else { imm_len = 0; - sglist_reset(sc->sg_ulptx); + sglist_reset(s->sg_ulptx); if (crp->crp_aad_length != 0) { if (crp->crp_aad != NULL) - error = sglist_append(sc->sg_ulptx, + error = sglist_append(s->sg_ulptx, crp->crp_aad, crp->crp_aad_length); else - error = sglist_append_sglist(sc->sg_ulptx, - sc->sg_input, crp->crp_aad_start, + error = sglist_append_sglist(s->sg_ulptx, + s->sg_input, crp->crp_aad_start, crp->crp_aad_length); if (error) return (error); } - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_DECRYPT_OP) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - sgl_nsegs = sc->sg_ulptx->sg_nseg; + sgl_nsegs = s->sg_ulptx->sg_nseg; sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } @@ -966,7 +966,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s return (EFBIG); wr = alloc_wrqe(wr_len, s->port->txq); if (wr == NULL) { - sc->stats_wr_nomem++; + counter_u64_add(sc->stats_wr_nomem, 1); return (ENOMEM); } crwr = wrtod(wr); @@ -1048,7 +1048,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s memcpy(dst, s->hmac.pads, iopad_size * 2); dst = (char *)(crwr + 1) + kctx_len; - ccr_write_phys_dsgl(sc, s, dst, dsgl_nsegs); + ccr_write_phys_dsgl(s, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; memcpy(dst, iv, iv_len); dst += iv_len; @@ -1068,7 +1068,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s crypto_copydata(crp, crp->crp_digest_start, hash_size_in_response, dst); } else - ccr_write_ulptx_sgl(sc, dst, sgl_nsegs); + ccr_write_ulptx_sgl(s, dst, sgl_nsegs); /* XXX: TODO backpressure */ t4_wrq_tx(sc->adapter, wr); @@ -1168,30 +1168,30 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s MAX_REQUEST_SIZE) return (EFBIG); } - sglist_reset(sc->sg_dsgl); - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_iv_aad, 0, iv_len + + sglist_reset(s->sg_dsgl); + error = sglist_append_sglist(s->sg_dsgl, sc->sg_iv_aad, 0, iv_len + crp->crp_aad_length); if (error) return (error); if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_payload_output_start, crp->crp_payload_length); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_ENCRYPT_OP) { if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_digest_start, hash_size_in_response); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN); + dsgl_nsegs = ccr_count_sgl(s->sg_dsgl, DSGL_SGE_MAXLEN); if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE) return (EFBIG); dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs); @@ -1225,29 +1225,29 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s sgl_len = 0; } else { imm_len = 0; - sglist_reset(sc->sg_ulptx); + sglist_reset(s->sg_ulptx); if (crp->crp_aad_length != 0) { if (crp->crp_aad != NULL) - error = sglist_append(sc->sg_ulptx, + error = sglist_append(s->sg_ulptx, crp->crp_aad, crp->crp_aad_length); else - error = sglist_append_sglist(sc->sg_ulptx, - sc->sg_input, crp->crp_aad_start, + error = sglist_append_sglist(s->sg_ulptx, + s->sg_input, crp->crp_aad_start, crp->crp_aad_length); if (error) return (error); } - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_DECRYPT_OP) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - sgl_nsegs = sc->sg_ulptx->sg_nseg; + sgl_nsegs = s->sg_ulptx->sg_nseg; sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } @@ -1274,7 +1274,7 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s return (EFBIG); wr = alloc_wrqe(wr_len, s->port->txq); if (wr == NULL) { - sc->stats_wr_nomem++; + counter_u64_add(sc->stats_wr_nomem, 1); return (ENOMEM); } crwr = wrtod(wr); @@ -1339,7 +1339,7 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s memcpy(dst, s->gmac.ghash_h, GMAC_BLOCK_LEN); dst = (char *)(crwr + 1) + kctx_len; - ccr_write_phys_dsgl(sc, s, dst, dsgl_nsegs); + ccr_write_phys_dsgl(s, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; memcpy(dst, iv, iv_len); dst += iv_len; @@ -1359,7 +1359,7 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, s crypto_copydata(crp, crp->crp_digest_start, hash_size_in_response, dst); } else - ccr_write_ulptx_sgl(sc, dst, sgl_nsegs); + ccr_write_ulptx_sgl(s, dst, sgl_nsegs); /* XXX: TODO backpressure */ t4_wrq_tx(sc->adapter, wr); @@ -1642,30 +1642,30 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s MAX_REQUEST_SIZE) return (EFBIG); } - sglist_reset(sc->sg_dsgl); - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_iv_aad, 0, iv_len + + sglist_reset(s->sg_dsgl); + error = sglist_append_sglist(s->sg_dsgl, sc->sg_iv_aad, 0, iv_len + aad_len); if (error) return (error); if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_payload_output_start, crp->crp_payload_length); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_ENCRYPT_OP) { if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_output, + error = sglist_append_sglist(s->sg_dsgl, s->sg_output, crp->crp_digest_start, hash_size_in_response); else - error = sglist_append_sglist(sc->sg_dsgl, sc->sg_input, + error = sglist_append_sglist(s->sg_dsgl, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - dsgl_nsegs = ccr_count_sgl(sc->sg_dsgl, DSGL_SGE_MAXLEN); + dsgl_nsegs = ccr_count_sgl(s->sg_dsgl, DSGL_SGE_MAXLEN); if (dsgl_nsegs > MAX_RX_PHYS_DSGL_SGE) return (EFBIG); dsgl_len = ccr_phys_dsgl_len(dsgl_nsegs); @@ -1701,29 +1701,29 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s /* Block 0 is passed as immediate data. */ imm_len = b0_len; - sglist_reset(sc->sg_ulptx); + sglist_reset(s->sg_ulptx); if (crp->crp_aad_length != 0) { if (crp->crp_aad != NULL) - error = sglist_append(sc->sg_ulptx, + error = sglist_append(s->sg_ulptx, crp->crp_aad, crp->crp_aad_length); else - error = sglist_append_sglist(sc->sg_ulptx, - sc->sg_input, crp->crp_aad_start, + error = sglist_append_sglist(s->sg_ulptx, + s->sg_input, crp->crp_aad_start, crp->crp_aad_length); if (error) return (error); } - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_payload_start, crp->crp_payload_length); if (error) return (error); if (op_type == CHCR_DECRYPT_OP) { - error = sglist_append_sglist(sc->sg_ulptx, sc->sg_input, + error = sglist_append_sglist(s->sg_ulptx, s->sg_input, crp->crp_digest_start, hash_size_in_response); if (error) return (error); } - sgl_nsegs = sc->sg_ulptx->sg_nseg; + sgl_nsegs = s->sg_ulptx->sg_nseg; sgl_len = ccr_ulptx_sgl_len(sgl_nsegs); } @@ -1745,7 +1745,7 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s return (EFBIG); wr = alloc_wrqe(wr_len, s->port->txq); if (wr == NULL) { - sc->stats_wr_nomem++; + counter_u64_add(sc->stats_wr_nomem, 1); return (ENOMEM); } crwr = wrtod(wr); @@ -1809,7 +1809,7 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s s->blkcipher.enckey, s->blkcipher.key_len); dst = (char *)(crwr + 1) + kctx_len; - ccr_write_phys_dsgl(sc, s, dst, dsgl_nsegs); + ccr_write_phys_dsgl(s, dst, dsgl_nsegs); dst += sizeof(struct cpl_rx_phys_dsgl) + dsgl_len; memcpy(dst, iv, iv_len); dst += iv_len; @@ -1847,7 +1847,7 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, s idata->len = htobe32(0); dst = (void *)(idata + 1); } - ccr_write_ulptx_sgl(sc, dst, sgl_nsegs); + ccr_write_ulptx_sgl(s, dst, sgl_nsegs); } /* XXX: TODO backpressure */ @@ -2054,47 +2054,50 @@ ccr_sysctls(struct ccr_softc *sc) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "statistics"); children = SYSCTL_CHILDREN(oid); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "hash", CTLFLAG_RD, - &sc->stats_hash, 0, "Hash requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "hmac", CTLFLAG_RD, - &sc->stats_hmac, 0, "HMAC requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "cipher_encrypt", CTLFLAG_RD, - &sc->stats_blkcipher_encrypt, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "hash", CTLFLAG_RD, + &sc->stats_hash, "Hash requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "hmac", CTLFLAG_RD, + &sc->stats_hmac, "HMAC requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cipher_encrypt", + CTLFLAG_RD, &sc->stats_blkcipher_encrypt, "Cipher encryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "cipher_decrypt", CTLFLAG_RD, - &sc->stats_blkcipher_decrypt, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cipher_decrypt", + CTLFLAG_RD, &sc->stats_blkcipher_decrypt, "Cipher decryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "eta_encrypt", CTLFLAG_RD, - &sc->stats_eta_encrypt, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "eta_encrypt", + CTLFLAG_RD, &sc->stats_eta_encrypt, "Combined AES+HMAC encryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "eta_decrypt", CTLFLAG_RD, - &sc->stats_eta_decrypt, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "eta_decrypt", + CTLFLAG_RD, &sc->stats_eta_decrypt, "Combined AES+HMAC decryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "gcm_encrypt", CTLFLAG_RD, - &sc->stats_gcm_encrypt, 0, "AES-GCM encryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "gcm_decrypt", CTLFLAG_RD, - &sc->stats_gcm_decrypt, 0, "AES-GCM decryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "ccm_encrypt", CTLFLAG_RD, - &sc->stats_ccm_encrypt, 0, "AES-CCM encryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "ccm_decrypt", CTLFLAG_RD, - &sc->stats_ccm_decrypt, 0, "AES-CCM decryption requests submitted"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "wr_nomem", CTLFLAG_RD, - &sc->stats_wr_nomem, 0, "Work request memory allocation failures"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "inflight", CTLFLAG_RD, - &sc->stats_inflight, 0, "Requests currently pending"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "mac_error", CTLFLAG_RD, - &sc->stats_mac_error, 0, "MAC errors"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "pad_error", CTLFLAG_RD, - &sc->stats_pad_error, 0, "Padding errors"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "bad_session", CTLFLAG_RD, - &sc->stats_bad_session, 0, "Requests with invalid session ID"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "sglist_error", CTLFLAG_RD, - &sc->stats_sglist_error, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "gcm_encrypt", + CTLFLAG_RD, &sc->stats_gcm_encrypt, + "AES-GCM encryption requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "gcm_decrypt", + CTLFLAG_RD, &sc->stats_gcm_decrypt, + "AES-GCM decryption requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ccm_encrypt", + CTLFLAG_RD, &sc->stats_ccm_encrypt, + "AES-CCM encryption requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ccm_decrypt", + CTLFLAG_RD, &sc->stats_ccm_decrypt, + "AES-CCM decryption requests submitted"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "wr_nomem", CTLFLAG_RD, + &sc->stats_wr_nomem, "Work request memory allocation failures"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "inflight", CTLFLAG_RD, + &sc->stats_inflight, "Requests currently pending"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "mac_error", CTLFLAG_RD, + &sc->stats_mac_error, "MAC errors"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "pad_error", CTLFLAG_RD, + &sc->stats_pad_error, "Padding errors"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "sglist_error", + CTLFLAG_RD, &sc->stats_sglist_error, "Requests for which DMA mapping failed"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "process_error", CTLFLAG_RD, - &sc->stats_process_error, 0, "Requests failed during queueing"); - SYSCTL_ADD_U64(ctx, children, OID_AUTO, "sw_fallback", CTLFLAG_RD, - &sc->stats_sw_fallback, 0, + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "process_error", + CTLFLAG_RD, &sc->stats_process_error, + "Requests failed during queueing"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "sw_fallback", + CTLFLAG_RD, &sc->stats_sw_fallback, "Requests processed by falling back to software"); /* @@ -2157,12 +2160,25 @@ ccr_attach(device_t dev) sc->adapter->ccr_softc = sc; mtx_init(&sc->lock, "ccr", NULL, MTX_DEF); - sc->sg_input = sglist_alloc(TX_SGL_SEGS, M_WAITOK); - sc->sg_output = sglist_alloc(TX_SGL_SEGS, M_WAITOK); - sc->sg_ulptx = sglist_alloc(TX_SGL_SEGS, M_WAITOK); - sc->sg_dsgl = sglist_alloc(MAX_RX_PHYS_DSGL_SGE, M_WAITOK); sc->iv_aad_buf = malloc(MAX_AAD_LEN, M_CCR, M_WAITOK); sc->sg_iv_aad = sglist_build(sc->iv_aad_buf, MAX_AAD_LEN, M_WAITOK); + sc->stats_blkcipher_encrypt = counter_u64_alloc(M_WAITOK); + sc->stats_blkcipher_decrypt = counter_u64_alloc(M_WAITOK); + sc->stats_hash = counter_u64_alloc(M_WAITOK); + sc->stats_hmac = counter_u64_alloc(M_WAITOK); + sc->stats_eta_encrypt = counter_u64_alloc(M_WAITOK); + sc->stats_eta_decrypt = counter_u64_alloc(M_WAITOK); + sc->stats_gcm_encrypt = counter_u64_alloc(M_WAITOK); + sc->stats_gcm_decrypt = counter_u64_alloc(M_WAITOK); + sc->stats_ccm_encrypt = counter_u64_alloc(M_WAITOK); + sc->stats_ccm_decrypt = counter_u64_alloc(M_WAITOK); + sc->stats_wr_nomem = counter_u64_alloc(M_WAITOK); + sc->stats_inflight = counter_u64_alloc(M_WAITOK); + sc->stats_mac_error = counter_u64_alloc(M_WAITOK); + sc->stats_pad_error = counter_u64_alloc(M_WAITOK); + sc->stats_sglist_error = counter_u64_alloc(M_WAITOK); + sc->stats_process_error = counter_u64_alloc(M_WAITOK); + sc->stats_sw_fallback = counter_u64_alloc(M_WAITOK); ccr_sysctls(sc); return (0); @@ -2182,12 +2198,25 @@ ccr_detach(device_t dev) crypto_unregister_all(sc->cid); mtx_destroy(&sc->lock); + counter_u64_free(sc->stats_blkcipher_encrypt); + counter_u64_free(sc->stats_blkcipher_decrypt); + counter_u64_free(sc->stats_hash); + counter_u64_free(sc->stats_hmac); + counter_u64_free(sc->stats_eta_encrypt); + counter_u64_free(sc->stats_eta_decrypt); + counter_u64_free(sc->stats_gcm_encrypt); + counter_u64_free(sc->stats_gcm_decrypt); + counter_u64_free(sc->stats_ccm_encrypt); + counter_u64_free(sc->stats_ccm_decrypt); + counter_u64_free(sc->stats_wr_nomem); + counter_u64_free(sc->stats_inflight); + counter_u64_free(sc->stats_mac_error); + counter_u64_free(sc->stats_pad_error); + counter_u64_free(sc->stats_sglist_error); + counter_u64_free(sc->stats_process_error); + counter_u64_free(sc->stats_sw_fallback); sglist_free(sc->sg_iv_aad); free(sc->iv_aad_buf, M_CCR); - sglist_free(sc->sg_dsgl); - sglist_free(sc->sg_ulptx); - sglist_free(sc->sg_output); - sglist_free(sc->sg_input); sc->adapter->ccr_softc = NULL; return (0); } @@ -2459,6 +2488,16 @@ ccr_choose_port(struct ccr_softc *sc) return (best); } +static void +ccr_delete_session(struct ccr_session *s) +{ + sglist_free(s->sg_input); + sglist_free(s->sg_output); + sglist_free(s->sg_ulptx); + sglist_free(s->sg_dsgl); + mtx_destroy(&s->lock); +} + static int ccr_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) @@ -2547,18 +2586,31 @@ ccr_newsession(device_t dev, crypto_session_t cses, } #endif + s = crypto_get_driver_session(cses); + mtx_init(&s->lock, "ccr session", NULL, MTX_DEF); + s->sg_input = sglist_alloc(TX_SGL_SEGS, M_NOWAIT); + s->sg_output = sglist_alloc(TX_SGL_SEGS, M_NOWAIT); + s->sg_ulptx = sglist_alloc(TX_SGL_SEGS, M_NOWAIT); + s->sg_dsgl = sglist_alloc(MAX_RX_PHYS_DSGL_SGE, M_NOWAIT); + if (s->sg_input == NULL || s->sg_output == NULL || + s->sg_ulptx == NULL || s->sg_dsgl == NULL) { + ccr_delete_session(s); + return (ENOMEM); + } + sc = device_get_softc(dev); mtx_lock(&sc->lock); if (sc->detaching) { mtx_unlock(&sc->lock); + ccr_delete_session(s); return (ENXIO); } - s = crypto_get_driver_session(cses); s->port = ccr_choose_port(sc); if (s->port == NULL) { mtx_unlock(&sc->lock); + ccr_delete_session(s); return (ENXIO); } @@ -2619,7 +2671,6 @@ ccr_newsession(device_t dev, crypto_session_t cses, csp->csp_cipher_klen); } - s->active = true; s->port->active_sessions++; mtx_unlock(&sc->lock); return (0); @@ -2633,14 +2684,16 @@ ccr_freesession(device_t dev, crypto_session_t cses) sc = device_get_softc(dev); s = crypto_get_driver_session(cses); - mtx_lock(&sc->lock); +#ifdef INVARIANTS if (s->pending != 0) device_printf(dev, "session %p freed with %d pending requests\n", s, s->pending); - s->active = false; +#endif + mtx_lock(&sc->lock); s->port->active_sessions--; mtx_unlock(&sc->lock); + ccr_delete_session(s); } static int @@ -2655,12 +2708,12 @@ ccr_process(device_t dev, struct cryptop *crp, int hin s = crypto_get_driver_session(crp->crp_session); sc = device_get_softc(dev); - mtx_lock(&sc->lock); - error = ccr_populate_sglist(sc->sg_input, &crp->crp_buf); + mtx_lock(&s->lock); + error = ccr_populate_sglist(s->sg_input, &crp->crp_buf); if (error == 0 && CRYPTO_HAS_OUTPUT_BUFFER(crp)) - error = ccr_populate_sglist(sc->sg_output, &crp->crp_obuf); + error = ccr_populate_sglist(s->sg_output, &crp->crp_obuf); if (error) { - sc->stats_sglist_error++; + counter_u64_add(sc->stats_sglist_error, 1); goto out; } @@ -2668,7 +2721,7 @@ ccr_process(device_t dev, struct cryptop *crp, int hin case HASH: error = ccr_hash(sc, s, crp); if (error == 0) - sc->stats_hash++; + counter_u64_add(sc->stats_hash, 1); break; case HMAC: if (crp->crp_auth_key != NULL) @@ -2677,7 +2730,7 @@ ccr_process(device_t dev, struct cryptop *crp, int hin csp->csp_auth_klen, s->hmac.pads); error = ccr_hash(sc, s, crp); if (error == 0) - sc->stats_hmac++; + counter_u64_add(sc->stats_hmac, 1); break; case BLKCIPHER: if (crp->crp_cipher_key != NULL) @@ -2686,9 +2739,9 @@ ccr_process(device_t dev, struct cryptop *crp, int hin error = ccr_blkcipher(sc, s, crp); if (error == 0) { if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) - sc->stats_blkcipher_encrypt++; + counter_u64_add(sc->stats_blkcipher_encrypt, 1); else - sc->stats_blkcipher_decrypt++; + counter_u64_add(sc->stats_blkcipher_decrypt, 1); } break; case ETA: @@ -2702,9 +2755,9 @@ ccr_process(device_t dev, struct cryptop *crp, int hin error = ccr_eta(sc, s, crp); if (error == 0) { if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) - sc->stats_eta_encrypt++; + counter_u64_add(sc->stats_eta_encrypt, 1); else - sc->stats_eta_decrypt++; + counter_u64_add(sc->stats_eta_decrypt, 1); } break; case GCM: @@ -2715,22 +2768,22 @@ ccr_process(device_t dev, struct cryptop *crp, int hin csp->csp_cipher_klen); } if (crp->crp_payload_length == 0) { - mtx_unlock(&sc->lock); + mtx_unlock(&s->lock); ccr_gcm_soft(s, crp); return (0); } error = ccr_gcm(sc, s, crp); if (error == EMSGSIZE) { - sc->stats_sw_fallback++; - mtx_unlock(&sc->lock); + counter_u64_add(sc->stats_sw_fallback, 1); + mtx_unlock(&s->lock); ccr_gcm_soft(s, crp); return (0); } if (error == 0) { if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) - sc->stats_gcm_encrypt++; + counter_u64_add(sc->stats_gcm_encrypt, 1); else - sc->stats_gcm_decrypt++; + counter_u64_add(sc->stats_gcm_decrypt, 1); } break; case CCM: @@ -2740,28 +2793,30 @@ ccr_process(device_t dev, struct cryptop *crp, int hin } error = ccr_ccm(sc, s, crp); if (error == EMSGSIZE) { - sc->stats_sw_fallback++; - mtx_unlock(&sc->lock); + counter_u64_add(sc->stats_sw_fallback, 1); + mtx_unlock(&s->lock); ccr_ccm_soft(s, crp); return (0); } if (error == 0) { if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) - sc->stats_ccm_encrypt++; + counter_u64_add(sc->stats_ccm_encrypt, 1); else - sc->stats_ccm_decrypt++; + counter_u64_add(sc->stats_ccm_decrypt, 1); } break; } if (error == 0) { +#ifdef INVARIANTS s->pending++; - sc->stats_inflight++; +#endif + counter_u64_add(sc->stats_inflight, 1); } else - sc->stats_process_error++; + counter_u64_add(sc->stats_process_error, 1); out: - mtx_unlock(&sc->lock); + mtx_unlock(&s->lock); if (error) { crp->crp_etype = error; @@ -2795,9 +2850,12 @@ do_cpl6_fw_pld(struct sge_iq *iq, const struct rss_hea else error = 0; - mtx_lock(&sc->lock); +#ifdef INVARIANTS + mtx_lock(&s->lock); s->pending--; - sc->stats_inflight--; + mtx_unlock(&s->lock); +#endif + counter_u64_add(sc->stats_inflight, -1); switch (s->mode) { case HASH: @@ -2820,11 +2878,10 @@ do_cpl6_fw_pld(struct sge_iq *iq, const struct rss_hea if (error == EBADMSG) { if (CHK_MAC_ERR_BIT(status)) - sc->stats_mac_error++; + counter_u64_add(sc->stats_mac_error, 1); if (CHK_PAD_ERR_BIT(status)) - sc->stats_pad_error++; + counter_u64_add(sc->stats_pad_error, 1); } - mtx_unlock(&sc->lock); crp->crp_etype = error; crypto_done(crp); m_freem(m); From owner-svn-src-head@freebsd.org Fri Jun 26 00:25:58 2020 Return-Path: Delivered-To: svn-src-head@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 93577348E74; Fri, 26 Jun 2020 00:25:58 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tHjd32wBz3Xv3; Fri, 26 Jun 2020 00:25:56 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 05Q0PfR8032165 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jun 2020 10:25:47 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 05Q0Paox089596 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 26 Jun 2020 10:25:36 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 05Q0PaLe089595; Fri, 26 Jun 2020 10:25:36 +1000 (AEST) (envelope-from peter) Date: Fri, 26 Jun 2020 10:25:36 +1000 From: Peter Jeremy To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv Message-ID: <20200626002536.GH22394@server.rulingia.com> References: <202006241754.05OHsPvS018050@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eNMatiwYGLtwo1cJ" Content-Disposition: inline In-Reply-To: <202006241754.05OHsPvS018050@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 49tHjd32wBz3Xv3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.38 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[rulingia.com]; NEURAL_SPAM_SHORT(0.04)[0.036]; NEURAL_HAM_LONG(-1.02)[-1.023]; RCVD_COUNT_THREE(0.00)[3]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 00:25:58 -0000 --eNMatiwYGLtwo1cJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jun-24 17:54:25 +0000, John Baldwin wrote: >Author: jhb >Date: Wed Jun 24 17:54:24 2020 >New Revision: 362589 >URL: https://svnweb.freebsd.org/changeset/base/362589 > >Log: > Always compile the brand and ignore init ELF notes standalone. I'm not sure if this is self-inflicted but I'm now seeing linker failures trying to build in /usr/src/lib/csu/aarch64: ld -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s ld: error: Scrt1.s:1: unknown directive: .text >>> .text >>> ^ *** Error code 1 This is running r362580 and trying to buildworld r352310 on arm64. --=20 Peter Jeremy --eNMatiwYGLtwo1cJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE2M6l8vfIeOACl4uUHZIUommfjLIFAl71QHhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ4 Q0VBNUYyRjdDODc4RTAwMjk3OEI5NDFEOTIxNEEyNjk5RjhDQjIACgkQHZIUommf jLLHJxAAlG0n5+2mD+A7VQR0eDK5EbOvSGebODTulnSKCNVADwRp/yQNJoeDJpk3 VUVROQmiVnhTNYMSFbiOn2U8Dgq3031hVw7ESZBT7T15ZjeJhClwGsJk7ef5Jv44 FSa1iV7FwGlfj2Ymz6GMrVAT/ewISxs0m2lrCHC6cb56veegM4/jwRZT/mWTrzhn u+D6N3XVANUgDpM5x5abWL30xArYFm2K3OJV/TJ9HoCThg5V0A1eKD/R0HMdjeI+ PJGziPyt2jYsl4Q7CQuGiwaE6GKLuW3LxvH9qLeYoIc3QcH/ufXw1XGamOKqyxOi nWlaHwdTnB4Y1p5u1Y5KbFbdoNT86I0Me3tAob/T7MygU/OwIFYMRYI0rm8VkYti 9JQyPEC+chwSUoNeIPqbbrP4Zdg2el+YdIiTzwNpW+6uIwebpVCsE8XdehwdHfSB 9O7iFnQ5o6mItm6f5NOLhMrGL58jLgZDSuWuoA78m3Tsx9NcflykUzHcGVMecjdi 7zp+RIQ1PWiiXKoIpVbPO0gUC3EiJpHSXvhoJZvIIwJuAtORGR4d7GAJYYLzvGoM 8qjh7n6aLZq3dfCFdvwZuuxyWgERG3HqD5FCbwllMz96J+uHeLz/krCW5BFZA2aZ OJDHl09Xog1CT5yNYw1WwEd5MNqpWFtUwGYv7M39caAViRrdfI8= =YZoB -----END PGP SIGNATURE----- --eNMatiwYGLtwo1cJ-- From owner-svn-src-head@freebsd.org Fri Jun 26 01:06:17 2020 Return-Path: Delivered-To: svn-src-head@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 686793497F4; Fri, 26 Jun 2020 01:06:17 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tJc76FgKz3ZyL; Fri, 26 Jun 2020 01:06:15 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 05Q166wT032291 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jun 2020 11:06:11 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 05Q161JG090897 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 26 Jun 2020 11:06:01 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 05Q161RL090896; Fri, 26 Jun 2020 11:06:01 +1000 (AEST) (envelope-from peter) Date: Fri, 26 Jun 2020 11:06:01 +1000 From: Peter Jeremy To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv Message-ID: <20200626010601.GI22394@server.rulingia.com> References: <202006241754.05OHsPvS018050@repo.freebsd.org> <20200626002536.GH22394@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+1TulI7fc0PCHNy3" Content-Disposition: inline In-Reply-To: <20200626002536.GH22394@server.rulingia.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 49tJc76FgKz3ZyL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.23 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.988]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[rulingia.com]; NEURAL_SPAM_SHORT(0.18)[0.180]; NEURAL_HAM_LONG(-1.02)[-1.023]; RCVD_COUNT_THREE(0.00)[3]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 01:06:17 -0000 --+1TulI7fc0PCHNy3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jun-26 10:25:36 +1000, Peter Jeremy wrote: >On 2020-Jun-24 17:54:25 +0000, John Baldwin wrote: >>Author: jhb >>Date: Wed Jun 24 17:54:24 2020 >>New Revision: 362589 >>URL: https://svnweb.freebsd.org/changeset/base/362589 >> >>Log: >> Always compile the brand and ignore init ELF notes standalone. > >I'm not sure if this is self-inflicted but I'm now seeing linker failures >trying to build in /usr/src/lib/csu/aarch64: >ld -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s >ld: error: Scrt1.s:1: unknown directive: .text >>>> .text >>>> ^ >*** Error code 1 > >This is running r362580 and trying to buildworld r352310 on arm64. Sorry - that latter revision is obviously wrong. I was building r362612. --=20 Peter Jeremy --+1TulI7fc0PCHNy3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE2M6l8vfIeOACl4uUHZIUommfjLIFAl71SfJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ4 Q0VBNUYyRjdDODc4RTAwMjk3OEI5NDFEOTIxNEEyNjk5RjhDQjIACgkQHZIUommf jLJ2ww/9GPZlUtJ/W9SHxo2sTx7UkBRiK+rVKGbAsg3lZT67qkUTfalvJUBSvwqH UUev5xMNYiuZUf8y6OxZlyLGr/WQ76pL+7NF2YZCYPVcAhiZ3IWPaPEm0trIgeup oq7SiK8p53JaLi3ESCQqKDfuRy1Fj1EYgaN+oIsY77DywcZy2RAOJwJQj14jc3gR jbntwAmweeeQHLPcHQKBM9dSoMDqCWYNxsu+q+tB7LP/EQ3Mcl/5BX9kVMLPgJwo 8lPGW5Pas112CDsw2hxZNmUhj7XdoQ3kPjGe5oX7UmiSySHhlIMVcs43bhfEYNmR MuVgxP8d9nvXY7hnElgF6gdYrHSxxyovbRW53UpCJtBruLf1THhVdzFQuCKqgm4C EVr50KK2StN67qxgyw3NpTQQ03uE7R9SXERo6grEcgXpqQ2BtJsSHl1FPZ4tvy8u VGcZvFbz1APrgtpgmfY8O6I4+bvTmPo5fWvEsMdYoexT58tNVEFL6JwHrrcjeu6/ +0WC5eCJCmCMtwuZg4O6vh440KEeVZUMB4W2xZbDLsCQRQoC987UUTvJTRop5lND 9sLnBmQOAd2KcSupRmQ+Cy62lxcgu5+lJUrqa7r8qtM8BkZN5vo5H0D1N//0MR2c k+ALh+rgu4HHoaomhcoj0nB9/ZKfjKJuCcdwk7IiJf4crgJOdNo= =2tt3 -----END PGP SIGNATURE----- --+1TulI7fc0PCHNy3-- From owner-svn-src-head@freebsd.org Fri Jun 26 03:11:56 2020 Return-Path: Delivered-To: svn-src-head@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 0DF3134BBF3; Fri, 26 Jun 2020 03:11:56 +0000 (UTC) (envelope-from rmacklem@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 49tMP76lMNz3ymN; Fri, 26 Jun 2020 03:11:55 +0000 (UTC) (envelope-from rmacklem@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 E2ABEDB4B; Fri, 26 Jun 2020 03:11:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q3BtH5060189; Fri, 26 Jun 2020 03:11:55 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q3BsYT059902; Fri, 26 Jun 2020 03:11:54 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006260311.05Q3BsYT059902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 26 Jun 2020 03:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362639 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 362639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 03:11:56 -0000 Author: rmacklem Date: Fri Jun 26 03:11:54 2020 New Revision: 362639 URL: https://svnweb.freebsd.org/changeset/base/362639 Log: Add a boolean argument to nfscl_reqstart() to indicate that ext_pgs mbufs should be used. For KERN_TLS (and possibly some other future network interface) the mbuf list passed into sosend() must be ext_pgs mbufs. The krpc could simply copy all the mbuf data into ext_pgs mbufs before calling sosend(), but that would be inefficient for large RPC messages. This patch adds an argument to nfscl_reqstart() to indicate that it should fill the RPC message into ext_pgs mbufs. It also adds fields to "struct nfsrv_descript" needed for building NFS RPC messages in ext_pgs mbufs, along with new flags for this. Since the argument is always "false", this commit should not result in any semantic change. However, this commit prepares the code for future commits that will add support for building of NFS RPC messages in ext_pgs mbufs. Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfscl.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfs/nfs.h Fri Jun 26 03:11:54 2020 (r362639) @@ -670,6 +670,9 @@ struct nfsrv_descript { nfsv4stateid_t nd_savedcurstateid; /* Saved Current StateID */ uint32_t nd_maxreq; /* Max. request (session). */ uint32_t nd_maxresp; /* Max. reply (session). */ + int nd_bextpg; /* Current ext_pgs page */ + int nd_bextpgsiz; /* Bytes left in page */ + int nd_maxextsiz; /* Max ext_pgs mbuf size */ }; #define nd_princlen nd_gssnamelen @@ -711,6 +714,13 @@ struct nfsrv_descript { #define ND_SAVEDCURSTATEID 0x100000000 #define ND_HASSLOTID 0x200000000 #define ND_NFSV42 0x400000000 +#define ND_EXTPG 0x800000000 +#define ND_TLS 0x1000000000 +#define ND_TLSCERT 0x2000000000 +#define ND_TLSCERTUSER 0x4000000000 +#define ND_EXTLS 0x8000000000 +#define ND_EXTLSCERT 0x10000000000 +#define ND_EXTLSCERTUSER 0x20000000000 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfs/nfs_commonsubs.c Fri Jun 26 03:11:54 2020 (r362639) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #include +#include + /* * Data items converted to xdr at startup, since they are constant * This is kinda hokey, but may save a little time doing byte swaps @@ -317,7 +319,7 @@ static int nfs_bigrequest[NFSV42_NPROCS] = { void nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp, struct nfsclsession *sep, - int vers, int minorvers) + int vers, int minorvers, bool use_ext) { struct mbuf *mb; u_int32_t *tl; @@ -350,6 +352,9 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, } nd->nd_procnum = procnum; nd->nd_repstat = 0; + nd->nd_maxextsiz = 16384; + if (use_ext && mb_use_ext_pgs && PMAP_HAS_DMAP != 0) + nd->nd_flag |= ND_EXTPG; /* * Get the first mbuf for the request. @@ -360,7 +365,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, NFSMGET(mb); mb->m_len = 0; nd->nd_mreq = nd->nd_mb = mb; - nd->nd_bpos = mtod(mb, caddr_t); + nd->nd_bpos = mtod(mb, char *); /* * And fill the first file handle into the request. Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfs/nfs_var.h Fri Jun 26 03:11:54 2020 (r362639) @@ -312,7 +312,7 @@ void nfsrc_trimcache(uint64_t, uint32_t, int); /* nfs_commonsubs.c */ void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *, - u_int8_t *, int, u_int32_t **, struct nfsclsession *, int, int); + u_int8_t *, int, u_int32_t **, struct nfsclsession *, int, int, bool); void nfsm_stateidtom(struct nfsrv_descript *, nfsv4stateid_t *, int); void nfscl_fillsattr(struct nfsrv_descript *, struct vattr *, vnode_t, int, u_int32_t); Modified: head/sys/fs/nfs/nfscl.h ============================================================================== --- head/sys/fs/nfs/nfscl.h Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfs/nfscl.h Fri Jun 26 03:11:54 2020 (r362639) @@ -52,7 +52,7 @@ struct nfsv4node { #define NFSCL_REQSTART(n, p, v) \ nfscl_reqstart((n), (p), VFSTONFS((v)->v_mount), \ VTONFS(v)->n_fhp->nfh_fh, VTONFS(v)->n_fhp->nfh_len, NULL, \ - NULL, 0, 0) + NULL, 0, 0, false) /* * These two macros convert between a lease duration and renew interval. Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Fri Jun 26 03:11:54 2020 (r362639) @@ -499,7 +499,8 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int dp = *dpp; *dpp = NULL; - nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); @@ -855,7 +856,7 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsm int error; nfscl_reqstart(nd, NFSPROC_CLOSE, nmp, op->nfso_fh, - op->nfso_fhlen, NULL, NULL, 0, 0); + op->nfso_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); if (NFSHASNFSV4N(nmp)) @@ -898,7 +899,7 @@ nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhl if (NFSHASNFSV4N(nmp)) return (0); /* No confirmation for NFSv4.1. */ nfscl_reqstart(nd, NFSPROC_OPENCONFIRM, nmp, nfhp, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID); *tl++ = op->nfso_stateid.seqid; *tl++ = op->nfso_stateid.other[0]; @@ -1068,7 +1069,8 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli tsep = NFSMNT_MDSSESSION(nmp); NFSUNLOCKMNT(nmp); - nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(nfsboottime.tv_sec); *tl = txdr_unsigned(clp->nfsc_rev); @@ -1138,7 +1140,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli * and confirm it. */ nfscl_reqstart(nd, NFSPROC_SETCLIENTIDCFRM, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED); *tl++ = tsep->nfsess_clientid.lval[0]; *tl++ = tsep->nfsess_clientid.lval[1]; @@ -1153,7 +1155,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli nd->nd_mrep = NULL; if (nd->nd_repstat == 0) { nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, nmp->nm_fh, - nmp->nm_fhsize, NULL, NULL, 0, 0); + nmp->nm_fhsize, NULL, NULL, 0, 0, false); NFSZERO_ATTRBIT(&attrbits); NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_LEASETIME); (void) nfsrv_putattrbit(nd, &attrbits); @@ -1220,7 +1222,8 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp int error, vers = NFS_VER2; nfsattrbit_t attrbits; - nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0, + false); if (nd->nd_flag & ND_NFSV4) { vers = NFS_VER4; NFSGETATTR_ATTRBIT(&attrbits); @@ -4162,7 +4165,7 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmoun int error; nfscl_reqstart(nd, NFSPROC_LOCKU, nmp, lp->nfsl_open->nfso_fh, - lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0); + lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 6 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(type); *tl = txdr_unsigned(lp->nfsl_seqid); @@ -4214,7 +4217,8 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX]; struct nfsclsession *tsep; - nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED); if (type == F_RDLCK) *tl++ = txdr_unsigned(NFSV4LOCKT_READ); @@ -4488,10 +4492,10 @@ nfsrpc_renew(struct nfsclclient *clp, struct nfsclds * return (0); if (dsp == NULL) nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); else nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL, - &dsp->nfsclds_sess, 0, 0); + &dsp->nfsclds_sess, 0, 0, false); if (!NFSHASNFSV4N(nmp)) { /* NFSv4.1 just uses a Sequence Op and not a Renew. */ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); @@ -4538,11 +4542,11 @@ nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllo if (NFSHASNFSV4N(nmp)) { /* For NFSv4.1, do a FreeStateID. */ nfscl_reqstart(nd, NFSPROC_FREESTATEID, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); nfsm_stateidtom(nd, &lp->nfsl_stateid, NFSSTATEID_PUTSTATEID); } else { nfscl_reqstart(nd, NFSPROC_RELEASELCKOWN, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -4576,7 +4580,7 @@ nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpat u_int32_t *opcntp; nfscl_reqstart(nd, NFSPROC_PUTROOTFH, nmp, NULL, 0, &opcntp, NULL, 0, - 0); + 0, false); cp = dirpath; cnt = 0; do { @@ -4643,7 +4647,7 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred int error; nfscl_reqstart(nd, NFSPROC_DELEGRETURN, nmp, dp->nfsdl_fh, - dp->nfsdl_fhlen, NULL, NULL, 0, 0); + dp->nfsdl_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID); if (NFSHASNFSV4N(nmp)) *tl++ = 0; @@ -4756,7 +4760,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclcl if (minorvers == 0) minorvers = nmp->nm_minorvers; nfscl_reqstart(nd, NFSPROC_EXCHANGEID, nmp, NULL, 0, NULL, NULL, - NFS_VER4, minorvers); + NFS_VER4, minorvers, false); NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(nfsboottime.tv_sec); /* Client owner */ *tl = txdr_unsigned(clp->nfsc_rev); @@ -4852,7 +4856,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc else minorvers = NFSV41_MINORVERSION; nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL, - NFS_VER4, minorvers); + NFS_VER4, minorvers, false); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); *tl++ = sep->nfsess_clientid.lval[0]; *tl++ = sep->nfsess_clientid.lval[1]; @@ -4979,7 +4983,7 @@ nfsrpc_destroysession(struct nfsmount *nmp, struct nfs struct nfsclsession *tsep; nfscl_reqstart(nd, NFSPROC_DESTROYSESSION, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); tsep = nfsmnt_mdssession(nmp); bcopy(tsep->nfsess_sessionid, tl, NFSX_V4SESSIONID); @@ -5007,7 +5011,7 @@ nfsrpc_destroyclient(struct nfsmount *nmp, struct nfsc struct nfsclsession *tsep; nfscl_reqstart(nd, NFSPROC_DESTROYCLIENT, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -5036,7 +5040,7 @@ nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, i int error; nfscl_reqstart(nd, NFSPROC_LAYOUTGET, nmp, fhp, fhlen, NULL, NULL, 0, - 0); + 0, false); nfsrv_setuplayoutget(nd, iomode, offset, len, minlen, stateidp, layouttype, layoutlen, 0); nd->nd_flag |= ND_USEGSSNAME; @@ -5080,7 +5084,7 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *de ndi = NULL; gotdspp = NULL; nfscl_reqstart(nd, NFSPROC_GETDEVICEINFO, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED); NFSBCOPY(deviceid, tl, NFSX_V4DEVICEID); tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); @@ -5301,7 +5305,7 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int error; nfscl_reqstart(nd, NFSPROC_LAYOUTCOMMIT, nmp, fh, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED + 3 * NFSX_HYPER + NFSX_STATEID); txdr_hyper(off, tl); @@ -5352,7 +5356,7 @@ nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int error; nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); if (reclaim != 0) *tl++ = newnfs_true; @@ -5709,7 +5713,7 @@ nfsrpc_reclaimcomplete(struct nfsmount *nmp, struct uc int error; nfscl_reqstart(nd, NFSPROC_RECLAIMCOMPL, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = newnfs_false; nd->nd_flag |= ND_USEGSSNAME; @@ -6300,7 +6304,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4state nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_READDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_readds: vers4 minvers=%d\n", minorvers); if (flex != 0) @@ -6309,7 +6314,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4state nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSEQIDZERO); } else { nfscl_reqstart(nd, NFSPROC_READ, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_readds: vers3\n"); } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3); @@ -6374,7 +6380,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomo nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writeds: vers4 minvers=%d\n", minorvers); vers = NFS_VER4; if (flex != 0) @@ -6384,7 +6391,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomo NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED); } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writeds: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6503,7 +6511,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_c nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers4 minvers=%d\n", minorvers); @@ -6511,7 +6520,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_c NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED); } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6732,11 +6742,13 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; } else nfscl_reqstart(nd, NFSPROC_COMMIT, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_commitds: vers=%d minvers=%d\n", vers, minorvers); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED); @@ -6889,7 +6901,7 @@ nfsrpc_adviseds(vnode_t vp, uint64_t offset, int cnt, return (0); nd->nd_mrep = NULL; nfscl_reqstart(nd, NFSPROC_IOADVISEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_adviseds: vers=%d minvers=%d\n", vers, minorvers); @@ -7544,7 +7556,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, *dpp = NULL; *laystatp = ENXIO; nfscl_reqstart(nd, NFSPROC_OPENLAYGET, nmp, nfhp, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jun 26 00:58:59 2020 (r362638) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jun 26 03:11:54 2020 (r362639) @@ -4987,7 +4987,7 @@ nfsrv_readdsrpc(fhandle_t *fhp, off_t off, int len, st st.other[2] = 0x55555555; st.seqid = 0xffffffff; nfscl_reqstart(nd, NFSPROC_READDS, nmp, (u_int8_t *)fhp, sizeof(*fhp), - NULL, NULL, 0, 0); + NULL, NULL, 0, 0, false); nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3); txdr_hyper(off, tl); @@ -5095,7 +5095,7 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fh nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO); nfscl_reqstart(nd, NFSPROC_WRITE, nmp, (u_int8_t *)fhp, - sizeof(fhandle_t), NULL, NULL, 0, 0); + sizeof(fhandle_t), NULL, NULL, 0, 0, false); /* * Use a stateid where other is an alternating 01010 pattern and @@ -5317,7 +5317,7 @@ nfsrv_allocatedsdorpc(struct nfsmount *nmp, fhandle_t nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO); nfscl_reqstart(nd, NFSPROC_ALLOCATE, nmp, (u_int8_t *)fhp, - sizeof(fhandle_t), NULL, NULL, 0, 0); + sizeof(fhandle_t), NULL, NULL, 0, 0, false); /* * Use a stateid where other is an alternating 01010 pattern and @@ -5471,7 +5471,7 @@ nfsrv_setattrdsdorpc(fhandle_t *fhp, struct ucred *cre st.other[2] = 0x55555555; st.seqid = 0xffffffff; nfscl_reqstart(nd, NFSPROC_SETATTR, nmp, (u_int8_t *)fhp, sizeof(*fhp), - NULL, NULL, 0, 0); + NULL, NULL, 0, 0, false); nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID); nfscl_fillsattr(nd, &nap->na_vattr, vp, NFSSATTR_FULL, 0); @@ -5656,7 +5656,7 @@ nfsrv_setacldsdorpc(fhandle_t *fhp, struct ucred *cred st.other[2] = 0x55555555; st.seqid = 0xffffffff; nfscl_reqstart(nd, NFSPROC_SETACL, nmp, (u_int8_t *)fhp, sizeof(*fhp), - NULL, NULL, 0, 0); + NULL, NULL, 0, 0, false); nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID); NFSZERO_ATTRBIT(&attrbits); NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL); @@ -5791,7 +5791,7 @@ nfsrv_getattrdsrpc(fhandle_t *fhp, struct ucred *cred, NFSD_DEBUG(4, "in nfsrv_getattrdsrpc\n"); nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO); nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, (u_int8_t *)fhp, - sizeof(fhandle_t), NULL, NULL, 0, 0); + sizeof(fhandle_t), NULL, NULL, 0, 0, false); NFSZERO_ATTRBIT(&attrbits); NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_SIZE); NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_CHANGE); @@ -5859,7 +5859,7 @@ nfsrv_seekdsrpc(fhandle_t *fhp, off_t *offp, int conte st.seqid = 0xffffffff; nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO); nfscl_reqstart(nd, NFSPROC_SEEKDS, nmp, (u_int8_t *)fhp, - sizeof(fhandle_t), NULL, NULL, 0, 0); + sizeof(fhandle_t), NULL, NULL, 0, 0, false); nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED); txdr_hyper(*offp, tl); tl += 2; From owner-svn-src-head@freebsd.org Fri Jun 26 03:14:30 2020 Return-Path: Delivered-To: svn-src-head@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 BF2B434C436; Fri, 26 Jun 2020 03:14:30 +0000 (UTC) (envelope-from rmacklem@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 49tMS64jYmz40Bn; Fri, 26 Jun 2020 03:14:30 +0000 (UTC) (envelope-from rmacklem@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 9D07ED9B3; Fri, 26 Jun 2020 03:14:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q3EUZa061034; Fri, 26 Jun 2020 03:14:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q3EUmQ061033; Fri, 26 Jun 2020 03:14:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006260314.05Q3EUmQ061033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 26 Jun 2020 03:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362640 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 362640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 03:14:30 -0000 Author: rmacklem Date: Fri Jun 26 03:14:30 2020 New Revision: 362640 URL: https://svnweb.freebsd.org/changeset/base/362640 Log: Bump the version since r362639 changed the internal API between the NFS kernel modules so they must all be rebuilt. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jun 26 03:11:54 2020 (r362639) +++ head/sys/sys/param.h Fri Jun 26 03:14:30 2020 (r362640) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300099 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300100 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Fri Jun 26 03:18:11 2020 Return-Path: Delivered-To: svn-src-head@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 489B234C6B6; Fri, 26 Jun 2020 03:18:11 +0000 (UTC) (envelope-from rmacklem@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 49tMXM1DtLz40KZ; Fri, 26 Jun 2020 03:18:11 +0000 (UTC) (envelope-from rmacklem@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 213BFDB53; Fri, 26 Jun 2020 03:18:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q3IAgx061256; Fri, 26 Jun 2020 03:18:10 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q3IAMi061255; Fri, 26 Jun 2020 03:18:10 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006260318.05Q3IAMi061255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 26 Jun 2020 03:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362641 - head X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 03:18:11 -0000 Author: rmacklem Date: Fri Jun 26 03:18:10 2020 New Revision: 362641 URL: https://svnweb.freebsd.org/changeset/base/362641 Log: Add an entry for r362639. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jun 26 03:14:30 2020 (r362640) +++ head/UPDATING Fri Jun 26 03:18:10 2020 (r362641) @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200625: + r362639 changed the internal API used between the NFS kernel modules. + As such, they all need to be rebuilt from sources. + 20200613: r362158 changed the arguments for VFS_CHECKEXP(). As such, any out of tree file systems need to be modified and rebuilt. From owner-svn-src-head@freebsd.org Fri Jun 26 04:46:46 2020 Return-Path: Delivered-To: svn-src-head@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 2D97D34DEFB; Fri, 26 Jun 2020 04:46:46 +0000 (UTC) (envelope-from delphij@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 49tPVZ0HGwz43WF; Fri, 26 Jun 2020 04:46:46 +0000 (UTC) (envelope-from delphij@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 006E9E8BB; Fri, 26 Jun 2020 04:46:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q4kjIG016705; Fri, 26 Jun 2020 04:46:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q4kjLE016704; Fri, 26 Jun 2020 04:46:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202006260446.05Q4kjLE016704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 26 Jun 2020 04:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362642 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 362642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 04:46:46 -0000 Author: delphij Date: Fri Jun 26 04:46:45 2020 New Revision: 362642 URL: https://svnweb.freebsd.org/changeset/base/362642 Log: Don't log normal login_getpwclass(3) result. The logging was introduced in r314527 but doesn't appear to be useful for regular operation, and as the result, for users with no class set (very common) the administrator would see a message like this in their auth.log: sshd[44251]: user root login class [preauth] (note that the class was "" because that's what's typically configured for most users; we would get 'default' if lc->lc_class is chosen) Remove this log as it can be annoying as the lookup happen before authentication and repeats, and our code is not acting upon lc_class or pw_class directly anyways. Reviewed by: cem, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24997 Modified: head/crypto/openssh/auth2.c Modified: head/crypto/openssh/auth2.c ============================================================================== --- head/crypto/openssh/auth2.c Fri Jun 26 03:18:10 2020 (r362641) +++ head/crypto/openssh/auth2.c Fri Jun 26 04:46:45 2020 (r362642) @@ -317,8 +317,6 @@ input_userauth_request(int type, u_int32_t seq, struct #ifdef HAVE_LOGIN_CAP if (authctxt->pw != NULL && (lc = PRIVSEP(login_getpwclass(authctxt->pw))) != NULL) { - logit("user %s login class %s", authctxt->pw->pw_name, - authctxt->pw->pw_class); from_host = auth_get_canonical_hostname(ssh, options.use_dns); from_ip = ssh_remote_ipaddr(ssh); if (!auth_hostok(lc, from_host, from_ip)) { From owner-svn-src-head@freebsd.org Fri Jun 26 06:11:51 2020 Return-Path: Delivered-To: svn-src-head@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 8E91934F33E; Fri, 26 Jun 2020 06:11:51 +0000 (UTC) (envelope-from grehan@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 49tRNl3B7dz466X; Fri, 26 Jun 2020 06:11:51 +0000 (UTC) (envelope-from grehan@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 68A34F7D5; Fri, 26 Jun 2020 06:11:51 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q6BpYD069139; Fri, 26 Jun 2020 06:11:51 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q6Bpek069138; Fri, 26 Jun 2020 06:11:51 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202006260611.05Q6Bpek069138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 26 Jun 2020 06:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362643 - head X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 06:11:51 -0000 Author: grehan Date: Fri Jun 26 06:11:50 2020 New Revision: 362643 URL: https://svnweb.freebsd.org/changeset/base/362643 Log: Update bhyve maintainers. Suggested by: jhb Approved by: jhb, tychon Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Fri Jun 26 04:46:45 2020 (r362642) +++ head/MAINTAINERS Fri Jun 26 06:11:50 2020 (r362643) @@ -119,11 +119,11 @@ usr.sbin/bsdconfig dteske Pre-commit phabricator revie usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team. usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr. -vmm(4) tychon, jhb Pre-commit review requested via #bhyve +vmm(4) jhb, grehan Pre-commit review requested via #bhyve phabricator group. -libvmmapi tychon, jhb Pre-commit review requested via #bhyve +libvmmapi jhb, grehan Pre-commit review requested via #bhyve phabricator group. -usr.sbin/bhyve* tychon, jhb Pre-commit review requested via #bhyve +usr.sbin/bhyve* jhb, grehan Pre-commit review requested via #bhyve phabricator group. autofs(5) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended. From owner-svn-src-head@freebsd.org Fri Jun 26 08:20:39 2020 Return-Path: Delivered-To: svn-src-head@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 C32D4350D52; Fri, 26 Jun 2020 08:20:39 +0000 (UTC) (envelope-from grehan@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 49tVFM4WpDz4Ckd; Fri, 26 Jun 2020 08:20:39 +0000 (UTC) (envelope-from grehan@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 7DE9011159; Fri, 26 Jun 2020 08:20:39 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q8KdB0045193; Fri, 26 Jun 2020 08:20:39 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q8Kd8c045191; Fri, 26 Jun 2020 08:20:39 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202006260820.05Q8Kd8c045191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 26 Jun 2020 08:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362644 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 08:20:39 -0000 Author: grehan Date: Fri Jun 26 08:20:38 2020 New Revision: 362644 URL: https://svnweb.freebsd.org/changeset/base/362644 Log: Prevent calling USB backends multiple times. The TRB processing loop could potentially call a back-end twice with the same status transaction. While this was generally benign, some code paths in the tablet backend weren't set up to handle this case, resulting in a NULL dereference. Fix by - returning a STALL error when an invalid request was seen in the backend - skipping a call to the backend if the number of packets in a status transaction was zero (this code fragment was taken from the Intel ACRN xhci backend) PR: 246964 Reported by: Ali Abdallah Discussed with: Leon Dang (author) Reviewed by: jhb (#bhyve), Leon Dang Approved by: jhb Obtained from: Intel ACRN (partially) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25228 Modified: head/usr.sbin/bhyve/pci_xhci.c head/usr.sbin/bhyve/usb_mouse.c Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Fri Jun 26 06:11:50 2020 (r362643) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Jun 26 08:20:38 2020 (r362644) @@ -1843,6 +1843,9 @@ retry: DPRINTF(("pci_xhci[%d]: xfer->ndata %u", __LINE__, xfer->ndata)); + if (xfer->ndata <= 0) + goto errout; + if (epid == 1) { err = USB_ERR_NOT_STARTED; if (dev->dev_ue->ue_request != NULL) @@ -1857,6 +1860,7 @@ retry: err = USB_TO_XHCI_ERR(err); if ((err == XHCI_TRB_ERROR_SUCCESS) || + (err == XHCI_TRB_ERROR_STALL) || (err == XHCI_TRB_ERROR_SHORT_PKT)) { err = pci_xhci_xfer_complete(sc, xfer, slot, epid, &do_intr); if (err != XHCI_TRB_ERROR_SUCCESS) Modified: head/usr.sbin/bhyve/usb_mouse.c ============================================================================== --- head/usr.sbin/bhyve/usb_mouse.c Fri Jun 26 06:11:50 2020 (r362643) +++ head/usr.sbin/bhyve/usb_mouse.c Fri Jun 26 08:20:38 2020 (r362644) @@ -390,7 +390,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer "sizeof(umouse_dev_desc) %lu", len, sizeof(umouse_dev_desc))); if ((value & 0xFF) != 0) { - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } if (len > sizeof(umouse_dev_desc)) { @@ -405,7 +405,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer case UDESC_CONFIG: DPRINTF(("umouse: (->UDESC_CONFIG)")); if ((value & 0xFF) != 0) { - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } if (len > sizeof(umouse_confd)) { @@ -474,7 +474,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer default: DPRINTF(("umouse: unknown(%d)->ERROR", value >> 8)); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } eshort = data->blen > 0; @@ -498,7 +498,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer break; default: DPRINTF(("umouse: IO ERROR")); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } eshort = data->blen > 0; @@ -509,7 +509,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer if (index != 0) { DPRINTF(("umouse get_interface, invalid index %d", index)); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } @@ -580,7 +580,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer case UREQ(UR_SET_FEATURE, UT_WRITE_INTERFACE): case UREQ(UR_SET_FEATURE, UT_WRITE_ENDPOINT): DPRINTF(("umouse: (UR_CLEAR_FEATURE, UT_WRITE_INTERFACE)")); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; case UREQ(UR_SET_INTERFACE, UT_WRITE_INTERFACE): @@ -619,7 +619,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer memcpy(data->buf, &sc->um_report, len); data->bdone += len; } else { - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; goto done; } eshort = data->blen > 0; @@ -661,7 +661,7 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer default: DPRINTF(("**** umouse request unhandled")); - err = USB_ERR_IOERROR; + err = USB_ERR_STALLED; break; } From owner-svn-src-head@freebsd.org Fri Jun 26 09:32:57 2020 Return-Path: Delivered-To: svn-src-head@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 9D0E935303C; Fri, 26 Jun 2020 09:32:57 +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.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 49tWrn3g2zz4MgH; Fri, 26 Jun 2020 09:32:57 +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 78D5C11AF7; Fri, 26 Jun 2020 09:32:57 +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 05Q9Wv6O001521; Fri, 26 Jun 2020 09:32:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q9WvU6001520; Fri, 26 Jun 2020 09:32:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006260932.05Q9WvU6001520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 Jun 2020 09:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362645 - head/sys/modules/ena X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/modules/ena X-SVN-Commit-Revision: 362645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:32:57 -0000 Author: avg Date: Fri Jun 26 09:32:57 2020 New Revision: 362645 URL: https://svnweb.freebsd.org/changeset/base/362645 Log: ena: fix module build after r362530 Somehow I missed the makefile when moving the change from phabricator to svn. MFC after: 1 week X-MFC with: r362530 Modified: head/sys/modules/ena/Makefile Modified: head/sys/modules/ena/Makefile ============================================================================== --- head/sys/modules/ena/Makefile Fri Jun 26 08:20:38 2020 (r362644) +++ head/sys/modules/ena/Makefile Fri Jun 26 09:32:57 2020 (r362645) @@ -37,6 +37,7 @@ KMOD = if_ena SRCS = ena_com.c ena_eth_com.c SRCS += ena.c ena_sysctl.c ena_datapath.c ena_netmap.c SRCS += device_if.h bus_if.h pci_if.h +SRCS += opt_rss.h CFLAGS += -I${SRCTOP}/sys/contrib .include From owner-svn-src-head@freebsd.org Fri Jun 26 09:39:23 2020 Return-Path: Delivered-To: svn-src-head@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 A5446353057; Fri, 26 Jun 2020 09:39:23 +0000 (UTC) (envelope-from lwhsu@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 49tX0C3fpHz4N71; Fri, 26 Jun 2020 09:39:23 +0000 (UTC) (envelope-from lwhsu@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 7453811AF8; Fri, 26 Jun 2020 09:39:23 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q9dNB3001980; Fri, 26 Jun 2020 09:39:23 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q9dNa8001979; Fri, 26 Jun 2020 09:39:23 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006260939.05Q9dNa8001979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 26 Jun 2020 09:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362646 - head/bin/sh/tests X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/bin/sh/tests X-SVN-Commit-Revision: 362646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:39:23 -0000 Author: lwhsu Date: Fri Jun 26 09:39:23 2020 New Revision: 362646 URL: https://svnweb.freebsd.org/changeset/base/362646 Log: Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI PR: 238870 Sponsored by: The FreeBSD Foundation Modified: head/bin/sh/tests/functional_test.sh Modified: head/bin/sh/tests/functional_test.sh ============================================================================== --- head/bin/sh/tests/functional_test.sh Fri Jun 26 09:32:57 2020 (r362645) +++ head/bin/sh/tests/functional_test.sh Fri Jun 26 09:39:23 2020 (r362646) @@ -27,6 +27,7 @@ # $FreeBSD$ SRCDIR=$(atf_get_srcdir) +CATEGORY=$(basename ${SRCDIR}) check() { @@ -60,7 +61,20 @@ add_testcase() esac atf_test_case ${tc_escaped} - eval "${tc_escaped}_body() { check ${tc}; }" + + if [ "$(atf_config_get ci false)" = "true" ]; then + case "${CATEGORY}/${tc}" in + execution/bg12.0) + eval "${tc_escaped}_body() { atf_skip 'https://bugs.freebsd.org/247559'; }" + ;; + *) + eval "${tc_escaped}_body() { check ${tc}; }" + ;; + esac + else + eval "${tc_escaped}_body() { check ${tc}; }" + fi + atf_add_test_case ${tc_escaped} } From owner-svn-src-head@freebsd.org Fri Jun 26 09:42:39 2020 Return-Path: Delivered-To: svn-src-head@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 99CD83533C9; Fri, 26 Jun 2020 09:42:39 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tX3y4c7xz4NMh; Fri, 26 Jun 2020 09:42:38 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f175.google.com with SMTP id y13so4172933ybj.10; Fri, 26 Jun 2020 02:42:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Z1ZpDkyg4lxArIeQWnoZ68LuMNNdfWKh3iqpHJ1K2So=; b=b2IjFzbwApq0kU1lturMsr6WdSfmiT6UZ0Ov6ZMT4XBqupmWyNkpIy4LtNcK6p6tKF lPnvAPhqzdgk4zFGzqtJyMugUW8xupCSWp+YZCH7/C1aXt5MZ0+vVfRwpFVGoJfs4fqS MFbb91B+/EcEY9WAwHxc1TYjMQy/n97eXDWuM9wj0+7sp9OZ4ORWOhCWYd5voeenQJdy 2jAsogpRPlgt3ZUPZXEqbwFEEoLgqB7kvOZvbj6NkRfZi+4I1VoGJqn+w5YuOZiXKmBt +ogMnRyydtOT5URRxejexb0NvMqqre9YFRfEX6STb2HKjQBKK8wz5fLF5hJ5WNY/7SR2 /Dsw== X-Gm-Message-State: AOAM532jDJQL+IfXFNhXxIkSqFl9m9FHk2zqeX8aTo17Lfm82ByIgGfY wUeUEQd8/uqkfruT2SuaUjxeMSUDJgOFWI7fWIo902cf X-Google-Smtp-Source: ABdhPJzPDUXw08KPJNyq+/+nPoOA5r6OFfkXy8XbBjgM3KENqiwH0t4qW2gJxuBTrtZSblWZ3pBS08hBkQKo3TuOcxM= X-Received: by 2002:a25:c646:: with SMTP id k67mr3865162ybf.110.1593164557254; Fri, 26 Jun 2020 02:42:37 -0700 (PDT) MIME-Version: 1.0 References: <202006260939.05Q9dNa8001979@repo.freebsd.org> In-Reply-To: <202006260939.05Q9dNa8001979@repo.freebsd.org> From: Li-Wen Hsu Date: Fri, 26 Jun 2020 17:42:26 +0800 Message-ID: Subject: Re: svn commit: r362646 - head/bin/sh/tests To: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49tX3y4c7xz4NMh X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lwhsufreebsd@gmail.com designates 209.85.219.175 as permitted sender) smtp.mailfrom=lwhsufreebsd@gmail.com X-Spamd-Result: default: False [-1.92 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.91)[-0.906]; NEURAL_HAM_MEDIUM(-0.55)[-0.553]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.46)[-0.463]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.175:from]; FORGED_SENDER(0.30)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.175:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:42:39 -0000 On Fri, Jun 26, 2020 at 5:39 PM Li-Wen Hsu wrote: > > Author: lwhsu > Date: Fri Jun 26 09:39:23 2020 > New Revision: 362646 > URL: https://svnweb.freebsd.org/changeset/base/362646 > > Log: > Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI > > PR: 238870 The correct PR should be https://bugs.freebsd.org/247559 From owner-svn-src-head@freebsd.org Fri Jun 26 09:46:04 2020 Return-Path: Delivered-To: svn-src-head@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 4EC8F35372A; Fri, 26 Jun 2020 09:46:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 49tX7w1LYDz4NWv; Fri, 26 Jun 2020 09:46:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28B21126E2; Fri, 26 Jun 2020 09:46:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q9k410007938; Fri, 26 Jun 2020 09:46:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q9k4CH007937; Fri, 26 Jun 2020 09:46:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202006260946.05Q9k4CH007937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 26 Jun 2020 09:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362647 - head/sys/dev/sound/pci/hda X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 362647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:46:04 -0000 Author: avg Date: Fri Jun 26 09:46:03 2020 New Revision: 362647 URL: https://svnweb.freebsd.org/changeset/base/362647 Log: sound/hda: fix interrupt handler endless loop after r362294 Not all interrupt sources that affect CIS bit were acknowledged. Specifically, bits in STATESTS (aka WAKESTS) were left set. The fix is to disable WAKEEN and clear STATESTS bits before the HDA interrupt is enabled. This way we should never get any STATESTS bits. I also added placeholders for all event bits that we currently do not enable, do not handle and do not clear. This might get useful when / if we enable any of them. Reported by: kib (Apollo Lake hardware) Tested by: kib (earlier, different change) MFC after: 2 weeks X-MFC with: r362294 Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jun 26 09:39:23 2020 (r362646) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jun 26 09:46:03 2020 (r362647) @@ -312,8 +312,27 @@ hdac_one_intr(struct hdac_softc *sc, uint32_t intsts) /* Was this a controller interrupt? */ if (intsts & HDAC_INTSTS_CIS) { - rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS); + /* + * Placeholder: if we ever enable any bits in HDAC_WAKEEN, then + * we will need to check and clear HDAC_STATESTS. + * That event is used to report codec status changes such as + * a reset or a wake-up event. + */ + /* + * Placeholder: if we ever enable HDAC_CORBCTL_CMEIE, then we + * will need to check and clear HDAC_CORBSTS_CMEI in + * HDAC_CORBSTS. + * That event is used to report CORB memory errors. + */ + /* + * Placeholder: if we ever enable HDAC_RIRBCTL_RIRBOIC, then we + * will need to check and clear HDAC_RIRBSTS_RIRBOIS in + * HDAC_RIRBSTS. + * That event is used to report response FIFO overruns. + */ + /* Get as many responses that we can */ + rirbsts = HDAC_READ_1(&sc->mem, HDAC_RIRBSTS); while (rirbsts & HDAC_RIRBSTS_RINTFL) { HDAC_WRITE_1(&sc->mem, HDAC_RIRBSTS, HDAC_RIRBSTS_RINTFL); @@ -1514,6 +1533,24 @@ hdac_attach2(void *arg) device_printf(sc->dev, "Starting RIRB Engine...\n"); ); hdac_rirb_start(sc); + + /* + * Clear HDAC_WAKEEN as at present we have no use for SDI wake + * (status change) interrupts. The documentation says that we + * should not make any assumptions about the state of this register + * and set it explicitly. + * NB: this needs to be done before the interrupt is enabled as + * the handler does not expect this interrupt source. + */ + HDAC_WRITE_2(&sc->mem, HDAC_WAKEEN, 0); + + /* + * Read and clear post-reset SDI wake status. + * Each set bit corresponds to a codec that came out of reset. + */ + statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS); + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, statests); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Enabling controller interrupt...\n"); @@ -1529,7 +1566,6 @@ hdac_attach2(void *arg) HDA_BOOTHVERBOSE( device_printf(sc->dev, "Scanning HDA codecs ...\n"); ); - statests = HDAC_READ_2(&sc->mem, HDAC_STATESTS); hdac_unlock(sc); for (i = 0; i < HDAC_CODEC_MAX; i++) { if (HDAC_STATESTS_SDIWAKE(statests, i)) { @@ -1643,6 +1679,19 @@ hdac_resume(device_t dev) device_printf(dev, "Starting RIRB Engine...\n"); ); hdac_rirb_start(sc); + + /* + * Clear HDAC_WAKEEN as at present we have no use for SDI wake + * (status change) events. The documentation says that we should + * not make any assumptions about the state of this register and + * set it explicitly. + * Also, clear HDAC_STATESTS. + * NB: this needs to be done before the interrupt is enabled as + * the handler does not expect this interrupt source. + */ + HDAC_WRITE_2(&sc->mem, HDAC_WAKEEN, 0); + HDAC_WRITE_2(&sc->mem, HDAC_STATESTS, HDAC_STATESTS_SDIWAKE_MASK); + HDA_BOOTHVERBOSE( device_printf(dev, "Enabling controller interrupt...\n"); ); From owner-svn-src-head@freebsd.org Fri Jun 26 09:47:43 2020 Return-Path: Delivered-To: svn-src-head@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 13AC935364E; Fri, 26 Jun 2020 09:47:43 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tX9p0c7pz4P2W; Fri, 26 Jun 2020 09:47:41 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f170.google.com with SMTP id 9so9662664ljv.5; Fri, 26 Jun 2020 02:47:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cbLO4pVcRhhJvUmrq59giJzRaxbum25ieVKY+cVehNI=; b=j1ooP8V9xrelNM3E3N4ETg/h6mmRiAAcT7ADk4f07tYEmBlVMu3kEkuixfxWt2rM42 baQF84tDgyO6TpyUiimH7RAORLGjUsm5htqxQ3ROwgKnTyYwdOplibMA3QfwUJRlwr2F LcRhYxeT5xn2D4etV1nnowIlR3qDHYK6+6ZKB+RxAWwMApcPeJW1zgwyHlbpGZAYwF8u Q1/j6DBZWDcQCn5A3+f+xFAgHcphk5eDtGJ3RTleeklAlqkWpL7cWpkBhZf+8mWmlYAe seyN+XgarrqZHYm9dA1k35RSWSFXu1VE77bsT7QyGnSG6OiPJZdSevnh3sqA/ocpTiWA n5sA== X-Gm-Message-State: AOAM5319mLE35e1EDiRnnChmNuuLDqulBFtx4aHrYob1kF3CGdhvku0O TqAp6GxkyqglQqV45laWg2nXSDN6i1E= X-Google-Smtp-Source: ABdhPJzVJZkMT4OxNbgNjrSAM4vh1XL2Ivc1I8IUEJ/hnZsp2UdxGjKyUj/aaG1kUD+8ARWDjkALEg== X-Received: by 2002:a2e:9d1:: with SMTP id 200mr838448ljj.392.1593164860073; Fri, 26 Jun 2020 02:47:40 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id l22sm5418097ljg.41.2020.06.26.02.47.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jun 2020 02:47:39 -0700 (PDT) Subject: Re: svn commit: r362645 - head/sys/modules/ena To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006260932.05Q9WvU6001520@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <39e52101-825d-8009-2613-1edacdbf93b4@FreeBSD.org> Date: Fri, 26 Jun 2020 12:47:38 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <202006260932.05Q9WvU6001520@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49tX9p0c7pz4P2W X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.170 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.34 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.12)[0.124]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.74)[-0.739]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.72)[-0.723]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.170:from]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.170:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:47:43 -0000 On 26/06/2020 12:32, Andriy Gapon wrote: > Author: avg > Date: Fri Jun 26 09:32:57 2020 > New Revision: 362645 > URL: https://svnweb.freebsd.org/changeset/base/362645 > > Log: > ena: fix module build after r362530 Or rather, _standalone_ module build. -- Andriy Gapon From owner-svn-src-head@freebsd.org Fri Jun 26 14:18:08 2020 Return-Path: Delivered-To: svn-src-head@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 DEEB3358AF0; Fri, 26 Jun 2020 14:18:08 +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.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 49tf9r5ZFKz4gMs; Fri, 26 Jun 2020 14:18:08 +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 B5C38152EE; Fri, 26 Jun 2020 14:18:08 +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 05QEI8FM076262; Fri, 26 Jun 2020 14:18:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QEI8FL076261; Fri, 26 Jun 2020 14:18:08 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006261418.05QEI8FL076261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 26 Jun 2020 14:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362651 - head/usr.sbin/wpa/wpa_supplicant X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/usr.sbin/wpa/wpa_supplicant X-SVN-Commit-Revision: 362651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 14:18:08 -0000 Author: cy Date: Fri Jun 26 14:18:08 2020 New Revision: 362651 URL: https://svnweb.freebsd.org/changeset/base/362651 Log: Add MATCH option for CONFIG_MATCH_IFACE. If the interfaces on which wpa_supplicant is to run are not known or do not exist, wpa_supplicant can match an interface when it arrives. Each matched interface is separated with -M argument and the -i argument now allows for pattern matching. As an example, the following command would start wpa_supplicant for a specific wired interface called lan0, any interface starting with wlan and lastly any other interface. Each match has its own configuration file, and for the wired interface a specific driver has also been given. wpa_supplicant \ -M -c wpa_wired.conf -ilan0 -D wired \ -M -c wpa1.conf -iwlan* \ -M -c wpa2.conf PR: 247177 Reported by: greg@unrelenting.technology MFC after: 1 month Related to: ports r540412 Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Fri Jun 26 12:11:22 2020 (r362650) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Fri Jun 26 14:18:08 2020 (r362651) @@ -49,7 +49,8 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \ -DCONFIG_TLS=openssl \ -DCONFIG_WPS2 \ -DCONFIG_WPS_UPNP \ - -DPKCS12_FUNCS + -DPKCS12_FUNCS \ + -DCONFIG_MATCH_IFACE #CFLAGS+= -g LIBADD= pcap util From owner-svn-src-head@freebsd.org Fri Jun 26 15:04:35 2020 Return-Path: Delivered-To: svn-src-head@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 2AC07359E1F; Fri, 26 Jun 2020 15:04:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tgCR0LWtz4jnW; Fri, 26 Jun 2020 15:04:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:7dce:c69a:a896:fddf]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E9D7163C7; Fri, 26 Jun 2020 15:04:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362589 - in head/lib/csu: aarch64 arm i386 riscv To: Peter Jeremy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006241754.05OHsPvS018050@repo.freebsd.org> <20200626002536.GH22394@server.rulingia.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Fri, 26 Jun 2020 08:04:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200626002536.GH22394@server.rulingia.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 15:04:35 -0000 On 6/25/20 5:25 PM, Peter Jeremy wrote: > On 2020-Jun-24 17:54:25 +0000, John Baldwin wrote: >> Author: jhb >> Date: Wed Jun 24 17:54:24 2020 >> New Revision: 362589 >> URL: https://svnweb.freebsd.org/changeset/base/362589 >> >> Log: >> Always compile the brand and ignore init ELF notes standalone. > > I'm not sure if this is self-inflicted but I'm now seeing linker failures > trying to build in /usr/src/lib/csu/aarch64: > ld -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o Scrt1.s > ld: error: Scrt1.s:1: unknown directive: .text >>>> .text >>>> ^ > *** Error code 1 > > This is running r362580 and trying to buildworld r352310 on arm64. Ah, I will fix. I have to use ${.ALLSRC:M*.o} instead of ${.ALLSRC} as bmake adds implicit dependencies in ${.ALLSRC}. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Jun 26 15:14:04 2020 Return-Path: Delivered-To: svn-src-head@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 61D1535A30E; Fri, 26 Jun 2020 15:14:04 +0000 (UTC) (envelope-from allanjude@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 49tgQN21rPz4kcm; Fri, 26 Jun 2020 15:14:04 +0000 (UTC) (envelope-from allanjude@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 3F4221601C; Fri, 26 Jun 2020 15:14:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QFE4SK012948; Fri, 26 Jun 2020 15:14:04 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QFE4lq012947; Fri, 26 Jun 2020 15:14:04 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202006261514.05QFE4lq012947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 26 Jun 2020 15:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362652 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 362652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 15:14:04 -0000 Author: allanjude Date: Fri Jun 26 15:14:03 2020 New Revision: 362652 URL: https://svnweb.freebsd.org/changeset/base/362652 Log: ifconfig(8): remove duplicate line from man page Reported by: Weitian LI Sponsored by: Klara Inc. Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Fri Jun 26 14:18:08 2020 (r362651) +++ head/sbin/ifconfig/ifconfig.8 Fri Jun 26 15:14:03 2020 (r362652) @@ -2914,7 +2914,6 @@ The flag limits this to interfaces that are down, .Fl u limits this to interfaces that are up, -limits this to interfaces that are up, .Fl g limits this to members of the specified group of interfaces, and .Fl G From owner-svn-src-head@freebsd.org Fri Jun 26 15:30:49 2020 Return-Path: Delivered-To: svn-src-head@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 25CCE35A5AD; Fri, 26 Jun 2020 15:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tgnj0FFrz4lZX; Fri, 26 Jun 2020 15:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:7dce:c69a:a896:fddf]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 75A8B1722D; Fri, 26 Jun 2020 15:30:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362620 - head/secure/lib/libcrypto To: Benjamin Kaduk , Gordon Tetlow Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006251935.05PJZbJ2077013@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <82448b9f-b64f-73b2-37b9-1ccc9f7876aa@FreeBSD.org> Date: Fri, 26 Jun 2020 08:30:47 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 15:30:49 -0000 On 6/25/20 2:30 PM, Benjamin Kaduk wrote: > On Thu, Jun 25, 2020 at 12:35 PM Gordon Tetlow wrote: > >> Author: gordon >> Date: Thu Jun 25 19:35:37 2020 >> New Revision: 362620 >> URL: https://svnweb.freebsd.org/changeset/base/362620 >> >> Log: >> Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility. >> >> This define caused a couple of symbols to disappear. To keep ABI >> compatibility, we are going to keep the symbols exposed, but leave SSLv3 >> as >> not in the default config (this is what OPENSSL_NO_SSL3 achieves). The >> ramifications of this is an application can still use SSLv3 if it >> specifically calls the SSLv3_method family of APIs. >> >> > I think I've seen some distros that keep the functinos around but just have > them always return failure. I think this is sensible for 13.0. It might even be something we could MFC to 12.x, but certainly for 13.0. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Jun 26 16:20:35 2020 Return-Path: Delivered-To: svn-src-head@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 64B1135B652; Fri, 26 Jun 2020 16:20:35 +0000 (UTC) (envelope-from allanjude@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 49thv726J0z4pMB; Fri, 26 Jun 2020 16:20:35 +0000 (UTC) (envelope-from allanjude@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 43A32168E1; Fri, 26 Jun 2020 16:20:35 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QGKZYJ050589; Fri, 26 Jun 2020 16:20:35 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QGKZmO050588; Fri, 26 Jun 2020 16:20:35 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202006261620.05QGKZmO050588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 26 Jun 2020 16:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362654 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 362654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 16:20:35 -0000 Author: allanjude Date: Fri Jun 26 16:20:34 2020 New Revision: 362654 URL: https://svnweb.freebsd.org/changeset/base/362654 Log: ifconfig(8): optimize -f ether:dash mode Switch to the simplified while loop suggest by Aaron LI Post commit review via: https://reviews.freebsd.org/rS301185#inline-232 Submitted by: Aaron LI Sponsored by: Klara Inc. Modified: head/sbin/ifconfig/af_link.c Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Fri Jun 26 16:16:25 2020 (r362653) +++ head/sbin/ifconfig/af_link.c Fri Jun 26 16:20:34 2020 (r362654) @@ -74,10 +74,10 @@ link_status(int s __unused, const struct ifaddrs *ifa) sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) { ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl)); if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { - for (format_char = strchr(ether_format, ':'); - format_char != NULL; - format_char = strchr(ether_format, ':')) + while ((format_char = strchr(ether_format, ':')) != + NULL) { *format_char = '-'; + } } printf("\tether %s\n", ether_format); } else { From owner-svn-src-head@freebsd.org Fri Jun 26 17:58:11 2020 Return-Path: Delivered-To: svn-src-head@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 37E6335CEDD; Fri, 26 Jun 2020 17:58:11 +0000 (UTC) (envelope-from lwhsu@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 49tl3l0kZtz3S4B; Fri, 26 Jun 2020 17:58:11 +0000 (UTC) (envelope-from lwhsu@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 0FBFF17858; Fri, 26 Jun 2020 17:58:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QHwAFu013273; Fri, 26 Jun 2020 17:58:10 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QHwAEv013272; Fri, 26 Jun 2020 17:58:10 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006261758.05QHwAEv013272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 26 Jun 2020 17:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362656 - head/contrib/netbsd-tests/kernel X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/contrib/netbsd-tests/kernel X-SVN-Commit-Revision: 362656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 17:58:11 -0000 Author: lwhsu Date: Fri Jun 26 17:58:10 2020 New Revision: 362656 URL: https://svnweb.freebsd.org/changeset/base/362656 Log: Temporarily skip flakey sys.kern.sysv_test.msg in CI PR: 233649 Modified: head/contrib/netbsd-tests/kernel/t_sysv.c Modified: head/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- head/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 17:35:09 2020 (r362655) +++ head/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 17:58:10 2020 (r362656) @@ -210,6 +210,9 @@ ATF_TC_BODY(msg, tc) int loop; int c_status; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/233649"); + /* * Install a SIGSYS handler so that we can exit gracefully if * System V Message Queue support isn't in the kernel. From owner-svn-src-head@freebsd.org Fri Jun 26 19:46:32 2020 Return-Path: Delivered-To: svn-src-head@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 2435435E9E0; Fri, 26 Jun 2020 19:46:32 +0000 (UTC) (envelope-from jhb@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 49tnSl70Q9z3Xg6; Fri, 26 Jun 2020 19:46:31 +0000 (UTC) (envelope-from jhb@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 EB42D18D70; Fri, 26 Jun 2020 19:46:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QJkVcG080758; Fri, 26 Jun 2020 19:46:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QJkVgV080755; Fri, 26 Jun 2020 19:46:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006261946.05QJkVgV080755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 26 Jun 2020 19:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362660 - in head/lib/csu: aarch64 arm i386 riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/lib/csu: aarch64 arm i386 riscv X-SVN-Commit-Revision: 362660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 19:46:32 -0000 Author: jhb Date: Fri Jun 26 19:46:30 2020 New Revision: 362660 URL: https://svnweb.freebsd.org/changeset/base/362660 Log: Only include object files from .ALLSRC when linking crt1 objects. Reported by: np, peterj Reviewed by: kib, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25469 Modified: head/lib/csu/aarch64/Makefile head/lib/csu/arm/Makefile head/lib/csu/i386/Makefile head/lib/csu/riscv/Makefile Modified: head/lib/csu/aarch64/Makefile ============================================================================== --- head/lib/csu/aarch64/Makefile Fri Jun 26 18:57:01 2020 (r362659) +++ head/lib/csu/aarch64/Makefile Fri Jun 26 19:46:30 2020 (r362660) @@ -24,15 +24,15 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Fri Jun 26 18:57:01 2020 (r362659) +++ head/lib/csu/arm/Makefile Fri Jun 26 19:46:30 2020 (r362660) @@ -24,18 +24,18 @@ crt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Modified: head/lib/csu/i386/Makefile ============================================================================== --- head/lib/csu/i386/Makefile Fri Jun 26 18:57:01 2020 (r362659) +++ head/lib/csu/i386/Makefile Fri Jun 26 19:46:30 2020 (r362660) @@ -24,17 +24,17 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 Scrt1.o .include Modified: head/lib/csu/riscv/Makefile ============================================================================== --- head/lib/csu/riscv/Makefile Fri Jun 26 18:57:01 2020 (r362659) +++ head/lib/csu/riscv/Makefile Fri Jun 26 19:46:30 2020 (r362660) @@ -24,15 +24,15 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include From owner-svn-src-head@freebsd.org Fri Jun 26 19:55:12 2020 Return-Path: Delivered-To: svn-src-head@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 C0E9A35EE11; Fri, 26 Jun 2020 19:55:12 +0000 (UTC) (envelope-from mav@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 49tnfm4dd2z3YSW; Fri, 26 Jun 2020 19:55:12 +0000 (UTC) (envelope-from mav@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 962DB18F69; Fri, 26 Jun 2020 19:55:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QJtC9j086632; Fri, 26 Jun 2020 19:55:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QJtB8A086629; Fri, 26 Jun 2020 19:55:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006261955.05QJtB8A086629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 Jun 2020 19:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362661 - in head/sys/dev: acpica pci X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/dev: acpica pci X-SVN-Commit-Revision: 362661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 19:55:12 -0000 Author: mav Date: Fri Jun 26 19:55:11 2020 New Revision: 362661 URL: https://svnweb.freebsd.org/changeset/base/362661 Log: Add mostly dummy hw.pci.enable_aspm tunable. The only thing this tunable enables now is reporting to ACPI _OSC that Active State Power Management and Clock Power Management Capability are "supported" by the OS. I've found that at least some Supermicro server boards do not allow OS to support native PCIe hot-plug unless it reports those capabilities. After spending significant time in PCIe specs I have found very little motivation for that, and none of it applies to those motherboards, not enabling ASPM themselves. So unless OS explicitly wants to save power, I see nothing for it to do there actually. I guess it may get sense to support ASPM when we get Thunderbolt support. Otherwise I have no system with PCIe hot-plug where power saving matters. It would be nice to enable this by default, but I worry that it affect power saving of some laptops, even though I haven't noticed that myself. Modified: head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Fri Jun 26 19:46:30 2020 (r362660) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Fri Jun 26 19:55:11 2020 (r362661) @@ -326,6 +326,10 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t os /* Support Field: Extended PCI Config Space, PCI Segment Groups, MSI */ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF | PCIM_OSC_SUPPORT_SEG_GROUP | PCIM_OSC_SUPPORT_MSI; + /* Active State Power Management, Clock Power Management Capability */ + if (pci_enable_aspm) + cap_set[PCI_OSC_SUPPORT] |= PCIM_OSC_SUPPORT_ASPM | + PCIM_OSC_SUPPORT_CPMC; /* Control Field */ cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl | osc_ctl; Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Fri Jun 26 19:46:30 2020 (r362660) +++ head/sys/dev/pci/pci.c Fri Jun 26 19:55:11 2020 (r362661) @@ -408,6 +408,10 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); +int pci_enable_aspm; +SYSCTL_INT(_hw_pci, OID_AUTO, enable_aspm, CTLFLAG_RDTUN, &pci_enable_aspm, + 0, "Enable support for PCIe Active State Power Management"); + static int pci_clear_aer_on_attach = 0; SYSCTL_INT(_hw_pci, OID_AUTO, clear_aer_on_attach, CTLFLAG_RWTUN, &pci_clear_aer_on_attach, 0, Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Fri Jun 26 19:46:30 2020 (r362660) +++ head/sys/dev/pci/pcivar.h Fri Jun 26 19:55:11 2020 (r362661) @@ -257,6 +257,7 @@ typedef struct { } pcih2cfgregs; extern uint32_t pci_numdevs; +extern int pci_enable_aspm; /* * The bitfield has to be stable and match the fields below (so that From owner-svn-src-head@freebsd.org Fri Jun 26 21:21:35 2020 Return-Path: Delivered-To: svn-src-head@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 EEFFF35FA9C; Fri, 26 Jun 2020 21:21:35 +0000 (UTC) (envelope-from tsoome@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 49tqZR5fPRz3clX; Fri, 26 Jun 2020 21:21:35 +0000 (UTC) (envelope-from tsoome@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 BD2651A59D; Fri, 26 Jun 2020 21:21:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QLLZ5Z041057; Fri, 26 Jun 2020 21:21:35 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QLLZ8R041056; Fri, 26 Jun 2020 21:21:35 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202006262121.05QLLZ8R041056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 26 Jun 2020 21:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362663 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 362663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 21:21:36 -0000 Author: tsoome Date: Fri Jun 26 21:21:35 2020 New Revision: 362663 URL: https://svnweb.freebsd.org/changeset/base/362663 Log: loader: can not read zfs pool with slog removed The vdev_init() does check for "known" vdev types, the [log] device removal will create "hole" device, but vdev_init() does not allow it. Obtained from: illumos MFC after: 1 week Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Fri Jun 26 20:44:10 2020 (r362662) +++ head/stand/libsa/zfs/zfsimpl.c Fri Jun 26 21:21:35 2020 (r362663) @@ -765,7 +765,14 @@ vdev_disk_read(vdev_t *vdev, const blkptr_t *bp, void offset + VDEV_LABEL_START_SIZE, bytes)); } +static int +vdev_missing_read(vdev_t *vdev __unused, const blkptr_t *bp __unused, + void *buf __unused, off_t offset __unused, size_t bytes __unused) +{ + return (ENOTSUP); +} + static int vdev_mirror_read(vdev_t *vdev, const blkptr_t *bp, void *buf, off_t offset, size_t bytes) @@ -904,9 +911,10 @@ vdev_init(uint64_t guid, const nvlist_t *nvlist, vdev_ #endif memcmp(type, VDEV_TYPE_RAIDZ, len) != 0 && memcmp(type, VDEV_TYPE_INDIRECT, len) != 0 && - memcmp(type, VDEV_TYPE_REPLACING, len) != 0) { + memcmp(type, VDEV_TYPE_REPLACING, len) != 0 && + memcmp(type, VDEV_TYPE_HOLE, len) != 0) { printf("ZFS: can only boot from disk, mirror, raidz1, " - "raidz2 and raidz3 vdevs\n"); + "raidz2 and raidz3 vdevs, got: %.*s\n", len, type); return (EIO); } @@ -937,6 +945,8 @@ vdev_init(uint64_t guid, const nvlist_t *nvlist, vdev_ DATA_TYPE_UINT64, NULL, &vic->vic_prev_indirect_vdev, NULL); } + } else if (memcmp(type, VDEV_TYPE_HOLE, len) == 0) { + vdev = vdev_create(guid, vdev_missing_read); } else { vdev = vdev_create(guid, vdev_disk_read); } From owner-svn-src-head@freebsd.org Fri Jun 26 22:05:24 2020 Return-Path: Delivered-To: svn-src-head@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 5DAC3360C6B; Fri, 26 Jun 2020 22:05:24 +0000 (UTC) (envelope-from imp@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 49trY01Wvdz3fv1; Fri, 26 Jun 2020 22:05:24 +0000 (UTC) (envelope-from imp@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 2B4511ABDB; Fri, 26 Jun 2020 22:05:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QM5OaU066701; Fri, 26 Jun 2020 22:05:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QM5N5Q066700; Fri, 26 Jun 2020 22:05:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202006262205.05QM5N5Q066700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 26 Jun 2020 22:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362664 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 362664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 22:05:24 -0000 Author: imp Date: Fri Jun 26 22:05:23 2020 New Revision: 362664 URL: https://svnweb.freebsd.org/changeset/base/362664 Log: Chroot actually appeared in 7th Edition Unix. Chroot appeared during the development of 7th edition Unix. The FreeBSD jail documents, incorrectly, that Bill Joy added this to 4.2BSD on 18 March 1982. That was when Bill Joy converted from a statically coded system call glue to dynamically generated assembler. Chroot was present in 32V, 3BSD, 4.0BSD, 4.1BSD and 4.1cBSD well in advance of this. Kirk McKusick agrees with this analysis. See also: V7: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/sys/chroot.s 32V: https://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/libc/sys/chroot.s 3BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/libc/sys/chroot.s 4BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/libc/sys/chroot.s 4.1cBSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/libc/sys/chroot.s The 6th and earlier editions do not have this system call, nor do they have anything named chroot in the trees available from TUHS. Reviewed by: allanjude@ Differential Revision: https://reviews.freebsd.org/D25475 Modified: head/lib/libc/sys/chroot.2 Modified: head/lib/libc/sys/chroot.2 ============================================================================== --- head/lib/libc/sys/chroot.2 Fri Jun 26 21:21:35 2020 (r362663) +++ head/lib/libc/sys/chroot.2 Fri Jun 26 22:05:23 2020 (r362664) @@ -28,7 +28,7 @@ .\" @(#)chroot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd June 26, 2020 .Dt CHROOT 2 .Os .Sh NAME @@ -131,7 +131,7 @@ Corrupted data was detected while reading from the fil The .Fn chroot system call appeared in -.Bx 4.2 . +.At v7 . It was marked as .Dq legacy in From owner-svn-src-head@freebsd.org Fri Jun 26 22:23:16 2020 Return-Path: Delivered-To: svn-src-head@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 19670360E29; Fri, 26 Jun 2020 22:23:16 +0000 (UTC) (envelope-from imp@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 49trxb6jdbz3gWk; Fri, 26 Jun 2020 22:23:15 +0000 (UTC) (envelope-from imp@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 E1B3B1AF44; Fri, 26 Jun 2020 22:23:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QMNFHk078968; Fri, 26 Jun 2020 22:23:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QMNFBe078967; Fri, 26 Jun 2020 22:23:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202006262223.05QMNFBe078967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 26 Jun 2020 22:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362665 - head/usr.sbin/chroot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/chroot X-SVN-Commit-Revision: 362665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 22:23:16 -0000 Author: imp Date: Fri Jun 26 22:23:15 2020 New Revision: 362665 URL: https://svnweb.freebsd.org/changeset/base/362665 Log: Chroot first appeared in 4.3-Reno, not in 4.4 in the BSD world, but in System III in the AT&T world. Examination of the TUHS archives shows this was present in 4.3-Reno and System III. Reviewed by: 0mp@, allanjude@ MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D25479 Modified: head/usr.sbin/chroot/chroot.8 Modified: head/usr.sbin/chroot/chroot.8 ============================================================================== --- head/usr.sbin/chroot/chroot.8 Fri Jun 26 22:05:23 2020 (r362664) +++ head/usr.sbin/chroot/chroot.8 Fri Jun 26 22:23:15 2020 (r362665) @@ -28,7 +28,7 @@ .\" @(#)chroot.8 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 14, 2019 +.Dd June 27, 2020 .Dt CHROOT 8 .Os .Sh NAME @@ -113,4 +113,6 @@ to list the contents of The .Nm utility first appeared in -.Bx 4.4 . +.At III +and +.Bx 4.3 Reno . From owner-svn-src-head@freebsd.org Sat Jun 27 00:55:04 2020 Return-Path: Delivered-To: svn-src-head@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 1871D3634D3; Sat, 27 Jun 2020 00:55:04 +0000 (UTC) (envelope-from mmacy@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 49twJl5vQHz44Mn; Sat, 27 Jun 2020 00:55:03 +0000 (UTC) (envelope-from mmacy@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 AB67B1CD33; Sat, 27 Jun 2020 00:55:03 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R0t3Q2070755; Sat, 27 Jun 2020 00:55:03 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R0t3oY070754; Sat, 27 Jun 2020 00:55:03 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202006270055.05R0t3oY070754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 27 Jun 2020 00:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362666 - in head/sys: conf contrib/libnv X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: conf contrib/libnv X-SVN-Commit-Revision: 362666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 00:55:04 -0000 Author: mmacy Date: Sat Jun 27 00:55:03 2020 New Revision: 362666 URL: https://svnweb.freebsd.org/changeset/base/362666 Log: Rename nvpair.c to bsd_nvpair.c to not conflict with openzfs' version. Added: head/sys/contrib/libnv/bsd_nvpair.c - copied unchanged from r362665, head/sys/contrib/libnv/nvpair.c Deleted: head/sys/contrib/libnv/nvpair.c Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Jun 26 22:23:15 2020 (r362665) +++ head/sys/conf/files Sat Jun 27 00:55:03 2020 (r362666) @@ -593,7 +593,7 @@ contrib/libfdt/fdt_wip.c optional fdt contrib/libnv/cnvlist.c standard contrib/libnv/dnvlist.c standard contrib/libnv/nvlist.c standard -contrib/libnv/nvpair.c standard +contrib/libnv/bsd_nvpair.c standard contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ Copied: head/sys/contrib/libnv/bsd_nvpair.c (from r362665, head/sys/contrib/libnv/nvpair.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/libnv/bsd_nvpair.c Sat Jun 27 00:55:03 2020 (r362666, copy of r362665, head/sys/contrib/libnv/nvpair.c) @@ -0,0 +1,2135 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2009-2013 The FreeBSD Foundation + * Copyright (c) 2013-2015 Mariusz Zaborski + * All rights reserved. + * + * This software was developed by Pawel Jakub Dawidek under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#ifdef _KERNEL + +#include +#include +#include +#include + +#include + +#else +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common_impl.h" +#endif + +#ifdef HAVE_PJDLOG +#include +#endif + +#include + +#include "nv_impl.h" +#include "nvlist_impl.h" +#include "nvpair_impl.h" + +#ifndef HAVE_PJDLOG +#ifdef _KERNEL +#define PJDLOG_ASSERT(...) MPASS(__VA_ARGS__) +#define PJDLOG_RASSERT(expr, ...) KASSERT(expr, (__VA_ARGS__)) +#define PJDLOG_ABORT(...) panic(__VA_ARGS__) +#else +#include +#define PJDLOG_ASSERT(...) assert(__VA_ARGS__) +#define PJDLOG_RASSERT(expr, ...) assert(expr) +#define PJDLOG_ABORT(...) abort() +#endif +#endif + +#define NVPAIR_MAGIC 0x6e7670 /* "nvp" */ +struct nvpair { + int nvp_magic; + char *nvp_name; + int nvp_type; + uint64_t nvp_data; + size_t nvp_datasize; + size_t nvp_nitems; /* Used only for array types. */ + nvlist_t *nvp_list; + TAILQ_ENTRY(nvpair) nvp_next; +}; + +#define NVPAIR_ASSERT(nvp) do { \ + PJDLOG_ASSERT((nvp) != NULL); \ + PJDLOG_ASSERT((nvp)->nvp_magic == NVPAIR_MAGIC); \ +} while (0) + +struct nvpair_header { + uint8_t nvph_type; + uint16_t nvph_namesize; + uint64_t nvph_datasize; + uint64_t nvph_nitems; +} __packed; + + +void +nvpair_assert(const nvpair_t *nvp __unused) +{ + + NVPAIR_ASSERT(nvp); +} + +static nvpair_t * +nvpair_allocv(const char *name, int type, uint64_t data, size_t datasize, + size_t nitems) +{ + nvpair_t *nvp; + size_t namelen; + + PJDLOG_ASSERT(type >= NV_TYPE_FIRST && type <= NV_TYPE_LAST); + + namelen = strlen(name); + if (namelen >= NV_NAME_MAX) { + ERRNO_SET(ENAMETOOLONG); + return (NULL); + } + + nvp = nv_calloc(1, sizeof(*nvp) + namelen + 1); + if (nvp != NULL) { + nvp->nvp_name = (char *)(nvp + 1); + memcpy(nvp->nvp_name, name, namelen); + nvp->nvp_name[namelen] = '\0'; + nvp->nvp_type = type; + nvp->nvp_data = data; + nvp->nvp_datasize = datasize; + nvp->nvp_nitems = nitems; + nvp->nvp_magic = NVPAIR_MAGIC; + } + + return (nvp); +} + +static int +nvpair_append(nvpair_t *nvp, const void *value, size_t valsize, size_t datasize) +{ + void *olddata, *data, *valp; + size_t oldlen; + + oldlen = nvp->nvp_nitems * valsize; + olddata = (void *)(uintptr_t)nvp->nvp_data; + data = nv_realloc(olddata, oldlen + valsize); + if (data == NULL) { + ERRNO_SET(ENOMEM); + return (-1); + } + valp = (unsigned char *)data + oldlen; + memcpy(valp, value, valsize); + + nvp->nvp_data = (uint64_t)(uintptr_t)data; + nvp->nvp_datasize += datasize; + nvp->nvp_nitems++; + return (0); +} + +nvlist_t * +nvpair_nvlist(const nvpair_t *nvp) +{ + + NVPAIR_ASSERT(nvp); + + return (nvp->nvp_list); +} + +nvpair_t * +nvpair_next(const nvpair_t *nvp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_list != NULL); + + return (TAILQ_NEXT(nvp, nvp_next)); +} + +nvpair_t * +nvpair_prev(const nvpair_t *nvp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_list != NULL); + + return (TAILQ_PREV(nvp, nvl_head, nvp_next)); +} + +void +nvpair_insert(struct nvl_head *head, nvpair_t *nvp, nvlist_t *nvl) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_list == NULL); + PJDLOG_ASSERT((nvlist_flags(nvl) & NV_FLAG_NO_UNIQUE) != 0 || + !nvlist_exists(nvl, nvpair_name(nvp))); + + TAILQ_INSERT_TAIL(head, nvp, nvp_next); + nvp->nvp_list = nvl; +} + +static void +nvpair_remove_nvlist(nvpair_t *nvp) +{ + nvlist_t *nvl; + + /* XXX: DECONST is bad, mkay? */ + nvl = __DECONST(nvlist_t *, nvpair_get_nvlist(nvp)); + PJDLOG_ASSERT(nvl != NULL); + nvlist_set_parent(nvl, NULL); +} + +static void +nvpair_remove_nvlist_array(nvpair_t *nvp) +{ + nvlist_t **nvlarray; + size_t count, i; + + /* XXX: DECONST is bad, mkay? */ + nvlarray = __DECONST(nvlist_t **, + nvpair_get_nvlist_array(nvp, &count)); + for (i = 0; i < count; i++) { + nvlist_set_array_next(nvlarray[i], NULL); + nvlist_set_parent(nvlarray[i], NULL); + } +} + +void +nvpair_remove(struct nvl_head *head, nvpair_t *nvp, + const nvlist_t *nvl __unused) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_list == nvl); + + if (nvpair_type(nvp) == NV_TYPE_NVLIST) + nvpair_remove_nvlist(nvp); + else if (nvpair_type(nvp) == NV_TYPE_NVLIST_ARRAY) + nvpair_remove_nvlist_array(nvp); + + TAILQ_REMOVE(head, nvp, nvp_next); + nvp->nvp_list = NULL; +} + +nvpair_t * +nvpair_clone(const nvpair_t *nvp) +{ + nvpair_t *newnvp; + const char *name; + const void *data; + size_t datasize; + + NVPAIR_ASSERT(nvp); + + name = nvpair_name(nvp); + + switch (nvpair_type(nvp)) { + case NV_TYPE_NULL: + newnvp = nvpair_create_null(name); + break; + case NV_TYPE_BOOL: + newnvp = nvpair_create_bool(name, nvpair_get_bool(nvp)); + break; + case NV_TYPE_NUMBER: + newnvp = nvpair_create_number(name, nvpair_get_number(nvp)); + break; + case NV_TYPE_STRING: + newnvp = nvpair_create_string(name, nvpair_get_string(nvp)); + break; + case NV_TYPE_NVLIST: + newnvp = nvpair_create_nvlist(name, nvpair_get_nvlist(nvp)); + break; + case NV_TYPE_BINARY: + data = nvpair_get_binary(nvp, &datasize); + newnvp = nvpair_create_binary(name, data, datasize); + break; + case NV_TYPE_BOOL_ARRAY: + data = nvpair_get_bool_array(nvp, &datasize); + newnvp = nvpair_create_bool_array(name, data, datasize); + break; + case NV_TYPE_NUMBER_ARRAY: + data = nvpair_get_number_array(nvp, &datasize); + newnvp = nvpair_create_number_array(name, data, datasize); + break; + case NV_TYPE_STRING_ARRAY: + data = nvpair_get_string_array(nvp, &datasize); + newnvp = nvpair_create_string_array(name, data, datasize); + break; + case NV_TYPE_NVLIST_ARRAY: + data = nvpair_get_nvlist_array(nvp, &datasize); + newnvp = nvpair_create_nvlist_array(name, data, datasize); + break; +#ifndef _KERNEL + case NV_TYPE_DESCRIPTOR: + newnvp = nvpair_create_descriptor(name, + nvpair_get_descriptor(nvp)); + break; + case NV_TYPE_DESCRIPTOR_ARRAY: + data = nvpair_get_descriptor_array(nvp, &datasize); + newnvp = nvpair_create_descriptor_array(name, data, datasize); + break; +#endif + default: + PJDLOG_ABORT("Unknown type: %d.", nvpair_type(nvp)); + } + + return (newnvp); +} + +size_t +nvpair_header_size(void) +{ + + return (sizeof(struct nvpair_header)); +} + +size_t +nvpair_size(const nvpair_t *nvp) +{ + + NVPAIR_ASSERT(nvp); + + return (nvp->nvp_datasize); +} + +unsigned char * +nvpair_pack_header(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + struct nvpair_header nvphdr; + size_t namesize; + + NVPAIR_ASSERT(nvp); + + nvphdr.nvph_type = nvp->nvp_type; + namesize = strlen(nvp->nvp_name) + 1; + PJDLOG_ASSERT(namesize > 0 && namesize <= UINT16_MAX); + nvphdr.nvph_namesize = namesize; + nvphdr.nvph_datasize = nvp->nvp_datasize; + nvphdr.nvph_nitems = nvp->nvp_nitems; + PJDLOG_ASSERT(*leftp >= sizeof(nvphdr)); + memcpy(ptr, &nvphdr, sizeof(nvphdr)); + ptr += sizeof(nvphdr); + *leftp -= sizeof(nvphdr); + + PJDLOG_ASSERT(*leftp >= namesize); + memcpy(ptr, nvp->nvp_name, namesize); + ptr += namesize; + *leftp -= namesize; + + return (ptr); +} + +unsigned char * +nvpair_pack_null(const nvpair_t *nvp __unused, unsigned char *ptr, + size_t *leftp __unused) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NULL); + + return (ptr); +} + +unsigned char * +nvpair_pack_bool(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + uint8_t value; + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BOOL); + + value = (uint8_t)nvp->nvp_data; + + PJDLOG_ASSERT(*leftp >= sizeof(value)); + memcpy(ptr, &value, sizeof(value)); + ptr += sizeof(value); + *leftp -= sizeof(value); + + return (ptr); +} + +unsigned char * +nvpair_pack_number(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + uint64_t value; + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NUMBER); + + value = (uint64_t)nvp->nvp_data; + + PJDLOG_ASSERT(*leftp >= sizeof(value)); + memcpy(ptr, &value, sizeof(value)); + ptr += sizeof(value); + *leftp -= sizeof(value); + + return (ptr); +} + +unsigned char * +nvpair_pack_string(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_STRING); + + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + memcpy(ptr, (const void *)(intptr_t)nvp->nvp_data, nvp->nvp_datasize); + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + return (ptr); +} + +unsigned char * +nvpair_pack_nvlist_up(unsigned char *ptr, size_t *leftp) +{ + struct nvpair_header nvphdr; + size_t namesize; + const char *name = ""; + + namesize = 1; + nvphdr.nvph_type = NV_TYPE_NVLIST_UP; + nvphdr.nvph_namesize = namesize; + nvphdr.nvph_datasize = 0; + nvphdr.nvph_nitems = 0; + PJDLOG_ASSERT(*leftp >= sizeof(nvphdr)); + memcpy(ptr, &nvphdr, sizeof(nvphdr)); + ptr += sizeof(nvphdr); + *leftp -= sizeof(nvphdr); + + PJDLOG_ASSERT(*leftp >= namesize); + memcpy(ptr, name, namesize); + ptr += namesize; + *leftp -= namesize; + + return (ptr); +} + +unsigned char * +nvpair_pack_nvlist_array_next(unsigned char *ptr, size_t *leftp) +{ + struct nvpair_header nvphdr; + size_t namesize; + const char *name = ""; + + namesize = 1; + nvphdr.nvph_type = NV_TYPE_NVLIST_ARRAY_NEXT; + nvphdr.nvph_namesize = namesize; + nvphdr.nvph_datasize = 0; + nvphdr.nvph_nitems = 0; + PJDLOG_ASSERT(*leftp >= sizeof(nvphdr)); + memcpy(ptr, &nvphdr, sizeof(nvphdr)); + ptr += sizeof(nvphdr); + *leftp -= sizeof(nvphdr); + + PJDLOG_ASSERT(*leftp >= namesize); + memcpy(ptr, name, namesize); + ptr += namesize; + *leftp -= namesize; + + return (ptr); +} + +#ifndef _KERNEL +unsigned char * +nvpair_pack_descriptor(const nvpair_t *nvp, unsigned char *ptr, int64_t *fdidxp, + size_t *leftp) +{ + int64_t value; + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_DESCRIPTOR); + + value = (int64_t)nvp->nvp_data; + if (value != -1) { + /* + * If there is a real descriptor here, we change its number + * to position in the array of descriptors send via control + * message. + */ + PJDLOG_ASSERT(fdidxp != NULL); + + value = *fdidxp; + (*fdidxp)++; + } + + PJDLOG_ASSERT(*leftp >= sizeof(value)); + memcpy(ptr, &value, sizeof(value)); + ptr += sizeof(value); + *leftp -= sizeof(value); + + return (ptr); +} +#endif + +unsigned char * +nvpair_pack_binary(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BINARY); + + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + memcpy(ptr, (const void *)(intptr_t)nvp->nvp_data, nvp->nvp_datasize); + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + return (ptr); +} + +unsigned char * +nvpair_pack_bool_array(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BOOL_ARRAY); + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + + memcpy(ptr, (const void *)(intptr_t)nvp->nvp_data, nvp->nvp_datasize); + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + return (ptr); +} + +unsigned char * +nvpair_pack_number_array(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NUMBER_ARRAY); + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + + memcpy(ptr, (const void *)(intptr_t)nvp->nvp_data, nvp->nvp_datasize); + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + return (ptr); +} + +unsigned char * +nvpair_pack_string_array(const nvpair_t *nvp, unsigned char *ptr, size_t *leftp) +{ + unsigned int ii; + size_t size, len; + const char * const *array; + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_STRING_ARRAY); + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + + size = 0; + array = nvpair_get_string_array(nvp, NULL); + PJDLOG_ASSERT(array != NULL); + + for (ii = 0; ii < nvp->nvp_nitems; ii++) { + len = strlen(array[ii]) + 1; + PJDLOG_ASSERT(*leftp >= len); + + memcpy(ptr, (const void *)array[ii], len); + size += len; + ptr += len; + *leftp -= len; + } + + PJDLOG_ASSERT(size == nvp->nvp_datasize); + + return (ptr); +} + +#ifndef _KERNEL +unsigned char * +nvpair_pack_descriptor_array(const nvpair_t *nvp, unsigned char *ptr, + int64_t *fdidxp, size_t *leftp) +{ + int64_t value; + const int *array; + unsigned int ii; + + NVPAIR_ASSERT(nvp); + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_DESCRIPTOR_ARRAY); + PJDLOG_ASSERT(*leftp >= nvp->nvp_datasize); + + array = nvpair_get_descriptor_array(nvp, NULL); + PJDLOG_ASSERT(array != NULL); + + for (ii = 0; ii < nvp->nvp_nitems; ii++) { + PJDLOG_ASSERT(*leftp >= sizeof(value)); + + value = array[ii]; + if (value != -1) { + /* + * If there is a real descriptor here, we change its + * number to position in the array of descriptors send + * via control message. + */ + PJDLOG_ASSERT(fdidxp != NULL); + + value = *fdidxp; + (*fdidxp)++; + } + memcpy(ptr, &value, sizeof(value)); + ptr += sizeof(value); + *leftp -= sizeof(value); + } + + return (ptr); +} +#endif + +void +nvpair_init_datasize(nvpair_t *nvp) +{ + + NVPAIR_ASSERT(nvp); + + if (nvp->nvp_type == NV_TYPE_NVLIST) { + if (nvp->nvp_data == 0) { + nvp->nvp_datasize = 0; + } else { + nvp->nvp_datasize = + nvlist_size((const nvlist_t *)(intptr_t)nvp->nvp_data); + } + } +} + +const unsigned char * +nvpair_unpack_header(bool isbe, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp) +{ + struct nvpair_header nvphdr; + + if (*leftp < sizeof(nvphdr)) + goto fail; + + memcpy(&nvphdr, ptr, sizeof(nvphdr)); + ptr += sizeof(nvphdr); + *leftp -= sizeof(nvphdr); + +#if NV_TYPE_FIRST > 0 + if (nvphdr.nvph_type < NV_TYPE_FIRST) + goto fail; +#endif + if (nvphdr.nvph_type > NV_TYPE_LAST && + nvphdr.nvph_type != NV_TYPE_NVLIST_UP && + nvphdr.nvph_type != NV_TYPE_NVLIST_ARRAY_NEXT) { + goto fail; + } + +#if BYTE_ORDER == BIG_ENDIAN + if (!isbe) { + nvphdr.nvph_namesize = le16toh(nvphdr.nvph_namesize); + nvphdr.nvph_datasize = le64toh(nvphdr.nvph_datasize); + } +#else + if (isbe) { + nvphdr.nvph_namesize = be16toh(nvphdr.nvph_namesize); + nvphdr.nvph_datasize = be64toh(nvphdr.nvph_datasize); + } +#endif + + if (nvphdr.nvph_namesize > NV_NAME_MAX) + goto fail; + if (*leftp < nvphdr.nvph_namesize) + goto fail; + if (nvphdr.nvph_namesize < 1) + goto fail; + if (strnlen((const char *)ptr, nvphdr.nvph_namesize) != + (size_t)(nvphdr.nvph_namesize - 1)) { + goto fail; + } + + memcpy(nvp->nvp_name, ptr, nvphdr.nvph_namesize); + ptr += nvphdr.nvph_namesize; + *leftp -= nvphdr.nvph_namesize; + + if (*leftp < nvphdr.nvph_datasize) + goto fail; + + nvp->nvp_type = nvphdr.nvph_type; + nvp->nvp_data = 0; + nvp->nvp_datasize = nvphdr.nvph_datasize; + nvp->nvp_nitems = nvphdr.nvph_nitems; + + return (ptr); +fail: + ERRNO_SET(EINVAL); + return (NULL); +} + +const unsigned char * +nvpair_unpack_null(bool isbe __unused, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp __unused) +{ + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NULL); + + if (nvp->nvp_datasize != 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + return (ptr); +} + +const unsigned char * +nvpair_unpack_bool(bool isbe __unused, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp) +{ + uint8_t value; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BOOL); + + if (nvp->nvp_datasize != sizeof(value)) { + ERRNO_SET(EINVAL); + return (NULL); + } + if (*leftp < sizeof(value)) { + ERRNO_SET(EINVAL); + return (NULL); + } + + memcpy(&value, ptr, sizeof(value)); + ptr += sizeof(value); + *leftp -= sizeof(value); + + if (value != 0 && value != 1) { + ERRNO_SET(EINVAL); + return (NULL); + } + + nvp->nvp_data = (uint64_t)value; + + return (ptr); +} + +const unsigned char * +nvpair_unpack_number(bool isbe, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp) +{ + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NUMBER); + + if (nvp->nvp_datasize != sizeof(uint64_t)) { + ERRNO_SET(EINVAL); + return (NULL); + } + if (*leftp < sizeof(uint64_t)) { + ERRNO_SET(EINVAL); + return (NULL); + } + + if (isbe) + nvp->nvp_data = be64dec(ptr); + else + nvp->nvp_data = le64dec(ptr); + + ptr += sizeof(uint64_t); + *leftp -= sizeof(uint64_t); + + return (ptr); +} + +const unsigned char * +nvpair_unpack_string(bool isbe __unused, nvpair_t *nvp, + const unsigned char *ptr, size_t *leftp) +{ + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_STRING); + + if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + if (strnlen((const char *)ptr, nvp->nvp_datasize) != + nvp->nvp_datasize - 1) { + ERRNO_SET(EINVAL); + return (NULL); + } + + nvp->nvp_data = (uint64_t)(uintptr_t)nv_strdup((const char *)ptr); + if (nvp->nvp_data == 0) + return (NULL); + + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + return (ptr); +} + +const unsigned char * +nvpair_unpack_nvlist(bool isbe __unused, nvpair_t *nvp, + const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child) +{ + nvlist_t *value; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NVLIST); + + if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + value = nvlist_create(0); + if (value == NULL) + return (NULL); + + ptr = nvlist_unpack_header(value, ptr, nfds, NULL, leftp); + if (ptr == NULL) + return (NULL); + + nvp->nvp_data = (uint64_t)(uintptr_t)value; + *child = value; + + return (ptr); +} + +#ifndef _KERNEL +const unsigned char * +nvpair_unpack_descriptor(bool isbe, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp, const int *fds, size_t nfds) +{ + int64_t idx; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_DESCRIPTOR); + + if (nvp->nvp_datasize != sizeof(idx)) { + ERRNO_SET(EINVAL); + return (NULL); + } + if (*leftp < sizeof(idx)) { + ERRNO_SET(EINVAL); + return (NULL); + } + + if (isbe) + idx = be64dec(ptr); + else + idx = le64dec(ptr); + + if (idx < 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + if ((size_t)idx >= nfds) { + ERRNO_SET(EINVAL); + return (NULL); + } + + nvp->nvp_data = (uint64_t)fds[idx]; + + ptr += sizeof(idx); + *leftp -= sizeof(idx); + + return (ptr); +} +#endif + +const unsigned char * +nvpair_unpack_binary(bool isbe __unused, nvpair_t *nvp, + const unsigned char *ptr, size_t *leftp) +{ + void *value; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BINARY); + + if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + value = nv_malloc(nvp->nvp_datasize); + if (value == NULL) + return (NULL); + + memcpy(value, ptr, nvp->nvp_datasize); + ptr += nvp->nvp_datasize; + *leftp -= nvp->nvp_datasize; + + nvp->nvp_data = (uint64_t)(uintptr_t)value; + + return (ptr); +} + +const unsigned char * +nvpair_unpack_bool_array(bool isbe __unused, nvpair_t *nvp, + const unsigned char *ptr, size_t *leftp) +{ + uint8_t *value; + size_t size; + unsigned int i; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BOOL_ARRAY); + + size = sizeof(*value) * nvp->nvp_nitems; + if (nvp->nvp_datasize != size || *leftp < size || + nvp->nvp_nitems == 0 || size < nvp->nvp_nitems) { + ERRNO_SET(EINVAL); + return (NULL); + } + + value = nv_malloc(size); + if (value == NULL) + return (NULL); + + for (i = 0; i < nvp->nvp_nitems; i++) { + value[i] = *(const uint8_t *)ptr; + + ptr += sizeof(*value); + *leftp -= sizeof(*value); + } + + nvp->nvp_data = (uint64_t)(uintptr_t)value; + + return (ptr); +} + +const unsigned char * +nvpair_unpack_number_array(bool isbe, nvpair_t *nvp, const unsigned char *ptr, + size_t *leftp) +{ + uint64_t *value; + size_t size; + unsigned int i; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NUMBER_ARRAY); + + size = sizeof(*value) * nvp->nvp_nitems; + if (nvp->nvp_datasize != size || *leftp < size || + nvp->nvp_nitems == 0 || size < nvp->nvp_nitems) { + ERRNO_SET(EINVAL); + return (NULL); + } + + value = nv_malloc(size); + if (value == NULL) + return (NULL); + + for (i = 0; i < nvp->nvp_nitems; i++) { + if (isbe) + value[i] = be64dec(ptr); + else + value[i] = le64dec(ptr); + + ptr += sizeof(*value); + *leftp -= sizeof(*value); + } + + nvp->nvp_data = (uint64_t)(uintptr_t)value; + + return (ptr); +} + +const unsigned char * +nvpair_unpack_string_array(bool isbe __unused, nvpair_t *nvp, + const unsigned char *ptr, size_t *leftp) +{ + ssize_t size; + size_t len; + const char *tmp; + char **value; + unsigned int ii, j; + + PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_STRING_ARRAY); + + if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0 || + nvp->nvp_nitems == 0) { + ERRNO_SET(EINVAL); + return (NULL); + } + + size = nvp->nvp_datasize; + tmp = (const char *)ptr; + for (ii = 0; ii < nvp->nvp_nitems; ii++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jun 27 00:57:48 2020 Return-Path: Delivered-To: svn-src-head@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 9D3333634F1; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@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 49twMw3j3Fz44c2; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@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 7A2C41C8F3; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R0vmaL070915; Sat, 27 Jun 2020 00:57:48 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R0vmgC070914; Sat, 27 Jun 2020 00:57:48 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202006270057.05R0vmgC070914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 27 Jun 2020 00:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Commit-Revision: 362667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 00:57:48 -0000 Author: mmacy Date: Sat Jun 27 00:57:48 2020 New Revision: 362667 URL: https://svnweb.freebsd.org/changeset/base/362667 Log: Fix "current" variable name conflict with openzfs The variable "current" is an alias for curthread in openzfs. Rename all variable uses of current in dtrace.c to curstate. Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jun 27 00:55:03 2020 (r362666) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jun 27 00:57:48 2020 (r362667) @@ -2780,25 +2780,25 @@ static int dtrace_speculation(dtrace_state_t *state) { int i = 0; - dtrace_speculation_state_t current; + dtrace_speculation_state_t curstate; uint32_t *stat = &state->dts_speculations_unavail, count; while (i < state->dts_nspeculations) { dtrace_speculation_t *spec = &state->dts_speculations[i]; - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current != DTRACESPEC_INACTIVE) { - if (current == DTRACESPEC_COMMITTINGMANY || - current == DTRACESPEC_COMMITTING || - current == DTRACESPEC_DISCARDING) + if (curstate != DTRACESPEC_INACTIVE) { + if (curstate == DTRACESPEC_COMMITTINGMANY || + curstate == DTRACESPEC_COMMITTING || + curstate == DTRACESPEC_DISCARDING) stat = &state->dts_speculations_busy; i++; continue; } if (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, DTRACESPEC_ACTIVE) == current) + curstate, DTRACESPEC_ACTIVE) == curstate) return (i + 1); } @@ -2827,7 +2827,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dtrace_speculation_t *spec; dtrace_buffer_t *src, *dest; uintptr_t daddr, saddr, dlimit, slimit; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; intptr_t offs; uint64_t timestamp; @@ -2844,12 +2844,12 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dest = &state->dts_buffer[cpu]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current == DTRACESPEC_COMMITTINGMANY) + if (curstate == DTRACESPEC_COMMITTINGMANY) break; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_DISCARDING: return; @@ -2891,7 +2891,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); /* * We have set the state to indicate that we are committing this @@ -2907,7 +2907,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce /* * We have sufficient space to copy the speculative buffer into the * primary buffer. First, modify the speculative buffer, filling - * in the timestamp of all entries with the current time. The data + * in the timestamp of all entries with the curstate time. The data * must have the commit() time rather than the time it was traced, * so that all entries in the primary buffer are in timestamp order. */ @@ -2970,8 +2970,8 @@ out: * If we're lucky enough to be the only active CPU on this speculation * buffer, we can just set the state back to DTRACESPEC_INACTIVE. */ - if (current == DTRACESPEC_ACTIVE || - (current == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { + if (curstate == DTRACESPEC_ACTIVE || + (curstate == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { uint32_t rval = dtrace_cas32((uint32_t *)&spec->dtsp_state, DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE); @@ -2994,7 +2994,7 @@ dtrace_speculation_discard(dtrace_state_t *state, proc dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -3009,9 +3009,9 @@ dtrace_speculation_discard(dtrace_state_t *state, proc buf = &spec->dtsp_buffer[cpu]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_COMMITTINGMANY: case DTRACESPEC_COMMITTING: @@ -3035,7 +3035,7 @@ dtrace_speculation_discard(dtrace_state_t *state, proc ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); buf->dtb_offset = 0; buf->dtb_drops = 0; @@ -3127,19 +3127,19 @@ dtrace_speculation_clean(dtrace_state_t *state) */ for (i = 0; i < state->dts_nspeculations; i++) { dtrace_speculation_t *spec = &state->dts_speculations[i]; - dtrace_speculation_state_t current, new; + dtrace_speculation_state_t curstate, new; if (!spec->dtsp_cleaning) continue; - current = spec->dtsp_state; - ASSERT(current == DTRACESPEC_DISCARDING || - current == DTRACESPEC_COMMITTINGMANY); + curstate = spec->dtsp_state; + ASSERT(curstate == DTRACESPEC_DISCARDING || + curstate == DTRACESPEC_COMMITTINGMANY); new = DTRACESPEC_INACTIVE; - rv = dtrace_cas32((uint32_t *)&spec->dtsp_state, current, new); - ASSERT(rv == current); + rv = dtrace_cas32((uint32_t *)&spec->dtsp_state, curstate, new); + ASSERT(rv == curstate); spec->dtsp_cleaning = 0; } } @@ -3156,7 +3156,7 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -3171,9 +3171,9 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce buf = &spec->dtsp_buffer[cpuid]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_COMMITTINGMANY: case DTRACESPEC_DISCARDING: @@ -3209,7 +3209,7 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); ASSERT(new == DTRACESPEC_ACTIVEONE || new == DTRACESPEC_ACTIVEMANY); return (buf); @@ -7511,12 +7511,12 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t !state->dts_cred.dcr_destructive || dtrace_destructive_disallow) { void *activity = &state->dts_activity; - dtrace_activity_t current; + dtrace_activity_t curstate; do { - current = state->dts_activity; - } while (dtrace_cas32(activity, current, - DTRACE_ACTIVITY_KILLED) != current); + curstate = state->dts_activity; + } while (dtrace_cas32(activity, curstate, + DTRACE_ACTIVITY_KILLED) != curstate); continue; } @@ -7851,16 +7851,16 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t * thread in COOLDOWN, so there is no race.) */ void *activity = &state->dts_activity; - dtrace_activity_t current = state->dts_activity; + dtrace_activity_t curstate = state->dts_activity; - if (current == DTRACE_ACTIVITY_COOLDOWN) + if (curstate == DTRACE_ACTIVITY_COOLDOWN) break; - if (current != DTRACE_ACTIVITY_WARMUP) - current = DTRACE_ACTIVITY_ACTIVE; + if (curstate != DTRACE_ACTIVITY_WARMUP) + curstate = DTRACE_ACTIVITY_ACTIVE; - if (dtrace_cas32(activity, current, - DTRACE_ACTIVITY_DRAINING) != current) { + if (dtrace_cas32(activity, curstate, + DTRACE_ACTIVITY_DRAINING) != curstate) { *flags |= CPU_DTRACE_DROP; continue; } From owner-svn-src-head@freebsd.org Sat Jun 27 01:02:06 2020 Return-Path: Delivered-To: svn-src-head@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 5335E363685; Sat, 27 Jun 2020 01:02:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49twSt0ksvz458B; Sat, 27 Jun 2020 01:02:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 12F751A637; Sat, 27 Jun 2020 01:02:06 +0000 (UTC) Date: Sat, 27 Jun 2020 01:02:06 +0000 From: Alexey Dokuchaev To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <20200627010206.GA63841@FreeBSD.org> References: <202006270057.05R0vmgC070914@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006270057.05R0vmgC070914@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 01:02:06 -0000 On Sat, Jun 27, 2020 at 12:57:48AM +0000, Matt Macy wrote: > New Revision: 362667 > URL: https://svnweb.freebsd.org/changeset/base/362667 > > Log: > Fix "current" variable name conflict with openzfs > > The variable "current" is an alias for curthread > in openzfs. Rename all variable uses of current > in dtrace.c to curstate. Shouldn't OpenZFS be fixed instead? The fact that we need to fix our local variables suggests that they're abusing too generic name... ./danfe From owner-svn-src-head@freebsd.org Sat Jun 27 02:17:05 2020 Return-Path: Delivered-To: svn-src-head@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 057D73672C0; Sat, 27 Jun 2020 02:17:05 +0000 (UTC) (envelope-from mmacy@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 49ty7N6QP8z49mY; Sat, 27 Jun 2020 02:17:04 +0000 (UTC) (envelope-from mmacy@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 D7B2C1DD0F; Sat, 27 Jun 2020 02:17:04 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R2H4HU019591; Sat, 27 Jun 2020 02:17:04 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R2H4KQ019590; Sat, 27 Jun 2020 02:17:04 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202006270217.05R2H4KQ019590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 27 Jun 2020 02:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362669 - head/lib/libnv X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libnv X-SVN-Commit-Revision: 362669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 02:17:05 -0000 Author: mmacy Date: Sat Jun 27 02:17:04 2020 New Revision: 362669 URL: https://svnweb.freebsd.org/changeset/base/362669 Log: Fix libnv build post rename Submitted by: Neel Chauhan Differential Revision: https://reviews.freebsd.org/D25481 Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Sat Jun 27 01:08:27 2020 (r362668) +++ head/lib/libnv/Makefile Sat Jun 27 02:17:04 2020 (r362669) @@ -15,7 +15,7 @@ SRCS= cnvlist.c SRCS+= dnvlist.c SRCS+= msgio.c SRCS+= nvlist.c -SRCS+= nvpair.c +SRCS+= bsd_nvpair.c HAS_TESTS= SUBDIR.${MK_TESTS}+= tests From owner-svn-src-head@freebsd.org Sat Jun 27 02:31:40 2020 Return-Path: Delivered-To: svn-src-head@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 81C2836783A; Sat, 27 Jun 2020 02:31: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.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 49tySD2r9hz4BR8; Sat, 27 Jun 2020 02:31: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 5CB2A1DFAC; Sat, 27 Jun 2020 02:31: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 05R2VexP029705; Sat, 27 Jun 2020 02:31:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R2VevB029704; Sat, 27 Jun 2020 02:31:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006270231.05R2VevB029704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 Jun 2020 02:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362670 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 362670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 02:31:40 -0000 Author: kib Date: Sat Jun 27 02:31:39 2020 New Revision: 362670 URL: https://svnweb.freebsd.org/changeset/base/362670 Log: vm_page_free_prep(): correct description of the required page and object state. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25482 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Jun 27 02:17:04 2020 (r362669) +++ head/sys/vm/vm_page.c Sat Jun 27 02:31:39 2020 (r362670) @@ -3666,8 +3666,9 @@ vm_page_enqueue(vm_page_t m, uint8_t queue) * disassociating it from any VM object. The caller may return * the page to the free list only if this function returns true. * - * The object must be locked. The page must be locked if it is - * managed. + * The object, if it exists, must be locked, and then the page must + * be xbusy. Otherwise the page must be not busied. A managed + * page must be unmapped. */ static bool vm_page_free_prep(vm_page_t m) From owner-svn-src-head@freebsd.org Sat Jun 27 02:59:52 2020 Return-Path: Delivered-To: svn-src-head@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 559B8367F70; Sat, 27 Jun 2020 02:59:52 +0000 (UTC) (envelope-from adrian@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 49tz4m1Zn0z4Cc7; Sat, 27 Jun 2020 02:59:52 +0000 (UTC) (envelope-from adrian@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 1860B1E2B6; Sat, 27 Jun 2020 02:59:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R2xprB043998; Sat, 27 Jun 2020 02:59:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R2xpoq043997; Sat, 27 Jun 2020 02:59:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202006270259.05R2xpoq043997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 27 Jun 2020 02:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362671 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-SVN-Commit-Revision: 362671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 02:59:52 -0000 Author: adrian Date: Sat Jun 27 02:59:51 2020 New Revision: 362671 URL: https://svnweb.freebsd.org/changeset/base/362671 Log: [ath_hal] Add KeyMiss for AR5212/AR5416 series chips. This is a flag from the MAC that says the received packet didn't match a keycache slot. This isn't technically a problem as WEP keys don't match keycache slots (they're "global" keys), but it could be useful for tracking down CCMP decryption failures. Right now it's a no-op - it mirrors what the AR9300 HAL does and it just increments a counter. But, hey, maybe one day I'll use it for diagnosing keycache/CCMP decrypt issues. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:31:39 2020 (r362670) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:59:51 2020 (r362671) @@ -265,7 +265,6 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_datalen = ads->ds_rxstatus0 & AR_DataLen; rs->rs_tstamp = MS(ads->ds_rxstatus1, AR_RcvTimestamp); rs->rs_status = 0; - /* XXX what about KeyCacheMiss? */ rs->rs_rssi = MS(ads->ds_rxstatus0, AR_RcvSigStrength); /* discard invalid h/w rssi data */ if (rs->rs_rssi == -128) @@ -274,6 +273,8 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_keyix = MS(ads->ds_rxstatus1, AR_KeyIdx); else rs->rs_keyix = HAL_RXKEYIX_INVALID; + if (ads->ds_rxstatus1 & AR_KeyCacheMiss) + rs->rs_status |= HAL_RXERR_KEYMISS; /* NB: caller expected to do rate table mapping */ rs->rs_rate = MS(ads->ds_rxstatus0, AR_RcvRate); rs->rs_antenna = MS(ads->ds_rxstatus0, AR_RcvAntenna); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:31:39 2020 (r362670) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:59:51 2020 (r362671) @@ -183,8 +183,6 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc * rs->rs_datalen = ads->ds_rxstatus1 & AR_DataLen; rs->rs_tstamp = ads->AR_RcvTimestamp; - /* XXX what about KeyCacheMiss? */ - rs->rs_rssi = MS(ads->ds_rxstatus4, AR_RxRSSICombined); rs->rs_rssi_ctl[0] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt00); rs->rs_rssi_ctl[1] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt01); @@ -276,6 +274,9 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc * else if (ads->ds_rxstatus8 & AR_MichaelErr) rs->rs_status |= HAL_RXERR_MIC; } + + if (ads->ds_rxstatus8 & AR_KeyMiss) + rs->rs_status |= HAL_RXERR_KEYMISS; return HAL_OK; } From owner-svn-src-head@freebsd.org Sat Jun 27 03:04:19 2020 Return-Path: Delivered-To: svn-src-head@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 40AF43406E5; Sat, 27 Jun 2020 03:04:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tz9t5bKpz4DdK; Sat, 27 Jun 2020 03:04:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x52e.google.com with SMTP id e9so5806149pgo.9; Fri, 26 Jun 2020 20:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6mfUE7j5yE35YrMsXeSK3hqZMoMGsV6y/IFxtF7jWZk=; b=lQRI4WzmqtqJ6zBPLjffJdqDt1w8Yvj1e//sMIpWeMT4ha/rUUuPIa1udFxrMnbwBV UfrAPcHz1iM5c2d0x9X4z+KMMMdxkH1e9rAWyLaF06nVHrgkAsYaMq9okTMuUyONV/l7 7hmdy50tRxKU3/5xlrGVxR+fhnURn2wo4QAd9NpNLSEFlwIZ3ymhLP3C+eV11Dn7R9sc 8vXK+C6QJN2pyA8OXir7Z6bFBby6J/uAuRbT0tkKyz5KB5HU+UdaJAzIvwe+UkeUvoRp Yiq6zAUAjEiq2O9npdB2Bveu7HrzKpiLuZwTHjjmnBZrFT/TzFIXEprsmC9w7l2xdofN t91A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6mfUE7j5yE35YrMsXeSK3hqZMoMGsV6y/IFxtF7jWZk=; b=qelG2vG2j9QEJDZxfwBNID8uLIsHy1VSI1EdhniQ+rrJD/rjaGO6lE0J+oZ5wDn2Ma l2VFgMJfvU4GvAlSSf+HeMeimrOX7x4hc9L8p8a1e5T7QpHiLhUb8kDR4fzk7vc8xjzE cOzgSXeYh94fan1vYLmsUucIBxrEv7X4VJkbCprPzjdDuh55jzwrMSmW6tV4SSPx5qYy GC8FzeGtGFZPjabBbkGCA1eEDR3JZDLTgsouABakIPlx1wgJj8Bcycbaxe40i+QHfyxq r6XHsOnX+Cdjoa03Xi2yQGYLAe2jRXpDkiTKrsIw3hZv2LjlULSheVW9scJZffgi2cx2 +0eg== X-Gm-Message-State: AOAM532GHxLLaQaBNm77ifDz987ygzdXm2lRSTtQOwDX7DyjtJ8MGC2d TDl5AUIwuMIFSOur3dcSYsiBEaFFtvs= X-Google-Smtp-Source: ABdhPJxWxtMlHMeReaV3LMcOo9btf8ZbEAXJB8+EKlQTcPJCVWft5NWYJx/0+3zR/yZCicGchReggA== X-Received: by 2002:aa7:924c:: with SMTP id 12mr5250783pfp.225.1593227057146; Fri, 26 Jun 2020 20:04:17 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id g140sm16728889pfb.48.2020.06.26.20.04.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2020 20:04:16 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace From: Enji Cooper In-Reply-To: <20200627010206.GA63841@FreeBSD.org> Date: Fri, 26 Jun 2020 20:04:15 -0700 Cc: Matt Macy , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <94C5CFE0-2F25-44FA-B0B7-D6397D4EAC7A@gmail.com> References: <202006270057.05R0vmgC070914@repo.freebsd.org> <20200627010206.GA63841@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49tz9t5bKpz4DdK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 03:04:19 -0000 > On Jun 26, 2020, at 6:02 PM, Alexey Dokuchaev = wrote: >=20 > On Sat, Jun 27, 2020 at 12:57:48AM +0000, Matt Macy wrote: >> New Revision: 362667 >> URL: https://svnweb.freebsd.org/changeset/base/362667 >>=20 >> Log: >> Fix "current" variable name conflict with openzfs >>=20 >> The variable "current" is an alias for curthread >> in openzfs. Rename all variable uses of current >> in dtrace.c to curstate. >=20 > Shouldn't OpenZFS be fixed instead? The fact that we need to fix our > local variables suggests that they're abusing too generic name=E2=80=A6 I kind of agree with `current` being a bit too genericly named = in both DTrace and OpenZFS :/.. Cheers, -Enji From owner-svn-src-head@freebsd.org Sat Jun 27 03:33:37 2020 Return-Path: Delivered-To: svn-src-head@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 47379340CAE for ; Sat, 27 Jun 2020 03:33:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tzqh1wgmz4FTf for ; Sat, 27 Jun 2020 03:33:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2a.google.com with SMTP id m8so1205316qvk.7 for ; Fri, 26 Jun 2020 20:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OMLbPnVAc8FXumGoS23FVNS1el8pvTiKwacBy1NgcP4=; b=Ip2w5xqj3zkA0lx4YKiZWwwRwKkdjqTrL0PizCyb8wFkhLcCqlTPTCOtg+0cwIVmeW Ww/TQ5F8K5+IwHMWzeSE21RtzxOvUHYGv4K0MUDZBWo2dXpY3Ll8zLoJiSBZfbQWJKk0 tJ2nf60nHLuOO5yNCreBgfryT0uYO4L9jt9kSbGKR+JA0f8nrJ35e0oiGBWPibPqcrvm 0Mh6RG6Ubhsb0RxvvDVelUH/v4FLSGEH462htpKyZyEORi5sz/PMpSCqoW5RNmrARC/T 0C3eaYDKEv6U5GPU+0HtV3C3BoucfJjWNnZzJ2zGX5Jx+5J0ntRLEmXro0VdhVNchDYO 0Q8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OMLbPnVAc8FXumGoS23FVNS1el8pvTiKwacBy1NgcP4=; b=DimTd3ehitKnqrklXhergA7Lq2yUWinp0AEfNCX3aF6t8F4QTj2XxN4D3/Ez5TylPw mZrO73qUL01rATkcmi0N3NrRWFk+XpeKZ1MrDrS1xKWHn8TPdVNtDO/7zW3eF6qsjVtF 8Po1gMBpIaczea/ajFwAPyU+6dnIqU4A/FSBOY7+yRmuy76C+P2mbEXAPT97ULm1KSnd S7Btbjb+3ecJtTxfilUi/lZxmXnLbinnxXEzUGXaSaIqF9mRURQBSeTM6G42C4j24suY h+rsWrBj5ZkB0QOR9k5YBCwyZFZuIlesmPtP+az9GgcOdhcVZZNoV+LCJikGvp0tYfSP ir1g== X-Gm-Message-State: AOAM531cIAJhSDyJ7eSngoe8x1DdGYIXF+1BTXiUaJyfxElxGqeGZITn 1Vket/YpH10Jo0yUg93gVdwpsAf4G/clspOrfAyEqQ== X-Google-Smtp-Source: ABdhPJyJiGgP7xNBpVxd9wQRFbGG+gHqR2Lk1e555Zd4FJErXOCtHHTD5mEDJnkkE4shwMVtbEygQ/x6LRRppCD7EDY= X-Received: by 2002:a0c:e008:: with SMTP id j8mr2674193qvk.87.1593228815179; Fri, 26 Jun 2020 20:33:35 -0700 (PDT) MIME-Version: 1.0 References: <202006270057.05R0vmgC070914@repo.freebsd.org> <20200627010206.GA63841@FreeBSD.org> <94C5CFE0-2F25-44FA-B0B7-D6397D4EAC7A@gmail.com> In-Reply-To: <94C5CFE0-2F25-44FA-B0B7-D6397D4EAC7A@gmail.com> From: Warner Losh Date: Fri, 26 Jun 2020 21:33:23 -0600 Message-ID: Subject: Re: svn commit: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace To: Enji Cooper Cc: Alexey Dokuchaev , Matt Macy , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49tzqh1wgmz4FTf X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Ip2w5xqj; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.832]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.18)[0.178]; NEURAL_HAM_LONG(-0.96)[-0.961]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2a:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 03:33:37 -0000 On Fri, Jun 26, 2020, 9:04 PM Enji Cooper wrote: > > > On Jun 26, 2020, at 6:02 PM, Alexey Dokuchaev wrote= : > > > > On Sat, Jun 27, 2020 at 12:57:48AM +0000, Matt Macy wrote: > >> New Revision: 362667 > >> URL: https://svnweb.freebsd.org/changeset/base/362667 > >> > >> Log: > >> Fix "current" variable name conflict with openzfs > >> > >> The variable "current" is an alias for curthread > >> in openzfs. Rename all variable uses of current > >> in dtrace.c to curstate. > > > > Shouldn't OpenZFS be fixed instead? The fact that we need to fix our > > local variables suggests that they're abusing too generic name=E2=80=A6 > > > I kind of agree with `current` being a bit too genericly named in > both DTrace and OpenZFS :/.. > It's always going to be something. These changes are actually pretty minor and really only affect the part of the tree that uses Open Solaris compatibility layer. These changes are smaller for us than changing all OpenZFS. This really was the right fix. Warner > From owner-svn-src-head@freebsd.org Sat Jun 27 04:22:57 2020 Return-Path: Delivered-To: svn-src-head@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 C7CEE341D7F; Sat, 27 Jun 2020 04:22:57 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49v0wb5dFhz4J8m; Sat, 27 Jun 2020 04:22:55 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x431.google.com with SMTP id k6so11401520wrn.3; Fri, 26 Jun 2020 21:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x5KMLIw8YQBA2CtD74ASNsqKnzJUS63Beajt1CHpxWA=; b=HiTbCJleh5d/PReDpUjMlqZy/aTlQDGyxj3RmObGx2j5vJp71dfQdYlx0iLA63+98n 1v0f00Fa5Bpq6bJwKzALtbwqkQLEywIpcZLM85eFmCKLhiBPsgo1lEBmOO6VM4erTkKQ 0vOGvVKSPOOtY2uCBZJmZ3jPJaayfy8YXC6wuGHPXcjwp85npFtz/uwrNbTl9clovHsm 1DWUPnSaj8jON1OsR5dUzzUgv2Rk2UuD+3BQFCVFHAdrs7Z5ADhoIIG0XSFzaCHvnUgo hJoBw5QS8gIXk0xYE1xyvc81lcD95YtOXHjtPTdsVy7z4sYQEAO9xDOPKL2jr0O2GWf9 pgiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x5KMLIw8YQBA2CtD74ASNsqKnzJUS63Beajt1CHpxWA=; b=TC/8KxY0vvdVs0f/dz5G5l98FFsdEPbwnSJfimrnObLd75/XvkrF5Pq/JncGOp8F0p dk1KbyFGkRMaRPw2h1VfVxIVXK3rM5ntExzeI9xs/BKh8QAP1hfoRwBlc8n3DtKpa8zP fOVDXRv356Bl1a8qp5Lagezo8fIvAc6f6QkJbayayDD3Sl2PnOPAqXZ9sBjsv8CT68d0 i7G5ooXRZoCuxTeHJOHVJkPOLqXDR4xH6+0bsJ0dCJLCMz+Adr6o0NHpB9UEvZzUGb1m DhrThWj/leJX6GAvyF+GpAQ7F0AmTdqL6rSiAced2Z8h0OKkPxtDCWhn3SZJEknE2fNe MxyQ== X-Gm-Message-State: AOAM533ur8uA+1H0ovNTR4OrV8M73MUjdQHlmW+38cRYeo+PncUgG+Pr mm0JvtOEKC4c49EDkN3lGaoMs7Y7qdlTZS57m07pbcSZ X-Google-Smtp-Source: ABdhPJxjivRRJzFKkB1f4mA9YAGPylxaBdTr0bKcA2js6M2ckUoRl3AhHa5tUytG5SgMEtFlMt3vF3T+Rs6fkOUZQ6k= X-Received: by 2002:adf:80e6:: with SMTP id 93mr6634386wrl.17.1593231773591; Fri, 26 Jun 2020 21:22:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:45c9:0:0:0:0:0 with HTTP; Fri, 26 Jun 2020 21:22:52 -0700 (PDT) In-Reply-To: <0101b152-e3a6-61af-3748-04e73b631f51@FreeBSD.org> References: <202006091517.059FHNS9050196@repo.freebsd.org> <0101b152-e3a6-61af-3748-04e73b631f51@FreeBSD.org> From: Mateusz Guzik Date: Sat, 27 Jun 2020 06:22:52 +0200 Message-ID: Subject: Re: svn commit: r361967 - head/sys/kern To: John Baldwin Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49v0wb5dFhz4J8m X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=HiTbCJle; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::431 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-2.87 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.92)[-0.916]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::431:from]; NEURAL_SPAM_SHORT(0.05)[0.048]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 04:22:57 -0000 Does not reproduce for me, dtrace says: # dtrace -n 'fbt::pgadjustjobc:entry { printf("pgrp %p count %d entering %d\n", args[0], args[0]->pg_jobc, arg1); }' ", args[0], args[0]->pg_jobc, arg1); }'dtrace: description 'fbt::pgadjustjobc:entry ' matched 1 probe CPU ID FUNCTION:NAME 0 12082 pgadjustjobc:entry pgrp fffff80083510e00 count 0 entering 1 6 12082 pgadjustjobc:entry pgrp fffff80002b6bc00 count 0 entering 1 0 12082 pgadjustjobc:entry pgrp fffff80083510e00 count 1 entering 0 0 12082 pgadjustjobc:entry pgrp fffff80002b6bc00 count 1 entering 0 I don't have time to dig into this one. If there are no takers, I'll replace these assertions with a comment. On 6/17/20, John Baldwin wrote: > On 6/17/20 9:39 AM, Kyle Evans wrote: >> On Wed, Jun 17, 2020 at 10:21 AM Mateusz Guzik wrote: >>> >>> pho@ reported triggering one of the asserts: >>> https://people.freebsd.org/~pho/stress/log/mjguzik028.txt >>> >>> I did not have the time to properly investigate this yet and this does >>> not reproduce for me. >>> >> >> Ah, this is good to know that he's reproduced it. There's only so many >> places that we touch these. I can't quite envision how, but the only >> scenario this would seem to be possible in is doenterpgrp() -> >> fixjobc(p, p->p_grp, 0) -> adjusts some child with a different process >> group without actually changing it, orphans the group, then we manage >> to finalize killjobc() on a freshly-orphaned process, which hasn't had >> its p_pgrp nullified. >> >> I haven't yet traced it through completely enough to determine if >> there's any way that can even happen. > > I reproduced it three times yesterday in a head VM by exiting GDB while > it was attached to a live process (which kills the process), something > like: > > gdb /bin/ls > start > ^D > > Should be enough to reproduce. > > -- > John Baldwin > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sat Jun 27 07:34:16 2020 Return-Path: Delivered-To: svn-src-head@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 5D707346734; Sat, 27 Jun 2020 07:34:16 +0000 (UTC) (envelope-from lwhsu@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 49v59N1tJpz4Svl; Sat, 27 Jun 2020 07:34:16 +0000 (UTC) (envelope-from lwhsu@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 3BC1F2176B; Sat, 27 Jun 2020 07:34:16 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R7YGSF017232; Sat, 27 Jun 2020 07:34:16 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R7YFZX017230; Sat, 27 Jun 2020 07:34:15 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006270734.05R7YFZX017230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 27 Jun 2020 07:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362672 - in head: share/man/man4 sys/dev/rtwn/usb sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/rtwn/usb sys/dev/usb X-SVN-Commit-Revision: 362672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 07:34:16 -0000 Author: lwhsu Date: Sat Jun 27 07:34:15 2020 New Revision: 362672 URL: https://svnweb.freebsd.org/changeset/base/362672 Log: rtwn: Add a USB ID for Buffalo WI-U2-433DHP PR: 247573 Submitted by: HATANO Tomomi MFC after: 1 week Modified: head/share/man/man4/rtwn_usb.4 head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/share/man/man4/rtwn_usb.4 ============================================================================== --- head/share/man/man4/rtwn_usb.4 Sat Jun 27 02:59:51 2020 (r362671) +++ head/share/man/man4/rtwn_usb.4 Sat Jun 27 07:34:15 2020 (r362672) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd May 12, 2020 +.Dd June 27, 2020 .Dt RTWN_USB 4 .Os .Sh NAME @@ -67,6 +67,7 @@ based USB wireless network adapters, including: .It "ASUS USB-N10 NANO" Ta RTL8188CUS Ta USB 2.0 .It "Asus USB-N13, rev. B1" Ta RTL8192CU Ta USB 2.0 .It "Belkin F7D1102 Surf Wireless Micro" Ta RTL8188CUS Ta USB 2.0 +.It "Buffalo WI-U2-433DHP" Ta RTL8821AU Ta USB 2.0 .It "Buffalo WI-U2-433DM" Ta RTL8821AU Ta USB 2.0 .It "Buffalo WI-U3-866D" Ta RTL8812AU Ta USB 3.0 .It "D-Link DWA-123 rev D1" Ta RTL8188EU Ta USB 2.0 Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Jun 27 02:59:51 2020 (r362671) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Jun 27 07:34:15 2020 (r362672) @@ -159,6 +159,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8821AU_DEV(ELECOM, WDB433SU2M2), RTWN_RTL8821AU_DEV(HAWKING, HD65U), RTWN_RTL8821AU_DEV(MELCO, WIU2433DM), + RTWN_RTL8821AU_DEV(MELCO, WIU2433DHP), RTWN_RTL8821AU_DEV(NETGEAR, A6100), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_1), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_2), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Jun 27 02:59:51 2020 (r362671) +++ head/sys/dev/usb/usbdevs Sat Jun 27 07:34:15 2020 (r362672) @@ -3190,6 +3190,7 @@ product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 product MELCO WIU2433DM 0x0242 WI-U2-433DM product MELCO WIU3866D 0x025d WI-U3-866D +product MELCO WIU2433DHP 0x029b WI-U2-433DHP /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 From owner-svn-src-head@freebsd.org Sat Jun 27 11:03:19 2020 Return-Path: Delivered-To: svn-src-head@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 4826934C2A7; Sat, 27 Jun 2020 11:03:19 +0000 (UTC) (envelope-from 0mp@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 49v9pb1FgKz3SV4; Sat, 27 Jun 2020 11:03:19 +0000 (UTC) (envelope-from 0mp@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 2638924289; Sat, 27 Jun 2020 11:03:19 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RB3JQu049750; Sat, 27 Jun 2020 11:03:19 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RB3Jk0049749; Sat, 27 Jun 2020 11:03:19 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271103.05RB3Jk0049749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 11:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362675 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 11:03:19 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 11:03:18 2020 New Revision: 362675 URL: https://svnweb.freebsd.org/changeset/base/362675 Log: Fix a typo, use Lk for links and use HTTPS where applicable MFC after: 3 days Modified: head/share/man/man4/ixl.4 Modified: head/share/man/man4/ixl.4 ============================================================================== --- head/share/man/man4/ixl.4 Sat Jun 27 10:57:30 2020 (r362674) +++ head/share/man/man4/ixl.4 Sat Jun 27 11:03:18 2020 (r362675) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 17, 2019 +.Dd June 27, 2020 .Dt IXL 4 .Os .Sh NAME @@ -76,7 +76,7 @@ tag insertion/extraction, VLAN checksum offload, VLAN Receive Side Steering (RSS), all for both IPv4 and IPv6. For further hardware information and questions related to hardware requirements, see -.Pa http://support.intel.com/ . +.Lk http://support.intel.com/ . .Pp Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the @@ -94,7 +94,7 @@ For more information on configuring this device, see There are additional tools available from Intel to help configure and update the adapters covered by this driver. These tools can be downloaded directly from Intel at -.Pa downloadcenter.intel.com , +.Lk https://downloadcenter.intel.com , by searching for their names, or by installing certain packages: .Bl -item .It @@ -263,7 +263,7 @@ with the -S option. .Sh SUPPORT For general information and support, go to the Intel support website at: -.Pa http://support.intel.com/ . +.Lk http://support.intel.com/ . .Pp If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to @@ -271,7 +271,7 @@ email all the specific information related to the issu .Sh SEE ALSO .Xr arp 4 , .Xr iavf 4 , -.Xr iflib 4, +.Xr iflib 4 , .Xr netintro 4 , .Xr vlan 4 , .Xr ifconfig 8 , From owner-svn-src-head@freebsd.org Sat Jun 27 11:13:46 2020 Return-Path: Delivered-To: svn-src-head@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 1230234CD22; Sat, 27 Jun 2020 11:13:46 +0000 (UTC) (envelope-from 0mp@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 49vB2d6pRRz3Srg; Sat, 27 Jun 2020 11:13:45 +0000 (UTC) (envelope-from 0mp@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 E4F072404E; Sat, 27 Jun 2020 11:13:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RBDj6g056028; Sat, 27 Jun 2020 11:13:45 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RBDjLe056026; Sat, 27 Jun 2020 11:13:45 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271113.05RBDjLe056026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 11:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362676 - in head: crypto/heimdal/lib/krb5 lib/libcasper/libcasper X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head: crypto/heimdal/lib/krb5 lib/libcasper/libcasper X-SVN-Commit-Revision: 362676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 11:13:46 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 11:13:45 2020 New Revision: 362676 URL: https://svnweb.freebsd.org/changeset/base/362676 Log: Fix trailing-comma-related typos in the tree when the Xr macro is used MFC after: 1 week Modified: head/crypto/heimdal/lib/krb5/krb5.conf.5 head/lib/libcasper/libcasper/libcasper_service.3 Modified: head/crypto/heimdal/lib/krb5/krb5.conf.5 ============================================================================== --- head/crypto/heimdal/lib/krb5/krb5.conf.5 Sat Jun 27 11:03:18 2020 (r362675) +++ head/crypto/heimdal/lib/krb5/krb5.conf.5 Sat Jun 27 11:13:45 2020 (r362676) @@ -257,7 +257,7 @@ Setting this flag to make it store the MIT way, this is default for Heimdal 0.7. .It Li check-rd-req-server If set to "ignore", the framework will ignore any the server input to -.Xr krb5_rd_req 3, +.Xr krb5_rd_req 3 , this is very useful when the GSS-API server input the wrong server name into the gss_accept_sec_context call. .El Modified: head/lib/libcasper/libcasper/libcasper_service.3 ============================================================================== --- head/lib/libcasper/libcasper/libcasper_service.3 Sat Jun 27 11:03:18 2020 (r362675) +++ head/lib/libcasper/libcasper/libcasper_service.3 Sat Jun 27 11:13:45 2020 (r362676) @@ -51,7 +51,7 @@ macro to create a new Casper service. The .Fa name is a string containing the service name, which will be used in the -.Xr cap_service_open 3, +.Xr cap_service_open 3 , function to identify it. .Pp The From owner-svn-src-head@freebsd.org Sat Jun 27 11:19:18 2020 Return-Path: Delivered-To: svn-src-head@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 C8D7734CC31; Sat, 27 Jun 2020 11:19:18 +0000 (UTC) (envelope-from fernape@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 49vB924vcTz3TDn; Sat, 27 Jun 2020 11:19:18 +0000 (UTC) (envelope-from fernape@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 A38992459B; Sat, 27 Jun 2020 11:19:18 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RBJIMO056332; Sat, 27 Jun 2020 11:19:18 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RBJI8Y056331; Sat, 27 Jun 2020 11:19:18 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006271119.05RBJI8Y056331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sat, 27 Jun 2020 11:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362677 - head/usr.bin/rev X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/rev X-SVN-Commit-Revision: 362677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 11:19:18 -0000 Author: fernape (ports committer) Date: Sat Jun 27 11:19:18 2020 New Revision: 362677 URL: https://svnweb.freebsd.org/changeset/base/362677 Log: rev(1): Add EXAMPLES section Very simple example. Approved by: imp, 0mp, manpages(bcr) Differential Revision: https://reviews.freebsd.org/D25468 Modified: head/usr.bin/rev/rev.1 Modified: head/usr.bin/rev/rev.1 ============================================================================== --- head/usr.bin/rev/rev.1 Sat Jun 27 11:13:45 2020 (r362676) +++ head/usr.bin/rev/rev.1 Sat Jun 27 11:19:18 2020 (r362677) @@ -28,7 +28,7 @@ .\" @(#)rev.1 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd June 27, 2020 .Dt REV 1 .Os .Sh NAME @@ -43,3 +43,10 @@ The utility copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read. +.Sh EXAMPLES +Reverse the text from stdin: +.Bd -literal -offset indent +$ echo -e "reverse \et these\entwo lines" | rev +eseht esrever +senil owt +.Ed From owner-svn-src-head@freebsd.org Sat Jun 27 11:28:12 2020 Return-Path: Delivered-To: svn-src-head@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 37C6834CCF1; Sat, 27 Jun 2020 11:28:12 +0000 (UTC) (envelope-from fernape@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 49vBMJ0RQhz3Tq3; Sat, 27 Jun 2020 11:28:12 +0000 (UTC) (envelope-from fernape@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 0A20F247DB; Sat, 27 Jun 2020 11:28:12 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RBSBUr062415; Sat, 27 Jun 2020 11:28:11 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RBSB1U062414; Sat, 27 Jun 2020 11:28:11 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006271128.05RBSB1U062414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sat, 27 Jun 2020 11:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362678 - head/usr.bin/killall X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/killall X-SVN-Commit-Revision: 362678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 11:28:12 -0000 Author: fernape (ports committer) Date: Sat Jun 27 11:28:11 2020 New Revision: 362678 URL: https://svnweb.freebsd.org/changeset/base/362678 Log: killall(1): Clarify -d, -s and -v options -d and -v are not equivalent options. The former is more verbose than the latter and the former does not actually send the signals while the latter does. Let them have their own paragraphs. From the point of view of the output, -v is equivalent to -s, so describe them close to each other. The difference is that former actually sends the signals and the latter doesn't. PR: 247411 Approved by: manpages(0mp) Differential Revision: https://reviews.freebsd.org/D25413 Modified: head/usr.bin/killall/killall.1 Modified: head/usr.bin/killall/killall.1 ============================================================================== --- head/usr.bin/killall/killall.1 Sat Jun 27 11:19:18 2020 (r362677) +++ head/usr.bin/killall/killall.1 Sat Jun 27 11:28:11 2020 (r362678) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 4, 2020 +.Dd June 27, 2020 .Dt KILLALL 1 .Os .Sh NAME @@ -58,13 +58,11 @@ The super-user is allowed to kill any process. .Pp The options are as follows: .Bl -tag -width ".Fl c Ar procname" -.It Fl d | v -Be more verbose about what will be done. -For a single -.Fl d -option, a list of the processes that will be sent the signal will be -printed, or a message indicating that no matching processes have been -found. +.It Fl d +Be more verbose about what will be done, but do not send any signal. +The total number of user processes and the real user ID is shown. +A list of the processes that will be sent the signal will be printed, or a +message indicating that no matching processes have been found. .It Fl e Use the effective user ID instead of the (default) real user ID for matching processes specified with the @@ -86,8 +84,12 @@ of processes found. CAUTION! This is dangerous, a single dot will match any process running under the real UID of the caller. +.It Fl v +Be verbose about what will be done. .It Fl s -Show only what would be done, but do not send any signal. +Same as +.Fl v , +but do not send any signal. .It Fl Ar SIGNAL Send a different signal instead of the default .Dv TERM . @@ -190,9 +192,9 @@ to all processes matching provided pattern (like vim a killall -m 'vim*' .Ed .Sh DIAGNOSTICS -Diagnostic messages will only be printed if requested by +Diagnostic messages will only be printed if the .Fl d -options. +flag is used. .Sh SEE ALSO .Xr kill 1 , .Xr pkill 1 , From owner-svn-src-head@freebsd.org Sat Jun 27 11:56:51 2020 Return-Path: Delivered-To: svn-src-head@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 D575534DA13; Sat, 27 Jun 2020 11:56:51 +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 49vC0M5YrVz3VsP; Sat, 27 Jun 2020 11:56:51 +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 9C06324B2E; Sat, 27 Jun 2020 11:56:51 +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 05RBupSd080675; Sat, 27 Jun 2020 11:56:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RBuoHK080666; Sat, 27 Jun 2020 11:56:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271156.05RBuoHK080666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 11:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362679 - in head: tools/build/mk usr.bin/clang/bugpoint usr.bin/clang/clang usr.bin/clang/llc usr.bin/clang/lldb usr.bin/clang/lli usr.bin/clang/llvm-ar usr.bin/clang/llvm-as usr.bin/c... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: tools/build/mk usr.bin/clang/bugpoint usr.bin/clang/clang usr.bin/clang/llc usr.bin/clang/lldb usr.bin/clang/lli usr.bin/clang/llvm-ar usr.bin/clang/llvm-as usr.bin/clang/llvm-bcanalyzer usr.... X-SVN-Commit-Revision: 362679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 11:56:51 -0000 Author: dim Date: Sat Jun 27 11:56:49 2020 New Revision: 362679 URL: https://svnweb.freebsd.org/changeset/base/362679 Log: Regenerate ReStructuredText based manpages for llvm-project tools: * bugpoint.1 * clang.1 * llc.1 * lldb.1 * lli.1 * llvm-ar.1 * llvm-as.1 * llvm-bcanalyzer.1 * llvm-cov.1 * llvm-diff.1 * llvm-dis.1 * llvm-dwarfdump.1 * llvm-extract.1 * llvm-link.1 * llvm-mca.1 * llvm-nm.1 * llvm-pdbutil.1 * llvm-profdata.1 * llvm-symbolizer.1 * llvm-tblgen.1 * opt.1 Add newly generated manpages for: * llvm-addr2line.1 (this is an alias of llvm-symbolizer) * llvm-cxxfilt.1 * llvm-objcopy.1 * llvm-ranlib.1 (this is an alias of llvm-ar) Note that llvm-objdump.1 is an exception, as upstream has both a plain .1 file, and a .rst variant. These will have to be reconciled upstream first. MFC after: 3 days Added: head/usr.bin/clang/llvm-ar/llvm-ranlib.1 (contents, props changed) head/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 (contents, props changed) head/usr.bin/clang/llvm-objcopy/llvm-objcopy.1 (contents, props changed) head/usr.bin/clang/llvm-symbolizer/llvm-addr2line.1 (contents, props changed) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lldb/lldb.1 head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-cov/llvm-cov.1 head/usr.bin/clang/llvm-cxxfilt/Makefile head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-mca/llvm-mca.1 head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/llvm-objcopy/Makefile head/usr.bin/clang/llvm-objdump/llvm-objdump.1 head/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1 head/usr.bin/clang/llvm-profdata/llvm-profdata.1 head/usr.bin/clang/llvm-symbolizer/Makefile head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 head/usr.bin/clang/llvm-tblgen/llvm-tblgen.1 head/usr.bin/clang/opt/opt.1 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 11:28:11 2020 (r362678) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 11:56:49 2020 (r362679) @@ -1191,6 +1191,7 @@ OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ OLD_FILES+=usr/bin/clang-cpp OLD_FILES+=usr/bin/clang-tblgen +OLD_FILES+=usr/bin/llvm-addr2line OLD_FILES+=usr/bin/llvm-ar OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-objdump Modified: head/usr.bin/clang/bugpoint/bugpoint.1 ============================================================================== --- head/usr.bin/clang/bugpoint/bugpoint.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/bugpoint/bugpoint.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "BUGPOINT" "1" "2018-08-02" "7" "LLVM" +.TH "BUGPOINT" "1" "2020-06-26" "10" "LLVM" .SH NAME bugpoint \- automatic test case reduction tool . @@ -300,10 +300,10 @@ If \fBbugpoint\fP succeeds in finding a problem, it wi if an error occurs, it will exit with a non\-zero value. .SH SEE ALSO .sp -opt|opt +\fBopt(1)\fP .SH AUTHOR -Maintained by The LLVM Team (http://llvm.org/). +Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2018, LLVM Project +2003-2020, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/clang/clang.1 ============================================================================== --- head/usr.bin/clang/clang/clang.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/clang/clang.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "CLANG" "1" "Aug 02, 2018" "7" "Clang" +.TH "CLANG" "1" "2020-06-26" "10" "Clang" .SH NAME clang \- the Clang C, C++, and Objective-C compiler . @@ -89,7 +89,7 @@ an "a.out", ".dylib" or ".so" file. .sp The Clang Static Analyzer is a tool that scans source code to try to find bugs through code analysis. This tool uses many parts of Clang and is built into -the same driver. Please see <\fI\%http://clang\-analyzer.llvm.org\fP> for more details +the same driver. Please see <\fI\%https://clang\-analyzer.llvm.org\fP> for more details on how to use the static analyzer. .SH OPTIONS .SS Stage Selection Options @@ -458,9 +458,22 @@ strings and other optimizations. .UNINDENT .INDENT 0.0 .TP -.B \-flax\-vector\-conversions +.B \-flax\-vector\-conversions, \-flax\-vector\-conversions=, \-fno\-lax\-vector\-conversions Allow loose type checking rules for implicit vector conversions. +Possible values of : +.INDENT 7.0 +.IP \(bu 2 +\fBnone\fP: allow no implicit conversions between vectors +.IP \(bu 2 +\fBinteger\fP: allow implicit bitcasts between integer vectors of the same +overall bit\-width +.IP \(bu 2 +\fBall\fP: allow implicit bitcasts between any vectors of the same +overall bit\-width .UNINDENT +.sp + defaults to \fBinteger\fP if unspecified. +.UNINDENT .INDENT 0.0 .TP .B \-fblocks @@ -499,7 +512,7 @@ Specify the architecture to build for. .INDENT 0.0 .TP .B \-mmacosx\-version\-min= -When building for Mac OS X, specify the minimum version supported by your +When building for macOS, specify the minimum version supported by your application. .UNINDENT .INDENT 0.0 @@ -510,6 +523,18 @@ application. .UNINDENT .INDENT 0.0 .TP +.B \-\-print\-supported\-cpus +Print out a list of supported processors for the given target (specified +through \-\-target= or \-arch ). If no target is +specified, the system default target will be used. +.UNINDENT +.INDENT 0.0 +.TP +.B \-mcpu=?, \-mtune=? +Aliases of \-\-print\-supported\-cpus +.UNINDENT +.INDENT 0.0 +.TP .B \-march= Specify that Clang should generate code for a specific processor family member and later. For example, if you specify \-march=i486, the compiler is @@ -848,7 +873,7 @@ Darwin targets. .UNINDENT .SH BUGS .sp -To report bugs, please visit <\fI\%http://llvm.org/bugs/\fP>. Most bug reports should +To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>. Most bug reports should include preprocessed source files (use the \fI\%\-E\fP option) and the full output of the compiler, along with information to reproduce. .SH SEE ALSO @@ -857,6 +882,6 @@ output of the compiler, along with information to repr .SH AUTHOR Maintained by the Clang / LLVM Team () .SH COPYRIGHT -2007-2018, The Clang Team +2007-2020, The Clang Team .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llc/llc.1 ============================================================================== --- head/usr.bin/clang/llc/llc.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/llc/llc.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLC" "1" "2018-08-02" "7" "LLVM" +.TH "LLC" "1" "2020-06-26" "10" "LLVM" .SH NAME llc \- LLVM static compiler . @@ -41,7 +41,7 @@ for a specified architecture. The assembly language o through a native assembler and linker to generate a native executable. .sp The choice of architecture for the output assembly code is automatically -determined from the input file, unless the \fB\-march\fP option is used to +determined from the input file, unless the \fI\%\-march\fP option is used to override the default. .SH OPTIONS .sp @@ -49,11 +49,11 @@ If \fBfilename\fP is "\fB\-\fP" or omitted, \fBllc\fP Otherwise, it will from \fBfilename\fP\&. Inputs can be in either the LLVM assembly language format (\fB\&.ll\fP) or the LLVM bitcode format (\fB\&.bc\fP). .sp -If the \fB\-o\fP option is omitted, then \fBllc\fP will send its output -to standard output if the input is from standard input. If the \fB\-o\fP +If the \fI\%\-o\fP option is omitted, then \fBllc\fP will send its output +to standard output if the input is from standard input. If the \fI\%\-o\fP option specifies "\fB\-\fP", then the output will also be sent to standard output. .sp -If no \fB\-o\fP option is specified and an input file other than "\fB\-\fP" is +If no \fI\%\-o\fP option is specified and an input file other than "\fB\-\fP" is specified, then \fBllc\fP creates the output filename by taking the input filename, removing any existing \fB\&.bc\fP extension, and adding a \fB\&.s\fP suffix. .sp @@ -66,6 +66,12 @@ Print a summary of command line options. .UNINDENT .INDENT 0.0 .TP +.B \-o +Use \fB\fP as the output filename. See the summary above for more +details. +.UNINDENT +.INDENT 0.0 +.TP .B \-O=uint Generate code at different optimization levels. These correspond to the \fB\-O0\fP, \fB\-O1\fP, \fB\-O2\fP, and \fB\-O3\fP optimization levels used by @@ -130,8 +136,8 @@ llvm\-as < /dev/null | llc \-march=xyz \-mattr=help .UNINDENT .INDENT 0.0 .TP -.B \-\-disable\-fp\-elim -Disable frame pointer elimination optimization. +.B \-\-frame\-pointer +Specify effect of frame pointer elimination optimization (all,non\-leaf,none). .UNINDENT .INDENT 0.0 .TP @@ -174,7 +180,7 @@ error. .B \-\-load= Dynamically load \fBdso_path\fP (a path to a dynamically shared object) that implements an LLVM target. This will permit the target name to be used with -the \fB\-march\fP option so that code can be generated for that target. +the \fI\%\-march\fP option so that code can be generated for that target. .UNINDENT .INDENT 0.0 .TP @@ -191,6 +197,12 @@ sizes (unsigned LEB128). The stack size values only in in the function prologue. Functions with dynamic stack allocations are not included. .UNINDENT +.INDENT 0.0 +.TP +.B \-remarks\-section +Emit the __remarks (MachO) section which contains metadata about remark +diagnostics. +.UNINDENT .SS Tuning/Configuration Options .INDENT 0.0 .TP @@ -265,10 +277,10 @@ If \fBllc\fP succeeds, it will exit with 0. Otherwise occurs, it will exit with a non\-zero value. .SH SEE ALSO .sp -lli +\fBlli(1)\fP .SH AUTHOR -Maintained by The LLVM Team (http://llvm.org/). +Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2018, LLVM Project +2003-2020, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/lldb/lldb.1 ============================================================================== --- head/usr.bin/clang/lldb/lldb.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/lldb/lldb.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLDB" "1" "Jan 27, 2020" "8" "LLDB" +.TH "LLDB" "1" "2020-06-26" "8" "LLDB" .SH NAME lldb \- LLDB Documentation . @@ -61,12 +61,12 @@ Tells the debugger to attach to a process with the giv .INDENT 0.0 .TP .B \-n -Alias for –attach\-name +Alias for \-\-attach\-name .UNINDENT .INDENT 0.0 .TP .B \-p -Alias for –attach\-pid +Alias for \-\-attach\-pid .UNINDENT .INDENT 0.0 .TP @@ -76,7 +76,7 @@ Tells the debugger to wait for a process with the give .INDENT 0.0 .TP .B \-w -Alias for –wait\-for +Alias for \-\-wait\-for .UNINDENT .SH COMMANDS .INDENT 0.0 @@ -87,27 +87,27 @@ Tells the debugger to run the commands from \-s, \-S, .INDENT 0.0 .TP .B \-b -Alias for –batch +Alias for \-\-batch .UNINDENT .INDENT 0.0 .TP .B \-K -Alias for –source\-on\-crash +Alias for \-\-source\-on\-crash .UNINDENT .INDENT 0.0 .TP .B \-k -Alias for –one\-line\-on\-crash +Alias for \-\-one\-line\-on\-crash .UNINDENT .INDENT 0.0 .TP .B \-\-local\-lldbinit -Allow the debugger to parse the .lldbinit files in the current working directory, unless –no\-lldbinit is passed. +Allow the debugger to parse the .lldbinit files in the current working directory, unless \-\-no\-lldbinit is passed. .UNINDENT .INDENT 0.0 .TP .B \-\-no\-lldbinit -Do not automatically parse any ‘.lldbinit’ files. +Do not automatically parse any \(aq.lldbinit\(aq files. .UNINDENT .INDENT 0.0 .TP @@ -127,17 +127,17 @@ Tells the debugger to execute this one\-line lldb comm .INDENT 0.0 .TP .B \-O -Alias for –one\-line\-before\-file +Alias for \-\-one\-line\-before\-file .UNINDENT .INDENT 0.0 .TP .B \-o -Alias for –one\-line +Alias for \-\-one\-line .UNINDENT .INDENT 0.0 .TP .B \-Q -Alias for –source\-quietly +Alias for \-\-source\-quietly .UNINDENT .INDENT 0.0 .TP @@ -162,17 +162,17 @@ Tells the debugger to read in and execute the lldb com .INDENT 0.0 .TP .B \-S -Alias for –source\-before\-file +Alias for \-\-source\-before\-file .UNINDENT .INDENT 0.0 .TP .B \-s -Alias for –source +Alias for \-\-source .UNINDENT .INDENT 0.0 .TP .B \-x -Alias for –no\-lldbinit +Alias for \-\-no\-lldbinit .UNINDENT .SH OPTIONS .INDENT 0.0 @@ -183,7 +183,7 @@ Tells the debugger to use the specified architecture w .INDENT 0.0 .TP .B \-a -Alias for –arch +Alias for \-\-arch .UNINDENT .INDENT 0.0 .TP @@ -203,7 +203,7 @@ Tells the debugger to use the full path to .INDENT 0.0 .TP .B \-c -Alias for –core +Alias for \-\-core .UNINDENT .INDENT 0.0 .TP @@ -213,17 +213,17 @@ Tells the debugger to print out extra information for .INDENT 0.0 .TP .B \-d -Alias for –debug +Alias for \-\-debug .UNINDENT .INDENT 0.0 .TP .B \-\-editor -Tells the debugger to open source files using the host’s “external editor” mechanism. +Tells the debugger to open source files using the host\(aqs "external editor" mechanism. .UNINDENT .INDENT 0.0 .TP .B \-e -Alias for –editor +Alias for \-\-editor .UNINDENT .INDENT 0.0 .TP @@ -233,7 +233,7 @@ Tells the debugger to use the file as the p .INDENT 0.0 .TP .B \-f -Alias for –file +Alias for \-\-file .UNINDENT .INDENT 0.0 .TP @@ -243,7 +243,7 @@ Prints out the usage information for the LLDB debugger .INDENT 0.0 .TP .B \-h -Alias for –help +Alias for \-\-help .UNINDENT .INDENT 0.0 .TP @@ -263,18 +263,18 @@ Prints out the current version number of the LLDB debu .INDENT 0.0 .TP .B \-v -Alias for –version +Alias for \-\-version .UNINDENT .INDENT 0.0 .TP .B \-X -Alias for –no\-use\-color +Alias for \-\-no\-use\-color .UNINDENT .SH REPL .INDENT 0.0 .TP .B \-r= -Alias for –repl= +Alias for \-\-repl= .UNINDENT .INDENT 0.0 .TP @@ -289,13 +289,13 @@ Runs lldb in REPL mode with a stub process with the gi .INDENT 0.0 .TP .B \-R -Alias for –repl\-language +Alias for \-\-repl\-language .UNINDENT .SH SCRIPTING .INDENT 0.0 .TP .B \-l -Alias for –script\-language +Alias for \-\-script\-language .UNINDENT .INDENT 0.0 .TP @@ -305,7 +305,7 @@ Prints out the path to the lldb.py file for this versi .INDENT 0.0 .TP .B \-P -Alias for –python\-path +Alias for \-\-python\-path .UNINDENT .INDENT 0.0 .TP @@ -317,11 +317,11 @@ Tells the debugger to use the specified scripting lang The debugger can be started in several modes. .sp Passing an executable as a positional argument prepares \fBlldb\fP to -debug the given executable. Arguments passed after – are considered arguments +debug the given executable. Arguments passed after \-\- are considered arguments to the debugged executable. .INDENT 0.0 .INDENT 3.5 -lldb –arch x86_64 /path/to/program – –arch arvm7 +lldb \-\-arch x86_64 /path/to/program \-\- \-\-arch arvm7 .UNINDENT .UNINDENT .sp @@ -334,14 +334,14 @@ lldb \-n .UNINDENT .UNINDENT .sp -Passing –repl starts \fBlldb\fP in REPL mode. +Passing \-\-repl starts \fBlldb\fP in REPL mode. .INDENT 0.0 .INDENT 3.5 lldb \-r .UNINDENT .UNINDENT .sp -Passing –core causes \fBlldb\fP to debug the core file. +Passing \-\-core causes \fBlldb\fP to debug the core file. .INDENT 0.0 .INDENT 3.5 lldb \-c /path/to/core @@ -353,7 +353,7 @@ run the specified commands before or after events, lik crashing, in the order provided on the command line. .INDENT 0.0 .INDENT 3.5 -lldb \-O ‘settings set stop\-disassembly\-count 20’ \-o ‘run’ \-o ‘bt’ +lldb \-O \(aqsettings set stop\-disassembly\-count 20\(aq \-o \(aqrun\(aq \-o \(aqbt\(aq lldb \-S /source/before/file \-s /source/after/file lldb \-K /source/before/crash \-k /source/after/crash .UNINDENT @@ -365,12 +365,12 @@ loading the file (via \-o or \-s) will be ignored. .sp In \fBlldb\fP there is a help command which can be used to find descriptions and examples of all \fBlldb\fP commands. To get help on -“breakpoint set” you would type “help breakpoint set”. +"breakpoint set" you would type "help breakpoint set". .sp There is also an apropos command which will search the help text of all commands for a given term ‐‐ this is useful for locating a command by topic. -For instance, “apropos breakpoint” will list any command that has the word -“breakpoint” in its help text. +For instance, "apropos breakpoint" will list any command that has the word +"breakpoint" in its help text. .SH CONFIGURATION FILES .sp \fBlldb\fP reads things like settings, aliases and commands from the Modified: head/usr.bin/clang/lli/lli.1 ============================================================================== --- head/usr.bin/clang/lli/lli.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/lli/lli.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLI" "1" "2018-08-02" "7" "LLVM" +.TH "LLI" "1" "2020-06-26" "10" "LLVM" .SH NAME lli \- directly execute programs from LLVM bitcode . @@ -162,6 +162,7 @@ Choose the code model from: .nf .ft C default: Target default code model +tiny: Tiny code model small: Small code model kernel: Kernel code model medium: Medium code model @@ -289,10 +290,10 @@ If \fBlli\fP fails to load the program, it will exit w Otherwise, it will return the exit code of the program it executes. .SH SEE ALSO .sp -\fBllc\fP +\fBllc(1)\fP .SH AUTHOR -Maintained by The LLVM Team (http://llvm.org/). +Maintained by the LLVM Team (https://llvm.org/). .SH COPYRIGHT -2003-2018, LLVM Project +2003-2020, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-ar/Makefile ============================================================================== --- head/usr.bin/clang/llvm-ar/Makefile Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/llvm-ar/Makefile Sat Jun 27 11:56:49 2020 (r362679) @@ -1,6 +1,7 @@ # $FreeBSD$ PROG_CXX= llvm-ar +MAN= llvm-ar.1 llvm-ranlib.1 SRCDIR= llvm/tools/llvm-ar SRCS+= llvm-ar.cpp Modified: head/usr.bin/clang/llvm-ar/llvm-ar.1 ============================================================================== --- head/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Jun 27 11:28:11 2020 (r362678) +++ head/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Jun 27 11:56:49 2020 (r362679) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-AR" "1" "2018-08-02" "7" "LLVM" +.TH "LLVM-AR" "1" "2020-06-26" "10" "LLVM" .SH NAME llvm-ar \- LLVM archiver . @@ -33,358 +33,388 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-lev .. .SH SYNOPSIS .sp -\fBllvm\-ar\fP [\-]{dmpqrtx}[Rabfikou] [relpos] [count] [files...] +\fBllvm\-ar\fP [\-]{dmpqrstx}[abcDilLNoOPsSTuUvV] [relpos] [count] archive [files...] .SH DESCRIPTION .sp -The \fBllvm\-ar\fP command is similar to the common Unix utility, \fBar\fP\&. It -archives several files together into a single file. The intent for this is -to produce archive libraries by LLVM bitcode that can be linked into an -LLVM program. However, the archive can contain any kind of file. By default, -\fBllvm\-ar\fP generates a symbol table that makes linking faster because -only the symbol table needs to be consulted, not each individual file member -of the archive. +The \fBllvm\-ar\fP command is similar to the common Unix utility, +\fBar\fP\&. It archives several files, such as objects and LLVM bitcode +files into a single archive library that can be linked into a program. However, +the archive can contain any kind of file. By default, \fBllvm\-ar\fP +generates a symbol table that makes linking faster because only the symbol +table needs to be consulted, not each individual file member of the archive. .sp -The \fBllvm\-ar\fP command can be used to \fIread\fP SVR4, GNU and BSD style archive -files. However, right now it can only write in the GNU format. If an -SVR4 or BSD style archive is used with the \fBr\fP (replace) or \fBq\fP (quick -update) operations, the archive will be reconstructed in GNU format. +The \fBllvm\-ar\fP command can be used to \fIread\fP archive files in SVR4, +GNU, BSD and Darwin format, and \fIwrite\fP in the GNU, BSD, and Darwin style +archive files. If an SVR4 format archive is used with the \fI\%r\fP +(replace), \fI\%d\fP (delete), \fI\%m\fP (move) or \fI\%q\fP +(quick update) operations, the archive will be reconstructed in the format +defined by \fI\%\-\-format\fP\&. .sp -Here\(aqs where \fBllvm\-ar\fP departs from previous \fBar\fP implementations: +Here\(aqs where \fBllvm\-ar\fP departs from previous \fBar\fP +implementations: .sp -\fISymbol Table\fP +\fIThe following option is not supported\fP .INDENT 0.0 .INDENT 3.5 -Since \fBllvm\-ar\fP supports bitcode files. The symbol table it creates -is in GNU format and includes both native and bitcode files. +[f] \- truncate inserted filenames .UNINDENT .UNINDENT .sp -\fILong Paths\fP +\fIThe following options are ignored for compatibility\fP .INDENT 0.0 .INDENT 3.5 -Currently \fBllvm\-ar\fP can read GNU and BSD long file names, but only writes -archives with the GNU format. +\-\-plugin= \- load a plugin which adds support for other file formats +.sp +[l] \- ignored in \fBar\fP .UNINDENT .UNINDENT -.SH OPTIONS .sp -The options to \fBllvm\-ar\fP are compatible with other \fBar\fP implementations. -However, there are a few modifiers (\fIR\fP) that are not found in other \fBar\fP -implementations. The options to \fBllvm\-ar\fP specify a single basic operation to -perform on the archive, a variety of modifiers for that operation, the name of -the archive file, and an optional list of file names. These options are used to -determine how \fBllvm\-ar\fP should process the archive file. -.sp -The Operations and Modifiers are explained in the sections below. The minimal -set of options is at least one operator and the name of the archive. Typically -archive files end with a \fB\&.a\fP suffix, but this is not required. Following -the \fIarchive\-name\fP comes a list of \fIfiles\fP that indicate the specific members -of the archive to operate on. If the \fIfiles\fP option is not specified, it -generally means either "none" or "all" members, depending on the operation. -.SS Operations -.sp -d +\fISymbol Table\fP .INDENT 0.0 .INDENT 3.5 -Delete files from the archive. No modifiers are applicable to this operation. -The \fIfiles\fP options specify which members should be removed from the -archive. It is not an error if a specified file does not appear in the archive. -If no \fIfiles\fP are specified, the archive is not modified. +Since \fBllvm\-ar\fP supports bitcode files, the symbol table it creates +includes both native and bitcode symbols. .UNINDENT .UNINDENT .sp -m[abi] +\fIDeterministic Archives\fP .INDENT 0.0 .INDENT 3.5 -Move files from one location in the archive to another. The \fIa\fP, \fIb\fP, and -\fIi\fP modifiers apply to this operation. The \fIfiles\fP will all be moved -to the location given by the modifiers. If no modifiers are used, the files -will be moved to the end of the archive. If no \fIfiles\fP are specified, the -archive is not modified. +By default, \fBllvm\-ar\fP always uses zero for timestamps and UIDs/GIDs +to write archives in a deterministic mode. This is equivalent to the +\fI\%D\fP modifier being enabled by default. If you wish to maintain +compatibility with other \fBar\fP implementations, you can pass the +\fI\%U\fP modifier to write actual timestamps and UIDs/GIDs. .UNINDENT .UNINDENT .sp -p +\fIWindows Paths\fP .INDENT 0.0 .INDENT 3.5 -Print files to the standard output. This operation simply prints the -\fIfiles\fP indicated to the standard output. If no \fIfiles\fP are -specified, the entire archive is printed. Printing bitcode files is -ill\-advised as they might confuse your terminal settings. The \fIp\fP -operation never modifies the archive. +When on Windows \fBllvm\-ar\fP treats the names of archived \fIfiles\fP in the same +case sensitive manner as the operating system. When on a non\-Windows machine +\fBllvm\-ar\fP does not consider character case. .UNINDENT .UNINDENT +.SH OPTIONS .sp -q +\fBllvm\-ar\fP operations are compatible with other \fBar\fP +implementations. However, there are a few modifiers (\fI\%L\fP) that are not +found in other \fBar\fP implementations. The options for +\fBllvm\-ar\fP specify a single basic Operation to perform on the archive, +a variety of Modifiers for that Operation, the name of the archive file, and an +optional list of file names. If the \fIfiles\fP option is not specified, it +generally means either "none" or "all" members, depending on the operation. The +Options, Operations and Modifiers are explained in the sections below. +.sp +The minimal set of options is at least one operator and the name of the +archive. +.SS Operations .INDENT 0.0 -.INDENT 3.5 -Quickly append files to the end of the archive. This operation quickly adds the -\fIfiles\fP to the archive without checking for duplicates that should be -removed first. If no \fIfiles\fP are specified, the archive is not modified. -Because of the way that \fBllvm\-ar\fP constructs the archive file, its dubious -whether the \fIq\fP operation is any faster than the \fIr\fP operation. +.TP +.B d [NT] +Delete files from the \fBarchive\fP\&. The \fI\%N\fP and \fI\%T\fP modifiers +apply to this operation. The \fIfiles\fP options specify which members should be +removed from the archive. It is not an error if a specified file does not +appear in the archive. If no \fIfiles\fP are specified, the archive is not +modified. .UNINDENT +.INDENT 0.0 +.TP +.B m [abi] +Move files from one location in the \fBarchive\fP to another. The \fI\%a\fP, +\fI\%b\fP, and \fI\%i\fP modifiers apply to this operation. The \fIfiles\fP +will all be moved to the location given by the modifiers. If no modifiers are +used, the files will be moved to the end of the archive. If no \fIfiles\fP are +specified, the archive is not modified. .UNINDENT -.sp -r[abu] .INDENT 0.0 -.INDENT 3.5 -Replace or insert file members. The \fIa\fP, \fIb\fP, and \fIu\fP -modifiers apply to this operation. This operation will replace existing -\fIfiles\fP or insert them at the end of the archive if they do not exist. If no -\fIfiles\fP are specified, the archive is not modified. +.TP +.B p [v] +Print \fIfiles\fP to the standard output stream. If no \fIfiles\fP are specified, the +entire \fBarchive\fP is printed. With the \fI\%v\fP modifier, +\fBllvm\-ar\fP also prints out the name of the file being output. Printing +binary files is ill\-advised as they might confuse your terminal settings. The +\fI\%p\fP operation never modifies the archive. .UNINDENT +.INDENT 0.0 +.TP +.B q [LT] +Quickly append files to the end of the \fBarchive\fP without removing +duplicates. If no \fIfiles\fP are specified, the archive is not modified. The +behavior when appending one archive to another depends upon whether the +\fI\%L\fP and \fI\%T\fP modifiers are used: +.INDENT 7.0 +.IP \(bu 2 +Appending a regular archive to a regular archive will append the archive +file. If the \fI\%L\fP modifier is specified the members will be appended +instead. +.IP \(bu 2 +Appending a regular archive to a thin archive requires the \fI\%T\fP +modifier and will append the archive file. The \fI\%L\fP modifier is not +supported. +.IP \(bu 2 +Appending a thin archive to a regular archive will append the archive file. +If the \fI\%L\fP modifier is specified the members will be appended +instead. +.IP \(bu 2 +Appending a thin archive to a thin archive will always quick append its +members. .UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B r [abTu] +Replace existing \fIfiles\fP or insert them at the end of the \fBarchive\fP if +they do not exist. The \fI\%a\fP, \fI\%b\fP, \fI\%T\fP and \fI\%u\fP +modifiers apply to this operation. If no \fIfiles\fP are specified, the archive +is not modified. +.UNINDENT .sp t[v] +.. option:: t [vO] .INDENT 0.0 .INDENT 3.5 Print the table of contents. Without any modifiers, this operation just prints -the names of the members to the standard output. With the \fIv\fP modifier, -\fBllvm\-ar\fP also prints out the file type (B=bitcode, S=symbol -table, blank=regular file), the permission mode, the owner and group, the -size, and the date. If any \fIfiles\fP are specified, the listing is only for -those files. If no \fIfiles\fP are specified, the table of contents for the -whole archive is printed. +the names of the members to the standard output stream. With the \fI\%v\fP +modifier, \fBllvm\-ar\fP also prints out the file type (B=bitcode, +S=symbol table, blank=regular file), the permission mode, the owner and group, +are ignored when extracting \fIfiles\fP and set to placeholder values when adding +size, and the date. With the \fI\%O\fP modifier, display member offsets. If +any \fIfiles\fP are specified, the listing is only for those files. If no \fIfiles\fP +are specified, the table of contents for the whole archive is printed. .UNINDENT .UNINDENT -.sp -x[oP] .INDENT 0.0 -.INDENT 3.5 -Extract archive members back to files. The \fIo\fP modifier applies to this -operation. This operation retrieves the indicated \fIfiles\fP from the archive -and writes them back to the operating system\(aqs file system. If no -\fIfiles\fP are specified, the entire archive is extract. +.TP +.B V +A synonym for the \fI\%\-\-version\fP option. .UNINDENT +.INDENT 0.0 +.TP +.B x [oP] +Extract \fBarchive\fP members back to files. The \fI\%o\fP modifier applies +to this operation. This operation retrieves the indicated \fIfiles\fP from the +archive and writes them back to the operating system\(aqs file system. If no +\fIfiles\fP are specified, the entire archive is extracted. .UNINDENT .SS Modifiers (operation specific) .sp The modifiers below are specific to certain operations. See the Operations -section (above) to determine which modifiers are applicable to which operations. -.sp -[a] +section to determine which modifiers are applicable to which operations. .INDENT 0.0 -.INDENT 3.5 -When inserting or moving member files, this option specifies the destination of -the new files as being after the \fIrelpos\fP member. If \fIrelpos\fP is not found, -the files are placed at the end of the archive. +.TP +.B a +When inserting or moving member files, this option specifies the destination +of the new files as being after the \fIrelpos\fP member. If \fIrelpos\fP is not found, +the files are placed at the end of the \fBarchive\fP\&. \fIrelpos\fP cannot be +consumed without either \fI\%a\fP, \fI\%b\fP or \fI\%i\fP\&. .UNINDENT +.INDENT 0.0 +.TP +.B b +When inserting or moving member files, this option specifies the destination +of the new files as being before the \fIrelpos\fP member. If \fIrelpos\fP is not +found, the files are placed at the end of the \fBarchive\fP\&. \fIrelpos\fP cannot +be consumed without either \fI\%a\fP, \fI\%b\fP or \fI\%i\fP\&. This +modifier is identical to the \fI\%i\fP modifier. .UNINDENT -.sp -[b] .INDENT 0.0 -.INDENT 3.5 -When inserting or moving member files, this option specifies the destination of -the new files as being before the \fIrelpos\fP member. If \fIrelpos\fP is not -found, the files are placed at the end of the archive. This modifier is -identical to the \fIi\fP modifier. +.TP +.B i +A synonym for the \fI\%b\fP option. .UNINDENT +.INDENT 0.0 +.TP +.B L +When quick appending an \fBarchive\fP, instead quick append its members. This +is a feature for \fBllvm\-ar\fP that is not found in gnu\-ar. .UNINDENT -.sp -[i] .INDENT 0.0 -.INDENT 3.5 -A synonym for the \fIb\fP option. +.TP +.B N +When extracting or deleting a member that shares its name with another member, +the \fIcount\fP parameter allows you to supply a positive whole number that +selects the instance of the given name, with "1" indicating the first +instance. If \fI\%N\fP is not specified the first member of that name will +be selected. If \fIcount\fP is not supplied, the operation fails.*count* cannot be .UNINDENT +.INDENT 0.0 +.TP +.B o +When extracting files, use the modification times of any \fIfiles\fP as they +appear in the \fBarchive\fP\&. By default \fIfiles\fP extracted from the archive +use the time of extraction. .UNINDENT -.sp -[o] .INDENT 0.0 -.INDENT 3.5 -When extracting files, this option will cause \fBllvm\-ar\fP to preserve the -original modification times of the files it writes. +.TP +.B O +Display member offsets inside the archive. .UNINDENT +.INDENT 0.0 +.TP +.B T +When creating or modifying an archive, this option specifies that the +\fBarchive\fP will be thin. By default, archives are not created as thin +archives and when modifying a thin archive, it will be converted to a regular +archive. .UNINDENT -.sp -[u] .INDENT 0.0 -.INDENT 3.5 -When replacing existing files in the archive, only replace those files that have -a time stamp than the time stamp of the member in the archive. +.TP +.B v +When printing \fIfiles\fP or the \fBarchive\fP table of contents, this modifier +instructs \fBllvm\-ar\fP to include additional information in the output. .UNINDENT -.UNINDENT .SS Modifiers (generic) .sp The modifiers below may be applied to any operation. -.sp -[c] .INDENT 0.0 -.INDENT 3.5 -For all operations, \fBllvm\-ar\fP will always create the archive if it doesn\(aqt -exist. Normally, \fBllvm\-ar\fP will print a warning message indicating that the -archive is being created. Using this modifier turns off that warning. +.TP +.B c +For the \fI\%r\fP (replace)and \fI\%q\fP (quick update) operations, +\fBllvm\-ar\fP will always create the archive if it doesn\(aqt exist. +Normally, \fBllvm\-ar\fP will print a warning message indicating that the +\fBarchive\fP is being created. Using this modifier turns off +that warning. .UNINDENT +.INDENT 0.0 +.TP +.B D +Use zero for timestamps and UIDs/GIDs. This is set by default. .UNINDENT -.sp -[s] .INDENT 0.0 -.INDENT 3.5 +.TP +.B P +Use full paths when matching member names rather than just the file name. +This can be useful when manipulating an \fBarchive\fP generated by another +archiver, as some allow paths as member names. This is the default behavior +for thin archives. +.UNINDENT +.INDENT 0.0 +.TP +.B s This modifier requests that an archive index (or symbol table) be added to the -archive. This is the default mode of operation. The symbol table will contain -all the externally visible functions and global variables defined by all the -bitcode files in the archive. +\fBarchive\fP, as if using ranlib. The symbol table will contain all the +externally visible functions and global variables defined by all the bitcode +files in the archive. By default \fBllvm\-ar\fP generates symbol tables in +archives. This can also be used as an operation. .UNINDENT +.INDENT 0.0 +.TP +.B S +This modifier is the opposite of the \fI\%s\fP modifier. It instructs +\fBllvm\-ar\fP to not build the symbol table. If both \fI\%s\fP and +\fI\%S\fP are used, the last modifier to occur in the options will prevail. .UNINDENT -.sp -[S] .INDENT 0.0 -.INDENT 3.5 -This modifier is the opposite of the \fIs\fP modifier. It instructs \fBllvm\-ar\fP to -not build the symbol table. If both \fIs\fP and \fIS\fP are used, the last modifier to -occur in the options will prevail. +.TP +.B u +Only update \fBarchive\fP members with \fIfiles\fP that have more recent +timestamps. .UNINDENT +.INDENT 0.0 +.TP +.B U +Use actual timestamps and UIDs/GIDs. .UNINDENT -.sp -[v] +.SS Other .INDENT 0.0 -.INDENT 3.5 -This modifier instructs \fBllvm\-ar\fP to be verbose about what it is doing. Each -editing operation taken against the archive will produce a line of output saying -what is being done. +.TP +.B \-\-format= +This option allows for default, gnu, darwin or bsd \fB\fP to be selected. +When creating an \fBarchive\fP, \fB\fP will default to that of the host +machine. .UNINDENT +.INDENT 0.0 +.TP +.B \-h, \-\-help +Print a summary of command\-line options and their meanings. .UNINDENT -.SH STANDARDS -.sp -The \fBllvm\-ar\fP utility is intended to provide a superset of the IEEE Std 1003.2 -(POSIX.2) functionality for \fBar\fP\&. \fBllvm\-ar\fP can read both SVR4 and BSD4.4 (or -Mac OS X) archives. If the \fBf\fP modifier is given to the \fBx\fP or \fBr\fP operations -then \fBllvm\-ar\fP will write SVR4 compatible archives. Without this modifier, -\fBllvm\-ar\fP will write BSD4.4 compatible archives that have long names -immediately after the header and indicated using the "#1/ddd" notation for the -name in the header. -.SH FILE FORMAT -.sp -The file format for LLVM Archive files is similar to that of BSD 4.4 or Mac OSX -archive files. In fact, except for the symbol table, the \fBar\fP commands on those -operating systems should be able to read LLVM archive files. The details of the -file format follow. -.sp -Each archive begins with the archive magic number which is the eight printable -characters "!n" where n represents the newline character (0x0A). -Following the magic number, the file is composed of even length members that -begin with an archive header and end with a n padding character if necessary -(to make the length even). Each file member is composed of a header (defined -below), an optional newline\-terminated "long file name" and the contents of -the file. -.sp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jun 27 12:00:09 2020 Return-Path: Delivered-To: svn-src-head@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 190F134DE35; Sat, 27 Jun 2020 12:00:09 +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 49vC4870qRz3Vtn; Sat, 27 Jun 2020 12:00:08 +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 E3AEB24E01; Sat, 27 Jun 2020 12:00:08 +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 05RC08Yj080946; Sat, 27 Jun 2020 12:00:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RC08hf080945; Sat, 27 Jun 2020 12:00:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271200.05RC08hf080945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 12:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362680 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 362680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 12:00:09 -0000 Author: dim Date: Sat Jun 27 12:00:08 2020 New Revision: 362680 URL: https://svnweb.freebsd.org/changeset/base/362680 Log: Follow-up to r362679, add more entries to OptionalObsoleteFiles.inc MFC after: 3 days X-MFC-With: r362679 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 11:56:49 2020 (r362679) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 12:00:08 2020 (r362680) @@ -1474,8 +1474,10 @@ OLD_DIRS+=usr/share/doc/llvm OLD_FILES+=usr/share/man/man1/clang.1.gz OLD_FILES+=usr/share/man/man1/clang++.1.gz OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz +OLD_FILES+=usr/share/man/man1/llvm-addr2line.1.gz OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz .endif @@ -1508,11 +1510,13 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz OLD_FILES+=usr/share/man/man1/lli.1.gz OLD_FILES+=usr/share/man/man1/llvm-as.1.gz OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz +OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1 OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz +OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif From owner-svn-src-head@freebsd.org Sat Jun 27 12:02:03 2020 Return-Path: Delivered-To: svn-src-head@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 0244D34E9BF; Sat, 27 Jun 2020 12:02:03 +0000 (UTC) (envelope-from se@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 49vC6L6Scqz3WdL; Sat, 27 Jun 2020 12:02:02 +0000 (UTC) (envelope-from se@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 BDF4924E10; Sat, 27 Jun 2020 12:02:02 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RC22Xn085949; Sat, 27 Jun 2020 12:02:02 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RC22oR085945; Sat, 27 Jun 2020 12:02:02 GMT (envelope-from se@FreeBSD.org) Message-Id: <202006271202.05RC22oR085945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 27 Jun 2020 12:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/bc/src/rand share/mk usr.b... X-SVN-Commit-Revision: 362681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 12:02:03 -0000 Author: se Date: Sat Jun 27 12:02:01 2020 New Revision: 362681 URL: https://svnweb.freebsd.org/changeset/base/362681 Log: Import new 2-clause BSD licenced implementation of the bc and dc commands These implementations of the bc and dc programs offer a number of advantages compared to the current implementations in the FreeBSD base system: - They do not depend on external large number functions (i.e. no dependency on OpenSSL or any other large number library) - They implements all features found in GNU bc/dc (with the exception of the forking of sub-processes, which the author of this version considers as a security issue). - They are significantly faster than the current code in base (more than 2 orders of magnitude in some of my tests, e.g. for 12345^100000). - They should be fully compatible with all features and the behavior of the current implementations in FreeBSD (not formally verified). - They support POSIX message catalogs and come with localized messages in Chinese, Dutch, English, French, German, Japanese, Polish, Portugueze, and Russian. - They offer very detailed man-pages that provide far more information than the current ones. The upstream sources contain a large number of tests, which are not imported with this commit. They could be integrated into our test framework at a latter time. Installation of this version is controlled by the option "MK_GH_BC=yes". This option will be set to yes by default in 13-CURRENT, but will be off by default in 12-STABLE. Approved by: imp Obtained from: https://git.yzena.com/gavin/bc MFC after: 4 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19982 Added: head/contrib/bc/LICENSE.md head/contrib/bc/Makefile.in (contents, props changed) head/contrib/bc/NEWS.md head/contrib/bc/NOTICE.md head/contrib/bc/README.md head/contrib/bc/RELEASE.md head/contrib/bc/gen/bc_help.txt (contents, props changed) head/contrib/bc/gen/dc_help.txt (contents, props changed) head/contrib/bc/gen/lib.bc head/contrib/bc/gen/lib2.bc head/contrib/bc/gen/strgen.sh (contents, props changed) head/contrib/bc/include/args.h (contents, props changed) head/contrib/bc/include/bc.h (contents, props changed) head/contrib/bc/include/dc.h (contents, props changed) head/contrib/bc/include/file.h (contents, props changed) head/contrib/bc/include/history.h (contents, props changed) head/contrib/bc/include/lang.h (contents, props changed) head/contrib/bc/include/lex.h (contents, props changed) head/contrib/bc/include/num.h (contents, props changed) head/contrib/bc/include/opt.h (contents, props changed) head/contrib/bc/include/parse.h (contents, props changed) head/contrib/bc/include/program.h (contents, props changed) head/contrib/bc/include/rand.h (contents, props changed) head/contrib/bc/include/read.h (contents, props changed) head/contrib/bc/include/status.h (contents, props changed) head/contrib/bc/include/vector.h (contents, props changed) head/contrib/bc/include/vm.h (contents, props changed) head/contrib/bc/locales/ head/contrib/bc/locales/de_DE.ISO8859-1.msg head/contrib/bc/locales/de_DE.UTF-8.msg head/contrib/bc/locales/en_US.UTF-8.msg (contents, props changed) head/contrib/bc/locales/en_US.msg head/contrib/bc/locales/es_ES.UTF-8.msg head/contrib/bc/locales/fr_FR.ISO8859-1.msg head/contrib/bc/locales/fr_FR.UTF-8.msg head/contrib/bc/locales/ja_JP.UTF-8.msg (contents, props changed) head/contrib/bc/locales/ja_JP.eucJP.msg (contents, props changed) head/contrib/bc/locales/nl_NL.ISO8859-1.msg head/contrib/bc/locales/nl_NL.UTF-8.msg head/contrib/bc/locales/pl_PL.ISO8859-2.msg head/contrib/bc/locales/pl_PL.UTF-8.msg head/contrib/bc/locales/pt_PT.ISO8859-1.msg head/contrib/bc/locales/pt_PT.UTF-8.msg head/contrib/bc/locales/ru_RU.CP1251.msg (contents, props changed) head/contrib/bc/locales/ru_RU.CP866.msg (contents, props changed) head/contrib/bc/locales/ru_RU.ISO8859-5.msg (contents, props changed) head/contrib/bc/locales/ru_RU.KOI8-R.msg (contents, props changed) head/contrib/bc/locales/ru_RU.UTF-8.msg (contents, props changed) head/contrib/bc/locales/zh_CN.GB18030.msg (contents, props changed) head/contrib/bc/locales/zh_CN.GB2312.msg (contents, props changed) head/contrib/bc/locales/zh_CN.GBK.msg (contents, props changed) head/contrib/bc/locales/zh_CN.UTF-8.msg (contents, props changed) head/contrib/bc/locales/zh_CN.eucCN.msg (contents, props changed) head/contrib/bc/manuals/algorithms.md head/contrib/bc/manuals/bc.1 (contents, props changed) head/contrib/bc/manuals/bc.1.ronn head/contrib/bc/manuals/bc.md (contents, props changed) head/contrib/bc/manuals/benchmarks.md head/contrib/bc/manuals/build.md head/contrib/bc/manuals/dc.1 (contents, props changed) head/contrib/bc/manuals/dc.1.ronn head/contrib/bc/manuals/dc.md (contents, props changed) head/contrib/bc/src/args.c (contents, props changed) head/contrib/bc/src/bc/bc.c (contents, props changed) head/contrib/bc/src/bc/lex.c (contents, props changed) head/contrib/bc/src/bc/parse.c (contents, props changed) head/contrib/bc/src/data.c (contents, props changed) head/contrib/bc/src/dc/dc.c (contents, props changed) head/contrib/bc/src/dc/lex.c (contents, props changed) head/contrib/bc/src/dc/parse.c (contents, props changed) head/contrib/bc/src/file.c (contents, props changed) head/contrib/bc/src/history/history.c (contents, props changed) head/contrib/bc/src/lang.c (contents, props changed) head/contrib/bc/src/lex.c (contents, props changed) head/contrib/bc/src/main.c (contents, props changed) head/contrib/bc/src/num.c (contents, props changed) head/contrib/bc/src/opt.c (contents, props changed) head/contrib/bc/src/parse.c (contents, props changed) head/contrib/bc/src/program.c (contents, props changed) head/contrib/bc/src/rand/ head/contrib/bc/src/rand/rand.c (contents, props changed) head/contrib/bc/src/read.c (contents, props changed) head/contrib/bc/src/vector.c (contents, props changed) head/contrib/bc/src/vm.c (contents, props changed) head/usr.bin/gh-bc/ head/usr.bin/gh-bc/Makefile (contents, props changed) Directory Properties: head/contrib/bc/ (props changed) head/contrib/bc/gen/ (props changed) head/contrib/bc/include/ (props changed) head/contrib/bc/manuals/ (props changed) head/contrib/bc/src/ (props changed) head/contrib/bc/src/bc/ (props changed) head/contrib/bc/src/dc/ (props changed) head/contrib/bc/src/history/ (props changed) Modified: head/share/mk/src.opts.mk head/usr.bin/Makefile Added: head/contrib/bc/LICENSE.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bc/LICENSE.md Sat Jun 27 12:02:01 2020 (r362681) @@ -0,0 +1,59 @@ +# License + +Copyright (c) 2018-2020 Gavin D. Howard + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## History + +The files `src/history.c` and `include/history.h` are under the following +copyrights and license: + +Copyright (c) 2010-2014, Salvatore Sanfilippo
    +Copyright (c) 2010-2013, Pieter Noordhuis
    +Copyright (c) 2018 rain-1
    +Copyright (c) 2018-2020, Gavin D. Howard + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: head/contrib/bc/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bc/Makefile.in Sat Jun 27 12:02:01 2020 (r362681) @@ -0,0 +1,362 @@ +# +# Copyright (c) 2018-2020 Gavin D. Howard and contributors. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# %%WARNING%% +# +.POSIX: + +VERSION = 3.0.2 + +SRC = %%SRC%% +OBJ = %%OBJ%% +GCDA = %%GCDA%% +GCNO = %%GCNO%% + +BC_SRC = %%BC_SRC%% +BC_OBJ = %%BC_OBJ%% +BC_GCDA = %%BC_GCDA%% +BC_GCNO = %%BC_GCNO%% + +DC_SRC = %%DC_SRC%% +DC_OBJ = %%DC_OBJ%% +DC_GCDA = %%DC_GCDA%% +DC_GCNO = %%DC_GCNO%% + +HISTORY_SRC = %%HISTORY_SRC%% +HISTORY_OBJ = %%HISTORY_OBJ%% +HISTORY_GCDA = %%HISTORY_GCDA%% +HISTORY_GCNO = %%HISTORY_GCNO%% + +RAND_SRC = %%RAND_SRC%% +RAND_OBJ = %%RAND_OBJ%% +RAND_GCDA = %%RAND_GCDA%% +RAND_GCNO = %%RAND_GCNO%% + +BC_ENABLED_NAME = BC_ENABLED +BC_ENABLED = %%BC_ENABLED%% +DC_ENABLED_NAME = DC_ENABLED +DC_ENABLED = %%DC_ENABLED%% + +GEN_DIR = gen +GEN = %%GEN%% +GEN_EXEC = $(GEN_DIR)/$(GEN) +GEN_C = $(GEN_DIR)/$(GEN).c + +GEN_EMU = %%GEN_EMU%% + +BC_LIB = $(GEN_DIR)/lib.bc +BC_LIB_C = $(GEN_DIR)/lib.c +BC_LIB_O = %%BC_LIB_O%% +BC_LIB_GCDA = $(GEN_DIR)/lib.gcda +BC_LIB_GCNO = $(GEN_DIR)/lib.gcno + +BC_LIB2 = $(GEN_DIR)/lib2.bc +BC_LIB2_C = $(GEN_DIR)/lib2.c +BC_LIB2_O = %%BC_LIB2_O%% +BC_LIB2_GCDA = $(GEN_DIR)/lib2.gcda +BC_LIB2_GCNO = $(GEN_DIR)/lib2.gcno + +BC_HELP = $(GEN_DIR)/bc_help.txt +BC_HELP_C = $(GEN_DIR)/bc_help.c +BC_HELP_O = %%BC_HELP_O%% +BC_HELP_GCDA = $(GEN_DIR)/bc_help.gcda +BC_HELP_GCNO = $(GEN_DIR)/bc_help.gcno + +DC_HELP = $(GEN_DIR)/dc_help.txt +DC_HELP_C = $(GEN_DIR)/dc_help.c +DC_HELP_O = %%DC_HELP_O%% +DC_HELP_GCDA = $(GEN_DIR)/dc_help.gcda +DC_HELP_GCNO = $(GEN_DIR)/dc_help.gcno + +BIN = bin +LOCALES = locales +EXEC_SUFFIX = %%EXECSUFFIX%% +EXEC_PREFIX = %%EXECPREFIX%% + +BC = bc +DC = dc +BC_EXEC = $(BIN)/$(EXEC_PREFIX)$(BC) +DC_EXEC = $(BIN)/$(EXEC_PREFIX)$(DC) + +MANUALS = manuals +BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1 +BC_MANPAGE = $(MANUALS)/$(BC).1 +BC_RONN = $(BC_MANPAGE).ronn +DC_MANPAGE_NAME = $(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX).1 +DC_MANPAGE = $(MANUALS)/$(DC).1 +DC_RONN = $(DC_MANPAGE).ronn + +MANPAGE_INSTALL_ARGS = -Dm644 + +%%DESTDIR%% +BINDIR = %%BINDIR%% +MAN1DIR = %%MAN1DIR%% +MAIN_EXEC = $(EXEC_PREFIX)$(%%MAIN_EXEC%%)$(EXEC_SUFFIX) +EXEC = $(%%EXEC%%) +NLSPATH = %%NLSPATH%% + +BC_ENABLE_HISTORY = %%HISTORY%% +BC_ENABLE_EXTRA_MATH_NAME = BC_ENABLE_EXTRA_MATH +BC_ENABLE_EXTRA_MATH = %%EXTRA_MATH%% +BC_ENABLE_NLS = %%NLS%% +BC_ENABLE_PROMPT = %%PROMPT%% +BC_LONG_BIT = %%LONG_BIT%% + +RM = rm +MKDIR = mkdir + +INSTALL = ./install.sh +SAFE_INSTALL = ./safe-install.sh +LINK = ./link.sh +MANPAGE = ./manpage.sh +KARATSUBA = ./karatsuba.py +LOCALE_INSTALL = ./locale_install.sh +LOCALE_UNINSTALL = ./locale_uninstall.sh + +VALGRIND_ARGS = --error-exitcode=100 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all + +BC_NUM_KARATSUBA_LEN = %%KARATSUBA_LEN%% + +CPPFLAGS1 = -D$(BC_ENABLED_NAME)=$(BC_ENABLED) -D$(DC_ENABLED_NAME)=$(DC_ENABLED) +CPPFLAGS2 = $(CPPFLAGS1) -I./include/ -DVERSION=$(VERSION) %%LONG_BIT_DEFINE%% +CPPFLAGS3 = $(CPPFLAGS2) -DEXECPREFIX=$(EXEC_PREFIX) -DMAINEXEC=$(MAIN_EXEC) +CPPFLAGS4 = $(CPPFLAGS3) -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 +CPPFLAGS5 = $(CPPFLAGS4) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN) +CPPFLAGS6 = $(CPPFLAGS5) -DBC_ENABLE_NLS=$(BC_ENABLE_NLS) -DBC_ENABLE_PROMPT=$(BC_ENABLE_PROMPT) +CPPFLAGS7 = $(CPPFLAGS6) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH) +CPPFLAGS = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) +CFLAGS = $(CPPFLAGS) %%CPPFLAGS%% %%CFLAGS%% +LDFLAGS = %%LDFLAGS%% + +HOSTCFLAGS = %%HOSTCFLAGS%% + +CC = %%CC%% +HOSTCC = %%HOSTCC%% + +BC_LIB_C_ARGS = bc_lib bc.h bc_lib_name $(BC_ENABLED_NAME) 1 +BC_LIB2_C_ARGS = bc_lib2 bc.h bc_lib2_name "$(BC_ENABLED_NAME) && $(BC_ENABLE_EXTRA_MATH_NAME)" 1 + +OBJS1 = $(OBJ) $(DC_OBJ) $(BC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(BC_HELP_O) $(DC_HELP_O) +OBJS = $(OBJS1) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) +OBJ_TARGETS1 = $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) +OBJ_TARGETS = $(OBJ_TARGETS1) $(BC_OBJ) $(DC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(OBJ) + +.c.o: + $(CC) $(CFLAGS) -o $@ -c $< + +all: make_bin $(OBJ_TARGETS) + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) + %%LINK%% + +$(GEN_EXEC): + %%GEN_EXEC_TARGET%% + +$(BC_LIB_C): $(GEN_EXEC) $(BC_LIB) + $(GEN_EMU) $(GEN_EXEC) $(BC_LIB) $(BC_LIB_C) $(BC_LIB_C_ARGS) + +$(BC_LIB2_C): $(GEN_EXEC) $(BC_LIB2) + $(GEN_EMU) $(GEN_EXEC) $(BC_LIB2) $(BC_LIB2_C) $(BC_LIB2_C_ARGS) + +$(BC_HELP_C): $(GEN_EXEC) $(BC_HELP) + $(GEN_EMU) $(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help bc.h "" $(BC_ENABLED_NAME) + +$(DC_HELP_C): $(GEN_EXEC) $(DC_HELP) + $(GEN_EMU) $(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help dc.h "" $(DC_ENABLED_NAME) + +make_bin: + $(MKDIR) -p $(BIN) + +help: + @printf 'available targets:\n' + @printf '\n' + @printf ' all (default) builds %%EXECUTABLES%%\n' + @printf ' check alias for `make test`\n' + @printf ' clean removes all build files\n' + @printf ' clean_config removes all build files as well as the generated Makefile\n' + @printf ' clean_tests removes all build files, the generated Makefile,\n' + @printf ' and generated tests\n' + @printf ' install installs binaries to "%s%s"\n' "$(DESTDIR)" "$(BINDIR)" + @printf ' and (if enabled) manpages to "%s%s"\n' "$(DESTDIR)" "$(MAN1DIR)" + @printf ' karatsuba runs the karatsuba script (requires Python 3)\n' + @printf ' karatsuba_test runs the karatsuba script while running tests\n' + @printf ' (requires Python 3)\n' + @printf ' uninstall uninstalls binaries from "%s%s"\n' "$(DESTDIR)" "$(BINDIR)" + @printf ' and (if enabled) manpages from "%s%s"\n' "$(DESTDIR)" "$(MAN1DIR)" + @printf ' test runs the test suite\n' + @printf ' test_bc runs the bc test suite, if bc has been built\n' + @printf ' test_dc runs the dc test suite, if dc has been built\n' + @printf ' time_test runs the test suite, displaying times for some things\n' + @printf ' time_test_bc runs the bc test suite, displaying times for some things\n' + @printf ' time_test_dc runs the dc test suite, displaying times for some things\n' + @printf ' timeconst runs the test on the Linux timeconst.bc script,\n' + @printf ' if it exists and bc has been built\n' + @printf ' valgrind runs the test suite through valgrind\n' + @printf ' valgrind_bc runs the bc test suite, if bc has been built,\n' + @printf ' through valgrind\n' + @printf ' valgrind_dc runs the dc test suite, if dc has been built,\n' + @printf ' through valgrind\n' + +check: test + +test: test_bc timeconst test_dc + +test_bc: + %%BC_TEST%% + +test_dc: + %%DC_TEST%% + +time_test: time_test_bc timeconst time_test_dc + +time_test_bc: + %%BC_TIME_TEST%% + +time_test_dc: + %%DC_TIME_TEST%% + +timeconst: + %%TIMECONST%% + +valgrind: valgrind_bc valgrind_dc + +valgrind_bc: + %%VG_BC_TEST%% + +valgrind_dc: + %%VG_DC_TEST%% + +karatsuba: + %%KARATSUBA%% + +karatsuba_test: + %%KARATSUBA_TEST%% + +coverage_output: + %%COVERAGE_OUTPUT%% + +coverage:%%COVERAGE_PREREQS%% + +version: + @printf '%s' "$(VERSION)" + +libcname: + @printf '%s' "$(BC_LIB_C)" + +extra_math: + @printf '%s' "$(BC_ENABLE_EXTRA_MATH)" + +manpages: + $(MANPAGE) $(BC_RONN) $(BC_MANPAGE) + $(MANPAGE) $(DC_RONN) $(DC_MANPAGE) + +clean_gen: + @$(RM) -f $(GEN_EXEC) + +clean:%%CLEAN_PREREQS%% + @printf 'Cleaning files...\n' + @$(RM) -f $(OBJ) + @$(RM) -f $(BC_OBJ) + @$(RM) -f $(DC_OBJ) + @$(RM) -f $(HISTORY_OBJ) + @$(RM) -f $(RAND_OBJ) + @$(RM) -f $(BC_EXEC) + @$(RM) -f $(DC_EXEC) + @$(RM) -fr $(BIN) + @$(RM) -f $(LOCALES)/*.cat + @$(RM) -f $(BC_LIB_C) $(BC_LIB_O) + @$(RM) -f $(BC_LIB2_C) $(BC_LIB2_O) + @$(RM) -f $(BC_HELP_C) $(BC_HELP_O) + @$(RM) -f $(DC_HELP_C) $(DC_HELP_O) + +clean_config: clean + @printf 'Cleaning config...\n' + @$(RM) -f Makefile + +clean_coverage: + @printf 'Cleaning coverage files...\n' + @$(RM) -f *.gcov + @$(RM) -f *.html + @$(RM) -f *.gcda *.gcno + @$(RM) -f *.profraw + @$(RM) -f $(GCDA) $(GCNO) + @$(RM) -f $(BC_GCDA) $(BC_GCNO) + @$(RM) -f $(DC_GCDA) $(DC_GCNO) + @$(RM) -f $(HISTORY_GCDA) $(HISTORY_GCNO) + @$(RM) -f $(RAND_GCDA) $(RAND_GCNO) + @$(RM) -f $(BC_LIB_GCDA) $(BC_LIB_GCNO) + @$(RM) -f $(BC_LIB2_GCDA) $(BC_LIB2_GCNO) + @$(RM) -f $(BC_HELP_GCDA) $(BC_HELP_GCNO) + @$(RM) -f $(DC_HELP_GCDA) $(DC_HELP_GCNO) + +clean_tests: clean clean_config clean_coverage + @printf 'Cleaning test files...\n' + @$(RM) -f tests/bc/parse.txt tests/bc/parse_results.txt + @$(RM) -f tests/bc/print.txt tests/bc/print_results.txt + @$(RM) -f tests/bc/bessel.txt tests/bc/bessel_results.txt + @$(RM) -f tests/bc/scripts/bessel.txt + @$(RM) -f tests/bc/scripts/parse.txt + @$(RM) -f tests/bc/scripts/print.txt + @$(RM) -f tests/bc/scripts/add.txt + @$(RM) -f tests/bc/scripts/divide.txt + @$(RM) -f tests/bc/scripts/multiply.txt + @$(RM) -f tests/bc/scripts/subtract.txt + @$(RM) -f tests/dc/scripts/prime.txt tests/dc/scripts/stream.txt + @$(RM) -f .log_*.txt + @$(RM) -f .math.txt .results.txt .ops.txt + @$(RM) -f .test.txt + @$(RM) -f tags .gdbbreakpoints .gdb_history .gdbsetup + @$(RM) -f cscope.* + @$(RM) -f bc.old + +install_locales: + $(LOCALE_INSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + +install_bc_manpage: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) + +install_dc_manpage: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(DC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(DC_MANPAGE_NAME) + +install:%%INSTALL_LOCALES_PREREQS%%%%INSTALL_PREREQS%% + $(INSTALL) $(DESTDIR)$(BINDIR) "$(EXEC_SUFFIX)" + +uninstall_locales: + $(LOCALE_UNINSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + +uninstall_bc_manpage: + $(RM) -f $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) + +uninstall_bc: + $(RM) -f $(DESTDIR)$(BINDIR)/$(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX) + +uninstall_dc_manpage: + $(RM) -f $(DESTDIR)$(MAN1DIR)/$(DC_MANPAGE_NAME) + +uninstall_dc: + $(RM) -f $(DESTDIR)$(BINDIR)/$(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX) + +uninstall:%%UNINSTALL_LOCALES_PREREQS%%%%UNINSTALL_MAN_PREREQS%%%%UNINSTALL_PREREQS%% Added: head/contrib/bc/NEWS.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bc/NEWS.md Sat Jun 27 12:02:01 2020 (r362681) @@ -0,0 +1,824 @@ +# News + +## 3.0.2 + +This is a production release that adds `utf8` locale symlinks and removes an +unused `auto` variable from the `ceil()` function in the [extended math +library][16]. + +Users do ***NOT*** need to update unless they want the locales. + +## 3.0.1 + +This is a production release with two small changes. Users do ***NOT*** need to +upgrade to this release; however, if they haven't upgraded to `3.0.0` yet, it +may be worthwhile to upgrade to this release. + +The first change is fixing a compiler warning on FreeBSD with strict warnings +on. + +The second change is to make the new implementation of `ceil()` in `lib2.bc` +much more efficient. + +## 3.0.0 + +*Notes for package maintainers:* + +*First, the `2.7.0` release series saw a change in the option parsing. This made +me change one error message and add a few others. The error message that was +changed removed one format specifier. This means that `printf()` will seqfault +on old locale files. Unfortunately, `bc` cannot use any locale files except the +global ones that are already installed, so it will use the previous ones while +running tests during install. **If `bc` segfaults while running arg tests when +updating, it is because the global locale files have not been replaced. Make +sure to either prevent the test suite from running on update or remove the old +locale files before updating.** Once this is done, `bc` should install without +problems.* + +*Second, **the option to build without signal support has been removed**. See +below for the reasons why.* + +This is a production release with some small bug fixes, a few improvements, +three major bug fixes, and a complete redesign of `bc`'s error and signal +handling. **Users and package maintainers should update to this version as soon +as possible.** + +The first major bug fix was in how `bc` executed files. Previously, a whole file +was parsed before it was executed, but if a function is defined *after* code, +especially if the function definition was actually a redefinition, and the code +before the definition referred to the previous function, this `bc` would replace +the function before executing any code. The fix was to make sure that all code +that existed before a function definition was executed. + +The second major bug fix was in `bc`'s `lib2.bc`. The `ceil()` function had a +bug where a `0` in the decimal place after the truncation position, caused it to +output the wrong numbers if there was any non-zero digit after. + +The third major bug is that when passing parameters to functions, if an +expression included an array (not an array element) as a parameter, it was +accepted, when it should have been rejected. It is now correctly rejected. + +Beyond that, this `bc` got several improvements that both sped it up, improved +the handling of signals, and improved the error handling. + +First, the requirements for `bc` were pushed back to POSIX 2008. `bc` uses one +function, `strdup()`, which is not in POSIX 2001, and it is in the X/Open System +Interfaces group 2001. It is, however, in POSIX 2008, and since POSIX 2008 is +old enough to be supported anywhere that I care, that should be the requirement. + +Second, the BcVm global variable was put into `bss`. This actually slightly +reduces the size of the executable from a massive code shrink, and it will stop +`bc` from allocating a large set of memory when `bc` starts. + +Third, the default Karatsuba length was updated from 64 to 32 after making the +optimization changes below, since 32 is going to be better than 64 after the +changes. + +Fourth, Spanish translations were added. + +Fifth, the interpreter received a speedup to make performance on non-math-heavy +scripts more competitive with GNU `bc`. While improvements did, in fact, get it +much closer (see the [benchmarks][19]), it isn't quite there. + +There were several things done to speed up the interpreter: + +First, several small inefficiencies were removed. These inefficiencies included +calling the function `bc_vec_pop(v)` twice instead of calling +`bc_vec_npop(v, 2)`. They also included an extra function call for checking the +size of the stack and checking the size of the stack more than once on several +operations. + +Second, since the current `bc` function is the one that stores constants and +strings, the program caches pointers to the current function's vectors of +constants and strings to prevent needing to grab the current function in order +to grab a constant or a string. + +Third, `bc` tries to reuse `BcNum`'s (the internal representation of +arbitary-precision numbers). If a `BcNum` has the default capacity of +`BC_NUM_DEF_SIZE` (32 on 64-bit and 16 on 32-bit) when it is freed, it is added +to a list of available `BcNum`'s. And then, when a `BcNum` is allocated with a +capacity of `BC_NUM_DEF_SIZE` and any `BcNum`'s exist on the list of reusable +ones, one of those ones is grabbed instead. + +In order to support these changes, the `BC_NUM_DEF_SIZE` was changed. It used to +be 16 bytes on all systems, but it was changed to more closely align with the +minimum allocation size on Linux, which is either 32 bytes (64-bit musl), 24 +bytes (64-bit glibc), 16 bytes (32-bit musl), or 12 bytes (32-bit glibc). Since +these are the minimum allocation sizes, these are the sizes that would be +allocated anyway, making it worth it to just use the whole space, so the value +of `BC_NUM_DEF_SIZE` on 64-bit systems was changed to 32 bytes. + +On top of that, at least on 64-bit, `BC_NUM_DEF_SIZE` supports numbers with +either 72 integer digits or 45 integer digits and 27 fractional digits. This +should be more than enough for most cases since `bc`'s default `scale` values +are 0 or 20, meaning that, by default, it has at most 20 fractional digits. And +45 integer digits are *a lot*; it's enough to calculate the amount of mass in +the Milky Way galaxy in kilograms. Also, 72 digits is enough to calculate the +diameter of the universe in Planck lengths. + +(For 32-bit, these numbers are either 32 integer digits or 12 integer digits and +20 fractional digits. These are also quite big, and going much bigger on a +32-bit system seems a little pointless since 12 digits in just under a trillion +and 20 fractional digits is still enough for about any use since `10^-20` light +years is just under a millimeter.) + +All of this together means that for ordinary uses, and even uses in scientific +work, the default number size will be all that is needed, which means that +nearly all, if not all, numbers will be reused, relieving pressure on the system +allocator. + +I did several experiments to find the changes that had the most impact, +especially with regard to reusing `BcNum`'s. One was putting `BcNum`'s into +buckets according to their capacity in powers of 2 up to 512. That performed +worse than `bc` did in `2.7.2`. Another was putting any `BcNum` on the reuse +list that had a capacity of `BC_NUM_DEF_SIZE * 2` and reusing them for `BcNum`'s +that requested `BC_NUM_DEF_SIZE`. This did reduce the amount of time spent, but +it also spent a lot of time in the system allocator for an unknown reason. (When +using `strace`, a bunch more `brk` calls showed up.) Just reusing `BcNum`'s that +had exactly `BC_NUM_DEF_SIZE` capacity spent the smallest amount of time in both +user and system time. This makes sense, especially with the changes to make +`BC_NUM_DEF_SIZE` bigger on 64-bit systems, since the vast majority of numbers +will only ever use numbers with a size less than or equal to `BC_NUM_DEF_SIZE`. + +Last of all, `bc`'s signal handling underwent a complete redesign. (This is the +reason that this version is `3.0.0` and not `2.8.0`.) The change was to move +from a polling approach to signal handling to an interrupt-based approach. + +Previously, every single loop condition had a check for signals. I suspect that +this could be expensive when in tight loops. + +Now, the signal handler just uses `longjmp()` (actually `siglongjmp()`) to start +an unwinding of the stack until it is stopped or the stack is unwound to +`main()`, which just returns. If `bc` is currently executing code that cannot be +safely interrupted (according to POSIX), then signals are "locked." The signal +handler checks if the lock is taken, and if it is, it just sets the status to +indicate that a signal arrived. Later, when the signal lock is released, the +status is checked to see if a signal came in. If so, the stack unwinding starts. + +This design eliminates polling in favor of maintaining a stack of `jmp_buf`'s. +This has its own performance implications, but it gives better interaction. And +the cost of pushing and popping a `jmp_buf` in a function is paid at most twice. +Most functions do not pay that price, and most of the rest only pay it once. +(There are only some 3 functions in `bc` that push and pop a `jmp_buf` twice.) + +As a side effect of this change, I had to eliminate the use of `stdio.h` in `bc` +because `stdio` does not play nice with signals and `longjmp()`. I implemented +custom I/O buffer code that takes a fraction of the size. This means that static +builds will be smaller, but non-static builds will be bigger, though they will +have less linking time. + +This change is also good because my history implementation was already bypassing +`stdio` for good reasons, and unifying the architecture was a win. + +Another reason for this change is that my `bc` should *always* behave correctly +in the presence of signals like `SIGINT`, `SIGTERM`, and `SIGQUIT`. With the +addition of my own I/O buffering, I needed to also make sure that the buffers +were correctly flushed even when such signals happened. + +For this reason, I **removed the option to build without signal support**. + +As a nice side effect of this change, the error handling code could be changed +to take advantage of the stack unwinding that signals used. This means that +signals and error handling use the same code paths, which means that the stack +unwinding is well-tested. (Errors are tested heavily in the test suite.) + +It also means that functions do not need to return a status code that +***every*** caller needs to check. This eliminated over 100 branches that simply +checked return codes and then passed that return code up the stack if necessary. +The code bloat savings from this is at least 1700 bytes on `x86_64`, *before* +taking into account the extra code from removing `stdio.h`. + +## 2.7.2 + +This is a production release with one major bug fix. + +The `length()` built-in function can take either a number or an array. If it +takes an array, it returns the length of the array. Arrays can be passed by +reference. The bug is that the `length()` function would not properly +dereference arrays that were references. This is a bug that affects all users. + +**ALL USERS SHOULD UPDATE `bc`**. + +## 2.7.1 + +This is a production release with fixes for new locales and fixes for compiler +warnings on FreeBSD. + +## 2.7.0 + +This is a production release with a bug fix for Linux, new translations, and new +features. + +Bug fixes: + +* Option parsing in `BC_ENV_ARGS` was broken on Linux in 2.6.1 because `glibc`'s + `getopt_long()` is broken. To get around that, and to support long options on + every platform, an adapted version of [`optparse`][17] was added. Now, `bc` + does not even use `getopt()`. +* Parsing `BC_ENV_ARGS` with quotes now works. It isn't the smartest, but it + does the job if there are spaces in file names. + +The following new languages are supported: + +* Dutch +* Polish +* Russian +* Japanes +* Simplified Chinese + +All of these translations were generated using [DeepL][18], so improvements are +welcome. + +There is only one new feature: **`bc` now has a built-in pseudo-random number +generator** (PRNG). + +The PRNG is seeded, making it useful for applications where +`/dev/urandom` does not work because output needs to be reproducible. However, +it also uses `/dev/urandom` to seed itself by default, so it will start with a +good seed by default. + +It also outputs 32 bits on 32-bit platforms and 64 bits on 64-bit platforms, far +better than the 15 bits of C's `rand()` and `bash`'s `$RANDOM`. + +In addition, the PRNG can take a bound, and when it gets a bound, it +automatically adjusts to remove bias. It can also generate numbers of arbitrary +size. (As of the time of release, the largest pseudo-random number generated by +this `bc` was generated with a bound of `2^(2^20)`.) + +***IMPORTANT: read the [`bc` manual][9] and the [`dc` manual][10] to find out +exactly what guarantees the PRNG provides. The underlying implementation is not +guaranteed to stay the same, but the guarantees that it provides are guaranteed +to stay the same regardless of the implementation.*** + +On top of that, four functions were added to `bc`'s [extended math library][16] +to make using the PRNG easier: + +* `frand(p)`: Generates a number between `[0,1)` to `p` decimal places. +* `ifrand(i, p)`: Generates an integer with bound `i` and adds it to `frand(p)`. +* `srand(x)`: Randomizes the sign of `x`. In other words, it flips the sign of + `x` with probability `0.5`. +* `brand()`: Returns a random boolean value (either `0` or `1`). + +## 2.6.1 + +This is a production release with a bug fix for FreeBSD. + +The bug was that when `bc` was built without long options, it would give a fatal +error on every run. This was caused by a mishandling of `optind`. + +## 2.6.0 + +This release is a production release ***with no bugfixes***. If you do not want +to upgrade, you don't have to. + +No source code changed; the only thing that changed was `lib2.bc`. + +This release adds one function to the [extended math library][16]: `p(x, y)`, +which calculates `x` to the power of `y`, whether or not `y` is an integer. (The +`^` operator can only accept integer powers.) + +This release also includes a couple of small tweaks to the [extended math +library][16], mostly to fix returning numbers with too high of `scale`. + +## 2.5.3 + +This release is a production release which addresses inconsistencies in the +Portuguese locales. No `bc` code was changed. + +The issues were that the ISO files used different naming, and also that the +files that should have been symlinks were not. I did not catch that because +GitHub rendered them the exact same way. + +## 2.5.2 + +This release is a production release. + +No code was changed, but the build system was changed to allow `CFLAGS` to be +given to `CC`, like this: + +``` +CC="gcc -O3 -march=native" ./configure.sh +``` + +If this happens, the flags are automatically put into `CFLAGS`, and the compiler +is set appropriately. In the example above this means that `CC` will be "gcc" +and `CFLAGS` will be "-O3 -march=native". + +This behavior was added to conform to GNU autotools practices. + +## 2.5.1 + +This is a production release which addresses portability concerns discovered +in the `bc` build system. No `bc` code was changed. + +* Support for Solaris SPARC and AIX were added. +* Minor documentations edits were performed. +* An option for `configure.sh` was added to disable long options if + `getopt_long()` is missing. + +## 2.5.0 + +This is a production release with new translations. No code changed. + +The translations were contributed by [bugcrazy][15], and they are for +Portuguese, both Portugal and Brazil locales. + +## 2.4.0 + +This is a production release primarily aimed at improving `dc`. + +* A couple of copy and paste errors in the [`dc` manual][10] were fixed. +* `dc` startup was optimized by making sure it didn't have to set up `bc`-only + things. +* The `bc` `&&` and `||` operators were made available to `dc` through the `M` + and `m` commands, respectively. +* `dc` macros were changed to be tail call-optimized. + +The last item, tail call optimization, means that if the last thing in a macro +is a call to another macro, then the old macro is popped before executing the +new macro. This change was made to stop `dc` from consuming more and more memory +as macros are executed in a loop. + +The `q` and `Q` commands still respect the "hidden" macros by way of recording +how many macros were removed by tail call optimization. + +## 2.3.2 + +This is a production release meant to fix warnings in the Gentoo `ebuild` by +making it possible to disable binary stripping. Other users do *not* need to +upgrade. + +## 2.3.1 + +This is a production release. It fixes a bug that caused `-1000000000 < -1` to +return `0`. This only happened with negative numbers and only if the value on +the left was more negative by a certain amount. That said, this bug *is* a bad +bug, and needs to be fixed. + +**ALL USERS SHOULD UPDATE `bc`**. + +## 2.3.0 + +This is a production release with changes to the build system. + +## 2.2.0 + +This release is a production release. It only has new features and performance +improvements. + +1. The performance of `sqrt(x)` was improved. +2. The new function `root(x, n)` was added to the extended math library to + calculate `n`th roots. +3. The new function `cbrt(x)` was added to the extended math library to + calculate cube roots. + +## 2.1.3 + +This is a non-critical release; it just changes the build system, and in +non-breaking ways: + +1. Linked locale files were changed to link to their sources with a relative + link. +2. A bug in `configure.sh` that caused long option parsing to fail under `bash` + was fixed. + +## 2.1.2 + +This release is not a critical release. + +1. A few codes were added to history. +2. Multiplication was optimized a bit more. +3. Addition and subtraction were both optimized a bit more. + +## 2.1.1 + +This release contains a fix for the test suite made for Linux from Scratch: now +the test suite prints `pass` when a test is passed. + +Other than that, there is no change in this release, so distros and other users +do not need to upgrade. + +## 2.1.0 + +This release is a production release. + +The following bugs were fixed: + +1. A `dc` bug that caused stack mishandling was fixed. +2. A warning on OpenBSD was fixed. +3. Bugs in `ctrl+arrow` operations in history were fixed. +4. The ability to paste multiple lines in history was added. +5. A `bc` bug, mishandling of array arguments to functions, was fixed. +6. A crash caused by freeing the wrong pointer was fixed. +7. A `dc` bug where strings, in a rare case, were mishandled in parsing was + fixed. + +In addition, the following changes were made: + +1. Division was slightly optimized. +2. An option was added to the build to disable printing of prompts. +3. The special case of empty arguments is now handled. This is to prevent + errors in scripts that end up passing empty arguments. +4. A harmless bug was fixed. This bug was that, with the pop instructions + (mostly) removed (see below), `bc` would leave extra values on its stack for + `void` functions and in a few other cases. These extra items would not + affect anything put on the stack and would not cause any sort of crash or + even buggy behavior, but they would cause `bc` to take more memory than it + needed. + +On top of the above changes, the following optimizations were added: + +1. The need for pop instructions in `bc` was removed. +2. Extra tests on every iteration of the interpreter loop were removed. +3. Updating function and code pointers on every iteration of the interpreter + loop was changed to only updating them when necessary. +4. Extra assignments to pointers were removed. + +Altogether, these changes sped up the interpreter by around 2x. + +***NOTE***: This is the last release with new features because this `bc` is now +considered complete. From now on, only bug fixes and new translations will be +added to this `bc`. + +## 2.0.3 + +This is a production, bug-fix release. + +Two bugs were fixed in this release: + +1. A rare and subtle signal handling bug was fixed. +2. A misbehavior on `0` to a negative power was fixed. + +The last bug bears some mentioning. + +When I originally wrote power, I did not thoroughly check its error cases; +instead, I had it check if the first number was `0` and then if so, just return +`0`. However, `0` to a negative power means that `1` will be divided by `0`, +which is an error. + +I caught this, but only after I stopped being cocky. You see, sometime later, I +had noticed that GNU `bc` returned an error, correctly, but I thought it was +wrong simply because that's not what my `bc` did. I saw it again later and had a +double take. I checked for real, finally, and found out that my `bc` was wrong +all along. + +That was bad on me. But the bug was easy to fix, so it is fixed now. + +There are two other things in this release: + +1. Subtraction was optimized by [Stefan Eßer][14]. +2. Division was also optimized, also by Stefan Eßer. + +## 2.0.2 + +This release contains a fix for a possible overflow in the signal handling. I +would be surprised if any users ran into it because it would only happen after 2 +billion (`2^31-1`) `SIGINT`'s, but I saw it and had to fix it. + +## 2.0.1 + +This release contains very few things that will apply to any users. + +1. A slight bug in `dc`'s interactive mode was fixed. +2. A bug in the test suite that was only triggered on NetBSD was fixed. +3. **The `-P`/`--no-prompt` option** was added for users that do not want a + prompt. +4. A `make check` target was added as an alias for `make test`. +5. `dc` got its own read prompt: `?> `. + +## 2.0.0 + +This release is a production release. + +This release is also a little different from previous releases. From here on +out, I do not plan on adding any more features to this `bc`; I believe that it +is complete. However, there may be bug fix releases in the future, if I or any +others manage to find bugs. + +This release has only a few new features: + +1. `atan2(y, x)` was added to the extended math library as both `a2(y, x)` and + `atan2(y, x)`. +2. Locales were fixed. +3. A **POSIX shell-compatible script was added as an alternative to compiling + `gen/strgen.c`** on a host machine. More details about making the choice + between the two can be found by running `./configure.sh --help` or reading + the [build manual][13]. +4. Multiplication was optimized by using **diagonal multiplication**, rather + than straight brute force. +5. The `locale_install.sh` script was fixed. +6. `dc` was given the ability to **use the environment variable + `DC_ENV_ARGS`**. +7. `dc` was also given the ability to **use the `-i` or `--interactive`** + options. +8. Printing the prompt was fixed so that it did not print when it shouldn't. +9. Signal handling was fixed. +10. **Handling of `SIGTERM` and `SIGQUIT`** was fixed. +11. The **built-in functions `maxibase()`, `maxobase()`, and `maxscale()`** (the + commands `T`, `U`, `V` in `dc`, respectively) were added to allow scripts to + query for the max allowable values of those globals. +12. Some incompatibilities with POSIX were fixed. + +In addition, this release is `2.0.0` for a big reason: the internal format for +numbers changed. They used to be a `char` array. Now, they are an array of +larger integers, packing more decimal digits into each integer. This has +delivered ***HUGE*** performance improvements, especially for multiplication, +division, and power. + +This `bc` should now be the fastest `bc` available, but I may be wrong. + +## 1.2.8 + +This release contains a fix for a harmless bug (it is harmless in that it still +works, but it just copies extra data) in the [`locale_install.sh`][12] script. + +## 1.2.7 + +This version contains fixes for the build on Arch Linux. + +## 1.2.6 + +This release removes the use of `local` in shell scripts because it's not POSIX +shell-compatible, and also updates a man page that should have been updated a +long time ago but was missed. + +## 1.2.5 + +This release contains some missing locale `*.msg` files. + +## 1.2.4 + +This release contains a few bug fixes and new French translations. + +## 1.2.3 + +This release contains a fix for a bug: use of uninitialized data. Such data was +only used when outputting an error message, but I am striving for perfection. As +Michelangelo said, "Trifles make perfection, and perfection is no trifle." + +## 1.2.2 + +This release contains fixes for OpenBSD. + +## 1.2.1 + +This release contains bug fixes for some rare bugs. + +## 1.2.0 + +This is a production release. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jun 27 13:11:33 2020 Return-Path: Delivered-To: svn-src-head@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 E3B9534FC4F; Sat, 27 Jun 2020 13:11:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vDfY5g8Dz3Zyv; Sat, 27 Jun 2020 13:11:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:e845:db94:43a8:84a1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5803320CD4; Sat, 27 Jun 2020 13:11:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: =?UTF-8?Q?Stefan_E=c3=9fer?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006271202.05RC22oR085945@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> Date: Sat, 27 Jun 2020 06:11:31 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202006271202.05RC22oR085945@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 13:11:34 -0000 On 6/27/20 5:02 AM, Stefan Eßer wrote: > Author: se > Date: Sat Jun 27 12:02:01 2020 > New Revision: 362681 > URL: https://svnweb.freebsd.org/changeset/base/362681 > > Log: > Import new 2-clause BSD licenced implementation of the bc and dc commands Hmm, I didn't see a commit to add the vendor sources into ^/vendor first via our standard process for contrib sources, nor any discussion about that in the review. -- John Baldwin From owner-svn-src-head@freebsd.org Sat Jun 27 13:33:31 2020 Return-Path: Delivered-To: svn-src-head@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 D063535092B; Sat, 27 Jun 2020 13:33:31 +0000 (UTC) (envelope-from 0mp@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 49vF7v58grz3d3G; Sat, 27 Jun 2020 13:33:31 +0000 (UTC) (envelope-from 0mp@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 AC48625D2C; Sat, 27 Jun 2020 13:33:31 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RDXVlP042358; Sat, 27 Jun 2020 13:33:31 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RDXVsH042357; Sat, 27 Jun 2020 13:33:31 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271333.05RDXVsH042357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 13:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362684 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 13:33:31 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 13:33:31 2020 New Revision: 362684 URL: https://svnweb.freebsd.org/changeset/base/362684 Log: ixl.4: Use a -bullet list instead of -item Now the list looks like a list. Using -item only makes sense if the list is meant to be a list of terms and definitions. MFC after: 3 days Modified: head/share/man/man4/ixl.4 Modified: head/share/man/man4/ixl.4 ============================================================================== --- head/share/man/man4/ixl.4 Sat Jun 27 13:18:21 2020 (r362683) +++ head/share/man/man4/ixl.4 Sat Jun 27 13:33:31 2020 (r362684) @@ -96,7 +96,7 @@ the adapters covered by this driver. These tools can be downloaded directly from Intel at .Lk https://downloadcenter.intel.com , by searching for their names, or by installing certain packages: -.Bl -item +.Bl -bullet .It To change the behavior of the QSFP+ ports on XL710 adapters, use the Intel QCU (QSFP+ configuration utility); installed by the From owner-svn-src-head@freebsd.org Sat Jun 27 14:37:36 2020 Return-Path: Delivered-To: svn-src-head@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 C13DB352881; Sat, 27 Jun 2020 14:37:36 +0000 (UTC) (envelope-from trasz@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 49vGYr4jhCz40hr; Sat, 27 Jun 2020 14:37:36 +0000 (UTC) (envelope-from trasz@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 9CE3E26AA8; Sat, 27 Jun 2020 14:37:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REba9i080503; Sat, 27 Jun 2020 14:37:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REba2A080502; Sat, 27 Jun 2020 14:37:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006271437.05REba2A080502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 27 Jun 2020 14:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362690 - in head/sys: amd64/linux arm64/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux arm64/linux X-SVN-Commit-Revision: 362690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:37:36 -0000 Author: trasz Date: Sat Jun 27 14:37:36 2020 New Revision: 362690 URL: https://svnweb.freebsd.org/changeset/base/362690 Log: Adjust types of linuxulator syscalls, to match include/linux/syscalls.h in vanilla Linux git tree. Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25385 Modified: head/sys/amd64/linux/syscalls.master head/sys/arm64/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sat Jun 27 14:36:44 2020 (r362689) +++ head/sys/amd64/linux/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) @@ -42,21 +42,21 @@ int read( int fd, char *buf, - u_int nbyte + l_size_t nbyte ); } 1 AUE_NULL NOPROTO { int write( int fd, char *buf, - u_int nbyte + l_size_t nbyte ); } 2 AUE_OPEN_RWTC STD { int linux_open( char *path, l_int flags, - l_int mode + l_mode_t mode ); } 3 AUE_CLOSE NOPROTO { @@ -108,15 +108,15 @@ } 10 AUE_MPROTECT STD { int linux_mprotect( - caddr_t addr, - l_int len, - l_int prot + l_ulong addr, + l_size_t len, + l_ulong prot ); } 11 AUE_MUNMAP NOPROTO { int munmap( - caddr_t addr, - int len + void *addr, + l_size_t len ); } 12 AUE_NULL STD { @@ -149,7 +149,7 @@ int linux_ioctl( l_uint fd, l_uint cmd, - uintptr_t arg + l_ulong arg ); } 17 AUE_PREAD STD { @@ -190,7 +190,7 @@ } 22 AUE_PIPE STD { int linux_pipe( - l_ulong *pipefds + l_int *pipefds ); } 23 AUE_SELECT STD { @@ -230,9 +230,9 @@ } 28 AUE_MADVISE STD { int linux_madvise( - void *addr, - size_t len, - int behav + l_ulong addr, + l_size_t len, + l_int behav ); } 29 AUE_NULL STD { @@ -301,7 +301,7 @@ int linux_sendfile( l_int out, l_int in, - l_long *offset, + l_off_t *offset, l_size_t count ); } @@ -330,8 +330,8 @@ int linux_sendto( l_int s, l_uintptr_t msg, - l_int len, - l_int flags, + l_size_t len, + l_uint flags, l_uintptr_t to, l_int tolen ); @@ -341,7 +341,7 @@ l_int s, l_uintptr_t buf, l_size_t len, - l_int flags, + l_uint flags, l_uintptr_t from, l_uintptr_t fromlen ); @@ -350,14 +350,14 @@ int linux_sendmsg( l_int s, l_uintptr_t msg, - l_int flags + l_uint flags ); } 47 AUE_RECVMSG STD { int linux_recvmsg( l_int s, l_uintptr_t msg, - l_int flags + l_uint flags ); } 48 AUE_NULL STD { @@ -421,7 +421,7 @@ } 56 AUE_RFORK STD { int linux_clone( - l_int flags, + l_ulong flags, void *stack, void *parent_tidptr, void *child_tidptr, @@ -456,7 +456,7 @@ } 62 AUE_KILL STD { int linux_kill( - l_int pid, + l_pid_t pid, l_int signum ); } @@ -548,13 +548,13 @@ 76 AUE_TRUNCATE STD { int linux_truncate( char *path, - l_ulong length + l_long length ); } 77 AUE_FTRUNCATE STD { int linux_ftruncate( l_int fd, - l_long length + l_ulong length ); } 78 AUE_GETDIRENTRIES STD { @@ -589,7 +589,7 @@ 83 AUE_MKDIR STD { int linux_mkdir( char *path, - l_int mode + l_mode_t mode ); } 84 AUE_RMDIR STD { @@ -600,7 +600,7 @@ 85 AUE_CREAT STD { int linux_creat( char *path, - l_int mode + l_mode_t mode ); } 86 AUE_LINK STD { @@ -871,8 +871,8 @@ 133 AUE_MKNOD STD { int linux_mknod( char *path, - l_int mode, - l_dev_t dev + l_mode_t mode, + l_uint dev ); } 134 AUE_USELIB UNIMPL uselib @@ -883,7 +883,7 @@ } 136 AUE_NULL STD { int linux_ustat( - l_dev_t dev, + l_uint dev, struct l_ustat *ubuf ); } @@ -1070,7 +1070,7 @@ 170 AUE_SYSCTL STD { int linux_sethostname( char *hostname, - l_uint len + l_int len ); } 171 AUE_SYSCTL STD { @@ -1149,7 +1149,7 @@ } 200 AUE_NULL STD { int linux_tkill( - l_int tid, + l_pid_t tid, l_int sig ); } @@ -1290,7 +1290,7 @@ 230 AUE_NULL STD { int linux_clock_nanosleep( clockid_t which, - int flags, + l_int flags, struct l_timespec *rqtp, struct l_timespec *rmtp ); @@ -1318,8 +1318,8 @@ } 234 AUE_NULL STD { int linux_tgkill( - l_int tgid, - l_int pid, + l_pid_t tgid, + l_pid_t pid, l_int sig ); } @@ -1401,21 +1401,21 @@ l_int dfd, const char *filename, l_int flags, - l_int mode + l_mode_t mode ); } 258 AUE_MKDIRAT STD { int linux_mkdirat( l_int dfd, const char *pathname, - l_int mode + l_mode_t mode ); } 259 AUE_MKNODAT STD { int linux_mknodat( l_int dfd, const char *filename, - l_int mode, + l_mode_t mode, l_uint dev ); } @@ -1509,7 +1509,7 @@ 271 AUE_POLL STD { int linux_ppoll( struct pollfd *fds, - uint32_t nfds, + l_uint nfds, struct l_timespec *tsp, l_sigset_t *sset, l_size_t ssize @@ -1542,7 +1542,7 @@ l_int fd, l_loff_t offset, l_loff_t nbytes, - unsigned int flags + l_uint flags ); } 278 AUE_NULL STD { @@ -1610,7 +1610,7 @@ l_int s, l_uintptr_t addr, l_uintptr_t namelen, - int flags + l_int flags ); } ; Linux 2.6.27: @@ -1630,8 +1630,8 @@ } 292 AUE_NULL STD { int linux_dup3( - l_int oldfd, - l_int newfd, + l_uint oldfd, + l_uint newfd, l_int flags ); } @@ -1803,7 +1803,7 @@ const char *oldname, l_int newdfd, const char *newname, - unsigned int flags + l_uint flags ); } ; Linux 3.17: Modified: head/sys/arm64/linux/syscalls.master ============================================================================== --- head/sys/arm64/linux/syscalls.master Sat Jun 27 14:36:44 2020 (r362689) +++ head/sys/arm64/linux/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) @@ -125,7 +125,7 @@ int linux_ioctl( l_uint fd, l_uint cmd, - uintptr_t arg + l_ulong arg ); } 30 AUE_NULL STD { @@ -152,7 +152,7 @@ int linux_mkdirat( l_int dfd, const char *pathname, - l_int mode + l_mode_t mode ); } 35 AUE_UNLINKAT STD { @@ -286,7 +286,7 @@ l_int dfd, const char *filename, l_int flags, - l_int mode + l_mode_t mode ); } 57 AUE_CLOSE NOPROTO { @@ -321,14 +321,14 @@ int read( int fd, char *buf, - u_int nbyte + l_size_t nbyte ); } 64 AUE_NULL NOPROTO { int write( int fd, char *buf, - u_int nbyte + l_size_t nbyte ); } 65 AUE_READV NOPROTO { @@ -383,7 +383,7 @@ int linux_sendfile( l_int out, l_int in, - l_long *offset, + l_off_t *offset, l_size_t count ); } @@ -400,7 +400,7 @@ 73 AUE_POLL STD { int linux_ppoll( struct pollfd *fds, - uint32_t nfds, + l_uint nfds, struct l_timespec *tsp, l_sigset_t *sset, l_size_t ssize @@ -454,7 +454,7 @@ l_int fd, l_loff_t offset, l_loff_t nbytes, - unsigned int flags + l_uint flags ); } 85 AUE_NULL STD { @@ -509,12 +509,12 @@ } 93 AUE_EXIT STD { int linux_exit( - int rval + u_int rval ); } 94 AUE_EXIT STD { int linux_exit_group( - int error_code + l_int error_code ); } 95 AUE_WAIT6 STD { @@ -528,7 +528,7 @@ } 96 AUE_NULL STD { int linux_set_tid_address( - int *tidptr + l_int *tidptr ); } 97 AUE_NULL STD { @@ -632,7 +632,7 @@ 115 AUE_NULL STD { int linux_clock_nanosleep( clockid_t which, - int flags, + l_int flags, struct l_timespec *rqtp, struct l_timespec *rmtp ); @@ -713,20 +713,20 @@ 128 AUE_NULL UNIMPL restart_syscall 129 AUE_KILL STD { int linux_kill( - l_int pid, + l_pid_t pid, l_int signum ); } 130 AUE_NULL STD { int linux_tkill( - l_int tid, + l_pid_t tid, l_int sig ); } 131 AUE_NULL STD { int linux_tgkill( - l_int tgid, - l_int pid, + l_pid_t tgid, + l_pid_t pid, l_int sig ); } @@ -1144,8 +1144,8 @@ int linux_sendto( l_int s, l_uintptr_t msg, - l_int len, - l_int flags, + l_size_t len, + l_uint flags, l_uintptr_t to, l_int tolen ); @@ -1155,7 +1155,7 @@ l_int s, l_uintptr_t buf, l_size_t len, - l_int flags, + l_uint flags, l_uintptr_t from, l_uintptr_t fromlen ); @@ -1188,14 +1188,14 @@ int linux_sendmsg( l_int s, l_uintptr_t msg, - l_int flags + l_uint flags ); } 212 AUE_RECVMSG STD { int linux_recvmsg( l_int s, l_uintptr_t msg, - l_int flags + l_uint flags ); } 213 AUE_NULL UNIMPL linux_readahead @@ -1205,8 +1205,8 @@ } 215 AUE_MUNMAP NOPROTO { int munmap( - caddr_t addr, - int len + void *addr, + l_size_t len ); } 216 AUE_NULL STD { @@ -1229,7 +1229,7 @@ } 220 AUE_RFORK STD { int linux_clone( - l_int flags, + l_ulong flags, void *stack, void *parent_tidptr, void *tls, @@ -1271,9 +1271,9 @@ } 226 AUE_MPROTECT STD { int linux_mprotect( - caddr_t addr, - l_int len, - l_int prot + l_ulong addr, + l_size_t len, + l_ulong prot ); } 227 AUE_MSYNC STD { @@ -1312,9 +1312,9 @@ } 233 AUE_MADVISE STD { int linux_madvise( - void *addr, - size_t len, - int behav + l_ulong addr, + l_size_t len, + l_int behav ); } 234 AUE_NULL STD { @@ -1351,7 +1351,7 @@ l_int s, l_uintptr_t addr, l_uintptr_t namelen, - int flags + l_int flags ); } 243 AUE_NULL STD { @@ -1469,7 +1469,7 @@ const char *oldname, l_int newdfd, const char *newname, - unsigned int flags + l_uint flags ); } 277 AUE_NULL STD { From owner-svn-src-head@freebsd.org Sat Jun 27 14:39:45 2020 Return-Path: Delivered-To: svn-src-head@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 EFF0435266D; Sat, 27 Jun 2020 14:39:45 +0000 (UTC) (envelope-from trasz@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 49vGcK62djz40kJ; Sat, 27 Jun 2020 14:39:45 +0000 (UTC) (envelope-from trasz@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 CA91326AAE; Sat, 27 Jun 2020 14:39:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REdjVX080852; Sat, 27 Jun 2020 14:39:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REdjgF080848; Sat, 27 Jun 2020 14:39:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006271439.05REdjgF080848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 27 Jun 2020 14:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362691 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 362691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:39:46 -0000 Author: trasz Date: Sat Jun 27 14:39:44 2020 New Revision: 362691 URL: https://svnweb.freebsd.org/changeset/base/362691 Log: Add syscall definitions for linux xattr syscalls. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25387 Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/syscalls.master head/sys/arm64/linux/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) +++ head/sys/amd64/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) @@ -1112,40 +1112,94 @@ int linux_readahead(void); } 188 AUE_NULL STD { - int linux_setxattr(void); + int linux_setxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 189 AUE_NULL STD { - int linux_lsetxattr(void); + int linux_lsetxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 190 AUE_NULL STD { - int linux_fsetxattr(void); + int linux_fsetxattr( + l_int fd, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 191 AUE_NULL STD { - int linux_getxattr(void); + int linux_getxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 192 AUE_NULL STD { - int linux_lgetxattr(void); + int linux_lgetxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 193 AUE_NULL STD { - int linux_fgetxattr(void); + int linux_fgetxattr( + l_int fd, + const char *name, + char *value, + l_size_t size + ); } 194 AUE_NULL STD { - int linux_listxattr(void); + int linux_listxattr( + const char *path, + const char *list, + l_size_t size + ); } 195 AUE_NULL STD { - int linux_llistxattr(void); + int linux_llistxattr( + const char *path, + const char *list, + l_size_t size + ); } 196 AUE_NULL STD { - int linux_flistxattr(void); + int linux_flistxattr( + l_int fd, + const char *list, + l_size_t size + ); } 197 AUE_NULL STD { - int linux_removexattr(void); + int linux_removexattr( + const char *path, + const char *name + ); } 198 AUE_NULL STD { - int linux_lremovexattr(void); + int linux_lremovexattr( + const char *path, + const char *name + ); } 199 AUE_NULL STD { - int linux_fremovexattr(void); + int linux_fremovexattr( + l_int fd, + const char *name + ); } 200 AUE_NULL STD { int linux_tkill( Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) +++ head/sys/amd64/linux32/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) @@ -1217,40 +1217,94 @@ } 225 AUE_NULL UNIMPL linux_readahead 226 AUE_NULL STD { - int linux_setxattr(void); + int linux_setxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 227 AUE_NULL STD { - int linux_lsetxattr(void); + int linux_lsetxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 228 AUE_NULL STD { - int linux_fsetxattr(void); + int linux_fsetxattr( + l_int fd, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 229 AUE_NULL STD { - int linux_getxattr(void); + int linux_getxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 230 AUE_NULL STD { - int linux_lgetxattr(void); + int linux_lgetxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 231 AUE_NULL STD { - int linux_fgetxattr(void); + int linux_fgetxattr( + l_int fd, + const char *name, + char *value, + l_size_t size + ); } 232 AUE_NULL STD { - int linux_listxattr(void); + int linux_listxattr( + const char *path, + const char *list, + l_size_t size + ); } 233 AUE_NULL STD { - int linux_llistxattr(void); + int linux_llistxattr( + const char *path, + const char *list, + l_size_t size + ); } 234 AUE_NULL STD { - int linux_flistxattr(void); + int linux_flistxattr( + l_int fd, + const char *list, + l_size_t size + ); } 235 AUE_NULL STD { - int linux_removexattr(void); + int linux_removexattr( + const char *path, + const char *name + ); } 236 AUE_NULL STD { - int linux_lremovexattr(void); + int linux_lremovexattr( + const char *path, + const char *name + ); } 237 AUE_NULL STD { - int linux_fremovexattr(void); + int linux_fremovexattr( + l_int fd, + const char *name + ); } 238 AUE_NULL STD { int linux_tkill( Modified: head/sys/arm64/linux/syscalls.master ============================================================================== --- head/sys/arm64/linux/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) +++ head/sys/arm64/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) @@ -19,40 +19,94 @@ 3 AUE_NULL UNIMPL linux_io_cancel 4 AUE_NULL UNIMPL linux_io_getevents 5 AUE_NULL STD { - int linux_setxattr(void); + int linux_setxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 6 AUE_NULL STD { - int linux_lsetxattr(void); + int linux_lsetxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 7 AUE_NULL STD { - int linux_fsetxattr(void); + int linux_fsetxattr( + l_int fd, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 8 AUE_NULL STD { - int linux_getxattr(void); + int linux_getxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 9 AUE_NULL STD { - int linux_lgetxattr(void); + int linux_lgetxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 10 AUE_NULL STD { - int linux_fgetxattr(void); + int linux_fgetxattr( + l_int fd, + const char *name, + char *value, + l_size_t size + ); } 11 AUE_NULL STD { - int linux_listxattr(void); + int linux_listxattr( + const char *path, + const char *list, + l_size_t size + ); } 12 AUE_NULL STD { - int linux_llistxattr(void); + int linux_llistxattr( + const char *path, + const char *list, + l_size_t size + ); } 13 AUE_NULL STD { - int linux_flistxattr(void); + int linux_flistxattr( + l_int fd, + const char *list, + l_size_t size + ); } 14 AUE_NULL STD { - int linux_removexattr(void); + int linux_removexattr( + const char *path, + const char *name + ); } 15 AUE_NULL STD { - int linux_lremovexattr(void); + int linux_lremovexattr( + const char *path, + const char *name + ); } 16 AUE_NULL STD { - int linux_fremovexattr(void); + int linux_fremovexattr( + l_int fd, + const char *name + ); } 17 AUE_GETCWD STD { int linux_getcwd( Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sat Jun 27 14:37:36 2020 (r362690) +++ head/sys/i386/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) @@ -1238,40 +1238,94 @@ } 225 AUE_NULL UNIMPL linux_readahead 226 AUE_NULL STD { - int linux_setxattr(void); + int linux_setxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 227 AUE_NULL STD { - int linux_lsetxattr(void); + int linux_lsetxattr( + const char *path, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 228 AUE_NULL STD { - int linux_fsetxattr(void); + int linux_fsetxattr( + l_int fd, + const char *name, + const char *value, + l_size_t size, + l_int flags + ); } 229 AUE_NULL STD { - int linux_getxattr(void); + int linux_getxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 230 AUE_NULL STD { - int linux_lgetxattr(void); + int linux_lgetxattr( + const char *path, + const char *name, + char *value, + l_size_t size + ); } 231 AUE_NULL STD { - int linux_fgetxattr(void); + int linux_fgetxattr( + l_int fd, + const char *name, + char *value, + l_size_t size + ); } 232 AUE_NULL STD { - int linux_listxattr(void); + int linux_listxattr( + const char *path, + const char *list, + l_size_t size + ); } 233 AUE_NULL STD { - int linux_llistxattr(void); + int linux_llistxattr( + const char *path, + const char *list, + l_size_t size + ); } 234 AUE_NULL STD { - int linux_flistxattr(void); + int linux_flistxattr( + l_int fd, + const char *list, + l_size_t size + ); } 235 AUE_NULL STD { - int linux_removexattr(void); + int linux_removexattr( + const char *path, + const char *name + ); } 236 AUE_NULL STD { - int linux_lremovexattr(void); + int linux_lremovexattr( + const char *path, + const char *name + ); } 237 AUE_NULL STD { - int linux_fremovexattr(void); + int linux_fremovexattr( + l_int fd, + const char *name + ); } 238 AUE_NULL STD { int linux_tkill( From owner-svn-src-head@freebsd.org Sat Jun 27 14:42:09 2020 Return-Path: Delivered-To: svn-src-head@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 9C987352E59; Sat, 27 Jun 2020 14:42:09 +0000 (UTC) (envelope-from trasz@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 49vGg53jxFz41Rq; Sat, 27 Jun 2020 14:42:09 +0000 (UTC) (envelope-from trasz@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 7B08626D42; Sat, 27 Jun 2020 14:42:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REg9lC085649; Sat, 27 Jun 2020 14:42:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REg8dD085642; Sat, 27 Jun 2020 14:42:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006271442.05REg8dD085642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 27 Jun 2020 14:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362692 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 362692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:42:09 -0000 Author: trasz Date: Sat Jun 27 14:42:08 2020 New Revision: 362692 URL: https://svnweb.freebsd.org/changeset/base/362692 Log: Add proper types for linux message queue syscalls; mostly taken from 32-bit Linuxulator. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25386 Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/syscalls.master head/sys/arm64/linux/linux.h head/sys/arm64/linux/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) +++ head/sys/amd64/linux/syscalls.master Sat Jun 27 14:42:08 2020 (r362692) @@ -1394,22 +1394,48 @@ int linux_get_mempolicy(void); } 240 AUE_NULL STD { - int linux_mq_open(void); + int linux_mq_open( + const char *name, + l_int oflag, + l_mode_t mode, + struct mq_attr *attr + ); } 241 AUE_NULL STD { - int linux_mq_unlink(void); + int linux_mq_unlink( + const char *name + ); } 242 AUE_NULL STD { - int linux_mq_timedsend(void); + int linux_mq_timedsend( + l_mqd_t mqd, + const char *msg_ptr, + l_size_t msg_len, + l_uint msg_prio, + const struct l_timespec *abs_timeout + ); } 243 AUE_NULL STD { - int linux_mq_timedreceive(void); + int linux_mq_timedreceive( + l_mqd_t mqd, + char *msg_ptr, + l_size_t msg_len, + l_uint *msg_prio, + const struct l_timespec *abs_timeout + ); } 244 AUE_NULL STD { - int linux_mq_notify(void); + int linux_mq_notify( + l_mqd_t mqd, + const struct l_timespec *abs_timeout + ); } 245 AUE_NULL STD { - int linux_mq_getsetattr(void); + int linux_mq_getsetattr( + l_mqd_t mqd, + const struct mq_attr *attr, + struct mq_attr *oattr + ); } 246 AUE_NULL STD { int linux_kexec_load(void); Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) +++ head/sys/amd64/linux32/syscalls.master Sat Jun 27 14:42:08 2020 (r362692) @@ -1508,22 +1508,48 @@ } ; Linux 2.6.6: 277 AUE_NULL STD { - int linux_mq_open(void); + int linux_mq_open( + const char *name, + l_int oflag, + l_mode_t mode, + struct mq_attr *attr + ); } 278 AUE_NULL STD { - int linux_mq_unlink(void); + int linux_mq_unlink( + const char *name + ); } 279 AUE_NULL STD { - int linux_mq_timedsend(void); + int linux_mq_timedsend( + l_mqd_t mqd, + const char *msg_ptr, + l_size_t msg_len, + l_uint msg_prio, + const struct l_timespec *abs_timeout + ); } 280 AUE_NULL STD { - int linux_mq_timedreceive(void); + int linux_mq_timedreceive( + l_mqd_t mqd, + char *msg_ptr, + l_size_t msg_len, + l_uint *msg_prio, + const struct l_timespec *abs_timeout + ); } 281 AUE_NULL STD { - int linux_mq_notify(void); + int linux_mq_notify( + l_mqd_t mqd, + const struct l_timespec *abs_timeout + ); } 282 AUE_NULL STD { - int linux_mq_getsetattr(void); + int linux_mq_getsetattr( + l_mqd_t mqd, + const struct mq_attr *attr, + struct mq_attr *oattr + ); } 283 AUE_NULL STD { int linux_kexec_load(void); Modified: head/sys/arm64/linux/linux.h ============================================================================== --- head/sys/arm64/linux/linux.h Sat Jun 27 14:39:44 2020 (r362691) +++ head/sys/arm64/linux/linux.h Sat Jun 27 14:42:08 2020 (r362692) @@ -64,6 +64,7 @@ typedef l_ulong l_size_t; typedef l_long l_suseconds_t; typedef l_long l_time_t; typedef l_int l_timer_t; /* XXX */ +typedef l_int l_mqd_t; typedef l_ulong l_fd_mask; typedef struct { Modified: head/sys/arm64/linux/syscalls.master ============================================================================== --- head/sys/arm64/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) +++ head/sys/arm64/linux/syscalls.master Sat Jun 27 14:42:08 2020 (r362692) @@ -1040,22 +1040,48 @@ ); } 180 AUE_NULL STD { - int linux_mq_open(void); + int linux_mq_open( + const char *name, + l_int oflag, + l_mode_t mode, + struct mq_attr *attr + ); } 181 AUE_NULL STD { - int linux_mq_unlink(void); + int linux_mq_unlink( + const char *name + ); } 182 AUE_NULL STD { - int linux_mq_timedsend(void); + int linux_mq_timedsend( + l_mqd_t mqd, + const char *msg_ptr, + l_size_t msg_len, + l_uint msg_prio, + const struct l_timespec *abs_timeout + ); } 183 AUE_NULL STD { - int linux_mq_timedreceive(void); + int linux_mq_timedreceive( + l_mqd_t mqd, + char *msg_ptr, + l_size_t msg_len, + l_uint *msg_prio, + const struct l_timespec *abs_timeout + ); } 184 AUE_NULL STD { - int linux_mq_notify(void); + int linux_mq_notify( + l_mqd_t mqd, + const struct l_timespec *abs_timeout + ); } 185 AUE_NULL STD { - int linux_mq_getsetattr(void); + int linux_mq_getsetattr( + l_mqd_t mqd, + const struct mq_attr *attr, + struct mq_attr *oattr + ); } 186 AUE_NULL STD { int linux_msgget( Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sat Jun 27 14:39:44 2020 (r362691) +++ head/sys/i386/linux/syscalls.master Sat Jun 27 14:42:08 2020 (r362692) @@ -1532,8 +1532,8 @@ 277 AUE_NULL STD { int linux_mq_open( const char *name, - int oflag, - mode_t mode, + l_int oflag, + l_mode_t mode, struct mq_attr *attr ); } @@ -1546,8 +1546,8 @@ int linux_mq_timedsend( l_mqd_t mqd, const char *msg_ptr, - size_t msg_len, - unsigned int msg_prio, + l_size_t msg_len, + l_uint msg_prio, const struct l_timespec *abs_timeout ); } @@ -1555,8 +1555,8 @@ int linux_mq_timedreceive( l_mqd_t mqd, char *msg_ptr, - size_t msg_len, - unsigned int msg_prio, + l_size_t msg_len, + l_uint *msg_prio, const struct l_timespec *abs_timeout ); } From owner-svn-src-head@freebsd.org Sat Jun 27 14:43:31 2020 Return-Path: Delivered-To: svn-src-head@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 1C540352F9C; Sat, 27 Jun 2020 14:43:31 +0000 (UTC) (envelope-from trasz@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 49vGhf5vNwz41R9; Sat, 27 Jun 2020 14:43:30 +0000 (UTC) (envelope-from trasz@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 AB18E266FB; Sat, 27 Jun 2020 14:43:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REhUjM086488; Sat, 27 Jun 2020 14:43:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REhUdg086484; Sat, 27 Jun 2020 14:43:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006271443.05REhUdg086484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 27 Jun 2020 14:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362693 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 362693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:43:31 -0000 Author: trasz Date: Sat Jun 27 14:43:29 2020 New Revision: 362693 URL: https://svnweb.freebsd.org/changeset/base/362693 Log: Regen. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/arm64/linux/linux_proto.h head/sys/arm64/linux/linux_sysent.c head/sys/arm64/linux/linux_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Sat Jun 27 14:42:08 2020 (r362692) +++ head/sys/amd64/linux/linux_proto.h Sat Jun 27 14:43:29 2020 (r362693) @@ -38,7 +38,7 @@ struct thread; struct linux_open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; }; struct linux_newstat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -66,9 +66,9 @@ struct linux_mmap2_args { char pgoff_l_[PADL_(l_ulong)]; l_ulong pgoff; char pgoff_r_[PADR_(l_ulong)]; }; struct linux_mprotect_args { - char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; - char len_l_[PADL_(l_int)]; l_int len; char len_r_[PADR_(l_int)]; - char prot_l_[PADL_(l_int)]; l_int prot; char prot_r_[PADR_(l_int)]; + char addr_l_[PADL_(l_ulong)]; l_ulong addr; char addr_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char prot_l_[PADL_(l_ulong)]; l_ulong prot; char prot_r_[PADR_(l_ulong)]; }; struct linux_brk_args { char dsend_l_[PADL_(l_ulong)]; l_ulong dsend; char dsend_r_[PADR_(l_ulong)]; @@ -91,7 +91,7 @@ struct linux_rt_sigreturn_args { struct linux_ioctl_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; char cmd_l_[PADL_(l_uint)]; l_uint cmd; char cmd_r_[PADR_(l_uint)]; - char arg_l_[PADL_(uintptr_t)]; uintptr_t arg; char arg_r_[PADR_(uintptr_t)]; + char arg_l_[PADL_(l_ulong)]; l_ulong arg; char arg_r_[PADR_(l_ulong)]; }; struct linux_pread_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; @@ -110,7 +110,7 @@ struct linux_access_args { char amode_l_[PADL_(l_int)]; l_int amode; char amode_r_[PADR_(l_int)]; }; struct linux_pipe_args { - char pipefds_l_[PADL_(l_ulong *)]; l_ulong * pipefds; char pipefds_r_[PADR_(l_ulong *)]; + char pipefds_l_[PADL_(l_int *)]; l_int * pipefds; char pipefds_r_[PADR_(l_int *)]; }; struct linux_select_args { char nfds_l_[PADL_(l_int)]; l_int nfds; char nfds_r_[PADR_(l_int)]; @@ -137,9 +137,9 @@ struct linux_mincore_args { char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)]; }; struct linux_madvise_args { - char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; - char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; - char behav_l_[PADL_(int)]; int behav; char behav_r_[PADR_(int)]; + char addr_l_[PADL_(l_ulong)]; l_ulong addr; char addr_r_[PADR_(l_ulong)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char behav_l_[PADL_(l_int)]; l_int behav; char behav_r_[PADR_(l_int)]; }; struct linux_shmget_args { char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; @@ -181,7 +181,7 @@ struct linux_getpid_args { struct linux_sendfile_args { char out_l_[PADL_(l_int)]; l_int out; char out_r_[PADR_(l_int)]; char in_l_[PADL_(l_int)]; l_int in; char in_r_[PADR_(l_int)]; - char offset_l_[PADL_(l_long *)]; l_long * offset; char offset_r_[PADR_(l_long *)]; + char offset_l_[PADL_(l_off_t *)]; l_off_t * offset; char offset_r_[PADR_(l_off_t *)]; char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_socket_args { @@ -202,8 +202,8 @@ struct linux_accept_args { struct linux_sendto_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; char msg_l_[PADL_(l_uintptr_t)]; l_uintptr_t msg; char msg_r_[PADR_(l_uintptr_t)]; - char len_l_[PADL_(l_int)]; l_int len; char len_r_[PADR_(l_int)]; - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; char to_l_[PADL_(l_uintptr_t)]; l_uintptr_t to; char to_r_[PADR_(l_uintptr_t)]; char tolen_l_[PADL_(l_int)]; l_int tolen; char tolen_r_[PADR_(l_int)]; }; @@ -211,19 +211,19 @@ struct linux_recvfrom_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; char buf_l_[PADL_(l_uintptr_t)]; l_uintptr_t buf; char buf_r_[PADR_(l_uintptr_t)]; char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; char from_l_[PADL_(l_uintptr_t)]; l_uintptr_t from; char from_r_[PADR_(l_uintptr_t)]; char fromlen_l_[PADL_(l_uintptr_t)]; l_uintptr_t fromlen; char fromlen_r_[PADR_(l_uintptr_t)]; }; struct linux_sendmsg_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; char msg_l_[PADL_(l_uintptr_t)]; l_uintptr_t msg; char msg_r_[PADR_(l_uintptr_t)]; - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_recvmsg_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; char msg_l_[PADL_(l_uintptr_t)]; l_uintptr_t msg; char msg_r_[PADR_(l_uintptr_t)]; - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_shutdown_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; @@ -269,7 +269,7 @@ struct linux_getsockopt_args { char optlen_l_[PADL_(l_uintptr_t)]; l_uintptr_t optlen; char optlen_r_[PADR_(l_uintptr_t)]; }; struct linux_clone_args { - char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; + char flags_l_[PADL_(l_ulong)]; l_ulong flags; char flags_r_[PADR_(l_ulong)]; char stack_l_[PADL_(void *)]; void * stack; char stack_r_[PADR_(void *)]; char parent_tidptr_l_[PADL_(void *)]; void * parent_tidptr; char parent_tidptr_r_[PADR_(void *)]; char child_tidptr_l_[PADL_(void *)]; void * child_tidptr; char child_tidptr_r_[PADR_(void *)]; @@ -296,7 +296,7 @@ struct linux_wait4_args { char rusage_l_[PADL_(struct rusage *)]; struct rusage * rusage; char rusage_r_[PADR_(struct rusage *)]; }; struct linux_kill_args { - char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)]; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; char signum_l_[PADL_(l_int)]; l_int signum; char signum_r_[PADR_(l_int)]; }; struct linux_newuname_args { @@ -353,11 +353,11 @@ struct linux_fdatasync_args { }; struct linux_truncate_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char length_l_[PADL_(l_ulong)]; l_ulong length; char length_r_[PADR_(l_ulong)]; + char length_l_[PADL_(l_long)]; l_long length; char length_r_[PADR_(l_long)]; }; struct linux_ftruncate_args { char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; - char length_l_[PADL_(l_long)]; l_long length; char length_r_[PADR_(l_long)]; + char length_l_[PADL_(l_ulong)]; l_ulong length; char length_r_[PADR_(l_ulong)]; }; struct linux_getdents_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; @@ -377,14 +377,14 @@ struct linux_rename_args { }; struct linux_mkdir_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; }; struct linux_rmdir_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; }; struct linux_creat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; }; struct linux_link_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -500,14 +500,14 @@ struct linux_utime_args { }; struct linux_mknod_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; - char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; + char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; }; struct linux_personality_args { char per_l_[PADL_(l_uint)]; l_uint per; char per_r_[PADR_(l_uint)]; }; struct linux_ustat_args { - char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; + char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; char ubuf_l_[PADL_(struct l_ustat *)]; struct l_ustat * ubuf; char ubuf_r_[PADR_(struct l_ustat *)]; }; struct linux_statfs_args { @@ -605,7 +605,7 @@ struct linux_reboot_args { }; struct linux_sethostname_args { char hostname_l_[PADL_(char *)]; char * hostname; char hostname_r_[PADR_(char *)]; - char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)]; + char len_l_[PADL_(l_int)]; l_int len; char len_r_[PADR_(l_int)]; }; struct linux_setdomainname_args { char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; @@ -633,43 +633,73 @@ struct linux_readahead_args { register_t dummy; }; struct linux_setxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_lsetxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_fsetxattr_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(const char *)]; const char * value; char value_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_getxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_lgetxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_fgetxattr_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_listxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_llistxattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_flistxattr_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char list_l_[PADL_(const char *)]; const char * list; char list_r_[PADR_(const char *)]; + char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; }; struct linux_removexattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct linux_lremovexattr_args { - register_t dummy; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct linux_fremovexattr_args { - register_t dummy; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct linux_tkill_args { - char tid_l_[PADL_(l_int)]; l_int tid; char tid_r_[PADR_(l_int)]; + char tid_l_[PADL_(l_pid_t)]; l_pid_t tid; char tid_r_[PADR_(l_pid_t)]; char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; }; struct linux_time_args { @@ -772,7 +802,7 @@ struct linux_clock_getres_args { }; struct linux_clock_nanosleep_args { char which_l_[PADL_(clockid_t)]; clockid_t which; char which_r_[PADR_(clockid_t)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; char rqtp_l_[PADL_(struct l_timespec *)]; struct l_timespec * rqtp; char rqtp_r_[PADR_(struct l_timespec *)]; char rmtp_l_[PADL_(struct l_timespec *)]; struct l_timespec * rmtp; char rmtp_r_[PADR_(struct l_timespec *)]; }; @@ -792,8 +822,8 @@ struct linux_epoll_ctl_args { char event_l_[PADL_(struct epoll_event *)]; struct epoll_event * event; char event_r_[PADR_(struct epoll_event *)]; }; struct linux_tgkill_args { - char tgid_l_[PADL_(l_int)]; l_int tgid; char tgid_r_[PADR_(l_int)]; - char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)]; + char tgid_l_[PADL_(l_pid_t)]; l_pid_t tgid; char tgid_r_[PADR_(l_pid_t)]; + char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; char sig_l_[PADL_(l_int)]; l_int sig; char sig_r_[PADR_(l_int)]; }; struct linux_utimes_args { @@ -810,22 +840,36 @@ struct linux_get_mempolicy_args { register_t dummy; }; struct linux_mq_open_args { - register_t dummy; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char oflag_l_[PADL_(l_int)]; l_int oflag; char oflag_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; + char attr_l_[PADL_(struct mq_attr *)]; struct mq_attr * attr; char attr_r_[PADR_(struct mq_attr *)]; }; struct linux_mq_unlink_args { - register_t dummy; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct linux_mq_timedsend_args { - register_t dummy; + char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; + char msg_ptr_l_[PADL_(const char *)]; const char * msg_ptr; char msg_ptr_r_[PADR_(const char *)]; + char msg_len_l_[PADL_(l_size_t)]; l_size_t msg_len; char msg_len_r_[PADR_(l_size_t)]; + char msg_prio_l_[PADL_(l_uint)]; l_uint msg_prio; char msg_prio_r_[PADR_(l_uint)]; + char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; }; struct linux_mq_timedreceive_args { - register_t dummy; + char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; + char msg_ptr_l_[PADL_(char *)]; char * msg_ptr; char msg_ptr_r_[PADR_(char *)]; + char msg_len_l_[PADL_(l_size_t)]; l_size_t msg_len; char msg_len_r_[PADR_(l_size_t)]; + char msg_prio_l_[PADL_(l_uint *)]; l_uint * msg_prio; char msg_prio_r_[PADR_(l_uint *)]; + char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; }; struct linux_mq_notify_args { - register_t dummy; + char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; + char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; }; struct linux_mq_getsetattr_args { - register_t dummy; + char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; + char attr_l_[PADL_(const struct mq_attr *)]; const struct mq_attr * attr; char attr_r_[PADR_(const struct mq_attr *)]; + char oattr_l_[PADL_(struct mq_attr *)]; struct mq_attr * oattr; char oattr_r_[PADR_(struct mq_attr *)]; }; struct linux_kexec_load_args { register_t dummy; @@ -868,17 +912,17 @@ struct linux_openat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; }; struct linux_mkdirat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char pathname_l_[PADL_(const char *)]; const char * pathname; char pathname_r_[PADR_(const char *)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; }; struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; - char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; + char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; }; struct linux_fchownat_args { @@ -948,7 +992,7 @@ struct linux_pselect6_args { }; struct linux_ppoll_args { char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; - char nfds_l_[PADL_(uint32_t)]; uint32_t nfds; char nfds_r_[PADR_(uint32_t)]; + char nfds_l_[PADL_(l_uint)]; l_uint nfds; char nfds_r_[PADR_(l_uint)]; char tsp_l_[PADL_(struct l_timespec *)]; struct l_timespec * tsp; char tsp_r_[PADR_(struct l_timespec *)]; char sset_l_[PADL_(l_sigset_t *)]; l_sigset_t * sset; char sset_r_[PADR_(l_sigset_t *)]; char ssize_l_[PADL_(l_size_t)]; l_size_t ssize; char ssize_r_[PADR_(l_size_t)]; @@ -975,7 +1019,7 @@ struct linux_sync_file_range_args { char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)]; char nbytes_l_[PADL_(l_loff_t)]; l_loff_t nbytes; char nbytes_r_[PADR_(l_loff_t)]; - char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_vmsplice_args { register_t dummy; @@ -1027,7 +1071,7 @@ struct linux_accept4_args { char s_l_[PADL_(l_int)]; l_int s; char s_r_[PADR_(l_int)]; char addr_l_[PADL_(l_uintptr_t)]; l_uintptr_t addr; char addr_r_[PADR_(l_uintptr_t)]; char namelen_l_[PADL_(l_uintptr_t)]; l_uintptr_t namelen; char namelen_r_[PADR_(l_uintptr_t)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_signalfd4_args { register_t dummy; @@ -1040,8 +1084,8 @@ struct linux_epoll_create1_args { char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_dup3_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char oldfd_l_[PADL_(l_uint)]; l_uint oldfd; char oldfd_r_[PADR_(l_uint)]; + char newfd_l_[PADL_(l_uint)]; l_uint newfd; char newfd_r_[PADR_(l_uint)]; char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_pipe2_args { @@ -1164,7 +1208,7 @@ struct linux_renameat2_args { char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; - char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_seccomp_args { char op_l_[PADL_(l_uint)]; l_uint op; char op_r_[PADR_(l_uint)]; Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Sat Jun 27 14:42:08 2020 (r362692) +++ head/sys/amd64/linux/linux_sysent.c Sat Jun 27 14:43:29 2020 (r362693) @@ -205,18 +205,18 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = security */ { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_gettid */ { 0, (sy_call_t *)linux_readahead, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_readahead */ - { 0, (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = linux_setxattr */ - { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = linux_lsetxattr */ - { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = linux_fsetxattr */ - { 0, (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = linux_getxattr */ - { 0, (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = linux_lgetxattr */ - { 0, (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 193 = linux_fgetxattr */ - { 0, (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = linux_listxattr */ - { 0, (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = linux_llistxattr */ - { 0, (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = linux_flistxattr */ - { 0, (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = linux_removexattr */ - { 0, (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = linux_lremovexattr */ - { 0, (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = linux_fremovexattr */ + { AS(linux_setxattr_args), (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = linux_setxattr */ + { AS(linux_lsetxattr_args), (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = linux_lsetxattr */ + { AS(linux_fsetxattr_args), (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = linux_fsetxattr */ + { AS(linux_getxattr_args), (sy_call_t *)linux_getxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = linux_getxattr */ + { AS(linux_lgetxattr_args), (sy_call_t *)linux_lgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = linux_lgetxattr */ + { AS(linux_fgetxattr_args), (sy_call_t *)linux_fgetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 193 = linux_fgetxattr */ + { AS(linux_listxattr_args), (sy_call_t *)linux_listxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = linux_listxattr */ + { AS(linux_llistxattr_args), (sy_call_t *)linux_llistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = linux_llistxattr */ + { AS(linux_flistxattr_args), (sy_call_t *)linux_flistxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = linux_flistxattr */ + { AS(linux_removexattr_args), (sy_call_t *)linux_removexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = linux_removexattr */ + { AS(linux_lremovexattr_args), (sy_call_t *)linux_lremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = linux_lremovexattr */ + { AS(linux_fremovexattr_args), (sy_call_t *)linux_fremovexattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = linux_fremovexattr */ { AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = linux_tkill */ { AS(linux_time_args), (sy_call_t *)linux_time, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = linux_time */ { AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 202 = linux_sys_futex */ @@ -257,12 +257,12 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = linux_mbind */ { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = linux_set_mempolicy */ { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 239 = linux_get_mempolicy */ - { 0, (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = linux_mq_open */ - { 0, (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = linux_mq_unlink */ - { 0, (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = linux_mq_timedsend */ - { 0, (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = linux_mq_timedreceive */ - { 0, (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 244 = linux_mq_notify */ - { 0, (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 245 = linux_mq_getsetattr */ + { AS(linux_mq_open_args), (sy_call_t *)linux_mq_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = linux_mq_open */ + { AS(linux_mq_unlink_args), (sy_call_t *)linux_mq_unlink, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = linux_mq_unlink */ + { AS(linux_mq_timedsend_args), (sy_call_t *)linux_mq_timedsend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = linux_mq_timedsend */ + { AS(linux_mq_timedreceive_args), (sy_call_t *)linux_mq_timedreceive, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = linux_mq_timedreceive */ + { AS(linux_mq_notify_args), (sy_call_t *)linux_mq_notify, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 244 = linux_mq_notify */ + { AS(linux_mq_getsetattr_args), (sy_call_t *)linux_mq_getsetattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 245 = linux_mq_getsetattr */ { 0, (sy_call_t *)linux_kexec_load, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 246 = linux_kexec_load */ { AS(linux_waitid_args), (sy_call_t *)linux_waitid, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = linux_waitid */ { 0, (sy_call_t *)linux_add_key, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 248 = linux_add_key */ Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Sat Jun 27 14:42:08 2020 (r362692) +++ head/sys/amd64/linux/linux_systrace_args.c Sat Jun 27 14:43:29 2020 (r362693) @@ -17,7 +17,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct read_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->buf; /* char * */ - uarg[2] = p->nbyte; /* u_int */ + iarg[2] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -26,7 +26,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct write_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->buf; /* char * */ - uarg[2] = p->nbyte; /* u_int */ + iarg[2] = p->nbyte; /* l_size_t */ *n_args = 3; break; } @@ -35,7 +35,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_open_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ iarg[1] = p->flags; /* l_int */ - iarg[2] = p->mode; /* l_int */ + iarg[2] = p->mode; /* l_mode_t */ *n_args = 3; break; } @@ -103,17 +103,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_mprotect */ case 10: { struct linux_mprotect_args *p = params; - uarg[0] = (intptr_t) p->addr; /* caddr_t */ - iarg[1] = p->len; /* l_int */ - iarg[2] = p->prot; /* l_int */ + iarg[0] = p->addr; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->prot; /* l_ulong */ *n_args = 3; break; } /* munmap */ case 11: { struct munmap_args *p = params; - uarg[0] = (intptr_t) p->addr; /* caddr_t */ - iarg[1] = p->len; /* int */ + uarg[0] = (intptr_t) p->addr; /* void * */ + iarg[1] = p->len; /* l_size_t */ *n_args = 2; break; } @@ -156,7 +156,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_ioctl_args *p = params; iarg[0] = p->fd; /* l_uint */ iarg[1] = p->cmd; /* l_uint */ - uarg[2] = p->arg; /* uintptr_t */ + iarg[2] = p->arg; /* l_ulong */ *n_args = 3; break; } @@ -209,7 +209,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_pipe */ case 22: { struct linux_pipe_args *p = params; - uarg[0] = (intptr_t) p->pipefds; /* l_ulong * */ + uarg[0] = (intptr_t) p->pipefds; /* l_int * */ *n_args = 1; break; } @@ -261,9 +261,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_madvise */ case 28: { struct linux_madvise_args *p = params; - uarg[0] = (intptr_t) p->addr; /* void * */ - uarg[1] = p->len; /* size_t */ - iarg[2] = p->behav; /* int */ + iarg[0] = p->addr; /* l_ulong */ + iarg[1] = p->len; /* l_size_t */ + iarg[2] = p->behav; /* l_int */ *n_args = 3; break; } @@ -356,7 +356,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_sendfile_args *p = params; iarg[0] = p->out; /* l_int */ iarg[1] = p->in; /* l_int */ - uarg[2] = (intptr_t) p->offset; /* l_long * */ + uarg[2] = (intptr_t) p->offset; /* l_off_t * */ iarg[3] = p->count; /* l_size_t */ *n_args = 4; break; @@ -393,8 +393,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_sendto_args *p = params; iarg[0] = p->s; /* l_int */ iarg[1] = p->msg; /* l_uintptr_t */ - iarg[2] = p->len; /* l_int */ - iarg[3] = p->flags; /* l_int */ + iarg[2] = p->len; /* l_size_t */ + iarg[3] = p->flags; /* l_uint */ iarg[4] = p->to; /* l_uintptr_t */ iarg[5] = p->tolen; /* l_int */ *n_args = 6; @@ -406,7 +406,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* l_int */ iarg[1] = p->buf; /* l_uintptr_t */ iarg[2] = p->len; /* l_size_t */ - iarg[3] = p->flags; /* l_int */ + iarg[3] = p->flags; /* l_uint */ iarg[4] = p->from; /* l_uintptr_t */ iarg[5] = p->fromlen; /* l_uintptr_t */ *n_args = 6; @@ -417,7 +417,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_sendmsg_args *p = params; iarg[0] = p->s; /* l_int */ iarg[1] = p->msg; /* l_uintptr_t */ - iarg[2] = p->flags; /* l_int */ + iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; } @@ -426,7 +426,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_recvmsg_args *p = params; iarg[0] = p->s; /* l_int */ iarg[1] = p->msg; /* l_uintptr_t */ - iarg[2] = p->flags; /* l_int */ + iarg[2] = p->flags; /* l_uint */ *n_args = 3; break; } @@ -508,7 +508,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_clone */ case 56: { struct linux_clone_args *p = params; - iarg[0] = p->flags; /* l_int */ + iarg[0] = p->flags; /* l_ulong */ uarg[1] = (intptr_t) p->stack; /* void * */ uarg[2] = (intptr_t) p->parent_tidptr; /* void * */ uarg[3] = (intptr_t) p->child_tidptr; /* void * */ @@ -555,7 +555,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_kill */ case 62: { struct linux_kill_args *p = params; - iarg[0] = p->pid; /* l_int */ + iarg[0] = p->pid; /* l_pid_t */ iarg[1] = p->signum; /* l_int */ *n_args = 2; break; @@ -675,7 +675,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 76: { struct linux_truncate_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->length; /* l_ulong */ + iarg[1] = p->length; /* l_long */ *n_args = 2; break; } @@ -683,7 +683,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 77: { struct linux_ftruncate_args *p = params; iarg[0] = p->fd; /* l_int */ - iarg[1] = p->length; /* l_long */ + iarg[1] = p->length; /* l_ulong */ *n_args = 2; break; } @@ -730,7 +730,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 83: { struct linux_mkdir_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* l_int */ + iarg[1] = p->mode; /* l_mode_t */ *n_args = 2; break; } @@ -745,7 +745,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 85: { struct linux_creat_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* l_int */ + iarg[1] = p->mode; /* l_mode_t */ *n_args = 2; break; } @@ -1112,8 +1112,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 133: { struct linux_mknod_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* l_int */ - iarg[2] = p->dev; /* l_dev_t */ + iarg[1] = p->mode; /* l_mode_t */ + iarg[2] = p->dev; /* l_uint */ *n_args = 3; break; } @@ -1127,7 +1127,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_ustat */ case 136: { struct linux_ustat_args *p = params; - iarg[0] = p->dev; /* l_dev_t */ + iarg[0] = p->dev; /* l_uint */ uarg[1] = (intptr_t) p->ubuf; /* struct l_ustat * */ *n_args = 2; break; @@ -1382,7 +1382,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 170: { struct linux_sethostname_args *p = params; uarg[0] = (intptr_t) p->hostname; /* char * */ - iarg[1] = p->len; /* l_uint */ + iarg[1] = p->len; /* l_int */ *n_args = 2; break; } @@ -1433,68 +1433,122 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_setxattr */ case 188: { - *n_args = 0; + struct linux_setxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* const char * */ + iarg[3] = p->size; /* l_size_t */ + iarg[4] = p->flags; /* l_int */ + *n_args = 5; break; } /* linux_lsetxattr */ case 189: { - *n_args = 0; + struct linux_lsetxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* const char * */ + iarg[3] = p->size; /* l_size_t */ + iarg[4] = p->flags; /* l_int */ + *n_args = 5; break; } /* linux_fsetxattr */ case 190: { - *n_args = 0; + struct linux_fsetxattr_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* const char * */ + iarg[3] = p->size; /* l_size_t */ + iarg[4] = p->flags; /* l_int */ + *n_args = 5; break; } /* linux_getxattr */ case 191: { - *n_args = 0; + struct linux_getxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* char * */ + iarg[3] = p->size; /* l_size_t */ + *n_args = 4; break; } /* linux_lgetxattr */ case 192: { - *n_args = 0; + struct linux_lgetxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* char * */ + iarg[3] = p->size; /* l_size_t */ + *n_args = 4; break; } /* linux_fgetxattr */ case 193: { - *n_args = 0; + struct linux_fgetxattr_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->name; /* const char * */ + uarg[2] = (intptr_t) p->value; /* char * */ + iarg[3] = p->size; /* l_size_t */ + *n_args = 4; break; } /* linux_listxattr */ case 194: { - *n_args = 0; + struct linux_listxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->list; /* const char * */ + iarg[2] = p->size; /* l_size_t */ + *n_args = 3; break; } /* linux_llistxattr */ case 195: { - *n_args = 0; + struct linux_llistxattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->list; /* const char * */ + iarg[2] = p->size; /* l_size_t */ + *n_args = 3; break; } /* linux_flistxattr */ case 196: { - *n_args = 0; + struct linux_flistxattr_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->list; /* const char * */ + iarg[2] = p->size; /* l_size_t */ + *n_args = 3; break; } /* linux_removexattr */ case 197: { - *n_args = 0; + struct linux_removexattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + *n_args = 2; break; } /* linux_lremovexattr */ case 198: { - *n_args = 0; + struct linux_lremovexattr_args *p = params; + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->name; /* const char * */ + *n_args = 2; break; } /* linux_fremovexattr */ case 199: { - *n_args = 0; + struct linux_fremovexattr_args *p = params; + iarg[0] = p->fd; /* l_int */ + uarg[1] = (intptr_t) p->name; /* const char * */ + *n_args = 2; break; } /* linux_tkill */ case 200: { struct linux_tkill_args *p = params; - iarg[0] = p->tid; /* l_int */ + iarg[0] = p->tid; /* l_pid_t */ iarg[1] = p->sig; /* l_int */ *n_args = 2; break; @@ -1683,7 +1737,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 230: { struct linux_clock_nanosleep_args *p = params; iarg[0] = p->which; /* clockid_t */ - iarg[1] = p->flags; /* int */ + iarg[1] = p->flags; /* l_int */ uarg[2] = (intptr_t) p->rqtp; /* struct l_timespec * */ uarg[3] = (intptr_t) p->rmtp; /* struct l_timespec * */ *n_args = 4; @@ -1719,8 +1773,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_tgkill */ case 234: { struct linux_tgkill_args *p = params; - iarg[0] = p->tgid; /* l_int */ - iarg[1] = p->pid; /* l_int */ + iarg[0] = p->tgid; /* l_pid_t */ + iarg[1] = p->pid; /* l_pid_t */ iarg[2] = p->sig; /* l_int */ *n_args = 3; break; @@ -1750,32 +1804,58 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_mq_open */ case 240: { - *n_args = 0; + struct linux_mq_open_args *p = params; + uarg[0] = (intptr_t) p->name; /* const char * */ + iarg[1] = p->oflag; /* l_int */ + iarg[2] = p->mode; /* l_mode_t */ + uarg[3] = (intptr_t) p->attr; /* struct mq_attr * */ + *n_args = 4; break; } /* linux_mq_unlink */ case 241: { - *n_args = 0; + struct linux_mq_unlink_args *p = params; + uarg[0] = (intptr_t) p->name; /* const char * */ + *n_args = 1; break; } /* linux_mq_timedsend */ case 242: { - *n_args = 0; + struct linux_mq_timedsend_args *p = params; + iarg[0] = p->mqd; /* l_mqd_t */ + uarg[1] = (intptr_t) p->msg_ptr; /* const char * */ + iarg[2] = p->msg_len; /* l_size_t */ + iarg[3] = p->msg_prio; /* l_uint */ + uarg[4] = (intptr_t) p->abs_timeout; /* const struct l_timespec * */ + *n_args = 5; break; } /* linux_mq_timedreceive */ case 243: { - *n_args = 0; + struct linux_mq_timedreceive_args *p = params; + iarg[0] = p->mqd; /* l_mqd_t */ + uarg[1] = (intptr_t) p->msg_ptr; /* char * */ + iarg[2] = p->msg_len; /* l_size_t */ + uarg[3] = (intptr_t) p->msg_prio; /* l_uint * */ + uarg[4] = (intptr_t) p->abs_timeout; /* const struct l_timespec * */ + *n_args = 5; break; } /* linux_mq_notify */ case 244: { - *n_args = 0; + struct linux_mq_notify_args *p = params; + iarg[0] = p->mqd; /* l_mqd_t */ + uarg[1] = (intptr_t) p->abs_timeout; /* const struct l_timespec * */ + *n_args = 2; break; } /* linux_mq_getsetattr */ case 245: { - *n_args = 0; + struct linux_mq_getsetattr_args *p = params; + iarg[0] = p->mqd; /* l_mqd_t */ + uarg[1] = (intptr_t) p->attr; /* const struct mq_attr * */ + uarg[2] = (intptr_t) p->oattr; /* struct mq_attr * */ + *n_args = 3; break; } /* linux_kexec_load */ @@ -1845,7 +1925,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t) p->filename; /* const char * */ iarg[2] = p->flags; /* l_int */ - iarg[3] = p->mode; /* l_int */ + iarg[3] = p->mode; /* l_mode_t */ *n_args = 4; break; } @@ -1854,7 +1934,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_mkdirat_args *p = params; iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t) p->pathname; /* const char * */ - iarg[2] = p->mode; /* l_int */ + iarg[2] = p->mode; /* l_mode_t */ *n_args = 3; break; } @@ -1863,7 +1943,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg struct linux_mknodat_args *p = params; iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t) p->filename; /* const char * */ - iarg[2] = p->mode; /* l_int */ + iarg[2] = p->mode; /* l_mode_t */ iarg[3] = p->dev; /* l_uint */ *n_args = 4; break; @@ -1981,7 +2061,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg case 271: { struct linux_ppoll_args *p = params; uarg[0] = (intptr_t) p->fds; /* struct pollfd * */ - uarg[1] = p->nfds; /* uint32_t */ + iarg[1] = p->nfds; /* l_uint */ uarg[2] = (intptr_t) p->tsp; /* struct l_timespec * */ uarg[3] = (intptr_t) p->sset; /* l_sigset_t * */ iarg[4] = p->ssize; /* l_size_t */ @@ -2026,7 +2106,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->fd; /* l_int */ iarg[1] = p->offset; /* l_loff_t */ iarg[2] = p->nbytes; /* l_loff_t */ - uarg[3] = p->flags; /* unsigned int */ + iarg[3] = p->flags; /* l_uint */ *n_args = 4; break; } @@ -2116,7 +2196,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg iarg[0] = p->s; /* l_int */ iarg[1] = p->addr; /* l_uintptr_t */ iarg[2] = p->namelen; /* l_uintptr_t */ - iarg[3] = p->flags; /* int */ + iarg[3] = p->flags; /* l_int */ *n_args = 4; break; } @@ -2143,8 +2223,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_dup3 */ case 292: { struct linux_dup3_args *p = params; - iarg[0] = p->oldfd; /* l_int */ - iarg[1] = p->newfd; /* l_int */ + iarg[0] = p->oldfd; /* l_uint */ + iarg[1] = p->newfd; /* l_uint */ iarg[2] = p->flags; /* l_int */ *n_args = 3; break; @@ -2351,7 +2431,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[1] = (intptr_t) p->oldname; /* const char * */ iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ - uarg[4] = p->flags; /* unsigned int */ + iarg[4] = p->flags; /* l_uint */ *n_args = 5; break; } @@ -2564,7 +2644,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -2580,7 +2660,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "userland char *"; break; case 2: - p = "u_int"; + p = "l_size_t"; break; default: break; @@ -2596,7 +2676,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "l_int"; break; case 2: - p = "l_int"; + p = "l_mode_t"; break; default: break; @@ -2712,13 +2792,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 10: switch(ndx) { case 0: - p = "caddr_t"; + p = "l_ulong"; break; case 1: - p = "l_int"; + p = "l_size_t"; break; case 2: - p = "l_int"; + p = "l_ulong"; break; default: break; @@ -2728,10 +2808,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d case 11: switch(ndx) { case 0: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jun 27 15:50:35 2020 Return-Path: Delivered-To: svn-src-head@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 B607F354DB6; Sat, 27 Jun 2020 15:50:35 +0000 (UTC) (envelope-from trasz@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 49vJB34N29z46vH; Sat, 27 Jun 2020 15:50:35 +0000 (UTC) (envelope-from trasz@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 917962745B; Sat, 27 Jun 2020 15:50:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RFoZBj025660; Sat, 27 Jun 2020 15:50:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RFoZY0025659; Sat, 27 Jun 2020 15:50:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006271550.05RFoZY0025659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 27 Jun 2020 15:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362699 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 15:50:35 -0000 Author: trasz Date: Sat Jun 27 15:50:35 2020 New Revision: 362699 URL: https://svnweb.freebsd.org/changeset/base/362699 Log: Make linux(4) warn about unsupported SA_ flags. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25453 Modified: head/sys/compat/linux/linux_signal.c Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Sat Jun 27 15:06:58 2020 (r362698) +++ head/sys/compat/linux/linux_signal.c Sat Jun 27 15:50:35 2020 (r362699) @@ -63,24 +63,56 @@ static void sicode_to_lsicode(int si_code, int *lsi_co static void linux_to_bsd_sigaction(l_sigaction_t *lsa, struct sigaction *bsa) { + unsigned long flags; linux_to_bsd_sigset(&lsa->lsa_mask, &bsa->sa_mask); bsa->sa_handler = PTRIN(lsa->lsa_handler); bsa->sa_flags = 0; - if (lsa->lsa_flags & LINUX_SA_NOCLDSTOP) + + flags = lsa->lsa_flags; + if (lsa->lsa_flags & LINUX_SA_NOCLDSTOP) { + flags &= ~LINUX_SA_NOCLDSTOP; bsa->sa_flags |= SA_NOCLDSTOP; - if (lsa->lsa_flags & LINUX_SA_NOCLDWAIT) + } + if (lsa->lsa_flags & LINUX_SA_NOCLDWAIT) { + flags &= ~LINUX_SA_NOCLDWAIT; bsa->sa_flags |= SA_NOCLDWAIT; - if (lsa->lsa_flags & LINUX_SA_SIGINFO) + } + if (lsa->lsa_flags & LINUX_SA_SIGINFO) { + flags &= ~LINUX_SA_SIGINFO; bsa->sa_flags |= SA_SIGINFO; - if (lsa->lsa_flags & LINUX_SA_ONSTACK) +#ifdef notyet + /* + * XXX: We seem to be missing code to convert + * some of the fields in ucontext_t. + */ + linux_msg(curthread, + "partially unsupported sigaction flag SA_SIGINFO"); +#endif + } + if (lsa->lsa_flags & LINUX_SA_RESTORER) { + flags &= ~LINUX_SA_RESTORER; + /* XXX: We might want to handle it; see Linux sigreturn(2). */ + } + if (lsa->lsa_flags & LINUX_SA_ONSTACK) { + flags &= ~LINUX_SA_ONSTACK; bsa->sa_flags |= SA_ONSTACK; - if (lsa->lsa_flags & LINUX_SA_RESTART) + } + if (lsa->lsa_flags & LINUX_SA_RESTART) { + flags &= ~LINUX_SA_RESTART; bsa->sa_flags |= SA_RESTART; - if (lsa->lsa_flags & LINUX_SA_ONESHOT) + } + if (lsa->lsa_flags & LINUX_SA_ONESHOT) { + flags &= ~LINUX_SA_ONESHOT; bsa->sa_flags |= SA_RESETHAND; - if (lsa->lsa_flags & LINUX_SA_NOMASK) + } + if (lsa->lsa_flags & LINUX_SA_NOMASK) { + flags &= ~LINUX_SA_NOMASK; bsa->sa_flags |= SA_NODEFER; + } + + if (flags != 0) + linux_msg(curthread, "unsupported sigaction flag %#lx", flags); } static void From owner-svn-src-head@freebsd.org Sat Jun 27 16:31:05 2020 Return-Path: Delivered-To: svn-src-head@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 5993C3564B4; Sat, 27 Jun 2020 16:31:05 +0000 (UTC) (envelope-from grembo@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 49vK4n1mTKz49Rg; Sat, 27 Jun 2020 16:31:05 +0000 (UTC) (envelope-from grembo@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 37FD227E3A; Sat, 27 Jun 2020 16:31:05 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RGV5j2054484; Sat, 27 Jun 2020 16:31:05 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RGV59V054483; Sat, 27 Jun 2020 16:31:05 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <202006271631.05RGV59V054483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sat, 27 Jun 2020 16:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362700 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: grembo X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 16:31:05 -0000 Author: grembo (ports committer) Date: Sat Jun 27 16:31:04 2020 New Revision: 362700 URL: https://svnweb.freebsd.org/changeset/base/362700 Log: Document new kern.tty_info_kstacks tunable. Reviewed by: manpages (imp), 0mp Differential Revision: https://reviews.freebsd.org/D25488 Modified: head/share/man/man4/termios.4 Modified: head/share/man/man4/termios.4 ============================================================================== --- head/share/man/man4/termios.4 Sat Jun 27 15:50:35 2020 (r362699) +++ head/share/man/man4/termios.4 Sat Jun 27 16:31:04 2020 (r362700) @@ -28,7 +28,7 @@ .\" @(#)termios.4 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 26, 2009 +.Dd June 27, 2020 .Dt TERMIOS 4 .Os .Sh NAME @@ -761,6 +761,13 @@ command in the foreground, its process ID, the symboli wait channel, the number of user and system seconds used, the percentage of cpu the process is getting, and the resident set size of the process. +.Pp +In case the +.Xr sysctl 8 +variable +.Va kern.tty_info_kstacks +is set to a non-zero value, the running thread's stack is +written to the terminal (e.g., for debugging purposes). .El .Pp The @@ -1586,4 +1593,5 @@ the values in the header .Xr tcsendbreak 3 , .Xr tcsetattr 3 , .Xr tcsetsid 3 , -.Xr tty 4 +.Xr tty 4 , +.Xr stack 9 From owner-svn-src-head@freebsd.org Sat Jun 27 19:09:34 2020 Return-Path: Delivered-To: svn-src-head@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 740C335A18B; Sat, 27 Jun 2020 19:09:34 +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 49vNbf2SRyz4Krw; Sat, 27 Jun 2020 19:09:34 +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 4FA1F9EF5; Sat, 27 Jun 2020 19:09:34 +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 05RJ9YQl048996; Sat, 27 Jun 2020 19:09:34 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RJ9Xae048991; Sat, 27 Jun 2020 19:09:33 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006271909.05RJ9Xae048991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sat, 27 Jun 2020 19:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362705 - head/bin/ps X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/bin/ps X-SVN-Commit-Revision: 362705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:09:34 -0000 Author: pstef Date: Sat Jun 27 19:09:33 2020 New Revision: 362705 URL: https://svnweb.freebsd.org/changeset/base/362705 Log: ps(1): reuse keyword "cpu" to show CPU number This flag will now show the processor number on which a process is running. This change was inspired by PR129965. Initially I didn't think that the patch attached to it was correct -- it sacrificed ki_estcpu use in "cpu" for ki_lastcpu and I thought that the old functionality should be kept and the new (cpu#) one added to it. But I've since discovered that ki_estcpu is sched_4bsd-specific. What's worse, it represents the same thing as ki_pctcpu, except ki_pctcpu is universal -- so "%cpu" has been using it successfully. Therefore, I've decided to replace information based on ki_estcpu with information based on ki_oncpu/ki_lastcpu. Key parts of the code and manual changes were borrowed from top(1). PR: 129965 Reported by: Nikola Knežević MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25377 Modified: head/bin/ps/extern.h head/bin/ps/keyword.c head/bin/ps/print.c head/bin/ps/ps.1 head/bin/ps/ps.c Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Sat Jun 27 18:35:00 2020 (r362704) +++ head/bin/ps/extern.h Sat Jun 27 19:09:33 2020 (r362705) @@ -41,13 +41,14 @@ extern fixpt_t ccpu; extern int cflag, eval, fscale, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; -extern int showthreads, sumrusage, termwidth; +extern int showthreads, sumrusage, termwidth, smp; extern STAILQ_HEAD(velisthead, varent) varlist; __BEGIN_DECLS char *arguments(KINFO *, VARENT *); char *command(KINFO *, VARENT *); char *cputime(KINFO *, VARENT *); +char *cpunum(KINFO *, VARENT *); int donlist(void); char *elapsed(KINFO *, VARENT *); char *elapseds(KINFO *, VARENT *); Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Sat Jun 27 18:35:00 2020 (r362704) +++ head/bin/ps/keyword.c Sat Jun 27 19:09:33 2020 (r362705) @@ -83,8 +83,7 @@ static VAR var[] = { CHAR, NULL, 0}, {"cow", "COW", NULL, "copy-on-write-faults", 0, kvar, KOFF(ki_cow), UINT, "u", 0}, - {"cpu", "CPU", NULL, "cpu-usage", 0, kvar, KOFF(ki_estcpu), UINT, "d", - 0}, + {"cpu", "C", NULL, "on-cpu", 0, cpunum, 0, CHAR, NULL, 0}, {"cputime", "", "time", NULL, 0, NULL, 0, CHAR, NULL, 0}, {"dsiz", "DSIZ", NULL, "data-size", 0, kvar, KOFF(ki_dsize), PGTOK, "ld", 0}, Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Sat Jun 27 18:35:00 2020 (r362704) +++ head/bin/ps/print.c Sat Jun 27 19:09:33 2020 (r362705) @@ -551,6 +551,22 @@ cputime(KINFO *k, VARENT *ve) } char * +cpunum(KINFO *k, VARENT *ve __unused) +{ + char *cpu; + + if (!smp) + return (NULL); + + if (k->ki_p->ki_stat == SRUN && k->ki_p->ki_oncpu != NOCPU) { + asprintf(&cpu, "%d", k->ki_p->ki_oncpu); + } else { + asprintf(&cpu, "%d", k->ki_p->ki_lastcpu); + } + return (cpu); +} + +char * systime(KINFO *k, VARENT *ve) { long secs, psecs; Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Sat Jun 27 18:35:00 2020 (r362704) +++ head/bin/ps/ps.1 Sat Jun 27 19:09:33 2020 (r362705) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 31, 2018 +.Dd June 27, 2020 .Dt PS 1 .Os .Sh NAME @@ -545,7 +545,8 @@ command and arguments .It Cm cow number of copy-on-write faults .It Cm cpu -short-term CPU usage factor (for scheduling) +The processor number on which the process is executing (visible only on SMP +systems). .It Cm dsiz data size (in Kbytes) .It Cm emul Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Sat Jun 27 18:35:00 2020 (r362704) +++ head/bin/ps/ps.c Sat Jun 27 19:09:33 2020 (r362705) @@ -105,6 +105,7 @@ int rawcpu; /* -C */ int sumrusage; /* -S */ int termwidth; /* Width of the screen (0 == infinity). */ int showthreads; /* will threads be shown? */ +int smp; /* multi-processor support */ struct velisthead varlist = STAILQ_HEAD_INITIALIZER(varlist); @@ -157,6 +158,7 @@ static void saveuser(KINFO *); static void scanvars(void); static void sizevars(void); static void pidmax_init(void); +static void smp_init(void); static void usage(void); static char dfmt[] = "pid,tt,state,time,command"; @@ -226,6 +228,7 @@ main(int argc, char *argv[]) argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]); pidmax_init(); + smp_init(); all = descendancy = _fmt = nselectors = optfatal = 0; prtheader = showthreads = wflag = xkeep_implied = 0; @@ -1454,6 +1457,18 @@ pidmax_init(void) xo_warn("unable to read kern.pid_max"); pid_max = 99999; } +} + +static void +smp_init(void) +{ + size_t size; + + size = sizeof(smp); + if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && + sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || + size != sizeof(smp)) + smp = 0; } static void __dead2 From owner-svn-src-head@freebsd.org Sat Jun 27 19:21:11 2020 Return-Path: Delivered-To: svn-src-head@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 EAD4835A81D; Sat, 27 Jun 2020 19:21:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49vNs34hDrz4LlY; Sat, 27 Jun 2020 19:21:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05RJL2sr082429 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 27 Jun 2020 22:21:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05RJL2sr082429 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05RJL22O082428; Sat, 27 Jun 2020 22:21:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Jun 2020 22:21:02 +0300 From: Konstantin Belousov To: Piotr Pawel Stefaniak Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362705 - head/bin/ps Message-ID: <20200627192102.GD32126@kib.kiev.ua> References: <202006271909.05RJ9Xae048991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202006271909.05RJ9Xae048991@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49vNs34hDrz4LlY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:21:12 -0000 On Sat, Jun 27, 2020 at 07:09:33PM +0000, Piotr Pawel Stefaniak wrote: > Author: pstef > Date: Sat Jun 27 19:09:33 2020 > New Revision: 362705 > URL: https://svnweb.freebsd.org/changeset/base/362705 > > Log: > ps(1): reuse keyword "cpu" to show CPU number > > This flag will now show the processor number on which a process is running. > > This change was inspired by PR129965. Initially I didn't think that the > patch attached to it was correct -- it sacrificed ki_estcpu use in "cpu" > for ki_lastcpu and I thought that the old functionality should be kept and > the new (cpu#) one added to it. But I've since discovered that ki_estcpu is > sched_4bsd-specific. What's worse, it represents the same thing as > ki_pctcpu, except ki_pctcpu is universal -- so "%cpu" has been using it > successfully. Therefore, I've decided to replace information based on > ki_estcpu with information based on ki_oncpu/ki_lastcpu. > > Key parts of the code and manual changes were borrowed from top(1). > > PR: 129965 > Reported by: Nikola Knežević > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D25377 > > Modified: > head/bin/ps/extern.h > head/bin/ps/keyword.c > head/bin/ps/print.c > head/bin/ps/ps.1 > head/bin/ps/ps.c > > Modified: head/bin/ps/extern.h > ============================================================================== > --- head/bin/ps/extern.h Sat Jun 27 18:35:00 2020 (r362704) > +++ head/bin/ps/extern.h Sat Jun 27 19:09:33 2020 (r362705) > @@ -41,13 +41,14 @@ extern fixpt_t ccpu; > extern int cflag, eval, fscale, nlistread, rawcpu; > extern unsigned long mempages; > extern time_t now; > -extern int showthreads, sumrusage, termwidth; > +extern int showthreads, sumrusage, termwidth, smp; > extern STAILQ_HEAD(velisthead, varent) varlist; > > __BEGIN_DECLS > char *arguments(KINFO *, VARENT *); > char *command(KINFO *, VARENT *); > char *cputime(KINFO *, VARENT *); > +char *cpunum(KINFO *, VARENT *); > int donlist(void); > char *elapsed(KINFO *, VARENT *); > char *elapseds(KINFO *, VARENT *); > > Modified: head/bin/ps/keyword.c > ============================================================================== > --- head/bin/ps/keyword.c Sat Jun 27 18:35:00 2020 (r362704) > +++ head/bin/ps/keyword.c Sat Jun 27 19:09:33 2020 (r362705) > @@ -83,8 +83,7 @@ static VAR var[] = { > CHAR, NULL, 0}, > {"cow", "COW", NULL, "copy-on-write-faults", 0, kvar, KOFF(ki_cow), > UINT, "u", 0}, > - {"cpu", "CPU", NULL, "cpu-usage", 0, kvar, KOFF(ki_estcpu), UINT, "d", > - 0}, > + {"cpu", "C", NULL, "on-cpu", 0, cpunum, 0, CHAR, NULL, 0}, > {"cputime", "", "time", NULL, 0, NULL, 0, CHAR, NULL, 0}, > {"dsiz", "DSIZ", NULL, "data-size", 0, kvar, KOFF(ki_dsize), PGTOK, > "ld", 0}, > > Modified: head/bin/ps/print.c > ============================================================================== > --- head/bin/ps/print.c Sat Jun 27 18:35:00 2020 (r362704) > +++ head/bin/ps/print.c Sat Jun 27 19:09:33 2020 (r362705) > @@ -551,6 +551,22 @@ cputime(KINFO *k, VARENT *ve) > } > > char * > +cpunum(KINFO *k, VARENT *ve __unused) > +{ > + char *cpu; > + > + if (!smp) > + return (NULL); > + > + if (k->ki_p->ki_stat == SRUN && k->ki_p->ki_oncpu != NOCPU) { > + asprintf(&cpu, "%d", k->ki_p->ki_oncpu); > + } else { > + asprintf(&cpu, "%d", k->ki_p->ki_lastcpu); > + } > + return (cpu); > +} > + > +char * > systime(KINFO *k, VARENT *ve) > { > long secs, psecs; > > Modified: head/bin/ps/ps.1 > ============================================================================== > --- head/bin/ps/ps.1 Sat Jun 27 18:35:00 2020 (r362704) > +++ head/bin/ps/ps.1 Sat Jun 27 19:09:33 2020 (r362705) > @@ -29,7 +29,7 @@ > .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 > .\" $FreeBSD$ > .\" > -.Dd October 31, 2018 > +.Dd June 27, 2020 > .Dt PS 1 > .Os > .Sh NAME > @@ -545,7 +545,8 @@ command and arguments > .It Cm cow > number of copy-on-write faults > .It Cm cpu > -short-term CPU usage factor (for scheduling) > +The processor number on which the process is executing (visible only on SMP > +systems). > .It Cm dsiz > data size (in Kbytes) > .It Cm emul > > Modified: head/bin/ps/ps.c > ============================================================================== > --- head/bin/ps/ps.c Sat Jun 27 18:35:00 2020 (r362704) > +++ head/bin/ps/ps.c Sat Jun 27 19:09:33 2020 (r362705) > @@ -105,6 +105,7 @@ int rawcpu; /* -C */ > int sumrusage; /* -S */ > int termwidth; /* Width of the screen (0 == infinity). */ > int showthreads; /* will threads be shown? */ > +int smp; /* multi-processor support */ > > struct velisthead varlist = STAILQ_HEAD_INITIALIZER(varlist); > > @@ -157,6 +158,7 @@ static void saveuser(KINFO *); > static void scanvars(void); > static void sizevars(void); > static void pidmax_init(void); > +static void smp_init(void); > static void usage(void); > > static char dfmt[] = "pid,tt,state,time,command"; > @@ -226,6 +228,7 @@ main(int argc, char *argv[]) > argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]); > > pidmax_init(); > + smp_init(); > > all = descendancy = _fmt = nselectors = optfatal = 0; > prtheader = showthreads = wflag = xkeep_implied = 0; > @@ -1454,6 +1457,18 @@ pidmax_init(void) > xo_warn("unable to read kern.pid_max"); > pid_max = 99999; > } > +} > + > +static void > +smp_init(void) > +{ > + size_t size; > + > + size = sizeof(smp); > + if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && There is no such sysctl machdep.smp_active, and it does not make sense to call it (even if it existed in some ancient FreeBSD version, I am not sure). > + sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || > + size != sizeof(smp)) The indent on this and previous lines is wrong. > + smp = 0; > } That said, I do not see why do you need to check this kind of configuration at all, on UP we return CPU 0 for all threads. > > static void __dead2 From owner-svn-src-head@freebsd.org Sat Jun 27 19:29:08 2020 Return-Path: Delivered-To: svn-src-head@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 332EB35AC24; Sat, 27 Jun 2020 19:29:08 +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 49vP2D0ZrHz4MVc; Sat, 27 Jun 2020 19:29:08 +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 0F35DA49F; Sat, 27 Jun 2020 19:29:08 +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 05RJT795061256; Sat, 27 Jun 2020 19:29:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RJT7E4061255; Sat, 27 Jun 2020 19:29:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006271929.05RJT7E4061255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 27 Jun 2020 19:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362706 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 362706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:29:08 -0000 Author: kib Date: Sat Jun 27 19:29:07 2020 New Revision: 362706 URL: https://svnweb.freebsd.org/changeset/base/362706 Log: amd64 pmap: explain ptepindex. Reviewed by: markj Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25187 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jun 27 19:09:33 2020 (r362705) +++ head/sys/amd64/amd64/pmap.c Sat Jun 27 19:29:07 2020 (r362706) @@ -3807,6 +3807,29 @@ pmap_pinit(pmap_t pmap) * one or two pages may be held during the wait, only to be released * afterwards. This conservative approach is easily argued to avoid * race conditions. + * + * The ptepindexes, i.e. page indices, of the page table pages encountered + * while translating virtual address va are defined as follows: + * - for the page table page (last level), + * ptepindex = pmap_pde_pindex(va) = va >> PDRSHIFT, + * in other words, it is just the index of the PDE that maps the page + * table page. + * - for the page directory page, + * ptepindex = NUPDE (number of userland PD entries) + + * (pmap_pde_index(va) >> NPDEPGSHIFT) + * i.e. index of PDPE is put after the last index of PDE, + * - for the page directory pointer page, + * ptepindex = NUPDE + NUPDPE + (pmap_pde_index(va) >> (NPDEPGSHIFT + + * NPML4EPGSHIFT), + * i.e. index of pml4e is put after the last index of PDPE. + * + * Define an order on the paging entries, where all entries of the + * same height are put together, then heights are put from deepest to + * root. Then ptexpindex is the sequential number of the + * corresponding paging entry in this order. + * + * The root page at PML4 does not participate in this indexing scheme, since + * it is statically allocated by pmap_pinit() and not by _pmap_allocpte(). */ static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) From owner-svn-src-head@freebsd.org Sat Jun 27 19:29:32 2020 Return-Path: Delivered-To: svn-src-head@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 B539235AA51; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vP2h4PQDz4MT7; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id 83639AF6D; Sat, 27 Jun 2020 19:29:32 +0000 (UTC) Date: Sat, 27 Jun 2020 21:29:32 +0200 From: "Piotr P. Stefaniak" To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362705 - head/bin/ps Message-ID: <20200627192932.GA74062@freefall.freebsd.org> References: <202006271909.05RJ9Xae048991@repo.freebsd.org> <20200627192102.GD32126@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200627192102.GD32126@kib.kiev.ua> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:29:32 -0000 On 2020-06-27 22:21:02, Konstantin Belousov wrote: >On Sat, Jun 27, 2020 at 07:09:33PM +0000, Piotr Pawel Stefaniak wrote: >> Author: pstef >> @@ -1454,6 +1457,18 @@ pidmax_init(void) >> xo_warn("unable to read kern.pid_max"); >> pid_max = 99999; >> } >> +} >> + >> +static void >> +smp_init(void) >> +{ >> + size_t size; >> + >> + size = sizeof(smp); >> + if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && >There is no such sysctl machdep.smp_active, and it does not make sense to >call it (even if it existed in some ancient FreeBSD version, I am not sure). top(1) does that. >> + sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || >> + size != sizeof(smp)) >The indent on this and previous lines is wrong. > >> + smp = 0; >> } >That said, I do not see why do you need to check this kind of configuration >at all, on UP we return CPU 0 for all threads. I'll remove it. From owner-svn-src-head@freebsd.org Sat Jun 27 19:35:23 2020 Return-Path: Delivered-To: svn-src-head@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 8FE4235AF86; Sat, 27 Jun 2020 19:35:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49vP9R1JLgz4Ms0; Sat, 27 Jun 2020 19:35:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05RJZF8L085329 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 27 Jun 2020 22:35:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05RJZF8L085329 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05RJZFQ2085326; Sat, 27 Jun 2020 22:35:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Jun 2020 22:35:15 +0300 From: Konstantin Belousov To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362705 - head/bin/ps Message-ID: <20200627193515.GE32126@kib.kiev.ua> References: <202006271909.05RJ9Xae048991@repo.freebsd.org> <20200627192102.GD32126@kib.kiev.ua> <20200627192932.GA74062@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200627192932.GA74062@freefall.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49vP9R1JLgz4Ms0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 19:35:23 -0000 On Sat, Jun 27, 2020 at 09:29:32PM +0200, Piotr P. Stefaniak wrote: > On 2020-06-27 22:21:02, Konstantin Belousov wrote: > > On Sat, Jun 27, 2020 at 07:09:33PM +0000, Piotr Pawel Stefaniak wrote: > > > Author: pstef > > > > @@ -1454,6 +1457,18 @@ pidmax_init(void) > > > xo_warn("unable to read kern.pid_max"); > > > pid_max = 99999; > > > } > > > +} > > > + > > > +static void > > > +smp_init(void) > > > +{ > > > + size_t size; > > > + > > > + size = sizeof(smp); > > > + if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && > > There is no such sysctl machdep.smp_active, and it does not make sense to > > call it (even if it existed in some ancient FreeBSD version, I am not sure). > > top(1) does that. For top it have some limited value, from what I see, in !smpmode top does not add the 'C' column in CPU stat mode, which saves space. Still, machdep.smp_active perhaps should be dropped. > > > > + sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || > > > + size != sizeof(smp)) > > The indent on this and previous lines is wrong. > > > > > + smp = 0; > > > } > > That said, I do not see why do you need to check this kind of configuration > > at all, on UP we return CPU 0 for all threads. > > I'll remove it. From owner-svn-src-head@freebsd.org Sat Jun 27 20:01:57 2020 Return-Path: Delivered-To: svn-src-head@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 5D00A35B32B; Sat, 27 Jun 2020 20:01:57 +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 49vPm51qnSz4NvS; Sat, 27 Jun 2020 20:01:57 +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 1FEFFA7E5; Sat, 27 Jun 2020 20:01:57 +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 05RK1v0H085551; Sat, 27 Jun 2020 20:01:57 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RK1uHk085549; Sat, 27 Jun 2020 20:01:56 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006272001.05RK1uHk085549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sat, 27 Jun 2020 20:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362707 - head/bin/ps X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head/bin/ps X-SVN-Commit-Revision: 362707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 20:01:57 -0000 Author: pstef Date: Sat Jun 27 20:01:56 2020 New Revision: 362707 URL: https://svnweb.freebsd.org/changeset/base/362707 Log: ps(1): don't try to handle non-SMP systems As reported by kib, sysctl machdep.smp_active doesn't exist and on UP we return CPU 0 for all threads anyway. Reported by: kib Modified: head/bin/ps/extern.h head/bin/ps/print.c head/bin/ps/ps.c Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Sat Jun 27 19:29:07 2020 (r362706) +++ head/bin/ps/extern.h Sat Jun 27 20:01:56 2020 (r362707) @@ -41,7 +41,7 @@ extern fixpt_t ccpu; extern int cflag, eval, fscale, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; -extern int showthreads, sumrusage, termwidth, smp; +extern int showthreads, sumrusage, termwidth; extern STAILQ_HEAD(velisthead, varent) varlist; __BEGIN_DECLS Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Sat Jun 27 19:29:07 2020 (r362706) +++ head/bin/ps/print.c Sat Jun 27 20:01:56 2020 (r362707) @@ -555,9 +555,6 @@ cpunum(KINFO *k, VARENT *ve __unused) { char *cpu; - if (!smp) - return (NULL); - if (k->ki_p->ki_stat == SRUN && k->ki_p->ki_oncpu != NOCPU) { asprintf(&cpu, "%d", k->ki_p->ki_oncpu); } else { Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Sat Jun 27 19:29:07 2020 (r362706) +++ head/bin/ps/ps.c Sat Jun 27 20:01:56 2020 (r362707) @@ -105,7 +105,6 @@ int rawcpu; /* -C */ int sumrusage; /* -S */ int termwidth; /* Width of the screen (0 == infinity). */ int showthreads; /* will threads be shown? */ -int smp; /* multi-processor support */ struct velisthead varlist = STAILQ_HEAD_INITIALIZER(varlist); @@ -158,7 +157,6 @@ static void saveuser(KINFO *); static void scanvars(void); static void sizevars(void); static void pidmax_init(void); -static void smp_init(void); static void usage(void); static char dfmt[] = "pid,tt,state,time,command"; @@ -228,7 +226,6 @@ main(int argc, char *argv[]) argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]); pidmax_init(); - smp_init(); all = descendancy = _fmt = nselectors = optfatal = 0; prtheader = showthreads = wflag = xkeep_implied = 0; @@ -1457,18 +1454,6 @@ pidmax_init(void) xo_warn("unable to read kern.pid_max"); pid_max = 99999; } -} - -static void -smp_init(void) -{ - size_t size; - - size = sizeof(smp); - if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 && - sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) || - size != sizeof(smp)) - smp = 0; } static void __dead2 From owner-svn-src-head@freebsd.org Sat Jun 27 20:55:48 2020 Return-Path: Delivered-To: svn-src-head@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 5966035C0CB; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@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 49vQyD1XPQz4RPp; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@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 2F9EEB52F; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RKtm13016475; Sat, 27 Jun 2020 20:55:48 GMT (envelope-from joerg@FreeBSD.org) Received: (from joerg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RKtmAP016474; Sat, 27 Jun 2020 20:55:48 GMT (envelope-from joerg@FreeBSD.org) Message-Id: <202006272055.05RKtmAP016474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joerg set sender to joerg@FreeBSD.org using -f From: Joerg Wunsch Date: Sat, 27 Jun 2020 20:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362708 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: joerg X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 362708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 20:55:48 -0000 Author: joerg Date: Sat Jun 27 20:55:47 2020 New Revision: 362708 URL: https://svnweb.freebsd.org/changeset/base/362708 Log: Explain how to learn about possible recognized locale names Posix says that the interpretation of the locale string is "implementation-defined", so we ought to document what is actually recognized. Also add a cross reference to locale(1). PR: 247553 MFC after: 1 week Modified: head/lib/libc/locale/setlocale.3 Modified: head/lib/libc/locale/setlocale.3 ============================================================================== --- head/lib/libc/locale/setlocale.3 Sat Jun 27 20:01:56 2020 (r362707) +++ head/lib/libc/locale/setlocale.3 Sat Jun 27 20:55:47 2020 (r362708) @@ -115,9 +115,24 @@ argument of causes .Fn setlocale to return the current locale. +.Pp +The option +.Fl a +to the +.Xr locale 1 +command can be used to display all further possible names for the +.Fa locale +argument that are recognized. +Specifying any unrecognized value for +.Fa locale +makes +.Fn setlocale +fail. +.Pp By default, C programs start in the .Li \&"C" locale. +.Pp The only function in the library that sets the locale is .Fn setlocale ; the locale is never changed as a side effect of some other routine. @@ -150,6 +165,7 @@ and the category .Sh ERRORS No errors are defined. .Sh SEE ALSO +.Xr locale 1 , .Xr localedef 1 , .Xr catopen 3 , .Xr ctype 3 , From owner-svn-src-head@freebsd.org Sat Jun 27 21:37:49 2020 Return-Path: Delivered-To: svn-src-head@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 2BCF035D33C; Sat, 27 Jun 2020 21:37:49 +0000 (UTC) (envelope-from rmacklem@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 49vRtj0Sv9z4VXL; Sat, 27 Jun 2020 21:37:49 +0000 (UTC) (envelope-from rmacklem@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 0B3DABAFE; Sat, 27 Jun 2020 21:37:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RLbmbJ043162; Sat, 27 Jun 2020 21:37:48 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RLbm2e043161; Sat, 27 Jun 2020 21:37:48 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006272137.05RLbm2e043161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 27 Jun 2020 21:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362709 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 362709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 21:37:49 -0000 Author: rmacklem Date: Sat Jun 27 21:37:48 2020 New Revision: 362709 URL: https://svnweb.freebsd.org/changeset/base/362709 Log: Update VFS_CHECKEXP.9 to reflect how it is currently used by the NFS server. Reported by: pluknet Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D25333 Modified: head/share/man/man9/VFS_CHECKEXP.9 Modified: head/share/man/man9/VFS_CHECKEXP.9 ============================================================================== --- head/share/man/man9/VFS_CHECKEXP.9 Sat Jun 27 20:55:47 2020 (r362708) +++ head/share/man/man9/VFS_CHECKEXP.9 Sat Jun 27 21:37:48 2020 (r362709) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2020 +.Dd June 17, 2020 .Dt VFS_CHECKEXP 9 .Os .Sh NAME @@ -49,7 +49,7 @@ macro is used by the NFS server to check if a mount po to a client. .Pp The arguments it expects are: -.Bl -tag -width credanonp +.Bl -tag -width numsecflavors .It Fa mp The mount point to be checked. .It Fa nam @@ -71,21 +71,17 @@ macro should be called on a file system's mount struct is exported to a client whose address is contained in .Fa nam . .Pp -It is generally called before -.Xr VFS_FHTOVP 9 -to validate that a client has access to the file system. +It is called in the NFS server once a vnode for a file handle has been +acquired, in order to determine what access the client is allowed on +the file system the vnode resides in. +For NFSv4, it is also called whenever the lookup operation crosses a +server file system mount point, to update the access information. .Pp -The file system should call -.Xr vfs_export_lookup 9 -with the address of an appropriate -.Vt netexport -structure and the address of the client, -.Fa nam , -to verify that the client can access this file system. +The operation is file system specific, but is normally handled by +the default ``vfs_stdcheckexp''. .Sh RETURN VALUES The export flags, anonymous credentials and security flavors specific to the -client (returned by -.Xr vfs_export_lookup 9 ) +client will be returned in .Fa *exflagsp , .Fa *credanonp , From owner-svn-src-head@freebsd.org Sat Jun 27 21:52:20 2020 Return-Path: Delivered-To: svn-src-head@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 60F9335D9BB; Sat, 27 Jun 2020 21:52:20 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49vSCR72qwz4WhW; Sat, 27 Jun 2020 21:52:19 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from disco.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 574A556487; Sat, 27 Jun 2020 16:52:13 -0500 (CDT) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: John Baldwin , =?UTF-8?Q?Stefan_E=c3=9fer?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> From: Eric van Gyzen Message-ID: <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> Date: Sat, 27 Jun 2020 16:52:08 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49vSCR72qwz4WhW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:36236, ipnet:2607:fc50:1000::/36, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 21:52:20 -0000 On 6/27/20 8:11 AM, John Baldwin wrote: > On 6/27/20 5:02 AM, Stefan Eßer wrote: >> Author: se >> Date: Sat Jun 27 12:02:01 2020 >> New Revision: 362681 >> URL: https://svnweb.freebsd.org/changeset/base/362681 >> >> Log: >> Import new 2-clause BSD licenced implementation of the bc and dc commands > > Hmm, I didn't see a commit to add the vendor sources into ^/vendor first via our > standard process for contrib sources, nor any discussion about that in the review. When you add this to the vendor area, please include the tests, to remove a barrier to integration. Eric