From owner-svn-src-all@freebsd.org Sun Feb 9 04:01:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 978F822CA95; Sun, 9 Feb 2020 04:01:47 +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) server-signature RSA-PSS (4096 bits) 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 48Fb2M3K9sz4dcy; Sun, 9 Feb 2020 04:01:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 686D044F; Sun, 9 Feb 2020 04:01:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01941lHT095867; Sun, 9 Feb 2020 04:01:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01941lVm095866; Sun, 9 Feb 2020 04:01:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002090401.01941lVm095866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 04:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357687 - vendor/NetBSD/tests/dist/lib/libc/c063 X-SVN-Group: vendor X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: vendor/NetBSD/tests/dist/lib/libc/c063 X-SVN-Commit-Revision: 357687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 04:01:47 -0000 Author: kevans Date: Sun Feb 9 04:01:46 2020 New Revision: 357687 URL: https://svnweb.freebsd.org/changeset/base/357687 Log: NetBSD: tests: Import NFS O_SEARCH test fix Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c Sat Feb 8 23:07:29 2020 (r357686) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c Sun Feb 9 04:01:46 2020 (r357687) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18:06 martin Exp $ */ +/* $NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,11 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18:06 martin Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $"); #include #include +#include +#include #include #include @@ -55,6 +57,11 @@ __RCSID("$NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18: #define USE_O_SEARCH #endif +#ifdef __FreeBSD__ +#define statvfs statfs +#define fstatvfs fstatfs +#endif + #define DIR "dir" #define FILE "dir/o_search" #define BASEFILE "o_search" @@ -311,8 +318,9 @@ ATF_TC_HEAD(o_search_revokex, tc) } ATF_TC_BODY(o_search_revokex, tc) { - int dfd, fd; + struct statvfs vst; struct stat sb; + int dfd, fd; ATF_REQUIRE(mkdir(DIR, 0755) == 0); ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); @@ -322,6 +330,11 @@ ATF_TC_BODY(o_search_revokex, tc) /* Drop permissions. The kernel must still not check the exec bit. */ ATF_REQUIRE(chmod(DIR, 0000) == 0); + + fstatvfs(dfd, &vst); + if (strcmp(vst.f_fstypename, "nfs") == 0) + atf_tc_expect_fail("NFS protocol cannot observe O_SEARCH semantics"); + ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); ATF_REQUIRE(close(dfd) == 0); From owner-svn-src-all@freebsd.org Sun Feb 9 04:05:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99A0422CBF8; Sun, 9 Feb 2020 04:05:32 +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) server-signature RSA-PSS (4096 bits) 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 48Fb6g4tFfz4f1K; Sun, 9 Feb 2020 04:05:31 +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 6EED14A1; Sun, 9 Feb 2020 04:05:31 +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 01945UCs099367; Sun, 9 Feb 2020 04:05:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01945UBP099366; Sun, 9 Feb 2020 04:05:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002090405.01945UBP099366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 04:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357688 - head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Commit-Revision: 357688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 04:05:33 -0000 Author: kevans Date: Sun Feb 9 04:05:30 2020 New Revision: 357688 URL: https://svnweb.freebsd.org/changeset/base/357688 Log: MFV r357687: Import NFS fix for O_SEARCH tests The version that ended upstream was ultimately slightly different than the version committed here; notably, statvfs() is used but it's redefined appropriately to statfs() on FreeBSD since we don't provide the fstypename for the former interface. Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Directory Properties: head/contrib/netbsd-tests/ (props changed) Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 04:01:46 2020 (r357687) +++ head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 04:05:30 2020 (r357688) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18:06 martin Exp $ */ +/* $NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,16 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18:06 martin Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $"); #include #include -#ifdef __FreeBSD__ #include -#else #include -#endif #include #include @@ -60,6 +57,11 @@ __RCSID("$NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18: #define USE_O_SEARCH #endif +#ifdef __FreeBSD__ +#define statvfs statfs +#define fstatvfs fstatfs +#endif + #define DIR "dir" #define FILE "dir/o_search" #define BASEFILE "o_search" @@ -316,8 +318,9 @@ ATF_TC_HEAD(o_search_revokex, tc) } ATF_TC_BODY(o_search_revokex, tc) { - int dfd, fd; + struct statvfs vst; struct stat sb; + int dfd, fd; ATF_REQUIRE(mkdir(DIR, 0755) == 0); ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); @@ -327,23 +330,11 @@ ATF_TC_BODY(o_search_revokex, tc) /* Drop permissions. The kernel must still not check the exec bit. */ ATF_REQUIRE(chmod(DIR, 0000) == 0); - { - const char *fstypename; -#ifdef __FreeBSD__ - struct statfs st; - fstatfs(dfd, &st); - fstypename = st.f_fstypename; -#else - struct statvfs vst; + fstatvfs(dfd, &vst); + if (strcmp(vst.f_fstypename, "nfs") == 0) + atf_tc_expect_fail("NFS protocol cannot observe O_SEARCH semantics"); - fstatvfs(dfd, &vst); - fstypename = vst.f_fstypename; -#endif - if (strcmp(fstypename, "nfs") == 0) - atf_tc_expect_fail( - "NFS protocol cannot observe O_SEARCH semantics"); - } ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); ATF_REQUIRE(close(dfd) == 0); From owner-svn-src-all@freebsd.org Sun Feb 9 11:53:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC79B2362D4; Sun, 9 Feb 2020 11:53:15 +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) server-signature RSA-PSS (4096 bits) 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 48FnVM6kGzz435G; Sun, 9 Feb 2020 11:53:15 +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 E1C675D29; Sun, 9 Feb 2020 11:53:15 +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 019BrFD3097862; Sun, 9 Feb 2020 11:53:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019BrDxa097846; Sun, 9 Feb 2020 11:53:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091153.019BrDxa097846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 11:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357693 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Commit-Revision: 357693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 11:53:16 -0000 Author: kib Date: Sun Feb 9 11:53:12 2020 New Revision: 357693 URL: https://svnweb.freebsd.org/changeset/base/357693 Log: Add a way to manage thread signal mask using shared word, instead of syscall. A new syscall sigfastblock(2) is added which registers a uint32_t variable as containing the count of blocks for signal delivery. Its content is read by kernel on each syscall entry and on AST processing, non-zero count of blocks is interpreted same as the signal mask blocking all signals. The biggest downside of the feature that I see is that memory corruption that affects the registered fast sigblock location, would cause quite strange application misbehavior. For instance, the process would be immune to ^C (but killable by SIGKILL). With consumers (rtld and libthr added), benchmarks do not show a slow-down of the syscalls in micro-measurements, and macro benchmarks like buildworld do not demonstrate a difference. Part of the reason is that buildworld time is dominated by compiler, and clang already links to libthr. On the other hand, small utilities typically used by shell scripts have the total number of syscalls cut by half. The syscall is not exported from the stable libc version namespace on purpose. It is intended to be used only by our C runtime implementation internals. Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Added: head/lib/libc/sys/sigfastblock.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/compat/freebsd32/syscalls.master head/sys/kern/capabilities.conf head/sys/kern/kern_exec.c head/sys/kern/kern_fork.c head/sys/kern/kern_sig.c head/sys/kern/kern_thread.c head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/kern/syscalls.master head/sys/sys/proc.h head/sys/sys/signalvar.h Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Sun Feb 9 10:42:01 2020 (r357692) +++ head/lib/libc/sys/Makefile.inc Sun Feb 9 11:53:12 2020 (r357693) @@ -317,6 +317,7 @@ MAN+= sctp_generic_recvmsg.2 \ shutdown.2 \ sigaction.2 \ sigaltstack.2 \ + sigfastblock.2 \ sigpending.2 \ sigprocmask.2 \ sigqueue.2 \ Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Sun Feb 9 10:42:01 2020 (r357692) +++ head/lib/libc/sys/Symbol.map Sun Feb 9 11:53:12 2020 (r357693) @@ -567,6 +567,7 @@ FBSDprivate_1.0 { __sys_extattr_set_link; _extattrctl; __sys_extattrctl; + __sys_sigfastblock; _fchdir; __sys_fchdir; _fchflags; Added: head/lib/libc/sys/sigfastblock.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/sigfastblock.2 Sun Feb 9 11:53:12 2020 (r357693) @@ -0,0 +1,166 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" +.\" This documentation was written by +.\" Konstantin Belousov 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. +.\" +.\" $FreeBSD$ +.\" +.Dd December 13, 2019 +.Dt SIGFASTBLOCK 2 +.Os +.Sh NAME +.Nm sigfastblock +.Nd controls signals blocking with a simple memory write +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/signalvar.h +.Ft int +.Fn sigfastblock "int cmd" "void *ptr" +.Sh DESCRIPTION +.Bf -symbolic +This function is not intended for a direct usage by applications. +The functionality is provided for implementing some optimizations in +.Xr ld-elf.so.1 8 +and +.Lb libthr . +.Ef +.Pp +The function configures the kernel facility that allows a thread to +block asynchronous signals delivery with a single write to userspace +memory, avoiding overhead of system calls like +.Xr sigprocmask 2 +for establishing critical sections. +The C runtime uses it to optimize implementation of async-signal-safe +functionality. +.Pp +A thread might register a +.Dv sigblock +variable of type +.Vt int +as a location which is consulted by kernel when calculating the +blocked signal mask for delivery of asynchronous signals. +If the variable indicates that blocking is requested, then the kernel +effectively operates as if the mask containing all blockable signals was +supplied to +.Xr sigprocmask 2 . +.Pp +The variable is supposed to be modified only from the owning thread, +there is no way to guarantee visibility of update from other thread +to kernel when signals are delivered. +.Pp +Lower bits of the sigblock variable are reserved as flags, +which might be set or cleared by kernel at arbitrary moments. +Userspace code should use +.Xr atomic 9 +operations of incrementing and decrementing by +.Dv SIGFASTBLOCK_INC +quantity to recursively block or unblock signals delivery. +.Pp +If a signal would be delivered when unmasked, kernel might set the +.Dv SIGFASTBLOCK_PEND +.Dq pending signal +flag in the sigblock variable. +Userspace should perform +.Dv SIGFASTBLOCK_UNBLOCK +operation when clearing the variable if it notes the pending signal +bit is set, which would deliver the pending signals immediately. +Otherwise, signals delivery might be postponed. +.Pp +The +.Fa cmd +argument specifies one of the following operations: +.Bl -tag -width SIGFASTBLOCK_UNSETPTR +.It Dv SIGFASTBLOCK_SETPTR +Register the variable of type +.Vt int +at location pointed to by the +.Fa ptr +argument as sigblock variable for the calling thread. +.It Dv SIGFASTBLOCK_UNSETPTR +Unregister the currently registered sigblock location. +Kernel stops inferring the blocked mask from non-zero value of its +blocked count. +New location can be registered after previous one is deregistered. +.It Dv SIGFASTBLOCK_UNBLOCK +If there are pending signals which should be delivered to the calling +thread, they are delivered before returning from the call. +The sigblock variable should have zero blocking count, and indicate +that the pending signal exists. +Effectively this means that the variable should have the value +.Dv SIGFASTBLOCK_PEND . +.El +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +The operation may fail with the following errors: +.Bl -tag -width Er +.It Bq Er EBUSY +The +.Dv SIGFASTBLOCK_SETPTR +attempted while the sigblock address was already registered. +The +.Dv SIGFASTBLOCK_UNBLOCK +was called while sigblock variable value is not equal to +.Dv SIGFASTBLOCK_PEND . +.It Bq Er EINVAL +The variable address passed to +.Dv SIGFASTBLOCK_SETPTR +is not aligned naturally. +The +.Dv SIGFASTBLOCK_UNSETPTR +operation was attempted without prior successfull call to +.Dv SIGFASTBLOCK_SETPTR . +.It Bq Er EFAULT +Attempt to read or write to the sigblock variable failed. +Note that kernel generates the +.Dv SIGSEGV +signal if an attempt to read from the sigblock variable faulted +during implicit accesses from syscall entry. +.El +.Sh SEE ALSO +.Xr kill 2 , +.Xr signal 2 , +.Xr sigprocmask 2 , +.Xr libthr 3 , +.Xr ld-elf.so.1 8 +.Sh STANDARDS +The +.Nm +function is non-standard, although a similar functionality is a common +optimization provided by several other systems. +.Sh HISTORY +The +.Nm +function was introduced in +.Fx 13.0 . +.Sh BUGS +The +.Nm +symbol is currently not exported by libc, on purpose. +Consumers should either use the +.Dv __sys_fast_sigblock +symbol from the private libc namespace, or utilize +.Xr syscall 2 . Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/compat/freebsd32/syscalls.master Sun Feb 9 11:53:12 2020 (r357693) @@ -1159,5 +1159,6 @@ int shmflags, const char *name); } 572 AUE_SHMRENAME NOPROTO { int shm_rename(const char *path_from, \ const char *path_to, int flags); } +573 AUE_NULL NOPROTO { int sigfastblock(int cmd, uint32_t *ptr); } ; vim: syntax=off Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/capabilities.conf Sun Feb 9 11:53:12 2020 (r357693) @@ -668,6 +668,7 @@ shutdown sigaction sigaltstack sigblock +sigfastblock sigpending sigprocmask sigqueue Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/kern_exec.c Sun Feb 9 11:53:12 2020 (r357693) @@ -1025,6 +1025,7 @@ exec_new_vmspace(struct image_params *imgp, struct sys int error; struct proc *p = imgp->proc; struct vmspace *vmspace = p->p_vmspace; + struct thread *td = curthread; vm_object_t obj; struct rlimit rlim_stack; vm_offset_t sv_minuser, stack_addr; @@ -1033,6 +1034,10 @@ exec_new_vmspace(struct image_params *imgp, struct sys imgp->vmspace_destroyed = 1; imgp->sysent = sv; + + td->td_pflags &= ~TDP_SIGFASTBLOCK; + td->td_sigblock_ptr = NULL; + td->td_sigblock_val = 0; /* May be called with Giant held */ EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/kern_fork.c Sun Feb 9 11:53:12 2020 (r357693) @@ -563,7 +563,8 @@ do_fork(struct thread *td, struct fork_req *fr, struct * been preserved. */ p2->p_flag |= p1->p_flag & P_SUGID; - td2->td_pflags |= (td->td_pflags & TDP_ALTSTACK) | TDP_FORKING; + td2->td_pflags |= (td->td_pflags & (TDP_ALTSTACK | + TDP_SIGFASTBLOCK)) | TDP_FORKING; SESS_LOCK(p1->p_session); if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) p2->p_flag |= P_CONTROLT; Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/kern_sig.c Sun Feb 9 11:53:12 2020 (r357693) @@ -114,7 +114,7 @@ static int sig_suspend_threads(struct thread *, struct static int filt_sigattach(struct knote *kn); static void filt_sigdetach(struct knote *kn); static int filt_signal(struct knote *kn, long hint); -static struct thread *sigtd(struct proc *p, int sig, int prop); +static struct thread *sigtd(struct proc *p, int sig, bool fast_sigblock); static void sigqueue_start(void); static uma_zone_t ksiginfo_zone = NULL; @@ -238,7 +238,7 @@ static int sigproptbl[NSIG] = { [SIGUSR2] = SIGPROP_KILL, }; -static void reschedule_signals(struct proc *p, sigset_t block, int flags); +sigset_t fastblock_mask; static void sigqueue_start(void) @@ -249,6 +249,8 @@ sigqueue_start(void) p31b_setcfg(CTL_P1003_1B_REALTIME_SIGNALS, _POSIX_REALTIME_SIGNALS); p31b_setcfg(CTL_P1003_1B_RTSIG_MAX, SIGRTMAX - SIGRTMIN + 1); p31b_setcfg(CTL_P1003_1B_SIGQUEUE_MAX, max_pending_per_proc); + SIGFILLSET(fastblock_mask); + SIG_CANTMASK(fastblock_mask); } ksiginfo_t * @@ -1995,8 +1997,8 @@ trapsignal(struct thread *td, ksiginfo_t *ksi) { struct sigacts *ps; struct proc *p; - int sig; - int code; + sigset_t sigmask; + int code, sig; p = td->td_proc; sig = ksi->ksi_signo; @@ -2006,8 +2008,11 @@ trapsignal(struct thread *td, ksiginfo_t *ksi) PROC_LOCK(p); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); + sigmask = td->td_sigmask; + if (td->td_sigblock_val != 0) + SIGSETOR(sigmask, fastblock_mask); if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(ps->ps_sigcatch, sig) && - !SIGISMEMBER(td->td_sigmask, sig)) { + !SIGISMEMBER(sigmask, sig)) { #ifdef KTRACE if (KTRPOINT(curthread, KTR_PSIG)) ktrpsig(sig, ps->ps_sigact[_SIG_IDX(sig)], @@ -2023,13 +2028,14 @@ trapsignal(struct thread *td, ksiginfo_t *ksi) * masking the signal or process is ignoring the * signal. */ - if (kern_forcesigexit && - (SIGISMEMBER(td->td_sigmask, sig) || - ps->ps_sigact[_SIG_IDX(sig)] == SIG_IGN)) { + if (kern_forcesigexit && (SIGISMEMBER(sigmask, sig) || + ps->ps_sigact[_SIG_IDX(sig)] == SIG_IGN)) { SIGDELSET(td->td_sigmask, sig); SIGDELSET(ps->ps_sigcatch, sig); SIGDELSET(ps->ps_sigignore, sig); ps->ps_sigact[_SIG_IDX(sig)] = SIG_DFL; + td->td_pflags &= ~TDP_SIGFASTBLOCK; + td->td_sigblock_val = 0; } mtx_unlock(&ps->ps_mtx); p->p_sig = sig; /* XXX to verify code */ @@ -2039,21 +2045,24 @@ trapsignal(struct thread *td, ksiginfo_t *ksi) } static struct thread * -sigtd(struct proc *p, int sig, int prop) +sigtd(struct proc *p, int sig, bool fast_sigblock) { struct thread *td, *signal_td; PROC_LOCK_ASSERT(p, MA_OWNED); + MPASS(!fast_sigblock || p == curproc); /* * Check if current thread can handle the signal without * switching context to another thread. */ - if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig)) + if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig) && + (!fast_sigblock || curthread->td_sigblock_val == 0)) return (curthread); signal_td = NULL; FOREACH_THREAD_IN_PROC(p, td) { - if (!SIGISMEMBER(td->td_sigmask, sig)) { + if (!SIGISMEMBER(td->td_sigmask, sig) && (!fast_sigblock || + td != curthread || td->td_sigblock_val == 0)) { signal_td = td; break; } @@ -2167,7 +2176,7 @@ tdsendsignal(struct proc *p, struct thread *td, int si prop = sigprop(sig); if (td == NULL) { - td = sigtd(p, sig, prop); + td = sigtd(p, sig, false); sigqueue = &p->p_sigqueue; } else sigqueue = &td->td_sigqueue; @@ -2562,7 +2571,6 @@ ptracestop(struct thread *td, int sig, ksiginfo_t *si) struct proc *p = td->td_proc; struct thread *td2; ksiginfo_t ksi; - int prop; PROC_LOCK_ASSERT(p, MA_OWNED); KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process")); @@ -2659,8 +2667,7 @@ stopme: ksiginfo_init(&ksi); ksi.ksi_signo = td->td_xsig; ksi.ksi_flags |= KSI_PTRACE; - prop = sigprop(td->td_xsig); - td2 = sigtd(p, td->td_xsig, prop); + td2 = sigtd(p, td->td_xsig, false); tdsendsignal(p, td2, td->td_xsig, &ksi); if (td != td2) return (0); @@ -2669,33 +2676,45 @@ stopme: return (td->td_xsig); } -static void +void reschedule_signals(struct proc *p, sigset_t block, int flags) { struct sigacts *ps; struct thread *td; int sig; + bool fastblk, pslocked; PROC_LOCK_ASSERT(p, MA_OWNED); ps = p->p_sigacts; - mtx_assert(&ps->ps_mtx, (flags & SIGPROCMASK_PS_LOCKED) != 0 ? - MA_OWNED : MA_NOTOWNED); + pslocked = (flags & SIGPROCMASK_PS_LOCKED) != 0; + mtx_assert(&ps->ps_mtx, pslocked ? MA_OWNED : MA_NOTOWNED); if (SIGISEMPTY(p->p_siglist)) return; SIGSETAND(block, p->p_siglist); + fastblk = (flags & SIGPROCMASK_FASTBLK) != 0; while ((sig = sig_ffs(&block)) != 0) { SIGDELSET(block, sig); - td = sigtd(p, sig, 0); + td = sigtd(p, sig, fastblk); + + /* + * If sigtd() selected us despite sigfastblock is + * blocking, do not activate AST or wake us, to avoid + * loop in AST handler. + */ + if (fastblk && td == curthread) + continue; + signotify(td); - if (!(flags & SIGPROCMASK_PS_LOCKED)) + if (!pslocked) mtx_lock(&ps->ps_mtx); if (p->p_flag & P_TRACED || (SIGISMEMBER(ps->ps_sigcatch, sig) && - !SIGISMEMBER(td->td_sigmask, sig))) + !SIGISMEMBER(td->td_sigmask, sig))) { tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : - ERESTART)); - if (!(flags & SIGPROCMASK_PS_LOCKED)) + ERESTART)); + } + if (!pslocked) mtx_unlock(&ps->ps_mtx); } } @@ -2844,6 +2863,24 @@ issignal(struct thread *td) SIG_STOPSIGMASK(sigpending); if (SIGISEMPTY(sigpending)) /* no signal to send */ return (0); + + /* + * Do fast sigblock if requested by usermode. Since + * we do know that there was a signal pending at this + * point, set the FAST_SIGBLOCK_PEND as indicator for + * usermode to perform a dummy call to + * FAST_SIGBLOCK_UNBLOCK, which causes immediate + * delivery of postponed pending signal. + */ + if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0) { + if (td->td_sigblock_val != 0) + SIGSETNAND(sigpending, fastblock_mask); + if (SIGISEMPTY(sigpending)) { + td->td_pflags |= TDP_SIGFASTPENDING; + return (0); + } + } + if ((p->p_flag & (P_TRACED | P_PPTRACE)) == P_TRACED && (p->p_flag2 & P2_PTRACE_FSTP) != 0 && SIGISMEMBER(sigpending, SIGSTOP)) { @@ -3913,4 +3950,119 @@ sig_drop_caught(struct proc *p) if ((sigprop(sig) & SIGPROP_IGNORE) != 0) sigqueue_delete_proc(p, sig); } +} + +int +sys_sigfastblock(struct thread *td, struct sigfastblock_args *uap) +{ + struct proc *p; + int error, res; + uint32_t oldval; + + error = 0; + switch (uap->cmd) { + case SIGFASTBLOCK_SETPTR: + if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0) { + error = EBUSY; + break; + } + if (((uintptr_t)(uap->ptr) & (sizeof(uint32_t) - 1)) != 0) { + error = EINVAL; + break; + } + td->td_pflags |= TDP_SIGFASTBLOCK; + td->td_sigblock_ptr = uap->ptr; + break; + + case SIGFASTBLOCK_UNBLOCK: + if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0) { + error = EINVAL; + break; + } +again: + res = casueword32(td->td_sigblock_ptr, SIGFASTBLOCK_PEND, + &oldval, 0); + if (res == -1) { + error = EFAULT; + break; + } + if (res == 1) { + if (oldval != SIGFASTBLOCK_PEND) { + error = EBUSY; + break; + } + error = thread_check_susp(td, false); + if (error != 0) + break; + goto again; + } + td->td_sigblock_val = 0; + + /* + * Rely on normal ast mechanism to deliver pending + * signals to current thread. But notify others about + * fake unblock. + */ + p = td->td_proc; + if (error == 0 && p->p_numthreads != 1) { + PROC_LOCK(p); + reschedule_signals(p, td->td_sigmask, 0); + PROC_UNLOCK(p); + } + break; + + case SIGFASTBLOCK_UNSETPTR: + if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0) { + error = EINVAL; + break; + } + res = fueword32(td->td_sigblock_ptr, &oldval); + if (res == -1) { + error = EFAULT; + break; + } + if (oldval != 0 && oldval != SIGFASTBLOCK_PEND) { + error = EBUSY; + break; + } + td->td_pflags &= ~TDP_SIGFASTBLOCK; + td->td_sigblock_val = 0; + break; + + default: + error = EINVAL; + break; + } + return (error); +} + +void +fetch_sigfastblock(struct thread *td) +{ + + if ((td->td_pflags & TDP_SIGFASTBLOCK) == 0) + return; + if (fueword32(td->td_sigblock_ptr, &td->td_sigblock_val) == -1) { + fetch_sigfastblock_failed(td, false); + return; + } + td->td_sigblock_val &= ~SIGFASTBLOCK_FLAGS; +} + +void +fetch_sigfastblock_failed(struct thread *td, bool write) +{ + ksiginfo_t ksi; + + /* + * Prevent further fetches and SIGSEGVs, allowing thread to + * issue syscalls despite corruption. + */ + td->td_pflags &= ~TDP_SIGFASTBLOCK; + + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = write ? SEGV_ACCERR : SEGV_MAPERR; + ksi.ksi_addr = td->td_sigblock_ptr; + trapsignal(td, &ksi); } Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/kern_thread.c Sun Feb 9 11:53:12 2020 (r357693) @@ -82,9 +82,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x "struct thread KBI td_flags"); _Static_assert(offsetof(struct thread, td_pflags) == 0x104, "struct thread KBI td_pflags"); -_Static_assert(offsetof(struct thread, td_frame) == 0x480, +_Static_assert(offsetof(struct thread, td_frame) == 0x490, "struct thread KBI td_frame"); -_Static_assert(offsetof(struct thread, td_emuldata) == 0x690, +_Static_assert(offsetof(struct thread, td_emuldata) == 0x6a0, "struct thread KBI td_emuldata"); _Static_assert(offsetof(struct proc, p_flag) == 0xb0, "struct proc KBI p_flag"); @@ -102,9 +102,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x "struct thread KBI td_flags"); _Static_assert(offsetof(struct thread, td_pflags) == 0xa0, "struct thread KBI td_pflags"); -_Static_assert(offsetof(struct thread, td_frame) == 0x2f0, +_Static_assert(offsetof(struct thread, td_frame) == 0x2f8, "struct thread KBI td_frame"); -_Static_assert(offsetof(struct thread, td_emuldata) == 0x338, +_Static_assert(offsetof(struct thread, td_emuldata) == 0x340, "struct thread KBI td_emuldata"); _Static_assert(offsetof(struct proc, p_flag) == 0x68, "struct proc KBI p_flag"); Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/subr_syscall.c Sun Feb 9 11:53:12 2020 (r357693) @@ -140,6 +140,13 @@ syscallenter(struct thread *td) /* Let system calls set td_errno directly. */ td->td_pflags &= ~TDP_NERRNO; + /* + * Fetch fast sigblock value at the time of syscall + * entry because sleepqueue primitives might call + * cursig(). + */ + fetch_sigfastblock(td); + AUDIT_SYSCALL_ENTER(sa->code, td); error = (sa->callp->sy_call)(td, sa->args); AUDIT_SYSCALL_EXIT(error, td); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/subr_trap.c Sun Feb 9 11:53:12 2020 (r357693) @@ -116,12 +116,16 @@ userret(struct thread *td, struct trapframe *frame) if (p->p_numthreads == 1) { PROC_LOCK(p); thread_lock(td); - if ((p->p_flag & P_PPWAIT) == 0) { - KASSERT(!SIGPENDING(td) || (td->td_flags & - (TDF_NEEDSIGCHK | TDF_ASTPENDING)) == - (TDF_NEEDSIGCHK | TDF_ASTPENDING), - ("failed to set signal flags for ast p %p " - "td %p fl %x", p, td, td->td_flags)); + if ((p->p_flag & P_PPWAIT) == 0 && + (td->td_pflags & TDP_SIGFASTBLOCK) == 0) { + if (SIGPENDING(td) && (td->td_flags & + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) != + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) { + thread_unlock(td); + panic( + "failed to set signal flags for ast p %p td %p fl %x", + p, td, td->td_flags); + } } thread_unlock(td); PROC_UNLOCK(p); @@ -218,8 +222,8 @@ ast(struct trapframe *framep) { struct thread *td; struct proc *p; - int flags; - int sig; + uint32_t oldval; + int flags, sig, res; td = curthread; p = td->td_proc; @@ -298,12 +302,16 @@ ast(struct trapframe *framep) * the reason for looping check for AST condition. * See comment in userret() about P_PPWAIT. */ - if ((p->p_flag & P_PPWAIT) == 0) { - KASSERT(!SIGPENDING(td) || (td->td_flags & - (TDF_NEEDSIGCHK | TDF_ASTPENDING)) == - (TDF_NEEDSIGCHK | TDF_ASTPENDING), - ("failed2 to set signal flags for ast p %p td %p " - "fl %x %x", p, td, flags, td->td_flags)); + if ((p->p_flag & P_PPWAIT) == 0 && + (td->td_pflags & TDP_SIGFASTBLOCK) == 0) { + if (SIGPENDING(td) && (td->td_flags & + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) != + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) { + thread_unlock(td); /* fix dumps */ + panic( + "failed2 to set signal flags for ast p %p td %p fl %x %x", + p, td, flags, td->td_flags); + } } thread_unlock(td); PROC_UNLOCK(p); @@ -317,15 +325,54 @@ ast(struct trapframe *framep) */ if (flags & TDF_NEEDSIGCHK || p->p_pendingcnt > 0 || !SIGISEMPTY(p->p_siglist)) { + fetch_sigfastblock(td); PROC_LOCK(p); mtx_lock(&p->p_sigacts->ps_mtx); - while ((sig = cursig(td)) != 0) { - KASSERT(sig >= 0, ("sig %d", sig)); - postsig(sig); + if ((td->td_pflags & TDP_SIGFASTBLOCK) != 0 && + td->td_sigblock_val != 0) { + reschedule_signals(p, fastblock_mask, + SIGPROCMASK_PS_LOCKED | SIGPROCMASK_FASTBLK); + } else { + while ((sig = cursig(td)) != 0) { + KASSERT(sig >= 0, ("sig %d", sig)); + postsig(sig); + } } mtx_unlock(&p->p_sigacts->ps_mtx); PROC_UNLOCK(p); } + + /* + * Handle deferred update of the fast sigblock value, after + * the postsig() loop was performed. + */ + if (td->td_pflags & TDP_SIGFASTPENDING) { + td->td_pflags &= ~TDP_SIGFASTPENDING; + res = fueword32(td->td_sigblock_ptr, &oldval); + if (res == -1) { + fetch_sigfastblock_failed(td, false); + } else { + for (;;) { + oldval |= SIGFASTBLOCK_PEND; + res = casueword32(td->td_sigblock_ptr, oldval, + &oldval, oldval | SIGFASTBLOCK_PEND); + if (res == -1) { + fetch_sigfastblock_failed(td, true); + break; + } + if (res == 0) { + td->td_sigblock_val = oldval & + ~SIGFASTBLOCK_FLAGS; + break; + } + MPASS(res == 1); + res = thread_check_susp(td, false); + if (res != 0) + break; + } + } + } + /* * We need to check to see if we have to exit or wait due to a * single threading requirement or some other STOP condition. Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/kern/syscalls.master Sun Feb 9 11:53:12 2020 (r357693) @@ -3212,6 +3212,12 @@ int flags ); } +573 AUE_NULL STD { + int sigfastblock( + int cmd, + _Inout_opt_ uint32_t *ptr + ); + } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/sys/proc.h Sun Feb 9 11:53:12 2020 (r357693) @@ -322,6 +322,9 @@ struct thread { uintptr_t td_rb_inact; /* (k) Current in-action mutex loc. */ struct syscall_args td_sa; /* (kx) Syscall parameters. Copied on fork for child tracing. */ + void *td_sigblock_ptr; /* (k) uptr for fast sigblock. */ + uint32_t td_sigblock_val; /* (k) fast sigblock value read at + td_sigblock_ptr on kern entry */ #define td_endcopy td_pcb /* @@ -486,7 +489,7 @@ do { \ #define TDP_ALTSTACK 0x00000020 /* Have alternate signal stack. */ #define TDP_DEADLKTREAT 0x00000040 /* Lock acquisition - deadlock treatment. */ #define TDP_NOFAULTING 0x00000080 /* Do not handle page faults. */ -#define TDP_UNUSED9 0x00000100 /* --available-- */ +#define TDP_SIGFASTBLOCK 0x00000100 /* Fast sigblock active */ #define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */ #define TDP_ITHREAD 0x00000400 /* Thread is an interrupt thread. */ #define TDP_SYNCIO 0x00000800 /* Local override, disable async i/o. */ @@ -509,6 +512,7 @@ do { \ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ #define TDP_FORKING 0x20000000 /* Thread is being created through fork() */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ +#define TDP_SIGFASTPENDING 0x80000000 /* Pending signal due to sigfastblock */ /* * Reasons that the current thread can not be run yet. Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Feb 9 10:42:01 2020 (r357692) +++ head/sys/sys/signalvar.h Sun Feb 9 11:53:12 2020 (r357693) @@ -256,7 +256,23 @@ typedef struct sigqueue { /* Flags for ksi_flags */ #define SQ_INIT 0x01 +/* + * Fast_sigblock + */ +#define SIGFASTBLOCK_SETPTR 1 +#define SIGFASTBLOCK_UNBLOCK 2 +#define SIGFASTBLOCK_UNSETPTR 3 + +#define SIGFASTBLOCK_PEND 0x1 +#define SIGFASTBLOCK_FLAGS 0xf +#define SIGFASTBLOCK_INC 0x10 + +#ifndef _KERNEL +int __sys_sigfastblock(int cmd, void *ptr); +#endif + #ifdef _KERNEL +extern sigset_t fastblock_mask; /* Return nonzero if process p has an unmasked pending signal. */ #define SIGPENDING(td) \ @@ -328,6 +344,7 @@ extern struct mtx sigio_lock; #define SIGPROCMASK_OLD 0x0001 #define SIGPROCMASK_PROC_LOCKED 0x0002 #define SIGPROCMASK_PS_LOCKED 0x0004 +#define SIGPROCMASK_FASTBLK 0x0008 /* * Modes for sigdeferstop(). Manages behaviour of @@ -365,6 +382,8 @@ sigallowstop(int prev) int cursig(struct thread *td); void execsigs(struct proc *p); +void fetch_sigfastblock(struct thread *td); +void fetch_sigfastblock_failed(struct thread *td, bool write); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); ksiginfo_t * ksiginfo_alloc(int wait); @@ -375,6 +394,7 @@ void pgsignal(struct pgrp *pgrp, int sig, int checkctt int postsig(int sig); void kern_psignal(struct proc *p, int sig); int ptracestop(struct thread *td, int sig, ksiginfo_t *si); +void reschedule_signals(struct proc *p, sigset_t block, int flags); void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *retmask); struct sigacts *sigacts_alloc(void); void sigacts_copy(struct sigacts *dest, struct sigacts *src); From owner-svn-src-all@freebsd.org Sun Feb 9 11:53:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D22123637C; Sun, 9 Feb 2020 11:53: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) server-signature RSA-PSS (4096 bits) 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 48FnVr1PWTz43Cn; Sun, 9 Feb 2020 11:53: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 2B2C25D2A; Sun, 9 Feb 2020 11:53: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 019BreAK097955; Sun, 9 Feb 2020 11:53:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019Brbvr097942; Sun, 9 Feb 2020 11:53:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091153.019Brbvr097942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 11:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357694 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern sys X-SVN-Commit-Revision: 357694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 11:53:40 -0000 Author: kib Date: Sun Feb 9 11:53:37 2020 New Revision: 357694 URL: https://svnweb.freebsd.org/changeset/base/357694 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Feb 9 11:53:37 2020 (r357694) @@ -499,4 +499,5 @@ #define FREEBSD32_SYS_freebsd32___sysctlbyname 570 #define FREEBSD32_SYS_shm_open2 571 #define FREEBSD32_SYS_shm_rename 572 -#define FREEBSD32_SYS_MAXSYSCALL 573 +#define FREEBSD32_SYS_sigfastblock 573 +#define FREEBSD32_SYS_MAXSYSCALL 574 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Feb 9 11:53:37 2020 (r357694) @@ -609,4 +609,5 @@ const char *freebsd32_syscallnames[] = { "freebsd32___sysctlbyname", /* 570 = freebsd32___sysctlbyname */ "shm_open2", /* 571 = shm_open2 */ "shm_rename", /* 572 = shm_rename */ + "sigfastblock", /* 573 = sigfastblock */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Feb 9 11:53:37 2020 (r357694) @@ -662,4 +662,5 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32___sysctlbyname_args), (sy_call_t *)freebsd32___sysctlbyname, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 570 = freebsd32___sysctlbyname */ { AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */ { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ + { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Feb 9 11:53:37 2020 (r357694) @@ -3355,6 +3355,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } + /* sigfastblock */ + case 573: { + struct sigfastblock_args *p = params; + iarg[0] = p->cmd; /* int */ + uarg[1] = (intptr_t) p->ptr; /* uint32_t * */ + *n_args = 2; + break; + } default: *n_args = 0; break; @@ -9041,6 +9049,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* sigfastblock */ + case 573: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland uint32_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10927,6 +10948,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* shm_rename */ case 572: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sigfastblock */ + case 573: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/kern/init_sysent.c Sun Feb 9 11:53:37 2020 (r357694) @@ -628,4 +628,5 @@ struct sysent sysent[] = { { AS(__sysctlbyname_args), (sy_call_t *)sys___sysctlbyname, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 570 = __sysctlbyname */ { AS(shm_open2_args), (sy_call_t *)sys_shm_open2, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 571 = shm_open2 */ { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ + { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/kern/syscalls.c Sun Feb 9 11:53:37 2020 (r357694) @@ -579,4 +579,5 @@ const char *syscallnames[] = { "__sysctlbyname", /* 570 = __sysctlbyname */ "shm_open2", /* 571 = shm_open2 */ "shm_rename", /* 572 = shm_rename */ + "sigfastblock", /* 573 = sigfastblock */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/kern/systrace_args.c Sun Feb 9 11:53:37 2020 (r357694) @@ -3347,6 +3347,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } + /* sigfastblock */ + case 573: { + struct sigfastblock_args *p = params; + iarg[0] = p->cmd; /* int */ + uarg[1] = (intptr_t) p->ptr; /* uint32_t * */ + *n_args = 2; + break; + } default: *n_args = 0; break; @@ -8946,6 +8954,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* sigfastblock */ + case 573: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland uint32_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10859,6 +10880,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* shm_rename */ case 572: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* sigfastblock */ + case 573: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/sys/syscall.h Sun Feb 9 11:53:37 2020 (r357694) @@ -508,4 +508,5 @@ #define SYS___sysctlbyname 570 #define SYS_shm_open2 571 #define SYS_shm_rename 572 -#define SYS_MAXSYSCALL 573 +#define SYS_sigfastblock 573 +#define SYS_MAXSYSCALL 574 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/sys/syscall.mk Sun Feb 9 11:53:37 2020 (r357694) @@ -413,4 +413,5 @@ MIASM = \ copy_file_range.o \ __sysctlbyname.o \ shm_open2.o \ - shm_rename.o + shm_rename.o \ + sigfastblock.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Sun Feb 9 11:53:12 2020 (r357693) +++ head/sys/sys/sysproto.h Sun Feb 9 11:53:37 2020 (r357694) @@ -1819,6 +1819,10 @@ struct shm_rename_args { char path_to_l_[PADL_(const char *)]; const char * path_to; char path_to_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct sigfastblock_args { + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char ptr_l_[PADL_(uint32_t *)]; uint32_t * ptr; char ptr_r_[PADR_(uint32_t *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2207,6 +2211,7 @@ int sys_copy_file_range(struct thread *, struct copy_f int sys___sysctlbyname(struct thread *, struct __sysctlbyname_args *); int sys_shm_open2(struct thread *, struct shm_open2_args *); int sys_shm_rename(struct thread *, struct shm_rename_args *); +int sys_sigfastblock(struct thread *, struct sigfastblock_args *); #ifdef COMPAT_43 @@ -3130,6 +3135,7 @@ int freebsd12_shm_open(struct thread *, struct freebsd #define SYS_AUE___sysctlbyname AUE_SYSCTL #define SYS_AUE_shm_open2 AUE_SHMOPEN #define SYS_AUE_shm_rename AUE_SHMRENAME +#define SYS_AUE_sigfastblock AUE_NULL #undef PAD_ #undef PADL_ From owner-svn-src-all@freebsd.org Sun Feb 9 12:10:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B508723759F; Sun, 9 Feb 2020 12:10:38 +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) server-signature RSA-PSS (4096 bits) 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 48FntQ4DQjz44QK; Sun, 9 Feb 2020 12:10:38 +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 8C5785F32; Sun, 9 Feb 2020 12:10:38 +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 019CAc7E006087; Sun, 9 Feb 2020 12:10:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CAciS006085; Sun, 9 Feb 2020 12:10:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091210.019CAciS006085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357695 - in head: sys/kern sys/sys usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: sys/kern sys/sys usr.bin/procstat X-SVN-Commit-Revision: 357695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:10:38 -0000 Author: kib Date: Sun Feb 9 12:10:37 2020 New Revision: 357695 URL: https://svnweb.freebsd.org/changeset/base/357695 Log: Add AT_BSDFLAGS auxv entry. The intent is to provide bsd-specific flags relevant to interpreter and C runtime. I did not want to reuse AT_FLAGS which is common ELF auxv entry. Use bsdflags to report kernel support for sigfastblock(2). This allows rtld and libthr to safely infer the syscall presence without SIGSYS. The tunable kern.elf{32,64}.sigfastblock blocks reporting. Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/sys/kern/imgact_elf.c head/sys/sys/elf_common.h head/usr.bin/procstat/procstat_auxv.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Feb 9 11:53:37 2020 (r357694) +++ head/sys/kern/imgact_elf.c Sun Feb 9 12:10:37 2020 (r357695) @@ -183,6 +183,11 @@ SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, stack_gap, CTLFLAG __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": maximum percentage of main stack to waste on a random gap"); +static int __elfN(sigfastblock) = 1; +SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, sigfastblock, + CTLFLAG_RWTUN, &__elfN(sigfastblock), 0, + "enable sigfastblock for new processes"); + static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) @@ -1366,6 +1371,8 @@ __elfN(freebsd_copyout_auxargs)(struct image_params *i AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); if (imgp->sysent->sv_hwcap2 != NULL) AUXARGS_ENTRY(pos, AT_HWCAP2, *imgp->sysent->sv_hwcap2); + AUXARGS_ENTRY(pos, AT_BSDFLAGS, __elfN(sigfastblock) ? + ELF_BSDF_SIGFASTBLK : 0); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sun Feb 9 11:53:37 2020 (r357694) +++ head/sys/sys/elf_common.h Sun Feb 9 12:10:37 2020 (r357695) @@ -954,8 +954,9 @@ typedef struct { #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ #define AT_HWCAP2 26 /* CPU feature flags 2. */ +#define AT_BSDFLAGS 27 /* ELF BSD Flags. */ -#define AT_COUNT 27 /* Count of defined aux entry types. */ +#define AT_COUNT 28 /* Count of defined aux entry types. */ /* * Relocation types. @@ -1456,5 +1457,6 @@ typedef struct { #define R_X86_64_TLSDESC 36 #define R_X86_64_IRELATIVE 37 +#define ELF_BSDF_SIGFASTBLK 0x0001 /* Kernel supports fast sigblock */ #endif /* !_SYS_ELF_COMMON_H_ */ Modified: head/usr.bin/procstat/procstat_auxv.c ============================================================================== --- head/usr.bin/procstat/procstat_auxv.c Sun Feb 9 11:53:37 2020 (r357694) +++ head/usr.bin/procstat/procstat_auxv.c Sun Feb 9 12:10:37 2020 (r357695) @@ -197,6 +197,12 @@ procstat_auxv(struct procstat *procstat, struct kinfo_ prefix, "AT_HWCAP2", (u_long)auxv[i].a_un.a_val); break; #endif +#ifdef AT_BSDFLAGS + case AT_BSDFLAGS: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_BSDFLAGS/%#lx}\n", + prefix, "AT_BSDFLAGS", (u_long)auxv[i].a_un.a_val); + break; +#endif default: xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n", prefix, auxv[i].a_type, auxv[i].a_un.a_val); From owner-svn-src-all@freebsd.org Sun Feb 9 12:12:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F1D223767A; Sun, 9 Feb 2020 12:12:04 +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) server-signature RSA-PSS (4096 bits) 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 48Fnw402tQz44pm; Sun, 9 Feb 2020 12:12:04 +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 F0CEA60CA; Sun, 9 Feb 2020 12:12:03 +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 019CC31q010250; Sun, 9 Feb 2020 12:12:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CC31f010249; Sun, 9 Feb 2020 12:12:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091212.019CC31f010249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357696 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 357696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:12:04 -0000 Author: kib Date: Sun Feb 9 12:12:03 2020 New Revision: 357696 URL: https://svnweb.freebsd.org/changeset/base/357696 Log: Add AT_BSDFLAGS support to _elf_aux_info(3). Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/lib/libc/gen/auxv.c Modified: head/lib/libc/gen/auxv.c ============================================================================== --- head/lib/libc/gen/auxv.c Sun Feb 9 12:10:37 2020 (r357695) +++ head/lib/libc/gen/auxv.c Sun Feb 9 12:12:03 2020 (r357696) @@ -67,7 +67,7 @@ __init_elf_aux_vector(void) } static pthread_once_t aux_once = PTHREAD_ONCE_INIT; -static int pagesize, osreldate, canary_len, ncpus, pagesizes_len; +static int pagesize, osreldate, canary_len, ncpus, pagesizes_len, bsdflags; static int hwcap_present, hwcap2_present; static char *canary, *pagesizes, *execpath; static void *timekeep; @@ -86,6 +86,10 @@ init_aux(void) for (aux = __elf_aux_vector; aux->a_type != AT_NULL; aux++) { switch (aux->a_type) { + case AT_BSDFLAGS: + bsdflags = aux->a_un.a_val; + break; + case AT_CANARY: canary = (char *)(aux->a_un.a_ptr); break; @@ -323,6 +327,13 @@ _elf_aux_info(int aux, void *buf, int buflen) res = 0; } else res = ENOENT; + } else + res = EINVAL; + break; + case AT_BSDFLAGS: + if (buflen == sizeof(int)) { + *(int *)buf = bsdflags; + res = 0; } else res = EINVAL; break; From owner-svn-src-all@freebsd.org Sun Feb 9 12:22:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CECF237D9E; Sun, 9 Feb 2020 12:22:44 +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) server-signature RSA-PSS (4096 bits) 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 48Fp8N1mdDz45Vy; Sun, 9 Feb 2020 12:22:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37FC362C2; Sun, 9 Feb 2020 12:22:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 019CMiKQ017897; Sun, 9 Feb 2020 12:22:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CMhB4017894; Sun, 9 Feb 2020 12:22:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091222.019CMhB4017894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357697 - in head/libexec/rtld-elf: . rtld-libc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/libexec/rtld-elf: . rtld-libc X-SVN-Commit-Revision: 357697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:22:44 -0000 Author: kib Date: Sun Feb 9 12:22:43 2020 New Revision: 357697 URL: https://svnweb.freebsd.org/changeset/base/357697 Log: Use sigfastblock(2) in rtld. This allows for rtld to not issue two sigprocmask(2) syscalls for each symbol binding operation in single-threaded processes. Rtld needs to block signals as part of locking to ensure signal safety of the bind process, because signal handlers might need to lazily resolve symbol references. As result, number of syscalls issued on startup by simple programs not using libthr, is typically reduced 2x. For instance, for hello world, I see: non-sigfastblock # (truss ./hello > /dev/null) |& wc -l 63 sigfastblock # (truss ./hello > /dev/null) |& wc -l 37 Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/rtld_lock.c Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Sun Feb 9 12:12:03 2020 (r357696) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Sun Feb 9 12:22:43 2020 (r357697) @@ -45,8 +45,9 @@ _libc_string_objects= bcmp bcopy bzero memset memchr m strlen strncmp strncpy strrchr strsep strspn strstr strtok # Also use all the syscall .o files from libc_nossp_pic: _libc_other_objects= sigsetjmp lstat stat fstat fstatat fstatfs syscall \ - cerror geteuid getegid munmap mprotect sysarch __sysctl issetugid __getcwd \ - utrace thr_self thr_kill pread mmap lseek _exit _fstat _fstatat _fstatfs \ + cerror geteuid getegid sigfastblock munmap mprotect \ + sysarch __sysctl issetugid __getcwd utrace \ + thr_self thr_kill pread mmap lseek _exit _fstat _fstatat _fstatfs \ getdirentries _getdirentries _close _fcntl _open _openat _read \ _sigprocmask _write readlink _setjmp setjmp setjmperr Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Feb 9 12:12:03 2020 (r357696) +++ head/libexec/rtld-elf/rtld.c Sun Feb 9 12:22:43 2020 (r357697) @@ -286,6 +286,7 @@ Elf_Addr tls_dtv_generation = 1; /* Used to detect whe int tls_max_index = 1; /* Largest module index allocated */ static bool ld_library_path_rpath = false; +bool ld_fast_sigblock = false; /* * Globals for path names, and such @@ -443,6 +444,10 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr environ = env; main_argc = argc; main_argv = argv; + + if (aux_info[AT_BSDFLAGS] != NULL && + (aux_info[AT_BSDFLAGS]->a_un.a_val & ELF_BSDF_SIGFASTBLK) != 0) + ld_fast_sigblock = true; trust = !issetugid(); Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sun Feb 9 12:12:03 2020 (r357696) +++ head/libexec/rtld-elf/rtld.h Sun Feb 9 12:22:43 2020 (r357697) @@ -365,6 +365,7 @@ void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ extern bool ld_bind_not; +extern bool ld_fast_sigblock; void dump_relocations(Obj_Entry *); void dump_obj_relocations(Obj_Entry *); Modified: head/libexec/rtld-elf/rtld_lock.c ============================================================================== --- head/libexec/rtld-elf/rtld_lock.c Sun Feb 9 12:12:03 2020 (r357696) +++ head/libexec/rtld-elf/rtld_lock.c Sun Feb 9 12:22:43 2020 (r357697) @@ -45,6 +45,7 @@ */ #include +#include #include #include #include @@ -68,6 +69,7 @@ typedef struct Struct_Lock { static sigset_t fullsigmask, oldsigmask; static int thread_flag, wnested; +static uint32_t fsigblock; static void * def_lock_create(void) @@ -118,20 +120,40 @@ def_rlock_acquire(void *lock) } static void +sig_fastunblock(void) +{ + uint32_t oldval; + + assert((fsigblock & ~SIGFASTBLOCK_FLAGS) >= SIGFASTBLOCK_INC); + oldval = atomic_fetchadd_32(&fsigblock, -SIGFASTBLOCK_INC); + if (oldval == (SIGFASTBLOCK_PEND | SIGFASTBLOCK_INC)) + __sys_sigfastblock(SIGFASTBLOCK_UNBLOCK, NULL); +} + +static void def_wlock_acquire(void *lock) { Lock *l; sigset_t tmp_oldsigmask; l = (Lock *)lock; - for (;;) { - sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask); - if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG)) - break; - sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL); + if (ld_fast_sigblock) { + for (;;) { + atomic_add_32(&fsigblock, SIGFASTBLOCK_INC); + if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG)) + break; + sig_fastunblock(); + } + } else { + for (;;) { + sigprocmask(SIG_BLOCK, &fullsigmask, &tmp_oldsigmask); + if (atomic_cmpset_acq_int(&l->lock, 0, WAFLAG)) + break; + sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL); + } + if (atomic_fetchadd_int(&wnested, 1) == 0) + oldsigmask = tmp_oldsigmask; } - if (atomic_fetchadd_int(&wnested, 1) == 0) - oldsigmask = tmp_oldsigmask; } static void @@ -143,9 +165,10 @@ def_lock_release(void *lock) if ((l->lock & WAFLAG) == 0) atomic_add_rel_int(&l->lock, -RC_INCR); else { - assert(wnested > 0); atomic_add_rel_int(&l->lock, -WAFLAG); - if (atomic_fetchadd_int(&wnested, -1) == 1) + if (ld_fast_sigblock) + sig_fastunblock(); + else if (atomic_fetchadd_int(&wnested, -1) == 1) sigprocmask(SIG_SETMASK, &oldsigmask, NULL); } } @@ -279,38 +302,36 @@ lock_restart_for_upgrade(RtldLockState *lockstate) void lockdflt_init(void) { - int i; + int i; - deflockinfo.rtli_version = RTLI_VERSION; - deflockinfo.lock_create = def_lock_create; - deflockinfo.lock_destroy = def_lock_destroy; - deflockinfo.rlock_acquire = def_rlock_acquire; - deflockinfo.wlock_acquire = def_wlock_acquire; - deflockinfo.lock_release = def_lock_release; - deflockinfo.thread_set_flag = def_thread_set_flag; - deflockinfo.thread_clr_flag = def_thread_clr_flag; - deflockinfo.at_fork = NULL; + deflockinfo.rtli_version = RTLI_VERSION; + deflockinfo.lock_create = def_lock_create; + deflockinfo.lock_destroy = def_lock_destroy; + deflockinfo.rlock_acquire = def_rlock_acquire; + deflockinfo.wlock_acquire = def_wlock_acquire; + deflockinfo.lock_release = def_lock_release; + deflockinfo.thread_set_flag = def_thread_set_flag; + deflockinfo.thread_clr_flag = def_thread_clr_flag; + deflockinfo.at_fork = NULL; - for (i = 0; i < RTLD_LOCK_CNT; i++) { - rtld_locks[i].mask = (1 << i); - rtld_locks[i].handle = NULL; - } + for (i = 0; i < RTLD_LOCK_CNT; i++) { + rtld_locks[i].mask = (1 << i); + rtld_locks[i].handle = NULL; + } - memcpy(&lockinfo, &deflockinfo, sizeof(lockinfo)); - _rtld_thread_init(NULL); - /* - * Construct a mask to block all signals except traps which might - * conceivably be generated within the dynamic linker itself. - */ - sigfillset(&fullsigmask); - sigdelset(&fullsigmask, SIGILL); - sigdelset(&fullsigmask, SIGTRAP); - sigdelset(&fullsigmask, SIGABRT); - sigdelset(&fullsigmask, SIGEMT); - sigdelset(&fullsigmask, SIGFPE); - sigdelset(&fullsigmask, SIGBUS); - sigdelset(&fullsigmask, SIGSEGV); - sigdelset(&fullsigmask, SIGSYS); + memcpy(&lockinfo, &deflockinfo, sizeof(lockinfo)); + _rtld_thread_init(NULL); + if (ld_fast_sigblock) { + __sys_sigfastblock(SIGFASTBLOCK_SETPTR, &fsigblock); + } else { + /* + * Construct a mask to block all signals. Note that + * blocked traps mean that the process is terminated + * if trap occurs while we are in locked section, with + * the default settings for kern.forcesigexit. + */ + sigfillset(&fullsigmask); + } } /* @@ -331,7 +352,10 @@ _rtld_thread_init(struct RtldLockInfo *pli) if (pli == NULL) pli = &deflockinfo; - + else if (ld_fast_sigblock) { + fsigblock = 0; + __sys_sigfastblock(SIGFASTBLOCK_UNSETPTR, NULL); + } for (i = 0; i < RTLD_LOCK_CNT; i++) if ((locks[i] = pli->lock_create()) == NULL) From owner-svn-src-all@freebsd.org Sun Feb 9 12:27:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C75C238159; Sun, 9 Feb 2020 12:27:23 +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) server-signature RSA-PSS (4096 bits) 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 48FpFl2BXnz45pP; Sun, 9 Feb 2020 12:27:23 +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 4171A62C6; Sun, 9 Feb 2020 12:27:23 +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 019CRNn2018323; Sun, 9 Feb 2020 12:27:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CRMg3018317; Sun, 9 Feb 2020 12:27:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091227.019CRMg3018317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357698 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 357698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:27:23 -0000 Author: kib Date: Sun Feb 9 12:27:22 2020 New Revision: 357698 URL: https://svnweb.freebsd.org/changeset/base/357698 Log: Use sigfastblock(2) for masking signals in libthr. Ensure proper handshake to transfer sigfastblock(2) blocking word ownership from rtld to libthr. Unfortunately sigfastblock(2) is not enough to stop intercepting signals in libthr, because critical sections must ensure more than just signal blocking. Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/lib/libthr/thread/thr_create.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_rtld.c head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_create.c ============================================================================== --- head/lib/libthr/thread/thr_create.c Sun Feb 9 12:22:43 2020 (r357697) +++ head/lib/libthr/thread/thr_create.c Sun Feb 9 12:27:22 2020 (r357698) @@ -257,6 +257,7 @@ thread_start(struct pthread *curthread) if (curthread->attr.suspend == THR_CREATE_SUSPENDED) set = curthread->sigmask; + _thr_signal_block_setup(curthread); /* * This is used as a serialization point to allow parent Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sun Feb 9 12:22:43 2020 (r357697) +++ head/lib/libthr/thread/thr_private.h Sun Feb 9 12:27:22 2020 (r357698) @@ -396,6 +396,9 @@ struct pthread { /* Signal blocked counter. */ int sigblock; + /* Fast sigblock var. */ + uint32_t fsigblock; + /* Queue entry for list of all threads. */ TAILQ_ENTRY(pthread) tle; /* link for all threads in process */ @@ -813,6 +816,8 @@ void _thr_cancel_leave(struct pthread *, int) __hidden void _thr_testcancel(struct pthread *) __hidden; void _thr_signal_block(struct pthread *) __hidden; void _thr_signal_unblock(struct pthread *) __hidden; +void _thr_signal_block_check_fast(void) __hidden; +void _thr_signal_block_setup(struct pthread *) __hidden; void _thr_signal_init(int) __hidden; void _thr_signal_deinit(void) __hidden; int _thr_send_sig(struct pthread *, int sig) __hidden; Modified: head/lib/libthr/thread/thr_rtld.c ============================================================================== --- head/lib/libthr/thread/thr_rtld.c Sun Feb 9 12:22:43 2020 (r357697) +++ head/lib/libthr/thread/thr_rtld.c Sun Feb 9 12:27:22 2020 (r357698) @@ -236,6 +236,8 @@ _thr_rtld_init(void) _thr_signal_block(curthread); _rtld_thread_init(&li); _thr_signal_unblock(curthread); + _thr_signal_block_check_fast(); + _thr_signal_block_setup(curthread); uc_len = __getcontextx_size(); uc = alloca(uc_len); Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Sun Feb 9 12:22:43 2020 (r357697) +++ head/lib/libthr/thread/thr_sig.c Sun Feb 9 12:27:22 2020 (r357698) @@ -31,7 +31,8 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include +#include +#include #include #include #include @@ -92,10 +93,9 @@ static const sigset_t _thr_maskset={{ 0xffffffff, 0xffffffff}}; -void -_thr_signal_block(struct pthread *curthread) +static void +thr_signal_block_slow(struct pthread *curthread) { - if (curthread->sigblock > 0) { curthread->sigblock++; return; @@ -104,11 +104,66 @@ _thr_signal_block(struct pthread *curthread) curthread->sigblock++; } -void -_thr_signal_unblock(struct pthread *curthread) +static void +thr_signal_unblock_slow(struct pthread *curthread) { if (--curthread->sigblock == 0) __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); +} + +static void +thr_signal_block_fast(struct pthread *curthread) +{ + atomic_add_32(&curthread->fsigblock, SIGFASTBLOCK_INC); +} + +static void +thr_signal_unblock_fast(struct pthread *curthread) +{ + uint32_t oldval; + + oldval = atomic_fetchadd_32(&curthread->fsigblock, -SIGFASTBLOCK_INC); + if (oldval == (SIGFASTBLOCK_PEND | SIGFASTBLOCK_INC)) + __sys_sigfastblock(SIGFASTBLOCK_UNBLOCK, NULL); +} + +static bool fast_sigblock; + +void +_thr_signal_block(struct pthread *curthread) +{ + if (fast_sigblock) + thr_signal_block_fast(curthread); + else + thr_signal_block_slow(curthread); +} + +void +_thr_signal_unblock(struct pthread *curthread) +{ + if (fast_sigblock) + thr_signal_unblock_fast(curthread); + else + thr_signal_unblock_slow(curthread); +} + +void +_thr_signal_block_check_fast(void) +{ + int bsdflags, error; + + error = elf_aux_info(AT_BSDFLAGS, &bsdflags, sizeof(bsdflags)); + if (error != 0) + return; + fast_sigblock = (bsdflags & ELF_BSDF_SIGFASTBLK) != 0; +} + +void +_thr_signal_block_setup(struct pthread *curthread) +{ + if (!fast_sigblock) + return; + __sys_sigfastblock(SIGFASTBLOCK_SETPTR, &curthread->fsigblock); } int From owner-svn-src-all@freebsd.org Sun Feb 9 12:29:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E31A223824E; Sun, 9 Feb 2020 12:29:51 +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) server-signature RSA-PSS (4096 bits) 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 48FpJb5hTqz46J0; Sun, 9 Feb 2020 12:29:51 +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 BE9D962C8; Sun, 9 Feb 2020 12:29:51 +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 019CTpfG018641; Sun, 9 Feb 2020 12:29:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CTpR0018639; Sun, 9 Feb 2020 12:29:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091229.019CTpR0018639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357700 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:29:52 -0000 Author: kib Date: Sun Feb 9 12:29:51 2020 New Revision: 357700 URL: https://svnweb.freebsd.org/changeset/base/357700 Log: Add sysctl kern.proc.sigfastblk for reporting sigfastblock word address. Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/sys/kern/kern_proc.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Feb 9 12:29:13 2020 (r357699) +++ head/sys/kern/kern_proc.c Sun Feb 9 12:29:51 2020 (r357700) @@ -2962,6 +2962,77 @@ sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) return (error); } +static int +sysctl_kern_proc_sigfastblk(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + pid_t pid; + struct proc *p; + struct thread *td1; + uintptr_t addr; +#ifdef COMPAT_FREEBSD32 + uint32_t addr32; +#endif + int error; + + if (namelen != 1 || req->newptr != NULL) + return (EINVAL); + + pid = (pid_t)name[0]; + error = pget(pid, PGET_HOLD | PGET_NOTWEXIT | PGET_CANDEBUG, &p); + if (error != 0) + return (error); + + PROC_LOCK(p); +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + if (!SV_PROC_FLAG(p, SV_ILP32)) { + error = EINVAL; + goto errlocked; + } + } +#endif + if (pid <= PID_MAX) { + td1 = FIRST_THREAD_IN_PROC(p); + } else { + FOREACH_THREAD_IN_PROC(p, td1) { + if (td1->td_tid == pid) + break; + } + } + if (td1 == NULL) { + error = ESRCH; + goto errlocked; + } + /* + * The access to the private thread flags. It is fine as far + * as no out-of-thin-air values are read from td_pflags, and + * usermode read of the td_sigblock_ptr is racy inherently, + * since target process might have already changed it + * meantime. + */ + if ((td1->td_pflags & TDP_SIGFASTBLOCK) != 0) + addr = (uintptr_t)td1->td_sigblock_ptr; + else + error = ENOTTY; + +errlocked: + _PRELE(p); + PROC_UNLOCK(p); + if (error != 0) + return (error); + +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + addr32 = addr; + error = SYSCTL_OUT(req, &addr32, sizeof(addr32)); + } else +#endif + error = SYSCTL_OUT(req, &addr, sizeof(addr)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -3074,6 +3145,10 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, "Process signal trampoline location"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGFASTBLK, sigfastblk, CTLFLAG_RD | + CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_sigfastblk, + "Thread sigfastblock address"); int allproc_gen; Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sun Feb 9 12:29:13 2020 (r357699) +++ head/sys/sys/sysctl.h Sun Feb 9 12:29:51 2020 (r357700) @@ -1017,6 +1017,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ #define KERN_PROC_CWD 42 /* process current working directory */ #define KERN_PROC_NFDS 43 /* number of open file descriptors */ +#define KERN_PROC_SIGFASTBLK 44 /* address of fastsigblk magic word */ /* * KERN_IPC identifiers From owner-svn-src-all@freebsd.org Sun Feb 9 12:30:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA90E238305; Sun, 9 Feb 2020 12:30:50 +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) server-signature RSA-PSS (4096 bits) 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 48FpKk5zKhz46RZ; Sun, 9 Feb 2020 12:30:50 +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 C857162E6; Sun, 9 Feb 2020 12:30:50 +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 019CUosg018816; Sun, 9 Feb 2020 12:30:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019CUoPX018813; Sun, 9 Feb 2020 12:30:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002091230.019CUoPX018813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 9 Feb 2020 12:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357701 - head/usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/procstat X-SVN-Commit-Revision: 357701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 12:30:51 -0000 Author: kib Date: Sun Feb 9 12:30:50 2020 New Revision: 357701 URL: https://svnweb.freebsd.org/changeset/base/357701 Log: Add procstat(1) sigfastblock command to show process sigfastblock word address. Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773 Modified: head/usr.bin/procstat/procstat.c head/usr.bin/procstat/procstat.h head/usr.bin/procstat/procstat_sigs.c Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Sun Feb 9 12:29:51 2020 (r357700) +++ head/usr.bin/procstat/procstat.c Sun Feb 9 12:30:50 2020 (r357701) @@ -94,6 +94,8 @@ static const struct procstat_cmd cmd_table[] = { PS_CMP_NORMAL }, { "rusage", "rusage", "[-Ht]", &procstat_rusage, &cmdopt_rusage, PS_CMP_NORMAL }, + { "sigfastblock", "sigfastblock", NULL, &procstat_sigfastblock, + &cmdopt_none, PS_CMP_NORMAL }, { "signal", "signals", "[-n]", &procstat_sigs, &cmdopt_signals, PS_CMP_PLURAL | PS_CMP_SUBSTR }, { "thread", "threads", NULL, &procstat_threads, &cmdopt_none, Modified: head/usr.bin/procstat/procstat.h ============================================================================== --- head/usr.bin/procstat/procstat.h Sun Feb 9 12:29:51 2020 (r357700) +++ head/usr.bin/procstat/procstat.h Sun Feb 9 12:30:50 2020 (r357701) @@ -67,6 +67,8 @@ void procstat_kstack(struct procstat *prstat, struct k void procstat_ptlwpinfo(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_rlimit(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_rusage(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_sigfastblock(struct procstat *procstat, + struct kinfo_proc *kipp); void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads_sigs(struct procstat *prstat, struct kinfo_proc *kipp); Modified: head/usr.bin/procstat/procstat_sigs.c ============================================================================== --- head/usr.bin/procstat/procstat_sigs.c Sun Feb 9 12:29:51 2020 (r357700) +++ head/usr.bin/procstat/procstat_sigs.c Sun Feb 9 12:30:50 2020 (r357701) @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include #include @@ -163,6 +165,7 @@ procstat_threads_sigs(struct procstat *procstat, struc xo_open_container(threadid); xo_emit("{e:thread_id/%6d/%d}", kipp->ki_tid); xo_open_container("signals"); + for (j = 1; j <= _SIG_MAXSIG; j++) { xo_emit("{dk:process_id/%5d/%d} ", kipp->ki_pid); xo_emit("{d:thread_id/%6d/%d} ", kipp->ki_tid); @@ -175,6 +178,66 @@ procstat_threads_sigs(struct procstat *procstat, struc xo_emit("\n"); } xo_close_container("signals"); + xo_close_container(threadid); + free(threadid); + } + xo_close_container("threads"); + procstat_freeprocs(procstat, kip); +} + +void +procstat_sigfastblock(struct procstat *procstat, struct kinfo_proc *kipp) +{ + struct kinfo_proc *kip; + char *threadid; + uintptr_t sigfastblk_addr; + int error, name[4]; + unsigned int count, i; + size_t len; + bool has_sigfastblk_addr; + + if ((procstat_opts & PS_OPT_NOHEADER) == 0) + xo_emit("{T:/%5s %6s %-16s %-16s}\n", "PID", "TID", + "COMM", "SIGFBLK"); + + kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, + kipp->ki_pid, &count); + if (kip == NULL) + return; + xo_emit("{ek:process_id/%5d/%d}", kipp->ki_pid); + xo_emit("{e:command/%-16s/%s}", kipp->ki_comm); + xo_open_container("threads"); + kinfo_proc_sort(kip, count); + for (i = 0; i < count; i++) { + kipp = &kip[i]; + len = sizeof(sigfastblk_addr); + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_SIGFASTBLK; + name[3] = kipp->ki_tid; + error = sysctl(name, 4, &sigfastblk_addr, &len, NULL, 0); + if (error < 0) { + if (errno != ESRCH && errno != ENOTTY) { + warn("sysctl: kern.proc.fastsigblk: %d", + kipp->ki_tid); + } + has_sigfastblk_addr = false; + } else + has_sigfastblk_addr = true; + + asprintf(&threadid, "%d", kipp->ki_tid); + if (threadid == NULL) + xo_errc(1, ENOMEM, "Failed to allocate memory in " + "procstat_sigfastblock()"); + xo_open_container(threadid); + xo_emit("{dk:process_id/%5d/%d} ", kipp->ki_pid); + xo_emit("{d:thread_id/%6d/%d} ", kipp->ki_tid); + xo_emit("{d:command/%-16s/%s} ", kipp->ki_comm); + xo_emit("{e:sigfastblock/%#-16jx/%#jx}", has_sigfastblk_addr ? + (uintmax_t)sigfastblk_addr : (uintmax_t)-1); + xo_emit("{d:sigfastblock/%#-16jx/%#jx}", has_sigfastblk_addr ? + (uintmax_t)sigfastblk_addr : (uintmax_t)-1); + xo_emit("\n"); xo_close_container(threadid); free(threadid); } From owner-svn-src-all@freebsd.org Sun Feb 9 15:13:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87D4723B5E3; Sun, 9 Feb 2020 15:13:57 +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) server-signature RSA-PSS (4096 bits) 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 48Fsxx2nQxz4FDW; Sun, 9 Feb 2020 15:13:57 +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 5AC7382A6; Sun, 9 Feb 2020 15:13:57 +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 019FDvKi023061; Sun, 9 Feb 2020 15:13:57 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019FDvmu023060; Sun, 9 Feb 2020 15:13:57 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202002091513.019FDvmu023060@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: Sun, 9 Feb 2020 15:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357702 - 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: 357702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 15:13:57 -0000 Author: 0mp (doc,ports committer) Date: Sun Feb 9 15:13:56 2020 New Revision: 357702 URL: https://svnweb.freebsd.org/changeset/base/357702 Log: Add a missing word in rc.conf.5 PR: 243972 Submitted by: PauAmma Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23584 Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Feb 9 12:30:50 2020 (r357701) +++ head/share/man/man5/rc.conf.5 Sun Feb 9 15:13:56 2020 (r357702) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 9, 2019 +.Dd February 9, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -425,7 +425,7 @@ is used to set the hostname via DHCP, this variable should be set to an empty string. Within a .Xr jail 8 -the hostname is generally already set and this variable may absent. +the hostname is generally already set and this variable may be absent. If this value remains unset when the system is done booting your console login will display the default hostname of .Dq Amnesiac . From owner-svn-src-all@freebsd.org Sun Feb 9 17:01:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52E8323D197; Sun, 9 Feb 2020 17:01:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48FwKS0C8Cz4KYc; Sun, 9 Feb 2020 17:00:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pj1-x102a.google.com with SMTP id j17so3131483pjz.3; Sun, 09 Feb 2020 09:00:59 -0800 (PST) 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=KMGyaJwGAUQYUJFoIh36VOePX4nTrRVo1tAK6uQ1b5o=; b=REXo18EnwjODP4Cp2QXXaGL3+tDFW4Pn5A5KAqnRK1Pv7g9UUcZOQVG2CdAXZg3ll3 guoGwEfaZcOFP7gJuJfG0D3tl8ebrEhGWwwoYB4DnHtwnmg2X4o9ztnbBGMPuuivrO9A 1sd3BvkQy0eW7Czt0MlwxDwX0og8dQZgJyr8C5PT8KXAbZgYi/RLglkg9TNm4VqNrK2D retzT3OOb7upn+PKbjzBe3QTfWLDi+7npAZePqH4Aza+woO+HqZwnVUmJ4Lkrhab5Y+4 hK5lh3Xefp7GmVoJ53vGL8Mdr3aYe6Ai2JWXTOQH85q8cOIkAnA10/9UVmQEtUORHgeo ymOQ== 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=KMGyaJwGAUQYUJFoIh36VOePX4nTrRVo1tAK6uQ1b5o=; b=LTmjBNJ4YEfai+Vlj8QGFS0+DOANNG+9NZGwQT0MpTXs4Qpge+qas40Lx/Dr2nTTz0 G7GD3nmVGcPEHGe/8dfDtXu3Q1hpTNbAVqVav68Kmo0bQPe40Kuoc1O69UroR50Ue4X2 VfZEPatjUBP0m9InlpRkwsa/vlD+VZgGT9X6kfQm2+OrXUED+ONhFkN3PQyCc7sbC+Co pftrLjakT4hIRNohq68YlTGhQYoOe8ZpJlDiOE+8h+ENOeOkfwpIFJCvYpsWehVk8Wfz cT0DeGkY7O0fqRKOQHcCQIkOTtkDKdfEie7OjfT/zX1W1EY9KHq177kXP42Fwjhx0fyl qhPw== X-Gm-Message-State: APjAAAXNvS7Y+UUetT6BxPzD+6ssj1+AlPFcxXsE4HE6ixm/YspurDsU F1R921vOjvuYXf3166DEWJAxSKBgiJI= X-Google-Smtp-Source: APXvYqxOLvKd+zefYWnVGMfnLXNaI3i68iYzzP8dT1Lc3YPuK33VB80dRPJb5JXs8u+9Oi8eq1S9yg== X-Received: by 2002:a17:902:9698:: with SMTP id n24mr8909317plp.312.1581267653015; Sun, 09 Feb 2020 09:00:53 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t65sm9364278pfd.178.2020.02.09.09.00.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2020 09:00:52 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r357679 - head/sys/kern From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202002081551.018Fp8vI054303@repo.freebsd.org> Date: Sun, 9 Feb 2020 09:00:51 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202002081551.018Fp8vI054303@repo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48FwKS0C8Cz4KYc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=REXo18En; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0: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]; RECEIVED_SPAMHAUS_PBL(0.00)[228.52.19.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; 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]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ipnet: 2607:f8b0::/32(-1.97), asn: 15169(-1.73), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 17:01:01 -0000 > On Feb 8, 2020, at 07:51, Mateusz Guzik wrote: > > Author: mjg > Date: Sat Feb 8 15:51:08 2020 > New Revision: 357679 > URL: https://svnweb.freebsd.org/changeset/base/357679 > > Log: > vfs: remove now useless ENODEV handling from vn_fullpath consumers > > Noted by: ngie Thank you Mateusz :)! -Enji From owner-svn-src-all@freebsd.org Sun Feb 9 18:53:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85F4223F3FC; Sun, 9 Feb 2020 18:53:54 +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) server-signature RSA-PSS (4096 bits) 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 48Fyqk2jSSz4QCc; Sun, 9 Feb 2020 18:53:54 +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 584C5AB76; Sun, 9 Feb 2020 18:53:54 +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 019IrsTh054317; Sun, 9 Feb 2020 18:53:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019IrsaI054316; Sun, 9 Feb 2020 18:53:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002091853.019IrsaI054316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 18:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357703 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 357703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 18:53:54 -0000 Author: kevans Date: Sun Feb 9 18:53:53 2020 New Revision: 357703 URL: https://svnweb.freebsd.org/changeset/base/357703 Log: mips: mark GOOGLETEST broken, due to no fault of its own As explained in the comment; GOOGLETEST cannot currently be compiled on any mips variant at the moment due to the cross toolchain seemingly using the wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at which point this should be reverted most expeditiously. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Feb 9 15:13:56 2020 (r357702) +++ head/share/mk/src.opts.mk Sun Feb 9 18:53:53 2020 (r357703) @@ -348,7 +348,12 @@ BROKEN_OPTIONS+=LIB32 BROKEN_OPTIONS+=LIBSOFT .endif .if ${__T:Mmips*} -BROKEN_OPTIONS+=SSP +# GOOGLETEST cannot currently be compiled on mips due to external circumstances. +# Notably, the freebsd-gcc port isn't linking in libgcc so we end up trying ot +# link to a hidden symbol. LLVM would successfully link this in, but some of +# the mips variants are broken under LLVM until LLVM 10. GOOGLETEST should be +# marked no longer broken with the switch to LLVM. +BROKEN_OPTIONS+=GOOGLETEST SSP .endif # EFI doesn't exist on mips, powerpc, sparc or riscv. .if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} From owner-svn-src-all@freebsd.org Sun Feb 9 19:20:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80CC123F9A6; Sun, 9 Feb 2020 19:20:21 +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) server-signature RSA-PSS (4096 bits) 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 48FzQF2rbHz4RGg; Sun, 9 Feb 2020 19:20:21 +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 5D10AAFCA; Sun, 9 Feb 2020 19:20:21 +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 019JKLTT066794; Sun, 9 Feb 2020 19:20:21 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019JKL73066793; Sun, 9 Feb 2020 19:20:21 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002091920.019JKL73066793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 19:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357704 - stable/12/usr.bin/wc X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/usr.bin/wc X-SVN-Commit-Revision: 357704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 19:20:21 -0000 Author: kevans Date: Sun Feb 9 19:20:20 2020 New Revision: 357704 URL: https://svnweb.freebsd.org/changeset/base/357704 Log: MFC r357572: wc(1): account for possibility of file == NULL file could reasonably be NULL here if we we're using stdin. Albeit less likely in normal usage, one could actually hit either of these warnings on stdin. Modified: stable/12/usr.bin/wc/wc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/wc/wc.c ============================================================================== --- stable/12/usr.bin/wc/wc.c Sun Feb 9 18:53:53 2020 (r357703) +++ stable/12/usr.bin/wc/wc.c Sun Feb 9 19:20:20 2020 (r357704) @@ -218,7 +218,7 @@ cnt(const char *file) */ if (doline == 0 && dolongline == 0) { if (fstat(fd, &sb)) { - xo_warn("%s: fstat", file); + xo_warn("%s: fstat", file != NULL ? file : "stdin"); (void)close(fd); return (1); } @@ -239,7 +239,7 @@ cnt(const char *file) */ while ((len = read(fd, buf, MAXBSIZE))) { if (len == -1) { - xo_warn("%s: read", file); + xo_warn("%s: read", file != NULL ? file : "stdin"); (void)close(fd); return (1); } From owner-svn-src-all@freebsd.org Sun Feb 9 22:05:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7512B24437E; Sun, 9 Feb 2020 22:05:42 +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) server-signature RSA-PSS (4096 bits) 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 48G3522Tt2z4bsP; Sun, 9 Feb 2020 22:05:42 +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 507F3D1A7; Sun, 9 Feb 2020 22:05:42 +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 019M5gpS068888; Sun, 9 Feb 2020 22:05:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019M5fHU068883; Sun, 9 Feb 2020 22:05:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002092205.019M5fHU068883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 9 Feb 2020 22:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357705 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 22:05:42 -0000 Author: tuexen Date: Sun Feb 9 22:05:41 2020 New Revision: 357705 URL: https://svnweb.freebsd.org/changeset/base/357705 Log: Cleanup timer handling. Submitted by: Taylor Brandstetter MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Feb 9 19:20:20 2020 (r357704) +++ head/sys/netinet/sctp_indata.c Sun Feb 9 22:05:41 2020 (r357705) @@ -2663,7 +2663,8 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) * is pending, we got our first packet OR * there are gaps or duplicates. */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); } } else { Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Feb 9 19:20:20 2020 (r357704) +++ head/sys/netinet/sctp_output.c Sun Feb 9 22:05:41 2020 (r357705) @@ -10074,7 +10074,8 @@ do_it_again: */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_send_sack(stcb, so_locked); - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); } while (asoc->sent_queue_retran_cnt) { /*- @@ -10603,7 +10604,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -10672,7 +10673,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -12834,7 +12835,7 @@ sctp_lower_sosend(struct socket *so, if (control) { if (sctp_process_cmsgs_for_init(stcb, control, &error)) { sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_6); hold_tcblock = 0; stcb = NULL; goto out_unlocked; Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Feb 9 19:20:20 2020 (r357704) +++ head/sys/netinet/sctp_pcb.c Sun Feb 9 22:05:41 2020 (r357705) @@ -3547,7 +3547,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, } if (cnt) { /* Ok we have someone out there that will kill us */ - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 3); #endif @@ -3566,7 +3565,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, if ((inp->refcount) || (being_refed) || (inp->sctp_flags & SCTP_PCB_FLAGS_CLOSE_IP)) { - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 4); #endif @@ -4761,35 +4759,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc return (0); } } - /* now clean up any other timers */ - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - asoc->dack_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - /*- - * For stream reset we don't blast this unless - * it is a str-reset timer, it might be the - * free-asoc timer which we DON'T want to - * disturb. - */ - if (asoc->strreset_timer.type == SCTP_TIMER_TYPE_STRRESET) - asoc->strreset_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - asoc->asconf_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - asoc->autoclose_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); - asoc->shut_guard_timer.self = NULL; - /* Mobility adaptation */ - (void)SCTP_OS_TIMER_STOP(&asoc->delete_prim_timer.timer); - asoc->delete_prim_timer.self = NULL; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); - net->rxt_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - net->pmtu_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); - net->hb_timer.self = NULL; - } + /* Now clean up any other timers */ + sctp_stop_association_timers(stcb, false); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4957,19 +4928,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); - } + sctp_stop_association_timers(stcb, true); - asoc->strreset_timer.type = SCTP_TIMER_TYPE_NONE; /* * The chunk lists and such SHOULD be empty but we check them just * in case. @@ -7033,7 +6993,8 @@ sctp_drain_mbufs(struct sctp_tcb *stcb) * asoc->highest_tsn_inside_map? */ asoc->last_revoke_count = cnt; - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_PCB + SCTP_LOC_16); /* sa_ignore NO_NULL_CHK */ sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Feb 9 19:20:20 2020 (r357704) +++ head/sys/netinet/sctputil.c Sun Feb 9 22:05:41 2020 (r357705) @@ -780,18 +780,66 @@ sctp_audit_log(uint8_t ev, uint8_t fd) void sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) { - struct sctp_association *asoc; + struct sctp_inpcb *inp; struct sctp_nets *net; - asoc = &stcb->asoc; + inp = stcb->sctp_ep; - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_12); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_14); + sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_15); + TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_17); + } +} + +void +sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) +{ + struct sctp_inpcb *inp; + struct sctp_nets *net; + + inp = stcb->sctp_ep; + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_18); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_19); + if (stop_assoc_kill_timer) { + sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_20); + } + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_21); + sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_22); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNGUARD, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_23); + /* Mobility adaptation */ + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_24); + TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { + sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_25); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_26); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_27); + sctp_timer_stop(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_28); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_29); + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_30); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_31); } } Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sun Feb 9 19:20:20 2020 (r357704) +++ head/sys/netinet/sctputil.h Sun Feb 9 22:05:41 2020 (r357705) @@ -164,6 +164,9 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); +/* Stop all timers for association and remote addresses. */ +void sctp_stop_association_timers(struct sctp_tcb *, bool); + void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-all@freebsd.org Sun Feb 9 22:15:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC75F244595; Sun, 9 Feb 2020 22:15:38 +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) server-signature RSA-PSS (4096 bits) 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 48G3JV5MVJz4cGb; Sun, 9 Feb 2020 22:15:38 +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 9A293D369; Sun, 9 Feb 2020 22:15:38 +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 019MFcJn074732; Sun, 9 Feb 2020 22:15:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019MFZIX074717; Sun, 9 Feb 2020 22:15:35 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002092215.019MFZIX074717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 22:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357706 - in stable: 11/contrib/netbsd-tests/lib/libc/c063 11/lib/libc/sys 11/lib/libc/tests/c063 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 11/sys/fs/devfs 11/sys/fs/fuse 11/sys... X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/contrib/netbsd-tests/lib/libc/c063 11/lib/libc/sys 11/lib/libc/tests/c063 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 11/sys/fs/devfs 11/sys/fs/fuse 11/sys/fs/nfsclient 11/sys/fs/s... X-SVN-Commit-Revision: 357706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 22:15:38 -0000 Author: kevans Date: Sun Feb 9 22:15:35 2020 New Revision: 357706 URL: https://svnweb.freebsd.org/changeset/base/357706 Log: MFC O_SEARCH: r357412, r357461, r357580, r357584, r357636, r357671, r357688 r357412: Provide O_SEARCH O_SEARCH is defined by POSIX [0] to open a directory for searching, skipping permissions checks on the directory itself after the initial open(). This is close to the semantics we've historically applied for O_EXEC on a directory, which is UB according to POSIX. Conveniently, O_SEARCH on a file is also explicitly undefined behavior according to POSIX, so O_EXEC would be a fine choice. The spec goes on to state that O_SEARCH and O_EXEC need not be distinct values, but they're not defined to be the same value. This was pointed out as an incompatibility with other systems that had made its way into libarchive, which had assumed that O_EXEC was an alias for O_SEARCH. This defines compatibility O_SEARCH/FSEARCH (equivalent to O_EXEC and FEXEC respectively) and expands our UB for O_EXEC on a directory. O_EXEC on a directory is checked in vn_open_vnode already, so for completeness we add a NOEXECCHECK when O_SEARCH has been specified on the top-level fd and do not re-check that when descending in namei. [0] https://pubs.opengroup.org/onlinepubs/9699919799/ r357461: namei: preserve errors from fget_cap_locked Most notably, we want to make sure we don't clobber any capabilities-related errors. This is a regression from r357412 (O_SEARCH) that was picked up by the capsicum tests. r357580: O_SEARCH test: drop O_SEARCH|O_RDWR local diff In FreeBSD's O_SEARCH implementation, O_SEARCH in conjunction with O_RDWR or O_WRONLY is explicitly rejected. In this case, O_RDWR was not necessary anyways as the file will get created with or without it. This was submitted upstream as misc/54940 and committed in rev 1.8 of the file. r357584: Record-only MFV of r357583: netbsd-tests: import upstreamed changes The changes in question originated in FreeBSD/head; no further action is required. r357636: MFV r357635: imnport v1.9 of the O_SEARCH tests The RCSID data was wrong, so this is effectively a record-only merge with correction of said data. No further changes should be needed in this area, as we've now upstreamed our local changes to this specific test. r357671: O_SEARCH test: mark revokex an expected fail on NFS The revokex test does not work when the scratch directory is created on NFS. Given the nature of NFS, it likely can never work without looking like a security hole since O_SEARCH would rely on the server knowing that the directory did have +x at the time of open and that it's OK for it to have been revoked based on POSIX specification for O_SEARCH. This does mean that O_SEARCH is only partially functional on NFS in general, but I suspect the execute bit getting revoked in the process is likely not common. r357688: MFV r357687: Import NFS fix for O_SEARCH tests The version that ended upstream was ultimately slightly different than the version committed here; notably, statvfs() is used but it's redefined appropriately to statfs() on FreeBSD since we don't provide the fstypename for the former interface. Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/11/lib/libc/sys/open.2 stable/11/lib/libc/tests/c063/Makefile stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/fs/devfs/devfs_vnops.c stable/11/sys/fs/fuse/fuse_vnops.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/fs/smbfs/smbfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c stable/11/sys/kern/vfs_cache.c stable/11/sys/kern/vfs_lookup.c stable/11/sys/kern/vfs_subr.c stable/11/sys/sys/fcntl.h stable/11/sys/sys/namei.h stable/11/sys/sys/vnode.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/12/lib/libc/sys/open.2 stable/12/lib/libc/tests/c063/Makefile stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/12/sys/fs/devfs/devfs_vnops.c stable/12/sys/fs/fuse/fuse_vnops.c stable/12/sys/fs/nfsclient/nfs_clvnops.c stable/12/sys/fs/smbfs/smbfs_vnops.c stable/12/sys/fs/tmpfs/tmpfs_vnops.c stable/12/sys/kern/vfs_cache.c stable/12/sys/kern/vfs_lookup.c stable/12/sys/kern/vfs_subr.c stable/12/sys/sys/fcntl.h stable/12/sys/sys/namei.h stable/12/sys/sys/vnode.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ +/* $NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,13 +29,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $"); #include -#include +#include +#include +#include #include +#include #include #include #include @@ -50,10 +53,15 @@ __RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25: * until a decision is reached about the semantics of O_SEARCH and a * non-broken implementation is available. */ -#if (O_MASK & O_SEARCH) != 0 +#if defined(__FreeBSD__) || (O_MASK & O_SEARCH) != 0 #define USE_O_SEARCH #endif +#ifdef __FreeBSD__ +#define statvfs statfs +#define fstatvfs fstatfs +#endif + #define DIR "dir" #define FILE "dir/o_search" #define BASEFILE "o_search" @@ -257,12 +265,82 @@ ATF_TC_BODY(o_search_notdir, tc) int fd; ATF_REQUIRE(mkdir(DIR, 0755) == 0); - ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_RDWR|O_SEARCH, 0644)) != -1); + ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_SEARCH, 0644)) != -1); ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); ATF_REQUIRE(errno == ENOTDIR); ATF_REQUIRE(close(dfd) == 0); } +#ifdef USE_O_SEARCH +ATF_TC(o_search_nord); +ATF_TC_HEAD(o_search_nord, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that openat succeeds with no read permission"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(o_search_nord, tc) +{ + int dfd, fd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); + ATF_REQUIRE(close(fd) == 0); + + ATF_REQUIRE(chmod(DIR, 0100) == 0); + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + + ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) != -1); + + ATF_REQUIRE(close(dfd) == 0); +} + +ATF_TC(o_search_getdents); +ATF_TC_HEAD(o_search_getdents, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that O_SEARCH forbids getdents"); +} +ATF_TC_BODY(o_search_getdents, tc) +{ + char buf[1024]; + int dfd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + ATF_REQUIRE(getdents(dfd, buf, sizeof(buf)) < 0); + ATF_REQUIRE(close(dfd) == 0); +} + +ATF_TC(o_search_revokex); +ATF_TC_HEAD(o_search_revokex, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that *at behaves after chmod -x"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(o_search_revokex, tc) +{ + struct statvfs vst; + struct stat sb; + int dfd, fd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); + ATF_REQUIRE(close(fd) == 0); + + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + + /* Drop permissions. The kernel must still not check the exec bit. */ + ATF_REQUIRE(chmod(DIR, 0000) == 0); + + fstatvfs(dfd, &vst); + if (strcmp(vst.f_fstypename, "nfs") == 0) + atf_tc_expect_fail("NFS protocol cannot observe O_SEARCH semantics"); + + ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); + + ATF_REQUIRE(close(dfd) == 0); +} +#endif /* USE_O_SEARCH */ + ATF_TP_ADD_TCS(tp) { @@ -277,6 +355,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, o_search_unpriv_flag2); #endif ATF_TP_ADD_TC(tp, o_search_notdir); +#ifdef USE_O_SEARCH + ATF_TP_ADD_TC(tp, o_search_nord); + ATF_TP_ADD_TC(tp, o_search_getdents); + ATF_TP_ADD_TC(tp, o_search_revokex); +#endif return atf_no_error(); } Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/lib/libc/sys/open.2 Sun Feb 9 22:15:35 2020 (r357706) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd September 17, 2019 +.Dd February 9, 2020 .Dt OPEN 2 .Os .Sh NAME @@ -126,6 +126,7 @@ O_RDONLY open for reading only O_WRONLY open for writing only O_RDWR open for reading and writing O_EXEC open for execute only +O_SEARCH open for search only, an alias for O_EXEC O_NONBLOCK do not block on open O_APPEND append on each write O_CREAT create file if it does not exist @@ -266,6 +267,19 @@ means is implementation specific. The run-time linker (rtld) uses this flag to ensure shared objects have been verified before operating on them. .Pp +When +.Fa fd +is opened with +.Dv O_SEARCH , +execute permissions are checked at open time. +The +.Fa fd +may not be used for any read operations like +.Xr getdirentries 2 . +The primary use for this descriptor will be as the lookup descriptor for the +.Fn *at +family of functions. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. @@ -458,9 +472,12 @@ An attempt was made to open a descriptor with an illeg of .Dv O_RDONLY , .Dv O_WRONLY , -.Dv O_RDWR +or +.Dv O_RDWR , and -.Dv O_EXEC . +.Dv O_EXEC +or +.Dv O_SEARCH . .It Bq Er EBADF The .Fa path Modified: stable/11/lib/libc/tests/c063/Makefile ============================================================================== --- stable/11/lib/libc/tests/c063/Makefile Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/lib/libc/tests/c063/Makefile Sun Feb 9 22:15:35 2020 (r357706) @@ -1,7 +1,5 @@ # $FreeBSD$ -#TODO: t_o_search - NETBSD_ATF_TESTS_C= faccessat_test NETBSD_ATF_TESTS_C+= fchmodat_test NETBSD_ATF_TESTS_C+= fchownat_test @@ -11,6 +9,7 @@ NETBSD_ATF_TESTS_C+= linkat_test NETBSD_ATF_TESTS_C+= mkdirat_test NETBSD_ATF_TESTS_C+= mkfifoat_test NETBSD_ATF_TESTS_C+= mknodat_test +NETBSD_ATF_TESTS_C+= o_search_test NETBSD_ATF_TESTS_C+= openat_test NETBSD_ATF_TESTS_C+= readlinkat_test NETBSD_ATF_TESTS_C+= renameat_test Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1598,10 +1598,14 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, stru * Check accessibility of directory. */ if (!cached) { - error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr); - if (error != 0) { - ZFS_EXIT(zfsvfs); - return (error); + if ((cnp->cn_flags & NOEXECCHECK) != 0) { + cnp->cn_flags &= ~NOEXECCHECK; + } else { + error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr); + if (error != 0) { + ZFS_EXIT(zfsvfs); + return (error); + } } } Modified: stable/11/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/11/sys/fs/devfs/devfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/fs/devfs/devfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -902,8 +902,8 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo if ((flags & ISDOTDOT) && (dvp->v_vflag & VV_ROOT)) return (EIO); - error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td); - if (error) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); if (cnp->cn_namelen == 1 && *pname == '.') { Modified: stable/11/sys/fs/fuse/fuse_vnops.c ============================================================================== --- stable/11/sys/fs/fuse/fuse_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/fs/fuse/fuse_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -699,7 +699,10 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) bzero(&facp, sizeof(facp)); if (vnode_isvroot(dvp)) { /* early permission check hack */ - if ((err = fuse_internal_access(dvp, VEXEC, &facp, td, cred))) { + if ((cnp->cn_flags & NOEXECCHECK) != 0) { + cnp->cn_flags &= ~NOEXECCHECK; + } else if ((err = fuse_internal_access(dvp, VEXEC, &facp, td, + cred))) { return err; } } Modified: stable/11/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1049,7 +1049,8 @@ nfs_lookup(struct vop_lookup_args *ap) } mtx_unlock(&np->n_mtx); - if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks); if (error > 0 && error != ENOENT) Modified: stable/11/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- stable/11/sys/fs/smbfs/smbfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/fs/smbfs/smbfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1196,7 +1196,8 @@ smbfs_lookup(ap) islastcn = flags & ISLASTCN; if (islastcn && (mp->mnt_flag & MNT_RDONLY) && (nameiop != LOOKUP)) return EROFS; - if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return error; smp = VFSTOSMBFS(mp); dnp = VTOSMB(dvp); Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -84,7 +84,7 @@ tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, s *vpp = NULLVP; /* Check accessibility of requested node as a first step. */ - error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_thread); + error = vn_dir_check_exec(dvp, cnp); if (error != 0) goto out; Modified: stable/11/sys/kern/vfs_cache.c ============================================================================== --- stable/11/sys/kern/vfs_cache.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/kern/vfs_cache.c Sun Feb 9 22:15:35 2020 (r357706) @@ -2096,9 +2096,7 @@ vfs_cache_lookup(struct vop_lookup_args *ap) int error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; - struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; - struct thread *td = cnp->cn_thread; *vpp = NULL; dvp = ap->a_dvp; @@ -2110,8 +2108,8 @@ vfs_cache_lookup(struct vop_lookup_args *ap) (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); - error = VOP_ACCESS(dvp, VEXEC, cred, td); - if (error) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); error = cache_lookup(dvp, vpp, cnp, NULL, NULL); Modified: stable/11/sys/kern/vfs_lookup.c ============================================================================== --- stable/11/sys/kern/vfs_lookup.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/kern/vfs_lookup.c Sun Feb 9 22:15:35 2020 (r357706) @@ -288,6 +288,7 @@ namei(struct nameidata *ndp) struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ struct componentname *cnp; + struct file *dfp; struct thread *td; struct proc *p; cap_rights_t rights; @@ -408,10 +409,29 @@ namei(struct nameidata *ndp) AUDIT_ARG_ATFD1(ndp->ni_dirfd); if (cnp->cn_flags & AUDITVNODE2) AUDIT_ARG_ATFD2(ndp->ni_dirfd); - error = fgetvp_rights(td, ndp->ni_dirfd, - &rights, &ndp->ni_filecaps, &dp); - if (error == EINVAL) + /* + * Effectively inlined fgetvp_rights, because we need to + * inspect the file as well as grabbing the vnode. + */ + error = fget_cap_locked(fdp, ndp->ni_dirfd, &rights, + &dfp, &ndp->ni_filecaps); + if (error != 0) { + /* + * Preserve the error; it should either be EBADF + * or capability-related, both of which can be + * safely returned to the caller. + */ + } else if (dfp->f_ops == &badfileops) { + error = EBADF; + } else if (dfp->f_vnode == NULL) { error = ENOTDIR; + } else { + dp = dfp->f_vnode; + vrefact(dp); + + if ((dfp->f_flag & FSEARCH) != 0) + cnp->cn_flags |= NOEXECCHECK; + } #ifdef CAPABILITIES /* * If file descriptor doesn't have all rights, Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/kern/vfs_subr.c Sun Feb 9 22:15:35 2020 (r357706) @@ -5485,3 +5485,15 @@ __mnt_vnode_markerfree_active(struct vnode **mvp, stru mtx_unlock(&vnode_free_list_mtx); mnt_vnode_markerfree_active(mvp, mp); } + +int +vn_dir_check_exec(struct vnode *vp, struct componentname *cnp) +{ + + if ((cnp->cn_flags & NOEXECCHECK) != 0) { + cnp->cn_flags &= ~NOEXECCHECK; + return (0); + } + + return (VOP_ACCESS(vp, VEXEC, cnp->cn_cred, cnp->cn_thread)); +} Modified: stable/11/sys/sys/fcntl.h ============================================================================== --- stable/11/sys/sys/fcntl.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/sys/fcntl.h Sun Feb 9 22:15:35 2020 (r357706) @@ -117,9 +117,11 @@ typedef __pid_t pid_t; #if __POSIX_VISIBLE >= 200809 #define O_DIRECTORY 0x00020000 /* Fail if not directory */ #define O_EXEC 0x00040000 /* Open for execute only */ +#define O_SEARCH O_EXEC #endif #ifdef _KERNEL #define FEXEC O_EXEC +#define FSEARCH O_SEARCH #endif #if __POSIX_VISIBLE >= 200809 Modified: stable/11/sys/sys/namei.h ============================================================================== --- stable/11/sys/sys/namei.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/sys/namei.h Sun Feb 9 22:15:35 2020 (r357706) @@ -153,7 +153,8 @@ struct nameidata { #define AUDITVNODE2 0x08000000 /* audit the looked up vnode information */ #define TRAILINGSLASH 0x10000000 /* path ended in a slash */ #define NOCAPCHECK 0x20000000 /* do not perform capability checks */ -#define PARAMASK 0x3ffffe00 /* mask of parameter descriptors */ +#define NOEXECCHECK 0x40000000 /* do not perform exec check on dir */ +#define PARAMASK 0x7ffffe00 /* mask of parameter descriptors */ /* * Flags in ni_lcf, valid for the duration of the namei call. Modified: stable/11/sys/sys/vnode.h ============================================================================== --- stable/11/sys/sys/vnode.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/11/sys/sys/vnode.h Sun Feb 9 22:15:35 2020 (r357706) @@ -898,6 +898,8 @@ int vn_chmod(struct file *fp, mode_t mode, struct ucre int vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct thread *td); +int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp); + #endif /* _KERNEL */ #endif /* !_SYS_VNODE_H_ */ From owner-svn-src-all@freebsd.org Sun Feb 9 22:15:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E26712445B4; Sun, 9 Feb 2020 22:15:41 +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) server-signature RSA-PSS (4096 bits) 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 48G3JY6TCMz4cGj; Sun, 9 Feb 2020 22:15:41 +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 D91BDD36A; Sun, 9 Feb 2020 22:15:41 +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 019MFfq9074752; Sun, 9 Feb 2020 22:15:41 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019MFc5q074738; Sun, 9 Feb 2020 22:15:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002092215.019MFc5q074738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 22:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357706 - in stable: 11/contrib/netbsd-tests/lib/libc/c063 11/lib/libc/sys 11/lib/libc/tests/c063 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 11/sys/fs/devfs 11/sys/fs/fuse 11/sys... X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/contrib/netbsd-tests/lib/libc/c063 11/lib/libc/sys 11/lib/libc/tests/c063 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 11/sys/fs/devfs 11/sys/fs/fuse 11/sys/fs/nfsclient 11/sys/fs/s... X-SVN-Commit-Revision: 357706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 22:15:42 -0000 Author: kevans Date: Sun Feb 9 22:15:35 2020 New Revision: 357706 URL: https://svnweb.freebsd.org/changeset/base/357706 Log: MFC O_SEARCH: r357412, r357461, r357580, r357584, r357636, r357671, r357688 r357412: Provide O_SEARCH O_SEARCH is defined by POSIX [0] to open a directory for searching, skipping permissions checks on the directory itself after the initial open(). This is close to the semantics we've historically applied for O_EXEC on a directory, which is UB according to POSIX. Conveniently, O_SEARCH on a file is also explicitly undefined behavior according to POSIX, so O_EXEC would be a fine choice. The spec goes on to state that O_SEARCH and O_EXEC need not be distinct values, but they're not defined to be the same value. This was pointed out as an incompatibility with other systems that had made its way into libarchive, which had assumed that O_EXEC was an alias for O_SEARCH. This defines compatibility O_SEARCH/FSEARCH (equivalent to O_EXEC and FEXEC respectively) and expands our UB for O_EXEC on a directory. O_EXEC on a directory is checked in vn_open_vnode already, so for completeness we add a NOEXECCHECK when O_SEARCH has been specified on the top-level fd and do not re-check that when descending in namei. [0] https://pubs.opengroup.org/onlinepubs/9699919799/ r357461: namei: preserve errors from fget_cap_locked Most notably, we want to make sure we don't clobber any capabilities-related errors. This is a regression from r357412 (O_SEARCH) that was picked up by the capsicum tests. r357580: O_SEARCH test: drop O_SEARCH|O_RDWR local diff In FreeBSD's O_SEARCH implementation, O_SEARCH in conjunction with O_RDWR or O_WRONLY is explicitly rejected. In this case, O_RDWR was not necessary anyways as the file will get created with or without it. This was submitted upstream as misc/54940 and committed in rev 1.8 of the file. r357584: Record-only MFV of r357583: netbsd-tests: import upstreamed changes The changes in question originated in FreeBSD/head; no further action is required. r357636: MFV r357635: imnport v1.9 of the O_SEARCH tests The RCSID data was wrong, so this is effectively a record-only merge with correction of said data. No further changes should be needed in this area, as we've now upstreamed our local changes to this specific test. r357671: O_SEARCH test: mark revokex an expected fail on NFS The revokex test does not work when the scratch directory is created on NFS. Given the nature of NFS, it likely can never work without looking like a security hole since O_SEARCH would rely on the server knowing that the directory did have +x at the time of open and that it's OK for it to have been revoked based on POSIX specification for O_SEARCH. This does mean that O_SEARCH is only partially functional on NFS in general, but I suspect the execute bit getting revoked in the process is likely not common. r357688: MFV r357687: Import NFS fix for O_SEARCH tests The version that ended upstream was ultimately slightly different than the version committed here; notably, statvfs() is used but it's redefined appropriately to statfs() on FreeBSD since we don't provide the fstypename for the former interface. Modified: stable/12/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/12/lib/libc/sys/open.2 stable/12/lib/libc/tests/c063/Makefile stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/12/sys/fs/devfs/devfs_vnops.c stable/12/sys/fs/fuse/fuse_vnops.c stable/12/sys/fs/nfsclient/nfs_clvnops.c stable/12/sys/fs/smbfs/smbfs_vnops.c stable/12/sys/fs/tmpfs/tmpfs_vnops.c stable/12/sys/kern/vfs_cache.c stable/12/sys/kern/vfs_lookup.c stable/12/sys/kern/vfs_subr.c stable/12/sys/sys/fcntl.h stable/12/sys/sys/namei.h stable/12/sys/sys/vnode.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/11/lib/libc/sys/open.2 stable/11/lib/libc/tests/c063/Makefile stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/fs/devfs/devfs_vnops.c stable/11/sys/fs/fuse/fuse_vnops.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/fs/smbfs/smbfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c stable/11/sys/kern/vfs_cache.c stable/11/sys/kern/vfs_lookup.c stable/11/sys/kern/vfs_subr.c stable/11/sys/sys/fcntl.h stable/11/sys/sys/namei.h stable/11/sys/sys/vnode.h Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- stable/12/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ +/* $NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,13 +29,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.10 2020/02/08 19:58:36 kamil Exp $"); #include -#include +#include +#include +#include #include +#include #include #include #include @@ -50,10 +53,15 @@ __RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25: * until a decision is reached about the semantics of O_SEARCH and a * non-broken implementation is available. */ -#if (O_MASK & O_SEARCH) != 0 +#if defined(__FreeBSD__) || (O_MASK & O_SEARCH) != 0 #define USE_O_SEARCH #endif +#ifdef __FreeBSD__ +#define statvfs statfs +#define fstatvfs fstatfs +#endif + #define DIR "dir" #define FILE "dir/o_search" #define BASEFILE "o_search" @@ -257,12 +265,82 @@ ATF_TC_BODY(o_search_notdir, tc) int fd; ATF_REQUIRE(mkdir(DIR, 0755) == 0); - ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_RDWR|O_SEARCH, 0644)) != -1); + ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_SEARCH, 0644)) != -1); ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); ATF_REQUIRE(errno == ENOTDIR); ATF_REQUIRE(close(dfd) == 0); } +#ifdef USE_O_SEARCH +ATF_TC(o_search_nord); +ATF_TC_HEAD(o_search_nord, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that openat succeeds with no read permission"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(o_search_nord, tc) +{ + int dfd, fd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); + ATF_REQUIRE(close(fd) == 0); + + ATF_REQUIRE(chmod(DIR, 0100) == 0); + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + + ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) != -1); + + ATF_REQUIRE(close(dfd) == 0); +} + +ATF_TC(o_search_getdents); +ATF_TC_HEAD(o_search_getdents, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that O_SEARCH forbids getdents"); +} +ATF_TC_BODY(o_search_getdents, tc) +{ + char buf[1024]; + int dfd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + ATF_REQUIRE(getdents(dfd, buf, sizeof(buf)) < 0); + ATF_REQUIRE(close(dfd) == 0); +} + +ATF_TC(o_search_revokex); +ATF_TC_HEAD(o_search_revokex, tc) +{ + atf_tc_set_md_var(tc, "descr", "See that *at behaves after chmod -x"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(o_search_revokex, tc) +{ + struct statvfs vst; + struct stat sb; + int dfd, fd; + + ATF_REQUIRE(mkdir(DIR, 0755) == 0); + ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); + ATF_REQUIRE(close(fd) == 0); + + ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); + + /* Drop permissions. The kernel must still not check the exec bit. */ + ATF_REQUIRE(chmod(DIR, 0000) == 0); + + fstatvfs(dfd, &vst); + if (strcmp(vst.f_fstypename, "nfs") == 0) + atf_tc_expect_fail("NFS protocol cannot observe O_SEARCH semantics"); + + ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); + + ATF_REQUIRE(close(dfd) == 0); +} +#endif /* USE_O_SEARCH */ + ATF_TP_ADD_TCS(tp) { @@ -277,6 +355,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, o_search_unpriv_flag2); #endif ATF_TP_ADD_TC(tp, o_search_notdir); +#ifdef USE_O_SEARCH + ATF_TP_ADD_TC(tp, o_search_nord); + ATF_TP_ADD_TC(tp, o_search_getdents); + ATF_TP_ADD_TC(tp, o_search_revokex); +#endif return atf_no_error(); } Modified: stable/12/lib/libc/sys/open.2 ============================================================================== --- stable/12/lib/libc/sys/open.2 Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/lib/libc/sys/open.2 Sun Feb 9 22:15:35 2020 (r357706) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd September 17, 2019 +.Dd February 9, 2020 .Dt OPEN 2 .Os .Sh NAME @@ -126,6 +126,7 @@ O_RDONLY open for reading only O_WRONLY open for writing only O_RDWR open for reading and writing O_EXEC open for execute only +O_SEARCH open for search only, an alias for O_EXEC O_NONBLOCK do not block on open O_APPEND append on each write O_CREAT create file if it does not exist @@ -266,6 +267,19 @@ means is implementation specific. The run-time linker (rtld) uses this flag to ensure shared objects have been verified before operating on them. .Pp +When +.Fa fd +is opened with +.Dv O_SEARCH , +execute permissions are checked at open time. +The +.Fa fd +may not be used for any read operations like +.Xr getdirentries 2 . +The primary use for this descriptor will be as the lookup descriptor for the +.Fn *at +family of functions. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. @@ -458,9 +472,12 @@ An attempt was made to open a descriptor with an illeg of .Dv O_RDONLY , .Dv O_WRONLY , -.Dv O_RDWR +or +.Dv O_RDWR , and -.Dv O_EXEC . +.Dv O_EXEC +or +.Dv O_SEARCH . .It Bq Er EBADF The .Fa path Modified: stable/12/lib/libc/tests/c063/Makefile ============================================================================== --- stable/12/lib/libc/tests/c063/Makefile Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/lib/libc/tests/c063/Makefile Sun Feb 9 22:15:35 2020 (r357706) @@ -1,7 +1,5 @@ # $FreeBSD$ -#TODO: t_o_search - NETBSD_ATF_TESTS_C= faccessat_test NETBSD_ATF_TESTS_C+= fchmodat_test NETBSD_ATF_TESTS_C+= fchownat_test @@ -11,6 +9,7 @@ NETBSD_ATF_TESTS_C+= linkat_test NETBSD_ATF_TESTS_C+= mkdirat_test NETBSD_ATF_TESTS_C+= mkfifoat_test NETBSD_ATF_TESTS_C+= mknodat_test +NETBSD_ATF_TESTS_C+= o_search_test NETBSD_ATF_TESTS_C+= openat_test NETBSD_ATF_TESTS_C+= readlinkat_test NETBSD_ATF_TESTS_C+= renameat_test Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1593,10 +1593,14 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, stru * Check accessibility of directory. */ if (!cached) { - error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr); - if (error != 0) { - ZFS_EXIT(zfsvfs); - return (error); + if ((cnp->cn_flags & NOEXECCHECK) != 0) { + cnp->cn_flags &= ~NOEXECCHECK; + } else { + error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr); + if (error != 0) { + ZFS_EXIT(zfsvfs); + return (error); + } } } Modified: stable/12/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/12/sys/fs/devfs/devfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/fs/devfs/devfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -919,8 +919,8 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlo if ((flags & ISDOTDOT) && (dvp->v_vflag & VV_ROOT)) return (EIO); - error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td); - if (error) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); if (cnp->cn_namelen == 1 && *pname == '.') { Modified: stable/12/sys/fs/fuse/fuse_vnops.c ============================================================================== --- stable/12/sys/fs/fuse/fuse_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/fs/fuse/fuse_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1005,7 +1005,9 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) if (islastcn && vfs_isrdonly(mp) && (nameiop != LOOKUP)) return EROFS; - if ((err = fuse_internal_access(dvp, VEXEC, td, cred))) + if ((cnp->cn_flags & NOEXECCHECK) != 0) + cnp->cn_flags &= ~NOEXECCHECK; + else if ((err = fuse_internal_access(dvp, VEXEC, td, cred))) return err; if (flags & ISDOTDOT) { Modified: stable/12/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/12/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/fs/nfsclient/nfs_clvnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1148,7 +1148,8 @@ nfs_lookup(struct vop_lookup_args *ap) } NFSUNLOCKNODE(np); - if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks); if (error > 0 && error != ENOENT) Modified: stable/12/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- stable/12/sys/fs/smbfs/smbfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/fs/smbfs/smbfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -1198,7 +1198,8 @@ smbfs_lookup(ap) islastcn = flags & ISLASTCN; if (islastcn && (mp->mnt_flag & MNT_RDONLY) && (nameiop != LOOKUP)) return EROFS; - if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return error; smp = VFSTOSMBFS(mp); dnp = VTOSMB(dvp); Modified: stable/12/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_vnops.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/fs/tmpfs/tmpfs_vnops.c Sun Feb 9 22:15:35 2020 (r357706) @@ -90,7 +90,7 @@ tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, s *vpp = NULLVP; /* Check accessibility of requested node as a first step. */ - error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_thread); + error = vn_dir_check_exec(dvp, cnp); if (error != 0) goto out; Modified: stable/12/sys/kern/vfs_cache.c ============================================================================== --- stable/12/sys/kern/vfs_cache.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/kern/vfs_cache.c Sun Feb 9 22:15:35 2020 (r357706) @@ -2105,9 +2105,7 @@ vfs_cache_lookup(struct vop_lookup_args *ap) int error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; - struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; - struct thread *td = cnp->cn_thread; *vpp = NULL; dvp = ap->a_dvp; @@ -2119,8 +2117,8 @@ vfs_cache_lookup(struct vop_lookup_args *ap) (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); - error = VOP_ACCESS(dvp, VEXEC, cred, td); - if (error) + error = vn_dir_check_exec(dvp, cnp); + if (error != 0) return (error); error = cache_lookup(dvp, vpp, cnp, NULL, NULL); Modified: stable/12/sys/kern/vfs_lookup.c ============================================================================== --- stable/12/sys/kern/vfs_lookup.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/kern/vfs_lookup.c Sun Feb 9 22:15:35 2020 (r357706) @@ -286,6 +286,7 @@ namei(struct nameidata *ndp) struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ struct componentname *cnp; + struct file *dfp; struct thread *td; struct proc *p; cap_rights_t rights; @@ -405,10 +406,29 @@ namei(struct nameidata *ndp) AUDIT_ARG_ATFD1(ndp->ni_dirfd); if (cnp->cn_flags & AUDITVNODE2) AUDIT_ARG_ATFD2(ndp->ni_dirfd); - error = fgetvp_rights(td, ndp->ni_dirfd, - &rights, &ndp->ni_filecaps, &dp); - if (error == EINVAL) + /* + * Effectively inlined fgetvp_rights, because we need to + * inspect the file as well as grabbing the vnode. + */ + error = fget_cap_locked(fdp, ndp->ni_dirfd, &rights, + &dfp, &ndp->ni_filecaps); + if (error != 0) { + /* + * Preserve the error; it should either be EBADF + * or capability-related, both of which can be + * safely returned to the caller. + */ + } else if (dfp->f_ops == &badfileops) { + error = EBADF; + } else if (dfp->f_vnode == NULL) { error = ENOTDIR; + } else { + dp = dfp->f_vnode; + vrefact(dp); + + if ((dfp->f_flag & FSEARCH) != 0) + cnp->cn_flags |= NOEXECCHECK; + } #ifdef CAPABILITIES /* * If file descriptor doesn't have all rights, Modified: stable/12/sys/kern/vfs_subr.c ============================================================================== --- stable/12/sys/kern/vfs_subr.c Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/kern/vfs_subr.c Sun Feb 9 22:15:35 2020 (r357706) @@ -5705,3 +5705,15 @@ __mnt_vnode_markerfree_active(struct vnode **mvp, stru mtx_unlock(&mp->mnt_listmtx); mnt_vnode_markerfree_active(mvp, mp); } + +int +vn_dir_check_exec(struct vnode *vp, struct componentname *cnp) +{ + + if ((cnp->cn_flags & NOEXECCHECK) != 0) { + cnp->cn_flags &= ~NOEXECCHECK; + return (0); + } + + return (VOP_ACCESS(vp, VEXEC, cnp->cn_cred, cnp->cn_thread)); +} Modified: stable/12/sys/sys/fcntl.h ============================================================================== --- stable/12/sys/sys/fcntl.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/sys/fcntl.h Sun Feb 9 22:15:35 2020 (r357706) @@ -119,9 +119,11 @@ typedef __pid_t pid_t; #if __POSIX_VISIBLE >= 200809 #define O_DIRECTORY 0x00020000 /* Fail if not directory */ #define O_EXEC 0x00040000 /* Open for execute only */ +#define O_SEARCH O_EXEC #endif #ifdef _KERNEL #define FEXEC O_EXEC +#define FSEARCH O_SEARCH #endif #if __POSIX_VISIBLE >= 200809 Modified: stable/12/sys/sys/namei.h ============================================================================== --- stable/12/sys/sys/namei.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/sys/namei.h Sun Feb 9 22:15:35 2020 (r357706) @@ -159,7 +159,8 @@ struct nameidata { #define AUDITVNODE2 0x08000000 /* audit the looked up vnode information */ #define TRAILINGSLASH 0x10000000 /* path ended in a slash */ #define NOCAPCHECK 0x20000000 /* do not perform capability checks */ -#define PARAMASK 0x3ffffe00 /* mask of parameter descriptors */ +#define NOEXECCHECK 0x40000000 /* do not perform exec check on dir */ +#define PARAMASK 0x7ffffe00 /* mask of parameter descriptors */ /* * Namei results flags Modified: stable/12/sys/sys/vnode.h ============================================================================== --- stable/12/sys/sys/vnode.h Sun Feb 9 22:05:41 2020 (r357705) +++ stable/12/sys/sys/vnode.h Sun Feb 9 22:15:35 2020 (r357706) @@ -921,6 +921,8 @@ int vn_chown(struct file *fp, uid_t uid, gid_t gid, st void vn_fsid(struct vnode *vp, struct vattr *va); +int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp); + #endif /* _KERNEL */ #endif /* !_SYS_VNODE_H_ */ From owner-svn-src-all@freebsd.org Sun Feb 9 22:35:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 563FF244C5E; Sun, 9 Feb 2020 22:35:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48G3lp1fxgz4dSG; Sun, 9 Feb 2020 22:35:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34372D708; Sun, 9 Feb 2020 22:35:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 019MZoc0087536; Sun, 9 Feb 2020 22:35:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019MZoPh087535; Sun, 9 Feb 2020 22:35:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002092235.019MZoPh087535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 9 Feb 2020 22:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357707 - head/usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/login X-SVN-Commit-Revision: 357707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 22:35:50 -0000 Author: kevans Date: Sun Feb 9 22:35:49 2020 New Revision: 357707 URL: https://svnweb.freebsd.org/changeset/base/357707 Log: login.conf(5): update commented-out standard, too MAIL now has a mail capability, instead, as of r357560. Modified: head/usr.bin/login/login.conf Modified: head/usr.bin/login/login.conf ============================================================================== --- head/usr.bin/login/login.conf Sun Feb 9 22:15:35 2020 (r357706) +++ head/usr.bin/login/login.conf Sun Feb 9 22:35:49 2020 (r357707) @@ -129,7 +129,8 @@ russian|Russian Users Accounts:\ #standard:\ # :copyright=/etc/COPYRIGHT:\ # :welcome=/var/run/motd:\ -# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :setenv=BLOCKSIZE=K:\ +# :mail=/var/mail/$:\ # :path=~/bin /bin /usr/bin /usr/local/bin:\ # :manpath=/usr/share/man /usr/local/man:\ # :nologin=/var/run/nologin:\ From owner-svn-src-all@freebsd.org Sun Feb 9 22:40:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9E78244D9B; Sun, 9 Feb 2020 22:40: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) server-signature RSA-PSS (4096 bits) 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 48G3rj5rVwz4dch; Sun, 9 Feb 2020 22:40: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 BF338D70E; Sun, 9 Feb 2020 22:40: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 019Me5EW087830; Sun, 9 Feb 2020 22:40:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 019Me5im087828; Sun, 9 Feb 2020 22:40:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002092240.019Me5im087828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 9 Feb 2020 22:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357708 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2020 22:40:06 -0000 Author: tuexen Date: Sun Feb 9 22:40:05 2020 New Revision: 357708 URL: https://svnweb.freebsd.org/changeset/base/357708 Log: Stop the PMTU and HB timer when removing a net, not when freeing it. Submitted by: Taylor Brandstetter MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_var.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Feb 9 22:35:49 2020 (r357707) +++ head/sys/netinet/sctp_pcb.c Sun Feb 9 22:40:05 2020 (r357708) @@ -4425,8 +4425,10 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd void sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net) { + struct sctp_inpcb *inp; struct sctp_association *asoc; + inp = stcb->sctp_ep; asoc = &stcb->asoc; asoc->numnets--; TAILQ_REMOVE(&asoc->nets, net, sctp_next); @@ -4474,6 +4476,10 @@ out: sctp_free_remote_addr(stcb->asoc.alternate); stcb->asoc.alternate = NULL; } + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTP_PCB + SCTP_LOC_9); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_PCB + SCTP_LOC_10); sctp_free_remote_addr(net); } @@ -6994,7 +7000,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb) */ asoc->last_revoke_count = cnt; sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_PCB + SCTP_LOC_16); + SCTP_FROM_SCTP_PCB + SCTP_LOC_11); /* sa_ignore NO_NULL_CHK */ sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED); Modified: head/sys/netinet/sctp_var.h ============================================================================== --- head/sys/netinet/sctp_var.h Sun Feb 9 22:35:49 2020 (r357707) +++ head/sys/netinet/sctp_var.h Sun Feb 9 22:40:05 2020 (r357708) @@ -187,8 +187,6 @@ extern struct pr_usrreqs sctp_usrreqs; if ((__net)) { \ if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \ (void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \ - (void)SCTP_OS_TIMER_STOP(&(__net)->pmtu_timer.timer); \ - (void)SCTP_OS_TIMER_STOP(&(__net)->hb_timer.timer); \ if ((__net)->ro.ro_rt) { \ RTFREE((__net)->ro.ro_rt); \ (__net)->ro.ro_rt = NULL; \ From owner-svn-src-all@freebsd.org Mon Feb 10 00:05:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98E492466C9; Mon, 10 Feb 2020 00:05:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48G5kn3RFpz3Dfs; Mon, 10 Feb 2020 00:05:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B6B3E75A; Mon, 10 Feb 2020 00:05:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01A0555p041408; Mon, 10 Feb 2020 00:05:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A055SJ041407; Mon, 10 Feb 2020 00:05:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202002100005.01A055SJ041407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 10 Feb 2020 00:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357709 - head/sys/arm/include X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/include X-SVN-Commit-Revision: 357709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 00:05:05 -0000 Author: ian Date: Mon Feb 10 00:05:04 2020 New Revision: 357709 URL: https://svnweb.freebsd.org/changeset/base/357709 Log: Implement atomic_testandclear_{32,int,long} for 32-bit arm. Also, replace the existing implementation of atomic_testandset with the same new algorithm, which uses fewer instructions and fewer registers. Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Sun Feb 9 22:40:05 2020 (r357708) +++ head/sys/arm/include/atomic-v6.h Mon Feb 10 00:05:04 2020 (r357709) @@ -858,23 +858,75 @@ atomic_store_rel_long(volatile u_long *p, u_long v) } static __inline int -atomic_testandset_32(volatile uint32_t *p, u_int v) +atomic_testandclear_32(volatile uint32_t *ptr, u_int bit) { - uint32_t tmp, tmp2, res, mask; + int newv, oldv, result; - mask = 1u << (v & 0x1f); - tmp = tmp2 = 0; __asm __volatile( - "1: ldrex %0, [%4] \n" - " orr %1, %0, %3 \n" - " strex %2, %1, [%4] \n" - " cmp %2, #0 \n" - " it ne \n" - " bne 1b \n" - : "=&r" (res), "=&r" (tmp), "=&r" (tmp2) - : "r" (mask), "r" (p) - : "cc", "memory"); - return ((res & mask) != 0); + " mov ip, #1 \n" + " lsl ip, ip, %[bit] \n" + /* Done with %[bit] as input, reuse below as output. */ + "1: \n" + " ldrex %[oldv], [%[ptr]] \n" + " bic %[newv], %[oldv], ip \n" + " strex %[bit], %[newv], [%[ptr]] \n" + " teq %[bit], #0 \n" + " it ne \n" + " bne 1b \n" + " ands %[bit], %[oldv], ip \n" + " it ne \n" + " movne %[bit], #1 \n" + : [bit] "=&r" (result), + [oldv] "=&r" (oldv), + [newv] "=&r" (newv) + : [ptr] "r" (ptr), + "[bit]" (bit) + : "cc", "ip", "memory"); + + return (result); +} + +static __inline int +atomic_testandclear_int(volatile u_int *p, u_int v) +{ + + return (atomic_testandclear_32((volatile uint32_t *)p, v)); +} + +static __inline int +atomic_testandclear_long(volatile u_long *p, u_int v) +{ + + return (atomic_testandclear_32((volatile uint32_t *)p, v)); +} + +static __inline int +atomic_testandset_32(volatile uint32_t *ptr, u_int bit) +{ + int newv, oldv, result; + + __asm __volatile( + " mov ip, #1 \n" + " lsl ip, ip, %[bit] \n" + /* Done with %[bit] as input, reuse below as output. */ + "1: \n" + " ldrex %[oldv], [%[ptr]] \n" + " orr %[newv], %[oldv], ip \n" + " strex %[bit], %[newv], [%[ptr]] \n" + " teq %[bit], #0 \n" + " it ne \n" + " bne 1b \n" + " ands %[bit], %[oldv], ip \n" + " it ne \n" + " movne %[bit], #1 \n" + : [bit] "=&r" (result), + [oldv] "=&r" (oldv), + [newv] "=&r" (newv) + : [ptr] "r" (ptr), + "[bit]" (bit) + : "cc", "ip", "memory"); + + return (result); } static __inline int From owner-svn-src-all@freebsd.org Mon Feb 10 00:23:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05249246B7E; Mon, 10 Feb 2020 00:23:22 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48G67s6Jw7z3FPf; Mon, 10 Feb 2020 00:23:21 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D379DEAF3; Mon, 10 Feb 2020 00:23:21 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01A0NL5s053560; Mon, 10 Feb 2020 00:23:21 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A0NKmY053556; Mon, 10 Feb 2020 00:23:20 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202002100023.01A0NKmY053556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 10 Feb 2020 00:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs X-SVN-Commit-Revision: 357710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 00:23:22 -0000 Author: scottl Date: Mon Feb 10 00:23:20 2020 New Revision: 357710 URL: https://svnweb.freebsd.org/changeset/base/357710 Log: Add rudamentary support for UFS to probe whether a block device supports the BIO_SPEEDUP command. Add complimentary support to the CAM periphs that support it. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_da.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Mon Feb 10 00:05:04 2020 (r357709) +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r357710) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #endif /* _KERNEL */ @@ -1565,6 +1566,10 @@ adagetattr(struct bio *bp) { int ret; struct cam_periph *periph; + + /* TODO: tunable knob */ + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) + return (0); periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:05:04 2020 (r357709) +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r357710) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #endif /* _KERNEL */ @@ -699,6 +700,10 @@ ndagetattr(struct bio *bp) { int ret; struct cam_periph *periph; + + /* TODO: tunable knob */ + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) + return (0); periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:05:04 2020 (r357709) +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r357710) @@ -1942,6 +1942,10 @@ dagetattr(struct bio *bp) int ret; struct cam_periph *periph; + /* TODO: tunable knob for this */ + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) + return (0); + periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:05:04 2020 (r357709) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r357710) @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t shor { struct buf *bp; + if ((ump->um_flags & UM_CANSPEEDUP) == 0) + return; + bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); bp->b_iocmd = BIO_SPEEDUP; bp->b_ioflags = flags; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:05:04 2020 (r357709) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r357710) @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) struct ucred *cred; struct g_consumer *cp; struct mount *nmp; - int candelete; + int candelete, canspeedup; off_t loc; fs = NULL; @@ -1009,6 +1009,13 @@ ffs_mountfs(devvp, mp, td) ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, &ump->um_trimlisthashsize); } + } + + /* TODO: sysctl tunables, runtime modification */ + len = sizeof(int); + if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { + if (canspeedup) + ump->um_flags |= UM_CANSPEEDUP; } ump->um_mountp = mp; From owner-svn-src-all@freebsd.org Mon Feb 10 00:26:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57EF6246C36; Mon, 10 Feb 2020 00:26:42 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48G6Ck1ZxSz3FXy; Mon, 10 Feb 2020 00:26:42 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 318F6EAF6; Mon, 10 Feb 2020 00:26:42 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01A0QgCG053767; Mon, 10 Feb 2020 00:26:42 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A0QgS4053766; Mon, 10 Feb 2020 00:26:42 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202002100026.01A0QgS4053766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 10 Feb 2020 00:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357711 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 357711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 00:26:42 -0000 Author: scottl Date: Mon Feb 10 00:26:41 2020 New Revision: 357711 URL: https://svnweb.freebsd.org/changeset/base/357711 Log: Missed a file in r357710, add it here. Modified: head/sys/ufs/ufs/ufsmount.h Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Mon Feb 10 00:23:20 2020 (r357710) +++ head/sys/ufs/ufs/ufsmount.h Mon Feb 10 00:26:41 2020 (r357711) @@ -131,6 +131,7 @@ struct ufsmount { */ #define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ #define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ +#define UM_CANSPEEDUP 0x00000004 /* devvp supports SPEEDUP */ /* * function prototypes From owner-svn-src-all@freebsd.org Mon Feb 10 01:33:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59946247D43; Mon, 10 Feb 2020 01:33:54 +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) server-signature RSA-PSS (4096 bits) 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 48G7jG2B9nz3J3L; Mon, 10 Feb 2020 01:33:54 +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 45C70F7D5; Mon, 10 Feb 2020 01:33:54 +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 01A1Xso9095241; Mon, 10 Feb 2020 01:33:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A1XrRA095234; Mon, 10 Feb 2020 01:33:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202002100133.01A1XrRA095234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 10 Feb 2020 01:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357712 - in vendor/file/dist: . doc m4 magic magic/Magdir python src tests X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in vendor/file/dist: . doc m4 magic magic/Magdir python src tests X-SVN-Commit-Revision: 357712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 01:33:54 -0000 Author: delphij Date: Mon Feb 10 01:33:52 2020 New Revision: 357712 URL: https://svnweb.freebsd.org/changeset/base/357712 Log: Vendor import of file 5.38 Added: vendor/file/dist/magic/Magdir/forth vendor/file/dist/magic/Magdir/git vendor/file/dist/magic/Magdir/modulefile vendor/file/dist/magic/Magdir/openfst vendor/file/dist/magic/Magdir/opentimestamps vendor/file/dist/magic/Magdir/pmem vendor/file/dist/magic/Magdir/rst vendor/file/dist/magic/Magdir/sosi vendor/file/dist/src/is_csv.c (contents, props changed) Modified: vendor/file/dist/ChangeLog vendor/file/dist/Makefile.in vendor/file/dist/README vendor/file/dist/aclocal.m4 vendor/file/dist/compile vendor/file/dist/config.guess vendor/file/dist/config.h.in vendor/file/dist/config.sub vendor/file/dist/configure vendor/file/dist/configure.ac vendor/file/dist/depcomp vendor/file/dist/doc/Makefile.in vendor/file/dist/doc/file.man vendor/file/dist/doc/libmagic.man vendor/file/dist/doc/magic.man vendor/file/dist/ltmain.sh vendor/file/dist/m4/libtool.m4 vendor/file/dist/m4/ltoptions.m4 vendor/file/dist/m4/ltsugar.m4 vendor/file/dist/m4/ltversion.m4 vendor/file/dist/m4/lt~obsolete.m4 vendor/file/dist/magic/Magdir/android vendor/file/dist/magic/Magdir/animation vendor/file/dist/magic/Magdir/apple vendor/file/dist/magic/Magdir/archive vendor/file/dist/magic/Magdir/audio vendor/file/dist/magic/Magdir/bsi vendor/file/dist/magic/Magdir/c-lang vendor/file/dist/magic/Magdir/cad vendor/file/dist/magic/Magdir/commands vendor/file/dist/magic/Magdir/compress vendor/file/dist/magic/Magdir/console vendor/file/dist/magic/Magdir/database vendor/file/dist/magic/Magdir/elf vendor/file/dist/magic/Magdir/espressif vendor/file/dist/magic/Magdir/filesystems vendor/file/dist/magic/Magdir/fonts vendor/file/dist/magic/Magdir/frame vendor/file/dist/magic/Magdir/games vendor/file/dist/magic/Magdir/gimp vendor/file/dist/magic/Magdir/icc vendor/file/dist/magic/Magdir/images vendor/file/dist/magic/Magdir/javascript vendor/file/dist/magic/Magdir/kml vendor/file/dist/magic/Magdir/linux vendor/file/dist/magic/Magdir/macintosh vendor/file/dist/magic/Magdir/mail.news vendor/file/dist/magic/Magdir/map vendor/file/dist/magic/Magdir/msdos vendor/file/dist/magic/Magdir/msooxml vendor/file/dist/magic/Magdir/ole2compounddocs vendor/file/dist/magic/Magdir/pdf vendor/file/dist/magic/Magdir/python vendor/file/dist/magic/Magdir/rpi vendor/file/dist/magic/Magdir/ruby vendor/file/dist/magic/Magdir/sgml vendor/file/dist/magic/Magdir/sniffer vendor/file/dist/magic/Magdir/ssh vendor/file/dist/magic/Magdir/uuencode vendor/file/dist/magic/Magdir/varied.script vendor/file/dist/magic/Magdir/vax vendor/file/dist/magic/Magdir/windows vendor/file/dist/magic/Magdir/wordprocessors vendor/file/dist/magic/Magdir/zip vendor/file/dist/magic/Makefile.am vendor/file/dist/magic/Makefile.in vendor/file/dist/missing vendor/file/dist/python/Makefile.in vendor/file/dist/src/Makefile.am vendor/file/dist/src/Makefile.in vendor/file/dist/src/apprentice.c vendor/file/dist/src/ascmagic.c vendor/file/dist/src/buffer.c vendor/file/dist/src/compress.c vendor/file/dist/src/encoding.c vendor/file/dist/src/file.c vendor/file/dist/src/file.h vendor/file/dist/src/file_opts.h vendor/file/dist/src/fsmagic.c vendor/file/dist/src/funcs.c vendor/file/dist/src/magic.h.in vendor/file/dist/src/readcdf.c vendor/file/dist/src/readelf.c vendor/file/dist/src/seccomp.c vendor/file/dist/src/vasprintf.c vendor/file/dist/tests/JW07022A.mp3.result vendor/file/dist/tests/Makefile.in vendor/file/dist/tests/test.c Modified: vendor/file/dist/ChangeLog ============================================================================== --- vendor/file/dist/ChangeLog Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/ChangeLog Mon Feb 10 01:33:52 2020 (r357712) @@ -1,3 +1,23 @@ +2019-12-16 21:11 Christos Zoulas + + * release 5.38 + +2019-12-15 22:13 Christos Zoulas + Document changes since the previous release: + - Always accept -S (no sandbox) even if we don't support sandboxing + - More syscalls elided for sandboxiing + - For ELF dynamic means having an interpreter not just PT_DYNAMIC + - Check for large ELF session header offset + - When saving and restoring a locale, keep the locale name in our + own storage. + - Add a flag to disable CSV file detection. + - Don't pass NULL/0 to memset to appease sanitizers. + - Avoid spurious prints when looks for extensions or apple strings + in fsmagic. + - Add builtin decompressors for xz and and bzip. + - Add a limit for the number of CDF elements. + - More checks for overflow in CDF. + 2019-05-14 22:26 Christos Zoulas * release 5.37 Modified: vendor/file/dist/Makefile.in ============================================================================== --- vendor/file/dist/Makefile.in Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/Makefile.in Mon Feb 10 01:33:52 2020 (r357712) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -136,7 +136,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, @@ -161,7 +161,7 @@ CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing + config.guess config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -246,6 +246,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MINGW = @MINGW@ @@ -352,8 +353,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -495,7 +496,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -560,7 +564,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -586,7 +590,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -604,7 +608,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -614,7 +618,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac Modified: vendor/file/dist/README ============================================================================== --- vendor/file/dist/README Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/README Mon Feb 10 01:33:52 2020 (r357712) @@ -1,6 +1,6 @@ ## README for file(1) Command and the libmagic(3) library ## - @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $ + @(#) $File: README,v 1.59 2019/09/19 01:04:01 christos Exp $ Mailing List: file@astron.com Mailing List archives: http://mailman.astron.com/pipermail/file/ @@ -24,6 +24,10 @@ A public read-only git repository of the same sources https://github.com/file/file +We are continuously being fuzzed by OSS-FUZZ: + + https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file + The major changes for 5.x are CDF file parsing, indirect magic, name/use (recursion) and overhaul in mime and ascii encoding handling. @@ -91,6 +95,7 @@ src/funcs.c - utilility functions src/getline.c - replacement for OS's that don't have it. src/getopt_long.c - replacement for OS's that don't have it. src/gmtime_r.c - replacement for OS's that don't have it. +src/is_csv.c - knows about Comma Separated Value file format (RFC 4180). src/is_json.c - knows about JavaScript Object Notation format (RFC 8259). src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). src/localtime_r.c - replacement for OS's that don't have it. Modified: vendor/file/dist/aclocal.m4 ============================================================================== --- vendor/file/dist/aclocal.m4 Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/aclocal.m4 Mon Feb 10 01:33:52 2020 (r357712) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,8 +20,8 @@ You have another version of autoconf. It may work, bu If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. +# visibility.m4 serial 6 +dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -51,42 +51,42 @@ AC_DEFUN([gl_VISIBILITY], dnl First, check whether -Werror can be added to the command line, or dnl whether it leads to an error because of some other option that the dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS" + ]) dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS" + ]) if test $gl_cv_cc_visibility = yes; then CFLAG_VISIBILITY="-fvisibility=hidden" HAVE_VISIBILITY=1 @@ -98,7 +98,7 @@ AC_DEFUN([gl_VISIBILITY], [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) ]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,10 +110,10 @@ AC_DEFUN([gl_VISIBILITY], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,14 +129,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -188,7 +188,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -219,7 +219,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -410,13 +410,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -424,49 +423,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -475,18 +466,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -573,8 +563,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -641,7 +631,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -683,7 +673,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -704,7 +694,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -725,7 +715,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,49 +723,42 @@ AC_SUBST([am__leading_dot])]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +797,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -843,7 +826,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -890,7 +873,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -909,7 +892,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -990,7 +973,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1050,7 +1033,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1078,7 +1061,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1097,7 +1080,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Modified: vendor/file/dist/compile ============================================================================== --- vendor/file/dist/compile Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/compile Mon Feb 10 01:33:52 2020 (r357712) @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: Modified: vendor/file/dist/config.guess ============================================================================== --- vendor/file/dist/config.guess Mon Feb 10 00:26:41 2020 (r357711) +++ vendor/file/dist/config.guess Mon Feb 10 01:33:52 2020 (r357712) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2019-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2017-01-01' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2017-01-01' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -132,14 +134,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEAS UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +151,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +178,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + earm*) + arch="${UNAME_MACHINE_ARCH#e}" + arch="${arch%eb}" + arch="${arch%hf}" + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +219,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,46 +230,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -310,28 +330,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -343,7 +354,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -370,19 +381,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE sparc) echo sparc-icl-nx7; exit ;; esac ;; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Feb 10 01:34:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6C4D247DCC; Mon, 10 Feb 2020 01:34:19 +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) server-signature RSA-PSS (4096 bits) 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 48G7jl4Txyz3J99; Mon, 10 Feb 2020 01:34:19 +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 7B5C9F7D6; Mon, 10 Feb 2020 01:34:19 +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 01A1YJOD095304; Mon, 10 Feb 2020 01:34:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A1YJFA095303; Mon, 10 Feb 2020 01:34:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202002100134.01A1YJFA095303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 10 Feb 2020 01:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357713 - vendor/file/5.38 X-SVN-Group: vendor X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: vendor/file/5.38 X-SVN-Commit-Revision: 357713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 01:34:19 -0000 Author: delphij Date: Mon Feb 10 01:34:19 2020 New Revision: 357713 URL: https://svnweb.freebsd.org/changeset/base/357713 Log: Tag file 5.38. Added: vendor/file/5.38/ - copied from r357712, vendor/file/dist/ From owner-svn-src-all@freebsd.org Mon Feb 10 02:40:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C432A228E1F; Mon, 10 Feb 2020 02:40:24 +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) server-signature RSA-PSS (4096 bits) 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 48G9B04nd3z3LRv; Mon, 10 Feb 2020 02:40:24 +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 9FA2B182BD; Mon, 10 Feb 2020 02:40:24 +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 01A2eOwm031574; Mon, 10 Feb 2020 02:40:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A2eNmH031570; Mon, 10 Feb 2020 02:40:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002100240.01A2eNmH031570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Feb 2020 02:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357714 - in head/usr.sbin/cron: cron lib X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.sbin/cron: cron lib X-SVN-Commit-Revision: 357714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 02:40:24 -0000 Author: kevans Date: Mon Feb 10 02:40:23 2020 New Revision: 357714 URL: https://svnweb.freebsd.org/changeset/base/357714 Log: cron(8): convert vfork() usage to fork() vfork() is error-prone, and the usage here definitely grew to not be clearly OK given vfork-semantics; e.g. setusercontext(3) within the child. Rip out vfork() and the rest of the references to it. fork is heavier, but it's unclear that the difference will be all that obvious. Reported by: Andrew Gierth and sigsys@gmail.com Modified: head/usr.sbin/cron/cron/compat.h head/usr.sbin/cron/cron/do_command.c head/usr.sbin/cron/cron/externs.h head/usr.sbin/cron/cron/popen.c head/usr.sbin/cron/lib/compat.c Modified: head/usr.sbin/cron/cron/compat.h ============================================================================== --- head/usr.sbin/cron/cron/compat.h Mon Feb 10 01:34:19 2020 (r357713) +++ head/usr.sbin/cron/cron/compat.h Mon Feb 10 02:40:23 2020 (r357714) @@ -76,10 +76,6 @@ /*****************************************************************/ -#if !defined(BSD) && !defined(HPUX) && !defined(CONVEX) && !defined(__linux) -# define NEED_VFORK -#endif - #if (!defined(BSD) || (BSD < 198902)) && !defined(__linux) && \ !defined(IRIX) && !defined(NeXT) && !defined(HPUX) # define NEED_STRCASECMP Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Mon Feb 10 01:34:19 2020 (r357713) +++ head/usr.sbin/cron/cron/do_command.c Mon Feb 10 02:40:23 2020 (r357714) @@ -58,9 +58,6 @@ do_command(e, u) /* fork to become asynchronous -- parent process is done immediately, * and continues to run the normal cron code, which means return to * tick(). the child and grandchild don't leave this function, alive. - * - * vfork() is unsuitable, since we have much to do, and the parent - * needs to be able to run off and fork other processes. */ switch ((pid = fork())) { case -1: @@ -222,13 +219,13 @@ child_process(e, u) /* fork again, this time so we can exec the user's command. */ - switch (jobpid = vfork()) { + switch (jobpid = fork()) { case -1: - log_it("CRON",getpid(),"error","can't vfork"); + log_it("CRON",getpid(),"error","can't fork"); exit(ERROR_EXIT); /*NOTREACHED*/ case 0: - Debug(DPROC, ("[%d] grandchild process Vfork()'ed\n", + Debug(DPROC, ("[%d] grandchild process fork()'ed\n", getpid())) if (e->uid == ROOT_UID) @@ -315,24 +312,24 @@ child_process(e, u) if (setgid(e->gid) != 0) { log_it(usernm, getpid(), "error", "setgid failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } # if defined(BSD) if (initgroups(usernm, e->gid) != 0) { log_it(usernm, getpid(), "error", "initgroups failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } # endif if (setlogin(usernm) != 0) { log_it(usernm, getpid(), "error", "setlogin failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } if (setuid(e->uid) != 0) { log_it(usernm, getpid(), "error", "setuid failed"); - exit(ERROR_EXIT); + _exit(ERROR_EXIT); } /* we aren't root after this..*/ #if defined(LOGIN_CAP) Modified: head/usr.sbin/cron/cron/externs.h ============================================================================== --- head/usr.sbin/cron/cron/externs.h Mon Feb 10 01:34:19 2020 (r357713) +++ head/usr.sbin/cron/cron/externs.h Mon Feb 10 02:40:23 2020 (r357714) @@ -141,7 +141,3 @@ extern int getdtablesize(void); #ifdef NEED_SETENV extern int setenv(char *, char *, int); #endif - -#ifdef NEED_VFORK -extern PID_T vfork(void); -#endif Modified: head/usr.sbin/cron/cron/popen.c ============================================================================== --- head/usr.sbin/cron/cron/popen.c Mon Feb 10 01:34:19 2020 (r357713) +++ head/usr.sbin/cron/cron/popen.c Mon Feb 10 02:40:23 2020 (r357714) @@ -112,7 +112,7 @@ cron_popen(program, type, e, pidptr) #endif iop = NULL; - switch(pid = vfork()) { + switch(pid = fork()) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]); Modified: head/usr.sbin/cron/lib/compat.c ============================================================================== --- head/usr.sbin/cron/lib/compat.c Mon Feb 10 01:34:19 2020 (r357713) +++ head/usr.sbin/cron/lib/compat.c Mon Feb 10 02:40:23 2020 (r357714) @@ -35,18 +35,6 @@ static char rcsid[] = "$FreeBSD$"; #include -/* the code does not depend on any of vfork's - * side-effects; it just uses it as a quick - * fork-and-exec. - */ -#ifdef NEED_VFORK -PID_T -vfork() { - return (fork()); -} -#endif - - #ifdef NEED_STRDUP char * strdup(str) From owner-svn-src-all@freebsd.org Mon Feb 10 02:44:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC16B22909E; Mon, 10 Feb 2020 02:44:29 +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) server-signature RSA-PSS (4096 bits) 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 48G9Gj4qxZz3Lpl; Mon, 10 Feb 2020 02:44:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A05F11847A; Mon, 10 Feb 2020 02:44:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01A2iT5G037636; Mon, 10 Feb 2020 02:44:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A2iTfF037635; Mon, 10 Feb 2020 02:44:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002100244.01A2iTfF037635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Feb 2020 02:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357715 - head/usr.sbin/cron/cron X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/cron/cron X-SVN-Commit-Revision: 357715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 02:44:29 -0000 Author: kevans Date: Mon Feb 10 02:44:29 2020 New Revision: 357715 URL: https://svnweb.freebsd.org/changeset/base/357715 Log: cron(8): rip out do_univ This was an old Dynix hack, the function is a NOP on FreeBSD. We have no need to retain this; Dynix was discontinued long ago. Modified: head/usr.sbin/cron/cron/do_command.c Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Mon Feb 10 02:40:23 2020 (r357714) +++ head/usr.sbin/cron/cron/do_command.c Mon Feb 10 02:44:29 2020 (r357715) @@ -38,8 +38,7 @@ static const char rcsid[] = #endif -static void child_process(entry *, user *), - do_univ(user *); +static void child_process(entry *, user *); static WAIT_T wait_on_child(PID_T, const char *); @@ -278,12 +277,6 @@ child_process(e, u) close(stdin_pipe[READ_PIPE]); close(stdout_pipe[WRITE_PIPE]); - /* set our login universe. Do this in the grandchild - * so that the child can invoke /usr/lib/sendmail - * without surprises. - */ - do_univ(u); - environ = NULL; # if defined(LOGIN_CAP) @@ -638,42 +631,4 @@ wait_on_child(PID_T childpid, const char *name) { Debug(DPROC, ("\n")) return waiter; -} - - -static void -do_univ(u) - user *u; -{ -#if defined(sequent) -/* Dynix (Sequent) hack to put the user associated with - * the passed user structure into the ATT universe if - * necessary. We have to dig the gecos info out of - * the user's password entry to see if the magic - * "universe(att)" string is present. - */ - - struct passwd *p; - char *s; - int i; - - p = getpwuid(u->uid); - (void) endpwent(); - - if (p == NULL) - return; - - s = p->pw_gecos; - - for (i = 0; i < 4; i++) - { - if ((s = strchr(s, ',')) == NULL) - return; - s++; - } - if (strcmp(s, "universe(att)")) - return; - - (void) universe(U_ATT); -#endif } From owner-svn-src-all@freebsd.org Mon Feb 10 04:16:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A99B622A921; Mon, 10 Feb 2020 04:16:42 +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) server-signature RSA-PSS (4096 bits) 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 48GCK6422lz3QLG; Mon, 10 Feb 2020 04:16:42 +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 6BD6B1959C; Mon, 10 Feb 2020 04:16:42 +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 01A4Ggcp092496; Mon, 10 Feb 2020 04:16:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01A4Gg5F092494; Mon, 10 Feb 2020 04:16:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202002100416.01A4Gg5F092494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 10 Feb 2020 04:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357716 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 357716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 04:16:42 -0000 Author: delphij Date: Mon Feb 10 04:16:41 2020 New Revision: 357716 URL: https://svnweb.freebsd.org/changeset/base/357716 Log: Use humanize_number to format available and bad space sizes. Reviewed by: mckusick (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23050 Modified: head/sbin/fsck_msdosfs/Makefile head/sbin/fsck_msdosfs/check.c Modified: head/sbin/fsck_msdosfs/Makefile ============================================================================== --- head/sbin/fsck_msdosfs/Makefile Mon Feb 10 02:44:29 2020 (r357715) +++ head/sbin/fsck_msdosfs/Makefile Mon Feb 10 04:16:41 2020 (r357716) @@ -9,6 +9,7 @@ PROG= fsck_msdosfs MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c -CFLAGS+= -I${FSCK} +CFLAGS+= -I${FSCK} -DHAVE_LIBUTIL_H +LIBADD= util .include Modified: head/sbin/fsck_msdosfs/check.c ============================================================================== --- head/sbin/fsck_msdosfs/check.c Mon Feb 10 02:44:29 2020 (r357715) +++ head/sbin/fsck_msdosfs/check.c Mon Feb 10 04:16:41 2020 (r357716) @@ -33,6 +33,9 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#ifdef HAVE_LIBUTIL_H +#include +#endif #include #include #include @@ -126,15 +129,38 @@ checkfilesys(const char *fname) mod |= FSERROR; } +#ifdef HAVE_LIBUTIL_H + char freestr[7], badstr[7]; + + int64_t freebytes = boot.NumFree * boot.ClusterSize; + humanize_number(freestr, sizeof(freestr), freebytes, "", + HN_AUTOSCALE, HN_DECIMAL | HN_IEC_PREFIXES); + if (boot.NumBad) { + int64_t badbytes = boot.NumBad * boot.ClusterSize; + + humanize_number(badstr, sizeof(badstr), badbytes, "", + HN_AUTOSCALE, HN_B | HN_DECIMAL | HN_IEC_PREFIXES); + + pwarn("%d files, %sB free (%d clusters), %sB bad (%d clusters)\n", + boot.NumFiles, + freestr, boot.NumFree, + badstr, boot.NumBad); + } else { + pwarn("%d files, %sB free (%d clusters)\n", + boot.NumFiles, + freestr, boot.NumFree); + } +#else if (boot.NumBad) - pwarn("%d files, %d free (%d clusters), %d bad (%d clusters)\n", + pwarn("%d files, %d KiB free (%d clusters), %d KiB bad (%d clusters)\n", boot.NumFiles, boot.NumFree * boot.ClusterSize / 1024, boot.NumFree, boot.NumBad * boot.ClusterSize / 1024, boot.NumBad); else - pwarn("%d files, %d free (%d clusters)\n", + pwarn("%d files, %d KiB free (%d clusters)\n", boot.NumFiles, boot.NumFree * boot.ClusterSize / 1024, boot.NumFree); +#endif if (mod && (mod & FSERROR) == 0) { if (mod & FSDIRTY) { From owner-svn-src-all@freebsd.org Mon Feb 10 05:02:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8373622BC4B; Mon, 10 Feb 2020 05:02:03 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GDKQ0h49z3xZ4; Mon, 10 Feb 2020 05:02:01 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581310919; bh=5cONPQjgaFkYqjLDZGFGtkrFJ9Toq0FLB3FFK3CeIk0=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=MaZKS0L0lT7zYOlrsrGSxObkrniQ3SnkOs7oBi/5oqU8QZDjG97vD8tQuXhAabc3D DPrvv0ozGqt3cDtCdu1H1fNzzSjp76pH3P9zXQEvF0Y9saUOR67vkIaCJW4BFshb4Z FfM9qmgaXDFVotoSYXaX5b31XFgvN6ecQy++5wIk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([77.183.249.39]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MzQkK-1jMpLr1rfM-00vQmS; Mon, 10 Feb 2020 06:01:59 +0100 Date: Mon, 10 Feb 2020 06:01:18 +0100 From: "O. Hartmann" To: Scott Long Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs Message-ID: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202002100023.01A0NKmY053556@repo.freebsd.org> References: <202002100023.01A0NKmY053556@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:BasBiKm8fIhlx3L2ki8CZ+PfdY1khQvAST23qlfvUrWIbPC9VBq KgqJSqnLB0tB51+YRsU2bn+KPajnwhZDQP0r625Bers4q/oPqNcZFrGKRlkchF6b4I3WHq4 zimVSHFUTtd3ekagI5mytfptFWSAFJB+Ro9VHKUBYwLTQGAKawFpjVP1KdLqTovhYUnzuHJ ++fTksQjQ696YXtBnRafg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gOeMzcn/eAk=:Hwf+N1rzTVEucE/+qb68zZ N0CJdpdHWu700e6fhG+/1vBflr5M1hSUfs0a0tOtB4ilgMKXIieSXmgV8c4SkKYSt5ZC7uhd5 1XqYFoulrHVdBMwukzkqLQ/Xf0i4tSX+Tp/o79IiyTrnDpcRQjwsP33GIV1V58i8cnWSijKjp +Cx6EqzBZrVhADohwO9xV3dF+DrAyHFYISO4v8JoG0mwvs9i0NCZpX3opXE/C013swfJr2Dzz 9nOjJ86HCkitfSoy2LyjRG7yTTXub7vSe/lVuv2kZBsIZ+F+5KqB3BJz6PsSNH61CrP0FjTq7 FAXykdTeDz0pgSZ79FWm6WnHVYLopkC1h9bVAY5B1HdxHeSZQtAo8gEWP8QBbLXpvptouKjyC pTh3QOZZBilzyWt/sYFwnmB9W3jS7V4sBJF3I5r4tHwYRBYGEectajGcGWi5ZxwqTXlXVAvP8 NrQ/s4TtMM6/rqEwx/VFk1yzn2U8KiHkikRlrzgl0UyE8tXFGnKeRcPTgTQIaAx3omIsBwP2w xyVUufOfCMJLU5zmsdh6RrsZ9ThIASCLNIvZDYNwicHpCZu14Qc6TbhVGZ2XiivuMY9tk6X11 QsTDVc/Yj89RtKOyNVRrrNSIlOmM1yrME5sO1H/IudYHBuTdkOwWI6Lbm8xuM/a1FWOqH+AlP oOOJEEmuRpL0BxAtK84MWX/x4KG2YlKWpQ6RvrenHA9sRfTQCP1LTqY47/q4PE7EtyhRSo5Ua hGv0l8J59ivErVVjO7Y2VnyXhfu7ad6K9WH0z27Ow+HsQpnSv4ly3XztfU6+SEAqubBOUVL53 RjfFCUCpqWDqO3o7OZSCcZ97dDsFe6+ukSVI04nBoMbB+bUkb2zBz8ixqF3+YCkzkNP/GPyL5 Zxp4AJwRrJMNUsODf/8ckUzQpP1epK5uF+giCAUC4HjpK89Pa4X/FQSPsFAEPWRUgw/G9lxtC 5mYm7irk9wHJpBBcTBTWhC4Q2UY04cZSa0p4M+5oDUopkHjeD4W3c22zi6t4PbnYss+D8f9VN NxUYtU0J5gEejUa4d8EIb4hlHvGPdjpRcYaQFkPwwi3MY/aJqUr2nLpqMJ9x7INJrOXQriy5R VTN6sFb5WK7NH3fOhvPHAHwDSphbSVpDRAj4lctSRaFuqZW5wKO8uv3fXRNCrpwcdA9TyiPQg ndn6nyYvuXdVIymvKjpLVMORGbzc6DSQEaaSSrjNzTmuZ2Eo7NlHv1/qT/K5IIFLzy5ukwhIC tJaWCBQ46ZOK1wC3o X-Rspamd-Queue-Id: 48GDKQ0h49z3xZ4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=MaZKS0L0; dmarc=none; spf=none (mx1.freebsd.org: domain of o.hartmann@walstatt.org has no SPF policy when checking 212.227.17.22) smtp.mailfrom=o.hartmann@walstatt.org X-Spamd-Result: default: False [-3.20 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; 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)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ORG_HEADER(0.00)[]; IP_SCORE(-0.90)[ip: (-5.62), ipnet: 212.227.0.0/16(-1.11), asn: 8560(2.23), country: DE(-0.02)]; DKIM_TRACE(0.00)[gmx.net:+]; MIME_BASE64_TEXT(0.10)[]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[22.17.227.212.list.dnswl.org : 127.0.3.1]; RECEIVED_SPAMHAUS_PBL(0.00)[39.249.183.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:02:03 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIE1v biwgMTAgRmViIDIwMjAgMDA6MjM6MjAgKzAwMDAgKFVUQykNClNjb3R0IExvbmcgPHNjb3R0bEBG cmVlQlNELm9yZz4gc2NocmllYjoNCg0KPiBBdXRob3I6IHNjb3R0bA0KPiBEYXRlOiBNb24gRmVi IDEwIDAwOjIzOjIwIDIwMjANCj4gTmV3IFJldmlzaW9uOiAzNTc3MTANCj4gVVJMOiBodHRwczov L3N2bndlYi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zNTc3MTANCj4gDQo+IExvZzoNCj4g ICBBZGQgcnVkYW1lbnRhcnkgc3VwcG9ydCBmb3IgVUZTIHRvIHByb2JlIHdoZXRoZXIgYSBibG9j ayBkZXZpY2Ugc3VwcG9ydHMgdGhlDQo+ICAgQklPX1NQRUVEVVAgY29tbWFuZC4gIEFkZCBjb21w bGltZW50YXJ5IHN1cHBvcnQgdG8gdGhlIENBTSBwZXJpcGhzIHRoYXQNCj4gICBzdXBwb3J0IGl0 Lg0KPiANCj4gTW9kaWZpZWQ6DQo+ICAgaGVhZC9zeXMvY2FtL2F0YS9hdGFfZGEuYw0KPiAgIGhl YWQvc3lzL2NhbS9udm1lL252bWVfZGEuYw0KPiAgIGhlYWQvc3lzL2NhbS9zY3NpL3Njc2lfZGEu Yw0KPiAgIGhlYWQvc3lzL3Vmcy9mZnMvZmZzX3NvZnRkZXAuYw0KPiAgIGhlYWQvc3lzL3Vmcy9m ZnMvZmZzX3Zmc29wcy5jDQo+IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvY2FtL2F0YS9hdGFfZGEu Yw0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL2NhbS9hdGEvYXRhX2Rh LmMJTW9uIEZlYiAxMCAwMDowNTowNCAyMDIwCShyMzU3NzA5KQ0KPiArKysgaGVhZC9zeXMvY2Ft L2F0YS9hdGFfZGEuYwlNb24gRmViIDEwIDAwOjIzOjIwIDIwMjAJKHIzNTc3MTApDQo+IEBAIC01 MCw2ICs1MCw3IEBAIF9fRkJTRElEKCIkRnJlZUJTRCQiKTsNCj4gICNpbmNsdWRlIDxzeXMvcHJv Yy5oPg0KPiAgI2luY2x1ZGUgPHN5cy9yZWJvb3QuaD4NCj4gICNpbmNsdWRlIDxzeXMvc2J1Zi5o Pg0KPiArI2luY2x1ZGUgPGdlb20vZ2VvbS5oPg0KPiAgI2luY2x1ZGUgPGdlb20vZ2VvbV9kaXNr Lmg+DQo+ICAjZW5kaWYgLyogX0tFUk5FTCAqLw0KPiAgDQo+IEBAIC0xNTY1LDYgKzE1NjYsMTAg QEAgYWRhZ2V0YXR0cihzdHJ1Y3QgYmlvICpicCkNCj4gIHsNCj4gIAlpbnQgcmV0Ow0KPiAgCXN0 cnVjdCBjYW1fcGVyaXBoICpwZXJpcGg7DQo+ICsNCj4gKwkvKiBUT0RPOiB0dW5hYmxlIGtub2Ig Ki8NCj4gKwlpZiAoZ19oYW5kbGVhdHRyX2ludChicCwgIkdFT006OmNhbnNwZWVkdXAiLCAxKSkN Cj4gKwkJcmV0dXJuICgwKTsNCj4gIA0KPiAgCXBlcmlwaCA9IChzdHJ1Y3QgY2FtX3BlcmlwaCAq KWJwLT5iaW9fZGlzay0+ZF9kcnYxOw0KPiAgCWNhbV9wZXJpcGhfbG9jayhwZXJpcGgpOw0KPiAN Cj4gTW9kaWZpZWQ6IGhlYWQvc3lzL2NhbS9udm1lL252bWVfZGEuYw0KPiA9PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL2NhbS9udm1lL252bWVfZGEuYwlNb24gRmViIDEwIDAw OjA1OjA0IDIwMjAJKHIzNTc3MDkpDQo+ICsrKyBoZWFkL3N5cy9jYW0vbnZtZS9udm1lX2RhLmMJ TW9uIEZlYiAxMCAwMDoyMzoyMCAyMDIwCShyMzU3NzEwKQ0KPiBAQCAtNDgsNiArNDgsNyBAQCBf X0ZCU0RJRCgiJEZyZWVCU0QkIik7DQo+ICAjaW5jbHVkZSA8c3lzL2NvbnMuaD4NCj4gICNpbmNs dWRlIDxzeXMvcHJvYy5oPg0KPiAgI2luY2x1ZGUgPHN5cy9yZWJvb3QuaD4NCj4gKyNpbmNsdWRl IDxnZW9tL2dlb20uaD4NCj4gICNpbmNsdWRlIDxnZW9tL2dlb21fZGlzay5oPg0KPiAgI2VuZGlm IC8qIF9LRVJORUwgKi8NCj4gIA0KPiBAQCAtNjk5LDYgKzcwMCwxMCBAQCBuZGFnZXRhdHRyKHN0 cnVjdCBiaW8gKmJwKQ0KPiAgew0KPiAgCWludCByZXQ7DQo+ICAJc3RydWN0IGNhbV9wZXJpcGgg KnBlcmlwaDsNCj4gKw0KPiArCS8qIFRPRE86IHR1bmFibGUga25vYiAqLw0KPiArCWlmIChnX2hh bmRsZWF0dHJfaW50KGJwLCAiR0VPTTo6Y2Fuc3BlZWR1cCIsIDEpKQ0KPiArCQlyZXR1cm4gKDAp Ow0KPiAgDQo+ICAJcGVyaXBoID0gKHN0cnVjdCBjYW1fcGVyaXBoICopYnAtPmJpb19kaXNrLT5k X2RydjE7DQo+ICAJY2FtX3BlcmlwaF9sb2NrKHBlcmlwaCk7DQo+IA0KPiBNb2RpZmllZDogaGVh ZC9zeXMvY2FtL3Njc2kvc2NzaV9kYS5jDQo+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KPiAtLS0g aGVhZC9zeXMvY2FtL3Njc2kvc2NzaV9kYS5jCU1vbiBGZWIgMTAgMDA6MDU6MDQgMjAyMAkocjM1 NzcwOSkNCj4gKysrIGhlYWQvc3lzL2NhbS9zY3NpL3Njc2lfZGEuYwlNb24gRmViIDEwIDAwOjIz OjIwIDIwMjAJKHIzNTc3MTApDQo+IEBAIC0xOTQyLDYgKzE5NDIsMTAgQEAgZGFnZXRhdHRyKHN0 cnVjdCBiaW8gKmJwKQ0KPiAgCWludCByZXQ7DQo+ICAJc3RydWN0IGNhbV9wZXJpcGggKnBlcmlw aDsNCj4gIA0KPiArCS8qIFRPRE86IHR1bmFibGUga25vYiBmb3IgdGhpcyAqLw0KPiArCWlmIChn X2hhbmRsZWF0dHJfaW50KGJwLCAiR0VPTTo6Y2Fuc3BlZWR1cCIsIDEpKQ0KPiArCQlyZXR1cm4g KDApOw0KPiArDQo+ICAJcGVyaXBoID0gKHN0cnVjdCBjYW1fcGVyaXBoICopYnAtPmJpb19kaXNr LT5kX2RydjE7DQo+ICAJY2FtX3BlcmlwaF9sb2NrKHBlcmlwaCk7DQo+ICAJcmV0ID0geHB0X2dl dGF0dHIoYnAtPmJpb19kYXRhLCBicC0+YmlvX2xlbmd0aCwgYnAtPmJpb19hdHRyaWJ1dGUsDQo+ IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvdWZzL2Zmcy9mZnNfc29mdGRlcC5jDQo+ID09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zeXMvdWZzL2Zmcy9mZnNfc29mdGRlcC5jCU1vbiBG ZWIgMTAgMDA6MDU6MDQgMjAyMAkocjM1NzcwOSkNCj4gKysrIGhlYWQvc3lzL3Vmcy9mZnMvZmZz X3NvZnRkZXAuYwlNb24gRmViIDEwIDAwOjIzOjIwIDIwMjAJKHIzNTc3MTApDQo+IEBAIC0xNDY0 LDYgKzE0NjQsOSBAQCBzb2Z0ZGVwX3NlbmRfc3BlZWR1cChzdHJ1Y3QgdWZzbW91bnQgKnVtcCwg c2l6ZV90IHNob3INCj4gIHsNCj4gIAlzdHJ1Y3QgYnVmICpicDsNCj4gIA0KPiArCWlmICgodW1w LT51bV9mbGFncyAmIFVNX0NBTlNQRUVEVVApID09IDApDQo+ICsJCXJldHVybjsNCj4gKw0KPiAg CWJwID0gbWFsbG9jKHNpemVvZigqYnApLCBNX1RSSU0sIE1fV0FJVE9LIHwgTV9aRVJPKTsNCj4g IAlicC0+Yl9pb2NtZCA9IEJJT19TUEVFRFVQOw0KPiAgCWJwLT5iX2lvZmxhZ3MgPSBmbGFnczsN Cj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N5cy91ZnMvZmZzL2Zmc192ZnNvcHMuYw0KPiA9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL3Vmcy9mZnMvZmZzX3Zmc29wcy5jCU1vbiBG ZWIgMTAgMDA6MDU6MDQgMjAyMAkocjM1NzcwOSkNCj4gKysrIGhlYWQvc3lzL3Vmcy9mZnMvZmZz X3Zmc29wcy5jCU1vbiBGZWIgMTAgMDA6MjM6MjAgMjAyMAkocjM1NzcxMCkNCj4gQEAgLTc5NCw3 ICs3OTQsNyBAQCBmZnNfbW91bnRmcyhkZXZ2cCwgbXAsIHRkKQ0KPiAgCXN0cnVjdCB1Y3JlZCAq Y3JlZDsNCj4gIAlzdHJ1Y3QgZ19jb25zdW1lciAqY3A7DQo+ICAJc3RydWN0IG1vdW50ICpubXA7 DQo+IC0JaW50IGNhbmRlbGV0ZTsNCj4gKwlpbnQgY2FuZGVsZXRlLCBjYW5zcGVlZHVwOw0KPiAg CW9mZl90IGxvYzsNCj4gIA0KPiAgCWZzID0gTlVMTDsNCj4gQEAgLTEwMDksNiArMTAwOSwxMyBA QCBmZnNfbW91bnRmcyhkZXZ2cCwgbXAsIHRkKQ0KPiAgCQkJdW1wLT51bV90cmltaGFzaCA9IGhh c2hpbml0KE1BWFRSSU1JTywgTV9UUklNLA0KPiAgCQkJICAgICZ1bXAtPnVtX3RyaW1saXN0aGFz aHNpemUpOw0KPiAgCQl9DQo+ICsJfQ0KPiArDQo+ICsJLyogVE9ETzogc3lzY3RsIHR1bmFibGVz LCBydW50aW1lIG1vZGlmaWNhdGlvbiAqLw0KPiArCWxlbiA9IHNpemVvZihpbnQpOw0KPiArCWlm IChnX2lvX2dldGF0dHIoIkdFT006OmNhbnNwZWVkdXAiLCBjcCwgJmxlbiwgJmNhbnNwZWVkdXAp ID09IDApIHsNCj4gKwkJaWYgKGNhbnNwZWVkdXApDQo+ICsJCQl1bXAtPnVtX2ZsYWdzIHw9IFVN X0NBTlNQRUVEVVA7DQo+ICAJfQ0KPiAgDQo+ICAJdW1wLT51bV9tb3VudHAgPSBtcDsNCj4gX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gc3ZuLXNyYy1o ZWFkQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3Jn L21haWxtYW4vbGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFu eSBtYWlsIHRvICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNCkl0IHNl ZW1zIHRoYXQgdGhpcyBjb21taXQgbWFrZXMgb3VyIHN5c3RlbXMgdG8gaGFuZyBhdCB0aGUgcG9p bnQsIHdoZW4gdHJ5aW5nIHRvIG1vdW50IHRoZQ0Kcm9vdCBwYXJ0aXRpb24sIGxhc3Qgc2VlbiBt ZXNzYWdlIG9uIGNvbnNvbGUgaXM6DQoNClsuLi5dDQptb3VudHJvb3Q6IHdhaXRpbmcgZm9yIGRl dmljZSAvZGV2L2dwdC9yb290Li4uDQoNCg0KVGhlIHJvb3QgcGFydGl0aW9ucyBvbiB0aG9zZSBz eXN0ZW1zIHJlc2lkZXMgb24gVUZTMiBmb3JtYXRlZCBTU0RzIChpZiB0aGlzIGhhcyBhbnkgcmVs ZXZhbmNlKS4NCg0KUmVnYXJkcywNCm9oDQoNCi0gLS0gDQpPLiBIYXJ0bWFubg0KDQpJY2ggd2lk ZXJzcHJlY2hlIGRlciBOdXR6dW5nIG9kZXIgw5xiZXJtaXR0bHVuZyBtZWluZXIgRGF0ZW4gZsO8 cg0KV2VyYmV6d2Vja2Ugb2RlciBmw7xyIGRpZSBNYXJrdC0gb2RlciBNZWludW5nc2ZvcnNjaHVu ZyAowqcgMjggQWJzLiA0IEJEU0cpLg0KLS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0K aUhVRUFSWUlBQjBXSVFTeThJQnhBUERrcVZCYVRKNDROMVpaUGJhNVJ3VUNYa0RqdVFBS0NSQTRO MVpaUGJhNQ0KUjRDWUFRRFZxZG1UZHRVU0J3b1laQkF6LzZUK0dOTm5xeHIvNzMremJGVWNmVUtD TVFEL1NzRGY2MU4zYkVkcg0Kcjh3UjltMjMwVlZ0R1I2Y0pIL0J0c0U2bkltTE5BZz0NCj1RU2FK DQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== From owner-svn-src-all@freebsd.org Mon Feb 10 05:11:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDA8C22CD25; Mon, 10 Feb 2020 05:11:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 48GDXp6N2xz3ybw; Mon, 10 Feb 2020 05:11:54 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3532E56E; Mon, 10 Feb 2020 00:11:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 10 Feb 2020 00:11:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=d FGluzElEcHep45+aASXJceDUF6xeoVEIHzeLAbu330=; b=vkKAPE4FE6uSABWvS qJg4XAuGGraqFISMMaS24yzgZXourlYoF5xjKzkUngW74T2BW3IknpSM9KpsV5p0 D06M4vOxXTE0EXtRTNHrdaB/R0USi7Jmu+QXnd6khmQrgM2zauanlfwAMxLt1PSI tQ7o6U5FLv36HL72ZJaqefdN8kEVEmvo/CxTw6Q1Ry7XviJ4NzpmFuEPa4BND+pu TtemtXf2RcjaDBrMxO4Vp0xxC/UoYCxCeSnTU6/9+T/7bSWj7jjSpBaINxXmCcrV mQFUZIqdUo1z9B849wI4w2IRUqZs/vtATAjyke/J5rQ0FGiLOAu9nXQmvscmm0pr OXzpg== 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=fm2; bh=dFGluzElEcHep45+aASXJceDUF6xeoVEIHzeLAbu3 30=; b=Bn7DmFZgLHDjF6OE4PXhKquYsObJo5ExmdpBxTBuV+ng18h5QRQGp7MJx hrfRPO0ogYh/PTiI6ghWUXAqQ7PxDa8MbM7p3JjMtIVN8ouXRb5bFp0IT3WchfcH FkLxG0IT8sYNmSD3QtUvp+7pv/t7kLf7MQ8cl/U7qTV2rUFFQWbPdeur+WAanK4T TCzdqAUbOREFdbXCweS5xLNDFTW/VZa5plPyMfpXu8bzJUIMnK/33nvSXggKWA0K g/PiHjKjH0zZcSoVKdIbYy2dXJgvApniDLktJIj7n5yMCsRJRaqJABfil6QvKZDP KgfTeZkS+ydI8XhrAYeaGSSb+lt3g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedtgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothht ucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucffohhmrghinhepfh hrvggvsghsugdrohhrghenucfkphepkedrgeeirdekledrvddufeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehstghothhtlhesshgrmhhstg hordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 45EFB30606E9; Mon, 10 Feb 2020 00:11:52 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs From: Scott Long In-Reply-To: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> Date: Sun, 9 Feb 2020 22:11:51 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3601.0.10) X-Rspamd-Queue-Id: 48GDXp6N2xz3ybw X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm2 header.b=vkKAPE4F; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=Bn7DmFZg; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 64.147.123.25 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-5.60 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[samsco.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; IP_SCORE(-3.50)[ip: (-9.82), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.68), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[25.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:11:55 -0000 > On Feb 9, 2020, at 10:01 PM, O. Hartmann = wrote: >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > Am Mon, 10 Feb 2020 00:23:20 +0000 (UTC) > Scott Long schrieb: >=20 >> Author: scottl >> Date: Mon Feb 10 00:23:20 2020 >> New Revision: 357710 >> URL: https://svnweb.freebsd.org/changeset/base/357710 >>=20 >> Log: >> Add rudamentary support for UFS to probe whether a block device = supports the >> BIO_SPEEDUP command. Add complimentary support to the CAM periphs = that >> support it. >>=20 >>=20 >=20 > It seems that this commit makes our systems to hang at the point, when = trying to mount the > root partition, last seen message on console is: >=20 > [...] > mountroot: waiting for device /dev/gpt/root... >=20 >=20 > The root partitions on those systems resides on UFS2 formated SSDs (if = this has any relevance). >=20 Thanks for the report. It=E2=80=99s unclear to me how this would be = causing a hang. I=E2=80=99ll work on it, but are you certain that it=E2=80=99s this commit and nothing else? Thanks, Scott From owner-svn-src-all@freebsd.org Mon Feb 10 05:14:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FC2122D011; Mon, 10 Feb 2020 05:14:57 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yw1-f68.google.com (mail-yw1-f68.google.com [209.85.161.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48GDcJ0dgvz400K; Mon, 10 Feb 2020 05:14:55 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yw1-f68.google.com with SMTP id l5so2949126ywd.4; Sun, 09 Feb 2020 21:14:55 -0800 (PST) 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=ZuHbJQMCyvMBpduqGbf6qcwaXaT2UWwQhnGzcf4+wdQ=; b=UvGzBpZYt0COH3b9njUs/8jHZ9txzQJtWhIVivn1Q2x5tVE8hcQR49IzhFTtoLymCJ deM361aoyXpDrFiJKxaABvZKYvHXGnMSJ2s2R0MfWKk2cCHIB26I9/IHwznVe/6NFSVC piLhgf1JCvKzk7WcIeatEBHCTR+DpBOwNvRwWfAwNBWQlypwXYhFThEAoSB4BQblSRjD NY40x9D7KmBe3uQTcCOWbkLJ6IK+NmVytzoUpkApACwCtf+lvVneesfClsAETArRvquF 39WBI3dcRDCcaW7BLARY1InLi1OA14MWEXbuGv34D0RjOQ4VoBbELr8jyxPQn+CUtqTU Cr2g== X-Gm-Message-State: APjAAAWvCgo5fPMiiII3MNk48tDLUGx9765WGR7d/4bBNNZ9TXmnlj1f gYHjLHvN5k8/Zxzo6hKh4o0UtgGn7axZEv7BOPiAc+0P X-Google-Smtp-Source: APXvYqyUOJSSlxgxrc2qqoE4UM25aecSgU6nfGu6vzm9jWYkF3nw2TQtts+JEQT3a43Rr4kqQc1lqfiriQAx7Gct824= X-Received: by 2002:a0d:ce02:: with SMTP id q2mr9469675ywd.400.1581311694827; Sun, 09 Feb 2020 21:14:54 -0800 (PST) MIME-Version: 1.0 References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> From: Li-Wen Hsu Date: Mon, 10 Feb 2020 13:14:42 +0800 Message-ID: Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs To: "O. Hartmann" Cc: Scott Long , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48GDcJ0dgvz400K 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.161.68 as permitted sender) smtp.mailfrom=lwhsufreebsd@gmail.com X-Spamd-Result: default: False [-3.08 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[68.161.85.209.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[68.161.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.08)[ip: (-0.60), ipnet: 209.85.128.0/17(-3.02), asn: 15169(-1.73), country: US(-0.05)]; FORGED_SENDER(0.30)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:14:57 -0000 On Mon, Feb 10, 2020 at 1:02 PM O. Hartmann wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am Mon, 10 Feb 2020 00:23:20 +0000 (UTC) > Scott Long schrieb: > > > Author: scottl > > Date: Mon Feb 10 00:23:20 2020 > > New Revision: 357710 > > URL: https://svnweb.freebsd.org/changeset/base/357710 > > > > Log: > > Add rudamentary support for UFS to probe whether a block device supports the > > BIO_SPEEDUP command. Add complimentary support to the CAM periphs that > > support it. > > > > Modified: > > head/sys/cam/ata/ata_da.c > > head/sys/cam/nvme/nvme_da.c > > head/sys/cam/scsi/scsi_da.c > > head/sys/ufs/ffs/ffs_softdep.c > > head/sys/ufs/ffs/ffs_vfsops.c > > > > Modified: head/sys/cam/ata/ata_da.c > > ============================================================================== > > --- head/sys/cam/ata/ata_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -1565,6 +1566,10 @@ adagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/nvme/nvme_da.c > > ============================================================================== > > --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -699,6 +700,10 @@ ndagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/scsi/scsi_da.c > > ============================================================================== > > --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -1942,6 +1942,10 @@ dagetattr(struct bio *bp) > > int ret; > > struct cam_periph *periph; > > > > + /* TODO: tunable knob for this */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > + > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > > > > Modified: head/sys/ufs/ffs/ffs_softdep.c > > ============================================================================== > > --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t shor > > { > > struct buf *bp; > > > > + if ((ump->um_flags & UM_CANSPEEDUP) == 0) > > + return; > > + > > bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); > > bp->b_iocmd = BIO_SPEEDUP; > > bp->b_ioflags = flags; > > > > Modified: head/sys/ufs/ffs/ffs_vfsops.c > > ============================================================================== > > --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:05:04 2020 (r357709) > > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r357710) > > @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) > > struct ucred *cred; > > struct g_consumer *cp; > > struct mount *nmp; > > - int candelete; > > + int candelete, canspeedup; > > off_t loc; > > > > fs = NULL; > > @@ -1009,6 +1009,13 @@ ffs_mountfs(devvp, mp, td) > > ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, > > &ump->um_trimlisthashsize); > > } > > + } > > + > > + /* TODO: sysctl tunables, runtime modification */ > > + len = sizeof(int); > > + if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { > > + if (canspeedup) > > + ump->um_flags |= UM_CANSPEEDUP; > > } > > > > ump->um_mountp = mp; > > _______________________________________________ > > 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" > > It seems that this commit makes our systems to hang at the point, when trying to mount the > root partition, last seen message on console is: > > [...] > mountroot: waiting for device /dev/gpt/root... > > > The root partitions on those systems resides on UFS2 formated SSDs (if this has any relevance). The test in the CI seems also handing because of this. The full backtrace is available at: https://ci.freebsd.org/job/FreeBSD-head-i386-test/8396/console The changes in the same build are r357709 and r357710. The previous is arm only change so it seems less suspicious. Please help checking this. Thanks. Li-Wen From owner-svn-src-all@freebsd.org Mon Feb 10 05:24:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFEE222D7D8; Mon, 10 Feb 2020 05:24:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GDqq3X5Zz40bR; Mon, 10 Feb 2020 05:24:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 11YyjuFSl17ZD11YzjctL7; Sun, 09 Feb 2020 22:24:54 -0700 X-Authority-Analysis: v=2.3 cv=ZsqT1OzG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=l697ptgUJYAA:10 a=iaTFZB6CAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=hFAfhol9mYH5f-FC4gUA:9 a=CjuIK1q_8ugA:10 a=uJid2lUzHGYA:10 a=QWXrQ9iV8q7LKaLQ9lfw:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id CC02D2DE; Sun, 9 Feb 2020 21:24:51 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 01A5OpqT006983; Sun, 9 Feb 2020 21:24:51 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 01A5Opqd006980; Sun, 9 Feb 2020 21:24:51 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202002100524.01A5Opqd006980@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Li-Wen Hsu cc: "O. Hartmann" , Scott Long , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs In-reply-to: References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> Comments: In-reply-to Li-Wen Hsu message dated "Mon, 10 Feb 2020 13:14:42 +0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 09 Feb 2020 21:24:51 -0800 X-CMAE-Envelope: MS4wfKwDYZ2UKfg9H66yJcGpXM32yQxvjTAkxEO1n8oTNxRbkOUlV937CROM0Sd35NoweUxzwMLXf/9w22E6Dq3eKGVxpQPlxPruIlFKni/XuWhcAcWdU+2q oXkm3JKdxeJZuoIopxNoG+SiRseaSo3/k5oG+xAHQNoeYtnbjvBjSlI8hPVEaX8C/K2PS2FNEbS1UAysCvQgxPPXZyAWHmJPbLB28718klFQHqSwNI3kM4wf t017USq9DO8zzjW9HXuMynVQsWKyCdcTMPWVcWFoSaP2HRPs8MuLwnhRUhreMSeUnKAUys+LjBcWdbwG2DEGsfHjfywYhDI6opSnKBdKPuRQ5HQ3wTHAiCn7 4+VIVTSk X-Rspamd-Queue-Id: 48GDqq3X5Zz40bR X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:24:55 -0000 In message , Li-Wen Hsu writes: > On Mon, Feb 10, 2020 at 1:02 PM O. Hartmann wrote: > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Am Mon, 10 Feb 2020 00:23:20 +0000 (UTC) > > Scott Long schrieb: > > > > > Author: scottl > > > Date: Mon Feb 10 00:23:20 2020 > > > New Revision: 357710 > > > URL: https://svnweb.freebsd.org/changeset/base/357710 > > > > > > Log: > > > Add rudamentary support for UFS to probe whether a block device support > s the > > > BIO_SPEEDUP command. Add complimentary support to the CAM periphs that > > > support it. > > > > > > Modified: > > > head/sys/cam/ata/ata_da.c > > > head/sys/cam/nvme/nvme_da.c > > > head/sys/cam/scsi/scsi_da.c > > > head/sys/ufs/ffs/ffs_softdep.c > > > head/sys/ufs/ffs/ffs_vfsops.c > > > > > > Modified: head/sys/cam/ata/ata_da.c > > > ========================================================================= > ===== > > > --- head/sys/cam/ata/ata_da.c Mon Feb 10 00:05:04 2020 (r357709) > > > +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r357710) > > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > > #include > > > #include > > > #include > > > +#include > > > #include > > > #endif /* _KERNEL */ > > > > > > @@ -1565,6 +1566,10 @@ adagetattr(struct bio *bp) > > > { > > > int ret; > > > struct cam_periph *periph; > > > + > > > + /* TODO: tunable knob */ > > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > > + return (0); > > > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > > cam_periph_lock(periph); > > > > > > Modified: head/sys/cam/nvme/nvme_da.c > > > ========================================================================= > ===== > > > --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:05:04 2020 (r3 > 57709) > > > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r3 > 57710) > > > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > > > #include > > > #include > > > #include > > > +#include > > > #include > > > #endif /* _KERNEL */ > > > > > > @@ -699,6 +700,10 @@ ndagetattr(struct bio *bp) > > > { > > > int ret; > > > struct cam_periph *periph; > > > + > > > + /* TODO: tunable knob */ > > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > > + return (0); > > > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > > cam_periph_lock(periph); > > > > > > Modified: head/sys/cam/scsi/scsi_da.c > > > ========================================================================= > ===== > > > --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:05:04 2020 (r3 > 57709) > > > +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r3 > 57710) > > > @@ -1942,6 +1942,10 @@ dagetattr(struct bio *bp) > > > int ret; > > > struct cam_periph *periph; > > > > > > + /* TODO: tunable knob for this */ > > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > > + return (0); > > > + > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > > cam_periph_lock(periph); > > > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > > > > > > Modified: head/sys/ufs/ffs/ffs_softdep.c > > > ========================================================================= > ===== > > > --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:05:04 2020 (r3 > 57709) > > > +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r3 > 57710) > > > @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t s > hor > > > { > > > struct buf *bp; > > > > > > + if ((ump->um_flags & UM_CANSPEEDUP) == 0) > > > + return; > > > + > > > bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); > > > bp->b_iocmd = BIO_SPEEDUP; > > > bp->b_ioflags = flags; > > > > > > Modified: head/sys/ufs/ffs/ffs_vfsops.c > > > ========================================================================= > ===== > > > --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:05:04 2020 (r3 > 57709) > > > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r3 > 57710) > > > @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) > > > struct ucred *cred; > > > struct g_consumer *cp; > > > struct mount *nmp; > > > - int candelete; > > > + int candelete, canspeedup; > > > off_t loc; > > > > > > fs = NULL; > > > @@ -1009,6 +1009,13 @@ ffs_mountfs(devvp, mp, td) > > > ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, > > > &ump->um_trimlisthashsize); > > > } > > > + } > > > + > > > + /* TODO: sysctl tunables, runtime modification */ > > > + len = sizeof(int); > > > + if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { > > > + if (canspeedup) > > > + ump->um_flags |= UM_CANSPEEDUP; > > > } > > > > > > ump->um_mountp = mp; > > > _______________________________________________ > > > 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" > > > > It seems that this commit makes our systems to hang at the point, when tryi > ng to mount the > > root partition, last seen message on console is: > > > > [...] > > mountroot: waiting for device /dev/gpt/root... > > > > > > The root partitions on those systems resides on UFS2 formated SSDs (if this > has any relevance). > > The test in the CI seems also handing because of this. The full > backtrace is available at: > > https://ci.freebsd.org/job/FreeBSD-head-i386-test/8396/console > > The changes in the same build are r357709 and r357710. The previous is > arm only change so it seems less suspicious. > > Please help checking this. Thanks. My weekly (Sunday evening) builds: Two of my four machines hang, all with ada(4). The machines that boot use gmirror GEOMs as rootfs while the machines that hang mount the physical disk. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Feb 10 05:35:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB7CE22DD90; Mon, 10 Feb 2020 05:35:30 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GF413PCtz416g; Mon, 10 Feb 2020 05:35:29 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581312921; bh=bomQWnUPRq838T1b45Mzq8Qjew2udIfDmUrt+HAlyOE=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=QHthDglGCpuIZXkd4fVvaUaeM5VyknesPkhSx3NBFrQyCUaS3MMs+6CgGx+Z8WWGX S9sUlMmF/RU30JxbBMhorFDmA4exXGH7xLt0v4axYErlSt8zFKzCSm2N2+xV9nekVB 7A3skn2/vOJTdjlLl5PmtffdntMO5nmYUkW5nT38= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([77.183.249.39]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MysRu-1jNNrX28Nm-00vz7C; Mon, 10 Feb 2020 06:35:21 +0100 Date: Mon, 10 Feb 2020 06:34:47 +0100 From: "O. Hartmann" To: Scott Long Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs Message-ID: <20200210063514.183b1c22@thor.intern.walstatt.dynvpn.de> In-Reply-To: References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:23e2xwByRkvUbrgtsmVmGgXA6u1KwjgnXyyoVOl4dNUirmL5jWW oG2j7wUDhnWukhCCaMWFgT5R7TeiPryn+IqWMkPWxHgTFv/+sJ84+RygDUUVcjR8DRRMP5a hC1oEU/wiw07+j8DuITqiEL6a9BXHr6THxyQoxHuWuz43jLRnMF/3yzgPdhYc9gz8C7A3Zx B7w5nAwZsXJvZ2dcH7D3Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZbeIIS5DZTA=:FQ1qfEq4dyA+AbITGaYS+i z7aRtndmRL0ihir2R0XnH5IoAVjsJLVlvlmJwo084VNeavpMQXy9CFRnc2/hve1VtC98hvVFd C+cr9dpyqln+r5XaQS18xCJw4kU4eUOBvG5bxGCllrRhED27loyZoo+TOM3+cPYouhi13142h SBVe2UCjlmYef3455iAZsJ1DjWu/AjMZxJ03ALGAfJcTbYCD1vXRnHT3Hza528ZI5YcKUD93K 6p3IP5AOvQ9ISmI9yopAtamBh3KbDi1cl5DWBfJRs/w+jgnVddgRSAMTMEC2oZ4URIrHTs+cT 5qG14hLUXcDUgXvwlkzB9Tv9KnLXFxCAZ/Vpqfr0KUqO4l+lDDJkj+eH0E7FmYATLd7sIR/J7 +yi1W72ZeqHk2vdsKAq9U6ZBtOohs0lnW80cyozvSqJMHATJkACEJwWv6yGNoQOTs3k/eEWTr kaGqTAm+sSO6//l+W/U/zjciBulYNvUHdUemQiXE3vi+5Xawk4BmzqiIxhSS20haMA2AUzVNE Q2ONLH+DO3fIEWwTdpZfn421NbqE2X86YvB1YnMboB528W61RmcHiFJjFv6sDaEXSzjZbbseP KcOAxzWOgwB5G/VgVYyhjawBxZPsKeFplm62kAElzWQ1BPfKeByoQZH47oqB5WTATV3raZtDD p4tnrYw3JgIUMX8ssbb/JZyVtIBKVTHtOTDzT5Bsda7mbK3s3Zsh/YAgDEfiI1FGmCglh2YON SkhiEHfmsnsHMgvZ//hlbnvjeDqo8y7n1/naJvTlBeGsac/OrpZp0liac0MMLL10nGkhyWZpd oixl0XJ/nLOPpNRt/vsNN1Uw9A8hH4PHzVIdnx4RKtj3NhHhxHTppyei67utuSirFqWFiPjAL ru2RD7StBY13muoD3cIHIuAWVmIX19h+XMCExRHWDA+/JqycXNkU1BlJAM2UaL5iHz2wHjc+3 5lSW5ZwLf3303k3SlbyGJPhbshk1fTu+Z9rf+ca9Eibt0fCZXnyLbul1ek1NnGoaRasztJFWk aLAYYZJel9qxbLh3q6/HVeANgO4CVWxSKzbXyG6RlwRNmtPgvMBdsf09OTDSURY8spmWW3YAk 4dL/ximq/6Mz1mMAq3SbIzeLH9/Oul2AA019S0gdx/1IiwL1EDLEjAgVmBYGAigAAZDqWrfBW JEiMUtr1OHdl5upcz4fxJZBXLNw4+QD3up+6KmxwWBGu4Bd+hvtVh4mT4+74WCE2neLvKgsJJ /4hWM45VEhbmsv3Li X-Rspamd-Queue-Id: 48GF413PCtz416g X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=QHthDglG; dmarc=none; spf=none (mx1.freebsd.org: domain of o.hartmann@walstatt.org has no SPF policy when checking 212.227.17.21) smtp.mailfrom=o.hartmann@walstatt.org X-Spamd-Result: default: False [-3.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; IP_SCORE(-1.10)[ip: (-6.60), ipnet: 212.227.0.0/16(-1.11), asn: 8560(2.23), country: DE(-0.02)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; MIME_BASE64_TEXT(0.10)[]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[21.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[39.249.183.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:35:30 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFN1 biwgOSBGZWIgMjAyMCAyMjoxMTo1MSAtMDcwMA0KU2NvdHQgTG9uZyA8c2NvdHRsQHNhbXNjby5v cmc+IHNjaHJpZWI6DQoNCj4gPiBPbiBGZWIgOSwgMjAyMCwgYXQgMTA6MDEgUE0sIE8uIEhhcnRt YW5uIDxvLmhhcnRtYW5uQHdhbHN0YXR0Lm9yZz4gd3JvdGU6DQo+ID4gDQo+ID4gLS0tLS1CRUdJ TiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KPiA+IEhhc2g6IFNIQTI1Ng0KPiA+IA0KPiA+IEFt IE1vbiwgMTAgRmViIDIwMjAgMDA6MjM6MjAgKzAwMDAgKFVUQykNCj4gPiBTY290dCBMb25nIDxz Y290dGxARnJlZUJTRC5vcmc+IHNjaHJpZWI6DQo+ID4gICANCj4gPj4gQXV0aG9yOiBzY290dGwN Cj4gPj4gRGF0ZTogTW9uIEZlYiAxMCAwMDoyMzoyMCAyMDIwDQo+ID4+IE5ldyBSZXZpc2lvbjog MzU3NzEwDQo+ID4+IFVSTDogaHR0cHM6Ly9zdm53ZWIuZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jh c2UvMzU3NzEwDQo+ID4+IA0KPiA+PiBMb2c6DQo+ID4+ICBBZGQgcnVkYW1lbnRhcnkgc3VwcG9y dCBmb3IgVUZTIHRvIHByb2JlIHdoZXRoZXIgYSBibG9jayBkZXZpY2Ugc3VwcG9ydHMgdGhlDQo+ ID4+ICBCSU9fU1BFRURVUCBjb21tYW5kLiAgQWRkIGNvbXBsaW1lbnRhcnkgc3VwcG9ydCB0byB0 aGUgQ0FNIHBlcmlwaHMgdGhhdA0KPiA+PiAgc3VwcG9ydCBpdC4NCj4gPj4gDQo+ID4+ICAgDQo+ ID4gDQo+ID4gSXQgc2VlbXMgdGhhdCB0aGlzIGNvbW1pdCBtYWtlcyBvdXIgc3lzdGVtcyB0byBo YW5nIGF0IHRoZSBwb2ludCwgd2hlbiB0cnlpbmcgdG8gbW91bnQgdGhlDQo+ID4gcm9vdCBwYXJ0 aXRpb24sIGxhc3Qgc2VlbiBtZXNzYWdlIG9uIGNvbnNvbGUgaXM6DQo+ID4gDQo+ID4gWy4uLl0N Cj4gPiBtb3VudHJvb3Q6IHdhaXRpbmcgZm9yIGRldmljZSAvZGV2L2dwdC9yb290Li4uDQo+ID4g DQo+ID4gDQo+ID4gVGhlIHJvb3QgcGFydGl0aW9ucyBvbiB0aG9zZSBzeXN0ZW1zIHJlc2lkZXMg b24gVUZTMiBmb3JtYXRlZCBTU0RzIChpZiB0aGlzIGhhcyBhbnkNCj4gPiByZWxldmFuY2UpLiAN Cj4gDQo+IFRoYW5rcyBmb3IgdGhlIHJlcG9ydC4gIEl04oCZcyB1bmNsZWFyIHRvIG1lIGhvdyB0 aGlzIHdvdWxkIGJlIGNhdXNpbmcgYSBoYW5nLiAgSeKAmWxsIHdvcmsgb24NCj4gaXQsIGJ1dCBh cmUgeW91IGNlcnRhaW4gdGhhdCBpdOKAmXMgdGhpcyBjb21taXQgYW5kIG5vdGhpbmcgZWxzZT8N Cj4gDQo+IFRoYW5rcywNCj4gU2NvdHQNCj4gDQo+IA0KPiBfX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fXw0KPiBzdm4tc3JjLWhlYWRAZnJlZWJzZC5vcmcgbWFp bGluZyBsaXN0DQo+IGh0dHBzOi8vbGlzdHMuZnJlZWJzZC5vcmcvbWFpbG1hbi9saXN0aW5mby9z dm4tc3JjLWhlYWQNCj4gVG8gdW5zdWJzY3JpYmUsIHNlbmQgYW55IG1haWwgdG8gInN2bi1zcmMt aGVhZC11bnN1YnNjcmliZUBmcmVlYnNkLm9yZyINCg0KSGVsbG8uDQoNCkknbSBub3QgcmVhbGx5 IHN1cmUsIHRvIGJlIGhvbmVzdCwgSSB0cmllZCBhICJmYXN0IGh1cnJ5IiBiaXNlY3Rpb24uIE15 IGxhc3Qga25vd24gZ29vZCBrZXJuZWwNCmlzICJGcmVlQlNEIDEzLjAtQ1VSUkVOVCAjMTAgcjM1 NzcwMyBhbWQ2NCIgb24gdGhvc2UgYm94ZXMgaW4NCnF1ZXN0aW9uLg0KDQpLaW5kIHJlZ2FyZHMN Cm9oDQoNCi0gLS0gDQpPLiBIYXJ0bWFubg0KDQpJY2ggd2lkZXJzcHJlY2hlIGRlciBOdXR6dW5n IG9kZXIgw5xiZXJtaXR0bHVuZyBtZWluZXIgRGF0ZW4gZsO8cg0KV2VyYmV6d2Vja2Ugb2RlciBm w7xyIGRpZSBNYXJrdC0gb2RlciBNZWludW5nc2ZvcnNjaHVuZyAowqcgMjggQWJzLiA0IEJEU0cp Lg0KLS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUhVRUFSWUlBQjBXSVFTeThJQnhB UERrcVZCYVRKNDROMVpaUGJhNVJ3VUNYa0Rya2dBS0NSQTROMVpaUGJhNQ0KUnhDVUFQMFZRdzRx dktoZVd5aUtOelZwVUlVU051dzgvOTlsZHRlY01FQWpQNmZBMUFFQTdwNkFjaUNVWU4vbg0KbEF0 eEp6ZTQ4L09aSkl1U1FWU2RMcm91Y21Qb1p3ST0NCj1UOVZzDQotLS0tLUVORCBQR1AgU0lHTkFU VVJFLS0tLS0NCg== From owner-svn-src-all@freebsd.org Mon Feb 10 05:36:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3FE222DE55; Mon, 10 Feb 2020 05:36:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GF5N6b8Wz41FT; Mon, 10 Feb 2020 05:36:40 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 11kLjuLHG17ZD11kMjcuSv; Sun, 09 Feb 2020 22:36:39 -0700 X-Authority-Analysis: v=2.3 cv=ZsqT1OzG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=l697ptgUJYAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=h-IHFASVRak1_FqS7qcA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5D22E39A; Sun, 9 Feb 2020 21:36:36 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 01A5aaJe073844; Sun, 9 Feb 2020 21:36:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 01A5aakV073830; Sun, 9 Feb 2020 21:36:36 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202002100536.01A5aakV073830@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "O. Hartmann" cc: Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs In-reply-to: <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> Comments: In-reply-to "O. Hartmann" message dated "Mon, 10 Feb 2020 06:01:18 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 09 Feb 2020 21:36:35 -0800 X-CMAE-Envelope: MS4wfEAPxBMGojW5Int0+BPxVKL3efhSgw61/+ctwvV5Oi8g6hsECsF0tYDqArUs9CG/coEgs4Lgl27QzBXYSii1nV5BN7c8nsl716oJ9WaCjGxDCHS5wjxO pshbxRc+afwPsC2/f1Fr/4hPg/SgliMFnpOty9+liu+Ppoz04Ea7g4JXhnBm1m5Cw+KONrlSAMUrNt2NzWNAMjFwqeBoI3l4yP4p4D5X1BUHmoaAsh8ks96C g76mIJAXtt1hRI45vjXc5arDa+Oz5tPm0CF796jO9JeyxDd61Z9Xwfr2a8STx9si8VK70XMyUGoU7zYo4FHBYymlAheLmMpcJiX2ZSSaQWc= X-Rspamd-Queue-Id: 48GF5N6b8Wz41FT X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.138) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.13 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.43)[ip: (-6.34), ipnet: 64.59.128.0/20(-3.21), asn: 6327(-2.50), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 05:36:42 -0000 In message <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de>, "O. Hartma nn" writes: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am Mon, 10 Feb 2020 00:23:20 +0000 (UTC) > Scott Long schrieb: > > > Author: scottl > > Date: Mon Feb 10 00:23:20 2020 > > New Revision: 357710 > > URL: https://svnweb.freebsd.org/changeset/base/357710 > > > > Log: > > Add rudamentary support for UFS to probe whether a block device supports > the > > BIO_SPEEDUP command. Add complimentary support to the CAM periphs that > > support it. > > > > Modified: > > head/sys/cam/ata/ata_da.c > > head/sys/cam/nvme/nvme_da.c > > head/sys/cam/scsi/scsi_da.c > > head/sys/ufs/ffs/ffs_softdep.c > > head/sys/ufs/ffs/ffs_vfsops.c > > > > Modified: head/sys/cam/ata/ata_da.c > > =========================================================================== > === > > --- head/sys/cam/ata/ata_da.c Mon Feb 10 00:05:04 2020 (r35770 > 9) > > +++ head/sys/cam/ata/ata_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -1565,6 +1566,10 @@ adagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/nvme/nvme_da.c > > =========================================================================== > === > > --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:05:04 2020 (r35770 > 9) > > +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #endif /* _KERNEL */ > > > > @@ -699,6 +700,10 @@ ndagetattr(struct bio *bp) > > { > > int ret; > > struct cam_periph *periph; > > + > > + /* TODO: tunable knob */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > > > Modified: head/sys/cam/scsi/scsi_da.c > > =========================================================================== > === > > --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:05:04 2020 (r35770 > 9) > > +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -1942,6 +1942,10 @@ dagetattr(struct bio *bp) > > int ret; > > struct cam_periph *periph; > > > > + /* TODO: tunable knob for this */ > > + if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) > > + return (0); > > + > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > > cam_periph_lock(periph); > > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > > > > Modified: head/sys/ufs/ffs/ffs_softdep.c > > =========================================================================== > === > > --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:05:04 2020 (r35770 > 9) > > +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -1464,6 +1464,9 @@ softdep_send_speedup(struct ufsmount *ump, size_t sho > r > > { > > struct buf *bp; > > > > + if ((ump->um_flags & UM_CANSPEEDUP) == 0) > > + return; > > + > > bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); > > bp->b_iocmd = BIO_SPEEDUP; > > bp->b_ioflags = flags; > > > > Modified: head/sys/ufs/ffs/ffs_vfsops.c > > =========================================================================== > === > > --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:05:04 2020 (r35770 > 9) > > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 00:23:20 2020 (r35771 > 0) > > @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) > > struct ucred *cred; > > struct g_consumer *cp; > > struct mount *nmp; > > - int candelete; > > + int candelete, canspeedup; > > off_t loc; > > > > fs = NULL; > > @@ -1009,6 +1009,13 @@ ffs_mountfs(devvp, mp, td) > > ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, > > &ump->um_trimlisthashsize); > > } > > + } > > + > > + /* TODO: sysctl tunables, runtime modification */ > > + len = sizeof(int); > > + if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { > > + if (canspeedup) > > + ump->um_flags |= UM_CANSPEEDUP; > > } > > > > ump->um_mountp = mp; > > _______________________________________________ > > 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" > > It seems that this commit makes our systems to hang at the point, when trying > to mount the > root partition, last seen message on console is: > > [...] > mountroot: waiting for device /dev/gpt/root... > > > The root partitions on those systems resides on UFS2 formated SSDs (if this h > as any relevance). What does fstab have to mount root? Mine that work use gmirror: /dev/mirror/gm0a / ufs rw 1 1 The machines that hang use: /dev/ada0s1a / ufs rw 1 1 or a disk with a UFS label (essentially the same thing). -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Feb 10 06:12:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC8C722EE1F; Mon, 10 Feb 2020 06:12:37 +0000 (UTC) (envelope-from scottl@samsco.org) 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 48GFtr3hz2z42kR; Mon, 10 Feb 2020 06:12:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 565EE21A7B; Mon, 10 Feb 2020 01:12:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 10 Feb 2020 01:12:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=i LYpBnnGC7XcU/cKCfMgQU3aMGGNE2bRNqIhUhrdpw4=; b=PwfxXOxQ7/wl351u7 GoZzVvgATnl3iwke+1AwQHbjDSX04E6rvTH/jIaqN1pLClhFxNZRa+ickMpwJe2D zDsD3KhFLy3OaYbUabzku9vaMNdPVUWzCzII8jqDSyT+Ft5vFKZ1069K7wRL1aCP dJN+FjCfoMfSCJEikJlna80+JlF5tYE6DaImIWjSuT5m9fF1ifTgfIoBxJEfvkDa LEFmXhXdqcMx5NjTu/s5xWc2i6aUv80gSz5qTE7dXViPT0FLAnbumxOywGVgL9ee Tt0KSKJeTWOkOppurvk8JPhsFhfK0yO2G1FGdBce2cuvfeOH+UUFC2kzW2aG9ixc sJG9A== 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=fm2; bh=iLYpBnnGC7XcU/cKCfMgQU3aMGGNE2bRNqIhUhrdp w4=; b=LDZykSnOvxNmfXxpoR8OJeWCL+iaKopYGqsq3vAnpd38BWu2s1X73rTLe gbnCL3QPpHA8m0rTX49zu2F3IZ1RtHcbHrEV2Lh8fIRrU6iaN/OtFfxk0MYlGQsQ LAJOCZ1JGVpPcK0rfo8iZgppNV2devduqklhu5bh/D4wh40K1Jzjq7ynN69vHWCe 6jYegtykfOE3cTCENViu04NvQ2ALnGcxpVrXN8tFg4ewph8VzPB5/kEQKKpJt+mf Pc4H8BFQ4gpt3mm0zqKFcOI1c6881OX1HJwqed2D7r86a1WGUKv47vOUowd/PjUA FKtJNgZ/eS5M5Em6CmxyHxSyWPPXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedtgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothht ucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucfkphepkedrgeeird ekledrvddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id A9984328005E; Mon, 10 Feb 2020 01:12:34 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs From: Scott Long In-Reply-To: <202002100536.01A5aakV073830@slippy.cwsent.com> Date: Sun, 9 Feb 2020 23:12:34 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <072B4947-08B4-4516-80F6-D4F7C0687568@samsco.org> References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> <202002100536.01A5aakV073830@slippy.cwsent.com> To: Cy Schubert , "O. Hartmann" X-Mailer: Apple Mail (2.3601.0.10) X-Rspamd-Queue-Id: 48GFtr3hz2z42kR X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm2 header.b=PwfxXOxQ; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=LDZykSnO; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 66.111.4.27 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-5.59 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.27]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[samsco.org]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; IP_SCORE(-3.49)[ip: (-9.83), ipnet: 66.111.4.0/24(-4.89), asn: 11403(-2.68), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[27.4.111.66.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 06:12:37 -0000 >>=20 >> It seems that this commit makes our systems to hang at the point, = when trying >> to mount the >> root partition, last seen message on console is: >>=20 >> [...] >> mountroot: waiting for device /dev/gpt/root... >>=20 >>=20 >> The root partitions on those systems resides on UFS2 formated SSDs = (if this h >> as any relevance). >=20 > What does fstab have to mount root? >=20 > Mine that work use gmirror: >=20 > /dev/mirror/gm0a / ufs rw 1 1 >=20 > The machines that hang use: >=20 > /dev/ada0s1a / ufs rw 1 1 > or a disk with a UFS label (essentially the same thing). >=20 Can you try changing the =E2=80=9Creturn (0)=E2=80=9D that I added to = =E2=80=9Creturn (-1)=E2=80=9D in ata_da.c et all? That might fix it, = but I can=E2=80=99t easily test booting off of UFS at the moment. Scott From owner-svn-src-all@freebsd.org Mon Feb 10 06:54:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9368E230273; Mon, 10 Feb 2020 06:54:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48GGq831xMz44c1; Mon, 10 Feb 2020 06:54:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 12xcj2fqoRnrK12xejHi1g; Sun, 09 Feb 2020 23:54:26 -0700 X-Authority-Analysis: v=2.3 cv=L7FjvNb8 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=l697ptgUJYAA:10 a=-o65W9qwAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=xqHEoH2P8hYTBZT-1-MA:9 a=wPNLvfGTeEIA:10 a=1tiFkAoI0pxFi1YEbzhn:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2A20AFB; Sun, 9 Feb 2020 22:54:24 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 01A6sNhV003829; Sun, 9 Feb 2020 22:54:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 01A6sMsi003826; Sun, 9 Feb 2020 22:54:22 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202002100654.01A6sMsi003826@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Scott Long cc: Cy Schubert , "O. Hartmann" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357710 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs In-reply-to: <072B4947-08B4-4516-80F6-D4F7C0687568@samsco.org> References: <202002100023.01A0NKmY053556@repo.freebsd.org> <20200210060145.6920e8f5@thor.intern.walstatt.dynvpn.de> <202002100536.01A5aakV073830@slippy.cwsent.com> <072B4947-08B4-4516-80F6-D4F7C0687568@samsco.org> Comments: In-reply-to Scott Long message dated "Sun, 09 Feb 2020 23:12:34 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 09 Feb 2020 22:54:22 -0800 X-CMAE-Envelope: MS4wfEyaogGzibbq3zFRij8RjqAqaXLjwJi9th8vTGINIiwJjeZGxtLLwSkiCu/DRpUL2HZkSLaTZGttRQo0sRgPi4V3d54hTRXis0ruuoSJabPZ9kn2wYbm OxAMrKDlVM9VWZObvfP1ETU1zdBf5fkFtz4RUpY3PB75h9L3FIUThfEkKppmhXDNGtVPBsdp9bnFxxacT/U7+KocUIVuAuHJv/HFB8bkuknJ1U+rPz6h+nBJ 1KFVqTSDXxUQPw1lcodSsTtTOSesSiYAfn7jBk3ZsMPm2gBjz6RV0IsaBN+T1wSdDGFLfK48aTBPqysTrfENVJYv1jkCpzMyOyxpcgYzEsk= X-Rspamd-Queue-Id: 48GGq831xMz44c1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.40)[ip: (-6.21), ipnet: 64.59.128.0/20(-3.21), asn: 6327(-2.50), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 06:54:29 -0000 In message <072B4947-08B4-4516-80F6-D4F7C0687568@samsco.org>, Scott Long writes : > > > >> > >> It seems that this commit makes our systems to hang at the point, when try > ing > >> to mount the > >> root partition, last seen message on console is: > >> > >> [...] > >> mountroot: waiting for device /dev/gpt/root... > >> > >> > >> The root partitions on those systems resides on UFS2 formated SSDs (if thi > s h > >> as any relevance). > > > > What does fstab have to mount root? > > > > Mine that work use gmirror: > > > > /dev/mirror/gm0a / ufs rw 1 1 > > > > The machines that hang use: > > > > /dev/ada0s1a / ufs rw 1 1 > > or a disk with a UFS label (essentially the same thing). > > > > Can you try changing the “return (0)” that I added to “return (-1)” i > n ata_da.c et all? That might fix it, but I can’t easily test booting off > of UFS at the moment. It didn't change anything. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Feb 10 11:09:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B5FA2363AA; Mon, 10 Feb 2020 11:09:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GNTx2Gdxz4Kd6; Mon, 10 Feb 2020 11:09:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EB9E1E1F7; Mon, 10 Feb 2020 11:09:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01AB9vpL038580; Mon, 10 Feb 2020 11:09:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AB9u8Y038575; Mon, 10 Feb 2020 11:09:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002101109.01AB9u8Y038575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Feb 2020 11:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357726 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 357726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 11:09:57 -0000 Author: hselasky Date: Mon Feb 10 11:09:56 2020 New Revision: 357726 URL: https://svnweb.freebsd.org/changeset/base/357726 Log: Add USB host controller PCI ID's for Hygon. Differential Revision: https://reviews.freebsd.org/D23564 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Mon Feb 10 09:11:10 2020 (r357725) +++ head/sys/dev/usb/controller/ehci_pci.c Mon Feb 10 11:09:56 2020 (r357726) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #define PCI_EHCI_VENDORID_APPLE 0x106b #define PCI_EHCI_VENDORID_ATI 0x1002 #define PCI_EHCI_VENDORID_CMDTECH 0x1095 +#define PCI_EHCI_VENDORID_HYGON 0x1d94 #define PCI_EHCI_VENDORID_INTEL 0x8086 #define PCI_EHCI_VENDORID_NEC 0x1033 #define PCI_EHCI_VENDORID_OPTI 0x1045 @@ -374,6 +375,9 @@ ehci_pci_attach(device_t self) break; case PCI_EHCI_VENDORID_CMDTECH: sprintf(sc->sc_vendor, "CMDTECH"); + break; + case PCI_EHCI_VENDORID_HYGON: + sprintf(sc->sc_vendor, "Hygon"); break; case PCI_EHCI_VENDORID_INTEL: sprintf(sc->sc_vendor, "Intel"); Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Mon Feb 10 09:11:10 2020 (r357725) +++ head/sys/dev/usb/controller/ohci_pci.c Mon Feb 10 11:09:56 2020 (r357726) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #define PCI_OHCI_VENDORID_APPLE 0x106b #define PCI_OHCI_VENDORID_ATI 0x1002 #define PCI_OHCI_VENDORID_CMDTECH 0x1095 +#define PCI_OHCI_VENDORID_HYGON 0x1d94 #define PCI_OHCI_VENDORID_NEC 0x1033 #define PCI_OHCI_VENDORID_NVIDIA 0x12D2 #define PCI_OHCI_VENDORID_NVIDIA2 0x10DE @@ -279,6 +280,9 @@ ohci_pci_attach(device_t self) break; case PCI_OHCI_VENDORID_CMDTECH: sprintf(sc->sc_vendor, "CMDTECH"); + break; + case PCI_OHCI_VENDORID_HYGON: + sprintf(sc->sc_vendor, "Hygon"); break; case PCI_OHCI_VENDORID_NEC: sprintf(sc->sc_vendor, "NEC"); Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Mon Feb 10 09:11:10 2020 (r357725) +++ head/sys/dev/usb/controller/xhci_pci.c Mon Feb 10 11:09:56 2020 (r357726) @@ -107,6 +107,9 @@ xhci_pci_match(device_t self) case 0x78141022: return ("AMD FCH USB 3.0 controller"); + case 0x145f1d94: + return ("Hygon USB 3.0 controller"); + case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); case 0x00151912: From owner-svn-src-all@freebsd.org Mon Feb 10 13:24:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0389823A417; Mon, 10 Feb 2020 13:24:15 +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) server-signature RSA-PSS (4096 bits) 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 48GRSt5zSQz4TbZ; Mon, 10 Feb 2020 13:24:14 +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 AE2DF1FBCB; Mon, 10 Feb 2020 13:24:14 +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 01ADOEfL021577; Mon, 10 Feb 2020 13:24:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ADOEcD021576; Mon, 10 Feb 2020 13:24:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202002101324.01ADOEcD021576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 10 Feb 2020 13:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357727 - 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: 357727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 13:24:15 -0000 Author: trasz Date: Mon Feb 10 13:24:14 2020 New Revision: 357727 URL: https://svnweb.freebsd.org/changeset/base/357727 Log: Make linux(4) use kern_socketpair(9) instead of going through sys_socketpair(). It's a cleanup; no functional changes. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22814 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Mon Feb 10 11:09:56 2020 (r357726) +++ head/sys/compat/linux/linux_socket.c Mon Feb 10 13:24:14 2020 (r357727) @@ -753,25 +753,19 @@ linux_getpeername(struct thread *td, struct linux_getp int linux_socketpair(struct thread *td, struct linux_socketpair_args *args) { - struct socketpair_args /* { - int domain; - int type; - int protocol; - int *rsv; - } */ bsd_args; - int error; + int domain, error, sv[2], type; - bsd_args.domain = linux_to_bsd_domain(args->domain); - if (bsd_args.domain != PF_LOCAL) + domain = linux_to_bsd_domain(args->domain); + if (domain != PF_LOCAL) return (EAFNOSUPPORT); - bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK; - if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) + type = args->type & LINUX_SOCK_TYPE_MASK; + if (type < 0 || type > LINUX_SOCK_MAX) return (EINVAL); error = linux_set_socket_flags(args->type & ~LINUX_SOCK_TYPE_MASK, - &bsd_args.type); + &type); if (error != 0) return (error); - if (args->protocol != 0 && args->protocol != PF_UNIX) + if (args->protocol != 0 && args->protocol != PF_UNIX) { /* * Use of PF_UNIX as protocol argument is not right, @@ -780,10 +774,16 @@ linux_socketpair(struct thread *td, struct linux_socke * to FreeBSD one. */ return (EPROTONOSUPPORT); - else - bsd_args.protocol = 0; - bsd_args.rsv = (int *)PTRIN(args->rsv); - return (sys_socketpair(td, &bsd_args)); + } + error = kern_socketpair(td, domain, type, 0, sv); + if (error != 0) + return (error); + error = copyout(sv, PTRIN(args->rsv), 2 * sizeof(int)); + if (error != 0) { + (void)kern_close(td, sv[0]); + (void)kern_close(td, sv[1]); + } + return (error); } #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) From owner-svn-src-all@freebsd.org Mon Feb 10 13:46:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59CF223AF33; Mon, 10 Feb 2020 13:46:16 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48GRyH633Mz4VwG; Mon, 10 Feb 2020 13:46:15 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qv1-xf41.google.com with SMTP id y8so3173207qvk.6; Mon, 10 Feb 2020 05:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=M6IMQ4CjZIOJzU42u3y6T2tPcpfStx3yu1evYXkqjEQ=; b=MRhGKokRHX0wLNWkIU3IK8KBPcTS0m6ZrFsrkpQvNE/UZegvYTbSnedppqPxizXd3x +LrqaiKAjeJOpyaRL67uA//wNYKeAtvaZvUaWSDmHhYIorGA9Gm5FdqmTohA7pL7nAZH 2A054n0hVbWvrerMNXtvLfWeskKcdaJmxf6tuXzAxKehUb/rMeIm5z6+OLXHxMUfPetd qlwD9IfxPlDba8qkH+CR/uuTbgQYzrq+Mi3GODtACOnxWWrYO4NBROJ3Kxi3ej8a0NFY egFH6dwEL/hBlHwYVoRmNSsMFmcwWUiDJbiZXxFF6YX1NK0c8w5HxLz5TePCzrQk9fxB iupQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M6IMQ4CjZIOJzU42u3y6T2tPcpfStx3yu1evYXkqjEQ=; b=ZrA6pxTgrS7W0K8T/zheQkIYZTZmutwlxZ/bi1YpKfG/HhPACg6I67UawXPePaQuQO mFEyTcQFGVL9bRdeIsfi1oc2ytTktDdMq3eo2he1uIZPeVMqgCPvaEiUYuCUBM/esiwW I/I5lEUaj4SB2Hqvv6lR2OKS4uelQ/4Lr41lirhTRUu76u0klt0X8NvdtcCObi79kF1Z fLF5rvPD08fxvsfXCXT8HZaZ8HIxVkKyYvTXJ2Sz6beYeHGwdgNZDXqdH9E0MaQ5cl5D 3Js3SGeUxpt1TetYFhBcxYNU3E+5DSCbRqncjxFkoorBCHgWQPASmfvQai2lW0ia1mAq 9v1w== X-Gm-Message-State: APjAAAXcWYfUyS9OlUimLK0dsp96rd1O6rxNWHSEqX50+HodiABD6Oyc YLqZ/RNiUgP6hpQk39Oti/eQUQZe X-Google-Smtp-Source: APXvYqxo77O+B3pS0RhFlM/3/Wis0Dzu5qrqycAR8R2RYVH/Hro+rssIBWvePTI1DTW0T05DX6RCmw== X-Received: by 2002:a0c:8d0a:: with SMTP id r10mr9357347qvb.7.1581342374838; Mon, 10 Feb 2020 05:46:14 -0800 (PST) Received: from mbp.home ([2804:f1c:80b:cc00:ada6:ab81:aa53:c1ec]) by smtp.gmail.com with ESMTPSA id o12sm155474qke.79.2020.02.10.05.46.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Feb 2020 05:46:14 -0800 (PST) Sender: Renato Botelho Subject: Re: svn commit: r357683 - head/lib/libc/string To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002082117.018LHmnh053114@repo.freebsd.org> From: Renato Botelho Message-ID: <4729a710-65a5-0d08-bc1e-2b2d3480f0a9@FreeBSD.org> Date: Mon, 10 Feb 2020 10:46:09 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Thunderbird/73.0 MIME-Version: 1.0 In-Reply-To: <202002082117.018LHmnh053114@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48GRyH633Mz4VwG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=MRhGKokR; dmarc=none; spf=pass (mx1.freebsd.org: domain of gargabsd@gmail.com designates 2607:f8b0:4864:20::f41 as permitted sender) smtp.mailfrom=gargabsd@gmail.com X-Spamd-Result: default: False [-2.85 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_NEQ_ENVFROM(0.00)[garga@FreeBSD.org,gargabsd@gmail.com]; 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]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-0.65)[ip: (0.50), ipnet: 2607:f8b0::/32(-1.96), asn: 15169(-1.73), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FORGED_SENDER(0.30)[garga@FreeBSD.org,gargabsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 13:46:16 -0000 On 08/02/20 18:17, Eitan Adler wrote: > Author: eadler > Date: Sat Feb 8 21:17:48 2020 > New Revision: 357683 > URL: https://svnweb.freebsd.org/changeset/base/357683 > > Log: > memset.3: better fix previous typo > > Upon re-reading the whole sentence this is a better fix. > > MFC with: r357681 > > Modified: > head/lib/libc/string/memset.3 > > Modified: head/lib/libc/string/memset.3 > ============================================================================== > --- head/lib/libc/string/memset.3 Sat Feb 8 21:02:20 2020 (r357682) > +++ head/lib/libc/string/memset.3 Sat Feb 8 21:17:48 2020 (r357683) > @@ -63,8 +63,9 @@ Undefined behaviour from > .Fn memset , > resulting from storage overflow, will occur if > .Fa len > -is greater than the length of buffer > -.Fa dest . > +is greater than the length of the > +.Fa dest > +buffer. > The behaviour is also undefined if > .Fa dest > is an invalid pointer. .Dd should be bumped to current date -- Renato Botelho From owner-svn-src-all@freebsd.org Mon Feb 10 13:50:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1FF923B066 for ; Mon, 10 Feb 2020 13:50:34 +0000 (UTC) (envelope-from paul@businesspromos.site) Received: from vps590855.ovh.net (ip57.ip-188-165-19.eu [188.165.19.57]) (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 48GS3F69gqz4WB1 for ; Mon, 10 Feb 2020 13:50:33 +0000 (UTC) (envelope-from paul@businesspromos.site) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=businesspromos.site; s=mail; h=Message-Id:Date:MIME-Version:Content-Type:To :Subject:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qGFVgLtB4jfK0hOR+jRxbcbwPapMzL5sFhtKZFigj7s=; b=t80OaOrf0kGJetwwBLvVdAOfM/ 9y0dlyrjGeGep6v1nAj13ipoJ7yX71M0n/Jdmu4+CuNz2WX6a36nPnIaWU7oMf8VoKSUQ/wPHyb8p Flvq82RJmhn8JAqK+Of11j4gaF1pbgreL+gyzzZAOpmulTv9EN25KvNZcmMUXfRy79AU=; From: "Paul Joseph" Subject: Creative personalized video ad for your marketing campaigns To: "svn-src-all" MIME-Version: 1.0 Date: Mon, 10 Feb 2020 19:20:15 +0530 Message-Id: X-Rspamd-Queue-Id: 48GS3F69gqz4WB1 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=businesspromos.site header.s=mail header.b=t80OaOrf; dmarc=pass (policy=none) header.from=businesspromos.site; spf=pass (mx1.freebsd.org: domain of paul@businesspromos.site designates 188.165.19.57 as permitted sender) smtp.mailfrom=paul@businesspromos.site X-Spamd-Result: default: False [1.07 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[businesspromos.site:s=mail]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-0.49)[-0.486,0]; NEURAL_SPAM_MEDIUM(0.43)[0.432,0]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[businesspromos.site:+]; DMARC_POLICY_ALLOW(-0.50)[businesspromos.site,none]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(1.13)[ipnet: 188.165.0.0/16(3.57), asn: 16276(2.07), country: FR(0.00)]; ASN(0.00)[asn:16276, ipnet:188.165.0.0/16, country:FR] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 13:50:34 -0000 Hi %F_Name%, I'm reaching out to you today as a cartoon ad producer. My specialty i= s eye-catching videos to connect an audience to a product. I have exte= nsive experience in this field with about 350 commercials to my name. Would you like to see what this looks like? Here's a completed sample = of my work: https://www.youtube.com/watch?v=3DBxsAALpGnu4 There's so much more I can do to promote your product, too. I also cre= ate websites, fun mobile apps, logos and appealing flyers. To find out more about my firm, search for "Social Lobster". Hope to hear from you, Paul Joseph From owner-svn-src-all@freebsd.org Mon Feb 10 13:52:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72B6B23B1FA; Mon, 10 Feb 2020 13:52:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GS5Q2TVsz4WRd; Mon, 10 Feb 2020 13:52:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 505D020169; Mon, 10 Feb 2020 13:52:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ADqQDh039004; Mon, 10 Feb 2020 13:52:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ADqQLh039003; Mon, 10 Feb 2020 13:52:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002101352.01ADqQLh039003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 10 Feb 2020 13:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357728 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 357728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 13:52:26 -0000 Author: mjg Date: Mon Feb 10 13:52:25 2020 New Revision: 357728 URL: https://svnweb.freebsd.org/changeset/base/357728 Log: Tidy up zpcpu_replace* - only compute the target address once - remove spurious type casting, zpcpu_get already return the correct type While here add missing newlines to other routines. Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Mon Feb 10 13:24:14 2020 (r357727) +++ head/sys/sys/pcpu.h Mon Feb 10 13:52:25 2020 (r357728) @@ -245,32 +245,41 @@ extern struct pcpu *cpuid_to_pcpu[]; * If you need atomicity use xchg. * */ #define zpcpu_replace(base, val) ({ \ - __typeof(val) _old = *(__typeof(base))zpcpu_get(base); \ - *(__typeof(val) *)zpcpu_get(base) = val; \ + __typeof(val) *_ptr = zpcpu_get(base); \ + __typeof(val) _old; \ + \ + _old = *_ptr; \ + *_ptr = val; \ _old; \ }) #define zpcpu_replace_cpu(base, val, cpu) ({ \ - __typeof(val) _old = *(__typeof(base))zpcpu_get_cpu(base, cpu); \ - *(__typeof(val) *)zpcpu_get_cpu(base, cpu) = val; \ + __typeof(val) *_ptr = zpcpu_get_cpu(base, cpu); \ + __typeof(val) _old; \ + \ + _old = *_ptr; \ + *_ptr = val; \ _old; \ }) #define zpcpu_set_protected(base, val) ({ \ MPASS(curthread->td_critnest > 0); \ __typeof(val) *_ptr = zpcpu_get(base); \ + \ *_ptr = (val); \ }) #define zpcpu_add_protected(base, val) ({ \ MPASS(curthread->td_critnest > 0); \ __typeof(val) *_ptr = zpcpu_get(base); \ + \ *_ptr += (val); \ }) #define zpcpu_sub_protected(base, val) ({ \ MPASS(curthread->td_critnest > 0); \ __typeof(val) *_ptr = zpcpu_get(base); \ + \ *_ptr -= (val); \ }) From owner-svn-src-all@freebsd.org Mon Feb 10 13:54:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEDF423B29B; Mon, 10 Feb 2020 13:54:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GS7t4Wjwz4WbT; Mon, 10 Feb 2020 13:54:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95CBB20171; Mon, 10 Feb 2020 13:54:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ADsY8L039135; Mon, 10 Feb 2020 13:54:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ADsYuA039134; Mon, 10 Feb 2020 13:54:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002101354.01ADsYuA039134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 10 Feb 2020 13:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357729 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 13:54:34 -0000 Author: mjg Date: Mon Feb 10 13:54:34 2020 New Revision: 357729 URL: https://svnweb.freebsd.org/changeset/base/357729 Log: vfs: fix lock recursion in vrele vrele is supposed to be called with an unlocked vnode, but this was never asserted for if v_usecount was > 0. For such counts the lock is never touched by the routine. As a result the kernel has several consumers which expect vunref semantics and get away with calling vrele since they happen to never do it when this is the last reference (and for some of them this may happen to be a guarantee). Work around the problem by changing vrele semantics to tolerate being called with a lock. This eliminates a possible bug where the lock is already held and vputx takes it anyway. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D23528 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Feb 10 13:52:25 2020 (r357728) +++ head/sys/kern/vfs_subr.c Mon Feb 10 13:54:34 2020 (r357729) @@ -3170,6 +3170,7 @@ static void vputx(struct vnode *vp, enum vputx_op func) { int error; + bool want_unlock; KASSERT(vp != NULL, ("vputx: null vp")); if (func == VPUTX_VUNREF) @@ -3221,13 +3222,31 @@ vputx(struct vnode *vp, enum vputx_op func) * as VI_DOINGINACT to avoid recursion. */ vp->v_iflag |= VI_OWEINACT; + want_unlock = false; + error = 0; switch (func) { case VPUTX_VRELE: - error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); - VI_LOCK(vp); + switch (VOP_ISLOCKED(vp)) { + case LK_EXCLUSIVE: + break; + case LK_EXCLOTHER: + case 0: + want_unlock = true; + error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); + VI_LOCK(vp); + break; + default: + /* + * The lock has at least one sharer, but we have no way + * to conclude whether this is us. Play it safe and + * defer processing. + */ + error = EAGAIN; + break; + } break; case VPUTX_VPUT: - error = 0; + want_unlock = true; if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { error = VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | LK_NOWAIT); @@ -3235,7 +3254,6 @@ vputx(struct vnode *vp, enum vputx_op func) } break; case VPUTX_VUNREF: - error = 0; if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { error = VOP_LOCK(vp, LK_TRYUPGRADE | LK_INTERLOCK); VI_LOCK(vp); @@ -3244,7 +3262,7 @@ vputx(struct vnode *vp, enum vputx_op func) } if (error == 0) { vinactive(vp); - if (func != VPUTX_VUNREF) + if (want_unlock) VOP_UNLOCK(vp); vdropl(vp); } else { From owner-svn-src-all@freebsd.org Mon Feb 10 14:27:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDBE023BB77; Mon, 10 Feb 2020 14:27:30 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GSst3sqWz4Y9S; Mon, 10 Feb 2020 14:27:30 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 801C7206E8; Mon, 10 Feb 2020 14:27:30 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01AERUgK057588; Mon, 10 Feb 2020 14:27:30 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AERTo0057581; Mon, 10 Feb 2020 14:27:29 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202002101427.01AERTo0057581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 10 Feb 2020 14:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357730 - in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys: cam/ata cam/nvme cam/scsi ufs/ffs ufs/ufs X-SVN-Commit-Revision: 357730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 14:27:30 -0000 Author: scottl Date: Mon Feb 10 14:27:28 2020 New Revision: 357730 URL: https://svnweb.freebsd.org/changeset/base/357730 Log: Revert r357710 and 357711 until they can be debugged Modified: head/sys/cam/ata/ata_da.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_da.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/cam/ata/ata_da.c Mon Feb 10 14:27:28 2020 (r357730) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* _KERNEL */ @@ -1566,10 +1565,6 @@ adagetattr(struct bio *bp) { int ret; struct cam_periph *periph; - - /* TODO: tunable knob */ - if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) - return (0); periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/cam/nvme/nvme_da.c Mon Feb 10 14:27:28 2020 (r357730) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* _KERNEL */ @@ -700,10 +699,6 @@ ndagetattr(struct bio *bp) { int ret; struct cam_periph *periph; - - /* TODO: tunable knob */ - if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) - return (0); periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/cam/scsi/scsi_da.c Mon Feb 10 14:27:28 2020 (r357730) @@ -1942,10 +1942,6 @@ dagetattr(struct bio *bp) int ret; struct cam_periph *periph; - /* TODO: tunable knob for this */ - if (g_handleattr_int(bp, "GEOM::canspeedup", 1)) - return (0); - periph = (struct cam_periph *)bp->bio_disk->d_drv1; cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Feb 10 14:27:28 2020 (r357730) @@ -1464,9 +1464,6 @@ softdep_send_speedup(struct ufsmount *ump, size_t shor { struct buf *bp; - if ((ump->um_flags & UM_CANSPEEDUP) == 0) - return; - bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); bp->b_iocmd = BIO_SPEEDUP; bp->b_ioflags = flags; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Feb 10 14:27:28 2020 (r357730) @@ -794,7 +794,7 @@ ffs_mountfs(devvp, mp, td) struct ucred *cred; struct g_consumer *cp; struct mount *nmp; - int candelete, canspeedup; + int candelete; off_t loc; fs = NULL; @@ -1009,13 +1009,6 @@ ffs_mountfs(devvp, mp, td) ump->um_trimhash = hashinit(MAXTRIMIO, M_TRIM, &ump->um_trimlisthashsize); } - } - - /* TODO: sysctl tunables, runtime modification */ - len = sizeof(int); - if (g_io_getattr("GEOM::canspeedup", cp, &len, &canspeedup) == 0) { - if (canspeedup) - ump->um_flags |= UM_CANSPEEDUP; } ump->um_mountp = mp; Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Mon Feb 10 13:54:34 2020 (r357729) +++ head/sys/ufs/ufs/ufsmount.h Mon Feb 10 14:27:28 2020 (r357730) @@ -131,7 +131,6 @@ struct ufsmount { */ #define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ #define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ -#define UM_CANSPEEDUP 0x00000004 /* devvp supports SPEEDUP */ /* * function prototypes From owner-svn-src-all@freebsd.org Mon Feb 10 16:32:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F5BC23DF65; Mon, 10 Feb 2020 16:32:10 +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) server-signature RSA-PSS (4096 bits) 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 48GWdj6hYQz3Bnd; Mon, 10 Feb 2020 16:32:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.2] (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 6A9A129C8; Mon, 10 Feb 2020 16:32:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r357728 - head/sys/sys To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002101352.01ADqQLh039003@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <2e247a51-8c57-5259-ad66-50f4db4e5286@FreeBSD.org> Date: Mon, 10 Feb 2020 11:32:11 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202002101352.01ADqQLh039003@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 16:32:10 -0000 Hi; On 10/02/2020 08:52, Mateusz Guzik wrote: > Author: mjg > Date: Mon Feb 10 13:52:25 2020 > New Revision: 357728 > URL: https://svnweb.freebsd.org/changeset/base/357728 > > Log: > Tidy up zpcpu_replace* > > - only compute the target address once > - remove spurious type casting, zpcpu_get already return the correct type > > While here add missing newlines to other routines. > > Modified: > head/sys/sys/pcpu.h For the record, this file (and many others), uses a space after #define, when we should be using a tab to conform with style(9). One of the many lessons from bde. I have a huge patch to fix those, which I won't commit because it wouldl obliterate all VCS annotations. Pedro. > Modified: head/sys/sys/pcpu.h > ============================================================================== > --- head/sys/sys/pcpu.h Mon Feb 10 13:24:14 2020 (r357727) > +++ head/sys/sys/pcpu.h Mon Feb 10 13:52:25 2020 (r357728) > @@ -245,32 +245,41 @@ extern struct pcpu *cpuid_to_pcpu[]; > * If you need atomicity use xchg. > * */ > #define zpcpu_replace(base, val) ({ \ > - __typeof(val) _old = *(__typeof(base))zpcpu_get(base); \ > - *(__typeof(val) *)zpcpu_get(base) = val; \ > + __typeof(val) *_ptr = zpcpu_get(base); \ > + __typeof(val) _old; \ > + \ > + _old = *_ptr; \ > + *_ptr = val; \ > _old; \ > }) > > #define zpcpu_replace_cpu(base, val, cpu) ({ \ > - __typeof(val) _old = *(__typeof(base))zpcpu_get_cpu(base, cpu); \ > - *(__typeof(val) *)zpcpu_get_cpu(base, cpu) = val; \ > + __typeof(val) *_ptr = zpcpu_get_cpu(base, cpu); \ > + __typeof(val) _old; \ > + \ > + _old = *_ptr; \ > + *_ptr = val; \ > _old; \ > }) > > #define zpcpu_set_protected(base, val) ({ \ > MPASS(curthread->td_critnest > 0); \ > __typeof(val) *_ptr = zpcpu_get(base); \ > + \ > *_ptr = (val); \ > }) > > #define zpcpu_add_protected(base, val) ({ \ > MPASS(curthread->td_critnest > 0); \ > __typeof(val) *_ptr = zpcpu_get(base); \ > + \ > *_ptr += (val); \ > }) > > #define zpcpu_sub_protected(base, val) ({ \ > MPASS(curthread->td_critnest > 0); \ > __typeof(val) *_ptr = zpcpu_get(base); \ > + \ > *_ptr -= (val); \ > }) > From owner-svn-src-all@freebsd.org Mon Feb 10 17:02:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 456B623EA73; Mon, 10 Feb 2020 17:02:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GXJt1Brrz3DlR; Mon, 10 Feb 2020 17:02:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C048224BB; Mon, 10 Feb 2020 17:02:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01AH2bI9053781; Mon, 10 Feb 2020 17:02:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AH2bxM053780; Mon, 10 Feb 2020 17:02:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202002101702.01AH2bxM053780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 10 Feb 2020 17:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357733 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 357733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:02:38 -0000 Author: gjb Date: Mon Feb 10 17:02:37 2020 New Revision: 357733 URL: https://svnweb.freebsd.org/changeset/base/357733 Log: Fix a typo. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Mon Feb 10 16:15:34 2020 (r357732) +++ stable/11/release/doc/share/xml/security.xml Mon Feb 10 17:02:37 2020 (r357733) @@ -137,7 +137,7 @@ FreeBSD-SA-20:03.thrmisc 28 January 2020 - Kennel stack data disclosure + Kernel stack data disclosure From owner-svn-src-all@freebsd.org Mon Feb 10 17:16:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF14A23EE63; Mon, 10 Feb 2020 17:16:26 +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) server-signature RSA-PSS (4096 bits) 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 48GXcp44Kbz3Fc0; Mon, 10 Feb 2020 17:16:26 +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 82BE222686; Mon, 10 Feb 2020 17:16:26 +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 01AHGQbc060323; Mon, 10 Feb 2020 17:16:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGQ6B060322; Mon, 10 Feb 2020 17:16:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGQ6B060322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357734 - head/usr.sbin/binmiscctl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/binmiscctl X-SVN-Commit-Revision: 357734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:16:26 -0000 Author: imp Date: Mon Feb 10 17:16:26 2020 New Revision: 357734 URL: https://svnweb.freebsd.org/changeset/base/357734 Log: Remove sparc64 example. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/binmiscctl/binmiscctl.8 Modified: head/usr.sbin/binmiscctl/binmiscctl.8 ============================================================================== --- head/usr.sbin/binmiscctl/binmiscctl.8 Mon Feb 10 17:02:37 2020 (r357733) +++ head/usr.sbin/binmiscctl/binmiscctl.8 Mon Feb 10 17:16:26 2020 (r357734) @@ -27,7 +27,7 @@ .\" .\" Support for miscellaneous binary image activators .\" -.Dd July 21, 2018 +.Dd February 10, 2020 .Dt BINMISCCTL 8 .Os .Sh NAME @@ -267,17 +267,6 @@ Add QEMU bsd-user program as an image activator for Po --interpreter "/usr/local/bin/qemu-ppc64-static" \e --magic "\ex7f\ex45\ex4c\ex46\ex02\ex02\ex01\ex00\ex00\ex00\e \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex15" \e - --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e - \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e - --size 20 --set-enabled -.Ed -.Pp -Add QEMU bsd-user program as an image activator for SPARC64 binaries: -.Bd -literal -offset indent -# binmiscctl add sparc64 \e - --interpreter "/usr/local/bin/qemu-sparc64-static" \e - --magic "\ex7f\ex45\ex4c\ex46\ex02\ex02\ex01\ex00\ex00\ex00\e - \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex2b" \e --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e --size 20 --set-enabled From owner-svn-src-all@freebsd.org Mon Feb 10 17:16:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A558223EEBA; Mon, 10 Feb 2020 17:16:41 +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) server-signature RSA-PSS (4096 bits) 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 48GXd53kzLz3Fl1; Mon, 10 Feb 2020 17:16:41 +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 7A8BF22687; Mon, 10 Feb 2020 17:16:41 +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 01AHGf2u060383; Mon, 10 Feb 2020 17:16:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGf5Y060382; Mon, 10 Feb 2020 17:16:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGf5Y060382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357735 - head/usr.sbin/tzsetup X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/tzsetup X-SVN-Commit-Revision: 357735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:16:41 -0000 Author: imp Date: Mon Feb 10 17:16:41 2020 New Revision: 357735 URL: https://svnweb.freebsd.org/changeset/base/357735 Log: Remove sparc64 ifdef Now we default to setting the hardware clock to UTC everywhere. sparc64 was the old odd-man out before. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Mon Feb 10 17:16:26 2020 (r357734) +++ head/usr.sbin/tzsetup/tzsetup.c Mon Feb 10 17:16:41 2020 (r357735) @@ -1020,9 +1020,7 @@ main(int argc, char **argv) "If it is set to local time,\n" "or you don't know, please choose NO here!"); dlg_save_vars(&save_vars); -#if !defined(__sparc64__) dialog_vars.defaultno = TRUE; -#endif yesno = dialog_yesno(title, prompt, 7, 73); dlg_restore_vars(&save_vars); if (!yesno) { From owner-svn-src-all@freebsd.org Mon Feb 10 17:16:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62AA123EEF1; Mon, 10 Feb 2020 17:16:46 +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) server-signature RSA-PSS (4096 bits) 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 48GXdB1SKLz3FpQ; Mon, 10 Feb 2020 17:16:46 +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 23E2722688; Mon, 10 Feb 2020 17:16:46 +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 01AHGjkQ060438; Mon, 10 Feb 2020 17:16:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGjeN060437; Mon, 10 Feb 2020 17:16:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGjeN060437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357736 - head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/bsnmpd/modules/snmp_bridge X-SVN-Commit-Revision: 357736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:16:46 -0000 Author: imp Date: Mon Feb 10 17:16:45 2020 New Revision: 357736 URL: https://svnweb.freebsd.org/changeset/base/357736 Log: Fix comment. It mentioned sparc64 specifically, but alignment issues are present elsewhere. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Mon Feb 10 17:16:41 2020 (r357735) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Mon Feb 10 17:16:45 2020 (r357736) @@ -586,8 +586,7 @@ bridge_get_basemac(const char *bif_name, u_char *mac, continue; /* - * Not just casting because of alignment constraints - * on sparc64. + * Not just casting because of alignment constraints. */ bcopy(ifa->ifa_addr, &sdl, sizeof(struct sockaddr_dl)); From owner-svn-src-all@freebsd.org Mon Feb 10 17:16:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D382923EF32; Mon, 10 Feb 2020 17:16:50 +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) server-signature RSA-PSS (4096 bits) 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 48GXdG5GC8z3Fvv; Mon, 10 Feb 2020 17:16:50 +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 AEA1522697; Mon, 10 Feb 2020 17:16:50 +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 01AHGoul060493; Mon, 10 Feb 2020 17:16:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGomA060492; Mon, 10 Feb 2020 17:16:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGomA060492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357737 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Commit-Revision: 357737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:16:50 -0000 Author: imp Date: Mon Feb 10 17:16:50 2020 New Revision: 357737 URL: https://svnweb.freebsd.org/changeset/base/357737 Log: Fix a comment for the SUN geom class. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Mon Feb 10 17:16:45 2020 (r357736) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Mon Feb 10 17:16:50 2020 (r357737) @@ -484,7 +484,7 @@ partition_tbl_handle_disk(int32_t ds_index, const char /* * Get the "SUN" GEOM class. - * Here we'll find all the info needed about the BSD slices. + * Here we'll find all the info needed about the SUN slices. */ if ((classp = find_class(&mesh, "SUN")) != NULL) { get_bsd_sun(classp, ds_index, disk_dev_name); From owner-svn-src-all@freebsd.org Mon Feb 10 17:16:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27F5723EF7B; Mon, 10 Feb 2020 17:16:55 +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) server-signature RSA-PSS (4096 bits) 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 48GXdM0Lxwz3G3C; Mon, 10 Feb 2020 17:16:55 +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 04BDD22698; Mon, 10 Feb 2020 17:16:55 +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 01AHGsCq060547; Mon, 10 Feb 2020 17:16:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGsiw060546; Mon, 10 Feb 2020 17:16:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGsiw060546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357738 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 357738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:16:55 -0000 Author: imp Date: Mon Feb 10 17:16:54 2020 New Revision: 357738 URL: https://svnweb.freebsd.org/changeset/base/357738 Log: For valid arch values (really $MACHINE), remove references to alpha and sparc64. Add references to arm64 and riscv Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/config/config.5 Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Mon Feb 10 17:16:50 2020 (r357737) +++ head/usr.sbin/config/config.5 Mon Feb 10 17:16:54 2020 (r357738) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2018 +.Dd February 9, 2020 .Dt CONFIG 5 .Os .Sh NAME @@ -251,10 +251,10 @@ Legal values for include: .Pp .Bl -tag -width ".Cm powerpc" -compact -.It Cm alpha -The DEC Alpha architecture. +.It Cm arm64 +The 64-bit ARM application architecture. .It Cm arm -The ARM architecture. +The ARM architecture .It Cm amd64 The AMD x86-64 architecture. .It Cm i386 @@ -263,8 +263,8 @@ The Intel x86 based PC architecture. The MIPS architecture. .It Cm powerpc The IBM PowerPC architecture. -.It Cm sparc64 -The Sun Sparc64 architecture. +.It Cm riscv +The RISC-V architecture. .El .Pp If argument From owner-svn-src-all@freebsd.org Mon Feb 10 17:17:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3CA423EFD2; Mon, 10 Feb 2020 17:16:59 +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) server-signature RSA-PSS (4096 bits) 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 48GXdR4v71z3GBS; Mon, 10 Feb 2020 17:16:59 +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 7B16C22699; Mon, 10 Feb 2020 17:16:59 +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 01AHGx1G060600; Mon, 10 Feb 2020 17:16:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHGxun060599; Mon, 10 Feb 2020 17:16:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101716.01AHGxun060599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357739 - in head/usr.sbin: . eeprom X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/usr.sbin: . eeprom X-SVN-Commit-Revision: 357739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:17:00 -0000 Author: imp Date: Mon Feb 10 17:16:59 2020 New Revision: 357739 URL: https://svnweb.freebsd.org/changeset/base/357739 Log: Remove sparc64 specific eeprom command This command was only ever for sparc64, so remove it. Remove usr.sbin/Makeiile.sparc64 as well since it only references ofwdump (cross platform) and eeprom. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Deleted: head/usr.sbin/Makefile.sparc64 head/usr.sbin/eeprom/Makefile head/usr.sbin/eeprom/Makefile.depend head/usr.sbin/eeprom/eeprom.8 head/usr.sbin/eeprom/eeprom.c head/usr.sbin/eeprom/ofw_options.c head/usr.sbin/eeprom/ofw_options.h From owner-svn-src-all@freebsd.org Mon Feb 10 17:17:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E42DE23F027; Mon, 10 Feb 2020 17:17:04 +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) server-signature RSA-PSS (4096 bits) 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 48GXdX17Jhz3GMF; Mon, 10 Feb 2020 17:17:04 +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 1356B2269A; Mon, 10 Feb 2020 17:17:04 +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 01AHH3VT060658; Mon, 10 Feb 2020 17:17:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHH33d060657; Mon, 10 Feb 2020 17:17:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101717.01AHH33d060657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357740 - head/usr.sbin/ntp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/ntp X-SVN-Commit-Revision: 357740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:17:05 -0000 Author: imp Date: Mon Feb 10 17:17:03 2020 New Revision: 357740 URL: https://svnweb.freebsd.org/changeset/base/357740 Log: Refresh architecture list with latest: Remove: sparc, sparc64 (twice), ia64, alpha Add: riscv64 Remove now-useless sparc64 ifdef Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Mon Feb 10 17:16:59 2020 (r357739) +++ head/usr.sbin/ntp/config.h Mon Feb 10 17:17:03 2020 (r357740) @@ -1578,11 +1578,7 @@ /* #undef STRERROR_R_CHAR_P */ /* canonical system (cpu-vendor-os) of where we should run */ -#if defined(__alpha__) -#define STR_SYSTEM "alpha-undermydesk-freebsd" -#elif defined(__sparc64__) -#define STR_SYSTEM "sparc64-undermydesk-freebsd" -#elif defined(__amd64__) +#if defined(__amd64__) #define STR_SYSTEM "amd64-undermydesk-freebsd" #elif defined(__powerpc64__) #define STR_SYSTEM "powerpc64-undermydesk-freebsd" @@ -1596,12 +1592,8 @@ #define STR_SYSTEM "arm64-undermydesk-freebsd" #elif defined(__arm__) #define STR_SYSTEM "arm-undermydesk-freebsd" -#elif defined(__sparc64__) -#define STR_SYSTEM "sparc64-undermydesk-freebsd" -#elif defined(__sparc__) -#define STR_SYSTEM "sparc-undermydesk-freebsd" -#elif defined(__ia64__) -#define STR_SYSTEM "ia64-undermydesk-freebsd" +#elif defined(__riscv__) +#define STR_SYSTEM "riscv64-undermydesk-freebsd" #else #define STR_SYSTEM "i386-undermydesk-freebsd" #endif @@ -1669,7 +1661,7 @@ typedef unsigned int uintptr_t; /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined(__ARMEB__) || defined(__MIPSEB__) || defined(__powerpc__) || \ - defined(__powerpc64__) || defined(__sparc64__) + defined(__powerpc64__) #define WORDS_BIGENDIAN 1 #endif From owner-svn-src-all@freebsd.org Mon Feb 10 17:17:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3564B23F084; Mon, 10 Feb 2020 17:17:09 +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) server-signature RSA-PSS (4096 bits) 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 48GXdc3dG6z3GTM; Mon, 10 Feb 2020 17:17:08 +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 77EB72269C; Mon, 10 Feb 2020 17:17:08 +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 01AHH87N060712; Mon, 10 Feb 2020 17:17:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AHH8IR060711; Mon, 10 Feb 2020 17:17:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101717.01AHH8IR060711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 17:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357741 - head/usr.sbin/ntp/libntpevent X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/ntp/libntpevent X-SVN-Commit-Revision: 357741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:17:09 -0000 Author: imp Date: Mon Feb 10 17:17:08 2020 New Revision: 357741 URL: https://svnweb.freebsd.org/changeset/base/357741 Log: Remove ifdefs for ia64 and sparc64. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Modified: head/usr.sbin/ntp/libntpevent/Makefile Modified: head/usr.sbin/ntp/libntpevent/Makefile ============================================================================== --- head/usr.sbin/ntp/libntpevent/Makefile Mon Feb 10 17:17:03 2020 (r357740) +++ head/usr.sbin/ntp/libntpevent/Makefile Mon Feb 10 17:17:08 2020 (r357741) @@ -21,12 +21,8 @@ SRCS+= bufferevent_openssl.c NTP_ATOMIC=x86_32 .elif ${MACHINE_ARCH} == "amd64" NTP_ATOMIC=x86_64 -.elif ${MACHINE_ARCH} == "ia64" -NTP_ATOMIC=ia64 .elif ${MACHINE_ARCH} == "powerpc64" NTP_ATOMIC=powerpc -.elif ${MACHINE_ARCH} == "sparc64" -NTP_ATOMIC=sparc64 .else NTP_ATOMIC=noatomic .endif From owner-svn-src-all@freebsd.org Mon Feb 10 17:26:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9A3D23F4A0; Mon, 10 Feb 2020 17:26:54 +0000 (UTC) (envelope-from mhorne@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) server-signature RSA-PSS (4096 bits) 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 48GXrt4S0lz3HCc; Mon, 10 Feb 2020 17:26:54 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 7E3162FC8; Mon, 10 Feb 2020 17:26:54 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-ot1-f53.google.com with SMTP id 59so7107409otp.12; Mon, 10 Feb 2020 09:26:54 -0800 (PST) X-Gm-Message-State: APjAAAXSU7jBXVGZFYCX7cjwXSdMd1v/0hi2feEH1L/ReC0Y1n4PPFSR rGkmTF9kAVIrV3EUg4JaMDX8pZuoDN1rN+xcbpc= X-Google-Smtp-Source: APXvYqx5JX0xHHKaksOKWKOy9X4ht9f/xGciB790EYmpgdtbby6B1UE85LS+DSB7Q3aZlY/wzRGB1i3Xshht9a953yA= X-Received: by 2002:a05:6830:1305:: with SMTP id p5mr1751942otq.124.1581355613683; Mon, 10 Feb 2020 09:26:53 -0800 (PST) MIME-Version: 1.0 References: <202002101717.01AHH33d060657@repo.freebsd.org> In-Reply-To: <202002101717.01AHH33d060657@repo.freebsd.org> From: Mitchell Horne Date: Mon, 10 Feb 2020 12:26:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r357740 - head/usr.sbin/ntp To: Warner Losh 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-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:26:54 -0000 On Mon, Feb 10, 2020 at 12:17 PM Warner Losh wrote: > > Author: imp > Date: Mon Feb 10 17:17:03 2020 > New Revision: 357740 > URL: https://svnweb.freebsd.org/changeset/base/357740 > > Log: > Refresh architecture list with latest: > > Remove: sparc, sparc64 (twice), ia64, alpha > Add: riscv64 > > Remove now-useless sparc64 ifdef > > Reivewed by: cy@, bcr@ > Differential Revision: https://reviews.freebsd.org/D23593 > > Modified: > head/usr.sbin/ntp/config.h > > Modified: head/usr.sbin/ntp/config.h > ============================================================================== > --- head/usr.sbin/ntp/config.h Mon Feb 10 17:16:59 2020 (r357739) > +++ head/usr.sbin/ntp/config.h Mon Feb 10 17:17:03 2020 (r357740) > @@ -1578,11 +1578,7 @@ > /* #undef STRERROR_R_CHAR_P */ > > /* canonical system (cpu-vendor-os) of where we should run */ > -#if defined(__alpha__) > -#define STR_SYSTEM "alpha-undermydesk-freebsd" > -#elif defined(__sparc64__) > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > -#elif defined(__amd64__) > +#if defined(__amd64__) > #define STR_SYSTEM "amd64-undermydesk-freebsd" > #elif defined(__powerpc64__) > #define STR_SYSTEM "powerpc64-undermydesk-freebsd" > @@ -1596,12 +1592,8 @@ > #define STR_SYSTEM "arm64-undermydesk-freebsd" > #elif defined(__arm__) > #define STR_SYSTEM "arm-undermydesk-freebsd" > -#elif defined(__sparc64__) > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > -#elif defined(__sparc__) > -#define STR_SYSTEM "sparc-undermydesk-freebsd" > -#elif defined(__ia64__) > -#define STR_SYSTEM "ia64-undermydesk-freebsd" > +#elif defined(__riscv__) Hi Warner, Surprisingly, the canonical define for RISC-V is __riscv, not __riscv__. Mitchell > +#define STR_SYSTEM "riscv64-undermydesk-freebsd" > #else > #define STR_SYSTEM "i386-undermydesk-freebsd" > #endif > @@ -1669,7 +1661,7 @@ typedef unsigned int uintptr_t; > /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most > significant byte first (like Motorola and SPARC, unlike Intel). */ > #if defined(__ARMEB__) || defined(__MIPSEB__) || defined(__powerpc__) || \ > - defined(__powerpc64__) || defined(__sparc64__) > + defined(__powerpc64__) > #define WORDS_BIGENDIAN 1 > #endif > From owner-svn-src-all@freebsd.org Mon Feb 10 17:59:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17C0023FD16 for ; Mon, 10 Feb 2020 17:59:18 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48GYZF4dHWz3Jmv for ; Mon, 10 Feb 2020 17:59:17 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1581357556; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=XpdgygzP240QkPLKV97FHD9T6c9lqE0D2K7Kujx+h9bZXjSbu+TqGrngHC0O2tklQsmqTf2zswVU0 gXdBhGT7ocnOEkF8ezmLGo1SHgIifkZJ3pUp/D3pXUfZklC3glHDO/yCY63xximborwNrreISOLfZA o8d4V/KnfZE0Z6ShPnIRmb6SC/f2svX3loUawVuz1tjbK4hWrVApxhOHYXkEQWW+s3iVkYunpUej7J +byaEVcR3g/EevO2UQsHY1JirWQ+U4Xc4DIlzo/eAiAERzLxcctE9b5xPNyZ0iYvvdQziL1zLFpVhw vsskz57pQVh+Z5CbNHywAUvWcbkJShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=wkcWr3WMXAVh2NFCswozeIQIJQOd29aRJJaTe2YvGhA=; b=T396tmptp/0ePJ/umEnfiXy3CLZVO5cXH8IxFF7owH2EPaO02hWeUFeK8vrOMjDtBMnqQ83K0Nhzn Gal6QMXEKaM8uhuM8V2X/sHC4o0cNc/aenCb+Zpe5OkVBK6QIl3XC/mRyU7YYnTO6QoRD6sDT7EFJf T6elBaOeT82lpYR4A9JWJ97SNoxds20TyqDrXRAYmU3EsXQrGXG9fz7r6JJENyYc8NBGXL6zr0TDGu 93FhWCa4KtMxLdrnTLVDhRq70N1Xvh2VNkvM9ekd2WshxqWMKUyR5v14K7uhuxkNQbnaN4Nh05MQuk GrrBDXj3qVqi2qvF/RV3rKZ6xFzYmKQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=wkcWr3WMXAVh2NFCswozeIQIJQOd29aRJJaTe2YvGhA=; b=oqowrXn9EhxTzjnGxmvaTovznTlZErjx7ZQaK84y4m//M53qldWELDlq//SzQWOWKEsoPss5mvDJy gF92yk0FhAl04ezepgZUzpkdm9LMGbozhoAMmjP7qwi9Xq9OiShO/k/+Ch/SPLFZtYXa9iLAfTCz5B BC1rpWsWPx2COBu5EDhUMjMD7lLvRYIUFLLfolLv7jfSFGvwhUYpb4RUNRWLEkSqvqjPSIc+7Xgq77 4v9NWSeCxgUdxs1evXKGLDxpMiQDYLjuIPoN2qXaoKNhGpbNEkbLQGQq+tkfSCGqVC4EnEN8Bs5PwS tsc5a1BTDPmFWgcxDGrHi9eVbtpkBYw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 0c709a4f-4c2f-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 0c709a4f-4c2f-11ea-9eb3-25e2dfa9fa8d; Mon, 10 Feb 2020 17:59:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 01AHxEjF066793; Mon, 10 Feb 2020 10:59:14 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r357683 - head/lib/libc/string From: Ian Lepore To: Renato Botelho , Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 10 Feb 2020 10:59:14 -0700 In-Reply-To: <4729a710-65a5-0d08-bc1e-2b2d3480f0a9@FreeBSD.org> References: <202002082117.018LHmnh053114@repo.freebsd.org> <4729a710-65a5-0d08-bc1e-2b2d3480f0a9@FreeBSD.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48GYZF4dHWz3Jmv X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-0.98)[-0.979,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 17:59:18 -0000 On Mon, 2020-02-10 at 10:46 -0300, Renato Botelho wrote: > On 08/02/20 18:17, Eitan Adler wrote: > > Author: eadler > > Date: Sat Feb 8 21:17:48 2020 > > New Revision: 357683 > > URL: https://svnweb.freebsd.org/changeset/base/357683 > > > > Log: > > memset.3: better fix previous typo > > > > Upon re-reading the whole sentence this is a better fix. > > > > MFC with: r357681 > > > > Modified: > > head/lib/libc/string/memset.3 > > > > Modified: head/lib/libc/string/memset.3 > > ============================================================================== > > --- head/lib/libc/string/memset.3 Sat Feb 8 21:02:20 2020 (r357682) > > +++ head/lib/libc/string/memset.3 Sat Feb 8 21:17:48 2020 (r357683) > > @@ -63,8 +63,9 @@ Undefined behaviour from > > .Fn memset , > > resulting from storage overflow, will occur if > > .Fa len > > -is greater than the length of buffer > > -.Fa dest . > > +is greater than the length of the > > +.Fa dest > > +buffer. > > The behaviour is also undefined if > > .Fa dest > > is an invalid pointer. > > .Dd should be bumped to current date > It has always been my understanding for that we don't bump .Dd for things like minor grammar and spelling fixes, only for actual content changes. A few seconds of quick googling finds mailing list messages to that effect going back many many years. -- Ian From owner-svn-src-all@freebsd.org Mon Feb 10 18:06:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7663B23FF50; Mon, 10 Feb 2020 18:06:39 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GYkl2bzLz3KDY; Mon, 10 Feb 2020 18:06:39 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54A8822FCB; Mon, 10 Feb 2020 18:06:39 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01AI6dw3090912; Mon, 10 Feb 2020 18:06:39 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AI6dru090911; Mon, 10 Feb 2020 18:06:39 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <202002101806.01AI6dru090911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Mon, 10 Feb 2020 18:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357742 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:06:39 -0000 Author: jtl Date: Mon Feb 10 18:06:38 2020 New Revision: 357742 URL: https://svnweb.freebsd.org/changeset/base/357742 Log: Modify the vm.panic_on_oom sysctl to take a count of events. Currently, the vm.panic_on_oom sysctl is a boolean which controls the behavior of the VM system when it encounters an out-of-memory situation. If set to 0, the VM system kills the largest process. If set to any other value, the VM system will initiate a panic. This change makes the sysctl a count of events. If set to 0, the VM system kills the largest process. If set to any other value, the VM system will kill the largest process until it has seen the specified number of out-of-memory events. Once it reaches the specified number of events, it will initiate a panic. This change is helpful in capturing cores when the system is in a perpetual cycle of out-of-memory events (as opposed to just hitting one or two sporadic out-of-memory events). Reviewed by: kib MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23601 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Mon Feb 10 17:17:08 2020 (r357741) +++ head/sys/vm/vm_pageout.c Mon Feb 10 18:06:38 2020 (r357742) @@ -158,7 +158,7 @@ static int vm_panic_on_oom = 0; SYSCTL_INT(_vm, OID_AUTO, panic_on_oom, CTLFLAG_RWTUN, &vm_panic_on_oom, 0, - "panic on out of memory instead of killing the largest process"); + "Panic on the given number of out-of-memory errors instead of killing the largest process"); SYSCTL_INT(_vm, OID_AUTO, pageout_update_period, CTLFLAG_RWTUN, &vm_pageout_update_period, 0, @@ -1933,7 +1933,7 @@ vm_pageout_oom(int shortage) } sx_sunlock(&allproc_lock); if (bigproc != NULL) { - if (vm_panic_on_oom != 0) + if (vm_panic_on_oom != 0 && --vm_panic_on_oom == 0) panic("out of swap space"); PROC_LOCK(bigproc); killproc(bigproc, "out of swap space"); From owner-svn-src-all@freebsd.org Mon Feb 10 18:11:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE6282400E8; Mon, 10 Feb 2020 18:11:46 +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) server-signature RSA-PSS (4096 bits) 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 48GYrf3SBqz3Kd7; Mon, 10 Feb 2020 18:11:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (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 CC6B835A6; Mon, 10 Feb 2020 18:11:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r357695 - in head: sys/kern sys/sys usr.bin/procstat To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002091210.019CAciS006085@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: Date: Mon, 10 Feb 2020 10:11:43 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002091210.019CAciS006085@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:11:46 -0000 On 2/9/20 4:10 AM, Konstantin Belousov wrote: > Author: kib > Date: Sun Feb 9 12:10:37 2020 > New Revision: 357695 > URL: https://svnweb.freebsd.org/changeset/base/357695 > > Log: > Add AT_BSDFLAGS auxv entry. > > The intent is to provide bsd-specific flags relevant to interpreter > and C runtime. I did not want to reuse AT_FLAGS which is common ELF > auxv entry. > > Use bsdflags to report kernel support for sigfastblock(2). This > allows rtld and libthr to safely infer the syscall presence without > SIGSYS. The tunable kern.elf{32,64}.sigfastblock blocks reporting. > > Tested by: pho > Disscussed with: cem, emaste, jilles > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D12773 I find adding a new auxv type curious. The MIPS ABI doc says that "bits under the 0xff000000 mask are reserved for system semantics". The powerpc and x86-64 docs don't define any bits at all. In practice I think we are free to use AT_FLAGS however we wish as no use cases of "standard" bits have arisen since AT_FLAGS was first defined. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 10 18:13:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 378A92402EF; Mon, 10 Feb 2020 18:13:16 +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) server-signature RSA-PSS (4096 bits) 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 48GYtN0fZYz3Kpn; Mon, 10 Feb 2020 18:13:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (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 97D0135A7; Mon, 10 Feb 2020 18:13:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r357703 - head/share/mk To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002091853.019IrsaI054316@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: <068de386-53b4-0fe6-cdff-22b4d940fc44@FreeBSD.org> Date: Mon, 10 Feb 2020 10:13:13 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002091853.019IrsaI054316@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:13:16 -0000 On 2/9/20 10:53 AM, Kyle Evans wrote: > Author: kevans > Date: Sun Feb 9 18:53:53 2020 > New Revision: 357703 > URL: https://svnweb.freebsd.org/changeset/base/357703 > > Log: > mips: mark GOOGLETEST broken, due to no fault of its own > > As explained in the comment; GOOGLETEST cannot currently be compiled on any > mips variant at the moment due to the cross toolchain seemingly using the > wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at > which point this should be reverted most expeditiously. Hmm, I thought you were going to do this for any external GCC? It's also broken on amd64, etc. as well when using external GCC. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 10 18:15:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9593824036C; Mon, 10 Feb 2020 18:15:23 +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) server-signature RSA-PSS (4096 bits) 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 48GYwq3QjMz3Kyp; Mon, 10 Feb 2020 18:15:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (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 EEA5535A8; Mon, 10 Feb 2020 18:15:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r357740 - head/usr.sbin/ntp To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002101717.01AHH33d060657@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: <01d912b4-daef-01f3-d4f9-9512a040ab00@FreeBSD.org> Date: Mon, 10 Feb 2020 10:15:20 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <202002101717.01AHH33d060657@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:15:23 -0000 On 2/10/20 9:17 AM, Warner Losh wrote: > Author: imp > Date: Mon Feb 10 17:17:03 2020 > New Revision: 357740 > URL: https://svnweb.freebsd.org/changeset/base/357740 > > Log: > Refresh architecture list with latest: > > Remove: sparc, sparc64 (twice), ia64, alpha > Add: riscv64 > > Remove now-useless sparc64 ifdef > > Reivewed by: cy@, bcr@ > Differential Revision: https://reviews.freebsd.org/D23593 > > Modified: > head/usr.sbin/ntp/config.h > > Modified: head/usr.sbin/ntp/config.h > ============================================================================== > --- head/usr.sbin/ntp/config.h Mon Feb 10 17:16:59 2020 (r357739) > +++ head/usr.sbin/ntp/config.h Mon Feb 10 17:17:03 2020 (r357740) > @@ -1578,11 +1578,7 @@ > /* #undef STRERROR_R_CHAR_P */ > > /* canonical system (cpu-vendor-os) of where we should run */ > -#if defined(__alpha__) > -#define STR_SYSTEM "alpha-undermydesk-freebsd" > -#elif defined(__sparc64__) > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > -#elif defined(__amd64__) > +#if defined(__amd64__) > #define STR_SYSTEM "amd64-undermydesk-freebsd" > #elif defined(__powerpc64__) > #define STR_SYSTEM "powerpc64-undermydesk-freebsd" > @@ -1596,12 +1592,8 @@ > #define STR_SYSTEM "arm64-undermydesk-freebsd" > #elif defined(__arm__) > #define STR_SYSTEM "arm-undermydesk-freebsd" > -#elif defined(__sparc64__) > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > -#elif defined(__sparc__) > -#define STR_SYSTEM "sparc-undermydesk-freebsd" > -#elif defined(__ia64__) > -#define STR_SYSTEM "ia64-undermydesk-freebsd" > +#elif defined(__riscv__) > +#define STR_SYSTEM "riscv64-undermydesk-freebsd" This should be __riscv (see arch(7)) -- John Baldwin From owner-svn-src-all@freebsd.org Mon Feb 10 18:17:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A9D3240449; Mon, 10 Feb 2020 18:17:11 +0000 (UTC) (envelope-from kevans@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) server-signature RSA-PSS (4096 bits) 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 48GYyt6SySz3L7J; Mon, 10 Feb 2020 18:17:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 CDC6735A9; Mon, 10 Feb 2020 18:17:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f174.google.com with SMTP id t13so5876002qto.3; Mon, 10 Feb 2020 10:17:10 -0800 (PST) X-Gm-Message-State: APjAAAU2ZBrcjtazq/VusTPBcJ3SHBKsDvRN9Qagumlu+mEOoo+mT7Bx g729JcL/iGax26X3XTEhawcu0W5tggplqBhkV8Q= X-Google-Smtp-Source: APXvYqxZiLL91NrTLxEfHgKz5sIi+RxlsBANud+DlugEG262Q8RcD0+zm8x86moL+q0vPyiangYRaf1tZwED+N3Czho= X-Received: by 2002:ac8:83d:: with SMTP id u58mr8761064qth.60.1581358630312; Mon, 10 Feb 2020 10:17:10 -0800 (PST) MIME-Version: 1.0 References: <202002091853.019IrsaI054316@repo.freebsd.org> <068de386-53b4-0fe6-cdff-22b4d940fc44@FreeBSD.org> In-Reply-To: <068de386-53b4-0fe6-cdff-22b4d940fc44@FreeBSD.org> From: Kyle Evans Date: Mon, 10 Feb 2020 12:16:58 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r357703 - head/share/mk To: John Baldwin Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:17:11 -0000 On Mon, Feb 10, 2020 at 12:13 PM John Baldwin wrote: > > On 2/9/20 10:53 AM, Kyle Evans wrote: > > Author: kevans > > Date: Sun Feb 9 18:53:53 2020 > > New Revision: 357703 > > URL: https://svnweb.freebsd.org/changeset/base/357703 > > > > Log: > > mips: mark GOOGLETEST broken, due to no fault of its own > > > > As explained in the comment; GOOGLETEST cannot currently be compiled on any > > mips variant at the moment due to the cross toolchain seemingly using the > > wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at > > which point this should be reverted most expeditiously. > > Hmm, I thought you were going to do this for any external GCC? It's also > broken on amd64, etc. as well when using external GCC. > My main concern at the moment is we haven't had any functional default builds for mips since I had unbroken it over a month ago -- I was hoping we'd be able to come up with a fix for the external GCC spec issue in relatively short order so as not to worry about it, but I can look at expanding this to all external GCC. From owner-svn-src-all@freebsd.org Mon Feb 10 18:20:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 265A424059F for ; Mon, 10 Feb 2020 18:20:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48GZ2y0Lp2z3LJ0 for ; Mon, 10 Feb 2020 18:20:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x744.google.com with SMTP id z19so4427214qkj.5 for ; Mon, 10 Feb 2020 10:20:41 -0800 (PST) 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=uJxQW0svxAniYpaD4T5z7rJTDBxqWfGWd/6atvkEM28=; b=jnRMZXJCFdv8r3WvDIWd0sY53+A5J9BYBJdOsmaXkqOduP8+tS4h6pqJltvNYCkN1h eReF26WPHuqQMZhKIpBRvQF4TfOqObYM5b9w7Tgn0J1FhtWu8iLp2DwRCdKrF+af1lrp Se3S3eWgXsLbek26/HEcmOKVVymCdMfxYihHu+tlwa2G6kNlyYf1hE4rVNxd75+sZkOr ICLC3DHmh6XrFTeiE1RL+YcfvIVTRYXFE0w57RPsDe2OwkfL0sjcTZ1hHZ1pgEeSpxCP dgTzIWNu9VRIcW+IH1wpK3e4nUvXZr7gDTljMboD5DTs1oPj1HrPT1ZiIXlET1nKYJtB NXGA== 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=uJxQW0svxAniYpaD4T5z7rJTDBxqWfGWd/6atvkEM28=; b=jPF9kTpfuwjlYO4OOf/GpW3c1uWWqMEORpb8xj4aKW52URi9FpCy/4gRhKKg6oo23v Gq4vNasKHtBe9seov0xFibJmf/Me/ZoB3XZO4x54BhuqGssH7TnHkGy4y4JDs05xrbqt CNvo7QmkuXdOLXs3xo5T0hoW1uNEiaunP0c/LSuP5jfjQ/sxUI6bQhcdZu8UKh74ukDx RubBlZEgWQqkIzxuCFKs23QisiqiWrycULPsm075NFhSvWSrBmO0GwGEKhFluMEk3uZK y6rSWBXShqCT+YZQ03T94DD6bR632zU2P45xiUltXoXO3BQaJECLZMyPeYev7XuVrcaK uRoQ== X-Gm-Message-State: APjAAAXEuyUFLCwGKmsYzlMGQSkY2TqO8cqZz9YYMivps0SKhWNs39Dj s7pN6Mf8ojt1Jw5cLDFcRPgaez53pvcx40oS9mYfaQ== X-Google-Smtp-Source: APXvYqxdsX/d8Dyw9iJ0ZfABZ1gRxNsEBIEdvWr+bSOZV93A6t0Q0FnAveOL2qoqkyqFcerv+B5L7IH2YV5qhNmKbzc= X-Received: by 2002:a05:620a:12c8:: with SMTP id e8mr2553006qkl.380.1581358839811; Mon, 10 Feb 2020 10:20:39 -0800 (PST) MIME-Version: 1.0 References: <202002101717.01AHH33d060657@repo.freebsd.org> <01d912b4-daef-01f3-d4f9-9512a040ab00@FreeBSD.org> In-Reply-To: <01d912b4-daef-01f3-d4f9-9512a040ab00@FreeBSD.org> From: Warner Losh Date: Mon, 10 Feb 2020 11:20:28 -0700 Message-ID: Subject: Re: svn commit: r357740 - head/usr.sbin/ntp To: John Baldwin Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48GZ2y0Lp2z3LJ0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=jnRMZXJC; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::744) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; 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)[4.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.41)[ip: (1.71), ipnet: 2607:f8b0::/32(-1.96), asn: 15169(-1.73), country: US(-0.05)]; 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" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:20:43 -0000 On Mon, Feb 10, 2020 at 11:15 AM John Baldwin wrote: > On 2/10/20 9:17 AM, Warner Losh wrote: > > Author: imp > > Date: Mon Feb 10 17:17:03 2020 > > New Revision: 357740 > > URL: https://svnweb.freebsd.org/changeset/base/357740 > > > > Log: > > Refresh architecture list with latest: > > > > Remove: sparc, sparc64 (twice), ia64, alpha > > Add: riscv64 > > > > Remove now-useless sparc64 ifdef > > > > Reivewed by: cy@, bcr@ > > Differential Revision: https://reviews.freebsd.org/D23593 > > > > Modified: > > head/usr.sbin/ntp/config.h > > > > Modified: head/usr.sbin/ntp/config.h > > > ============================================================================== > > --- head/usr.sbin/ntp/config.h Mon Feb 10 17:16:59 2020 > (r357739) > > +++ head/usr.sbin/ntp/config.h Mon Feb 10 17:17:03 2020 > (r357740) > > @@ -1578,11 +1578,7 @@ > > /* #undef STRERROR_R_CHAR_P */ > > > > /* canonical system (cpu-vendor-os) of where we should run */ > > -#if defined(__alpha__) > > -#define STR_SYSTEM "alpha-undermydesk-freebsd" > > -#elif defined(__sparc64__) > > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > > -#elif defined(__amd64__) > > +#if defined(__amd64__) > > #define STR_SYSTEM "amd64-undermydesk-freebsd" > > #elif defined(__powerpc64__) > > #define STR_SYSTEM "powerpc64-undermydesk-freebsd" > > @@ -1596,12 +1592,8 @@ > > #define STR_SYSTEM "arm64-undermydesk-freebsd" > > #elif defined(__arm__) > > #define STR_SYSTEM "arm-undermydesk-freebsd" > > -#elif defined(__sparc64__) > > -#define STR_SYSTEM "sparc64-undermydesk-freebsd" > > -#elif defined(__sparc__) > > -#define STR_SYSTEM "sparc-undermydesk-freebsd" > > -#elif defined(__ia64__) > > -#define STR_SYSTEM "ia64-undermydesk-freebsd" > > +#elif defined(__riscv__) > > +#define STR_SYSTEM "riscv64-undermydesk-freebsd" > > This should be __riscv (see arch(7)) > Doh! I could have sworn I double checked, but I'll fix. Thanks! Warner From owner-svn-src-all@freebsd.org Mon Feb 10 18:28:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90B242407EB; Mon, 10 Feb 2020 18:28:02 +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) server-signature RSA-PSS (4096 bits) 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 48GZCQ3Gpgz3LpB; Mon, 10 Feb 2020 18:28:02 +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 6BC0923365; Mon, 10 Feb 2020 18:28:02 +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 01AIS2JK003218; Mon, 10 Feb 2020 18:28:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AIS2ZM003217; Mon, 10 Feb 2020 18:28:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002101828.01AIS2ZM003217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 10 Feb 2020 18:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357743 - head/usr.sbin/ntp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/ntp X-SVN-Commit-Revision: 357743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 18:28:02 -0000 Author: imp Date: Mon Feb 10 18:28:02 2020 New Revision: 357743 URL: https://svnweb.freebsd.org/changeset/base/357743 Log: Use __riscv instead of __riscv__ I misread arch(7) when I added this... Noticed by: jhb@ and mhorne@ Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Mon Feb 10 18:06:38 2020 (r357742) +++ head/usr.sbin/ntp/config.h Mon Feb 10 18:28:02 2020 (r357743) @@ -1592,7 +1592,7 @@ #define STR_SYSTEM "arm64-undermydesk-freebsd" #elif defined(__arm__) #define STR_SYSTEM "arm-undermydesk-freebsd" -#elif defined(__riscv__) +#elif defined(__riscv) #define STR_SYSTEM "riscv64-undermydesk-freebsd" #else #define STR_SYSTEM "i386-undermydesk-freebsd" From owner-svn-src-all@freebsd.org Mon Feb 10 19:16:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D69092416DB; Mon, 10 Feb 2020 19:16:06 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48GbGt4GzFz3QdF; Mon, 10 Feb 2020 19:16:06 +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 01AJFwtR041525 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 10 Feb 2020 21:16:01 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01AJFwtR041525 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01AJFwOQ041524; Mon, 10 Feb 2020 21:15:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 10 Feb 2020 21:15:58 +0200 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357695 - in head: sys/kern sys/sys usr.bin/procstat Message-ID: <20200210191558.GX4808@kib.kiev.ua> References: <202002091210.019CAciS006085@repo.freebsd.org> 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: 48GbGt4GzFz3QdF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 19:16:06 -0000 On Mon, Feb 10, 2020 at 10:11:43AM -0800, John Baldwin wrote: > On 2/9/20 4:10 AM, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Feb 9 12:10:37 2020 > > New Revision: 357695 > > URL: https://svnweb.freebsd.org/changeset/base/357695 > > > > Log: > > Add AT_BSDFLAGS auxv entry. > > > > The intent is to provide bsd-specific flags relevant to interpreter > > and C runtime. I did not want to reuse AT_FLAGS which is common ELF > > auxv entry. > > > > Use bsdflags to report kernel support for sigfastblock(2). This > > allows rtld and libthr to safely infer the syscall presence without > > SIGSYS. The tunable kern.elf{32,64}.sigfastblock blocks reporting. > > > > Tested by: pho > > Disscussed with: cem, emaste, jilles > > Sponsored by: The FreeBSD Foundation > > Differential revision: https://reviews.freebsd.org/D12773 > > I find adding a new auxv type curious. The MIPS ABI doc says that > "bits under the 0xff000000 mask are reserved for system semantics". > The powerpc and x86-64 docs don't define any bits at all. In > practice I think we are free to use AT_FLAGS however we wish as no > use cases of "standard" bits have arisen since AT_FLAGS was first > defined. So you would prefer to have me used AT_FLAGS for sigfastblock indicator ? I am feeling uncomfortable doing that. My reasoning, to reformulate it from what I wrote in the commit message, is to not pollute neither compilation nor ABI namespace for bsd-specific flags. AT_FLAGS was not touched by anybody and I do not want to open it for use, since ABI group my finally find some use for it. From owner-svn-src-all@freebsd.org Mon Feb 10 19:54:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD16B24294A; Mon, 10 Feb 2020 19:54:37 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48Gc7K0KWWz3y9b; Mon, 10 Feb 2020 19:54:36 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x341.google.com with SMTP id p17so608293wma.1; Mon, 10 Feb 2020 11:54:36 -0800 (PST) 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=GhwyB/4aIRQ9OHyFICs/51wvaZ/ls1p9U9ALaPiKCXU=; b=AabzPJ+JIDXtYK2+8s/yE9jgu/IZIovh/7Vd2O7iYd7iWNaIpTAb2G/nv2yPKK18Io /yFg/dDfrsbe1CIc2vDgZZZLrA0iDd/SXV30LqjrByGgItt/FRlCrEanpaM3uxQwye+2 TsyeUYF90s9E9o7IZ4jsa8q0H6bD98nwhhN7XNTVVPti3xkFrz+H+Nq9dhs35J7FMiRp N3nRh3qlm8rDqLa8r9ZnAcH9ppl+vmmhALeorTeRzArRkar8NE+Wzst9XWIYm+pBcR2h vAXw6JVoZalvEeNPqURU14TSIMlVBURGuxMVFlNONfeEtCrGj+/kJhg0sOgka286sbdo 1ctA== 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=GhwyB/4aIRQ9OHyFICs/51wvaZ/ls1p9U9ALaPiKCXU=; b=P3SlnSOiqW4248+5p2TzUkg5xxyPcWVTjL+eHtlItT8KAMBVzhsWocpxbT6An5QGfh LxztE2loIxhTNEu2tVNiWDtakUwRJaS5YVLBk6v7a+e52SRVulvTbirKRxsWqjGtvvJE ItL/3JR+3JaeDnRMXyt1oWC/FhOC9JJNVOBwPAgIDSnO8ouU63eenJLScu4vZiZb8Hcy AIG2BLLTv6IQIoDWubGzGmPUOG6wMkB58eCfRMu/WryeEjzUa249KL+ijrFsp8n3NUaR KZnJ67P7ZNh7hfjF1ngeu+usM+JmkVcct6zGkB5Fuft3mWwPEsTpOh0vhNtVFmU7qg76 4Zqw== X-Gm-Message-State: APjAAAVyxoRrfCvM0Km1ghZdQzyvKFxrdsJY+zQjdFCt8zd9tPVm0gdz sapRt9cuaAyue2SPhNelK9br+SOr85/s++AnRAYBwQ== X-Google-Smtp-Source: APXvYqwQ5SKoEkF4R+RtIdqI/b44RBaRYEnRHb3EqT5UsU7ld/QBFaRSV/8YRC4RuQ/HDJKzp1Si2fc4ctmpmKScFRs= X-Received: by 2002:a1c:59c6:: with SMTP id n189mr595968wmb.178.1581364475241; Mon, 10 Feb 2020 11:54:35 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:6b02:0:0:0:0:0 with HTTP; Mon, 10 Feb 2020 11:54:34 -0800 (PST) In-Reply-To: <94dd2422-307b-9c06-ad84-d13d2e8a9fa4@FreeBSD.org> References: <202002010646.0116ktUk057327@repo.freebsd.org> <94dd2422-307b-9c06-ad84-d13d2e8a9fa4@FreeBSD.org> From: Mateusz Guzik Date: Mon, 10 Feb 2020 20:54:34 +0100 Message-ID: Subject: Re: svn commit: r357361 - in head/sys: kern sys ufs/ufs vm To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Gc7K0KWWz3y9b X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=AabzPJ+J; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; 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,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (2.78), ipnet: 2a00:1450::/32(-2.47), asn: 15169(-1.72), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; 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.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 19:54:37 -0000 On 2/3/20, John Baldwin wrote: > On 1/31/20 10:46 PM, Mateusz Guzik wrote: >> Author: mjg >> Date: Sat Feb 1 06:46:55 2020 >> New Revision: 357361 >> URL: https://svnweb.freebsd.org/changeset/base/357361 >> >> Log: >> vfs: replace VOP_MARKATIME with VOP_MMAPPED >> >> The routine is only provided by ufs and is only used on mmap and exec. >> >> Reviewed by: kib >> Differential Revision: https://reviews.freebsd.org/D23422 >> >> Modified: >> head/sys/kern/kern_exec.c >> head/sys/kern/vfs_subr.c >> head/sys/kern/vnode_if.src >> head/sys/sys/vnode.h >> head/sys/ufs/ufs/ufs_vnops.c >> head/sys/vm/vm_mmap.c >> >> Modified: head/sys/ufs/ufs/ufs_vnops.c >> ============================================================================== >> --- head/sys/ufs/ufs/ufs_vnops.c Sat Feb 1 06:41:44 2020 (r357360) >> +++ head/sys/ufs/ufs/ufs_vnops.c Sat Feb 1 06:46:55 2020 (r357361) >> @@ -108,7 +108,7 @@ static vop_getattr_t ufs_getattr; >> static vop_ioctl_t ufs_ioctl; >> static vop_link_t ufs_link; >> static int ufs_makeinode(int mode, struct vnode *, struct vnode **, >> struct componentname *, const char *); >> -static vop_markatime_t ufs_markatime; >> +static vop_mmapped_t ufs_mmapped; >> static vop_mkdir_t ufs_mkdir; >> static vop_mknod_t ufs_mknod; >> static vop_open_t ufs_open; >> @@ -676,19 +676,22 @@ out: >> } >> #endif /* UFS_ACL */ >> >> -/* >> - * Mark this file's access time for update for vfs_mark_atime(). This >> - * is called from execve() and mmap(). >> - */ > > Why remove this comment rather than update it? It is largely still > true and explains the purpose of the VOP (update the atime) which is > now no longer obvious from the name. > I don't think a fs-specific implementation of a VOP is the right place to state where it is called from. I would argue the name could be better as the execve bit is definitely not obvious, but interested parties can always grep. Finally, the function literally just updates atime so I don't think repeating this in the comment buys anything. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Mon Feb 10 20:23:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92CAA243160; Mon, 10 Feb 2020 20:23:09 +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) server-signature RSA-PSS (4096 bits) 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 48GcmF3Kzcz40fx; Mon, 10 Feb 2020 20:23:09 +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 6D92124A51; Mon, 10 Feb 2020 20:23:09 +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 01AKN9GN076655; Mon, 10 Feb 2020 20:23:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AKN9n1076654; Mon, 10 Feb 2020 20:23:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002102023.01AKN9n1076654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Feb 2020 20:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357744 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 20:23:09 -0000 Author: hselasky Date: Mon Feb 10 20:23:08 2020 New Revision: 357744 URL: https://svnweb.freebsd.org/changeset/base/357744 Log: Fix for unbalanced EPOCH(9) usage in the generic kernel interrupt handler. Interrupt handlers are removed via intr_event_execute_handlers() when IH_DEAD is set. The thread removing the interrupt is woken up, and calls intr_event_update(). When this happens, the ie_hflags are cleared and re-built from all the remaining handlers sharing the event. When the last IH_NET handler is removed, the IH_NET flag will be cleared from ih_hflags (or ie_hflags may still be being rebuilt in a different context), and the ithread_execute_handlers() may return with ie_hflags missing IH_NET. This can lead to a scenario where IH_NET was present before calling ithread_execute_handlers, and is not present at its return, meaning the need for epoch must be cached locally. This can happen when loading and unloading network drivers. Also make sure the ie_hflags is not cleared before being updated. This is a regression issue after r357004. Backtrace: panic() # trying to access epoch tracker on stack of dead thread _epoch_enter_preempt() ifunit_ref() ifioctl() fo_ioctl() kern_ioctl() sys_ioctl() syscallenter() amd64_syscall() Differential Revision: https://reviews.freebsd.org/D23483 Reviewed by: glebius@, gallatin@, mav@, jeff@ and kib@ Sponsored by: Mellanox Technologies Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Mon Feb 10 18:28:02 2020 (r357743) +++ head/sys/kern/kern_intr.c Mon Feb 10 20:23:08 2020 (r357744) @@ -189,12 +189,12 @@ intr_event_update(struct intr_event *ie) { struct intr_handler *ih; char *last; - int missed, space; + int missed, space, flags; /* Start off with no entropy and just the name of the event. */ mtx_assert(&ie->ie_lock, MA_OWNED); strlcpy(ie->ie_fullname, ie->ie_name, sizeof(ie->ie_fullname)); - ie->ie_hflags = 0; + flags = 0; missed = 0; space = 1; @@ -207,8 +207,9 @@ intr_event_update(struct intr_event *ie) space = 0; } else missed++; - ie->ie_hflags |= ih->ih_flags; + flags |= ih->ih_flags; } + ie->ie_hflags = flags; /* * If there is only one handler and its name is too long, just copy in @@ -1208,6 +1209,7 @@ ithread_loop(void *arg) struct thread *td; struct proc *p; int wake, epoch_count; + bool needs_epoch; td = curthread; p = td->td_proc; @@ -1242,20 +1244,22 @@ ithread_loop(void *arg) * that the load of ih_need in ithread_execute_handlers() * is ordered after the load of it_need here. */ - if (ie->ie_hflags & IH_NET) { + needs_epoch = + (atomic_load_int(&ie->ie_hflags) & IH_NET) != 0; + if (needs_epoch) { epoch_count = 0; NET_EPOCH_ENTER(et); } while (atomic_cmpset_acq_int(&ithd->it_need, 1, 0) != 0) { ithread_execute_handlers(p, ie); - if ((ie->ie_hflags & IH_NET) && + if (needs_epoch && ++epoch_count >= intr_epoch_batch) { NET_EPOCH_EXIT(et); epoch_count = 0; NET_EPOCH_ENTER(et); } } - if (ie->ie_hflags & IH_NET) + if (needs_epoch) NET_EPOCH_EXIT(et); WITNESS_WARN(WARN_PANIC, NULL, "suspending ithread"); mtx_assert(&Giant, MA_NOTOWNED); From owner-svn-src-all@freebsd.org Mon Feb 10 20:54:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 451BC243E9F; Mon, 10 Feb 2020 20:54:00 +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) server-signature RSA-PSS (4096 bits) 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 48GdRr0tgmz42d4; Mon, 10 Feb 2020 20:54:00 +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 1990A24FDA; Mon, 10 Feb 2020 20:54:00 +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 01AKrxCp094786; Mon, 10 Feb 2020 20:53:59 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AKrxEt094785; Mon, 10 Feb 2020 20:53:59 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002102053.01AKrxEt094785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 10 Feb 2020 20:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357745 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 20:54:00 -0000 Author: lwhsu Date: Mon Feb 10 20:53:59 2020 New Revision: 357745 URL: https://svnweb.freebsd.org/changeset/base/357745 Log: Restore the behavior of allowing empty string in a string sysctl Added as a special case to avoid unnecessary memory operations. Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Feb 10 20:23:08 2020 (r357744) +++ head/sys/kern/kern_sysctl.c Mon Feb 10 20:53:59 2020 (r357745) @@ -1687,8 +1687,12 @@ sysctl_handle_string(SYSCTL_HANDLER_ARGS) return (error); if (req->newlen - req->newidx >= arg2 || - req->newlen - req->newidx <= 0) { + req->newlen - req->newidx < 0) { error = EINVAL; + } else if (req->newlen - req->newidx == 0) { + sx_xlock(&sysctlstringlock); + ((char *)arg1)[0] = '\0'; + sx_xunlock(&sysctlstringlock); } else { arg2 = req->newlen - req->newidx; tmparg = malloc(arg2, M_SYSCTLTMP, M_WAITOK); From owner-svn-src-all@freebsd.org Mon Feb 10 22:28:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C04B24674F; Mon, 10 Feb 2020 22:28:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48GgYM2g8Vz47th; Mon, 10 Feb 2020 22:28:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 568DD26077; Mon, 10 Feb 2020 22:28:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01AMStj6049063; Mon, 10 Feb 2020 22:28:55 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01AMSttn049062; Mon, 10 Feb 2020 22:28:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002102228.01AMSttn049062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 10 Feb 2020 22:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357746 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2020 22:28:55 -0000 Author: mjg Date: Mon Feb 10 22:28:54 2020 New Revision: 357746 URL: https://svnweb.freebsd.org/changeset/base/357746 Log: vfs: fix device count leak on vrele racing with vgone The race is: CPU1 CPU2 devfs_reclaim_vchr make v_usecount 0 VI_LOCK sees v_usecount == 0, no updates vp->v_rdev = NULL; ... VI_UNLOCK VI_LOCK v_decr_devcount sees v_rdev == NULL, no updates In this scenario si_devcount decrement is not performed. Note this can only happen if the vnode lock is not held. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D23529 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Feb 10 20:53:59 2020 (r357745) +++ head/sys/kern/vfs_subr.c Mon Feb 10 22:28:54 2020 (r357746) @@ -3192,12 +3192,22 @@ vputx(struct vnode *vp, enum vputx_op func) * count which provides liveness of the vnode, in which case we * have to vdrop. */ - if (!refcount_release(&vp->v_usecount)) { - if (func == VPUTX_VPUT) - VOP_UNLOCK(vp); - return; + if (__predict_false(vp->v_type == VCHR && func == VPUTX_VRELE)) { + if (refcount_release_if_not_last(&vp->v_usecount)) + return; + VI_LOCK(vp); + if (!refcount_release(&vp->v_usecount)) { + VI_UNLOCK(vp); + return; + } + } else { + if (!refcount_release(&vp->v_usecount)) { + if (func == VPUTX_VPUT) + VOP_UNLOCK(vp); + return; + } + VI_LOCK(vp); } - VI_LOCK(vp); v_decr_devcount(vp); /* * By the time we got here someone else might have transitioned From owner-svn-src-all@freebsd.org Tue Feb 11 00:43:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 609C524920B; Tue, 11 Feb 2020 00:43:59 +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) server-signature RSA-PSS (4096 bits) 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 48GkYC1fp3z4GWf; Tue, 11 Feb 2020 00:43:59 +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 340CB27A55; Tue, 11 Feb 2020 00:43:59 +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 01B0hxQI033492; Tue, 11 Feb 2020 00:43:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B0hwTP033490; Tue, 11 Feb 2020 00:43:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002110043.01B0hwTP033490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Feb 2020 00:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r357747 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: mav X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 357747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 00:43:59 -0000 Author: mav Date: Tue Feb 11 00:43:58 2020 New Revision: 357747 URL: https://svnweb.freebsd.org/changeset/base/357747 Log: Enable commit access for Ryan Moeller (freqlabs). Matt Macy will co-mentor. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Feb 10 22:28:54 2020 (r357746) +++ svnadmin/conf/access Tue Feb 11 00:43:58 2020 (r357747) @@ -75,6 +75,7 @@ emax erj eugen fabient +freqlabs fsu gabor devnull gad Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Feb 10 22:28:54 2020 (r357746) +++ svnadmin/conf/mentors Tue Feb 11 00:43:58 2020 (r357747) @@ -14,6 +14,7 @@ alfredo jhibbits anish jhb brd allanjude Co-mentor: bapt chs imp +freqlabs mav Co-mentor: mmacy gordon delphij Co-mentor: emaste jceel trasz jkh rwatson From owner-svn-src-all@freebsd.org Tue Feb 11 00:53:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A85722494FE; Tue, 11 Feb 2020 00:53:00 +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) server-signature RSA-PSS (4096 bits) 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 48Gklc2xZHz4H5L; Tue, 11 Feb 2020 00:53:00 +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 01B0qpt4001575 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 10 Feb 2020 16:52:51 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 01B0qpiR001574; Mon, 10 Feb 2020 16:52:51 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 10 Feb 2020 16:52:51 -0800 From: Gleb Smirnoff To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357728 - head/sys/sys Message-ID: <20200211005251.GA1351@FreeBSD.org> References: <202002101352.01ADqQLh039003@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002101352.01ADqQLh039003@repo.freebsd.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 48Gklc2xZHz4H5L X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 00:53:00 -0000 On Mon, Feb 10, 2020 at 01:52:26PM +0000, Mateusz Guzik wrote: M> Author: mjg M> Date: Mon Feb 10 13:52:25 2020 M> New Revision: 357728 M> URL: https://svnweb.freebsd.org/changeset/base/357728 M> M> Log: M> Tidy up zpcpu_replace* M> M> - only compute the target address once M> - remove spurious type casting, zpcpu_get already return the correct type M> M> While here add missing newlines to other routines. M> M> Modified: M> head/sys/sys/pcpu.h M> M> Modified: head/sys/sys/pcpu.h M> ============================================================================== M> --- head/sys/sys/pcpu.h Mon Feb 10 13:24:14 2020 (r357727) M> +++ head/sys/sys/pcpu.h Mon Feb 10 13:52:25 2020 (r357728) M> @@ -245,32 +245,41 @@ extern struct pcpu *cpuid_to_pcpu[]; M> * If you need atomicity use xchg. M> * */ M> #define zpcpu_replace(base, val) ({ \ M> - __typeof(val) _old = *(__typeof(base))zpcpu_get(base); \ M> - *(__typeof(val) *)zpcpu_get(base) = val; \ M> + __typeof(val) *_ptr = zpcpu_get(base); \ M> + __typeof(val) _old; \ M> + \ M> + _old = *_ptr; \ M> + *_ptr = val; \ M> _old; \ M> }) I think this function must have only protected variant that asserts that curthread->td_critnest is on. zpcpu_get() sometimes can be used without critical section, when we are fine with getting a value from a different CPU. However, can't imagine a situation where migrating during a replace operation is acceptable. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Feb 11 03:37:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C3BB24CB2B; Tue, 11 Feb 2020 03:37: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) server-signature RSA-PSS (4096 bits) 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 48GpPf6nt8z4QRY; Tue, 11 Feb 2020 03:37:42 +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 E45C41AD4; Tue, 11 Feb 2020 03:37:42 +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 01B3bgPX036210; Tue, 11 Feb 2020 03:37:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B3bgVi036209; Tue, 11 Feb 2020 03:37:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110337.01B3bgVi036209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 03:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357748 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 357748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 03:37:43 -0000 Author: markj Date: Tue Feb 11 03:37:42 2020 New Revision: 357748 URL: https://svnweb.freebsd.org/changeset/base/357748 Log: MFC r357525: Correct the malloc tag used when freeing the temporary semop(2) buffer. Modified: stable/12/sys/kern/sysv_sem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sysv_sem.c ============================================================================== --- stable/12/sys/kern/sysv_sem.c Tue Feb 11 00:43:58 2020 (r357747) +++ stable/12/sys/kern/sysv_sem.c Tue Feb 11 03:37:42 2020 (r357748) @@ -1142,7 +1142,7 @@ sys_semop(struct thread *td, struct semop_args *uap) DPRINTF(("error = %d from copyin(%p, %p, %d)\n", error, uap->sops, sops, nsops * sizeof(sops[0]))); if (sops != small_sops) - free(sops, M_SEM); + free(sops, M_TEMP); return (error); } @@ -1393,7 +1393,7 @@ done: done2: mtx_unlock(sema_mtxp); if (sops != small_sops) - free(sops, M_SEM); + free(sops, M_TEMP); return (error); } From owner-svn-src-all@freebsd.org Tue Feb 11 04:03:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 822D124D40C; Tue, 11 Feb 2020 04:03:23 +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) server-signature RSA-PSS (4096 bits) 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 48GpzH2xzRz4Rx5; Tue, 11 Feb 2020 04:03:23 +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 608BB2095; Tue, 11 Feb 2020 04:03:23 +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 01B43NXp054236; Tue, 11 Feb 2020 04:03:23 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B43NMo054235; Tue, 11 Feb 2020 04:03:23 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202002110403.01B43NMo054235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 11 Feb 2020 04:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357749 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 357749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 04:03:23 -0000 Author: cperciva Date: Tue Feb 11 04:03:22 2020 New Revision: 357749 URL: https://svnweb.freebsd.org/changeset/base/357749 Log: Remove /qemu from EC2 ARM AMIs I forgot to do this as part of r345858 -- I added it to the vm_extra_pre_umount in vmimage.subr but forgot that function was overridden in the EC2 build. MFC after: 2 weeks Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Tue Feb 11 03:37:42 2020 (r357748) +++ head/release/tools/ec2.conf Tue Feb 11 04:03:22 2020 (r357749) @@ -116,6 +116,9 @@ vm_extra_pre_umount() { # * firstboot_pkgs (install packages) touch ${DESTDIR}/firstboot + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi rm -f ${DESTDIR}/etc/resolv.conf return 0 From owner-svn-src-all@freebsd.org Tue Feb 11 04:05:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8309C24D500; Tue, 11 Feb 2020 04:05:46 +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) server-signature RSA-PSS (4096 bits) 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 48Gq222qXDz4S7Z; Tue, 11 Feb 2020 04:05:46 +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 5C2A2209E; Tue, 11 Feb 2020 04:05:46 +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 01B45kJ3054411; Tue, 11 Feb 2020 04:05:46 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B45kRZ054410; Tue, 11 Feb 2020 04:05:46 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202002110405.01B45kRZ054410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 11 Feb 2020 04:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357750 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 357750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 04:05:46 -0000 Author: cperciva Date: Tue Feb 11 04:05:45 2020 New Revision: 357750 URL: https://svnweb.freebsd.org/changeset/base/357750 Log: Mount /dev while deinstalling pkg inside EC2 AMIs. This gets rid of (harmless) warnings: "pkg: Cannot open /dev/null:No such file or directory". MFC after: 2 weeks Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Tue Feb 11 04:03:22 2020 (r357749) +++ head/release/tools/ec2.conf Tue Feb 11 04:05:45 2020 (r357750) @@ -40,8 +40,10 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. + mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-all@freebsd.org Tue Feb 11 05:11:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E322F24E587; Tue, 11 Feb 2020 05:11: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) server-signature RSA-PSS (4096 bits) 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 48GrTr5f5Sz4VFy; Tue, 11 Feb 2020 05:11: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 BD0012D1A; Tue, 11 Feb 2020 05:11: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 01B5BSSs091017; Tue, 11 Feb 2020 05:11:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B5BSVP091015; Tue, 11 Feb 2020 05:11:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110511.01B5BSVP091015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 05:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357751 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 357751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 05:11:29 -0000 Author: markj Date: Tue Feb 11 05:11:27 2020 New Revision: 357751 URL: https://svnweb.freebsd.org/changeset/base/357751 Log: MFC r357535, r357536: libelftc: Fix memory leaks in the C++ demanglers. Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_dem_arm.c stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_dem_arm.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 11 04:05:45 2020 (r357750) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 11 05:11:27 2020 (r357751) @@ -203,11 +203,13 @@ cpp_demangle_ARM(const char *org) break; if ((arg = vector_str_substr(&d.vec, arg_begin, d.vec.size - 1, - &arg_len)) == NULL) + &arg_len)) == NULL) goto clean; - if (vector_str_push(&d.arg, arg, arg_len) == false) + if (vector_str_push(&d.arg, arg, arg_len) == false) { + free(arg); goto clean; + } free(arg); @@ -301,12 +303,11 @@ init_demangle_data(struct demangle_data *d) d->type = ENCODE_FUNC; - if (vector_str_init(&d->vec) == false) + if (!vector_str_init(&d->vec)) return (false); - if (vector_str_init(&d->arg) == false) { + if (!vector_str_init(&d->arg)) { vector_str_dest(&d->vec); - return (false); } @@ -956,7 +957,7 @@ read_op_user(struct demangle_data *d) goto clean; if (VEC_PUSH_STR(&d->vec, "::operator ") == false) - return (false); + goto clean; if (vector_str_push(&d->vec, to_str, to_len) == false) goto clean; Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 11 04:05:45 2020 (r357750) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 11 05:11:27 2020 (r357751) @@ -216,11 +216,13 @@ cpp_demangle_gnu2(const char *org) break; if ((arg = vector_str_substr(&d.vec, arg_begin, d.vec.size - 1, - &arg_len)) == NULL) + &arg_len)) == NULL) goto clean; - if (vector_str_push(&d.arg, arg, arg_len) == false) + if (vector_str_push(&d.arg, arg, arg_len) == false) { + free(arg); goto clean; + } free(arg); @@ -387,12 +389,11 @@ init_demangle_data(struct demangle_data *d) d->type = ENCODE_FUNC; - if (vector_str_init(&d->vec) == false) + if (!vector_str_init(&d->vec)) return (false); - if (vector_str_init(&d->arg) == false) { + if (!vector_str_init(&d->arg)) { vector_str_dest(&d->vec); - return (false); } Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 11 04:05:45 2020 (r357750) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 11 05:11:27 2020 (r357751) @@ -1659,7 +1659,8 @@ cpp_demangle_read_local_name(struct cpp_demangle_data if (*(++ddata->cur) == '\0') return (0); - vector_str_init(&local_name); + if (!vector_str_init(&local_name)) + return (0); ddata->cur_output = &local_name; if (!cpp_demangle_read_encoding(ddata)) { @@ -3953,7 +3954,7 @@ vector_type_qualifier_init(struct vector_type_qualifie assert(v->q_container != NULL); - if (vector_str_init(&v->ext_name) == false) { + if (!vector_str_init(&v->ext_name)) { free(v->q_container); return (0); } From owner-svn-src-all@freebsd.org Tue Feb 11 05:11:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AF7924E60C; Tue, 11 Feb 2020 05:11:53 +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) server-signature RSA-PSS (4096 bits) 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 48GrVJ6vr2z4VWF; Tue, 11 Feb 2020 05:11:52 +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 CE8302D41; Tue, 11 Feb 2020 05:11:52 +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 01B5Bq1l091081; Tue, 11 Feb 2020 05:11:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B5Bqk7091080; Tue, 11 Feb 2020 05:11:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110511.01B5Bqk7091080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 05:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357752 - stable/12/contrib/elftoolchain/size X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/size X-SVN-Commit-Revision: 357752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 05:11:53 -0000 Author: markj Date: Tue Feb 11 05:11:52 2020 New Revision: 357752 URL: https://svnweb.freebsd.org/changeset/base/357752 Log: MFC r357539: size: Avoid returning a stack pointer from xlatetom(). Modified: stable/12/contrib/elftoolchain/size/size.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/size/size.c ============================================================================== --- stable/12/contrib/elftoolchain/size/size.c Tue Feb 11 05:11:27 2020 (r357751) +++ stable/12/contrib/elftoolchain/size/size.c Tue Feb 11 05:11:52 2020 (r357752) @@ -211,7 +211,7 @@ main(int argc, char **argv) return (rc); } -static Elf_Data * +static int xlatetom(Elf *elf, GElf_Ehdr *elfhdr, void *_src, void *_dst, Elf_Type type, size_t size) { @@ -224,7 +224,8 @@ xlatetom(Elf *elf, GElf_Ehdr *elfhdr, void *_src, void dst.d_buf = _dst; dst.d_version = elfhdr->e_version; dst.d_size = size; - return (gelf_xlatetom(elf, &dst, &src, elfhdr->e_ident[EI_DATA])); + return (gelf_xlatetom(elf, &dst, &src, elfhdr->e_ident[EI_DATA]) != + NULL ? 0 : 1); } #define NOTE_OFFSET_32(nhdr, namesz, offset) \ @@ -285,12 +286,12 @@ handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phd while (data != NULL && offset + sizeof(Elf32_Nhdr) < segment_end) { nhdr = (Elf32_Nhdr *)(uintptr_t)((char*)data + offset); memset(&nhdr_l, 0, sizeof(Elf32_Nhdr)); - if (!xlatetom(elf, elfhdr, &nhdr->n_type, &nhdr_l.n_type, - ELF_T_WORD, sizeof(Elf32_Word)) || - !xlatetom(elf, elfhdr, &nhdr->n_descsz, &nhdr_l.n_descsz, - ELF_T_WORD, sizeof(Elf32_Word)) || - !xlatetom(elf, elfhdr, &nhdr->n_namesz, &nhdr_l.n_namesz, - ELF_T_WORD, sizeof(Elf32_Word))) + if (xlatetom(elf, elfhdr, &nhdr->n_type, &nhdr_l.n_type, + ELF_T_WORD, sizeof(Elf32_Word)) != 0 || + xlatetom(elf, elfhdr, &nhdr->n_descsz, &nhdr_l.n_descsz, + ELF_T_WORD, sizeof(Elf32_Word)) != 0 || + xlatetom(elf, elfhdr, &nhdr->n_namesz, &nhdr_l.n_namesz, + ELF_T_WORD, sizeof(Elf32_Word)) != 0) break; if (offset + sizeof(Elf32_Nhdr) + @@ -327,10 +328,10 @@ handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phd pid = PID64(nhdr, nhdr_l.n_namesz, 40); } - xlatetom(elf, elfhdr, &raw_size, &raw_size, - ELF_T_WORD, sizeof(uint64_t)); - xlatetom(elf, elfhdr, &pid, &pid, ELF_T_WORD, - sizeof(pid_t)); + (void)xlatetom(elf, elfhdr, &raw_size, + &raw_size, ELF_T_WORD, sizeof(uint64_t)); + (void)xlatetom(elf, elfhdr, &pid, &pid, + ELF_T_WORD, sizeof(pid_t)); } if (raw_size != 0 && style == STYLE_SYSV) { From owner-svn-src-all@freebsd.org Tue Feb 11 05:13:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8680124E745; Tue, 11 Feb 2020 05:13:36 +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) server-signature RSA-PSS (4096 bits) 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 48GrXJ2yTwz4Vhx; Tue, 11 Feb 2020 05:13:36 +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 60E792D85; Tue, 11 Feb 2020 05:13:36 +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 01B5Da9J095851; Tue, 11 Feb 2020 05:13:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B5DarV095850; Tue, 11 Feb 2020 05:13:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110513.01B5DarV095850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 05:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357753 - stable/12/contrib/elftoolchain/readelf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 357753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 05:13:36 -0000 Author: markj Date: Tue Feb 11 05:13:35 2020 New Revision: 357753 URL: https://svnweb.freebsd.org/changeset/base/357753 Log: MFC r357542: readelf: Don't leak memory when dwarf_get_fde_info_for_all_regs() fails. Modified: stable/12/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.c Tue Feb 11 05:11:52 2020 (r357752) +++ stable/12/contrib/elftoolchain/readelf/readelf.c Tue Feb 11 05:13:35 2020 (r357753) @@ -5871,6 +5871,7 @@ dump_dwarf_frame_regtable(struct readelf *re, Dwarf_Fd for (; cur_pc < end_pc; cur_pc++) { if (dwarf_get_fde_info_for_all_regs(fde, cur_pc, &rt, &row_pc, &de) != DW_DLV_OK) { + free(vec); warnx("dwarf_get_fde_info_for_all_regs failed: %s\n", dwarf_errmsg(de)); return (-1); From owner-svn-src-all@freebsd.org Tue Feb 11 05:14:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2AED24E7B4; Tue, 11 Feb 2020 05:14:37 +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) server-signature RSA-PSS (4096 bits) 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 48GrYT3d9kz4Vq0; Tue, 11 Feb 2020 05:14:37 +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 779EF2D86; Tue, 11 Feb 2020 05:14:37 +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 01B5EbvQ095949; Tue, 11 Feb 2020 05:14:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B5EaSt095945; Tue, 11 Feb 2020 05:14:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110514.01B5EaSt095945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 05:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357754 - stable/12/contrib/elftoolchain/libdwarf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libdwarf X-SVN-Commit-Revision: 357754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 05:14:37 -0000 Author: markj Date: Tue Feb 11 05:14:36 2020 New Revision: 357754 URL: https://svnweb.freebsd.org/changeset/base/357754 Log: MFC r357531, r357532, r357533, r357534: libdwarf: Coverity fixups. Modified: stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_attr.c stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_expr.c stable/12/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c stable/12/contrib/elftoolchain/libdwarf/libdwarf_frame.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_attr.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_attr.c Tue Feb 11 05:13:35 2020 (r357753) +++ stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_attr.c Tue Feb 11 05:14:36 2020 (r357754) @@ -46,8 +46,10 @@ dwarf_add_AT_location_expr(Dwarf_P_Debug dbg, Dwarf_P_ at->at_attrib = attr; at->at_expr = loc_expr; - if (_dwarf_expr_into_block(loc_expr, error) != DW_DLE_NONE) + if (_dwarf_expr_into_block(loc_expr, error) != DW_DLE_NONE) { + free(at); return (DW_DLV_BADADDR); + } at->u[0].u64 = loc_expr->pe_length; at->u[1].u8p = loc_expr->pe_block; if (loc_expr->pe_length <= UCHAR_MAX) Modified: stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_expr.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_expr.c Tue Feb 11 05:13:35 2020 (r357753) +++ stable/12/contrib/elftoolchain/libdwarf/dwarf_pro_expr.c Tue Feb 11 05:14:36 2020 (r357754) @@ -36,10 +36,10 @@ _dwarf_add_expr(Dwarf_P_Expr expr, Dwarf_Small opcode, Dwarf_Debug dbg; int len; - dbg = expr != NULL ? expr->pe_dbg : NULL; + dbg = expr->pe_dbg; - if (_dwarf_loc_expr_add_atom(expr->pe_dbg, NULL, NULL, opcode, val1, - val2, &len, error) != DW_DLE_NONE) + if (_dwarf_loc_expr_add_atom(dbg, NULL, NULL, opcode, val1, val2, &len, + error) != DW_DLE_NONE) return (NULL); assert(len > 0); @@ -67,7 +67,7 @@ _dwarf_expr_into_block(Dwarf_P_Expr expr, Dwarf_Error Dwarf_Debug dbg; int len, pos, ret; - dbg = expr != NULL ? expr->pe_dbg : NULL; + dbg = expr->pe_dbg; if (expr->pe_block != NULL) { free(expr->pe_block); @@ -88,7 +88,7 @@ _dwarf_expr_into_block(Dwarf_P_Expr expr, Dwarf_Error pos = 0; STAILQ_FOREACH(ee, &expr->pe_eelist, ee_next) { assert((Dwarf_Unsigned) pos < expr->pe_length); - ret = _dwarf_loc_expr_add_atom(expr->pe_dbg, + ret = _dwarf_loc_expr_add_atom(dbg, &expr->pe_block[pos], &expr->pe_block[expr->pe_length], ee->ee_loc.lr_atom, ee->ee_loc.lr_number, ee->ee_loc.lr_number2, &len, error); Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c Tue Feb 11 05:13:35 2020 (r357753) +++ stable/12/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c Tue Feb 11 05:14:36 2020 (r357754) @@ -59,9 +59,7 @@ _dwarf_abbrev_add(Dwarf_CU cu, uint64_t entry, uint64_ HASH_ADD(ab_hh, cu->cu_abbrev_hash, ab_entry, sizeof(ab->ab_entry), ab); - if (abp != NULL) - *abp = ab; - + *abp = ab; return (DW_DLE_NONE); } Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_frame.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/libdwarf_frame.c Tue Feb 11 05:13:35 2020 (r357753) +++ stable/12/contrib/elftoolchain/libdwarf/libdwarf_frame.c Tue Feb 11 05:14:36 2020 (r357754) @@ -468,9 +468,9 @@ _dwarf_frame_section_init(Dwarf_Debug dbg, Dwarf_Frame if (length > ds->ds_size - offset || (length == 0 && !eh_frame)) { - DWARF_SET_ERROR(dbg, error, - DW_DLE_DEBUG_FRAME_LENGTH_BAD); - return (DW_DLE_DEBUG_FRAME_LENGTH_BAD); + ret = DW_DLE_DEBUG_FRAME_LENGTH_BAD; + DWARF_SET_ERROR(dbg, error, ret); + goto fail_cleanup; } /* Check terminator for .eh_frame */ From owner-svn-src-all@freebsd.org Tue Feb 11 05:15:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 575BA24E847; Tue, 11 Feb 2020 05:15:36 +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) server-signature RSA-PSS (4096 bits) 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 48GrZc1gv1z4VxG; Tue, 11 Feb 2020 05:15:36 +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 34F6C2D88; Tue, 11 Feb 2020 05:15:36 +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 01B5FaEi096054; Tue, 11 Feb 2020 05:15:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B5FZYg096052; Tue, 11 Feb 2020 05:15:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002110515.01B5FZYg096052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 05:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357755 - stable/12/contrib/elftoolchain/elfcopy X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 357755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 05:15:36 -0000 Author: markj Date: Tue Feb 11 05:15:35 2020 New Revision: 357755 URL: https://svnweb.freebsd.org/changeset/base/357755 Log: MFC r357537, r357538: elfcopy: Coverity fixups. Modified: stable/12/contrib/elftoolchain/elfcopy/main.c stable/12/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- stable/12/contrib/elftoolchain/elfcopy/main.c Tue Feb 11 05:14:36 2020 (r357754) +++ stable/12/contrib/elftoolchain/elfcopy/main.c Tue Feb 11 05:15:35 2020 (r357755) @@ -587,15 +587,19 @@ copy_from_tempfile(const char *src, const char *dst, i if ((tmpfd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, 0755)) < 0) return (-1); - if (elftc_copyfile(infd, tmpfd) < 0) + if (elftc_copyfile(infd, tmpfd) < 0) { + (void) close(tmpfd); return (-1); + } /* * Remove the temporary file from the file system * namespace, and close its file descriptor. */ - if (unlink(src) < 0) + if (unlink(src) < 0) { + (void) close(tmpfd); return (-1); + } (void) close(infd); Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- stable/12/contrib/elftoolchain/elfcopy/sections.c Tue Feb 11 05:14:36 2020 (r357754) +++ stable/12/contrib/elftoolchain/elfcopy/sections.c Tue Feb 11 05:15:35 2020 (r357755) @@ -1092,7 +1092,7 @@ read_section(struct section *s, size_t *size) if (b == NULL) b = malloc(id->d_size); else - b = malloc(sz + id->d_size); + b = realloc(b, sz + id->d_size); if (b == NULL) err(EXIT_FAILURE, "malloc or realloc failed"); From owner-svn-src-all@freebsd.org Tue Feb 11 06:12:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C398F24FD0C; Tue, 11 Feb 2020 06:12: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) server-signature RSA-PSS (4096 bits) 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 48Gsqk4tz3z4Ygv; Tue, 11 Feb 2020 06:12: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 A32833AC6; Tue, 11 Feb 2020 06:12: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 01B6C2RP032471; Tue, 11 Feb 2020 06:12:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B6C2Ba032470; Tue, 11 Feb 2020 06:12:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002110612.01B6C2Ba032470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 11 Feb 2020 06:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357756 - head/usr.sbin/periodic/etc/daily X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 357756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 06:12:02 -0000 Author: kevans Date: Tue Feb 11 06:12:02 2020 New Revision: 357756 URL: https://svnweb.freebsd.org/changeset/base/357756 Log: backup-passwd: mask out all passwords in the diff The previous expression borked if a username had a plus or hyphen in it. This is needlessly restrictive- at leSt a hyphen in the middle is valid. Instead of playing this game, let's just assume the username can't contain a colon and mask out the second field. Submitted by: sigsys gmail com MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23548 Modified: head/usr.sbin/periodic/etc/daily/200.backup-passwd Modified: head/usr.sbin/periodic/etc/daily/200.backup-passwd ============================================================================== --- head/usr.sbin/periodic/etc/daily/200.backup-passwd Tue Feb 11 05:15:35 2020 (r357755) +++ head/usr.sbin/periodic/etc/daily/200.backup-passwd Tue Feb 11 06:12:02 2020 (r357756) @@ -42,7 +42,7 @@ case "$daily_backup_passwd_enable" in [ $rc -lt 1 ] && rc=1 echo "$host passwd diffs:" diff -uI '^#' $bak/master.passwd.bak /etc/master.passwd |\ - sed 's/^\([-+ ][^-+:]*\):[^:]*:/\1:(password):/' + sed 's/^\([-+ ][^:]*\):[^:]*:/\1:(password):/' mv $bak/master.passwd.bak $bak/master.passwd.bak2 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 fi From owner-svn-src-all@freebsd.org Tue Feb 11 07:02:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91CE0229328; Tue, 11 Feb 2020 07:02:49 +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) server-signature RSA-PSS (4096 bits) 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 48GtyK43h1z4c8N; Tue, 11 Feb 2020 07:02:49 +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 86371449C; Tue, 11 Feb 2020 07:02:49 +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 01B72nA6062348; Tue, 11 Feb 2020 07:02:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01B72m5B062341; Tue, 11 Feb 2020 07:02:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202002110702.01B72m5B062341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 11 Feb 2020 07:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357757 - in head: contrib/file contrib/file/doc contrib/file/m4 contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: contrib/file contrib/file/doc contrib/file/m4 contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Commit-Revision: 357757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 07:02:49 -0000 Author: delphij Date: Tue Feb 11 07:02:48 2020 New Revision: 357757 URL: https://svnweb.freebsd.org/changeset/base/357757 Log: MFV r357712: file 5.38. MFC after: 2 weeks Added: head/contrib/file/magic/Magdir/forth - copied unchanged from r357712, vendor/file/dist/magic/Magdir/forth head/contrib/file/magic/Magdir/git - copied unchanged from r357712, vendor/file/dist/magic/Magdir/git head/contrib/file/magic/Magdir/modulefile - copied unchanged from r357712, vendor/file/dist/magic/Magdir/modulefile head/contrib/file/magic/Magdir/openfst - copied unchanged from r357712, vendor/file/dist/magic/Magdir/openfst head/contrib/file/magic/Magdir/opentimestamps - copied unchanged from r357712, vendor/file/dist/magic/Magdir/opentimestamps head/contrib/file/magic/Magdir/pmem - copied unchanged from r357712, vendor/file/dist/magic/Magdir/pmem head/contrib/file/magic/Magdir/rst - copied unchanged from r357712, vendor/file/dist/magic/Magdir/rst head/contrib/file/magic/Magdir/sosi - copied unchanged from r357712, vendor/file/dist/magic/Magdir/sosi head/contrib/file/src/is_csv.c - copied unchanged from r357712, vendor/file/dist/src/is_csv.c Modified: head/contrib/file/ChangeLog head/contrib/file/Makefile.in head/contrib/file/README head/contrib/file/aclocal.m4 head/contrib/file/compile head/contrib/file/config.guess head/contrib/file/config.h.in head/contrib/file/config.sub head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/depcomp head/contrib/file/doc/Makefile.in head/contrib/file/doc/file.man head/contrib/file/doc/libmagic.man head/contrib/file/doc/magic.man head/contrib/file/ltmain.sh head/contrib/file/m4/libtool.m4 head/contrib/file/m4/ltoptions.m4 head/contrib/file/m4/ltsugar.m4 head/contrib/file/m4/ltversion.m4 head/contrib/file/m4/lt~obsolete.m4 head/contrib/file/magic/Magdir/android head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/apple head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/bsi head/contrib/file/magic/Magdir/c-lang head/contrib/file/magic/Magdir/cad head/contrib/file/magic/Magdir/commands head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/database head/contrib/file/magic/Magdir/elf head/contrib/file/magic/Magdir/espressif head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/fonts head/contrib/file/magic/Magdir/frame head/contrib/file/magic/Magdir/games head/contrib/file/magic/Magdir/gimp head/contrib/file/magic/Magdir/icc head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/javascript head/contrib/file/magic/Magdir/kml head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/macintosh head/contrib/file/magic/Magdir/mail.news head/contrib/file/magic/Magdir/map head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/msooxml head/contrib/file/magic/Magdir/ole2compounddocs head/contrib/file/magic/Magdir/pdf head/contrib/file/magic/Magdir/python head/contrib/file/magic/Magdir/rpi head/contrib/file/magic/Magdir/ruby head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/sniffer head/contrib/file/magic/Magdir/ssh head/contrib/file/magic/Magdir/uuencode head/contrib/file/magic/Magdir/varied.script head/contrib/file/magic/Magdir/vax head/contrib/file/magic/Magdir/windows head/contrib/file/magic/Magdir/wordprocessors head/contrib/file/magic/Magdir/zip head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/missing head/contrib/file/python/Makefile.in head/contrib/file/src/Makefile.am head/contrib/file/src/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/ascmagic.c head/contrib/file/src/buffer.c head/contrib/file/src/compress.c head/contrib/file/src/encoding.c head/contrib/file/src/file.c head/contrib/file/src/file.h head/contrib/file/src/file_opts.h head/contrib/file/src/fsmagic.c head/contrib/file/src/funcs.c head/contrib/file/src/magic.h.in head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/seccomp.c head/contrib/file/src/vasprintf.c head/contrib/file/tests/JW07022A.mp3.result head/contrib/file/tests/Makefile.in head/contrib/file/tests/test.c head/lib/libmagic/Makefile head/lib/libmagic/config.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/ChangeLog Tue Feb 11 07:02:48 2020 (r357757) @@ -1,3 +1,23 @@ +2019-12-16 21:11 Christos Zoulas + + * release 5.38 + +2019-12-15 22:13 Christos Zoulas + Document changes since the previous release: + - Always accept -S (no sandbox) even if we don't support sandboxing + - More syscalls elided for sandboxiing + - For ELF dynamic means having an interpreter not just PT_DYNAMIC + - Check for large ELF session header offset + - When saving and restoring a locale, keep the locale name in our + own storage. + - Add a flag to disable CSV file detection. + - Don't pass NULL/0 to memset to appease sanitizers. + - Avoid spurious prints when looks for extensions or apple strings + in fsmagic. + - Add builtin decompressors for xz and and bzip. + - Add a limit for the number of CDF elements. + - More checks for overflow in CDF. + 2019-05-14 22:26 Christos Zoulas * release 5.37 Modified: head/contrib/file/Makefile.in ============================================================================== --- head/contrib/file/Makefile.in Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/Makefile.in Tue Feb 11 07:02:48 2020 (r357757) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -136,7 +136,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, @@ -161,7 +161,7 @@ CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing + config.guess config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -246,6 +246,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MINGW = @MINGW@ @@ -352,8 +353,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -495,7 +496,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -560,7 +564,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -586,7 +590,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -604,7 +608,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -614,7 +618,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac Modified: head/contrib/file/README ============================================================================== --- head/contrib/file/README Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/README Tue Feb 11 07:02:48 2020 (r357757) @@ -1,6 +1,6 @@ ## README for file(1) Command and the libmagic(3) library ## - @(#) $File: README,v 1.57 2019/02/06 00:20:56 christos Exp $ + @(#) $File: README,v 1.59 2019/09/19 01:04:01 christos Exp $ Mailing List: file@astron.com Mailing List archives: http://mailman.astron.com/pipermail/file/ @@ -24,6 +24,10 @@ A public read-only git repository of the same sources https://github.com/file/file +We are continuously being fuzzed by OSS-FUZZ: + + https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:file + The major changes for 5.x are CDF file parsing, indirect magic, name/use (recursion) and overhaul in mime and ascii encoding handling. @@ -91,6 +95,7 @@ src/funcs.c - utilility functions src/getline.c - replacement for OS's that don't have it. src/getopt_long.c - replacement for OS's that don't have it. src/gmtime_r.c - replacement for OS's that don't have it. +src/is_csv.c - knows about Comma Separated Value file format (RFC 4180). src/is_json.c - knows about JavaScript Object Notation format (RFC 8259). src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). src/localtime_r.c - replacement for OS's that don't have it. Modified: head/contrib/file/aclocal.m4 ============================================================================== --- head/contrib/file/aclocal.m4 Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/aclocal.m4 Tue Feb 11 07:02:48 2020 (r357757) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,8 +20,8 @@ You have another version of autoconf. It may work, bu If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. +# visibility.m4 serial 6 +dnl Copyright (C) 2005, 2008, 2010-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -51,42 +51,42 @@ AC_DEFUN([gl_VISIBILITY], dnl First, check whether -Werror can be added to the command line, or dnl whether it leads to an error because of some other option that the dnl user has put into $CC $CFLAGS $CPPFLAGS. - AC_MSG_CHECKING([whether the -Werror option is usable]) - AC_CACHE_VAL([gl_cv_cc_vis_werror], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [gl_cv_cc_vis_werror=yes], - [gl_cv_cc_vis_werror=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_vis_werror]) + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_save_CFLAGS" + ]) dnl Now check whether visibility declarations are supported. - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL([gl_cv_cc_visibility], [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - dnl We use the option -Werror and a function dummyfunc, because on some - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning - dnl "visibility attribute not supported in this configuration; ignored" - dnl at the first function definition in every compilation unit, and we - dnl don't want to use the option in this case. - if test $gl_cv_cc_vis_werror = yes; then - CFLAGS="$CFLAGS -Werror" - fi - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); - void dummyfunc (void) {} - ]], - [[]])], - [gl_cv_cc_visibility=yes], - [gl_cv_cc_visibility=no]) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_save_CFLAGS" + ]) if test $gl_cv_cc_visibility = yes; then CFLAG_VISIBILITY="-fvisibility=hidden" HAVE_VISIBILITY=1 @@ -98,7 +98,7 @@ AC_DEFUN([gl_VISIBILITY], [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) ]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,10 +110,10 @@ AC_DEFUN([gl_VISIBILITY], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,14 +129,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -188,7 +188,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -219,7 +219,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -410,13 +410,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -424,49 +423,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -475,18 +466,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -573,8 +563,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -641,7 +631,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -683,7 +673,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -704,7 +694,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -725,7 +715,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,49 +723,42 @@ AC_SUBST([am__leading_dot])]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +797,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -843,7 +826,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -890,7 +873,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -909,7 +892,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -990,7 +973,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1050,7 +1033,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1078,7 +1061,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1097,7 +1080,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Modified: head/contrib/file/compile ============================================================================== --- head/contrib/file/compile Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/compile Tue Feb 11 07:02:48 2020 (r357757) @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: Modified: head/contrib/file/config.guess ============================================================================== --- head/contrib/file/config.guess Tue Feb 11 06:12:02 2020 (r357756) +++ head/contrib/file/config.guess Tue Feb 11 07:02:48 2020 (r357757) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2019-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2017-01-01' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2017-01-01' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -132,14 +134,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEAS UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +151,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +178,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + earm*) + arch="${UNAME_MACHINE_ARCH#e}" + arch="${arch%eb}" + arch="${arch%hf}" + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +219,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,46 +230,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -310,28 +330,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -343,7 +354,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -370,19 +381,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE sparc) echo sparc-icl-nx7; exit ;; esac ;; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 11 12:06:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 810812329A1; Tue, 11 Feb 2020 12:06:00 +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) server-signature RSA-PSS (4096 bits) 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 48H1h82Tfkz3Qgc; Tue, 11 Feb 2020 12:06:00 +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 3B8317CA6; Tue, 11 Feb 2020 12:06:00 +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 01BC60Yp042904; Tue, 11 Feb 2020 12:06:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BC60Wo042903; Tue, 11 Feb 2020 12:06:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111206.01BC60Wo042903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 12:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357758 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 357758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 12:06:00 -0000 Author: kib Date: Tue Feb 11 12:05:59 2020 New Revision: 357758 URL: https://svnweb.freebsd.org/changeset/base/357758 Log: MFC r357678: Correct the function name in the comment. Modified: stable/12/sys/kern/kern_thread.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_thread.c ============================================================================== --- stable/12/sys/kern/kern_thread.c Tue Feb 11 07:02:48 2020 (r357757) +++ stable/12/sys/kern/kern_thread.c Tue Feb 11 12:05:59 2020 (r357758) @@ -1055,7 +1055,7 @@ thread_suspend_check(int return_instead) * Typically, when retrying due to casueword(9) failure (rv == 1), we * should handle the stop requests there, with exception of cases when * the thread owns a kernel resource, for instance busied the umtx - * key, or when functions return immediately if casueword_check_susp() + * key, or when functions return immediately if thread_check_susp() * returned non-zero. On the other hand, retrying the whole lock * operation, we better not stop there but delegate the handling to * ast. From owner-svn-src-all@freebsd.org Tue Feb 11 12:13:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6946232F0D; Tue, 11 Feb 2020 12:13:21 +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) server-signature RSA-PSS (4096 bits) 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 48H1rd5Pxxz3RGl; Tue, 11 Feb 2020 12:13:21 +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 B51187EF8; Tue, 11 Feb 2020 12:13:21 +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 01BCDLWH048980; Tue, 11 Feb 2020 12:13:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BCDLW9048979; Tue, 11 Feb 2020 12:13:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111213.01BCDLW9048979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 12:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357759 - stable/12/sys/fs/tmpfs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/fs/tmpfs X-SVN-Commit-Revision: 357759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 12:13:21 -0000 Author: kib Date: Tue Feb 11 12:13:21 2020 New Revision: 357759 URL: https://svnweb.freebsd.org/changeset/base/357759 Log: MFC r357511: tmpfs_mount update: simplify, cache the value of VFS_TO_TMPFS() calculation. Modified: stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Feb 11 12:05:59 2020 (r357758) +++ stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Feb 11 12:13:21 2020 (r357759) @@ -344,6 +344,7 @@ tmpfs_mount(struct mount *mp) /* Only support update mounts for certain options. */ if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) return (EOPNOTSUPP); + tmp = VFS_TO_TMPFS(mp); if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) == 0) { /* * On-the-fly resizing is not supported (yet). We still @@ -352,17 +353,17 @@ tmpfs_mount(struct mount *mp) * parameter, say trying to change rw to ro or vice * versa, would cause vfs_filteropt() to bail. */ - if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) + if (size_max != tmp->tm_size_max) return (EOPNOTSUPP); } if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - !(VFS_TO_TMPFS(mp)->tm_ronly)) { + !tmp->tm_ronly) { /* RW -> RO */ return (tmpfs_rw_to_ro(mp)); } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - VFS_TO_TMPFS(mp)->tm_ronly) { + tmp->tm_ronly) { /* RO -> RW */ - VFS_TO_TMPFS(mp)->tm_ronly = 0; + tmp->tm_ronly = 0; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); From owner-svn-src-all@freebsd.org Tue Feb 11 12:14:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB031232FBB; Tue, 11 Feb 2020 12:14:23 +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) server-signature RSA-PSS (4096 bits) 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 48H1sq442Qz3wcS; Tue, 11 Feb 2020 12:14:23 +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 86C827EFA; Tue, 11 Feb 2020 12:14:23 +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 01BCENvD049081; Tue, 11 Feb 2020 12:14:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BCENqm049079; Tue, 11 Feb 2020 12:14:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111214.01BCENqm049079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 12:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357760 - in stable/12/sys: cddl/compat/opensolaris/kern compat/cloudabi X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: cddl/compat/opensolaris/kern compat/cloudabi X-SVN-Commit-Revision: 357760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 12:14:23 -0000 Author: kib Date: Tue Feb 11 12:14:22 2020 New Revision: 357760 URL: https://svnweb.freebsd.org/changeset/base/357760 Log: MFC r357512: Add sys/systm.h to several places that use vm headers. Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c stable/12/sys/compat/cloudabi/cloudabi_vdso.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c ============================================================================== --- stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Tue Feb 11 12:13:21 2020 (r357759) +++ stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Tue Feb 11 12:14:22 2020 (r357760) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: stable/12/sys/compat/cloudabi/cloudabi_vdso.c ============================================================================== --- stable/12/sys/compat/cloudabi/cloudabi_vdso.c Tue Feb 11 12:13:21 2020 (r357759) +++ stable/12/sys/compat/cloudabi/cloudabi_vdso.c Tue Feb 11 12:14:22 2020 (r357760) @@ -26,7 +26,8 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include #include #include From owner-svn-src-all@freebsd.org Tue Feb 11 14:00:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D84A23594D; Tue, 11 Feb 2020 14:00: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) server-signature RSA-PSS (4096 bits) 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 48H4DC754Nz42mJ; Tue, 11 Feb 2020 14:00:27 +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 EE38E9165; Tue, 11 Feb 2020 14:00:27 +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 01BE0Rgs009901; Tue, 11 Feb 2020 14:00:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BE0R3I009898; Tue, 11 Feb 2020 14:00:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002111400.01BE0R3I009898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 11 Feb 2020 14:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357761 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 14:00:28 -0000 Author: tuexen Date: Tue Feb 11 14:00:27 2020 New Revision: 357761 URL: https://svnweb.freebsd.org/changeset/base/357761 Log: Use an int instead of a bool variable, since bool is not supported on all platforms the stack is running on in userland. Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Feb 11 12:14:22 2020 (r357760) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 14:00:27 2020 (r357761) @@ -4766,7 +4766,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc } } /* Now clean up any other timers */ - sctp_stop_association_timers(stcb, false); + sctp_stop_association_timers(stcb, 0); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4934,7 +4934,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - sctp_stop_association_timers(stcb, true); + sctp_stop_association_timers(stcb, 1); /* * The chunk lists and such SHOULD be empty but we check them just Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Feb 11 12:14:22 2020 (r357760) +++ head/sys/netinet/sctputil.c Tue Feb 11 14:00:27 2020 (r357761) @@ -802,7 +802,7 @@ sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) } void -sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) +sctp_stop_association_timers(struct sctp_tcb *stcb, int stop_assoc_kill_timer) { struct sctp_inpcb *inp; struct sctp_nets *net; @@ -812,7 +812,7 @@ sctp_stop_association_timers(struct sctp_tcb *stcb, bo SCTP_FROM_SCTPUTIL + SCTP_LOC_18); sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_19); - if (stop_assoc_kill_timer) { + if (stop_assoc_kill_timer != 0) { sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_20); } Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Tue Feb 11 12:14:22 2020 (r357760) +++ head/sys/netinet/sctputil.h Tue Feb 11 14:00:27 2020 (r357761) @@ -165,7 +165,7 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ -void sctp_stop_association_timers(struct sctp_tcb *, bool); +void sctp_stop_association_timers(struct sctp_tcb *, int); void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int From owner-svn-src-all@freebsd.org Tue Feb 11 15:12:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2314A2384CF; Tue, 11 Feb 2020 15:12:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H5pz0B8Rz47nl; Tue, 11 Feb 2020 15:12:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0162CA00A; Tue, 11 Feb 2020 15:12:11 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BFCAoY058394; Tue, 11 Feb 2020 15:12:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BFC9GQ058389; Tue, 11 Feb 2020 15:12:09 GMT (envelope-from br@FreeBSD.org) Message-Id: <202002111512.01BFC9GQ058389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 11 Feb 2020 15:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357762 - in head/sys: arm64/conf conf dev/pci dev/pci/controller X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: arm64/conf conf dev/pci dev/pci/controller X-SVN-Commit-Revision: 357762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 15:12:11 -0000 Author: br Date: Tue Feb 11 15:12:09 2020 New Revision: 357762 URL: https://svnweb.freebsd.org/changeset/base/357762 Log: Add PCI Express driver for the ARM Neoverse N1 System Development Platform (N1SDP). Neoverse N1 is a high-performance ARM microarchitecture designed by the ARM Holdings for the server market. The PCI part on N1SDP was shipped untested and suffers from some integration issues. For instance accessing to not existing BDFs causes System Error (SError) exception. To mitigate this, the firmware scans the bus, catches SErrors and creates a table with valid BDFs. That allows us to filter-out accesses to invalid BDFs in this driver. Also the root complex config space (BDF == 0) has an unusual location in memory map, so remapping accesses to it is required. Finally, the config space is restricted to 32-bit accesses only. This was tested on the ARM boxes kindly provided by the ARM Ltd to the DARPA CHERI Project. In collaboration with: andrew Reviewed by: andrew Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D23349 Added: head/sys/dev/pci/controller/ head/sys/dev/pci/controller/pci_n1sdp.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/dev/pci/pci_host_generic_acpi.c head/sys/dev/pci/pci_host_generic_acpi.h Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Feb 11 14:00:27 2020 (r357761) +++ head/sys/arm64/conf/GENERIC Tue Feb 11 15:12:09 2020 (r357762) @@ -147,6 +147,7 @@ device cpufreq # Bus drivers device pci +device pci_n1sdp # ARM Neoverse N1 SDP PCI device al_pci # Annapurna Alpine PCI-E options PCI_HP # PCI-Express native HotPlug options PCI_IOV # PCI SR-IOV support Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Feb 11 14:00:27 2020 (r357761) +++ head/sys/conf/files.arm64 Tue Feb 11 15:12:09 2020 (r357762) @@ -248,6 +248,7 @@ dev/neta/if_mvneta_fdt.c optional neta fdt dev/neta/if_mvneta.c optional neta mdio mii dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci +dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi dev/pci/pci_host_generic.c optional pci dev/pci/pci_host_generic_acpi.c optional pci acpi dev/pci/pci_host_generic_fdt.c optional pci fdt Added: head/sys/dev/pci/controller/pci_n1sdp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/controller/pci_n1sdp.c Tue Feb 11 15:12:09 2020 (r357762) @@ -0,0 +1,350 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Andrew Turner + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "pcib_if.h" + +#define AP_NS_SHARED_MEM_BASE 0x06000000 +#define N1SDP_MAX_SEGMENTS 2 /* Two PCIe root complex devices. */ +#define BDF_TABLE_SIZE (16 * 1024) +#define PCI_CFG_SPACE_SIZE 0x1000 + +struct pcie_discovery_data { + uint32_t rc_base_addr; + uint32_t nr_bdfs; + uint32_t valid_bdfs[0]; +}; + +struct generic_pcie_n1sdp_softc { + struct generic_pcie_acpi_softc acpi; + struct pcie_discovery_data *n1_discovery_data; + bus_space_handle_t n1_bsh; +}; + +static int +n1sdp_init(struct generic_pcie_n1sdp_softc *sc) +{ + struct pcie_discovery_data *shared_data; + vm_offset_t vaddr; + vm_paddr_t paddr_rc; + vm_paddr_t paddr; + int table_count; + int bdfs_size; + int error, i; + + paddr = AP_NS_SHARED_MEM_BASE + sc->acpi.segment * BDF_TABLE_SIZE; + vaddr = kva_alloc((vm_size_t)BDF_TABLE_SIZE); + if (vaddr == 0) { + printf("%s: Can't allocate KVA memory.", __func__); + return (ENXIO); + } + pmap_kenter(vaddr, (vm_size_t)BDF_TABLE_SIZE, paddr, + VM_MEMATTR_UNCACHEABLE); + + shared_data = (struct pcie_discovery_data *)vaddr; + bdfs_size = sizeof(struct pcie_discovery_data) + + sizeof(uint32_t) * shared_data->nr_bdfs; + sc->n1_discovery_data = malloc(bdfs_size, M_DEVBUF, M_WAITOK | M_ZERO); + memcpy(sc->n1_discovery_data, shared_data, bdfs_size); + + paddr_rc = (vm_offset_t)shared_data->rc_base_addr; + error = bus_space_map(sc->acpi.base.bst, paddr_rc, PCI_CFG_SPACE_SIZE, + 0, &sc->n1_bsh); + if (error != 0) + return (error); + + if (bootverbose) { + table_count = sc->n1_discovery_data->nr_bdfs; + for (i = 0; i < table_count; i++) + printf("valid bdf %x\n", + sc->n1_discovery_data->valid_bdfs[i]); + } + + pmap_kremove(vaddr); + kva_free(vaddr, (vm_size_t)BDF_TABLE_SIZE); + + return (0); +} + +static int +n1sdp_check_bdf(struct generic_pcie_n1sdp_softc *sc, + u_int bus, u_int slot, u_int func) +{ + int table_count; + int bdf; + int i; + + bdf = PCIE_ADDR_OFFSET(bus, slot, func, 0); + if (bdf == 0) + return (1); + + table_count = sc->n1_discovery_data->nr_bdfs; + + for (i = 0; i < table_count; i++) + if (bdf == sc->n1_discovery_data->valid_bdfs[i]) + return (1); + + return (0); +} + +static int +n1sdp_pcie_acpi_probe(device_t dev) +{ + ACPI_DEVICE_INFO *devinfo; + ACPI_TABLE_HEADER *hdr; + ACPI_STATUS status; + ACPI_HANDLE h; + int root; + + if (acpi_disabled("pcib") || (h = acpi_get_handle(dev)) == NULL || + ACPI_FAILURE(AcpiGetObjectInfo(h, &devinfo))) + return (ENXIO); + + root = (devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0; + AcpiOsFree(devinfo); + if (!root) + return (ENXIO); + + /* TODO: Move this to an ACPI quirk? */ + status = AcpiGetTable(ACPI_SIG_MCFG, 1, &hdr); + if (ACPI_FAILURE(status)) + return (ENXIO); + + if (memcmp(hdr->OemId, "ARMLTD", ACPI_OEM_ID_SIZE) != 0 || + memcmp(hdr->OemTableId, "ARMN1SDP", ACPI_OEM_TABLE_ID_SIZE) != 0 || + hdr->OemRevision != 0x20181101) + return (ENXIO); + + device_set_desc(dev, "ARM N1SDP PCI host controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +n1sdp_pcie_acpi_attach(device_t dev) +{ + struct generic_pcie_n1sdp_softc *sc; + ACPI_HANDLE handle; + ACPI_STATUS status; + int err; + + err = pci_host_generic_acpi_init(dev); + if (err != 0) + return (err); + + sc = device_get_softc(dev); + handle = acpi_get_handle(dev); + + /* Get PCI Segment (domain) needed for IOMMU space remap. */ + status = acpi_GetInteger(handle, "_SEG", &sc->acpi.segment); + if (ACPI_FAILURE(status)) { + device_printf(dev, "No _SEG for PCI Bus\n"); + return (ENXIO); + } + + if (sc->acpi.segment >= N1SDP_MAX_SEGMENTS) { + device_printf(dev, "Unknown PCI Bus segment (domain) %d\n", + sc->acpi.segment); + return (ENXIO); + } + + err = n1sdp_init(sc); + if (err) + return (err); + + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); +} + +static int +n1sdp_get_bus_space(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, + bus_space_tag_t *bst, bus_space_handle_t *bsh, bus_size_t *offset) +{ + struct generic_pcie_n1sdp_softc *sc; + + sc = device_get_softc(dev); + + if (n1sdp_check_bdf(sc, bus, slot, func) == 0) + return (EINVAL); + + if (bus == sc->acpi.base.bus_start) { + if (slot != 0 || func != 0) + return (EINVAL); + *bsh = sc->n1_bsh; + } else { + *bsh = sc->acpi.base.bsh; + } + + *bst = sc->acpi.base.bst; + *offset = PCIE_ADDR_OFFSET(bus - sc->acpi.base.bus_start, slot, func, + reg); + + return (0); +} + +static uint32_t +n1sdp_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes) +{ + struct generic_pcie_n1sdp_softc *sc_n1sdp; + struct generic_pcie_acpi_softc *sc_acpi; + struct generic_pcie_core_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + bus_size_t offset; + uint32_t data; + + sc_n1sdp = device_get_softc(dev); + sc_acpi = &sc_n1sdp->acpi; + sc = &sc_acpi->base; + + if ((bus < sc->bus_start) || (bus > sc->bus_end)) + return (~0U); + if ((slot > PCI_SLOTMAX) || (func > PCI_FUNCMAX) || + (reg > PCIE_REGMAX)) + return (~0U); + + if (n1sdp_get_bus_space(dev, bus, slot, func, reg, &t, &h, &offset) !=0) + return (~0U); + + data = bus_space_read_4(t, h, offset & ~3); + + switch (bytes) { + case 1: + data >>= (offset & 3) * 8; + data &= 0xff; + break; + case 2: + data >>= (offset & 3) * 8; + data = le16toh(data); + break; + case 4: + data = le32toh(data); + break; + default: + return (~0U); + } + + return (data); +} + +static void +n1sdp_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes) +{ + struct generic_pcie_n1sdp_softc *sc_n1sdp; + struct generic_pcie_acpi_softc *sc_acpi; + struct generic_pcie_core_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + bus_size_t offset; + uint32_t data; + + sc_n1sdp = device_get_softc(dev); + sc_acpi = &sc_n1sdp->acpi; + sc = &sc_acpi->base; + + if ((bus < sc->bus_start) || (bus > sc->bus_end)) + return; + if ((slot > PCI_SLOTMAX) || (func > PCI_FUNCMAX) || + (reg > PCIE_REGMAX)) + return; + + if (n1sdp_get_bus_space(dev, bus, slot, func, reg, &t, &h, &offset) !=0) + return; + + data = bus_space_read_4(t, h, offset & ~3); + + switch (bytes) { + case 1: + data &= ~(0xff << ((offset & 3) * 8)); + data |= (val & 0xff) << ((offset & 3) * 8); + break; + case 2: + data &= ~(0xffff << ((offset & 3) * 8)); + data |= (val & 0xffff) << ((offset & 3) * 8); + break; + case 4: + data = val; + break; + default: + return; + } + + bus_space_write_4(t, h, offset & ~3, data); +} + +static device_method_t n1sdp_pcie_acpi_methods[] = { + DEVMETHOD(device_probe, n1sdp_pcie_acpi_probe), + DEVMETHOD(device_attach, n1sdp_pcie_acpi_attach), + + /* pcib interface */ + DEVMETHOD(pcib_read_config, n1sdp_pcie_read_config), + DEVMETHOD(pcib_write_config, n1sdp_pcie_write_config), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(pcib, n1sdp_pcie_acpi_driver, n1sdp_pcie_acpi_methods, + sizeof(struct generic_pcie_n1sdp_softc), generic_pcie_acpi_driver); + +static devclass_t n1sdp_pcie_acpi_devclass; + +DRIVER_MODULE(n1sdp_pcib, acpi, n1sdp_pcie_acpi_driver, + n1sdp_pcie_acpi_devclass, 0, 0); Modified: head/sys/dev/pci/pci_host_generic_acpi.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_acpi.c Tue Feb 11 14:00:27 2020 (r357761) +++ head/sys/dev/pci/pci_host_generic_acpi.c Tue Feb 11 15:12:09 2020 (r357762) @@ -230,7 +230,7 @@ pci_host_acpi_get_ecam_resource(device_t dev) } int -pci_host_generic_acpi_attach(device_t dev) +pci_host_generic_acpi_init(device_t dev) { struct generic_pcie_acpi_softc *sc; ACPI_HANDLE handle; @@ -301,6 +301,18 @@ pci_host_generic_acpi_attach(device_t dev) return (error); } } + + return (0); +} + +static int +pci_host_generic_acpi_attach(device_t dev) +{ + int error; + + error = pci_host_generic_acpi_init(dev); + if (error != 0) + return (error); device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); Modified: head/sys/dev/pci/pci_host_generic_acpi.h ============================================================================== --- head/sys/dev/pci/pci_host_generic_acpi.h Tue Feb 11 14:00:27 2020 (r357761) +++ head/sys/dev/pci/pci_host_generic_acpi.h Tue Feb 11 15:12:09 2020 (r357762) @@ -42,6 +42,6 @@ struct generic_pcie_acpi_softc { DECLARE_CLASS(generic_pcie_acpi_driver); -int pci_host_generic_acpi_attach(device_t dev); +int pci_host_generic_acpi_init(device_t dev); #endif /* !_DEV_PCI_PCI_HOST_GENERIC_ACPI_H_ */ From owner-svn-src-all@freebsd.org Tue Feb 11 17:18:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A38E623BB01; Tue, 11 Feb 2020 17:18: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) server-signature RSA-PSS (4096 bits) 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 48H8d53p7cz4HRl; Tue, 11 Feb 2020 17:18:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (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 07BBEDB88; Tue, 11 Feb 2020 17:18:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r357695 - in head: sys/kern sys/sys usr.bin/procstat To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002091210.019CAciS006085@repo.freebsd.org> <20200210191558.GX4808@kib.kiev.ua> 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: Tue, 11 Feb 2020 09:18:47 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200210191558.GX4808@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 17:18:49 -0000 On 2/10/20 11:15 AM, Konstantin Belousov wrote: > On Mon, Feb 10, 2020 at 10:11:43AM -0800, John Baldwin wrote: >> On 2/9/20 4:10 AM, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Feb 9 12:10:37 2020 >>> New Revision: 357695 >>> URL: https://svnweb.freebsd.org/changeset/base/357695 >>> >>> Log: >>> Add AT_BSDFLAGS auxv entry. >>> >>> The intent is to provide bsd-specific flags relevant to interpreter >>> and C runtime. I did not want to reuse AT_FLAGS which is common ELF >>> auxv entry. >>> >>> Use bsdflags to report kernel support for sigfastblock(2). This >>> allows rtld and libthr to safely infer the syscall presence without >>> SIGSYS. The tunable kern.elf{32,64}.sigfastblock blocks reporting. >>> >>> Tested by: pho >>> Disscussed with: cem, emaste, jilles >>> Sponsored by: The FreeBSD Foundation >>> Differential revision: https://reviews.freebsd.org/D12773 >> >> I find adding a new auxv type curious. The MIPS ABI doc says that >> "bits under the 0xff000000 mask are reserved for system semantics". >> The powerpc and x86-64 docs don't define any bits at all. In >> practice I think we are free to use AT_FLAGS however we wish as no >> use cases of "standard" bits have arisen since AT_FLAGS was first >> defined. > > So you would prefer to have me used AT_FLAGS for sigfastblock indicator ? > I am feeling uncomfortable doing that. > > My reasoning, to reformulate it from what I wrote in the commit message, > is to not pollute neither compilation nor ABI namespace for bsd-specific > flags. AT_FLAGS was not touched by anybody and I do not want to open > it for use, since ABI group my finally find some use for it. I would bet money the ABI group will never use AT_FLAGS since they haven't found a use yet. That said, adding a new auxv vector isn't the end of the world. I'll work on a patch to GDB when I get some spare time. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 11 17:22:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFA2323BEE1; Tue, 11 Feb 2020 17:22:50 +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) server-signature RSA-PSS (4096 bits) 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 48H8jk4rScz4Hys; Tue, 11 Feb 2020 17:22:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (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 24E76DCC9; Tue, 11 Feb 2020 17:22:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r357361 - in head/sys: kern sys ufs/ufs vm To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202002010646.0116ktUk057327@repo.freebsd.org> <94dd2422-307b-9c06-ad84-d13d2e8a9fa4@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: <41588a27-4a53-485f-6cd4-2a4a5b00d94a@FreeBSD.org> Date: Tue, 11 Feb 2020 09:22:49 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 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-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 17:22:50 -0000 On 2/10/20 11:54 AM, Mateusz Guzik wrote: > On 2/3/20, John Baldwin wrote: >> On 1/31/20 10:46 PM, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Sat Feb 1 06:46:55 2020 >>> New Revision: 357361 >>> URL: https://svnweb.freebsd.org/changeset/base/357361 >>> >>> Log: >>> vfs: replace VOP_MARKATIME with VOP_MMAPPED >>> >>> The routine is only provided by ufs and is only used on mmap and exec. >>> >>> Reviewed by: kib >>> Differential Revision: https://reviews.freebsd.org/D23422 >>> >>> Modified: >>> head/sys/kern/kern_exec.c >>> head/sys/kern/vfs_subr.c >>> head/sys/kern/vnode_if.src >>> head/sys/sys/vnode.h >>> head/sys/ufs/ufs/ufs_vnops.c >>> head/sys/vm/vm_mmap.c >>> >>> Modified: head/sys/ufs/ufs/ufs_vnops.c >>> ============================================================================== >>> --- head/sys/ufs/ufs/ufs_vnops.c Sat Feb 1 06:41:44 2020 (r357360) >>> +++ head/sys/ufs/ufs/ufs_vnops.c Sat Feb 1 06:46:55 2020 (r357361) >>> @@ -108,7 +108,7 @@ static vop_getattr_t ufs_getattr; >>> static vop_ioctl_t ufs_ioctl; >>> static vop_link_t ufs_link; >>> static int ufs_makeinode(int mode, struct vnode *, struct vnode **, >>> struct componentname *, const char *); >>> -static vop_markatime_t ufs_markatime; >>> +static vop_mmapped_t ufs_mmapped; >>> static vop_mkdir_t ufs_mkdir; >>> static vop_mknod_t ufs_mknod; >>> static vop_open_t ufs_open; >>> @@ -676,19 +676,22 @@ out: >>> } >>> #endif /* UFS_ACL */ >>> >>> -/* >>> - * Mark this file's access time for update for vfs_mark_atime(). This >>> - * is called from execve() and mmap(). >>> - */ >> >> Why remove this comment rather than update it? It is largely still >> true and explains the purpose of the VOP (update the atime) which is >> now no longer obvious from the name. >> > > I don't think a fs-specific implementation of a VOP is the right place to > state where it is called from. I would argue the name could be better as > the execve bit is definitely not obvious, but interested parties can > always grep. This (always grep) is why comments matter. If we wanted people to just use grep and always UTSL, we wouldn't bother having any comments at all. One of the purposes of comments is to allow a human reader to understand the code in context without needing several different windows open to piece together what is happening. In particular, the comment gives a better hint as to _why_ we are updating the atime. The old name did a better job of this than the new one which is more bland, but presumably you have future changes to add that are beyond just changing the atime and that is why you renamed it? -- John Baldwin From owner-svn-src-all@freebsd.org Tue Feb 11 17:41:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00A9923CA97; Tue, 11 Feb 2020 17:41:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H97Y6H8Tz4K5X; Tue, 11 Feb 2020 17:41:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2ECFBD43; Tue, 11 Feb 2020 17:41:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BHfjCP047511; Tue, 11 Feb 2020 17:41:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BHfjQg047510; Tue, 11 Feb 2020 17:41:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111741.01BHfjQg047510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 17:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357763 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 357763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 17:41:46 -0000 Author: kib Date: Tue Feb 11 17:41:45 2020 New Revision: 357763 URL: https://svnweb.freebsd.org/changeset/base/357763 Log: if_media.c: use __FBSDID(). Reviewed by: hselasky Sponsored by: Mellanox Technologies Differential revision: https://reviews.freebsd.org/D23620 Modified: head/sys/net/if_media.c Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Tue Feb 11 15:12:09 2020 (r357762) +++ head/sys/net/if_media.c Tue Feb 11 17:41:45 2020 (r357763) @@ -1,5 +1,4 @@ /* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */ -/* $FreeBSD$ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -47,6 +46,9 @@ * Many thanks to Matt Thomas for providing the information necessary * to implement this interface. */ + +#include +__FBSDID("$FreeBSD$"); #include "opt_ifmedia.h" From owner-svn-src-all@freebsd.org Tue Feb 11 17:45:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAFB223CC17; Tue, 11 Feb 2020 17:45:01 +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) server-signature RSA-PSS (4096 bits) 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 48H9CK4kBYz4KTw; Tue, 11 Feb 2020 17:45:01 +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 9D55EBD8B; Tue, 11 Feb 2020 17:45:01 +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 01BHj1St048700; Tue, 11 Feb 2020 17:45:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BHj14l048699; Tue, 11 Feb 2020 17:45:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111745.01BHj14l048699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 17:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357764 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 357764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 17:45:01 -0000 Author: kib Date: Tue Feb 11 17:45:01 2020 New Revision: 357764 URL: https://svnweb.freebsd.org/changeset/base/357764 Log: if_media.c: staticize and constify ifmedia description structures used under IFMEDIA_DEBUG. The reason for this change is to make it clear the scope of the in-kernel usage of IFM_TYPE_DESCRIPTIONS and IFM_SUBTYPE_ETHERNET_DESCRIPTIONS macros. Also it is somewhat better C. Reviewed by: hselasky Sponsored by: Mellanox Technologies Differential revision: https://reviews.freebsd.org/D23620 Modified: head/sys/net/if_media.c Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Tue Feb 11 17:41:45 2020 (r357763) +++ head/sys/net/if_media.c Tue Feb 11 17:45:01 2020 (r357764) @@ -392,44 +392,47 @@ ifmedia_baudrate(int mword) } #ifdef IFMEDIA_DEBUG -struct ifmedia_description ifm_type_descriptions[] = +static const struct ifmedia_description ifm_type_descriptions[] = IFM_TYPE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_descriptions[] = +static const struct ifmedia_description ifm_subtype_ethernet_descriptions[] = IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ethernet_option_descriptions[] = IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = +static const struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_option_descriptions[] = IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_mode_descriptions[] = IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_descriptions[] = IFM_SUBTYPE_ATM_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_option_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_option_descriptions[] = IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_shared_descriptions[] = +static const struct ifmedia_description ifm_subtype_shared_descriptions[] = IFM_SUBTYPE_SHARED_DESCRIPTIONS; -struct ifmedia_description ifm_shared_option_descriptions[] = +static const struct ifmedia_description ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; struct ifmedia_type_to_subtype { - struct ifmedia_description *subtypes; - struct ifmedia_description *options; - struct ifmedia_description *modes; + const struct ifmedia_description *subtypes; + const struct ifmedia_description *options; + const struct ifmedia_description *modes; }; /* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { +static const struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { { &ifm_subtype_ethernet_descriptions[0], &ifm_subtype_ethernet_option_descriptions[0], @@ -454,8 +457,8 @@ static void ifmedia_printword(ifmw) int ifmw; { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; int seen_option = 0; /* Find the top-level interface type. */ From owner-svn-src-all@freebsd.org Tue Feb 11 18:03:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CECCC23DE35; Tue, 11 Feb 2020 18:03:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H9cx54qWz4PvQ; Tue, 11 Feb 2020 18:03:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9D76C14B; Tue, 11 Feb 2020 18:03:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BI3jMZ066274; Tue, 11 Feb 2020 18:03:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BI3jAC066271; Tue, 11 Feb 2020 18:03:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002111803.01BI3jAC066271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Feb 2020 18:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357765 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 357765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:03:45 -0000 Author: kib Date: Tue Feb 11 18:03:45 2020 New Revision: 357765 URL: https://svnweb.freebsd.org/changeset/base/357765 Log: if_media.h: Add 50G KR4 ethernet media type. Submitted by: Adam Peace Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D23620 Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_media.h Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Tue Feb 11 17:45:01 2020 (r357764) +++ head/sys/net/ieee8023ad_lacp.c Tue Feb 11 18:03:45 2020 (r357765) @@ -1194,6 +1194,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_50G_PCIE: case IFM_50G_CR2: case IFM_50G_KR2: + case IFM_50G_KR4: case IFM_50G_SR2: case IFM_50G_LR2: case IFM_50G_LAUI2_AC: Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Tue Feb 11 17:45:01 2020 (r357764) +++ head/sys/net/if_media.h Tue Feb 11 18:03:45 2020 (r357765) @@ -258,6 +258,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_400G_DR4 IFM_X(115) /* 400GBase-DR4 */ #define IFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active copper/optical */ #define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ +#define IFM_50G_KR4 IFM_X(118) /* 50GBase-KR4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -484,6 +485,7 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_50G_KR4, "50GBase-KR4" }, \ { IFM_25G_LR, "25GBase-LR" }, \ { IFM_10G_AOC, "10GBase-AOC" }, \ { IFM_25G_ACC, "25GBase-ACC" }, \ @@ -827,6 +829,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_50G_KR4, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ From owner-svn-src-all@freebsd.org Tue Feb 11 18:13:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E71423E30E; Tue, 11 Feb 2020 18:13:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H9rf3G7sz4Qj1; Tue, 11 Feb 2020 18:13:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B3B1C367; Tue, 11 Feb 2020 18:13:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BIDsp6072297; Tue, 11 Feb 2020 18:13:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIDsgZ072296; Tue, 11 Feb 2020 18:13:54 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002111813.01BIDsgZ072296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Feb 2020 18:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357766 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:13:54 -0000 Author: mjg Date: Tue Feb 11 18:13:53 2020 New Revision: 357766 URL: https://svnweb.freebsd.org/changeset/base/357766 Log: capsicum: restore the cap_rights_contains symbol It is expected to be provided by libc. PR: 244033 Reported by: Jan Kokemueller Modified: head/sys/kern/subr_capability.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Tue Feb 11 18:03:45 2020 (r357765) +++ head/sys/kern/subr_capability.c Tue Feb 11 18:13:53 2020 (r357766) @@ -394,3 +394,27 @@ cap_rights_remove(cap_rights_t *dst, const cap_rights_ return (dst); } + +#ifndef _KERNEL +bool +cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little) +{ + unsigned int i, n; + + assert(CAPVER(big) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(little) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(big) == CAPVER(little)); + + n = CAPARSIZE(big); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); + + for (i = 0; i < n; i++) { + if ((big->cr_rights[i] & little->cr_rights[i]) != + little->cr_rights[i]) { + return (false); + } + } + + return (true); +} +#endif Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Tue Feb 11 18:03:45 2020 (r357765) +++ head/sys/sys/capsicum.h Tue Feb 11 18:13:53 2020 (r357766) @@ -344,7 +344,7 @@ cap_rights_t *cap_rights_merge(cap_rights_t *dst, cons cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); void __cap_rights_sysinit(void *arg); - +#ifdef _KERNEL /* * We only support one size to reduce branching. */ @@ -390,6 +390,9 @@ cap_check_inline_transient(const cap_rights_t *havep, return (1); return (0); } +#else +bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); +#endif __END_DECLS struct cap_rights_init_args { From owner-svn-src-all@freebsd.org Tue Feb 11 18:15:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CAB623E4DE; Tue, 11 Feb 2020 18:15:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H9tM6v7gz4Qwy; Tue, 11 Feb 2020 18:15:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7EA1C36F; Tue, 11 Feb 2020 18:15:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BIFNfB072441; Tue, 11 Feb 2020 18:15:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIFNQF072440; Tue, 11 Feb 2020 18:15:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002111815.01BIFNQF072440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Feb 2020 18:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357767 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 357767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:15:24 -0000 Author: mjg Date: Tue Feb 11 18:15:23 2020 New Revision: 357767 URL: https://svnweb.freebsd.org/changeset/base/357767 Log: amd64: remove redundant sa->code assignment from cpu_fetch_syscall_args_fallback It is already set in the only caller. Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Tue Feb 11 18:13:53 2020 (r357766) +++ head/sys/amd64/amd64/trap.c Tue Feb 11 18:15:23 2020 (r357767) @@ -993,8 +993,6 @@ cpu_fetch_syscall_args_fallback(struct thread *td, str reg = 0; regcnt = NARGREGS; - sa->code = frame->tf_rax; - if (sa->code == SYS_syscall || sa->code == SYS___syscall) { sa->code = frame->tf_rdi; reg++; From owner-svn-src-all@freebsd.org Tue Feb 11 18:15:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E876623E550; Tue, 11 Feb 2020 18:15: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) server-signature RSA-PSS (4096 bits) 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 48H9v15qvnz4R4v; Tue, 11 Feb 2020 18:15: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 C31D1C370; Tue, 11 Feb 2020 18:15: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 01BIFvCg072507; Tue, 11 Feb 2020 18:15:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIFvh1072506; Tue, 11 Feb 2020 18:15:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002111815.01BIFvh1072506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 11 Feb 2020 18:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357768 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:15:58 -0000 Author: tuexen Date: Tue Feb 11 18:15:57 2020 New Revision: 357768 URL: https://svnweb.freebsd.org/changeset/base/357768 Log: Don't start an SCTP timer using a net, which has been removed. Submitted by: Taylor Brandstetter MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Feb 11 18:15:23 2020 (r357767) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 18:15:57 2020 (r357768) @@ -4480,6 +4480,7 @@ out: SCTP_FROM_SCTP_PCB + SCTP_LOC_9); sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_PCB + SCTP_LOC_10); + net->dest_state |= SCTP_ADDR_BEING_DELETED; sctp_free_remote_addr(net); } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Feb 11 18:15:23 2020 (r357767) +++ head/sys/netinet/sctputil.c Tue Feb 11 18:15:57 2020 (r357768) @@ -2050,6 +2050,10 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if (stcb) { SCTP_TCB_LOCK_ASSERT(stcb); } + /* Don't restart timer on net that's been removed. */ + if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { + return; + } switch (t_type) { case SCTP_TIMER_TYPE_ADDR_WQ: /* Only 1 tick away :-) */ From owner-svn-src-all@freebsd.org Tue Feb 11 18:16:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FD6523E5DE; Tue, 11 Feb 2020 18:16:30 +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) server-signature RSA-PSS (4096 bits) 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 48H9vf3q32z4RCg; Tue, 11 Feb 2020 18:16:30 +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 7DF0EC371; Tue, 11 Feb 2020 18:16:30 +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 01BIGUOB072576; Tue, 11 Feb 2020 18:16:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIGUCm072575; Tue, 11 Feb 2020 18:16:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002111816.01BIGUCm072575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 11 Feb 2020 18:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357769 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 357769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:16:30 -0000 Author: hselasky Date: Tue Feb 11 18:16:29 2020 New Revision: 357769 URL: https://svnweb.freebsd.org/changeset/base/357769 Log: Add missing EPOCH(9) wrapper in ipfw(8). Backtrace: panic() ip_output() dyn_tick() softclock_call_cc() softclock() ithread_loop() Differential Revision: https://reviews.freebsd.org/D23599 Reviewed by: glebius@ and ae@ Found by: mmacy@ Reported by: jmd@ Sponsored by: Mellanox Technologies Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Feb 11 18:15:57 2020 (r357768) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Feb 11 18:16:29 2020 (r357769) @@ -2718,6 +2718,7 @@ dyn_grow_hashtable(struct ip_fw_chain *chain, uint32_t static void dyn_tick(void *vnetx) { + struct epoch_tracker et; uint32_t buckets; CURVNET_SET((struct vnet *)vnetx); @@ -2740,10 +2741,12 @@ dyn_tick(void *vnetx) if (V_dyn_keepalive != 0 && V_dyn_keepalive_last + V_dyn_keepalive_period <= time_uptime) { V_dyn_keepalive_last = time_uptime; + NET_EPOCH_ENTER(et); dyn_send_keepalive_ipv4(&V_layer3_chain); #ifdef INET6 dyn_send_keepalive_ipv6(&V_layer3_chain); #endif + NET_EPOCH_EXIT(et); } /* * Check if we need to resize the hash: From owner-svn-src-all@freebsd.org Tue Feb 11 18:18:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 243C323E69C; Tue, 11 Feb 2020 18:18:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48H9yS6wtlz4RMG; Tue, 11 Feb 2020 18:18:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f65.google.com with SMTP id 77so11067151oty.6; Tue, 11 Feb 2020 10:18:56 -0800 (PST) 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:reply-to :from:date:message-id:subject:to:cc; bh=VcqLhY+MQuQRiyO7d+oAQBFakxrXgeO2gti0+CEXS2Q=; b=p3KiMFGQ7kh7tIs6HsuCN8MApFrCXolSKrdPYCrFbVLD+s6wpYwBIKYblKzoOt0zCz HkhvWyJOLMBTGslKPNrkesoqeVdIHUPlw9N/L9A5AvDMVkSBbAISs5Afxj5bq7w9Z3Xa apKee2iEch/wvvlVbcRPY9d7aHFkzZA8A7oqgGPP828GXG1lXTuURYh7wEcb+W2cuMCY 8mTd7iFR+cMvq0BL5OpL/ZVP2kOK0RgRPU0X5qdKfMu8bhnR2+zUiWifJ2xHYuNFeyvw LsS+X4JrbkcVPKgEm4dBm4VLd/wBNL4Pf91LYbPB9mR2QDq168meUoMbkHEQFY1+g/om 9k0w== X-Gm-Message-State: APjAAAV2i9K7wCv1CZiMDxiGxftLGOjcuu0uwQ6VjzXOM2Q2NdZKAM21 nFy3Np+mpe5IPzUwmxj0UNZqznKt X-Google-Smtp-Source: APXvYqzD9eKiR7gu1dD3hcUpd9iNQ05I6VhrduqEEBHpNb+UTt9svGiYEoavLC05VlvLBYXCWGY/4g== X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr5909982otq.1.1581445135283; Tue, 11 Feb 2020 10:18:55 -0800 (PST) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com. [209.85.210.47]) by smtp.gmail.com with ESMTPSA id g5sm1443428otp.10.2020.02.11.10.18.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2020 10:18:55 -0800 (PST) Received: by mail-ot1-f47.google.com with SMTP id 77so11067106oty.6; Tue, 11 Feb 2020 10:18:54 -0800 (PST) X-Received: by 2002:a9d:7f8d:: with SMTP id t13mr5842579otp.175.1581445134621; Tue, 11 Feb 2020 10:18:54 -0800 (PST) MIME-Version: 1.0 References: <202002111400.01BE0R3I009898@repo.freebsd.org> In-Reply-To: <202002111400.01BE0R3I009898@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 11 Feb 2020 10:18:43 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r357761 - head/sys/netinet To: Michael Tuexen Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48H9yS6wtlz4RMG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:18:57 -0000 Hi Michael, On Tue, Feb 11, 2020 at 6:00 AM Michael Tuexen wrote: > > Author: tuexen > Date: Tue Feb 11 14:00:27 2020 > New Revision: 357761 > URL: https://svnweb.freebsd.org/changeset/base/357761 > > Log: > Use an int instead of a bool variable, since bool is not supported > on all platforms the stack is running on in userland. Maybe the platforms stuck in time before 1999 can be worked around with something trivial like: #if __STDC_VERSION__ < 199901L # warn Really really consider getting a new compiler typedef unsigned char _Bool; # define bool _Bool # define true ((_Bool)1) # define false ((_Bool)0) #endif Rather than inflicting the 80s on FreeBSD tree code? This commit seems like a step in the wrong direction and just for example, contravenes style(9). SCTP is already one of the buggiest areas of the kernel, and it can't be touched by outsiders for fear of breaking compatibility with the purported myriad other platforms it is also ported to. By transitive property, it also prevents modifying _any_ APIs SCTP consumes that happen to be implemented on other platforms. This hamstrings the kernel for what is obviously not functional code (throw a dart at a syzkaller report and better than 90% odds it's a SCTP panic), much less code a reasonable person would want to use in a security-sensitive context. If SCTP is intended to be a port from some legacy platform, perhaps it should live in ports rather than base? Thanks, Conrad From owner-svn-src-all@freebsd.org Tue Feb 11 18:19:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A85BE23E747; Tue, 11 Feb 2020 18:19:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48H9zc3dKCz4RZV; Tue, 11 Feb 2020 18:19:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77E04C37B; Tue, 11 Feb 2020 18:19:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BIJuwh072884; Tue, 11 Feb 2020 18:19:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIJukN072883; Tue, 11 Feb 2020 18:19:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002111819.01BIJukN072883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 11 Feb 2020 18:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357770 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:19:56 -0000 Author: mjg Date: Tue Feb 11 18:19:56 2020 New Revision: 357770 URL: https://svnweb.freebsd.org/changeset/base/357770 Log: vfs: fix vhold race in mnt_vnode_next_lazy_relock vdrop can set the hold count to 0 and wait for the ->mnt_listmtx held by mnt_vnode_next_lazy_relock caller. The routine incorrectly asserted the count has to be > 0. Reported by: pho Tested by: pho Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Feb 11 18:16:29 2020 (r357769) +++ head/sys/kern/vfs_subr.c Tue Feb 11 18:19:56 2020 (r357770) @@ -6264,7 +6264,13 @@ mnt_vnode_next_lazy_relock(struct vnode *mvp, struct m TAILQ_REMOVE(&mp->mnt_lazyvnodelist, mvp, v_lazylist); TAILQ_INSERT_BEFORE(vp, mvp, v_lazylist); - vholdnz(vp); + /* + * Note we may be racing against vdrop which transitioned the hold + * count to 0 and now waits for the ->mnt_listmtx lock. This is fine, + * if we are the only user after we get the interlock we will just + * vdrop. + */ + vhold(vp); mtx_unlock(&mp->mnt_listmtx); VI_LOCK(vp); if (VN_IS_DOOMED(vp)) { @@ -6273,8 +6279,7 @@ mnt_vnode_next_lazy_relock(struct vnode *mvp, struct m } VNPASS(vp->v_mflag & VMP_LAZYLIST, vp); /* - * Since we had a period with no locks held we may be the last - * remaining user, in which case there is nothing to do. + * There is nothing to do if we are the last user. */ if (!refcount_release_if_not_last(&vp->v_holdcnt)) goto out_lost; From owner-svn-src-all@freebsd.org Tue Feb 11 18:48:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81D0423F589; Tue, 11 Feb 2020 18:48:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HBc92v40z4TLs; Tue, 11 Feb 2020 18:48:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E9CDC925; Tue, 11 Feb 2020 18:48:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BIm9f7091064; Tue, 11 Feb 2020 18:48:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIm8TW091058; Tue, 11 Feb 2020 18:48:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002111848.01BIm8TW091058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 11 Feb 2020 18:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357771 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:48:09 -0000 Author: glebius Date: Tue Feb 11 18:48:07 2020 New Revision: 357771 URL: https://svnweb.freebsd.org/changeset/base/357771 Log: Add flag to struct task to mark the task as requiring network epoch. When processing a taskqueue and a task has associated epoch, then enter for duration of the task. If consecutive tasks belong to the same epoch, batch them. Now we are talking about the network epoch only. Shrink the ta_priority size to 8-bits. No current consumers use a priority that won't fit into 8 bits. Also complexity of taskqueue_enqueue() is a square of maximum value of priority, so we unlikely ever want to go over UCHAR_MAX here. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D23518 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/kern/subr_taskqueue.c head/sys/sys/_task.h head/sys/sys/epoch.h head/sys/sys/gtaskqueue.h head/sys/sys/taskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:48:07 2020 (r357771) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -342,13 +343,16 @@ gtaskqueue_unblock(struct gtaskqueue *queue) static void gtaskqueue_run_locked(struct gtaskqueue *queue) { + struct epoch_tracker et; struct gtaskqueue_busy tb; struct gtask *gtask; + bool in_net_epoch; KASSERT(queue != NULL, ("tq is NULL")); TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; LIST_INSERT_HEAD(&queue->tq_active, &tb, tb_link); + in_net_epoch = false; while ((gtask = STAILQ_FIRST(&queue->tq_queue)) != NULL) { STAILQ_REMOVE_HEAD(&queue->tq_queue, ta_link); @@ -358,11 +362,20 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) TQ_UNLOCK(queue); KASSERT(gtask->ta_func != NULL, ("task->ta_func is NULL")); + if (!in_net_epoch && TASK_IS_NET(gtask)) { + in_net_epoch = true; + NET_EPOCH_ENTER(et); + } else if (in_net_epoch && !TASK_IS_NET(gtask)) { + NET_EPOCH_EXIT(et); + in_net_epoch = false; + } gtask->ta_func(gtask->ta_context); TQ_LOCK(queue); wakeup(gtask); } + if (in_net_epoch) + NET_EPOCH_EXIT(et); LIST_REMOVE(&tb, tb_link); } Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/kern/subr_taskqueue.c Tue Feb 11 18:48:07 2020 (r357771) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -371,7 +372,7 @@ taskqueue_drain_tq_queue(struct taskqueue *queue) * anyway) so just insert it at tail while we have the * queue lock. */ - TASK_INIT(&t_barrier, USHRT_MAX, taskqueue_task_nop_fn, &t_barrier); + TASK_INIT(&t_barrier, UCHAR_MAX, taskqueue_task_nop_fn, &t_barrier); STAILQ_INSERT_TAIL(&queue->tq_queue, &t_barrier, ta_link); queue->tq_hint = &t_barrier; t_barrier.ta_pending = 1; @@ -442,14 +443,17 @@ taskqueue_unblock(struct taskqueue *queue) static void taskqueue_run_locked(struct taskqueue *queue) { + struct epoch_tracker et; struct taskqueue_busy tb; struct task *task; + bool in_net_epoch; int pending; KASSERT(queue != NULL, ("tq is NULL")); TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; LIST_INSERT_HEAD(&queue->tq_active, &tb, tb_link); + in_net_epoch = false; while ((task = STAILQ_FIRST(&queue->tq_queue)) != NULL) { STAILQ_REMOVE_HEAD(&queue->tq_queue, ta_link); @@ -462,11 +466,20 @@ taskqueue_run_locked(struct taskqueue *queue) TQ_UNLOCK(queue); KASSERT(task->ta_func != NULL, ("task->ta_func is NULL")); + if (!in_net_epoch && TASK_IS_NET(task)) { + in_net_epoch = true; + NET_EPOCH_ENTER(et); + } else if (in_net_epoch && !TASK_IS_NET(task)) { + NET_EPOCH_EXIT(et); + in_net_epoch = false; + } task->ta_func(task->ta_context, pending); TQ_LOCK(queue); wakeup(task); } + if (in_net_epoch) + NET_EPOCH_EXIT(et); LIST_REMOVE(&tb, tb_link); } Modified: head/sys/sys/_task.h ============================================================================== --- head/sys/sys/_task.h Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/sys/_task.h Tue Feb 11 18:48:07 2020 (r357771) @@ -48,10 +48,17 @@ typedef void task_fn_t(void *context, int pending); struct task { STAILQ_ENTRY(task) ta_link; /* (q) link for queue */ uint16_t ta_pending; /* (q) count times queued */ - u_short ta_priority; /* (c) Priority */ + uint8_t ta_priority; /* (c) Priority */ + uint8_t ta_flags; /* (c) Flags */ task_fn_t *ta_func; /* (c) task handler */ void *ta_context; /* (c) argument for handler */ }; + +#define TASK_ENQUEUED 0x1 +#define TASK_NOENQUEUE 0x2 +#define TASK_NETWORK 0x4 + +#define TASK_IS_NET(ta) ((ta)->ta_flags & TASK_NETWORK) #ifdef _KERNEL Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/sys/epoch.h Tue Feb 11 18:48:07 2020 (r357771) @@ -104,6 +104,9 @@ extern epoch_t net_epoch_preempt; #define NET_EPOCH_WAIT() epoch_wait_preempt(net_epoch_preempt) #define NET_EPOCH_CALL(f, c) epoch_call(net_epoch_preempt, (f), (c)) #define NET_EPOCH_ASSERT() MPASS(in_epoch(net_epoch_preempt)) +#define NET_TASK_INIT(t, p, f, c) TASK_INIT_FLAGS(t, p, f, c, TASK_NETWORK) +#define NET_GROUPTASK_INIT(gtask, prio, func, ctx) \ + GTASK_INIT(&(gtask)->gt_task, TASK_NETWORK, (prio), (func), (ctx)) #endif /* _KERNEL */ #endif /* _SYS_EPOCH_H_ */ Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/sys/gtaskqueue.h Tue Feb 11 18:48:07 2020 (r357771) @@ -84,10 +84,6 @@ void taskqgroup_config_gtask_init(void *ctx, struct gr gtask_fn_t *fn, const char *name); void taskqgroup_config_gtask_deinit(struct grouptask *gtask); -#define TASK_ENQUEUED 0x1 -#define TASK_SKIP_WAKEUP 0x2 -#define TASK_NOENQUEUE 0x4 - #define GTASK_INIT(gtask, flags, priority, func, context) do { \ (gtask)->ta_flags = flags; \ (gtask)->ta_priority = (priority); \ @@ -96,7 +92,7 @@ void taskqgroup_config_gtask_deinit(struct grouptask * } while (0) #define GROUPTASK_INIT(gtask, priority, func, context) \ - GTASK_INIT(&(gtask)->gt_task, TASK_SKIP_WAKEUP, priority, func, context) + GTASK_INIT(&(gtask)->gt_task, 0, priority, func, context) #define GROUPTASK_ENQUEUE(gtask) \ grouptaskqueue_enqueue((gtask)->gt_taskqueue, &(gtask)->gt_task) Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/sys/taskqueue.h Tue Feb 11 18:48:07 2020 (r357771) @@ -107,8 +107,7 @@ void taskqueue_set_callback(struct taskqueue *queue, taskqueue_callback_fn callback, void *context); #define TASK_INITIALIZER(priority, func, context) \ - { .ta_pending = 0, \ - .ta_priority = (priority), \ + { .ta_priority = (priority), \ .ta_func = (func), \ .ta_context = (context) } @@ -121,18 +120,25 @@ void taskqueue_thread_enqueue(void *context); /* * Initialise a task structure. */ -#define TASK_INIT(task, priority, func, context) do { \ - (task)->ta_pending = 0; \ - (task)->ta_priority = (priority); \ - (task)->ta_func = (func); \ - (task)->ta_context = (context); \ +#define TASK_INIT_FLAGS(task, priority, func, context, flags) do { \ + MPASS((priority) >= 0 && (priority) <= 255); \ + (task)->ta_pending = 0; \ + (task)->ta_priority = (priority); \ + (task)->ta_flags = (flags); \ + (task)->ta_func = (func); \ + (task)->ta_context = (context); \ } while (0) +#define TASK_INIT(t, p, f, c) TASK_INIT_FLAGS(t, p, f, c, 0) + void _timeout_task_init(struct taskqueue *queue, struct timeout_task *timeout_task, int priority, task_fn_t func, void *context); -#define TIMEOUT_TASK_INIT(queue, timeout_task, priority, func, context) \ - _timeout_task_init(queue, timeout_task, priority, func, context); +#define TIMEOUT_TASK_INIT(queue, timeout_task, priority, func, context) do { \ + _Static_assert((priority) >= 0 && (priority) <= 255, \ + "struct task priority is 8 bit in size"); \ + _timeout_task_init(queue, timeout_task, priority, func, context); \ +} while (0) /* * Declare a reference to a taskqueue. From owner-svn-src-all@freebsd.org Tue Feb 11 18:57:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B34423F832; Tue, 11 Feb 2020 18:57:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HBpd07czz4TwC; Tue, 11 Feb 2020 18:57:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6E7ECB3C; Tue, 11 Feb 2020 18:57:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BIvCdd096951; Tue, 11 Feb 2020 18:57:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BIv7mn096926; Tue, 11 Feb 2020 18:57:07 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002111857.01BIv7mn096926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 11 Feb 2020 18:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357772 - in head/sys: dev/al_eth dev/alc dev/ale dev/ath dev/bge dev/bwn dev/bxe dev/cas dev/ena dev/malo dev/mwl dev/netmap dev/nfe dev/qlxgbe dev/re dev/rt dev/smc dev/virtio/network... X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: dev/al_eth dev/alc dev/ale dev/ath dev/bge dev/bwn dev/bxe dev/cas dev/ena dev/malo dev/mwl dev/netmap dev/nfe dev/qlxgbe dev/re dev/rt dev/smc dev/virtio/network dev/vnic dev/vr dev/wtap... X-SVN-Commit-Revision: 357772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 18:57:13 -0000 Author: glebius Date: Tue Feb 11 18:57:07 2020 New Revision: 357772 URL: https://svnweb.freebsd.org/changeset/base/357772 Log: Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process incoming packets in taskqueue context. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D23518 Modified: head/sys/dev/al_eth/al_eth.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/bge/if_bge.c head/sys/dev/bwn/if_bwn.c head/sys/dev/bxe/bxe.c head/sys/dev/cas/if_cas.c head/sys/dev/ena/ena.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/dev/netmap/if_ptnet.c head/sys/dev/nfe/if_nfe.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/re/if_re.c head/sys/dev/rt/if_rt.c head/sys/dev/smc/if_smc.c head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/vnic/nicvf_queues.c head/sys/dev/vr/if_vr.c head/sys/dev/wtap/if_wtap.c head/sys/dev/xl/if_xl.c head/sys/net/iflib.c Modified: head/sys/dev/al_eth/al_eth.c ============================================================================== --- head/sys/dev/al_eth/al_eth.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/al_eth/al_eth.c Tue Feb 11 18:57:07 2020 (r357772) @@ -2512,7 +2512,7 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapt return (ENOMEM); /* Allocate taskqueues */ - TASK_INIT(&rx_ring->enqueue_task, 0, al_eth_rx_recv_work, rx_ring); + NET_TASK_INIT(&rx_ring->enqueue_task, 0, al_eth_rx_recv_work, rx_ring); rx_ring->enqueue_tq = taskqueue_create_fast("al_rx_enque", M_NOWAIT, taskqueue_thread_enqueue, &rx_ring->enqueue_tq); taskqueue_start_threads(&rx_ring->enqueue_tq, 1, PI_NET, "%s rxeq", Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/alc/if_alc.c Tue Feb 11 18:57:07 2020 (r357772) @@ -1387,7 +1387,7 @@ alc_attach(device_t dev) mtx_init(&sc->alc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->alc_tick_ch, &sc->alc_mtx, 0); - TASK_INIT(&sc->alc_int_task, 0, alc_int_task, sc); + NET_TASK_INIT(&sc->alc_int_task, 0, alc_int_task, sc); sc->alc_ident = alc_find_ident(dev); /* Map the device. */ Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/ale/if_ale.c Tue Feb 11 18:57:07 2020 (r357772) @@ -467,7 +467,7 @@ ale_attach(device_t dev) mtx_init(&sc->ale_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->ale_tick_ch, &sc->ale_mtx, 0); - TASK_INIT(&sc->ale_int_task, 0, ale_int_task, sc); + NET_TASK_INIT(&sc->ale_int_task, 0, ale_int_task, sc); /* Map the device. */ pci_enable_busmaster(dev); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/ath/if_ath.c Tue Feb 11 18:57:07 2020 (r357772) @@ -760,7 +760,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); - TASK_INIT(&sc->sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); + NET_TASK_INIT(&sc->sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); TASK_INIT(&sc->sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(&sc->sc_bstucktask,0, ath_bstuck_proc, sc); TASK_INIT(&sc->sc_resettask,0, ath_reset_proc, sc); Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/ath/if_ath_rx.c Tue Feb 11 18:57:07 2020 (r357772) @@ -647,7 +647,6 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, struct mbuf *m) { - struct epoch_tracker et; uint64_t rstamp; /* XXX TODO: make this an mbuf tag? */ struct ieee80211_rx_stats rxs; @@ -942,7 +941,6 @@ rx_accept: rxs.c_nf_ext[i] = nf; } - NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Only punt packets for ampdu reorder processing for @@ -988,7 +986,6 @@ rx_accept: type = ieee80211_input_mimo_all(ic, m); m = NULL; } - NET_EPOCH_EXIT(et); /* * At this point we have passed the frame up the stack; thus Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/bge/if_bge.c Tue Feb 11 18:57:07 2020 (r357772) @@ -3306,7 +3306,7 @@ bge_attach(device_t dev) sc->bge_dev = dev; BGE_LOCK_INIT(sc, device_get_nameunit(dev)); - TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); + NET_TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); pci_enable_busmaster(dev); @@ -4601,7 +4601,6 @@ bge_msi_intr(void *arg) static void bge_intr_task(void *arg, int pending) { - struct epoch_tracker et; struct bge_softc *sc; if_t ifp; uint32_t status, status_tag; @@ -4644,9 +4643,7 @@ bge_intr_task(void *arg, int pending) sc->bge_rx_saved_considx != rx_prod) { /* Check RX return ring producer/consumer. */ BGE_UNLOCK(sc); - NET_EPOCH_ENTER(et); bge_rxeof(sc, rx_prod, 0); - NET_EPOCH_EXIT(et); BGE_LOCK(sc); } if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/bwn/if_bwn.c Tue Feb 11 18:57:07 2020 (r357772) @@ -621,7 +621,7 @@ bwn_attach(device_t dev) mac->mac_flags |= BWN_MAC_FLAG_BADFRAME_PREEMP; TASK_INIT(&mac->mac_hwreset, 0, bwn_hwreset, mac); - TASK_INIT(&mac->mac_intrtask, 0, bwn_intrtask, mac); + NET_TASK_INIT(&mac->mac_intrtask, 0, bwn_intrtask, mac); TASK_INIT(&mac->mac_txpower, 0, bwn_txpwr, mac); error = bwn_attach_core(mac); Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/bxe/bxe.c Tue Feb 11 18:57:07 2020 (r357772) @@ -9241,7 +9241,7 @@ bxe_interrupt_attach(struct bxe_softc *sc) fp = &sc->fp[i]; snprintf(fp->tq_name, sizeof(fp->tq_name), "bxe%d_fp%d_tq", sc->unit, i); - TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp); + NET_TASK_INIT(&fp->tq_task, 0, bxe_handle_fp_tq, fp); TASK_INIT(&fp->tx_task, 0, bxe_tx_mq_start_deferred, fp); fp->tq = taskqueue_create(fp->tq_name, M_NOWAIT, taskqueue_thread_enqueue, Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/cas/if_cas.c Tue Feb 11 18:57:07 2020 (r357772) @@ -208,7 +208,7 @@ cas_attach(struct cas_softc *sc) callout_init_mtx(&sc->sc_tick_ch, &sc->sc_mtx, 0); callout_init_mtx(&sc->sc_rx_ch, &sc->sc_mtx, 0); /* Create local taskq. */ - TASK_INIT(&sc->sc_intr_task, 0, cas_intr_task, sc); + NET_TASK_INIT(&sc->sc_intr_task, 0, cas_intr_task, sc); TASK_INIT(&sc->sc_tx_task, 1, cas_tx_task, ifp); sc->sc_tq = taskqueue_create_fast("cas_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->sc_tq); @@ -1608,11 +1608,14 @@ cas_tint(struct cas_softc *sc) static void cas_rint_timeout(void *arg) { + struct epoch_tracker et; struct cas_softc *sc = arg; CAS_LOCK_ASSERT(sc, MA_OWNED); + NET_EPOCH_ENTER(et); cas_rint(sc); + NET_EPOCH_EXIT(et); } static void Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/ena/ena.c Tue Feb 11 18:57:07 2020 (r357772) @@ -1353,7 +1353,7 @@ ena_create_io_queues(struct ena_adapter *adapter) for (i = 0; i < adapter->num_queues; i++) { queue = &adapter->que[i]; - TASK_INIT(&queue->cleanup_task, 0, ena_cleanup, queue); + NET_TASK_INIT(&queue->cleanup_task, 0, ena_cleanup, queue); queue->cleanup_tq = taskqueue_create_fast("ena cleanup", M_WAITOK, taskqueue_thread_enqueue, &queue->cleanup_tq); Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/malo/if_malo.c Tue Feb 11 18:57:07 2020 (r357772) @@ -253,7 +253,7 @@ malo_attach(uint16_t devid, struct malo_softc *sc) taskqueue_start_threads(&sc->malo_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->malo_dev)); - TASK_INIT(&sc->malo_rxtask, 0, malo_rx_proc, sc); + NET_TASK_INIT(&sc->malo_rxtask, 0, malo_rx_proc, sc); TASK_INIT(&sc->malo_txtask, 0, malo_tx_proc, sc); ic->ic_softc = sc; Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/mwl/if_mwl.c Tue Feb 11 18:57:07 2020 (r357772) @@ -360,7 +360,7 @@ mwl_attach(uint16_t devid, struct mwl_softc *sc) taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); - TASK_INIT(&sc->sc_rxtask, 0, mwl_rx_proc, sc); + NET_TASK_INIT(&sc->sc_rxtask, 0, mwl_rx_proc, sc); TASK_INIT(&sc->sc_radartask, 0, mwl_radar_proc, sc); TASK_INIT(&sc->sc_chanswitchtask, 0, mwl_chanswitch_proc, sc); TASK_INIT(&sc->sc_bawatchdogtask, 0, mwl_bawatchdog_proc, sc); Modified: head/sys/dev/netmap/if_ptnet.c ============================================================================== --- head/sys/dev/netmap/if_ptnet.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/netmap/if_ptnet.c Tue Feb 11 18:57:07 2020 (r357772) @@ -695,11 +695,12 @@ ptnet_irqs_init(struct ptnet_softc *sc) cpu_cur = CPU_FIRST(); for (i = 0; i < nvecs; i++) { struct ptnet_queue *pq = sc->queues + i; - static void (*handler)(void *context, int pending); - handler = (i < sc->num_tx_rings) ? ptnet_tx_task : ptnet_rx_task; + if (i < sc->num_tx_rings) + TASK_INIT(&pq->task, 0, ptnet_tx_task, pq); + else + NET_TASK_INIT(&pq->task, 0, ptnet_rx_task, pq); - TASK_INIT(&pq->task, 0, handler, pq); pq->taskq = taskqueue_create_fast("ptnet_queue", M_NOWAIT, taskqueue_thread_enqueue, &pq->taskq); taskqueue_start_threads(&pq->taskq, 1, PI_NET, "%s-pq-%d", Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/nfe/if_nfe.c Tue Feb 11 18:57:07 2020 (r357772) @@ -654,7 +654,7 @@ nfe_attach(device_t dev) } ether_ifattach(ifp, sc->eaddr); - TASK_INIT(&sc->nfe_int_task, 0, nfe_int_task, sc); + NET_TASK_INIT(&sc->nfe_int_task, 0, nfe_int_task, sc); sc->nfe_tq = taskqueue_create_fast("nfe_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->nfe_tq); taskqueue_start_threads(&sc->nfe_tq, 1, PI_NET, "%s taskq", Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/qlxgbe/ql_os.c Tue Feb 11 18:57:07 2020 (r357772) @@ -1543,7 +1543,7 @@ qla_create_fp_taskqueues(qla_host_t *ha) bzero(tq_name, sizeof (tq_name)); snprintf(tq_name, sizeof (tq_name), "ql_fp_tq_%d", i); - TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); + NET_TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT, taskqueue_thread_enqueue, Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/re/if_re.c Tue Feb 11 18:57:07 2020 (r357772) @@ -1656,7 +1656,7 @@ re_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = RL_IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc); + NET_TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc); #define RE_PHYAD_INTERNAL 0 @@ -2576,7 +2576,6 @@ re_intr(void *arg) static void re_int_task(void *arg, int npending) { - struct epoch_tracker et; struct rl_softc *sc; struct ifnet *ifp; u_int16_t status; @@ -2603,11 +2602,8 @@ re_int_task(void *arg, int npending) } #endif - if (status & (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_FIFO_OFLOW)) { - NET_EPOCH_ENTER(et); + if (status & (RL_ISR_RX_OK|RL_ISR_RX_ERR|RL_ISR_FIFO_OFLOW)) rval = re_rxeof(sc, NULL); - NET_EPOCH_EXIT(et); - } /* * Some chips will ignore a second TX request issued Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/rt/if_rt.c Tue Feb 11 18:57:07 2020 (r357772) @@ -552,7 +552,7 @@ rt_attach(device_t dev) ifp->if_capenable |= IFCAP_RXCSUM|IFCAP_TXCSUM; /* init task queue */ - TASK_INIT(&sc->rx_done_task, 0, rt_rx_done_task, sc); + NET_TASK_INIT(&sc->rx_done_task, 0, rt_rx_done_task, sc); TASK_INIT(&sc->tx_done_task, 0, rt_tx_done_task, sc); TASK_INIT(&sc->periodic_task, 0, rt_periodic_task, sc); Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/smc/if_smc.c Tue Feb 11 18:57:07 2020 (r357772) @@ -395,7 +395,7 @@ smc_attach(device_t dev) /* Set up taskqueue */ TASK_INIT(&sc->smc_intr, SMC_INTR_PRIORITY, smc_task_intr, ifp); - TASK_INIT(&sc->smc_rx, SMC_RX_PRIORITY, smc_task_rx, ifp); + NET_TASK_INIT(&sc->smc_rx, SMC_RX_PRIORITY, smc_task_rx, ifp); TASK_INIT(&sc->smc_tx, SMC_TX_PRIORITY, smc_task_tx, ifp); sc->smc_tq = taskqueue_create_fast("smc_taskq", M_NOWAIT, taskqueue_thread_enqueue, &sc->smc_tq); Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/virtio/network/if_vtnet.c Tue Feb 11 18:57:07 2020 (r357772) @@ -717,7 +717,7 @@ vtnet_init_rxq(struct vtnet_softc *sc, int id) if (rxq->vtnrx_sg == NULL) return (ENOMEM); - TASK_INIT(&rxq->vtnrx_intrtask, 0, vtnet_rxq_tq_intr, rxq); + NET_TASK_INIT(&rxq->vtnrx_intrtask, 0, vtnet_rxq_tq_intr, rxq); rxq->vtnrx_tq = taskqueue_create(rxq->vtnrx_name, M_NOWAIT, taskqueue_thread_enqueue, &rxq->vtnrx_tq); Modified: head/sys/dev/vnic/nicvf_queues.c ============================================================================== --- head/sys/dev/vnic/nicvf_queues.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/vnic/nicvf_queues.c Tue Feb 11 18:57:07 2020 (r357772) @@ -931,7 +931,7 @@ nicvf_init_cmp_queue(struct nicvf *nic, struct cmp_que &cq->mtx); /* Allocate taskqueue */ - TASK_INIT(&cq->cmp_task, 0, nicvf_cmp_task, cq); + NET_TASK_INIT(&cq->cmp_task, 0, nicvf_cmp_task, cq); cq->cmp_taskq = taskqueue_create_fast("nicvf_cmp_taskq", M_WAITOK, taskqueue_thread_enqueue, &cq->cmp_taskq); taskqueue_start_threads(&cq->cmp_taskq, 1, PI_NET, "%s: cmp_taskq(%d)", @@ -1577,7 +1577,7 @@ nicvf_alloc_resources(struct nicvf *nic) } /* Allocate QS error taskqueue */ - TASK_INIT(&qs->qs_err_task, 0, nicvf_qs_err_task, nic); + NET_TASK_INIT(&qs->qs_err_task, 0, nicvf_qs_err_task, nic); qs->qs_err_taskq = taskqueue_create_fast("nicvf_qs_err_taskq", M_WAITOK, taskqueue_thread_enqueue, &qs->qs_err_taskq); taskqueue_start_threads(&qs->qs_err_taskq, 1, PI_NET, "%s: qs_taskq", Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/vr/if_vr.c Tue Feb 11 18:57:07 2020 (r357772) @@ -676,7 +676,7 @@ vr_attach(device_t dev) ifp->if_snd.ifq_maxlen = VR_TX_RING_CNT - 1; IFQ_SET_READY(&ifp->if_snd); - TASK_INIT(&sc->vr_inttask, 0, vr_int_task, sc); + NET_TASK_INIT(&sc->vr_inttask, 0, vr_int_task, sc); /* Configure Tx FIFO threshold. */ sc->vr_txthresh = VR_TXTHRESH_MIN; Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/wtap/if_wtap.c Tue Feb 11 18:57:07 2020 (r357772) @@ -637,7 +637,7 @@ wtap_attach(struct wtap_softc *sc, const uint8_t *maca sc->sc_tq = taskqueue_create("wtap_taskq", M_NOWAIT | M_ZERO, taskqueue_thread_enqueue, &sc->sc_tq); taskqueue_start_threads(&sc->sc_tq, 1, PI_SOFT, "%s taskQ", sc->name); - TASK_INIT(&sc->sc_rxtask, 0, wtap_rx_proc, sc); + NET_TASK_INIT(&sc->sc_rxtask, 0, wtap_rx_proc, sc); ic->ic_softc = sc; ic->ic_name = sc->name; Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/xl/if_xl.c Tue Feb 11 18:57:07 2020 (r357772) @@ -1218,7 +1218,7 @@ xl_attach(device_t dev) } callout_init_mtx(&sc->xl_tick_callout, &sc->xl_mtx, 0); - TASK_INIT(&sc->xl_task, 0, xl_rxeof_task, sc); + NET_TASK_INIT(&sc->xl_task, 0, xl_rxeof_task, sc); /* * Now allocate a tag for the DMA descriptor lists and a chunk Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Feb 11 18:48:07 2020 (r357771) +++ head/sys/net/iflib.c Tue Feb 11 18:57:07 2020 (r357772) @@ -3781,7 +3781,6 @@ _task_fn_tx(void *context) static void _task_fn_rx(void *context) { - struct epoch_tracker et; iflib_rxq_t rxq = context; if_ctx_t ctx = rxq->ifr_ctx; bool more; @@ -3805,7 +3804,6 @@ _task_fn_rx(void *context) budget = ctx->ifc_sysctl_rx_budget; if (budget == 0) budget = 16; /* XXX */ - NET_EPOCH_ENTER(et); if (more == false || (more = iflib_rxeof(rxq, budget)) == false) { if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); @@ -3813,7 +3811,6 @@ _task_fn_rx(void *context) IFDI_RX_QUEUE_INTR_ENABLE(ctx, rxq->ifr_id); DBG_COUNTER_INC(rx_intr_enables); } - NET_EPOCH_EXIT(et); if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; if (more) @@ -5971,7 +5968,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, in tqg = qgroup_if_io_tqg; fn = _task_fn_rx; intr_fast = iflib_fast_intr; - GROUPTASK_INIT(gtask, 0, fn, q); + NET_GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_RXTX: q = &ctx->ifc_rxqs[qid]; @@ -5980,7 +5977,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, in tqg = qgroup_if_io_tqg; fn = _task_fn_rx; intr_fast = iflib_fast_intr_rxtx; - GROUPTASK_INIT(gtask, 0, fn, q); + NET_GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_ADMIN: q = ctx; From owner-svn-src-all@freebsd.org Tue Feb 11 19:13:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB5ED240192; Tue, 11 Feb 2020 19:13:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HC9V44x8z4WFD; Tue, 11 Feb 2020 19:13:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 878BCCF0C; Tue, 11 Feb 2020 19:13:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BJDYiS009244; Tue, 11 Feb 2020 19:13:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BJDY3w009243; Tue, 11 Feb 2020 19:13:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002111913.01BJDY3w009243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 11 Feb 2020 19:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357773 - head/sys/dev/liquidio/base X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/dev/liquidio/base X-SVN-Commit-Revision: 357773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 19:13:34 -0000 Author: glebius Date: Tue Feb 11 19:13:34 2020 New Revision: 357773 URL: https://svnweb.freebsd.org/changeset/base/357773 Log: Mark lio taskqueue as requiring network epoch. Modified: head/sys/dev/liquidio/base/lio_droq.c Modified: head/sys/dev/liquidio/base/lio_droq.c ============================================================================== --- head/sys/dev/liquidio/base/lio_droq.c Tue Feb 11 18:57:07 2020 (r357772) +++ head/sys/dev/liquidio/base/lio_droq.c Tue Feb 11 19:13:34 2020 (r357773) @@ -329,7 +329,7 @@ lio_init_droq(struct octeon_device *oct, uint32_t q_no * output queue packet processing. */ lio_dev_dbg(oct, "Initializing droq%d taskqueue\n", q_no); - TASK_INIT(&droq->droq_task, 0, lio_droq_bh, (void *)droq); + NET_TASK_INIT(&droq->droq_task, 0, lio_droq_bh, (void *)droq); droq->droq_taskqueue = taskqueue_create_fast("lio_droq_task", M_NOWAIT, taskqueue_thread_enqueue, From owner-svn-src-all@freebsd.org Tue Feb 11 19:38:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 628B5240F24; Tue, 11 Feb 2020 19:38:26 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48HCkB0kxBz4XtB; Tue, 11 Feb 2020 19:38:25 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2a02:8109:1140:c3d:b9ab:fece:73af:bcc] (unknown [IPv6:2a02:8109:1140:c3d:b9ab:fece:73af:bcc]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id DE3A972106C12; Tue, 11 Feb 2020 20:38:21 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r357761 - head/sys/netinet From: Michael Tuexen In-Reply-To: Date: Tue, 11 Feb 2020 20:38:21 +0100 Cc: src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: References: <202002111400.01BE0R3I009898@repo.freebsd.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,WEIRD_PORT autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 48HCkB0kxBz4XtB X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 19:38:26 -0000 > On 11. Feb 2020, at 19:18, Conrad Meyer wrote: >=20 > Hi Michael, >=20 > On Tue, Feb 11, 2020 at 6:00 AM Michael Tuexen = wrote: >>=20 >> Author: tuexen >> Date: Tue Feb 11 14:00:27 2020 >> New Revision: 357761 >> URL: https://svnweb.freebsd.org/changeset/base/357761 >>=20 >> Log: >> Use an int instead of a bool variable, since bool is not supported >> on all platforms the stack is running on in userland. >=20 > Maybe the platforms stuck in time before 1999 can be worked around > with something trivial like: >=20 > #if __STDC_VERSION__ < 199901L > # warn Really really consider getting a new compiler > typedef unsigned char _Bool; > # define bool _Bool > # define true ((_Bool)1) > # define false ((_Bool)0) > #endif Hi Conrad, I can revert it and get it working in a different way. However, the networking code uses ints for booleans in a lot of places. I wasn't aware that we need to use bool now. >=20 > Rather than inflicting the 80s on FreeBSD tree code? This commit > seems like a step in the wrong direction and just for example, > contravenes style(9). >=20 > SCTP is already one of the buggiest areas of the kernel, and it can't > be touched by outsiders for fear of breaking compatibility with the > purported myriad other platforms it is also ported to. By transitive > property, it also prevents modifying _any_ APIs SCTP consumes that > happen to be implemented on other platforms. This hamstrings the Which API couldn't be changed because of SCTP? I don't remember that I experienced such a discussion. I definitely never objected. > kernel for what is obviously not functional code (throw a dart at a > syzkaller report and better than 90% odds it's a SCTP panic), much > less code a reasonable person would want to use in a > security-sensitive context. I'm not arguing that there are bugs. But most of the bug only show up if you actually use SCTP. Regarding the 90% chance: Where do you get = this from: 1. Looking at http://syzkaller.backtrace.io:8080 you will find a lot of traces which involves SCTP. However, a lot of them will include = sendfile() in it's trace. If I remember it correctly, there was in the past a change to the internals of sendfile. After that change sendfile = support for SCTP seems to be broken. Whether it was working before that = change was discussed with different views (I wasn't involved since I never = worked on sendfile). Another set of panics involve calling listen and = connect on the same socket. This is as far as I know also not related to SCTP, = but to a recent change in the listen code to improve performance. All other issues I'm interested to fix. 2. Looking at https://syzkaller.appspot.com/freebsd I also see traces = which involve SCTP, but definitely not they are definitely not the = majority. 3. Looking at http://212.201.121.91:10000 I also see SCTP related panic, but also TCP related ones. >=20 > If SCTP is intended to be a port from some legacy platform, perhaps it > should live in ports rather than base? The SCTP is not a port from some other platform, but the code is also contained in a user land stack, which runs on a variety of platforms (the ones you build Browsers for). The code in the FreeBSD tree only has taken out some #ifdefed code, = which is used only on other platforms. Best regards Michael >=20 > Thanks, > Conrad From owner-svn-src-all@freebsd.org Tue Feb 11 19:40:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66AD4240FBB; Tue, 11 Feb 2020 19:40:00 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HCm01qryz4Y2Z; Tue, 11 Feb 2020 19:40:00 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A0CAD2C3; Tue, 11 Feb 2020 19:40:00 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BJe0BC021882; Tue, 11 Feb 2020 19:40:00 GMT (envelope-from netchild@FreeBSD.org) Received: (from netchild@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BJe0ou021860; Tue, 11 Feb 2020 19:40:00 GMT (envelope-from netchild@FreeBSD.org) Message-Id: <202002111940.01BJe0ou021860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: netchild set sender to netchild@FreeBSD.org using -f From: Alexander Leidinger Date: Tue, 11 Feb 2020 19:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357774 - head/tools/kerneldoc/subsys X-SVN-Group: head X-SVN-Commit-Author: netchild X-SVN-Commit-Paths: head/tools/kerneldoc/subsys X-SVN-Commit-Revision: 357774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 19:40:00 -0000 Author: netchild Date: Tue Feb 11 19:39:59 2020 New Revision: 357774 URL: https://svnweb.freebsd.org/changeset/base/357774 Log: Fix duplicate target warning. Modified: head/tools/kerneldoc/subsys/Makefile Modified: head/tools/kerneldoc/subsys/Makefile ============================================================================== --- head/tools/kerneldoc/subsys/Makefile Tue Feb 11 19:13:34 2020 (r357773) +++ head/tools/kerneldoc/subsys/Makefile Tue Feb 11 19:39:59 2020 (r357774) @@ -10,7 +10,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} S?=/usr/src/sys LOCALBASE?=/usr/local -MFILES!= find ${S} -name \*.m | sed -e 's:${S}/::g' +MFILES!= find ${S} -name \*.m | egrep '/(dev|libkern|kgssapi|opencrypto|isa|geom|kern|xen|net|${TARGET_ARCH})/' | sed -e 's:${S}/::g' HFILES= ${MFILES:T:S/.m$/.h/} AWK?= awk From owner-svn-src-all@freebsd.org Tue Feb 11 19:52:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA8DB241FB4; Tue, 11 Feb 2020 19:52:23 +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) server-signature RSA-PSS (4096 bits) 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 48HD2H3rscz4ZVq; Tue, 11 Feb 2020 19:52:23 +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 01BJqLHe006316 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 11 Feb 2020 11:52:21 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 01BJqL7B006315; Tue, 11 Feb 2020 11:52:21 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 11 Feb 2020 11:52:21 -0800 From: Gleb Smirnoff To: Michael Tuexen Cc: cem@freebsd.org, svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r357761 - head/sys/netinet Message-ID: <20200211195221.GD1351@FreeBSD.org> References: <202002111400.01BE0R3I009898@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 48HD2H3rscz4ZVq X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 19:52:23 -0000 Michael, On Tue, Feb 11, 2020 at 08:38:21PM +0100, Michael Tuexen wrote: M> I can revert it and get it working in a different way. However, the M> networking code uses ints for booleans in a lot of places. I wasn't M> aware that we need to use bool now. We don't need to use bool, but we should use it in any new code. Some people may still drop ints into new code, and this can be tolerable, but intentionally converting from bools to ints is a move backwards and this isn't okay. Thanks for redoing it with via ifdefs for legacy platforms. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Feb 11 20:02:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6095242565; Tue, 11 Feb 2020 20:02:21 +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) server-signature RSA-PSS (4096 bits) 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 48HDFn4nKyz4b2G; Tue, 11 Feb 2020 20:02:21 +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 99AD7D80E; Tue, 11 Feb 2020 20:02:21 +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 01BK2L0q038865; Tue, 11 Feb 2020 20:02:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BK2KQ5038860; Tue, 11 Feb 2020 20:02:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002112002.01BK2KQ5038860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 11 Feb 2020 20:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357775 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:02:21 -0000 Author: tuexen Date: Tue Feb 11 20:02:20 2020 New Revision: 357775 URL: https://svnweb.freebsd.org/changeset/base/357775 Log: Revert https://svnweb.freebsd.org/changeset/base/357761 This was suggested by cem@ Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Feb 11 19:39:59 2020 (r357774) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 20:02:20 2020 (r357775) @@ -4767,7 +4767,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc } } /* Now clean up any other timers */ - sctp_stop_association_timers(stcb, 0); + sctp_stop_association_timers(stcb, false); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4935,7 +4935,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - sctp_stop_association_timers(stcb, 1); + sctp_stop_association_timers(stcb, true); /* * The chunk lists and such SHOULD be empty but we check them just Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Feb 11 19:39:59 2020 (r357774) +++ head/sys/netinet/sctputil.c Tue Feb 11 20:02:20 2020 (r357775) @@ -802,7 +802,7 @@ sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) } void -sctp_stop_association_timers(struct sctp_tcb *stcb, int stop_assoc_kill_timer) +sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) { struct sctp_inpcb *inp; struct sctp_nets *net; @@ -812,7 +812,7 @@ sctp_stop_association_timers(struct sctp_tcb *stcb, in SCTP_FROM_SCTPUTIL + SCTP_LOC_18); sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_19); - if (stop_assoc_kill_timer != 0) { + if (stop_assoc_kill_timer) { sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_20); } Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Tue Feb 11 19:39:59 2020 (r357774) +++ head/sys/netinet/sctputil.h Tue Feb 11 20:02:20 2020 (r357775) @@ -165,7 +165,7 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ -void sctp_stop_association_timers(struct sctp_tcb *, int); +void sctp_stop_association_timers(struct sctp_tcb *, bool); void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int From owner-svn-src-all@freebsd.org Tue Feb 11 20:06:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C4E52427B9; Tue, 11 Feb 2020 20:06: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) server-signature RSA-PSS (4096 bits) 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 48HDLf0lzzz4bNS; Tue, 11 Feb 2020 20:06: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 1326ED834; Tue, 11 Feb 2020 20:06: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 01BK6X5F039097; Tue, 11 Feb 2020 20:06:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BK6Xji039095; Tue, 11 Feb 2020 20:06:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002112006.01BK6Xji039095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 20:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357776 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:06:34 -0000 Author: markj Date: Tue Feb 11 20:06:33 2020 New Revision: 357776 URL: https://svnweb.freebsd.org/changeset/base/357776 Log: Reduce lock hold time in keg_drain(). Maintain a count of free slabs in the per-domain keg structure and use that to clear the free slab list in constant time for most cases. This helps minimize lock contention induced by reclamation, in preparation for proactive trimming of excesses of free memory. Reviewed by: jeff, rlibby Tested by: pho Differential Revision: https://reviews.freebsd.org/D23532 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Feb 11 20:02:20 2020 (r357775) +++ head/sys/vm/uma_core.c Tue Feb 11 20:06:33 2020 (r357776) @@ -1258,39 +1258,34 @@ keg_free_slab(uma_keg_t keg, uma_slab_t slab, int star static void keg_drain(uma_keg_t keg) { - struct slabhead freeslabs = { 0 }; + struct slabhead freeslabs; uma_domain_t dom; uma_slab_t slab, tmp; int i, n; - /* - * We don't want to take pages from statically allocated kegs at this - * time - */ if (keg->uk_flags & UMA_ZONE_NOFREE || keg->uk_freef == NULL) return; for (i = 0; i < vm_ndomains; i++) { CTR4(KTR_UMA, "keg_drain %s(%p) domain %d free items: %u", - keg->uk_name, keg, i, dom->ud_free); - n = 0; + keg->uk_name, keg, i, dom->ud_free_items); dom = &keg->uk_domain[i]; + LIST_INIT(&freeslabs); + KEG_LOCK(keg, i); - LIST_FOREACH_SAFE(slab, &dom->ud_free_slab, us_link, tmp) { - if (keg->uk_flags & UMA_ZFLAG_HASH) + if ((keg->uk_flags & UMA_ZFLAG_HASH) != 0) { + LIST_FOREACH(slab, &dom->ud_free_slab, us_link) UMA_HASH_REMOVE(&keg->uk_hash, slab); - n++; - LIST_REMOVE(slab, us_link); - LIST_INSERT_HEAD(&freeslabs, slab, us_link); } + n = dom->ud_free_slabs; + LIST_SWAP(&freeslabs, &dom->ud_free_slab, uma_slab, us_link); + dom->ud_free_slabs = 0; + dom->ud_free_items -= n * keg->uk_ipers; dom->ud_pages -= n * keg->uk_ppera; - dom->ud_free -= n * keg->uk_ipers; KEG_UNLOCK(keg, i); - } - while ((slab = LIST_FIRST(&freeslabs)) != NULL) { - LIST_REMOVE(slab, us_link); - keg_free_slab(keg, slab, keg->uk_ipers); + LIST_FOREACH_SAFE(slab, &freeslabs, us_link, tmp) + keg_free_slab(keg, slab, keg->uk_ipers); } } @@ -1458,7 +1453,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom dom = &keg->uk_domain[domain]; LIST_INSERT_HEAD(&dom->ud_part_slab, slab, us_link); dom->ud_pages += keg->uk_ppera; - dom->ud_free += keg->uk_ipers; + dom->ud_free_items += keg->uk_ipers; return (slab); @@ -2286,7 +2281,7 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) "pages", CTLFLAG_RD, &dom->ud_pages, 0, "Total pages currently allocated from VM"); SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, - "free", CTLFLAG_RD, &dom->ud_free, 0, + "free_items", CTLFLAG_RD, &dom->ud_free_items, 0, "items free in the slab layer"); } } else @@ -2572,7 +2567,7 @@ keg_dtor(void *arg, int size, void *udata) keg = (uma_keg_t)arg; free = pages = 0; for (i = 0; i < vm_ndomains; i++) { - free += keg->uk_domain[i].ud_free; + free += keg->uk_domain[i].ud_free_items; pages += keg->uk_domain[i].ud_pages; KEG_LOCK_FINI(keg, i); } @@ -3386,11 +3381,11 @@ keg_first_slab(uma_keg_t keg, int domain, bool rr) start = domain; do { dom = &keg->uk_domain[domain]; - if (!LIST_EMPTY(&dom->ud_part_slab)) - return (LIST_FIRST(&dom->ud_part_slab)); - if (!LIST_EMPTY(&dom->ud_free_slab)) { - slab = LIST_FIRST(&dom->ud_free_slab); + if ((slab = LIST_FIRST(&dom->ud_part_slab)) != NULL) + return (slab); + if ((slab = LIST_FIRST(&dom->ud_free_slab)) != NULL) { LIST_REMOVE(slab, us_link); + dom->ud_free_slabs--; LIST_INSERT_HEAD(&dom->ud_part_slab, slab, us_link); return (slab); } @@ -3417,7 +3412,7 @@ keg_fetch_free_slab(uma_keg_t keg, int domain, bool rr KEG_LOCK(keg, domain); reserve = (flags & M_USE_RESERVE) != 0 ? 0 : keg->uk_reserve; - if (keg->uk_domain[domain].ud_free <= reserve || + if (keg->uk_domain[domain].ud_free_items <= reserve || (slab = keg_first_slab(keg, domain, rr)) == NULL) { KEG_UNLOCK(keg, domain); return (NULL); @@ -3502,9 +3497,13 @@ slab_alloc_item(uma_keg_t keg, uma_slab_t slab) BIT_CLR(keg->uk_ipers, freei, &slab->us_free); item = slab_item(slab, keg, freei); slab->us_freecount--; - dom->ud_free--; + dom->ud_free_items--; - /* Move this slab to the full list */ + /* + * Move this slab to the full list. It must be on the partial list, so + * we do not need to update the free slab count. In particular, + * keg_fetch_slab() always returns slabs on the partial list. + */ if (slab->us_freecount == 0) { LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&dom->ud_full_slab, slab, us_link); @@ -3538,7 +3537,7 @@ zone_import(void *arg, void **bucket, int max, int dom dom = &keg->uk_domain[slab->us_domain]; while (slab->us_freecount && i < max) { bucket[i++] = slab_alloc_item(keg, slab); - if (dom->ud_free <= keg->uk_reserve) + if (dom->ud_free_items <= keg->uk_reserve) break; #ifdef NUMA /* @@ -4240,9 +4239,10 @@ slab_free_item(uma_zone_t zone, uma_slab_t slab, void /* Do we need to remove from any lists? */ dom = &keg->uk_domain[slab->us_domain]; - if (slab->us_freecount+1 == keg->uk_ipers) { + if (slab->us_freecount + 1 == keg->uk_ipers) { LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&dom->ud_free_slab, slab, us_link); + dom->ud_free_slabs++; } else if (slab->us_freecount == 0) { LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&dom->ud_part_slab, slab, us_link); @@ -4254,7 +4254,7 @@ slab_free_item(uma_zone_t zone, uma_slab_t slab, void slab->us_freecount++; /* Keg statistics. */ - dom->ud_free++; + dom->ud_free_items++; } static void @@ -4635,9 +4635,14 @@ uma_prealloc(uma_zone_t zone, int items) aflags); if (slab != NULL) { dom = &keg->uk_domain[slab->us_domain]; + /* + * keg_alloc_slab() always returns a slab on the + * partial list. + */ LIST_REMOVE(slab, us_link); LIST_INSERT_HEAD(&dom->ud_free_slab, slab, us_link); + dom->ud_free_slabs++; KEG_UNLOCK(keg, slab->us_domain); break; } @@ -4915,7 +4920,7 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) LIST_FOREACH(kz, &uma_kegs, uk_link) { kfree = pages = 0; for (i = 0; i < vm_ndomains; i++) { - kfree += kz->uk_domain[i].ud_free; + kfree += kz->uk_domain[i].ud_free_items; pages += kz->uk_domain[i].ud_pages; } LIST_FOREACH(z, &kz->uk_zones, uz_link) { @@ -5219,7 +5224,7 @@ get_uma_stats(uma_keg_t kz, uma_zone_t z, uint64_t *al *cachefree += z->uz_domain[i].uzd_nitems; if (!((z->uz_flags & UMA_ZONE_SECONDARY) && (LIST_FIRST(&kz->uk_zones) != z))) - *cachefree += kz->uk_domain[i].ud_free; + *cachefree += kz->uk_domain[i].ud_free_items; } *used = *allocs - frees; return (((int64_t)*used + *cachefree) * kz->uk_size); Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Feb 11 20:02:20 2020 (r357775) +++ head/sys/vm/uma_int.h Tue Feb 11 20:06:33 2020 (r357776) @@ -324,7 +324,8 @@ struct uma_domain { struct slabhead ud_free_slab; /* completely unallocated slabs */ struct slabhead ud_full_slab; /* fully allocated slabs */ uint32_t ud_pages; /* Total page count */ - uint32_t ud_free; /* Count of items free in slabs */ + uint32_t ud_free_items; /* Count of items free in all slabs */ + uint32_t ud_free_slabs; /* Count of free slabs */ } __aligned(CACHE_LINE_SIZE); typedef struct uma_domain * uma_domain_t; From owner-svn-src-all@freebsd.org Tue Feb 11 20:12:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4F74242B45; Tue, 11 Feb 2020 20:12:08 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48HDT42YKHz4c1f; Tue, 11 Feb 2020 20:12:08 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581451925; bh=rBxspB9Wlf7S/dmslf5dfpr8E4Ex84MUoV7u1rwjEDU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=klRnERsSgi1cIiaFV9beqGrhipbCI2ZM39mj23CMoiwwIn2vN9aDFLKBLlhLFOj76 rpU9mo3TevhcQ1/vaYQithGOado94eXSHOz68g94nbgLZbO3Dua6A3Ix4pZtDtYHYL sOnSsS8CeRLHolkeaeMnJalKkPS9uq+SzLu29krU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([89.14.102.85]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQe5u-1ip36x36cY-00NgEc; Tue, 11 Feb 2020 21:12:05 +0100 Date: Tue, 11 Feb 2020 21:11:37 +0100 From: "O. Hartmann" To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357771 - in head/sys: kern sys Message-ID: <20200211211204.390d0f55@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202002111848.01BIm8TW091058@repo.freebsd.org> References: <202002111848.01BIm8TW091058@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:vamST2MyVSOKiFHuEf4MuMzbV1aRdKodhNQ4FLM7H+CQ9FNktJo otiRSHNvr3RpnVP0uIqbIhBdbbDDHBdFY7d/lvd51X2DtW4SvpzcJXhQZwqVreMJMRWBkGW dDATctGZoG8JVblrV4SSwKUwE9N4zxGEiUC2UluLlXXrt1YJiBEuBR1o0OOYh30Gje/MI1D enSeU5WO1OfKGxj05MTEw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:t3XGI8BEWTA=:YFLGExTzH0nDrAiyGUpOAO YeO+T65AoMeeObNFDrmm6e7czt6tb4xnfmXo3zrE++5xkhxRurgPKCyhBkHXLUjzr3mn7I+jE wNKBNAar4ukPg3skSRf/2+b9NUK5zBpwqCr4hP2gwJCworScQuo7a5bwr0HHHuwREVWhQLtt9 USdj8ip0/dXrqzaERWvRrAqnL2Su+dra2hA9jyOBLACaw5ASHzgzxlmEKJY8jb1I2mc3ASMkx QEaSfypCv544NyxWQt4nwKNomLd3FqoNKCR9nsZtb0mYnNriRR2NQrTXpDlfWWDJ074Mp+tFj M9pC/Ttb/loBhH9H9NLVxqPLMb0OMFhsGAyTDTSRNiUNmvFNsF4UPumCklnf4tQCsz9E1iH0z Vy2UM1vQDH+11KYzRRg0DCWyEHBlnyJ9cs687Lh+xfyThilEH0wQ7rMqd0KOXf4dY9otHNy4M 75YJYcvlEl8WyNcrNLDBIp3GfZNwJYn7rYGGY/EScF+R4FakP2SJHeti/xje8dGxDXKHArUxv SB5/NFtWQyDcLP2WGtuBX1ph6MPjTk8nrRojTroyMXxKGGSsNiF46fcpw1/MSnrhzpwuiNjVQ mVNSKyN9D+Mx4+96RvD/CpwJqNaHuo/Z8YpbtiTdtWZ0MPowLsX94cc+xdm2D28KuM5tfaWZ9 nOXYnuhiThs5s7AOFK+6l6C83UCTthWV4HTof+iGL+huNmIrTme3Fx83D7AGHDqGJVVtgrcpC ixyii/yDroX0k0ij/fZjp7/HahkaZJeVfkrNcNI6fTXXIMiFk3v6a8l6bcB+42pNtWyRyVmiO 5SZwWHvfZCfpAgMAimMtF1XiPhf4xMbOWmW+luTlaUPC0Urjdbxtycf+Cr7niiR9imZrC4MTO 6h4Hv4HEkN9Njd47gI/CElz5k9y2ek74veazbCZxqEQ4aSyKeMK6Jko7KHkxyDZp92aTcfEuB 4gmG6vDO7Bf+xEsUCZaN12aThsDTSoM6dxde1on9TcszX2ohaLrxEE+WeB5um160yDn7wJtLB looCJVwqPVmY/pFZCiTPlpYINkCp/q5j8P1QRSkMBQcqckBtZ61ALKsFbsCLoc50OM3CRrZsa VskY67Cz0KgzKO9LYRSdvwGAzJnYuYHHHnVfCNge+TjM14t6RPY8Iof1t9mSI+5cyqAkpG4he LDiEOKF9eWWSAlVpwXCFk6jnHzfztZk9kowTqZRnUWHJnqTBOsL30pkOCsOpnFnXbtszn6UdH yq5Txczb4BAdyCB5F X-Rspamd-Queue-Id: 48HDT42YKHz4c1f X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:12:08 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFR1 ZSwgMTEgRmViIDIwMjAgMTg6NDg6MDggKzAwMDAgKFVUQykNCkdsZWIgU21pcm5vZmYgPGdsZWJp dXNARnJlZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBnbGViaXVzDQo+IERhdGU6IFR1 ZSBGZWIgMTEgMTg6NDg6MDcgMjAyMA0KPiBOZXcgUmV2aXNpb246IDM1Nzc3MQ0KPiBVUkw6IGh0 dHBzOi8vc3Zud2ViLmZyZWVic2Qub3JnL2NoYW5nZXNldC9iYXNlLzM1Nzc3MQ0KPiANCj4gTG9n Og0KPiAgIEFkZCBmbGFnIHRvIHN0cnVjdCB0YXNrIHRvIG1hcmsgdGhlIHRhc2sgYXMgcmVxdWly aW5nIG5ldHdvcmsgZXBvY2guDQo+ICAgDQo+ICAgV2hlbiBwcm9jZXNzaW5nIGEgdGFza3F1ZXVl IGFuZCBhIHRhc2sgaGFzIGFzc29jaWF0ZWQgZXBvY2gsIHRoZW4NCj4gICBlbnRlciBmb3IgZHVy YXRpb24gb2YgdGhlIHRhc2suICBJZiBjb25zZWN1dGl2ZSB0YXNrcyBiZWxvbmcgdG8gdGhlDQo+ ICAgc2FtZSBlcG9jaCwgYmF0Y2ggdGhlbS4gIE5vdyB3ZSBhcmUgdGFsa2luZyBhYm91dCB0aGUg bmV0d29yayBlcG9jaA0KPiAgIG9ubHkuDQo+ICAgDQo+ICAgU2hyaW5rIHRoZSB0YV9wcmlvcml0 eSBzaXplIHRvIDgtYml0cy4gIE5vIGN1cnJlbnQgY29uc3VtZXJzIHVzZQ0KPiAgIGEgcHJpb3Jp dHkgdGhhdCB3b24ndCBmaXQgaW50byA4IGJpdHMuICBBbHNvIGNvbXBsZXhpdHkgb2YNCj4gICB0 YXNrcXVldWVfZW5xdWV1ZSgpIGlzIGEgc3F1YXJlIG9mIG1heGltdW0gdmFsdWUgb2YgcHJpb3Jp dHksIHNvDQo+ICAgd2UgdW5saWtlbHkgZXZlciB3YW50IHRvIGdvIG92ZXIgVUNIQVJfTUFYIGhl cmUuDQo+ICAgDQo+ICAgUmV2aWV3ZWQgYnk6CWhzZWxhc2t5DQo+ICAgRGlmZmVyZW50aWFsIFJl dmlzaW9uOglodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDIzNTE4DQo+IA0KPiBNb2RpZmll ZDoNCj4gICBoZWFkL3N5cy9rZXJuL3N1YnJfZ3Rhc2txdWV1ZS5jDQo+ICAgaGVhZC9zeXMva2Vy bi9zdWJyX3Rhc2txdWV1ZS5jDQo+ICAgaGVhZC9zeXMvc3lzL190YXNrLmgNCj4gICBoZWFkL3N5 cy9zeXMvZXBvY2guaA0KPiAgIGhlYWQvc3lzL3N5cy9ndGFza3F1ZXVlLmgNCj4gICBoZWFkL3N5 cy9zeXMvdGFza3F1ZXVlLmgNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N5cy9rZXJuL3N1YnJfZ3Rh c2txdWV1ZS5jDQo+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zeXMva2Vybi9z dWJyX2d0YXNrcXVldWUuYwlUdWUgRmViIDExIDE4OjE5OjU2IDIwMjAJKHIzNTc3NzApDQo+ICsr KyBoZWFkL3N5cy9rZXJuL3N1YnJfZ3Rhc2txdWV1ZS5jCVR1ZSBGZWIgMTEgMTg6NDg6MDcgMjAy MAkocjM1Nzc3MSkNCj4gQEAgLTQxLDYgKzQxLDcgQEAgX19GQlNESUQoIiRGcmVlQlNEJCIpOw0K PiAgI2luY2x1ZGUgPHN5cy9tYWxsb2MuaD4NCj4gICNpbmNsdWRlIDxzeXMvbXV0ZXguaD4NCj4g ICNpbmNsdWRlIDxzeXMvcHJvYy5oPg0KPiArI2luY2x1ZGUgPHN5cy9lcG9jaC5oPg0KPiAgI2lu Y2x1ZGUgPHN5cy9zY2hlZC5oPg0KPiAgI2luY2x1ZGUgPHN5cy9zbXAuaD4NCj4gICNpbmNsdWRl IDxzeXMvZ3Rhc2txdWV1ZS5oPg0KPiBAQCAtMzQyLDEzICszNDMsMTYgQEAgZ3Rhc2txdWV1ZV91 bmJsb2NrKHN0cnVjdCBndGFza3F1ZXVlICpxdWV1ZSkNCj4gIHN0YXRpYyB2b2lkDQo+ICBndGFz a3F1ZXVlX3J1bl9sb2NrZWQoc3RydWN0IGd0YXNrcXVldWUgKnF1ZXVlKQ0KPiAgew0KPiArCXN0 cnVjdCBlcG9jaF90cmFja2VyIGV0Ow0KPiAgCXN0cnVjdCBndGFza3F1ZXVlX2J1c3kgdGI7DQo+ ICAJc3RydWN0IGd0YXNrICpndGFzazsNCj4gKwlib29sIGluX25ldF9lcG9jaDsNCj4gIA0KPiAg CUtBU1NFUlQocXVldWUgIT0gTlVMTCwgKCJ0cSBpcyBOVUxMIikpOw0KPiAgCVRRX0FTU0VSVF9M T0NLRUQocXVldWUpOw0KPiAgCXRiLnRiX3J1bm5pbmcgPSBOVUxMOw0KPiAgCUxJU1RfSU5TRVJU X0hFQUQoJnF1ZXVlLT50cV9hY3RpdmUsICZ0YiwgdGJfbGluayk7DQo+ICsJaW5fbmV0X2Vwb2No ID0gZmFsc2U7DQo+ICANCj4gIAl3aGlsZSAoKGd0YXNrID0gU1RBSUxRX0ZJUlNUKCZxdWV1ZS0+ dHFfcXVldWUpKSAhPSBOVUxMKSB7DQo+ICAJCVNUQUlMUV9SRU1PVkVfSEVBRCgmcXVldWUtPnRx X3F1ZXVlLCB0YV9saW5rKTsNCj4gQEAgLTM1OCwxMSArMzYyLDIwIEBAIGd0YXNrcXVldWVfcnVu X2xvY2tlZChzdHJ1Y3QgZ3Rhc2txdWV1ZSAqcXVldWUpDQo+ICAJCVRRX1VOTE9DSyhxdWV1ZSk7 DQo+ICANCj4gIAkJS0FTU0VSVChndGFzay0+dGFfZnVuYyAhPSBOVUxMLCAoInRhc2stPnRhX2Z1 bmMgaXMgTlVMTCIpKTsNCj4gKwkJaWYgKCFpbl9uZXRfZXBvY2ggJiYgVEFTS19JU19ORVQoZ3Rh c2spKSB7DQo+ICsJCQlpbl9uZXRfZXBvY2ggPSB0cnVlOw0KPiArCQkJTkVUX0VQT0NIX0VOVEVS KGV0KTsNCj4gKwkJfSBlbHNlIGlmIChpbl9uZXRfZXBvY2ggJiYgIVRBU0tfSVNfTkVUKGd0YXNr KSkgew0KPiArCQkJTkVUX0VQT0NIX0VYSVQoZXQpOw0KPiArCQkJaW5fbmV0X2Vwb2NoID0gZmFs c2U7DQo+ICsJCX0NCj4gIAkJZ3Rhc2stPnRhX2Z1bmMoZ3Rhc2stPnRhX2NvbnRleHQpOw0KPiAg DQo+ICAJCVRRX0xPQ0socXVldWUpOw0KPiAgCQl3YWtldXAoZ3Rhc2spOw0KPiAgCX0NCj4gKwlp ZiAoaW5fbmV0X2Vwb2NoKQ0KPiArCQlORVRfRVBPQ0hfRVhJVChldCk7DQo+ICAJTElTVF9SRU1P VkUoJnRiLCB0Yl9saW5rKTsNCj4gIH0NCj4gIA0KPiANCj4gTW9kaWZpZWQ6IGhlYWQvc3lzL2tl cm4vc3Vicl90YXNrcXVldWUuYw0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQv c3lzL2tlcm4vc3Vicl90YXNrcXVldWUuYwlUdWUgRmViIDExIDE4OjE5OjU2IDIwMjAJKHIzNTc3 NzApDQo+ICsrKyBoZWFkL3N5cy9rZXJuL3N1YnJfdGFza3F1ZXVlLmMJVHVlIEZlYiAxMSAxODo0 ODowNyAyMDIwCShyMzU3NzcxKQ0KPiBAQCAtNDIsNiArNDIsNyBAQCBfX0ZCU0RJRCgiJEZyZWVC U0QkIik7DQo+ICAjaW5jbHVkZSA8c3lzL21hbGxvYy5oPg0KPiAgI2luY2x1ZGUgPHN5cy9tdXRl eC5oPg0KPiAgI2luY2x1ZGUgPHN5cy9wcm9jLmg+DQo+ICsjaW5jbHVkZSA8c3lzL2Vwb2NoLmg+ DQo+ICAjaW5jbHVkZSA8c3lzL3NjaGVkLmg+DQo+ICAjaW5jbHVkZSA8c3lzL3NtcC5oPg0KPiAg I2luY2x1ZGUgPHN5cy90YXNrcXVldWUuaD4NCj4gQEAgLTM3MSw3ICszNzIsNyBAQCB0YXNrcXVl dWVfZHJhaW5fdHFfcXVldWUoc3RydWN0IHRhc2txdWV1ZSAqcXVldWUpDQo+ICAJICogYW55d2F5 KSBzbyBqdXN0IGluc2VydCBpdCBhdCB0YWlsIHdoaWxlIHdlIGhhdmUgdGhlDQo+ICAJICogcXVl dWUgbG9jay4NCj4gIAkgKi8NCj4gLQlUQVNLX0lOSVQoJnRfYmFycmllciwgVVNIUlRfTUFYLCB0 YXNrcXVldWVfdGFza19ub3BfZm4sICZ0X2JhcnJpZXIpOw0KPiArCVRBU0tfSU5JVCgmdF9iYXJy aWVyLCBVQ0hBUl9NQVgsIHRhc2txdWV1ZV90YXNrX25vcF9mbiwgJnRfYmFycmllcik7DQo+ICAJ U1RBSUxRX0lOU0VSVF9UQUlMKCZxdWV1ZS0+dHFfcXVldWUsICZ0X2JhcnJpZXIsIHRhX2xpbmsp Ow0KPiAgCXF1ZXVlLT50cV9oaW50ID0gJnRfYmFycmllcjsNCj4gIAl0X2JhcnJpZXIudGFfcGVu ZGluZyA9IDE7DQo+IEBAIC00NDIsMTQgKzQ0MywxNyBAQCB0YXNrcXVldWVfdW5ibG9jayhzdHJ1 Y3QgdGFza3F1ZXVlICpxdWV1ZSkNCj4gIHN0YXRpYyB2b2lkDQo+ICB0YXNrcXVldWVfcnVuX2xv Y2tlZChzdHJ1Y3QgdGFza3F1ZXVlICpxdWV1ZSkNCj4gIHsNCj4gKwlzdHJ1Y3QgZXBvY2hfdHJh Y2tlciBldDsNCj4gIAlzdHJ1Y3QgdGFza3F1ZXVlX2J1c3kgdGI7DQo+ICAJc3RydWN0IHRhc2sg KnRhc2s7DQo+ICsJYm9vbCBpbl9uZXRfZXBvY2g7DQo+ICAJaW50IHBlbmRpbmc7DQo+ICANCj4g IAlLQVNTRVJUKHF1ZXVlICE9IE5VTEwsICgidHEgaXMgTlVMTCIpKTsNCj4gIAlUUV9BU1NFUlRf TE9DS0VEKHF1ZXVlKTsNCj4gIAl0Yi50Yl9ydW5uaW5nID0gTlVMTDsNCj4gIAlMSVNUX0lOU0VS VF9IRUFEKCZxdWV1ZS0+dHFfYWN0aXZlLCAmdGIsIHRiX2xpbmspOw0KPiArCWluX25ldF9lcG9j aCA9IGZhbHNlOw0KPiAgDQo+ICAJd2hpbGUgKCh0YXNrID0gU1RBSUxRX0ZJUlNUKCZxdWV1ZS0+ dHFfcXVldWUpKSAhPSBOVUxMKSB7DQo+ICAJCVNUQUlMUV9SRU1PVkVfSEVBRCgmcXVldWUtPnRx X3F1ZXVlLCB0YV9saW5rKTsNCj4gQEAgLTQ2MiwxMSArNDY2LDIwIEBAIHRhc2txdWV1ZV9ydW5f bG9ja2VkKHN0cnVjdCB0YXNrcXVldWUgKnF1ZXVlKQ0KPiAgCQlUUV9VTkxPQ0socXVldWUpOw0K PiAgDQo+ICAJCUtBU1NFUlQodGFzay0+dGFfZnVuYyAhPSBOVUxMLCAoInRhc2stPnRhX2Z1bmMg aXMgTlVMTCIpKTsNCj4gKwkJaWYgKCFpbl9uZXRfZXBvY2ggJiYgVEFTS19JU19ORVQodGFzaykp IHsNCj4gKwkJCWluX25ldF9lcG9jaCA9IHRydWU7DQo+ICsJCQlORVRfRVBPQ0hfRU5URVIoZXQp Ow0KPiArCQl9IGVsc2UgaWYgKGluX25ldF9lcG9jaCAmJiAhVEFTS19JU19ORVQodGFzaykpIHsN Cj4gKwkJCU5FVF9FUE9DSF9FWElUKGV0KTsNCj4gKwkJCWluX25ldF9lcG9jaCA9IGZhbHNlOw0K PiArCQl9DQo+ICAJCXRhc2stPnRhX2Z1bmModGFzay0+dGFfY29udGV4dCwgcGVuZGluZyk7DQo+ ICANCj4gIAkJVFFfTE9DSyhxdWV1ZSk7DQo+ICAJCXdha2V1cCh0YXNrKTsNCj4gIAl9DQo+ICsJ aWYgKGluX25ldF9lcG9jaCkNCj4gKwkJTkVUX0VQT0NIX0VYSVQoZXQpOw0KPiAgCUxJU1RfUkVN T1ZFKCZ0YiwgdGJfbGluayk7DQo+ICB9DQo+ICANCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N5cy9z eXMvX3Rhc2suaA0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL3N5cy9f dGFzay5oCVR1ZSBGZWIgMTEgMTg6MTk6NTYgMjAyMAkocjM1Nzc3MCkNCj4gKysrIGhlYWQvc3lz L3N5cy9fdGFzay5oCVR1ZSBGZWIgMTEgMTg6NDg6MDcgMjAyMAkocjM1Nzc3MSkNCj4gQEAgLTQ4 LDEwICs0OCwxNyBAQCB0eXBlZGVmIHZvaWQgdGFza19mbl90KHZvaWQgKmNvbnRleHQsIGludCBw ZW5kaW5nKTsNCj4gIHN0cnVjdCB0YXNrIHsNCj4gIAlTVEFJTFFfRU5UUlkodGFzaykgdGFfbGlu azsJLyogKHEpIGxpbmsgZm9yIHF1ZXVlICovDQo+ICAJdWludDE2X3QgdGFfcGVuZGluZzsJCS8q IChxKSBjb3VudCB0aW1lcyBxdWV1ZWQgKi8NCj4gLQl1X3Nob3J0CXRhX3ByaW9yaXR5OwkJLyog KGMpIFByaW9yaXR5ICovDQo+ICsJdWludDhfdAl0YV9wcmlvcml0eTsJCS8qIChjKSBQcmlvcml0 eSAqLw0KPiArCXVpbnQ4X3QJdGFfZmxhZ3M7CQkvKiAoYykgRmxhZ3MgKi8NCj4gIAl0YXNrX2Zu X3QgKnRhX2Z1bmM7CQkvKiAoYykgdGFzayBoYW5kbGVyICovDQo+ICAJdm9pZAkqdGFfY29udGV4 dDsJCS8qIChjKSBhcmd1bWVudCBmb3IgaGFuZGxlciAqLw0KPiAgfTsNCj4gKw0KPiArI2RlZmlu ZQlUQVNLX0VOUVVFVUVECQkweDENCj4gKyNkZWZpbmUJVEFTS19OT0VOUVVFVUUJCTB4Mg0KPiAr I2RlZmluZQlUQVNLX05FVFdPUksJCTB4NA0KPiArDQo+ICsjZGVmaW5lCVRBU0tfSVNfTkVUKHRh KQkJKCh0YSktPnRhX2ZsYWdzICYgVEFTS19ORVRXT1JLKQ0KPiAgDQo+ICAjaWZkZWYgX0tFUk5F TA0KPiAgDQo+IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvc3lzL2Vwb2NoLmgNCj4gPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09DQo+IC0tLSBoZWFkL3N5cy9zeXMvZXBvY2guaAlUdWUgRmViIDExIDE4OjE5 OjU2IDIwMjAJKHIzNTc3NzApDQo+ICsrKyBoZWFkL3N5cy9zeXMvZXBvY2guaAlUdWUgRmViIDEx IDE4OjQ4OjA3IDIwMjAJKHIzNTc3NzEpDQo+IEBAIC0xMDQsNiArMTA0LDkgQEAgZXh0ZXJuIGVw b2NoX3QgbmV0X2Vwb2NoX3ByZWVtcHQ7DQo+ICAjZGVmaW5lCU5FVF9FUE9DSF9XQUlUKCkJZXBv Y2hfd2FpdF9wcmVlbXB0KG5ldF9lcG9jaF9wcmVlbXB0KQ0KPiAgI2RlZmluZQlORVRfRVBPQ0hf Q0FMTChmLCBjKQllcG9jaF9jYWxsKG5ldF9lcG9jaF9wcmVlbXB0LCAoZiksIChjKSkNCj4gICNk ZWZpbmUJTkVUX0VQT0NIX0FTU0VSVCgpCU1QQVNTKGluX2Vwb2NoKG5ldF9lcG9jaF9wcmVlbXB0 KSkNCj4gKyNkZWZpbmUJTkVUX1RBU0tfSU5JVCh0LCBwLCBmLCBjKSBUQVNLX0lOSVRfRkxBR1Mo dCwgcCwgZiwgYywgVEFTS19ORVRXT1JLKQ0KPiArI2RlZmluZQlORVRfR1JPVVBUQVNLX0lOSVQo Z3Rhc2ssIHByaW8sIGZ1bmMsIGN0eCkJCQlcDQo+ICsJICAgIEdUQVNLX0lOSVQoJihndGFzaykt Pmd0X3Rhc2ssIFRBU0tfTkVUV09SSywgKHByaW8pLCAoZnVuYyksIChjdHgpKQ0KPiAgDQo+ICAj ZW5kaWYJLyogX0tFUk5FTCAqLw0KPiAgI2VuZGlmCS8qIF9TWVNfRVBPQ0hfSF8gKi8NCj4gDQo+ IE1vZGlmaWVkOiBoZWFkL3N5cy9zeXMvZ3Rhc2txdWV1ZS5oDQo+ID09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQ0KPiAtLS0gaGVhZC9zeXMvc3lzL2d0YXNrcXVldWUuaAlUdWUgRmViIDExIDE4OjE5OjU2 IDIwMjAJKHIzNTc3NzApDQo+ICsrKyBoZWFkL3N5cy9zeXMvZ3Rhc2txdWV1ZS5oCVR1ZSBGZWIg MTEgMTg6NDg6MDcgMjAyMAkocjM1Nzc3MSkNCj4gQEAgLTg0LDEwICs4NCw2IEBAIHZvaWQJdGFz a3Fncm91cF9jb25maWdfZ3Rhc2tfaW5pdCh2b2lkICpjdHgsIHN0cnVjdCBncg0KPiAgCSAgICBn dGFza19mbl90ICpmbiwgY29uc3QgY2hhciAqbmFtZSk7DQo+ICB2b2lkCXRhc2txZ3JvdXBfY29u ZmlnX2d0YXNrX2RlaW5pdChzdHJ1Y3QgZ3JvdXB0YXNrICpndGFzayk7DQo+ICANCj4gLSNkZWZp bmUgVEFTS19FTlFVRVVFRAkJCTB4MQ0KPiAtI2RlZmluZSBUQVNLX1NLSVBfV0FLRVVQCQkweDIN Cj4gLSNkZWZpbmUgVEFTS19OT0VOUVVFVUUJCQkweDQNCj4gLQ0KPiAgI2RlZmluZQlHVEFTS19J TklUKGd0YXNrLCBmbGFncywgcHJpb3JpdHksIGZ1bmMsIGNvbnRleHQpIGRvIHsJXA0KPiAgCShn dGFzayktPnRhX2ZsYWdzID0gZmxhZ3M7CQkJCVwNCj4gIAkoZ3Rhc2spLT50YV9wcmlvcml0eSA9 IChwcmlvcml0eSk7CQkJXA0KPiBAQCAtOTYsNyArOTIsNyBAQCB2b2lkCXRhc2txZ3JvdXBfY29u ZmlnX2d0YXNrX2RlaW5pdChzdHJ1Y3QgZ3JvdXB0YXNrICoNCj4gIH0gd2hpbGUgKDApDQo+ICAN Cj4gICNkZWZpbmUJR1JPVVBUQVNLX0lOSVQoZ3Rhc2ssIHByaW9yaXR5LCBmdW5jLCBjb250ZXh0 KQlcDQo+IC0JR1RBU0tfSU5JVCgmKGd0YXNrKS0+Z3RfdGFzaywgVEFTS19TS0lQX1dBS0VVUCwg cHJpb3JpdHksIGZ1bmMsIGNvbnRleHQpDQo+ICsJR1RBU0tfSU5JVCgmKGd0YXNrKS0+Z3RfdGFz aywgMCwgcHJpb3JpdHksIGZ1bmMsIGNvbnRleHQpDQo+ICANCj4gICNkZWZpbmUJR1JPVVBUQVNL X0VOUVVFVUUoZ3Rhc2spCQkJXA0KPiAgCWdyb3VwdGFza3F1ZXVlX2VucXVldWUoKGd0YXNrKS0+ Z3RfdGFza3F1ZXVlLCAmKGd0YXNrKS0+Z3RfdGFzaykNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N5 cy9zeXMvdGFza3F1ZXVlLmgNCj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0tLSBoZWFkL3N5 cy9zeXMvdGFza3F1ZXVlLmgJVHVlIEZlYiAxMSAxODoxOTo1NiAyMDIwCShyMzU3NzcwKQ0KPiAr KysgaGVhZC9zeXMvc3lzL3Rhc2txdWV1ZS5oCVR1ZSBGZWIgMTEgMTg6NDg6MDcgMjAyMAkocjM1 Nzc3MSkNCj4gQEAgLTEwNyw4ICsxMDcsNyBAQCB2b2lkCXRhc2txdWV1ZV9zZXRfY2FsbGJhY2so c3RydWN0IHRhc2txdWV1ZSAqcXVldWUsDQo+ICAJICAgIHRhc2txdWV1ZV9jYWxsYmFja19mbiBj YWxsYmFjaywgdm9pZCAqY29udGV4dCk7DQo+ICANCj4gICNkZWZpbmUgVEFTS19JTklUSUFMSVpF Uihwcmlvcml0eSwgZnVuYywgY29udGV4dCkJXA0KPiAtCXsgLnRhX3BlbmRpbmcgPSAwLAkJCQlc DQo+IC0JICAudGFfcHJpb3JpdHkgPSAocHJpb3JpdHkpLAkJCVwNCj4gKwl7IC50YV9wcmlvcml0 eSA9IChwcmlvcml0eSksCQkJXA0KPiAgCSAgLnRhX2Z1bmMgPSAoZnVuYyksCQkJCVwNCj4gIAkg IC50YV9jb250ZXh0ID0gKGNvbnRleHQpIH0NCj4gIA0KPiBAQCAtMTIxLDE4ICsxMjAsMjUgQEAg dm9pZAl0YXNrcXVldWVfdGhyZWFkX2VucXVldWUodm9pZCAqY29udGV4dCk7DQo+ICAvKg0KPiAg ICogSW5pdGlhbGlzZSBhIHRhc2sgc3RydWN0dXJlLg0KPiAgICovDQo+IC0jZGVmaW5lIFRBU0tf SU5JVCh0YXNrLCBwcmlvcml0eSwgZnVuYywgY29udGV4dCkgZG8gewlcDQo+IC0JKHRhc2spLT50 YV9wZW5kaW5nID0gMDsJCQkJXA0KPiAtCSh0YXNrKS0+dGFfcHJpb3JpdHkgPSAocHJpb3JpdHkp OwkJXA0KPiAtCSh0YXNrKS0+dGFfZnVuYyA9IChmdW5jKTsJCQlcDQo+IC0JKHRhc2spLT50YV9j b250ZXh0ID0gKGNvbnRleHQpOwkJCVwNCj4gKyNkZWZpbmUgVEFTS19JTklUX0ZMQUdTKHRhc2ss IHByaW9yaXR5LCBmdW5jLCBjb250ZXh0LCBmbGFncykgZG8gewlcDQo+ICsJTVBBU1MoKHByaW9y aXR5KSA+PSAwICYmIChwcmlvcml0eSkgPD0gMjU1KTsJCVwNCj4gKwkodGFzayktPnRhX3BlbmRp bmcgPSAwOwkJCQkJXA0KPiArCSh0YXNrKS0+dGFfcHJpb3JpdHkgPSAocHJpb3JpdHkpOwkJCVwN Cj4gKwkodGFzayktPnRhX2ZsYWdzID0gKGZsYWdzKTsJCQkJXA0KPiArCSh0YXNrKS0+dGFfZnVu YyA9IChmdW5jKTsJCQkJXA0KPiArCSh0YXNrKS0+dGFfY29udGV4dCA9IChjb250ZXh0KTsJCQkJ XA0KPiAgfSB3aGlsZSAoMCkNCj4gIA0KPiArI2RlZmluZSBUQVNLX0lOSVQodCwgcCwgZiwgYykJ VEFTS19JTklUX0ZMQUdTKHQsIHAsIGYsIGMsIDApDQo+ICsNCj4gIHZvaWQgX3RpbWVvdXRfdGFz a19pbml0KHN0cnVjdCB0YXNrcXVldWUgKnF1ZXVlLA0KPiAgCSAgICBzdHJ1Y3QgdGltZW91dF90 YXNrICp0aW1lb3V0X3Rhc2ssIGludCBwcmlvcml0eSwgdGFza19mbl90IGZ1bmMsDQo+ICAJICAg IHZvaWQgKmNvbnRleHQpOw0KPiAtI2RlZmluZQlUSU1FT1VUX1RBU0tfSU5JVChxdWV1ZSwgdGlt ZW91dF90YXNrLCBwcmlvcml0eSwgZnVuYywgY29udGV4dCkgXA0KPiAtCV90aW1lb3V0X3Rhc2tf aW5pdChxdWV1ZSwgdGltZW91dF90YXNrLCBwcmlvcml0eSwgZnVuYywgY29udGV4dCk7DQo+ICsj ZGVmaW5lCVRJTUVPVVRfVEFTS19JTklUKHF1ZXVlLCB0aW1lb3V0X3Rhc2ssIHByaW9yaXR5LCBm dW5jLCBjb250ZXh0KQlkbyB7IFwNCj4gKwlfU3RhdGljX2Fzc2VydCgocHJpb3JpdHkpID49IDAg JiYgKHByaW9yaXR5KSA8PSAyNTUsCVwNCj4gKwkgICAgInN0cnVjdCB0YXNrIHByaW9yaXR5IGlz IDggYml0IGluIHNpemUiKTsgICAgICAgICAgIFwNCj4gKwlfdGltZW91dF90YXNrX2luaXQocXVl dWUsIHRpbWVvdXRfdGFzaywgcHJpb3JpdHksIGZ1bmMsIGNvbnRleHQpOyBcDQo+ICt9IHdoaWxl ICgwKQ0KPiAgDQo+ICAvKg0KPiAgICogRGVjbGFyZSBhIHJlZmVyZW5jZSB0byBhIHRhc2txdWV1 ZS4NCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4g c3ZuLXNyYy1oZWFkQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczovL2xpc3RzLmZy ZWVic2Qub3JnL21haWxtYW4vbGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJl LCBzZW5kIGFueSBtYWlsIHRvICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmci DQoNClRoaXMgY29tbWl0IHRyYXNoZXMgdGhlIGJ1aWxkIG9mIHBvcnQgeDExL252aWRpYS1kcml2 ZXIgZm9yIGFsbCBvZiBvdXIgbnZpZGlhIGVxdWlwdGVkIENVUlJFTlQNCmhvc3RzOg0KWy4uLl0N Cg0KPT09PiBzcmMvbnZpZGlhLW1vZGVzZXQgKGFsbCkNCm1hY2hpbmUgLT4gL3Vzci9zcmMvc3lz L2FtZDY0L2luY2x1ZGUNCng4NiAtPiAvdXNyL3NyYy9zeXMveDg2L2luY2x1ZGUNCnRvdWNoIG9w dF9nbG9iYWwuaA0KY2MgIC1PMiAtcGlwZSAtbWFyY2g9bmF0aXZlIC1mbm8tc3RyaWN0LWFsaWFz aW5nIC1ETlZfVkVSU0lPTl9TVFJJTkc9XCI0NDAuMzFcIg0KLSAtRE5WX1NQRUNUUkVfVjI9MSAt V2Vycm9yPXVuZGVmIC1tYXJjaD1uYXRpdmUgIC1XZXJyb3IgLURfS0VSTkVMIC1ES0xEX01PRFVM RSAtbm9zdGRpbmMNCi0gLUltYWNoaW5lIC1JL3Vzci9zcmMvc3lzL3N5cyAtSS4uL2NvbW1vbi9p bmMgLWluY2x1ZGUNCi91c3Ivb2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQvc3lzL1RIT1IvdXNyL3Bv cnRzL3gxMS9udmlkaWEtZHJpdmVyL3dvcmsvTlZJRElBLUZyZWVCU0QteDg2XzY0LTQ0MC4zMS9z cmMvbnZpZGlhLW1vZGVzZXQvb3B0X2dsb2JhbC5oDQotIC1JLiAtSS91c3Ivc3JjL3N5cyAtSS91 c3Ivc3JjL3N5cy9jb250cmliL2NrL2luY2x1ZGUgLWZuby1jb21tb24gIC1mbm8tb21pdC1mcmFt ZS1wb2ludGVyDQotIC1tbm8tb21pdC1sZWFmLWZyYW1lLXBvaW50ZXIgLWZkZWJ1Zy1wcmVmaXgt bWFwPS4vbWFjaGluZT0vdXNyL3NyYy9zeXMvYW1kNjQvaW5jbHVkZQ0KLSAtZmRlYnVnLXByZWZp eC1tYXA9Li94ODY9L3Vzci9zcmMvc3lzL3g4Ni9pbmNsdWRlICAgICAtTUQgIC1NRi5kZXBlbmQu bnZpZGlhLW1vZGVzZXQtZnJlZWJzZC5vDQotIC1NVG52aWRpYS1tb2Rlc2V0LWZyZWVic2QubyAt bWNtb2RlbD1rZXJuZWwgLW1uby1yZWQtem9uZSAtbW5vLW1teCAtbW5vLXNzZSAtbXNvZnQtZmxv YXQNCi0gLWZuby1hc3luY2hyb25vdXMtdW53aW5kLXRhYmxlcyAtZmZyZWVzdGFuZGluZyAtZndy YXB2IC1mc3RhY2stcHJvdGVjdG9yIC1XYWxsDQotIC1XcmVkdW5kYW50LWRlY2xzIC1XbmVzdGVk LWV4dGVybnMgLVdzdHJpY3QtcHJvdG90eXBlcyAtV21pc3NpbmctcHJvdG90eXBlcyAtV3BvaW50 ZXItYXJpdGgNCi0gLVdjYXN0LXF1YWwgLVd1bmRlZiAtV25vLXBvaW50ZXItc2lnbiAtRF9fcHJp bnRmX189X19mcmVlYnNkX2twcmludGZfXyAtV21pc3NpbmctaW5jbHVkZS1kaXJzDQotIC1mZGlh Z25vc3RpY3Mtc2hvdy1vcHRpb24gLVduby11bmtub3duLXByYWdtYXMgLVduby1lcnJvci10YXV0 b2xvZ2ljYWwtY29tcGFyZQ0KLSAtV25vLWVycm9yLWVtcHR5LWJvZHkgLVduby1lcnJvci1wYXJl bnRoZXNlcy1lcXVhbGl0eSAtV25vLWVycm9yLXVudXNlZC1mdW5jdGlvbg0KLSAtV25vLWVycm9y LXBvaW50ZXItc2lnbiAtV25vLWVycm9yLXNoaWZ0LW5lZ2F0aXZlLXZhbHVlIC1Xbm8tYWRkcmVz cy1vZi1wYWNrZWQtbWVtYmVyDQotIC1Xbm8tZm9ybWF0LXplcm8tbGVuZ3RoICAgLW1uby1hZXMg LW1uby1hdnggIC1zdGQ9aXNvOTg5OToxOTk5IC1jIG52aWRpYS1tb2Rlc2V0LWZyZWVic2QuYyAt bw0KbnZpZGlhLW1vZGVzZXQtZnJlZWJzZC5vIG52aWRpYS1tb2Rlc2V0LWZyZWVic2QuYzo0MTM6 NTogZXJyb3I6IGltcGxpY2l0IGRlY2xhcmF0aW9uIG9mDQpmdW5jdGlvbiAnTVBBU1MnIGlzIGlu dmFsaWQgaW4gQzk5IFstV2Vycm9yLC1XaW1wbGljaXQtZnVuY3Rpb24tZGVjbGFyYXRpb25dDQpU QVNLX0lOSVQoJnRpbWVyLT50YXNrLCBeIC91c3Ivc3JjL3N5cy9zeXMvdGFza3F1ZXVlLmg6MTMy OjMxOiBub3RlOiBleHBhbmRlZCBmcm9tIG1hY3JvDQonVEFTS19JTklUJyAjZGVmaW5lIFRBU0tf SU5JVCh0LCBwLCBmLCBjKSAgIFRBU0tfSU5JVF9GTEFHUyh0LCBwLCBmLCBjLCAwKSBeDQovdXNy L3NyYy9zeXMvc3lzL3Rhc2txdWV1ZS5oOjEyNDoyOiBub3RlOiBleHBhbmRlZCBmcm9tIG1hY3Jv ICdUQVNLX0lOSVRfRkxBR1MnDQpNUEFTUygocHJpb3JpdHkpID49IDAgJiYgKHByaW9yaXR5KSA8 PSAyNTUpOyAgICAgICAgICAgIFwgXiAxIGVycm9yIGdlbmVyYXRlZC4gKioqIEVycm9yIGNvZGUg MQ0KDQoNCg0KLSAtLSANCk8uIEhhcnRtYW5uDQoNCkljaCB3aWRlcnNwcmVjaGUgZGVyIE51dHp1 bmcgb2RlciDDnGJlcm1pdHRsdW5nIG1laW5lciBEYXRlbiBmw7xyDQpXZXJiZXp3ZWNrZSBvZGVy IGbDvHIgZGllIE1hcmt0LSBvZGVyIE1laW51bmdzZm9yc2NodW5nICjCpyAyOCBBYnMuIDQgQkRT RykuDQotLS0tLUJFR0lOIFBHUCBTSUdOQVRVUkUtLS0tLQ0KDQppSFVFQVJZSUFCMFdJUVN5OElC eEFQRGtxVkJhVEo0NE4xWlpQYmE1UndVQ1hrTUtsQUFLQ1JBNE4xWlpQYmE1DQpSL0JBQVA5Zksy R1NiMkdlU0VOTjZBWjFWcEczc3c0UUc5MW11NWNaUU1PVGg5L0ppZ0VBNWFQZzRBWkExbFcrDQo4 VnM0WGZCWjJkYUdMaFZwVXgwUklTQ29RRDB4UHd3PQ0KPTBmdS8NCi0tLS0tRU5EIFBHUCBTSUdO QVRVUkUtLS0tLQ0K From owner-svn-src-all@freebsd.org Tue Feb 11 20:12:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEA78242D0C; Tue, 11 Feb 2020 20:12:48 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48HDTq5lpbz4cKn; Tue, 11 Feb 2020 20:12:47 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581451966; bh=knveMaumNLCYAichvCOgj0/Jm61Y0AuwL3Zp+EwApP4=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=B/kEzY7D/kCf2F+1EYVWQiKavkqpzU+EXUNjgCezhbdF+E8dM6ALamCbDiQtwQCSU taHTVtB0rSqHPSlyEq7aRN17sD+aSxqF1ec5hfkXG6ZDlTU8ybFi0DJEWuDEZf8nRN fIZn8QyqIQJXQJzq43VXc0CsHA486bIcwVEelPYA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([89.14.102.85]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8GMq-1jWfKY21Sq-014CHb; Tue, 11 Feb 2020 21:12:46 +0100 Date: Tue, 11 Feb 2020 21:12:18 +0100 From: "O. Hartmann" To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357776 - head/sys/vm Message-ID: <20200211211245.642a09fa@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202002112006.01BK6Xji039095@repo.freebsd.org> References: <202002112006.01BK6Xji039095@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:sdViSKpZ7HFNr81fCXYmtxYd+dVqWrc4dXTjjSo/LZ8bCJJPRcz 41HfCdDVw2bcxgGf3Wbgz/RBZfpVRSkUMb4liCmKfAGEPN8z0VXRWm8HN4Fn0acRJvyW5QD Xp8xI36PHt2DPtY3g2m3NaCZYxUEIf2IeT2qf/oT0naWLwTK1ecQC5Wc641oh8F9GAJxf+n raqTUlHw91Y2BVQEIznjQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:PMhqTT8l9jE=:anKnfDHC7/sH05u3wbd3R/ BQMfoniCZ8+Hjl490vicx7uQIGelqOOczqxtAw+hlEK8C58G0axCqivn+jfxwyMIymEG+JHpB o5OJKey0gZdyJzEwjaAqwLJOjder6wUvw151TYQPej4SK/b+G+nBaN5qtGibqoBwaQQcg2c0t tdO9PZqLQ80FNKtL9uVDfqpFQ2NLitbVfhyLrnLHKnDXOh2yoa9DahwSrPy94L3pstNOJNTBS mF5PxO0yJxpR3OXDxTt/LR2rkdVYnL408GC+G4DzHc6PTYT4CsDtyY1HLl1KrPg/oDxtuMMfH +JH3AIv4SJeE74sdVPbFzYTQV7ApbeAbg+26J3dXVdsGhRiF10vwS3Wcme25TZU5r7bMltSJp Cx/kTvCPEddkxH8o63oaZHPijS8/Hl7/RkS7hwLB1l02oOoci412B3OE6Ck99u7/7axkIQfzC D97slWfOb/4WVQ83i9APCSSsQ6bahwhNJ8X4DsxTPdUlmTv+qIOezws9AShH2+zX9Sh4YN9ii JhaoECdGaGdYUd9v4cT8NdhFRnNBHRw/fqJMF/FdKykjeikXLbetLOncv//IZUVOu9OUZU7wI Xioi/WDq3qKwHVbz+noKa/Ql5DNGxpilGcGLBJWTOH48K/PAsYaJATKF0ZL3qWr6ZNPnyR9pw XXi3O9TbDe++s9m+St/RAUyefvpdf1g0U0ZG0q+stRpS3DXc4DhO33lE9PSe6N4+wrF/1vp9l qUbqOThpAf4R/hl8uo420xogdGJY/IA471WFZKy9k28kRSIKFehI1nNrTmuC2imelf6E3LwIw RPNh0oOu2JQmj3qkpINkJEA97nkcEztagnVgejFHoK7GO/7r0auFH4/aP+5Y2Vc7cKOsiu2TT 8NTwiX29XNaYEOQNTGQMSFQx2Vj0BTcaDl/oV1pT0TBcVGVPG8bITTuUrABGo9B1W9RyGENhC GY+i+uSd6nnEv30k/4rEA6mkFvCijhmAga6+KgufIm3OJoKArh7vUaSqlcqxbkAqho9umc4fw NdSP2YFR7aC2gPAxj+GOLvuVIKMqTN267sRnTAuZrb9eDxRqbvaxUsvhOJiNYDJD1aAxDEBsL c/Xz5tB1tsPa0bVBj3saTGxS0SQr4728oSiAbE47BO3ik7ZKTTDShTaFpS20HK5fxd4LNrRJf SHYoryj74U4r9tpqsPArW0uWHC+xOkSkyC3ToExCj0P6+4PrLqOHLQB/vCPkdTUDndHguBzdW jjvp5bJnrTzZSbKJv X-Rspamd-Queue-Id: 48HDTq5lpbz4cKn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=B/kEzY7D; dmarc=none; spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy when checking 212.227.17.22) smtp.mailfrom=ohartmann@walstatt.org X-Spamd-Result: default: False [-3.22 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ORG_HEADER(0.00)[]; IP_SCORE(-0.92)[ip: (-5.68), ipnet: 212.227.0.0/16(-1.12), asn: 8560(2.22), country: DE(-0.02)]; DKIM_TRACE(0.00)[gmx.net:+]; MIME_BASE64_TEXT(0.10)[]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[22.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[85.102.14.89.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:12:48 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFR1 ZSwgMTEgRmViIDIwMjAgMjA6MDY6MzMgKzAwMDAgKFVUQykNCk1hcmsgSm9obnN0b24gPG1hcmtq QEZyZWVCU0Qub3JnPiBzY2hyaWViOg0KDQo+IEF1dGhvcjogbWFya2oNCj4gRGF0ZTogVHVlIEZl YiAxMSAyMDowNjozMyAyMDIwDQo+IE5ldyBSZXZpc2lvbjogMzU3Nzc2DQo+IFVSTDogaHR0cHM6 Ly9zdm53ZWIuZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMzU3Nzc2DQo+IA0KPiBMb2c6DQo+ ICAgUmVkdWNlIGxvY2sgaG9sZCB0aW1lIGluIGtlZ19kcmFpbigpLg0KPiAgIA0KPiAgIE1haW50 YWluIGEgY291bnQgb2YgZnJlZSBzbGFicyBpbiB0aGUgcGVyLWRvbWFpbiBrZWcgc3RydWN0dXJl IGFuZCB1c2UNCj4gICB0aGF0IHRvIGNsZWFyIHRoZSBmcmVlIHNsYWIgbGlzdCBpbiBjb25zdGFu dCB0aW1lIGZvciBtb3N0IGNhc2VzLiAgVGhpcw0KPiAgIGhlbHBzIG1pbmltaXplIGxvY2sgY29u dGVudGlvbiBpbmR1Y2VkIGJ5IHJlY2xhbWF0aW9uLCBpbiBwcmVwYXJhdGlvbg0KPiAgIGZvciBw cm9hY3RpdmUgdHJpbW1pbmcgb2YgZXhjZXNzZXMgb2YgZnJlZSBtZW1vcnkuDQo+ICAgDQo+ICAg UmV2aWV3ZWQgYnk6CWplZmYsIHJsaWJieQ0KPiAgIFRlc3RlZCBieToJcGhvDQo+ICAgRGlmZmVy ZW50aWFsIFJldmlzaW9uOglodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDIzNTMyDQo+IA0K PiBNb2RpZmllZDoNCj4gICBoZWFkL3N5cy92bS91bWFfY29yZS5jDQo+ICAgaGVhZC9zeXMvdm0v dW1hX2ludC5oDQo+IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvdm0vdW1hX2NvcmUuYw0KPiA9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL3ZtL3VtYV9jb3JlLmMJVHVlIEZlYiAx MSAyMDowMjoyMCAyMDIwCShyMzU3Nzc1KQ0KPiArKysgaGVhZC9zeXMvdm0vdW1hX2NvcmUuYwlU dWUgRmViIDExIDIwOjA2OjMzIDIwMjAJKHIzNTc3NzYpDQo+IEBAIC0xMjU4LDM5ICsxMjU4LDM0 IEBAIGtlZ19mcmVlX3NsYWIodW1hX2tlZ190IGtlZywgdW1hX3NsYWJfdCBzbGFiLCBpbnQgc3Rh cg0KPiAgc3RhdGljIHZvaWQNCj4gIGtlZ19kcmFpbih1bWFfa2VnX3Qga2VnKQ0KPiAgew0KPiAt CXN0cnVjdCBzbGFiaGVhZCBmcmVlc2xhYnMgPSB7IDAgfTsNCj4gKwlzdHJ1Y3Qgc2xhYmhlYWQg ZnJlZXNsYWJzOw0KPiAgCXVtYV9kb21haW5fdCBkb207DQo+ICAJdW1hX3NsYWJfdCBzbGFiLCB0 bXA7DQo+ICAJaW50IGksIG47DQo+ICANCj4gLQkvKg0KPiAtCSAqIFdlIGRvbid0IHdhbnQgdG8g dGFrZSBwYWdlcyBmcm9tIHN0YXRpY2FsbHkgYWxsb2NhdGVkIGtlZ3MgYXQgdGhpcw0KPiAtCSAq IHRpbWUNCj4gLQkgKi8NCj4gIAlpZiAoa2VnLT51a19mbGFncyAmIFVNQV9aT05FX05PRlJFRSB8 fCBrZWctPnVrX2ZyZWVmID09IE5VTEwpDQo+ICAJCXJldHVybjsNCj4gIA0KPiAgCWZvciAoaSA9 IDA7IGkgPCB2bV9uZG9tYWluczsgaSsrKSB7DQo+ICAJCUNUUjQoS1RSX1VNQSwgImtlZ19kcmFp biAlcyglcCkgZG9tYWluICVkIGZyZWUgaXRlbXM6ICV1IiwNCj4gLQkJICAgIGtlZy0+dWtfbmFt ZSwga2VnLCBpLCBkb20tPnVkX2ZyZWUpOw0KPiAtCQluID0gMDsNCj4gKwkJICAgIGtlZy0+dWtf bmFtZSwga2VnLCBpLCBkb20tPnVkX2ZyZWVfaXRlbXMpOw0KPiAgCQlkb20gPSAma2VnLT51a19k b21haW5baV07DQo+ICsJCUxJU1RfSU5JVCgmZnJlZXNsYWJzKTsNCj4gKw0KPiAgCQlLRUdfTE9D SyhrZWcsIGkpOw0KPiAtCQlMSVNUX0ZPUkVBQ0hfU0FGRShzbGFiLCAmZG9tLT51ZF9mcmVlX3Ns YWIsIHVzX2xpbmssIHRtcCkgew0KPiAtCQkJaWYgKGtlZy0+dWtfZmxhZ3MgJiBVTUFfWkZMQUdf SEFTSCkNCj4gKwkJaWYgKChrZWctPnVrX2ZsYWdzICYgVU1BX1pGTEFHX0hBU0gpICE9IDApIHsN Cj4gKwkJCUxJU1RfRk9SRUFDSChzbGFiLCAmZG9tLT51ZF9mcmVlX3NsYWIsIHVzX2xpbmspDQo+ ICAJCQkJVU1BX0hBU0hfUkVNT1ZFKCZrZWctPnVrX2hhc2gsIHNsYWIpOw0KPiAtCQkJbisrOw0K PiAtCQkJTElTVF9SRU1PVkUoc2xhYiwgdXNfbGluayk7DQo+IC0JCQlMSVNUX0lOU0VSVF9IRUFE KCZmcmVlc2xhYnMsIHNsYWIsIHVzX2xpbmspOw0KPiAgCQl9DQo+ICsJCW4gPSBkb20tPnVkX2Zy ZWVfc2xhYnM7DQo+ICsJCUxJU1RfU1dBUCgmZnJlZXNsYWJzLCAmZG9tLT51ZF9mcmVlX3NsYWIs IHVtYV9zbGFiLCB1c19saW5rKTsNCj4gKwkJZG9tLT51ZF9mcmVlX3NsYWJzID0gMDsNCj4gKwkJ ZG9tLT51ZF9mcmVlX2l0ZW1zIC09IG4gKiBrZWctPnVrX2lwZXJzOw0KPiAgCQlkb20tPnVkX3Bh Z2VzIC09IG4gKiBrZWctPnVrX3BwZXJhOw0KPiAtCQlkb20tPnVkX2ZyZWUgLT0gbiAqIGtlZy0+ dWtfaXBlcnM7DQo+ICAJCUtFR19VTkxPQ0soa2VnLCBpKTsNCj4gLQl9DQo+ICANCj4gLQl3aGls ZSAoKHNsYWIgPSBMSVNUX0ZJUlNUKCZmcmVlc2xhYnMpKSAhPSBOVUxMKSB7DQo+IC0JCUxJU1Rf UkVNT1ZFKHNsYWIsIHVzX2xpbmspOw0KPiAtCQlrZWdfZnJlZV9zbGFiKGtlZywgc2xhYiwga2Vn LT51a19pcGVycyk7DQo+ICsJCUxJU1RfRk9SRUFDSF9TQUZFKHNsYWIsICZmcmVlc2xhYnMsIHVz X2xpbmssIHRtcCkNCj4gKwkJCWtlZ19mcmVlX3NsYWIoa2VnLCBzbGFiLCBrZWctPnVrX2lwZXJz KTsNCj4gIAl9DQo+ICB9DQo+ICANCj4gQEAgLTE0NTgsNyArMTQ1Myw3IEBAIGtlZ19hbGxvY19z bGFiKHVtYV9rZWdfdCBrZWcsIHVtYV96b25lX3Qgem9uZSwgaW50IGRvbQ0KPiAgCWRvbSA9ICZr ZWctPnVrX2RvbWFpbltkb21haW5dOw0KPiAgCUxJU1RfSU5TRVJUX0hFQUQoJmRvbS0+dWRfcGFy dF9zbGFiLCBzbGFiLCB1c19saW5rKTsNCj4gIAlkb20tPnVkX3BhZ2VzICs9IGtlZy0+dWtfcHBl cmE7DQo+IC0JZG9tLT51ZF9mcmVlICs9IGtlZy0+dWtfaXBlcnM7DQo+ICsJZG9tLT51ZF9mcmVl X2l0ZW1zICs9IGtlZy0+dWtfaXBlcnM7DQo+ICANCj4gIAlyZXR1cm4gKHNsYWIpOw0KPiAgDQo+ IEBAIC0yMjg2LDcgKzIyODEsNyBAQCB6b25lX2FsbG9jX3N5c2N0bCh1bWFfem9uZV90IHpvbmUs IHZvaWQgKnVudXNlZCkNCj4gIAkJCSAgICAicGFnZXMiLCBDVExGTEFHX1JELCAmZG9tLT51ZF9w YWdlcywgMCwNCj4gIAkJCSAgICAiVG90YWwgcGFnZXMgY3VycmVudGx5IGFsbG9jYXRlZCBmcm9t IFZNIik7DQo+ICAJCQlTWVNDVExfQUREX1UzMihOVUxMLCBTWVNDVExfQ0hJTERSRU4ob2lkKSwg T0lEX0FVVE8sDQo+IC0JCQkgICAgImZyZWUiLCBDVExGTEFHX1JELCAmZG9tLT51ZF9mcmVlLCAw LA0KPiArCQkJICAgICJmcmVlX2l0ZW1zIiwgQ1RMRkxBR19SRCwgJmRvbS0+dWRfZnJlZV9pdGVt cywgMCwNCj4gIAkJCSAgICAiaXRlbXMgZnJlZSBpbiB0aGUgc2xhYiBsYXllciIpOw0KPiAgCQl9 DQo+ICAJfSBlbHNlDQo+IEBAIC0yNTcyLDcgKzI1NjcsNyBAQCBrZWdfZHRvcih2b2lkICphcmcs IGludCBzaXplLCB2b2lkICp1ZGF0YSkNCj4gIAlrZWcgPSAodW1hX2tlZ190KWFyZzsNCj4gIAlm cmVlID0gcGFnZXMgPSAwOw0KPiAgCWZvciAoaSA9IDA7IGkgPCB2bV9uZG9tYWluczsgaSsrKSB7 DQo+IC0JCWZyZWUgKz0ga2VnLT51a19kb21haW5baV0udWRfZnJlZTsNCj4gKwkJZnJlZSArPSBr ZWctPnVrX2RvbWFpbltpXS51ZF9mcmVlX2l0ZW1zOw0KPiAgCQlwYWdlcyArPSBrZWctPnVrX2Rv bWFpbltpXS51ZF9wYWdlczsNCj4gIAkJS0VHX0xPQ0tfRklOSShrZWcsIGkpOw0KPiAgCX0NCj4g QEAgLTMzODYsMTEgKzMzODEsMTEgQEAga2VnX2ZpcnN0X3NsYWIodW1hX2tlZ190IGtlZywgaW50 IGRvbWFpbiwgYm9vbCBycikNCj4gIAlzdGFydCA9IGRvbWFpbjsNCj4gIAlkbyB7DQo+ICAJCWRv bSA9ICZrZWctPnVrX2RvbWFpbltkb21haW5dOw0KPiAtCQlpZiAoIUxJU1RfRU1QVFkoJmRvbS0+ dWRfcGFydF9zbGFiKSkNCj4gLQkJCXJldHVybiAoTElTVF9GSVJTVCgmZG9tLT51ZF9wYXJ0X3Ns YWIpKTsNCj4gLQkJaWYgKCFMSVNUX0VNUFRZKCZkb20tPnVkX2ZyZWVfc2xhYikpIHsNCj4gLQkJ CXNsYWIgPSBMSVNUX0ZJUlNUKCZkb20tPnVkX2ZyZWVfc2xhYik7DQo+ICsJCWlmICgoc2xhYiA9 IExJU1RfRklSU1QoJmRvbS0+dWRfcGFydF9zbGFiKSkgIT0gTlVMTCkNCj4gKwkJCXJldHVybiAo c2xhYik7DQo+ICsJCWlmICgoc2xhYiA9IExJU1RfRklSU1QoJmRvbS0+dWRfZnJlZV9zbGFiKSkg IT0gTlVMTCkgew0KPiAgCQkJTElTVF9SRU1PVkUoc2xhYiwgdXNfbGluayk7DQo+ICsJCQlkb20t PnVkX2ZyZWVfc2xhYnMtLTsNCj4gIAkJCUxJU1RfSU5TRVJUX0hFQUQoJmRvbS0+dWRfcGFydF9z bGFiLCBzbGFiLCB1c19saW5rKTsNCj4gIAkJCXJldHVybiAoc2xhYik7DQo+ICAJCX0NCj4gQEAg LTM0MTcsNyArMzQxMiw3IEBAIGtlZ19mZXRjaF9mcmVlX3NsYWIodW1hX2tlZ190IGtlZywgaW50 IGRvbWFpbiwgYm9vbCBycg0KPiAgDQo+ICAJS0VHX0xPQ0soa2VnLCBkb21haW4pOw0KPiAgCXJl c2VydmUgPSAoZmxhZ3MgJiBNX1VTRV9SRVNFUlZFKSAhPSAwID8gMCA6IGtlZy0+dWtfcmVzZXJ2 ZTsNCj4gLQlpZiAoa2VnLT51a19kb21haW5bZG9tYWluXS51ZF9mcmVlIDw9IHJlc2VydmUgfHwN Cj4gKwlpZiAoa2VnLT51a19kb21haW5bZG9tYWluXS51ZF9mcmVlX2l0ZW1zIDw9IHJlc2VydmUg fHwNCj4gIAkgICAgKHNsYWIgPSBrZWdfZmlyc3Rfc2xhYihrZWcsIGRvbWFpbiwgcnIpKSA9PSBO VUxMKSB7DQo+ICAJCUtFR19VTkxPQ0soa2VnLCBkb21haW4pOw0KPiAgCQlyZXR1cm4gKE5VTEwp Ow0KPiBAQCAtMzUwMiw5ICszNDk3LDEzIEBAIHNsYWJfYWxsb2NfaXRlbSh1bWFfa2VnX3Qga2Vn LCB1bWFfc2xhYl90IHNsYWIpDQo+ICAJQklUX0NMUihrZWctPnVrX2lwZXJzLCBmcmVlaSwgJnNs YWItPnVzX2ZyZWUpOw0KPiAgCWl0ZW0gPSBzbGFiX2l0ZW0oc2xhYiwga2VnLCBmcmVlaSk7DQo+ ICAJc2xhYi0+dXNfZnJlZWNvdW50LS07DQo+IC0JZG9tLT51ZF9mcmVlLS07DQo+ICsJZG9tLT51 ZF9mcmVlX2l0ZW1zLS07DQo+ICANCj4gLQkvKiBNb3ZlIHRoaXMgc2xhYiB0byB0aGUgZnVsbCBs aXN0ICovDQo+ICsJLyoNCj4gKwkgKiBNb3ZlIHRoaXMgc2xhYiB0byB0aGUgZnVsbCBsaXN0LiAg SXQgbXVzdCBiZSBvbiB0aGUgcGFydGlhbCBsaXN0LCBzbw0KPiArCSAqIHdlIGRvIG5vdCBuZWVk IHRvIHVwZGF0ZSB0aGUgZnJlZSBzbGFiIGNvdW50LiAgSW4gcGFydGljdWxhciwNCj4gKwkgKiBr ZWdfZmV0Y2hfc2xhYigpIGFsd2F5cyByZXR1cm5zIHNsYWJzIG9uIHRoZSBwYXJ0aWFsIGxpc3Qu DQo+ICsJICovDQo+ICAJaWYgKHNsYWItPnVzX2ZyZWVjb3VudCA9PSAwKSB7DQo+ICAJCUxJU1Rf UkVNT1ZFKHNsYWIsIHVzX2xpbmspOw0KPiAgCQlMSVNUX0lOU0VSVF9IRUFEKCZkb20tPnVkX2Z1 bGxfc2xhYiwgc2xhYiwgdXNfbGluayk7DQo+IEBAIC0zNTM4LDcgKzM1MzcsNyBAQCB6b25lX2lt cG9ydCh2b2lkICphcmcsIHZvaWQgKipidWNrZXQsIGludCBtYXgsIGludCBkb20NCj4gIAkJZG9t ID0gJmtlZy0+dWtfZG9tYWluW3NsYWItPnVzX2RvbWFpbl07DQo+ICAJCXdoaWxlIChzbGFiLT51 c19mcmVlY291bnQgJiYgaSA8IG1heCkgeyANCj4gIAkJCWJ1Y2tldFtpKytdID0gc2xhYl9hbGxv Y19pdGVtKGtlZywgc2xhYik7DQo+IC0JCQlpZiAoZG9tLT51ZF9mcmVlIDw9IGtlZy0+dWtfcmVz ZXJ2ZSkNCj4gKwkJCWlmIChkb20tPnVkX2ZyZWVfaXRlbXMgPD0ga2VnLT51a19yZXNlcnZlKQ0K PiAgCQkJCWJyZWFrOw0KPiAgI2lmZGVmIE5VTUENCj4gIAkJCS8qDQo+IEBAIC00MjQwLDkgKzQy MzksMTAgQEAgc2xhYl9mcmVlX2l0ZW0odW1hX3pvbmVfdCB6b25lLCB1bWFfc2xhYl90IHNsYWIs IHZvaWQgDQo+ICANCj4gIAkvKiBEbyB3ZSBuZWVkIHRvIHJlbW92ZSBmcm9tIGFueSBsaXN0cz8g Ki8NCj4gIAlkb20gPSAma2VnLT51a19kb21haW5bc2xhYi0+dXNfZG9tYWluXTsNCj4gLQlpZiAo c2xhYi0+dXNfZnJlZWNvdW50KzEgPT0ga2VnLT51a19pcGVycykgew0KPiArCWlmIChzbGFiLT51 c19mcmVlY291bnQgKyAxID09IGtlZy0+dWtfaXBlcnMpIHsNCj4gIAkJTElTVF9SRU1PVkUoc2xh YiwgdXNfbGluayk7DQo+ICAJCUxJU1RfSU5TRVJUX0hFQUQoJmRvbS0+dWRfZnJlZV9zbGFiLCBz bGFiLCB1c19saW5rKTsNCj4gKwkJZG9tLT51ZF9mcmVlX3NsYWJzKys7DQo+ICAJfSBlbHNlIGlm IChzbGFiLT51c19mcmVlY291bnQgPT0gMCkgew0KPiAgCQlMSVNUX1JFTU9WRShzbGFiLCB1c19s aW5rKTsNCj4gIAkJTElTVF9JTlNFUlRfSEVBRCgmZG9tLT51ZF9wYXJ0X3NsYWIsIHNsYWIsIHVz X2xpbmspOw0KPiBAQCAtNDI1NCw3ICs0MjU0LDcgQEAgc2xhYl9mcmVlX2l0ZW0odW1hX3pvbmVf dCB6b25lLCB1bWFfc2xhYl90IHNsYWIsIHZvaWQgDQo+ICAJc2xhYi0+dXNfZnJlZWNvdW50Kys7 DQo+ICANCj4gIAkvKiBLZWcgc3RhdGlzdGljcy4gKi8NCj4gLQlkb20tPnVkX2ZyZWUrKzsNCj4g Kwlkb20tPnVkX2ZyZWVfaXRlbXMrKzsNCj4gIH0NCj4gIA0KPiAgc3RhdGljIHZvaWQNCj4gQEAg LTQ2MzUsOSArNDYzNSwxNCBAQCB1bWFfcHJlYWxsb2ModW1hX3pvbmVfdCB6b25lLCBpbnQgaXRl bXMpDQo+ICAJCQkgICAgYWZsYWdzKTsNCj4gIAkJCWlmIChzbGFiICE9IE5VTEwpIHsNCj4gIAkJ CQlkb20gPSAma2VnLT51a19kb21haW5bc2xhYi0+dXNfZG9tYWluXTsNCj4gKwkJCQkvKg0KPiAr CQkJCSAqIGtlZ19hbGxvY19zbGFiKCkgYWx3YXlzIHJldHVybnMgYSBzbGFiIG9uIHRoZQ0KPiAr CQkJCSAqIHBhcnRpYWwgbGlzdC4NCj4gKwkJCQkgKi8NCj4gIAkJCQlMSVNUX1JFTU9WRShzbGFi LCB1c19saW5rKTsNCj4gIAkJCQlMSVNUX0lOU0VSVF9IRUFEKCZkb20tPnVkX2ZyZWVfc2xhYiwg c2xhYiwNCj4gIAkJCQkgICAgdXNfbGluayk7DQo+ICsJCQkJZG9tLT51ZF9mcmVlX3NsYWJzKys7 DQo+ICAJCQkJS0VHX1VOTE9DSyhrZWcsIHNsYWItPnVzX2RvbWFpbik7DQo+ICAJCQkJYnJlYWs7 DQo+ICAJCQl9DQo+IEBAIC00OTE1LDcgKzQ5MjAsNyBAQCBzeXNjdGxfdm1fem9uZV9zdGF0cyhT WVNDVExfSEFORExFUl9BUkdTKQ0KPiAgCUxJU1RfRk9SRUFDSChreiwgJnVtYV9rZWdzLCB1a19s aW5rKSB7DQo+ICAJCWtmcmVlID0gcGFnZXMgPSAwOw0KPiAgCQlmb3IgKGkgPSAwOyBpIDwgdm1f bmRvbWFpbnM7IGkrKykgew0KPiAtCQkJa2ZyZWUgKz0ga3otPnVrX2RvbWFpbltpXS51ZF9mcmVl Ow0KPiArCQkJa2ZyZWUgKz0ga3otPnVrX2RvbWFpbltpXS51ZF9mcmVlX2l0ZW1zOw0KPiAgCQkJ cGFnZXMgKz0ga3otPnVrX2RvbWFpbltpXS51ZF9wYWdlczsNCj4gIAkJfQ0KPiAgCQlMSVNUX0ZP UkVBQ0goeiwgJmt6LT51a196b25lcywgdXpfbGluaykgew0KPiBAQCAtNTIxOSw3ICs1MjI0LDcg QEAgZ2V0X3VtYV9zdGF0cyh1bWFfa2VnX3Qga3osIHVtYV96b25lX3QgeiwgdWludDY0X3QgKmFs DQo+ICAJCSpjYWNoZWZyZWUgKz0gei0+dXpfZG9tYWluW2ldLnV6ZF9uaXRlbXM7DQo+ICAJCWlm ICghKCh6LT51el9mbGFncyAmIFVNQV9aT05FX1NFQ09OREFSWSkgJiYNCj4gIAkJICAgIChMSVNU X0ZJUlNUKCZrei0+dWtfem9uZXMpICE9IHopKSkNCj4gLQkJCSpjYWNoZWZyZWUgKz0ga3otPnVr X2RvbWFpbltpXS51ZF9mcmVlOw0KPiArCQkJKmNhY2hlZnJlZSArPSBrei0+dWtfZG9tYWluW2ld LnVkX2ZyZWVfaXRlbXM7DQo+ICAJfQ0KPiAgCSp1c2VkID0gKmFsbG9jcyAtIGZyZWVzOw0KPiAg CXJldHVybiAoKChpbnQ2NF90KSp1c2VkICsgKmNhY2hlZnJlZSkgKiBrei0+dWtfc2l6ZSk7DQo+ IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvdm0vdW1hX2ludC5oDQo+ID09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQ0KPiAtLS0gaGVhZC9zeXMvdm0vdW1hX2ludC5oCVR1ZSBGZWIgMTEgMjA6MDI6MjAgMjAy MAkocjM1Nzc3NSkNCj4gKysrIGhlYWQvc3lzL3ZtL3VtYV9pbnQuaAlUdWUgRmViIDExIDIwOjA2 OjMzIDIwMjAJKHIzNTc3NzYpDQo+IEBAIC0zMjQsNyArMzI0LDggQEAgc3RydWN0IHVtYV9kb21h aW4gew0KPiAgCXN0cnVjdCBzbGFiaGVhZAl1ZF9mcmVlX3NsYWI7CS8qIGNvbXBsZXRlbHkgdW5h bGxvY2F0ZWQgc2xhYnMgKi8NCj4gIAlzdHJ1Y3Qgc2xhYmhlYWQgdWRfZnVsbF9zbGFiOwkvKiBm dWxseSBhbGxvY2F0ZWQgc2xhYnMgKi8NCj4gIAl1aW50MzJfdAl1ZF9wYWdlczsJLyogVG90YWwg cGFnZSBjb3VudCAqLw0KPiAtCXVpbnQzMl90CXVkX2ZyZWU7CS8qIENvdW50IG9mIGl0ZW1zIGZy ZWUgaW4gc2xhYnMgKi8NCj4gKwl1aW50MzJfdAl1ZF9mcmVlX2l0ZW1zOwkvKiBDb3VudCBvZiBp dGVtcyBmcmVlIGluIGFsbCBzbGFicyAqLw0KPiArCXVpbnQzMl90CXVkX2ZyZWVfc2xhYnM7CS8q IENvdW50IG9mIGZyZWUgc2xhYnMgKi8NCj4gIH0gX19hbGlnbmVkKENBQ0hFX0xJTkVfU0laRSk7 DQo+ICANCj4gIHR5cGVkZWYgc3RydWN0IHVtYV9kb21haW4gKiB1bWFfZG9tYWluX3Q7DQo+IF9f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQo+IHN2bi1zcmMt aGVhZEBmcmVlYnNkLm9yZyBtYWlsaW5nIGxpc3QNCj4gaHR0cHM6Ly9saXN0cy5mcmVlYnNkLm9y Zy9tYWlsbWFuL2xpc3RpbmZvL3N2bi1zcmMtaGVhZA0KPiBUbyB1bnN1YnNjcmliZSwgc2VuZCBh bnkgbWFpbCB0byAic3ZuLXNyYy1oZWFkLXVuc3Vic2NyaWJlQGZyZWVic2Qub3JnIg0KDQpUaGlz IGNvbW1pdCBicmVha3MgYnVpbGR3b3JsZDoNCg0KDQpbLi4uXQ0KPT09PiBsaWIvbGliY2FzcGVy L3NlcnZpY2VzL2NhcF9maWxlYXJncyAoYWxsKQ0KLSAtLS0gYWxsX3N1YmRpcl9saWIvbGlibWVt c3RhdCAtLS0NCi0gLS0tIG1lbXN0YXRfdW1hLm8gLS0tDQovdXNyL3NyYy9saWIvbGlibWVtc3Rh dC9tZW1zdGF0X3VtYS5jOjQ3OToyMjogZXJyb3I6IG5vIG1lbWJlciBuYW1lZCAndWRfZnJlZScg aW4gJ3N0cnVjdA0KdW1hX2RvbWFpbicga2VnZnJlZSArPSB1a2QudWRfZnJlZTsNCiAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfn5+IF4N CjEgZXJyb3IgZ2VuZXJhdGVkLg0KLSAtLS0gYWxsX3N1YmRpcl9saWIvbGliaWNvbnZfbW9kdWxl cyAtLS0NCi0gLS0tIGFsbF9zdWJkaXJfbGliL2xpYmljb252X21vZHVsZXMvVklRUiAtLS0NCj09 PT4gbGliL2xpYmljb252X21vZHVsZXMvVklRUiAoYWxsKQ0KDQoNCi0gLS0gDQpPLiBIYXJ0bWFu bg0KDQpJY2ggd2lkZXJzcHJlY2hlIGRlciBOdXR6dW5nIG9kZXIgw5xiZXJtaXR0bHVuZyBtZWlu ZXIgRGF0ZW4gZsO8cg0KV2VyYmV6d2Vja2Ugb2RlciBmw7xyIGRpZSBNYXJrdC0gb2RlciBNZWlu dW5nc2ZvcnNjaHVuZyAowqcgMjggQWJzLiA0IEJEU0cpLg0KLS0tLS1CRUdJTiBQR1AgU0lHTkFU VVJFLS0tLS0NCg0KaUhVRUFSWUlBQjBXSVFTeThJQnhBUERrcVZCYVRKNDROMVpaUGJhNVJ3VUNY a01LdlFBS0NSQTROMVpaUGJhNQ0KUjh0T0FQMFppUmY5RUtoei9RVUJOb1VmWGpsZmpDZDNXdVhp bFFLRk1xTmJPc3RhVmdEL1NreGZCeExFK0MvUA0KbTBqbXo3QWw1QUdhaTlMaWExWDZ5MTVNY3Vx b0hnYz0NCj1QUEZlDQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== From owner-svn-src-all@freebsd.org Tue Feb 11 20:15:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B52F242E61; Tue, 11 Feb 2020 20:15:49 +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) server-signature RSA-PSS (4096 bits) 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 48HDYK3PHXz4cVj; Tue, 11 Feb 2020 20:15:49 +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 700DDDA70; Tue, 11 Feb 2020 20:15:49 +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 01BKFnZj045610; Tue, 11 Feb 2020 20:15:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BKFnwW045609; Tue, 11 Feb 2020 20:15:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002112015.01BKFnwW045609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Feb 2020 20:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357777 - head/lib/libmemstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libmemstat X-SVN-Commit-Revision: 357777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:15:49 -0000 Author: markj Date: Tue Feb 11 20:15:49 2020 New Revision: 357777 URL: https://svnweb.freebsd.org/changeset/base/357777 Log: libmemstat: Catch up with r357776. Reported by: O. Hartmann Modified: head/lib/libmemstat/memstat_uma.c Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Tue Feb 11 20:06:33 2020 (r357776) +++ head/lib/libmemstat/memstat_uma.c Tue Feb 11 20:15:49 2020 (r357777) @@ -476,7 +476,7 @@ skip_percpu: ret = kread(kvm, &kzp->uk_domain[i], &ukd, sizeof(ukd), 0); if (ret != 0) - kegfree += ukd.ud_free; + kegfree += ukd.ud_free_items; } mtp->mt_kegfree = kegfree; mtp->mt_free += mtp->mt_kegfree; From owner-svn-src-all@freebsd.org Tue Feb 11 20:16:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 271C7242F0A; Tue, 11 Feb 2020 20:16:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48HDZL3MCGz4cdp; Tue, 11 Feb 2020 20:16:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x832.google.com with SMTP id t13so9038023qto.3; Tue, 11 Feb 2020 12:16:42 -0800 (PST) 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=r2nIPBmLJ2AtZe5woLmfpVVuf8eAGTN8BHTgppYZy5E=; b=FRBMuQBLStBUvutDoW4U5hZlez0+CBd6k4BYculJ0QJ7CbxB3QvvFqGJ2bxT7PBc+U QgfwsQg1BsTDfBk+Gp0ets8cYECX2IZvq2seg2+iwUmr3+ekOwCkv+pcpmgPzdhsXPXx 9Um2ShagC9cJTIoVdtnIxCo4f7laPfCdbE3DBVuz7wUNKYw/WxjJ1h/ie9e1FCo+JY+g qyMYP39tF375x9uRqK52cADmE7KE/pE5jmTfzCaC/2cZxn9DjrfyWQaKYxa/+r1smMK/ ewBXVQjPv6U7yRUSvdWrAgdSiQM4lTcmoOe3ee8eJlE/GTQ7EB/w0OOPGu8zI2tiY2UD curg== 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=r2nIPBmLJ2AtZe5woLmfpVVuf8eAGTN8BHTgppYZy5E=; b=t+wQubQkMOngSkiZGzekKJuYEm2dQ3YkSQb/6Q7ghV2wbWjYZ9hwhWtQdPRdNS5RF3 GZ01QOpyjVDyVtiqyQLQrtXhXfTjfwhTF7JZRwbSuasoiEI6mhs0ZVowJHvrvZo11GOm UHMTYdvyRQG1FaKPGMxLUNpVfACxuHoxqOtDoPBu5l9gTjdEMcl5E878QPBuZ4056Ip2 Ok9ryRCwEcpsINtsF3RvbPIQTAprJJT/3RdAiFuJI9VUSQoi/GfATMWpI3PAax/rLfXS 5CgTTETa94f9rd+ITJyqPYDBM3roFllQjOt/t802l4fMCTCIbGhJ1+wSai42RNku6S8l WA4w== X-Gm-Message-State: APjAAAW6He7wwWypIvyxEMRrnVvjJMy+vcIfn4eGUHS2LCGZOpc6GSLw ITSaiPn0H6nnVihfMkPycvF+If27 X-Google-Smtp-Source: APXvYqzWfhjcOkoyCxUL5oxtkXIrrlJNF8Z9FSfvrjkpl1E4MzVH3hP4IgfomwIJbrEzkjiG96zG3g== X-Received: by 2002:aed:2f62:: with SMTP id l89mr4071438qtd.358.1581452201350; Tue, 11 Feb 2020 12:16:41 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id p26sm2511018qkp.34.2020.02.11.12.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 12:16:40 -0800 (PST) Sender: Mark Johnston Date: Tue, 11 Feb 2020 15:16:38 -0500 From: Mark Johnston To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357776 - head/sys/vm Message-ID: <20200211201638.GG68523@raichu> References: <202002112006.01BK6Xji039095@repo.freebsd.org> <20200211211245.642a09fa@thor.intern.walstatt.dynvpn.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200211211245.642a09fa@thor.intern.walstatt.dynvpn.de> X-Rspamd-Queue-Id: 48HDZL3MCGz4cdp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=FRBMuQBL; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::832 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-4.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.60)[ip: (-9.32), ipnet: 2607:f8b0::/32(-1.94), asn: 15169(-1.71), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; 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] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:16:43 -0000 On Tue, Feb 11, 2020 at 09:12:18PM +0100, O. Hartmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am Tue, 11 Feb 2020 20:06:33 +0000 (UTC) > Mark Johnston schrieb: > > > Author: markj > > Date: Tue Feb 11 20:06:33 2020 > > New Revision: 357776 > > URL: https://svnweb.freebsd.org/changeset/base/357776 > > > > Log: > > Reduce lock hold time in keg_drain(). > > > > Maintain a count of free slabs in the per-domain keg structure and use > > that to clear the free slab list in constant time for most cases. This > > helps minimize lock contention induced by reclamation, in preparation > > for proactive trimming of excesses of free memory. > > This commit breaks buildworld: Sorry, fixed by r357777. From owner-svn-src-all@freebsd.org Tue Feb 11 20:41:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85D782436D6; Tue, 11 Feb 2020 20:41:52 +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) server-signature RSA-PSS (4096 bits) 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 48HF7N32LHz4dkx; Tue, 11 Feb 2020 20:41:52 +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 62F96DF47; Tue, 11 Feb 2020 20:41:52 +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 01BKfqMn058936; Tue, 11 Feb 2020 20:41:52 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BKfqhk058935; Tue, 11 Feb 2020 20:41:52 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002112041.01BKfqhk058935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 11 Feb 2020 20:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357778 - head/tests/sys/mac/portacl X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/mac/portacl X-SVN-Commit-Revision: 357778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:41:52 -0000 Author: lwhsu Date: Tue Feb 11 20:41:51 2020 New Revision: 357778 URL: https://svnweb.freebsd.org/changeset/base/357778 Log: Reduce nc timeout in sys.mac.portacl.* It is not necessary to wait that long for localhost. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/mac/portacl/misc.sh Modified: head/tests/sys/mac/portacl/misc.sh ============================================================================== --- head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:15:49 2020 (r357777) +++ head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:41:51 2020 (r357778) @@ -17,6 +17,7 @@ check_bind() { local host idtype name proto port udpflag host="127.0.0.1" + timeout=1 idtype=${1} name=${2} @@ -28,7 +29,7 @@ check_bind() { out=$( case "${idtype}" in uid|gid) - ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w 10 $host $port" 2>&1 ) & + ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w ${timeout} $host $port" 2>&1 ) & ;; jail) kill $$ @@ -37,7 +38,7 @@ check_bind() { kill $$ esac sleep 0.3 - echo | nc ${udpflag} -w 10 $host $port >/dev/null 2>&1 + echo | nc ${udpflag} -w ${timeout} $host $port >/dev/null 2>&1 wait ) case "${out}" in From owner-svn-src-all@freebsd.org Tue Feb 11 20:59:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CCEB243972; Tue, 11 Feb 2020 20:59:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HFWy2mWPz4fTB; Tue, 11 Feb 2020 20:59:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A5AFE2C5; Tue, 11 Feb 2020 20:59:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BKxgmQ069584; Tue, 11 Feb 2020 20:59:42 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BKxgLd069583; Tue, 11 Feb 2020 20:59:42 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202002112059.01BKxgLd069583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 11 Feb 2020 20:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357779 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 357779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 20:59:42 -0000 Author: glebius Date: Tue Feb 11 20:59:41 2020 New Revision: 357779 URL: https://svnweb.freebsd.org/changeset/base/357779 Log: Remove assertion from TASK_INIT() macro, since some users of sys/taskqueue.h may not have includes that define MPASS. It was useful during testing of r357771, but can be omitted now. An invalid value of priority will yield only in potential priority inversion, not a crash. This fixes compilation of ports/x11/nvidia-driver. Modified: head/sys/sys/taskqueue.h Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Tue Feb 11 20:41:51 2020 (r357778) +++ head/sys/sys/taskqueue.h Tue Feb 11 20:59:41 2020 (r357779) @@ -121,7 +121,6 @@ void taskqueue_thread_enqueue(void *context); * Initialise a task structure. */ #define TASK_INIT_FLAGS(task, priority, func, context, flags) do { \ - MPASS((priority) >= 0 && (priority) <= 255); \ (task)->ta_pending = 0; \ (task)->ta_priority = (priority); \ (task)->ta_flags = (flags); \ From owner-svn-src-all@freebsd.org Tue Feb 11 22:21:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B475C245600; Tue, 11 Feb 2020 22:21:22 +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) server-signature RSA-PSS (4096 bits) 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 48HHLB4R5mz4kt8; Tue, 11 Feb 2020 22:21:22 +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 9382AF27D; Tue, 11 Feb 2020 22:21:22 +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 01BMLMmm017267; Tue, 11 Feb 2020 22:21:22 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BMLML6017266; Tue, 11 Feb 2020 22:21:22 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002112221.01BMLML6017266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 11 Feb 2020 22:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357780 - head/tests/sys/geom/class/multipath X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/geom/class/multipath X-SVN-Commit-Revision: 357780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 22:21:22 -0000 Author: lwhsu Date: Tue Feb 11 22:21:22 2020 New Revision: 357780 URL: https://svnweb.freebsd.org/changeset/base/357780 Log: Temporarily skip sys.geom.class.multipath.failloop.failloop in CI This case uses `dtrace -c` but it has some issues at the moment PR: 244053 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/geom/class/multipath/failloop.sh Modified: head/tests/sys/geom/class/multipath/failloop.sh ============================================================================== --- head/tests/sys/geom/class/multipath/failloop.sh Tue Feb 11 20:59:41 2020 (r357779) +++ head/tests/sys/geom/class/multipath/failloop.sh Tue Feb 11 22:21:22 2020 (r357780) @@ -36,6 +36,10 @@ failloop_head() } failloop_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/244053" + fi + sysctl -n kern.geom.notaste > kern.geom.notaste.txt load_gnop load_gmultipath From owner-svn-src-all@freebsd.org Tue Feb 11 22:48:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0E72245C70; Tue, 11 Feb 2020 22:48: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) server-signature RSA-PSS (4096 bits) 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 48HHx84HHNz4lvt; Tue, 11 Feb 2020 22:48: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 8993FF7B3; Tue, 11 Feb 2020 22:48: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 01BMmCf7034988; Tue, 11 Feb 2020 22:48:12 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BMmCWX034987; Tue, 11 Feb 2020 22:48:12 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002112248.01BMmCWX034987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 11 Feb 2020 22:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357781 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 357781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 22:48:12 -0000 Author: lwhsu Date: Tue Feb 11 22:48:12 2020 New Revision: 357781 URL: https://svnweb.freebsd.org/changeset/base/357781 Log: Temporarily skip failing test case sys.kern/ptrace_test/ptrace__parent_wait_after_attach PR: 244055 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:21:22 2020 (r357780) +++ head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:48:12 2020 (r357781) @@ -213,6 +213,9 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) int cpipe[2], status; char c; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/244055"); + ATF_REQUIRE(pipe(cpipe) == 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { From owner-svn-src-all@freebsd.org Tue Feb 11 23:11:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81475246213; Tue, 11 Feb 2020 23:11:07 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48HJRb147sz4mms; Tue, 11 Feb 2020 23:11:06 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2a02:8109:1140:c3d:1161:78c3:3cfb:8c2c] (unknown [IPv6:2a02:8109:1140:c3d:1161:78c3:3cfb:8c2c]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 248F57213BA4C; Wed, 12 Feb 2020 00:11:04 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r357761 - head/sys/netinet From: Michael Tuexen In-Reply-To: <20200211195221.GD1351@FreeBSD.org> Date: Wed, 12 Feb 2020 00:11:03 +0100 Cc: cem@freebsd.org, svn-src-head , svn-src-all , src-committers Content-Transfer-Encoding: 7bit Message-Id: <3AB18656-6012-4FFC-AAED-FE08F1B68DFD@freebsd.org> References: <202002111400.01BE0R3I009898@repo.freebsd.org> <20200211195221.GD1351@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 48HJRb147sz4mms X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.63 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.94)[-0.944,0]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; NEURAL_HAM_LONG(-0.69)[-0.687,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 23:11:07 -0000 > On 11. Feb 2020, at 20:52, Gleb Smirnoff wrote: > > Michael, > > On Tue, Feb 11, 2020 at 08:38:21PM +0100, Michael Tuexen wrote: > M> I can revert it and get it working in a different way. However, the > M> networking code uses ints for booleans in a lot of places. I wasn't > M> aware that we need to use bool now. > > We don't need to use bool, but we should use it in any new code. > Some people may still drop ints into new code, and this can be > tolerable, but intentionally converting from bools to ints is a > move backwards and this isn't okay. Ahh, OK. Thanks for the clarification. Best regards Michael > > Thanks for redoing it with via ifdefs for legacy platforms. > > -- > Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Feb 11 23:17:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CA982463A1; Tue, 11 Feb 2020 23:17:59 +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) server-signature RSA-PSS (4096 bits) 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 48HJbW07lqz4nF2; Tue, 11 Feb 2020 23:17:59 +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 EF697FD1E; Tue, 11 Feb 2020 23:17:58 +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 01BNHwqq053181; Tue, 11 Feb 2020 23:17:58 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BNHw56053180; Tue, 11 Feb 2020 23:17:58 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002112317.01BNHw56053180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 11 Feb 2020 23:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357782 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 357782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 23:17:59 -0000 Author: lwhsu Date: Tue Feb 11 23:17:58 2020 New Revision: 357782 URL: https://svnweb.freebsd.org/changeset/base/357782 Log: Temporarily skip flakey test case sys.kern.ptrace_test.ptrace__parent_exits_before_child PR: 244056 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:48:12 2020 (r357781) +++ head/tests/sys/kern/ptrace_test.c Tue Feb 11 23:17:58 2020 (r357782) @@ -469,6 +469,9 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) int cpipe1[2], cpipe2[2], gcpipe[2], status; pid_t child, gchild; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/244056"); + ATF_REQUIRE(pipe(cpipe1) == 0); ATF_REQUIRE(pipe(cpipe2) == 0); ATF_REQUIRE(pipe(gcpipe) == 0); From owner-svn-src-all@freebsd.org Tue Feb 11 23:48:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80164246DEC; Tue, 11 Feb 2020 23:48:10 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HKGL3W93z4pgP; Tue, 11 Feb 2020 23:48:10 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7301818290; Tue, 11 Feb 2020 23:48:10 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BNmAxb070910; Tue, 11 Feb 2020 23:48:10 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BNm41M070876; Tue, 11 Feb 2020 23:48:04 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202002112348.01BNm41M070876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Feb 2020 23:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357783 - in vendor/libarchive/dist: . .github/workflows build build/ci build/ci/github_actions build/cmake build/release cat cat/test contrib cpio cpio/test libarchive libarchive/test ... X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . .github/workflows build build/ci build/ci/github_actions build/cmake build/release cat cat/test contrib cpio cpio/test libarchive libarchive/test libarchive_fe tar tar/tes... X-SVN-Commit-Revision: 357783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 23:48:10 -0000 Author: mm Date: Tue Feb 11 23:48:03 2020 New Revision: 357783 URL: https://svnweb.freebsd.org/changeset/base/357783 Log: Update vendor/libarchive/dist to git 3288ebb0353beb51dfb09d444dedbe9235ead53d Libarchive 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime() Added: vendor/libarchive/dist/build/release/ vendor/libarchive/dist/build/release/Dockerfile vendor/libarchive/dist/build/release/release.sh (contents, props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_private.h (contents, props changed) vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu vendor/libarchive/dist/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu vendor/libarchive/dist/tar/test/test_option_safe_writes.c (contents, props changed) Modified: vendor/libarchive/dist/.github/workflows/ci.yml vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/build/ci/build.sh vendor/libarchive/dist/build/ci/github_actions/ci.cmd vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/version vendor/libarchive/dist/cat/bsdcat.h vendor/libarchive/dist/cat/test/test_0.c vendor/libarchive/dist/configure.ac vendor/libarchive/dist/contrib/archivetest.c vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/test/test_basic.c vendor/libarchive/dist/cpio/test/test_format_newc.c vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_acl_private.h vendor/libarchive/dist/libarchive/archive_blake2.h vendor/libarchive/dist/libarchive/archive_blake2_impl.h vendor/libarchive/dist/libarchive/archive_cmdline_private.h vendor/libarchive/dist/libarchive/archive_crc32.h vendor/libarchive/dist/libarchive/archive_cryptor_private.h vendor/libarchive/dist/libarchive/archive_digest_private.h vendor/libarchive/dist/libarchive/archive_endian.h vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry_locale.h vendor/libarchive/dist/libarchive/archive_entry_private.h vendor/libarchive/dist/libarchive/archive_getdate.c vendor/libarchive/dist/libarchive/archive_getdate.h vendor/libarchive/dist/libarchive/archive_hmac_private.h vendor/libarchive/dist/libarchive/archive_openssl_evp_private.h vendor/libarchive/dist/libarchive/archive_openssl_hmac_private.h vendor/libarchive/dist/libarchive/archive_options_private.h vendor/libarchive/dist/libarchive/archive_pack_dev.c vendor/libarchive/dist/libarchive/archive_pack_dev.h vendor/libarchive/dist/libarchive/archive_pathmatch.h vendor/libarchive/dist/libarchive/archive_platform_acl.h vendor/libarchive/dist/libarchive/archive_platform_xattr.h vendor/libarchive/dist/libarchive/archive_ppmd7.c vendor/libarchive/dist/libarchive/archive_ppmd7_private.h vendor/libarchive/dist/libarchive/archive_ppmd8_private.h vendor/libarchive/dist/libarchive/archive_ppmd_private.h vendor/libarchive/dist/libarchive/archive_private.h vendor/libarchive/dist/libarchive/archive_random_private.h vendor/libarchive/dist/libarchive/archive_rb.h vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/dist/libarchive/archive_read_private.h vendor/libarchive/dist/libarchive/archive_read_set_options.3 vendor/libarchive/dist/libarchive/archive_read_support_filter_uu.c vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_string.h vendor/libarchive/dist/libarchive/archive_string_composition.h vendor/libarchive/dist/libarchive/archive_util.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write_disk.3 vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_private.h vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_private.h vendor/libarchive/dist/libarchive/archive_write_set_format.c vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/archive_write_set_format_shar.c vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c vendor/libarchive/dist/libarchive/archive_write_set_format_v7tar.c vendor/libarchive/dist/libarchive/archive_write_set_format_warc.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c vendor/libarchive/dist/libarchive/archive_write_set_options.3 vendor/libarchive/dist/libarchive/archive_xxhash.h vendor/libarchive/dist/libarchive/filter_fork.h vendor/libarchive/dist/libarchive/test/test_archive_write_set_format_filter_by_ext.c vendor/libarchive/dist/libarchive/test/test_compat_zip.c vendor/libarchive/dist/libarchive/test/test_fuzz.c vendor/libarchive/dist/libarchive/test/test_read_extract.c vendor/libarchive/dist/libarchive/test/test_read_format_7zip.c vendor/libarchive/dist/libarchive/test/test_read_format_7zip_packinfo_digests.c vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse.c vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c vendor/libarchive/dist/libarchive/test/test_read_format_zip.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_7075_utf8_paths.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_comment_stored.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_extra_padding.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_high_compression.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_jar.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_mac_metadata.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_malformed.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_msdos.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_nested.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_nofiletype.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_padded.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_sfx.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_zip64.c vendor/libarchive/dist/libarchive/test/test_read_pax_truncated.c vendor/libarchive/dist/libarchive/test/test_read_truncated_filter.c vendor/libarchive/dist/libarchive/test/test_sparse_basic.c vendor/libarchive/dist/libarchive/test/test_write_disk.c vendor/libarchive/dist/libarchive/test/test_write_format_cpio_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_pax.c vendor/libarchive/dist/libarchive/test/test_write_format_shar_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_tar.c vendor/libarchive/dist/libarchive/test/test_write_format_tar_sparse.c vendor/libarchive/dist/libarchive/test/test_write_format_xar.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_file.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_file_zip64.c vendor/libarchive/dist/libarchive_fe/err.h vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/dist/tar/cmdline.c vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/test_basic.c vendor/libarchive/dist/tar/test/test_copy.c vendor/libarchive/dist/tar/test/test_option_C_upper.c vendor/libarchive/dist/tar/test/test_option_s.c vendor/libarchive/dist/tar/util.c vendor/libarchive/dist/test_utils/test_common.h vendor/libarchive/dist/test_utils/test_main.c Modified: vendor/libarchive/dist/.github/workflows/ci.yml ============================================================================== --- vendor/libarchive/dist/.github/workflows/ci.yml Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/.github/workflows/ci.yml Tue Feb 11 23:48:03 2020 (r357783) @@ -33,6 +33,14 @@ jobs: run: ./build/ci/build.sh -a install env: BS: ${{ matrix.bs }} + - name: Artifact + run: ./build/ci/build.sh -a artifact + env: + BS: ${{ matrix.bs }} + - uses: actions/upload-artifact@v1 + with: + name: libarchive-macos-${{ matrix.bs }}-${{ github.sha }} + path: libarchive.tar.xz Ubuntu: runs-on: ubuntu-latest @@ -66,7 +74,14 @@ jobs: run: ./build/ci/build.sh -a install env: BS: ${{ matrix.bs }} - + - name: Artifact + run: ./build/ci/build.sh -a artifact + env: + BS: ${{ matrix.bs }} + - uses: actions/upload-artifact@v1 + with: + name: libarchive-ubuntu-${{ matrix.bs }}-${{ matrix.crypto }}-${{ github.sha }} + path: libarchive.tar.xz Ubuntu-distcheck: runs-on: ubuntu-latest steps: @@ -114,3 +129,12 @@ jobs: shell: cmd env: BE: ${{ matrix.be }} + - name: Artifact + run: ./build/ci/github_actions/ci.cmd artifact + shell: cmd + env: + BE: ${{ matrix.be }} + - uses: actions/upload-artifact@v1 + with: + name: libarchive-windows-${{ matrix.be }}-${{ github.sha }} + path: libarchive.zip Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/CMakeLists.txt Tue Feb 11 23:48:03 2020 (r357783) @@ -18,7 +18,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". @@ -155,9 +155,9 @@ IF (MSVC) ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" - # Enable level 4 C4061: The enumerate has no associated handler in a switch - # statement. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") + # Enable level 4 C4062: The enumerate has no associated handler in a switch + # statement and there is no default that can catch it. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4062") # Enable level 4 C4254: A larger bit field was assigned to a smaller bit # field. SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") @@ -287,6 +287,10 @@ IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$") ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t ENDIF() +IF(MINGW) + ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO) +ENDIF() + # INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceRuns) @@ -1392,6 +1396,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +CHECK_FUNCTION_EXISTS_GLIBC(_gmtime64_s HAVE__GMTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_localtime64_s HAVE__LOCALTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_mkgmtime64 HAVE__MKGMTIME64) Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/Makefile.am Tue Feb 11 23:48:03 2020 (r357783) @@ -228,6 +228,7 @@ libarchive_la_SOURCES= \ libarchive/archive_write_set_format_iso9660.c \ libarchive/archive_write_set_format_mtree.c \ libarchive/archive_write_set_format_pax.c \ + libarchive/archive_write_set_format_private.h \ libarchive/archive_write_set_format_raw.c \ libarchive/archive_write_set_format_shar.c \ libarchive/archive_write_set_format_ustar.c \ @@ -751,7 +752,9 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_7zip_copy_2.7z.uu \ libarchive/test/test_read_format_7zip_deflate.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu \ libarchive/test/test_read_format_7zip_empty_archive.7z.uu \ libarchive/test/test_read_format_7zip_empty_file.7z.uu \ libarchive/test/test_read_format_7zip_encryption.7z.uu \ @@ -876,6 +879,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_rar5_win32.rar.uu \ libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu \ libarchive/test/test_read_format_rar5_different_winsize_on_merge.rar.uu \ + libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu \ libarchive/test/test_read_format_raw.bufr.uu \ libarchive/test/test_read_format_raw.data.gz.uu \ libarchive/test/test_read_format_raw.data.Z.uu \ @@ -1081,6 +1085,7 @@ bsdtar_test_SOURCES= \ tar/test/test_option_q.c \ tar/test/test_option_r.c \ tar/test/test_option_s.c \ + tar/test/test_option_safe_writes.c \ tar/test/test_option_uid_uname.c \ tar/test/test_option_uuencode.c \ tar/test/test_option_xattrs.c \ Modified: vendor/libarchive/dist/NEWS ============================================================================== --- vendor/libarchive/dist/NEWS Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/NEWS Tue Feb 11 23:48:03 2020 (r357783) @@ -1,3 +1,11 @@ +Feb 11, 2020: libarchive 3.4.2 released + +Jan 23, 2020: Important fixes for writing XAR archives + +Jan 20, 2020: New tar option: --safe-writes (atomical file extraction) + +Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider + Dec 30, 2019: libarchive 3.4.1 released Dec 11, 2019: New pax write option "xattrhdr" Modified: vendor/libarchive/dist/build/ci/build.sh ============================================================================== --- vendor/libarchive/dist/build/ci/build.sh Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/build/ci/build.sh Tue Feb 11 23:48:03 2020 (r357783) @@ -42,6 +42,7 @@ while getopts a:b:c:d:s: opt; do test) ;; install) ;; distcheck) ;; + artifact) ;; *) inputerror "Invalid action (-a)" ;; esac ACTIONS="${ACTIONS} ${OPTARG}" @@ -147,11 +148,15 @@ for action in ${ACTIONS}; do install) ${MAKE} ${MAKE_ARGS} install DESTDIR="${BUILDDIR}/destdir" RET="$?" - cd ${BUILDDIR}/destdir && ls -lR . + cd "${BUILDDIR}/destdir" && ls -lR . ;; distcheck) ${MAKE} ${MAKE_ARGS} distcheck RET="$?" + ;; + artifact) + tar -c -J -C "${BUILDDIR}/destdir" -f "${CURDIR}/libarchive.tar.xz" usr + ls -l "${CURDIR}/libarchive.tar.xz" ;; esac if [ "${RET}" != "0" ]; then Modified: vendor/libarchive/dist/build/ci/github_actions/ci.cmd ============================================================================== --- vendor/libarchive/dist/build/ci/github_actions/ci.cmd Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/build/ci/github_actions/ci.cmd Tue Feb 11 23:48:03 2020 (r357783) @@ -1,5 +1,6 @@ @ECHO OFF SET ZLIB_VERSION=1.2.11 +SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8 IF NOT "%BE%"=="mingw-gcc" ( IF NOT "%BE%"=="msvc" ( ECHO Environment variable BE must be mingw-gcc or msvc @@ -7,20 +8,31 @@ IF NOT "%BE%"=="mingw-gcc" ( ) ) +SET ORIGPATH=%PATH% +IF "%BE%"=="mingw-gcc" ( + SET MINGWPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin +) + IF "%1"=="deplibs" ( IF NOT EXIST build_ci\libs ( MKDIR build_ci\libs ) CD build_ci\libs - IF NOT EXIST zlib-%ZLIB_VERSION%.tar.gz ( - curl -o zlib-%ZLIB_VERSION%.tar.gz https://www.zlib.net/zlib-%ZLIB_VERSION%.tar.gz + IF NOT EXIST zlib-%ZLIB_VERSION%.zip ( + curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip ) IF NOT EXIST zlib-%ZLIB_VERSION% ( - tar -x -z -f zlib-%ZLIB_VERSION%.tar.gz + tar -x -f zlib-%ZLIB_VERSION%.zip ) + IF NOT EXIST bzip2-%BZIP2_VERSION%.zip ( + curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip + ) + IF NOT EXIST bzip2-%BZIP2_VERSION% ( + tar -x -f bzip2-%BZIP2_VERSION%.zip + ) CD zlib-%ZLIB_VERSION% IF "%BE%"=="mingw-gcc" ( - SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin + SET PATH=%MINGWPATH% cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1 mingw32-make || EXIT /b 1 mingw32-make test || EXIT /b 1 @@ -31,49 +43,66 @@ IF "%1"=="deplibs" ( cmake --build . --target RUN_TESTS --config Release || EXIT /b 1 cmake --build . --target INSTALL --config Release || EXIT /b 1 ) + CD .. + CD bzip2-%BZIP2_VERSION% + IF "%BE%"=="mingw-gcc" ( + SET PATH=%MINGWPATH% + cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1 + mingw32-make || EXIT /b 1 + REM mingw32-make test || EXIT /b 1 + mingw32-make install || EXIT /b 1 + ) ELSE IF "%BE%"=="msvc" ( + cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1 + cmake --build . --target ALL_BUILD --config Release || EXIT /b 1 + REM cmake --build . --target RUN_TESTS --config Release || EXIT /b 1 + cmake --build . --target INSTALL --config Release || EXIT /b 1 + ) + CD .. ) ELSE IF "%1%"=="configure" ( IF "%BE%"=="mingw-gcc" ( - SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin + SET PATH=%MINGWPATH% MKDIR build_ci\cmake CD build_ci\cmake - cmake -G "MinGW Makefiles" ..\.. || EXIT /b 1 + cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1 ) ELSE IF "%BE%"=="msvc" ( MKDIR build_ci\cmake CD build_ci\cmake - cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" ..\.. || EXIT /b 1 + cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1 ) ) ELSE IF "%1%"=="build" ( IF "%BE%"=="mingw-gcc" ( - SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin + SET PATH=%MINGWPATH% CD build_ci\cmake - mingw32-make || EXIT /b 1 + mingw32-make VERBOSE=1 || EXIT /b 1 ) ELSE IF "%BE%"=="msvc" ( CD build_ci\cmake - cmake --build . --target ALL_BUILD --config Release + cmake --build . --target ALL_BUILD --config Release || EXIT /b 1 ) ) ELSE IF "%1%"=="test" ( IF "%BE%"=="mingw-gcc" ( - SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin - COPY "C:\Program Files (x86)\zlib\bin\libzlib.dll" build_ci\cmake\bin\ + SET PATH=%MINGWPATH% CD build_ci\cmake SET SKIP_TEST_SPARSE=1 - mingw32-make test + mingw32-make test VERBOSE=1 || EXIT /b 1 ) ELSE IF "%BE%"=="msvc" ( ECHO "Skipping tests on this platform" EXIT /b 0 REM CD build_ci\cmake - REM cmake --build . --target RUN_TESTS --config Release + REM cmake --build . --target RUN_TESTS --config Release || EXIT /b 1 ) ) ELSE IF "%1%"=="install" ( IF "%BE%"=="mingw-gcc" ( - SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin + SET PATH=%MINGWPATH% CD build_ci\cmake - mingw32-make install DESTDIR=%cd%\destdir + mingw32-make install || EXIT /b 1 ) ELSE IF "%BE%"=="msvc" ( - cmake --build . --target INSTALL --config Release + CD build_ci\cmake + cmake --build . --target INSTALL --config Release || EXIT /b 1 ) +) ELSE IF "%1"=="artifact" ( + tar -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive ) ELSE ( - ECHO "Usage: %0% deplibs|configure|build|test|install" + ECHO "Usage: %0% deplibs|configure|build|test|install|artifact" @EXIT /b 0 ) @EXIT /b 0 Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/build/cmake/config.h.in Tue Feb 11 23:48:03 2020 (r357783) @@ -1210,6 +1210,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `_get_timezone' function. */ #cmakedefine HAVE__GET_TIMEZONE 1 +/* Define to 1 if you have the `_gmtime64_s' function. */ +#cmakedefine HAVE__GMTIME64_S 1 + /* Define to 1 if you have the `_localtime64_s' function. */ #cmakedefine HAVE__LOCALTIME64_S 1 Added: vendor/libarchive/dist/build/release/Dockerfile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/build/release/Dockerfile Tue Feb 11 23:48:03 2020 (r357783) @@ -0,0 +1,11 @@ +FROM ubuntu:18.04 +RUN apt-get update && apt-get install -y build-essential autoconf automake libtool pkg-config cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop groff ghostscript bsdmainutils zip +ADD . $HOME/libarchive/ +ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" $HOME/libarchive/build/autoconf/config.guess +ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" $HOME/libarchive/build/autoconf/config.sub +WORKDIR $HOME/libarchive +RUN /bin/sh build/clean.sh +RUN /bin/sh build/autogen.sh +ENV SKIP_OPEN_FD_ERR_TEST=1 SKIP_TEST_SPARSE=1 +RUN ./configure +RUN make V=1 distcheck Added: vendor/libarchive/dist/build/release/release.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/build/release/release.sh Tue Feb 11 23:48:03 2020 (r357783) @@ -0,0 +1,8 @@ +#!/bin/sh +ID=$(docker build -q -f build/release/Dockerfile .) +if [ -z "$ID" ]; then + echo "Failed to build docker image" + exit 1 +else + docker run $ID sh -c "tar -c -f - libarchive-*" | tar -x -f - +fi Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/build/version Tue Feb 11 23:48:03 2020 (r357783) @@ -1 +1 @@ -3004002dev +3004002 Modified: vendor/libarchive/dist/cat/bsdcat.h ============================================================================== --- vendor/libarchive/dist/cat/bsdcat.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/cat/bsdcat.h Tue Feb 11 23:48:03 2020 (r357783) @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef BSDCAT_H_INCLUDED +#define BSDCAT_H_INCLUDED + #if defined(PLATFORM_CONFIG_H) /* Use hand-built config.h in environments that need it. */ #include PLATFORM_CONFIG_H @@ -54,3 +57,5 @@ void usage(FILE *stream, int eval); void bsdcat_next(void); void bsdcat_print_error(void); void bsdcat_read_to_stdout(const char* filename); + +#endif Modified: vendor/libarchive/dist/cat/test/test_0.c ============================================================================== --- vendor/libarchive/dist/cat/test/test_0.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/cat/test/test_0.c Tue Feb 11 23:48:03 2020 (r357783) @@ -59,7 +59,7 @@ DEFINE_TEST(test_0) * we know some option that will succeed. */ if (0 != systemf("%s --version >" DEV_NULL, testprog)) { - failure("Unable to successfully run: %s --version\n", testprog, testprog); + failure("Unable to successfully run: %s --version\n", testprog); assert(0); } Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/configure.ac Tue Feb 11 23:48:03 2020 (r357783) @@ -4,7 +4,7 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.4.2dev]) +m4_define([LIBARCHIVE_VERSION_S],[3.4.2]) m4_define([LIBARCHIVE_VERSION_N],[3004002]) dnl bsdtar and bsdcpio versioning tracks libarchive @@ -641,7 +641,7 @@ AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrc AC_CHECK_FUNCS([tzset unlinkat unsetenv utime utimensat utimes vfork]) AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy wmemmove]) AC_CHECK_FUNCS([_ctime64_s _fseeki64]) -AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64]) +AC_CHECK_FUNCS([_get_timezone _gmtime64_s _localtime64_s _mkgmtime64]) # detects cygwin-1.7, as opposed to older versions AC_CHECK_FUNCS([cygwin_conv_path]) Modified: vendor/libarchive/dist/contrib/archivetest.c ============================================================================== --- vendor/libarchive/dist/contrib/archivetest.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/contrib/archivetest.c Tue Feb 11 23:48:03 2020 (r357783) @@ -37,10 +37,14 @@ #include #include -const char *errnostr(int errno) +#if defined __MINGW32__ +#include +#endif + +static const char *errnostr(int e) { char *estr; - switch(errno) { + switch(e) { case ARCHIVE_EOF: estr = "ARCHIVE_EOF"; break; @@ -66,12 +70,12 @@ const char *errnostr(int errno) return (estr); } -void usage(const char *prog) +static void usage(const char *prog) { fprintf(stderr, "Usage: %s [-f filename] [-h] [-q] [-s]\n", prog); } -void printhelp() +static void printhelp() { fprintf(stdout, "archivetest: verify reading archives with " "libarchive\n\n" @@ -84,7 +88,7 @@ void printhelp() "\n%s\n", archive_version_details()); } -int v_print(int verbose, const char *format, ...) +static int v_print(int verbose, const char *format, ...) { int r = 0; @@ -139,6 +143,8 @@ int main(int argc, char *argv[]) fprintf(stderr, "Unknown option " "character '\\x%x'.\n", optopt); usage(argv[0]); + exit(1); + break; default: exit(1); } Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/cpio/cpio.c Tue Feb 11 23:48:03 2020 (r357783) @@ -1139,6 +1139,14 @@ list_item_verbose(struct cpio *cpio, struct archive_en const char *fmt; time_t mtime; static time_t now; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (!now) time(&now); @@ -1186,7 +1194,19 @@ list_item_verbose(struct cpio *cpio, struct archive_en else fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M"; #endif - strftime(date, sizeof(date), fmt, localtime(&mtime)); +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&mtime, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = mtime; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&mtime); +#endif + strftime(date, sizeof(date), fmt, ltime); fprintf(out, "%s%3d %-8s %-8s %8s %12s %s", archive_entry_strmode(entry), Modified: vendor/libarchive/dist/cpio/test/test_basic.c ============================================================================== --- vendor/libarchive/dist/cpio/test/test_basic.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/cpio/test/test_basic.c Tue Feb 11 23:48:03 2020 (r357783) @@ -33,15 +33,15 @@ verify_files(const char *msg) */ /* Regular file with 2 links. */ - failure(msg); + failure("%s", msg); assertIsReg("file", 0644); - failure(msg); + failure("%s", msg); assertFileSize("file", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file", 2); /* Another name for the same file. */ - failure(msg); + failure("%s", msg); assertIsHardlink("linkfile", "file"); /* Symlink */ @@ -49,11 +49,11 @@ verify_files(const char *msg) assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ - failure(msg); + failure("%s", msg); assertIsReg("file2", 0777); - failure(msg); + failure("%s", msg); assertFileSize("file2", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file2", 1); /* dir */ Modified: vendor/libarchive/dist/cpio/test/test_format_newc.c ============================================================================== --- vendor/libarchive/dist/cpio/test/test_format_newc.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/cpio/test/test_format_newc.c Tue Feb 11 23:48:03 2020 (r357783) @@ -205,9 +205,11 @@ DEFINE_TEST(test_format_newc) gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ - failure("t=0x%08x now=0x%08x=%d", t, now, now); + failure("t=%#08jx now=%#08jx=%jd", (intmax_t)t, (intmax_t)now, + (intmax_t)now); assert(t <= now); /* File wasn't created in future. */ - failure("t=0x%08x now - 2=0x%08x = %d", t, now - 2, now - 2); + failure("t=%#08jx now - 2=%#08jx=%jd", (intmax_t)t, (intmax_t)now - 2, + (intmax_t)now - 2); assert(t >= now - 2); /* File was created w/in last 2 secs. */ failure("newc format stores body only with last appearance of a link\n" " first appearance should be empty, so this file size\n" @@ -243,7 +245,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created" + " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -278,7 +281,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */ #endif t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -311,7 +315,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ fs = from_hex(e + 54, 8); Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/CMakeLists.txt Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/CMakeLists.txt Tue Feb 11 23:48:03 2020 (r357783) @@ -150,6 +150,7 @@ SET(libarchive_SOURCES archive_write_set_format_iso9660.c archive_write_set_format_mtree.c archive_write_set_format_pax.c + archive_write_set_format_private.h archive_write_set_format_raw.c archive_write_set_format_shar.c archive_write_set_format_ustar.c Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive.h Tue Feb 11 23:48:03 2020 (r357783) @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.2dev" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -693,6 +693,8 @@ __LA_DECL int archive_read_set_passphrase_callback(str #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); Modified: vendor/libarchive/dist/libarchive/archive_acl_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl_private.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_acl_private.h Tue Feb 11 23:48:03 2020 (r357783) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED +#define ARCHIVE_ACL_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED -#define ARCHIVE_ACL_PRIVATE_H_INCLUDED #include "archive_string.h" Modified: vendor/libarchive/dist/libarchive/archive_blake2.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_blake2.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_blake2.h Tue Feb 11 23:48:03 2020 (r357783) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_H -#define BLAKE2_H + +#ifndef ARCHIVE_BLAKE2_H +#define ARCHIVE_BLAKE2_H #include #include Modified: vendor/libarchive/dist/libarchive/archive_blake2_impl.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_blake2_impl.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_blake2_impl.h Tue Feb 11 23:48:03 2020 (r357783) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_IMPL_H -#define BLAKE2_IMPL_H + +#ifndef ARCHIVE_BLAKE2_IMPL_H +#define ARCHIVE_BLAKE2_IMPL_H #include #include Modified: vendor/libarchive/dist/libarchive/archive_cmdline_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_cmdline_private.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_cmdline_private.h Tue Feb 11 23:48:03 2020 (r357783) @@ -25,14 +25,14 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CMDLINE_PRIVATE_H +#define ARCHIVE_CMDLINE_PRIVATE_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif - -#ifndef ARCHIVE_CMDLINE_PRIVATE_H -#define ARCHIVE_CMDLINE_PRIVATE_H struct archive_cmdline { char *path; Modified: vendor/libarchive/dist/libarchive/archive_crc32.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_crc32.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_crc32.h Tue Feb 11 23:48:03 2020 (r357783) @@ -25,6 +25,9 @@ * $FreeBSD: head/lib/libarchive/archive_crc32.h 201102 2009-12-28 03:11:36Z kientzle $ */ +#ifndef ARCHIVE_CRC32_H +#define ARCHIVE_CRC32_H + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif @@ -76,3 +79,5 @@ crc32(unsigned long crc, const void *_p, size_t len) crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8); return (crc ^ 0xffffffffUL); } + +#endif Modified: vendor/libarchive/dist/libarchive/archive_cryptor_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_cryptor_private.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_cryptor_private.h Tue Feb 11 23:48:03 2020 (r357783) @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_cryptor.c file will normally define no usable symbols. Modified: vendor/libarchive/dist/libarchive/archive_digest_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_digest_private.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_digest_private.h Tue Feb 11 23:48:03 2020 (r357783) @@ -24,13 +24,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_DIGEST_PRIVATE_H_INCLUDED +#define ARCHIVE_DIGEST_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED -#define ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED - /* * Crypto support in various Operating Systems: * Modified: vendor/libarchive/dist/libarchive/archive_endian.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_endian.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_endian.h Tue Feb 11 23:48:03 2020 (r357783) @@ -28,16 +28,15 @@ * Borrowed from FreeBSD's */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif +#ifndef ARCHIVE_ENDIAN_H_INCLUDED +#define ARCHIVE_ENDIAN_H_INCLUDED /* Note: This is a purely internal header! */ /* Do not use this outside of libarchive internal code! */ -#ifndef ARCHIVE_ENDIAN_H_INCLUDED -#define ARCHIVE_ENDIAN_H_INCLUDED - +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * Disabling inline keyword for compilers known to choke on it: Modified: vendor/libarchive/dist/libarchive/archive_entry.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_entry.c Tue Feb 11 23:48:03 2020 (r357783) @@ -1699,7 +1699,7 @@ static const struct flag { const wchar_t *wname; unsigned long set; unsigned long clear; -} flags[] = { +} fileflags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND { "nosappnd", L"nosappnd", SF_APPEND, 0}, @@ -1876,7 +1876,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit bits = bitset | bitclear; length = 0; - for (flag = flags; flag->name != NULL; flag++) + for (flag = fileflags; flag->name != NULL; flag++) if (bits & (flag->set | flag->clear)) { length += strlen(flag->name) + 1; bits &= ~(flag->set | flag->clear); @@ -1889,7 +1889,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit return (NULL); dp = string; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { if (bitset & flag->set || bitclear & flag->clear) { sp = flag->name + 2; } else if (bitset & flag->clear || bitclear & flag->set) { @@ -1941,7 +1941,7 @@ ae_strtofflags(const char *s, unsigned long *setp, uns *end != ' ' && *end != ',') end++; length = end - start; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { size_t flag_length = strlen(flag->name); if (length == flag_length && memcmp(start, flag->name, length) == 0) { @@ -2009,7 +2009,7 @@ ae_wcstofflags(const wchar_t *s, unsigned long *setp, *end != L' ' && *end != L',') end++; length = end - start; - for (flag = flags; flag->wname != NULL; flag++) { + for (flag = fileflags; flag->wname != NULL; flag++) { size_t flag_length = wcslen(flag->wname); if (length == flag_length && wmemcmp(start, flag->wname, length) == 0) { Modified: vendor/libarchive/dist/libarchive/archive_entry_locale.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_locale.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_entry_locale.h Tue Feb 11 23:48:03 2020 (r357783) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED +#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED -#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED struct archive_entry; struct archive_string_conv; Modified: vendor/libarchive/dist/libarchive/archive_entry_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_private.h Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_entry_private.h Tue Feb 11 23:48:03 2020 (r357783) @@ -25,12 +25,12 @@ * $FreeBSD: head/lib/libarchive/archive_entry_private.h 201096 2009-12-28 02:41:27Z kientzle $ */ +#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED +#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED -#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED #include "archive_acl_private.h" #include "archive_string.h" Modified: vendor/libarchive/dist/libarchive/archive_getdate.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_getdate.c Tue Feb 11 23:17:58 2020 (r357782) +++ vendor/libarchive/dist/libarchive/archive_getdate.c Tue Feb 11 23:48:03 2020 (r357783) @@ -27,6 +27,7 @@ ** This code is in the public domain and has no copyright. */ +#include "archive_platform.h" #ifdef __FreeBSD__ #include __FBSDID("$FreeBSD$"); @@ -694,8 +695,16 @@ Convert(time_t Month, time_t Day, time_t Year, signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - time_t Julian; - int i; + time_t Julian; + int i; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (Year < 69) Year += 2000; @@ -722,21 +731,64 @@ Convert(time_t Month, time_t Day, time_t Year, Julian *= DAY; Julian += Timezone; Julian += Hours * HOUR + Minutes * MINUTE + Seconds; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Julian, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Julian; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Julian); +#endif if (DSTmode == DSTon - || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst)) + || (DSTmode == DSTmaybe && ltime->tm_isdst)) Julian -= HOUR; return Julian; } - static time_t DSTcorrect(time_t Start, time_t Future) { - time_t StartDay; - time_t FutureDay; + time_t StartDay; + time_t FutureDay; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif - StartDay = (localtime(&Start)->tm_hour + 1) % 24; - FutureDay = (localtime(&Future)->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Start); +#endif + StartDay = (ltime->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Future, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Future; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Future); +#endif + FutureDay = (ltime->tm_hour + 1) % 24; return (Future - Start) + (StartDay - FutureDay) * HOUR; } @@ -747,9 +799,27 @@ RelativeDate(time_t Start, time_t zone, int dstmode, { struct tm *tm; time_t t, now; +#if defined(HAVE_GMTIME_R) || defined(HAVE__GMTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif t = Start - zone; +#if defined(HAVE_GMTIME_R) + tm = gmtime_r(&t, &tmbuf); +#elif defined(HAVE__GMTIME64_S) + tmptime = t; + terr = _gmtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = gmtime(&t); +#endif now = Start; now += DAY * ((DayNumber - tm->tm_wday + 7) % 7); now += 7 * DAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1); @@ -765,10 +835,28 @@ RelativeMonth(time_t Start, time_t Timezone, time_t Re struct tm *tm; time_t Month; time_t Year; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (RelMonth == 0) return 0; +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = localtime(&Start); +#endif Month = 12 * (tm->tm_year + 1900) + tm->tm_mon + RelMonth; Year = Month / 12; Month = Month % 12 + 1; @@ -905,6 +993,10 @@ __archive_get_date(time_t now, const char *p) time_t Start; time_t tod; long tzone; +#if defined(HAVE__LOCALTIME64_S) || defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif /* Clear out the parsed token array. */ memset(tokens, 0, sizeof(tokens)); @@ -913,20 +1005,44 @@ __archive_get_date(time_t now, const char *p) gds = &_gds; /* Look up the current time. */ +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&now, &local); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = now; + terr = _localtime64_s(&local, &tmptime); + if (terr) + tm = NULL; + else + tm = &local; +#else memset(&local, 0, sizeof(local)); - tm = localtime (&now); + tm = localtime(&now); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Feb 11 23:49:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B41B246E85; Tue, 11 Feb 2020 23:49:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HKJM6zdQz4pp6; Tue, 11 Feb 2020 23:49:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC7CF18291; Tue, 11 Feb 2020 23:49:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01BNntG8071056; Tue, 11 Feb 2020 23:49:55 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01BNnt6H071055; Tue, 11 Feb 2020 23:49:55 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202002112349.01BNnt6H071055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Feb 2020 23:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357784 - vendor/libarchive/3.4.2 X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: vendor/libarchive/3.4.2 X-SVN-Commit-Revision: 357784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2020 23:49:56 -0000 Author: mm Date: Tue Feb 11 23:49:55 2020 New Revision: 357784 URL: https://svnweb.freebsd.org/changeset/base/357784 Log: Tag vendor/libarchive 3.4.2 Added: vendor/libarchive/3.4.2/ - copied from r357783, vendor/libarchive/dist/ From owner-svn-src-all@freebsd.org Wed Feb 12 00:17:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B08FF24786A; Wed, 12 Feb 2020 00:17:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HKvh4mYFz4rF9; Wed, 12 Feb 2020 00:17:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E6531883C; Wed, 12 Feb 2020 00:17:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01C0H4Lf089180; Wed, 12 Feb 2020 00:17:04 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C0GvJI089134; Wed, 12 Feb 2020 00:16:57 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202002120016.01C0GvJI089134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Wed, 12 Feb 2020 00:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357785 - in head: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libar... X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test con... X-SVN-Commit-Revision: 357785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 00:17:04 -0000 Author: mm Date: Wed Feb 12 00:16:56 2020 New Revision: 357785 URL: https://svnweb.freebsd.org/changeset/base/357785 Log: MFV r357783: Update libarchive to 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime() X-MFC-With: r356212,r356365,r356416 MFC after: 1 week Added: head/contrib/libarchive/libarchive/archive_write_set_format_private.h - copied unchanged from r357783, vendor/libarchive/dist/libarchive/archive_write_set_format_private.h head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu head/contrib/libarchive/tar/test/test_option_safe_writes.c - copied unchanged from r357783, vendor/libarchive/dist/tar/test/test_option_safe_writes.c Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/cat/bsdcat.h head/contrib/libarchive/cat/test/test_0.c head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/test/test_basic.c head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_acl_private.h head/contrib/libarchive/libarchive/archive_blake2.h head/contrib/libarchive/libarchive/archive_blake2_impl.h head/contrib/libarchive/libarchive/archive_cmdline_private.h head/contrib/libarchive/libarchive/archive_crc32.h head/contrib/libarchive/libarchive/archive_cryptor_private.h head/contrib/libarchive/libarchive/archive_digest_private.h head/contrib/libarchive/libarchive/archive_endian.h head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_entry_locale.h head/contrib/libarchive/libarchive/archive_entry_private.h head/contrib/libarchive/libarchive/archive_getdate.c head/contrib/libarchive/libarchive/archive_getdate.h head/contrib/libarchive/libarchive/archive_hmac_private.h head/contrib/libarchive/libarchive/archive_openssl_evp_private.h head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h head/contrib/libarchive/libarchive/archive_options_private.h head/contrib/libarchive/libarchive/archive_pack_dev.c head/contrib/libarchive/libarchive/archive_pack_dev.h head/contrib/libarchive/libarchive/archive_pathmatch.h head/contrib/libarchive/libarchive/archive_platform_acl.h head/contrib/libarchive/libarchive/archive_platform_xattr.h head/contrib/libarchive/libarchive/archive_ppmd7.c head/contrib/libarchive/libarchive/archive_ppmd7_private.h head/contrib/libarchive/libarchive/archive_ppmd8_private.h head/contrib/libarchive/libarchive/archive_ppmd_private.h head/contrib/libarchive/libarchive/archive_private.h head/contrib/libarchive/libarchive/archive_random_private.h head/contrib/libarchive/libarchive/archive_rb.h head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_disk_posix.c head/contrib/libarchive/libarchive/archive_read_disk_private.h head/contrib/libarchive/libarchive/archive_read_private.h head/contrib/libarchive/libarchive/archive_read_set_options.3 head/contrib/libarchive/libarchive/archive_read_support_filter_uu.c head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c head/contrib/libarchive/libarchive/archive_read_support_format_lha.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_string.h head/contrib/libarchive/libarchive/archive_string_composition.h head/contrib/libarchive/libarchive/archive_util.c head/contrib/libarchive/libarchive/archive_write_disk.3 head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_disk_private.h head/contrib/libarchive/libarchive/archive_write_private.h head/contrib/libarchive/libarchive/archive_write_set_format.c head/contrib/libarchive/libarchive/archive_write_set_format_7zip.c head/contrib/libarchive/libarchive/archive_write_set_format_ar.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c head/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c head/contrib/libarchive/libarchive/archive_write_set_format_pax.c head/contrib/libarchive/libarchive/archive_write_set_format_shar.c head/contrib/libarchive/libarchive/archive_write_set_format_ustar.c head/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c head/contrib/libarchive/libarchive/archive_write_set_format_warc.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/archive_write_set_format_zip.c head/contrib/libarchive/libarchive/archive_write_set_options.3 head/contrib/libarchive/libarchive/archive_xxhash.h head/contrib/libarchive/libarchive/filter_fork.h head/contrib/libarchive/libarchive/test/test_archive_write_set_format_filter_by_ext.c head/contrib/libarchive/libarchive/test/test_compat_zip.c head/contrib/libarchive/libarchive/test/test_fuzz.c head/contrib/libarchive/libarchive/test/test_read_extract.c head/contrib/libarchive/libarchive/test/test_read_format_7zip.c head/contrib/libarchive/libarchive/test/test_read_format_7zip_packinfo_digests.c head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.c head/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c head/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.c head/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c head/contrib/libarchive/libarchive/test/test_read_format_zip_jar.c head/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c head/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c head/contrib/libarchive/libarchive/test/test_read_format_zip_msdos.c head/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c head/contrib/libarchive/libarchive/test/test_read_format_zip_nofiletype.c head/contrib/libarchive/libarchive/test/test_read_format_zip_padded.c head/contrib/libarchive/libarchive/test/test_read_format_zip_sfx.c head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c head/contrib/libarchive/libarchive/test/test_read_format_zip_zip64.c head/contrib/libarchive/libarchive/test/test_read_pax_truncated.c head/contrib/libarchive/libarchive/test/test_read_truncated_filter.c head/contrib/libarchive/libarchive/test/test_sparse_basic.c head/contrib/libarchive/libarchive/test/test_write_disk.c head/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c head/contrib/libarchive/libarchive/test/test_write_format_pax.c head/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c head/contrib/libarchive/libarchive/test/test_write_format_tar.c head/contrib/libarchive/libarchive/test/test_write_format_tar_sparse.c head/contrib/libarchive/libarchive/test/test_write_format_xar.c head/contrib/libarchive/libarchive/test/test_write_format_zip_file.c head/contrib/libarchive/libarchive/test/test_write_format_zip_file_zip64.c head/contrib/libarchive/libarchive_fe/err.h head/contrib/libarchive/tar/bsdtar.1 head/contrib/libarchive/tar/bsdtar.c head/contrib/libarchive/tar/bsdtar.h head/contrib/libarchive/tar/cmdline.c head/contrib/libarchive/tar/test/test_basic.c head/contrib/libarchive/tar/test/test_copy.c head/contrib/libarchive/tar/test/test_option_C_upper.c head/contrib/libarchive/tar/test/test_option_s.c head/contrib/libarchive/tar/util.c head/contrib/libarchive/test_utils/test_common.h head/contrib/libarchive/test_utils/test_main.c head/lib/libarchive/tests/Makefile head/usr.bin/bsdcat/Makefile head/usr.bin/cpio/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/NEWS ============================================================================== --- head/contrib/libarchive/NEWS Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/NEWS Wed Feb 12 00:16:56 2020 (r357785) @@ -1,3 +1,11 @@ +Feb 11, 2020: libarchive 3.4.2 released + +Jan 23, 2020: Important fixes for writing XAR archives + +Jan 20, 2020: New tar option: --safe-writes (atomical file extraction) + +Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider + Dec 30, 2019: libarchive 3.4.1 released Dec 11, 2019: New pax write option "xattrhdr" Modified: head/contrib/libarchive/cat/bsdcat.h ============================================================================== --- head/contrib/libarchive/cat/bsdcat.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/cat/bsdcat.h Wed Feb 12 00:16:56 2020 (r357785) @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef BSDCAT_H_INCLUDED +#define BSDCAT_H_INCLUDED + #if defined(PLATFORM_CONFIG_H) /* Use hand-built config.h in environments that need it. */ #include PLATFORM_CONFIG_H @@ -54,3 +57,5 @@ void usage(FILE *stream, int eval); void bsdcat_next(void); void bsdcat_print_error(void); void bsdcat_read_to_stdout(const char* filename); + +#endif Modified: head/contrib/libarchive/cat/test/test_0.c ============================================================================== --- head/contrib/libarchive/cat/test/test_0.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/cat/test/test_0.c Wed Feb 12 00:16:56 2020 (r357785) @@ -59,7 +59,7 @@ DEFINE_TEST(test_0) * we know some option that will succeed. */ if (0 != systemf("%s --version >" DEV_NULL, testprog)) { - failure("Unable to successfully run: %s --version\n", testprog, testprog); + failure("Unable to successfully run: %s --version\n", testprog); assert(0); } Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/cpio/cpio.c Wed Feb 12 00:16:56 2020 (r357785) @@ -1139,6 +1139,14 @@ list_item_verbose(struct cpio *cpio, struct archive_en const char *fmt; time_t mtime; static time_t now; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (!now) time(&now); @@ -1186,7 +1194,19 @@ list_item_verbose(struct cpio *cpio, struct archive_en else fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M"; #endif - strftime(date, sizeof(date), fmt, localtime(&mtime)); +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&mtime, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = mtime; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&mtime); +#endif + strftime(date, sizeof(date), fmt, ltime); fprintf(out, "%s%3d %-8s %-8s %8s %12s %s", archive_entry_strmode(entry), Modified: head/contrib/libarchive/cpio/test/test_basic.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_basic.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/cpio/test/test_basic.c Wed Feb 12 00:16:56 2020 (r357785) @@ -33,15 +33,15 @@ verify_files(const char *msg) */ /* Regular file with 2 links. */ - failure(msg); + failure("%s", msg); assertIsReg("file", 0644); - failure(msg); + failure("%s", msg); assertFileSize("file", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file", 2); /* Another name for the same file. */ - failure(msg); + failure("%s", msg); assertIsHardlink("linkfile", "file"); /* Symlink */ @@ -49,11 +49,11 @@ verify_files(const char *msg) assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ - failure(msg); + failure("%s", msg); assertIsReg("file2", 0777); - failure(msg); + failure("%s", msg); assertFileSize("file2", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file2", 1); /* dir */ Modified: head/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_format_newc.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/cpio/test/test_format_newc.c Wed Feb 12 00:16:56 2020 (r357785) @@ -205,9 +205,11 @@ DEFINE_TEST(test_format_newc) gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ - failure("t=0x%08x now=0x%08x=%d", t, now, now); + failure("t=%#08jx now=%#08jx=%jd", (intmax_t)t, (intmax_t)now, + (intmax_t)now); assert(t <= now); /* File wasn't created in future. */ - failure("t=0x%08x now - 2=0x%08x = %d", t, now - 2, now - 2); + failure("t=%#08jx now - 2=%#08jx=%jd", (intmax_t)t, (intmax_t)now - 2, + (intmax_t)now - 2); assert(t >= now - 2); /* File was created w/in last 2 secs. */ failure("newc format stores body only with last appearance of a link\n" " first appearance should be empty, so this file size\n" @@ -243,7 +245,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created" + " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -278,7 +281,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */ #endif t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -311,7 +315,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ fs = from_hex(e + 54, 8); Modified: head/contrib/libarchive/libarchive/archive.h ============================================================================== --- head/contrib/libarchive/libarchive/archive.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive.h Wed Feb 12 00:16:56 2020 (r357785) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3004001 +#define ARCHIVE_VERSION_NUMBER 3004002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.1" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -693,6 +693,8 @@ __LA_DECL int archive_read_set_passphrase_callback(str #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); Modified: head/contrib/libarchive/libarchive/archive_acl_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_acl_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED +#define ARCHIVE_ACL_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED -#define ARCHIVE_ACL_PRIVATE_H_INCLUDED #include "archive_string.h" Modified: head/contrib/libarchive/libarchive/archive_blake2.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_blake2.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_blake2.h Wed Feb 12 00:16:56 2020 (r357785) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_H -#define BLAKE2_H + +#ifndef ARCHIVE_BLAKE2_H +#define ARCHIVE_BLAKE2_H #include #include Modified: head/contrib/libarchive/libarchive/archive_blake2_impl.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_blake2_impl.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_blake2_impl.h Wed Feb 12 00:16:56 2020 (r357785) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_IMPL_H -#define BLAKE2_IMPL_H + +#ifndef ARCHIVE_BLAKE2_IMPL_H +#define ARCHIVE_BLAKE2_IMPL_H #include #include Modified: head/contrib/libarchive/libarchive/archive_cmdline_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_cmdline_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_cmdline_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,14 +25,14 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CMDLINE_PRIVATE_H +#define ARCHIVE_CMDLINE_PRIVATE_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif - -#ifndef ARCHIVE_CMDLINE_PRIVATE_H -#define ARCHIVE_CMDLINE_PRIVATE_H struct archive_cmdline { char *path; Modified: head/contrib/libarchive/libarchive/archive_crc32.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_crc32.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_crc32.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,6 +25,9 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CRC32_H +#define ARCHIVE_CRC32_H + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif @@ -76,3 +79,5 @@ crc32(unsigned long crc, const void *_p, size_t len) crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8); return (crc ^ 0xffffffffUL); } + +#endif Modified: head/contrib/libarchive/libarchive/archive_cryptor_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_cryptor_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_cryptor_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_cryptor.c file will normally define no usable symbols. Modified: head/contrib/libarchive/libarchive/archive_digest_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_digest_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_digest_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -24,13 +24,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_DIGEST_PRIVATE_H_INCLUDED +#define ARCHIVE_DIGEST_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED -#define ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED - /* * Crypto support in various Operating Systems: * Modified: head/contrib/libarchive/libarchive/archive_endian.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_endian.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_endian.h Wed Feb 12 00:16:56 2020 (r357785) @@ -28,16 +28,15 @@ * Borrowed from FreeBSD's */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif +#ifndef ARCHIVE_ENDIAN_H_INCLUDED +#define ARCHIVE_ENDIAN_H_INCLUDED /* Note: This is a purely internal header! */ /* Do not use this outside of libarchive internal code! */ -#ifndef ARCHIVE_ENDIAN_H_INCLUDED -#define ARCHIVE_ENDIAN_H_INCLUDED - +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * Disabling inline keyword for compilers known to choke on it: Modified: head/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_entry.c Wed Feb 12 00:16:56 2020 (r357785) @@ -1699,7 +1699,7 @@ static const struct flag { const wchar_t *wname; unsigned long set; unsigned long clear; -} flags[] = { +} fileflags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND { "nosappnd", L"nosappnd", SF_APPEND, 0}, @@ -1876,7 +1876,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit bits = bitset | bitclear; length = 0; - for (flag = flags; flag->name != NULL; flag++) + for (flag = fileflags; flag->name != NULL; flag++) if (bits & (flag->set | flag->clear)) { length += strlen(flag->name) + 1; bits &= ~(flag->set | flag->clear); @@ -1889,7 +1889,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit return (NULL); dp = string; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { if (bitset & flag->set || bitclear & flag->clear) { sp = flag->name + 2; } else if (bitset & flag->clear || bitclear & flag->set) { @@ -1941,7 +1941,7 @@ ae_strtofflags(const char *s, unsigned long *setp, uns *end != ' ' && *end != ',') end++; length = end - start; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { size_t flag_length = strlen(flag->name); if (length == flag_length && memcmp(start, flag->name, length) == 0) { @@ -2009,7 +2009,7 @@ ae_wcstofflags(const wchar_t *s, unsigned long *setp, *end != L' ' && *end != L',') end++; length = end - start; - for (flag = flags; flag->wname != NULL; flag++) { + for (flag = fileflags; flag->wname != NULL; flag++) { size_t flag_length = wcslen(flag->wname); if (length == flag_length && wmemcmp(start, flag->wname, length) == 0) { Modified: head/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_entry.h Wed Feb 12 00:16:56 2020 (r357785) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3004001 +#define ARCHIVE_VERSION_NUMBER 3004002 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: head/contrib/libarchive/libarchive/archive_entry_locale.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_locale.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_entry_locale.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED +#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED -#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED struct archive_entry; struct archive_string_conv; Modified: head/contrib/libarchive/libarchive/archive_entry_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_entry_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED +#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED -#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED #include "archive_acl_private.h" #include "archive_string.h" Modified: head/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_getdate.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_getdate.c Wed Feb 12 00:16:56 2020 (r357785) @@ -27,6 +27,7 @@ ** This code is in the public domain and has no copyright. */ +#include "archive_platform.h" #ifdef __FreeBSD__ #include __FBSDID("$FreeBSD$"); @@ -694,8 +695,16 @@ Convert(time_t Month, time_t Day, time_t Year, signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - time_t Julian; - int i; + time_t Julian; + int i; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (Year < 69) Year += 2000; @@ -722,21 +731,64 @@ Convert(time_t Month, time_t Day, time_t Year, Julian *= DAY; Julian += Timezone; Julian += Hours * HOUR + Minutes * MINUTE + Seconds; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Julian, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Julian; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Julian); +#endif if (DSTmode == DSTon - || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst)) + || (DSTmode == DSTmaybe && ltime->tm_isdst)) Julian -= HOUR; return Julian; } - static time_t DSTcorrect(time_t Start, time_t Future) { - time_t StartDay; - time_t FutureDay; + time_t StartDay; + time_t FutureDay; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif - StartDay = (localtime(&Start)->tm_hour + 1) % 24; - FutureDay = (localtime(&Future)->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Start); +#endif + StartDay = (ltime->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Future, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Future; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Future); +#endif + FutureDay = (ltime->tm_hour + 1) % 24; return (Future - Start) + (StartDay - FutureDay) * HOUR; } @@ -747,9 +799,27 @@ RelativeDate(time_t Start, time_t zone, int dstmode, { struct tm *tm; time_t t, now; +#if defined(HAVE_GMTIME_R) || defined(HAVE__GMTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif t = Start - zone; +#if defined(HAVE_GMTIME_R) + tm = gmtime_r(&t, &tmbuf); +#elif defined(HAVE__GMTIME64_S) + tmptime = t; + terr = _gmtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = gmtime(&t); +#endif now = Start; now += DAY * ((DayNumber - tm->tm_wday + 7) % 7); now += 7 * DAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1); @@ -765,10 +835,28 @@ RelativeMonth(time_t Start, time_t Timezone, time_t Re struct tm *tm; time_t Month; time_t Year; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (RelMonth == 0) return 0; +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = localtime(&Start); +#endif Month = 12 * (tm->tm_year + 1900) + tm->tm_mon + RelMonth; Year = Month / 12; Month = Month % 12 + 1; @@ -905,6 +993,10 @@ __archive_get_date(time_t now, const char *p) time_t Start; time_t tod; long tzone; +#if defined(HAVE__LOCALTIME64_S) || defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif /* Clear out the parsed token array. */ memset(tokens, 0, sizeof(tokens)); @@ -913,20 +1005,44 @@ __archive_get_date(time_t now, const char *p) gds = &_gds; /* Look up the current time. */ +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&now, &local); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = now; + terr = _localtime64_s(&local, &tmptime); + if (terr) + tm = NULL; + else + tm = &local; +#else memset(&local, 0, sizeof(local)); - tm = localtime (&now); + tm = localtime(&now); +#endif if (tm == NULL) return -1; +#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE__LOCALTIME64_S) local = *tm; +#endif /* Look up UTC if we can and use that to determine the current * timezone offset. */ +#if defined(HAVE_GMTIME_R) + gmt_ptr = gmtime_r(&now, &gmt); +#elif defined(HAVE__GMTIME64_S) + tmptime = now; + terr = _gmtime64_s(&gmt, &tmptime); + if (terr) + gmt_ptr = NULL; + else + gmt_ptr = &gmt; +#else memset(&gmt, 0, sizeof(gmt)); - gmt_ptr = gmtime (&now); + gmt_ptr = gmtime(&now); if (gmt_ptr != NULL) { /* Copy, in case localtime and gmtime use the same buffer. */ gmt = *gmt_ptr; } +#endif if (gmt_ptr != NULL) tzone = difftm (&gmt, &local); else @@ -960,7 +1076,18 @@ __archive_get_date(time_t now, const char *p) * time components instead of the local timezone. */ if (gds->HaveZone && gmt_ptr != NULL) { now -= gds->Timezone; - gmt_ptr = gmtime (&now); +#if defined(HAVE_GMTIME_R) + gmt_ptr = gmtime_r(&now, &gmt); +#elif defined(HAVE__GMTIME64_S) + tmptime = now; + terr = _gmtime64_s(&gmt, &tmptime); + if (terr) + gmt_ptr = NULL; + else + gmt_ptr = &gmt; +#else + gmt_ptr = gmtime(&now); +#endif if (gmt_ptr != NULL) local = *gmt_ptr; now += gds->Timezone; Modified: head/contrib/libarchive/libarchive/archive_getdate.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_getdate.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_getdate.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_GETDATE_H_INCLUDED +#define ARCHIVE_GETDATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_GETDATE_H_INCLUDED -#define ARCHIVE_GETDATE_H_INCLUDED #include Modified: head/contrib/libarchive/libarchive/archive_hmac_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_hmac_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_hmac_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_HMAC_PRIVATE_H_INCLUDED #define ARCHIVE_HMAC_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_hmac.c file is expected to define no usable symbols. Modified: head/contrib/libarchive/libarchive/archive_openssl_evp_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_openssl_evp_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_openssl_evp_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -22,8 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED #define ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED + +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif #include #include Modified: head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -22,8 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED #define ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED + +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif #include #include Modified: head/contrib/libarchive/libarchive/archive_options_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_options_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_options_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_OPTIONS_PRIVATE_H_INCLUDED +#define ARCHIVE_OPTIONS_PRIVATE_H_INCLUDED + #include "archive_platform.h" __FBSDID("$FreeBSD$"); @@ -45,3 +48,4 @@ _archive_set_either_option(struct archive *a, const char *m, const char *o, const char *v, option_handler use_format_option, option_handler use_filter_option); +#endif Modified: head/contrib/libarchive/libarchive/archive_pack_dev.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_pack_dev.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_pack_dev.c Wed Feb 12 00:16:56 2020 (r357785) @@ -57,11 +57,12 @@ __RCSID("$NetBSD$"); #ifdef HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_SYS_SYSMACROS_H -#include -#endif -#ifdef HAVE_SYS_MKDEV_H +#if MAJOR_IN_MKDEV #include +#define HAVE_MAJOR +#elif MAJOR_IN_SYSMACROS +#include +#define HAVE_MAJOR #endif #ifdef HAVE_UNISTD_H #include Modified: head/contrib/libarchive/libarchive/archive_pack_dev.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_pack_dev.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_pack_dev.h Wed Feb 12 00:16:56 2020 (r357785) @@ -31,8 +31,8 @@ /* Originally from NetBSD's mknod(8) source. */ -#ifndef _PACK_DEV_H -#define _PACK_DEV_H +#ifndef ARCHIVE_PACK_DEV_H +#define ARCHIVE_PACK_DEV_H typedef dev_t pack_t(int, unsigned long [], const char **); @@ -46,4 +46,4 @@ pack_t pack_native; (((y) << 12) & 0xfff00000) | \ (((y) << 0) & 0x000000ff))) -#endif /* _PACK_DEV_H */ +#endif /* ARCHIVE_PACK_DEV_H */ Modified: head/contrib/libarchive/libarchive/archive_pathmatch.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_pathmatch.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_pathmatch.h Wed Feb 12 00:16:56 2020 (r357785) @@ -26,14 +26,14 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_PATHMATCH_H +#define ARCHIVE_PATHMATCH_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif - -#ifndef ARCHIVE_PATHMATCH_H -#define ARCHIVE_PATHMATCH_H /* Don't anchor at beginning unless the pattern starts with "^" */ #define PATHMATCH_NO_ANCHOR_START 1 Modified: head/contrib/libarchive/libarchive/archive_platform_acl.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_platform_acl.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_platform_acl.h Wed Feb 12 00:16:56 2020 (r357785) @@ -30,6 +30,12 @@ #ifndef ARCHIVE_PLATFORM_ACL_H_INCLUDED #define ARCHIVE_PLATFORM_ACL_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#ifndef __LIBARCHIVE_TEST_COMMON +#error This header is only to be used internally to libarchive. +#endif +#endif + /* * Determine what ACL types are supported */ Modified: head/contrib/libarchive/libarchive/archive_platform_xattr.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_platform_xattr.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_platform_xattr.h Wed Feb 12 00:16:56 2020 (r357785) @@ -30,6 +30,12 @@ #ifndef ARCHIVE_PLATFORM_XATTR_H_INCLUDED #define ARCHIVE_PLATFORM_XATTR_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#ifndef __LIBARCHIVE_TEST_COMMON +#error This header is only to be used internally to libarchive. +#endif +#endif + /* * Determine if we support extended attributes */ Modified: head/contrib/libarchive/libarchive/archive_ppmd7.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_ppmd7.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_ppmd7.c Wed Feb 12 00:16:56 2020 (r357785) @@ -1000,7 +1000,7 @@ static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) { - p->Low += start * (p->Range /= total); + p->Low += (UInt64)start * (UInt64)(p->Range /= total); p->Range *= size; while (p->Range < kTopValue) { Modified: head/contrib/libarchive/libarchive/archive_ppmd7_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_ppmd7_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_ppmd7_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -6,12 +6,12 @@ This code is based on PPMd var.H (2001): Dmitry Shkari of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ +#ifndef ARCHIVE_PPMD7_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD7_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_PPMD7_PRIVATE_H_INCLUDED -#define ARCHIVE_PPMD7_PRIVATE_H_INCLUDED #include "archive_ppmd_private.h" Modified: head/contrib/libarchive/libarchive/archive_ppmd8_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_ppmd8_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_ppmd8_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -4,8 +4,8 @@ This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ -#ifndef __PPMD8_H -#define __PPMD8_H +#ifndef ARCHIVE_PPMD8_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD8_PRIVATE_H_INCLUDED #include "archive_ppmd_private.h" Modified: head/contrib/libarchive/libarchive/archive_ppmd_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_ppmd_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_ppmd_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -2,12 +2,12 @@ 2010-03-12 : Igor Pavlov : Public domain This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ +#ifndef ARCHIVE_PPMD_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_PPMD_PRIVATE_H_INCLUDED -#define ARCHIVE_PPMD_PRIVATE_H_INCLUDED #include Modified: head/contrib/libarchive/libarchive/archive_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -25,13 +25,13 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_PRIVATE_H_INCLUDED +#define ARCHIVE_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_PRIVATE_H_INCLUDED -#define ARCHIVE_PRIVATE_H_INCLUDED - #if HAVE_ICONV_H #include #endif @@ -153,6 +153,11 @@ void __archive_errx(int retvalue, const char *msg) __L void __archive_ensure_cloexec_flag(int fd); int __archive_mktemp(const char *tmpdir); +#if defined(_WIN32) && !defined(__CYGWIN__) +int __archive_mkstemp(wchar_t *template); +#else +int __archive_mkstemp(char *template); +#endif int __archive_clean(struct archive *); Modified: head/contrib/libarchive/libarchive/archive_random_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_random_private.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_random_private.h Wed Feb 12 00:16:56 2020 (r357785) @@ -23,12 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_RANDOM_PRIVATE_H_INCLUDED +#define ARCHIVE_RANDOM_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_RANDOM_PRIVATE_H_INCLUDED -#define ARCHIVE_RANDOM_PRIVATE_H_INCLUDED /* Random number generator. */ int archive_random(void *buf, size_t nbytes); Modified: head/contrib/libarchive/libarchive/archive_rb.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_rb.h Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_rb.h Wed Feb 12 00:16:56 2020 (r357785) @@ -28,9 +28,10 @@ * * Based on NetBSD: rb.h,v 1.13 2009/08/16 10:57:01 yamt Exp */ -#ifndef ARCHIVE_RB_H_ -#define ARCHIVE_RB_H_ +#ifndef ARCHIVE_RB_H_INCLUDED +#define ARCHIVE_RB_H_INCLUDED + struct archive_rb_node { struct archive_rb_node *rb_nodes[2]; /* @@ -48,12 +49,24 @@ struct archive_rb_node { __archive_rb_tree_iterate((T), NULL, ARCHIVE_RB_DIR_LEFT) #define ARCHIVE_RB_TREE_MAX(T) \ __archive_rb_tree_iterate((T), NULL, ARCHIVE_RB_DIR_RIGHT) +#define ARCHIVE_RB_TREE_NEXT(T, N) \ + __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_RIGHT) +#define ARCHIVE_RB_TREE_PREV(T, N) \ + __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_LEFT) #define ARCHIVE_RB_TREE_FOREACH(N, T) \ for ((N) = ARCHIVE_RB_TREE_MIN(T); (N); \ - (N) = __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_RIGHT)) + (N) = ARCHIVE_RB_TREE_NEXT((T), (N))) #define ARCHIVE_RB_TREE_FOREACH_REVERSE(N, T) \ for ((N) = ARCHIVE_RB_TREE_MAX(T); (N); \ - (N) = __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_LEFT)) + (N) = ARCHIVE_RB_TREE_PREV((T), (N))) +#define ARCHIVE_RB_TREE_FOREACH_SAFE(N, T, S) \ + for ((N) = ARCHIVE_RB_TREE_MIN(T); \ + (N) && ((S) = ARCHIVE_RB_TREE_NEXT((T), (N)), 1); \ + (N) = (S)) +#define ARCHIVE_RB_TREE_FOREACH_REVERSE_SAFE(N, T, S) \ + for ((N) = ARCHIVE_RB_TREE_MAX(T); \ + (N) && ((S) = ARCHIVE_RB_TREE_PREV((T), (N)), 1); \ + (N) = (S)) /* * archive_rbto_compare_nodes_fn: Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Tue Feb 11 23:49:55 2020 (r357784) +++ head/contrib/libarchive/libarchive/archive_read.c Wed Feb 12 00:16:56 2020 (r357785) @@ -433,7 +433,7 @@ archive_read_add_callback_data(struct archive *_a, voi return ARCHIVE_FATAL; } a->client.dataset = (struct archive_read_data_node *)p; - for (i = a->client.nodes - 1; i > iindex && i > 0; i--) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 12 00:31:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A30424855D; Wed, 12 Feb 2020 00:31:01 +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) server-signature RSA-PSS (4096 bits) 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 48HLCn2G0jz4sMc; Wed, 12 Feb 2020 00:31:01 +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 48DFF18A3D; Wed, 12 Feb 2020 00:31:01 +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 01C0V123099545; Wed, 12 Feb 2020 00:31:01 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C0V1Wj099544; Wed, 12 Feb 2020 00:31:01 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202002120031.01C0V1Wj099544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 12 Feb 2020 00:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357786 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 357786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 00:31:01 -0000 Author: eugen Date: Wed Feb 12 00:31:00 2020 New Revision: 357786 URL: https://svnweb.freebsd.org/changeset/base/357786 Log: ng_nat: avoid panic if attached directly to ng_ether and got short packet From the beginning, ng_nat safely assumed cleansed traffic because of limited ways it could be attached to NETGRAPH: ng_ipfw or ng_ppp only. Now as it may be attached with ng_ether too, the assumption proven wrong. Add needed check to the ng_nat. Thanks for markj for debugging this. PR: 243096 Submitted by: Lutz Donnerhacke Reported by: Robert James Hernandez Reviewed by: markj and others MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23091 Modified: head/sys/netgraph/ng_nat.c Modified: head/sys/netgraph/ng_nat.c ============================================================================== --- head/sys/netgraph/ng_nat.c Wed Feb 12 00:16:56 2020 (r357785) +++ head/sys/netgraph/ng_nat.c Wed Feb 12 00:31:00 2020 (r357786) @@ -806,11 +806,16 @@ ng_nat_rcvdata(hook_p hook, item_p item ) panic("Corrupted priv->dlt: %u", priv->dlt); } + if (m->m_pkthdr.len < ipofs + sizeof(struct ip)) + goto send; /* packet too short to hold IP */ + c = (char *)mtodo(m, ipofs); ip = (struct ip *)mtodo(m, ipofs); - KASSERT(m->m_pkthdr.len == ipofs + ntohs(ip->ip_len), - ("ng_nat: ip_len != m_pkthdr.len")); + if (ip->ip_v != IPVERSION) + goto send; /* other IP version, let it pass */ + if (m->m_pkthdr.len < ipofs + ntohs(ip->ip_len)) + goto send; /* packet too short (i.e. fragmented or broken) */ /* * We drop packet when: From owner-svn-src-all@freebsd.org Wed Feb 12 00:46:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B711A248B6A; Wed, 12 Feb 2020 00:46:33 +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) server-signature RSA-PSS (4096 bits) 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 48HLYj4Tslz4tGf; Wed, 12 Feb 2020 00:46:33 +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 9544818DE2; Wed, 12 Feb 2020 00:46:33 +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 01C0kXG9007306; Wed, 12 Feb 2020 00:46:33 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C0kXXc007305; Wed, 12 Feb 2020 00:46:33 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202002120046.01C0kXXc007305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 12 Feb 2020 00:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357787 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 357787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 00:46:33 -0000 Author: eugen Date: Wed Feb 12 00:46:33 2020 New Revision: 357787 URL: https://svnweb.freebsd.org/changeset/base/357787 Log: ipfw nat: add missing bits after r357092 (RFC 6598/Carrier Grade NAT) Submitted by: Neel Chauhan Reviewed by: Lutz Donnerhacke MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23448 Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Wed Feb 12 00:31:00 2020 (r357786) +++ head/sbin/ipfw/nat.c Wed Feb 12 00:46:33 2020 (r357787) @@ -793,6 +793,7 @@ ipfw_config_nat(int ac, char **av) case TOK_SAME_PORTS: case TOK_SKIP_GLOBAL: case TOK_UNREG_ONLY: + case TOK_UNREG_CGN: case TOK_RESET_ADDR: case TOK_ALIAS_REV: case TOK_PROXY_ONLY: @@ -886,6 +887,9 @@ ipfw_config_nat(int ac, char **av) break; case TOK_UNREG_ONLY: n->mode |= PKT_ALIAS_UNREGISTERED_ONLY; + break; + case TOK_UNREG_CGN: + n->mode |= PKT_ALIAS_UNREGISTERED_CGN; break; case TOK_SKIP_GLOBAL: n->mode |= PKT_ALIAS_SKIP_GLOBAL; From owner-svn-src-all@freebsd.org Wed Feb 12 00:58:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BE9E248D57; Wed, 12 Feb 2020 00:58:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HLqG12Ryz4tjm; Wed, 12 Feb 2020 00:58:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A29118FA9; Wed, 12 Feb 2020 00:58:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01C0wHOa013134; Wed, 12 Feb 2020 00:58:17 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C0wHOC013133; Wed, 12 Feb 2020 00:58:17 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002120058.01C0wHOC013133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 12 Feb 2020 00:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357788 - in head: share/man/man4 sys/dev/hme X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/hme X-SVN-Commit-Revision: 357788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 00:58:18 -0000 Author: brooks Date: Wed Feb 12 00:58:17 2020 New Revision: 357788 URL: https://svnweb.freebsd.org/changeset/base/357788 Log: Mark hme(4) as deprecated. It was saved from the initial purge of drivers in fcp-101 due to being the onboard Ethernet device on a number of sparc64 machines. Now that sparc64 is gone, it serves little purpose (PCI cards exist, but are rare and are unlikely to have been deployed outside Sun systems). MFC after: 3 days Modified: head/share/man/man4/hme.4 head/sys/dev/hme/if_hme.c Modified: head/share/man/man4/hme.4 ============================================================================== --- head/share/man/man4/hme.4 Wed Feb 12 00:46:33 2020 (r357787) +++ head/share/man/man4/hme.4 Wed Feb 12 00:58:17 2020 (r357788) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd February 12, 2020 .Dt HME 4 .Os .Sh NAME @@ -50,6 +50,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_hme_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/hme/if_hme.c ============================================================================== --- head/sys/dev/hme/if_hme.c Wed Feb 12 00:46:33 2020 (r357787) +++ head/sys/dev/hme/if_hme.c Wed Feb 12 00:58:17 2020 (r357788) @@ -373,6 +373,8 @@ hme_config(struct hme_softc *sc) ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_HWCSUM; ifp->if_hwassist |= sc->sc_csum_features; ifp->if_capenable |= IFCAP_VLAN_MTU | IFCAP_HWCSUM; + + gone_in_dev(sc->sc_dev, 13, "10/100 NIC almost exclusively for sparc64"); return (0); fail_txdesc: From owner-svn-src-all@freebsd.org Wed Feb 12 02:04:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 370542499A3; Wed, 12 Feb 2020 02:04:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HNH80ZtKz3Cqq; Wed, 12 Feb 2020 02:04:04 +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 0E8D519C20; Wed, 12 Feb 2020 02:04:04 +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 01C243w1054371; Wed, 12 Feb 2020 02:04:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C243gn054369; Wed, 12 Feb 2020 02:04:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120204.01C243gn054369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357789 - in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login X-SVN-Commit-Revision: 357789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:04:04 -0000 Author: kevans Date: Wed Feb 12 02:04:03 2020 New Revision: 357789 URL: https://svnweb.freebsd.org/changeset/base/357789 Log: MFC r357560, r357707: login.conf(5) mail capability r357560: login.conf(5): split MAIL env var out into a "mail" capability This allows it to be easily suppressed in, e.g., the "daemon" class where it will not be properly expanded. This is a part of D21481. Submitted by: Andrew Gierth r357707: login.conf(5): update commented-out standard, too MAIL now has a mail capability, instead, as of r357560. Modified: stable/11/etc/login.conf stable/11/lib/libutil/login.conf.5 stable/11/lib/libutil/login_class.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libutil/login.conf.5 stable/12/lib/libutil/login_class.c stable/12/usr.bin/login/login.conf Directory Properties: stable/12/ (props changed) Modified: stable/11/etc/login.conf ============================================================================== --- stable/11/etc/login.conf Wed Feb 12 00:58:17 2020 (r357788) +++ stable/11/etc/login.conf Wed Feb 12 02:04:03 2020 (r357789) @@ -26,7 +26,8 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=BLOCKSIZE=K:\ + :mail=/var/mail/$:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ @@ -61,6 +62,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :mail@:\ :memorylocked=128M:\ :tc=default: news:\ @@ -121,7 +123,8 @@ russian|Russian Users Accounts:\ #standard:\ # :copyright=/etc/COPYRIGHT:\ # :welcome=/etc/motd:\ -# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :setenv=BLOCKSIZE=K:\ +# :mail=/var/mail/$:\ # :path=~/bin /bin /usr/bin /usr/local/bin:\ # :manpath=/usr/share/man /usr/local/man:\ # :nologin=/var/run/nologin:\ Modified: stable/11/lib/libutil/login.conf.5 ============================================================================== --- stable/11/lib/libutil/login.conf.5 Wed Feb 12 00:58:17 2020 (r357788) +++ stable/11/lib/libutil/login.conf.5 Wed Feb 12 02:04:03 2020 (r357789) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2011 +.Dd January 19, 2020 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -237,6 +237,7 @@ for details. .It "label string Default MAC policy; see" .Xr maclabel 7 . .It "lang string Set $LANG environment variable to the specified value." +.It "mail string Set $MAIL environment variable to the specified value." .It "manpath path Default search path for manpages." .It "nocheckmail bool false Display mail status at login." .It "nologin file If the file exists it will be displayed and" Modified: stable/11/lib/libutil/login_class.c ============================================================================== --- stable/11/lib/libutil/login_class.c Wed Feb 12 00:58:17 2020 (r357788) +++ stable/11/lib/libutil/login_class.c Wed Feb 12 02:04:03 2020 (r357789) @@ -132,6 +132,7 @@ static struct login_vars { }, envars[] = { { "lang", "LANG", NULL, 1}, { "charset", "MM_CHARSET", NULL, 1}, + { "mail", "MAIL", NULL, 1}, { "timezone", "TZ", NULL, 1}, { "term", "TERM", NULL, 0}, { NULL, NULL, NULL, 0} From owner-svn-src-all@freebsd.org Wed Feb 12 02:04:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82722499B0; Wed, 12 Feb 2020 02:04:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HNH85t92z3Cqr; Wed, 12 Feb 2020 02:04:04 +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 C4D3119C21; Wed, 12 Feb 2020 02:04:04 +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 01C244p8054379; Wed, 12 Feb 2020 02:04:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C244nZ054377; Wed, 12 Feb 2020 02:04:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120204.01C244nZ054377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357789 - in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login X-SVN-Commit-Revision: 357789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:04:05 -0000 Author: kevans Date: Wed Feb 12 02:04:03 2020 New Revision: 357789 URL: https://svnweb.freebsd.org/changeset/base/357789 Log: MFC r357560, r357707: login.conf(5) mail capability r357560: login.conf(5): split MAIL env var out into a "mail" capability This allows it to be easily suppressed in, e.g., the "daemon" class where it will not be properly expanded. This is a part of D21481. Submitted by: Andrew Gierth r357707: login.conf(5): update commented-out standard, too MAIL now has a mail capability, instead, as of r357560. Modified: stable/12/lib/libutil/login.conf.5 stable/12/lib/libutil/login_class.c stable/12/usr.bin/login/login.conf Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/etc/login.conf stable/11/lib/libutil/login.conf.5 stable/11/lib/libutil/login_class.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libutil/login.conf.5 ============================================================================== --- stable/12/lib/libutil/login.conf.5 Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/lib/libutil/login.conf.5 Wed Feb 12 02:04:03 2020 (r357789) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2011 +.Dd January 19, 2020 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -237,6 +237,7 @@ for details. .It "label string Default MAC policy; see" .Xr maclabel 7 . .It "lang string Set $LANG environment variable to the specified value." +.It "mail string Set $MAIL environment variable to the specified value." .It "manpath path Default search path for manpages." .It "nocheckmail bool false Display mail status at login." .It "nologin file If the file exists it will be displayed and" Modified: stable/12/lib/libutil/login_class.c ============================================================================== --- stable/12/lib/libutil/login_class.c Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/lib/libutil/login_class.c Wed Feb 12 02:04:03 2020 (r357789) @@ -132,6 +132,7 @@ static struct login_vars { }, envars[] = { { "lang", "LANG", NULL, 1}, { "charset", "MM_CHARSET", NULL, 1}, + { "mail", "MAIL", NULL, 1}, { "timezone", "TZ", NULL, 1}, { "term", "TERM", NULL, 0}, { NULL, NULL, NULL, 0} Modified: stable/12/usr.bin/login/login.conf ============================================================================== --- stable/12/usr.bin/login/login.conf Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/usr.bin/login/login.conf Wed Feb 12 02:04:03 2020 (r357789) @@ -26,7 +26,8 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=BLOCKSIZE=K:\ + :mail=/var/mail/$:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ @@ -61,6 +62,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :mail@:\ :memorylocked=128M:\ :tc=default: news:\ @@ -121,7 +123,8 @@ russian|Russian Users Accounts:\ #standard:\ # :copyright=/etc/COPYRIGHT:\ # :welcome=/etc/motd:\ -# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :setenv=BLOCKSIZE=K:\ +# :mail=/var/mail/$:\ # :path=~/bin /bin /usr/bin /usr/local/bin:\ # :manpath=/usr/share/man /usr/local/man:\ # :nologin=/var/run/nologin:\ From owner-svn-src-all@freebsd.org Wed Feb 12 02:07:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25F49249AA0; Wed, 12 Feb 2020 02:07:38 +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) server-signature RSA-PSS (4096 bits) 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 48HNMG08Hnz3D94; Wed, 12 Feb 2020 02:07:38 +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 EFE6519C24; Wed, 12 Feb 2020 02:07:37 +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 01C27baf054633; Wed, 12 Feb 2020 02:07:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C27bZM054631; Wed, 12 Feb 2020 02:07:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120207.01C27bZM054631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357790 - in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Commit-Revision: 357790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:07:38 -0000 Author: kevans Date: Wed Feb 12 02:07:37 2020 New Revision: 357790 URL: https://svnweb.freebsd.org/changeset/base/357790 Log: MFC r354450: Add -0 option to ENV(1) With the -0 option added to ENV(1), some ports will no longer require genv from sysutils/coreutils. Modified: stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/env/env.1 ============================================================================== --- stable/11/usr.bin/env/env.1 Wed Feb 12 02:04:03 2020 (r357789) +++ stable/11/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020 (r357790) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd April 17, 2008 +.Dd November 7, 2019 .Dt ENV 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd set environment and execute command, or print environment .Sh SYNOPSIS .Nm -.Op Fl iv +.Op Fl 0iv .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -64,6 +64,8 @@ is executed. .Pp The options are as follows: .Bl -tag -width indent +.It Fl 0 +End each output line with NUL, not newline. .It Fl i Execute the .Ar utility @@ -130,8 +132,15 @@ If no .Ar utility is specified, .Nm -prints out the names and values -of the variables in the environment, with one name/value pair per line. +prints out the names and values of the variables in the environment. +Each name/value pair is separated by a new line unless +.Fl 0 +is specified, in which case name/value pairs are separated by NUL. +Both +.Fl 0 +and +.Ar utility +may not be specified together. .\" .Ss Details of Fl S \&Ss (split-string) processing The processing of the Modified: stable/11/usr.bin/env/env.c ============================================================================== --- stable/11/usr.bin/env/env.c Wed Feb 12 02:04:03 2020 (r357789) +++ stable/11/usr.bin/env/env.c Wed Feb 12 02:07:37 2020 (r357790) @@ -57,22 +57,33 @@ int env_verbosity; static void usage(void); +/* + * Exit codes. + */ +#define EXIT_CANCELED 125 /* Internal error prior to exec attempt. */ +#define EXIT_CANNOT_INVOKE 126 /* Program located, but not usable. */ +#define EXIT_ENOENT 127 /* Could not find program to exec. */ + int main(int argc, char **argv) { - char *altpath, **ep, *p, **parg; + char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; int ch, want_clear; int rtrn; altpath = NULL; want_clear = 0; - while ((ch = getopt(argc, argv, "-iP:S:u:v")) != -1) + term = '\n'; + while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) switch(ch) { case '-': case 'i': want_clear = 1; break; + case '0': + term = '\0'; + break; case 'P': altpath = strdup(optarg); break; @@ -116,6 +127,8 @@ main(int argc, char **argv) err(EXIT_FAILURE, "setenv %s", *argv); } if (*argv) { + if (term == '\0') + errx(EXIT_CANCELED, "cannot specify command with -0"); if (altpath) search_paths(altpath, argv); if (env_verbosity) { @@ -127,10 +140,11 @@ main(int argc, char **argv) sleep(1); } execvp(*argv, argv); - err(errno == ENOENT ? 127 : 126, "%s", *argv); + err(errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE, + "%s", *argv); } for (ep = environ; *ep; ep++) - (void)printf("%s\n", *ep); + (void)printf("%s%c", *ep, term); exit(0); } @@ -138,7 +152,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Wed Feb 12 02:07:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BB26249AB0; Wed, 12 Feb 2020 02:07:38 +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) server-signature RSA-PSS (4096 bits) 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 48HNMG3cLcz3D95; Wed, 12 Feb 2020 02:07:38 +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 7737419C25; Wed, 12 Feb 2020 02:07:38 +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 01C27csu054640; Wed, 12 Feb 2020 02:07:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C27cqE054638; Wed, 12 Feb 2020 02:07:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120207.01C27cqE054638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357790 - in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Commit-Revision: 357790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:07:38 -0000 Author: kevans Date: Wed Feb 12 02:07:37 2020 New Revision: 357790 URL: https://svnweb.freebsd.org/changeset/base/357790 Log: MFC r354450: Add -0 option to ENV(1) With the -0 option added to ENV(1), some ports will no longer require genv from sysutils/coreutils. Modified: stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.bin/env/env.1 ============================================================================== --- stable/12/usr.bin/env/env.1 Wed Feb 12 02:04:03 2020 (r357789) +++ stable/12/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020 (r357790) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd April 17, 2008 +.Dd November 7, 2019 .Dt ENV 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd set environment and execute command, or print environment .Sh SYNOPSIS .Nm -.Op Fl iv +.Op Fl 0iv .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -64,6 +64,8 @@ is executed. .Pp The options are as follows: .Bl -tag -width indent +.It Fl 0 +End each output line with NUL, not newline. .It Fl i Execute the .Ar utility @@ -130,8 +132,15 @@ If no .Ar utility is specified, .Nm -prints out the names and values -of the variables in the environment, with one name/value pair per line. +prints out the names and values of the variables in the environment. +Each name/value pair is separated by a new line unless +.Fl 0 +is specified, in which case name/value pairs are separated by NUL. +Both +.Fl 0 +and +.Ar utility +may not be specified together. .\" .Ss Details of Fl S \&Ss (split-string) processing The processing of the Modified: stable/12/usr.bin/env/env.c ============================================================================== --- stable/12/usr.bin/env/env.c Wed Feb 12 02:04:03 2020 (r357789) +++ stable/12/usr.bin/env/env.c Wed Feb 12 02:07:37 2020 (r357790) @@ -59,22 +59,33 @@ int env_verbosity; static void usage(void); +/* + * Exit codes. + */ +#define EXIT_CANCELED 125 /* Internal error prior to exec attempt. */ +#define EXIT_CANNOT_INVOKE 126 /* Program located, but not usable. */ +#define EXIT_ENOENT 127 /* Could not find program to exec. */ + int main(int argc, char **argv) { - char *altpath, **ep, *p, **parg; + char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; int ch, want_clear; int rtrn; altpath = NULL; want_clear = 0; - while ((ch = getopt(argc, argv, "-iP:S:u:v")) != -1) + term = '\n'; + while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) switch(ch) { case '-': case 'i': want_clear = 1; break; + case '0': + term = '\0'; + break; case 'P': altpath = strdup(optarg); break; @@ -118,6 +129,8 @@ main(int argc, char **argv) err(EXIT_FAILURE, "setenv %s", *argv); } if (*argv) { + if (term == '\0') + errx(EXIT_CANCELED, "cannot specify command with -0"); if (altpath) search_paths(altpath, argv); if (env_verbosity) { @@ -129,10 +142,11 @@ main(int argc, char **argv) sleep(1); } execvp(*argv, argv); - err(errno == ENOENT ? 127 : 126, "%s", *argv); + err(errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE, + "%s", *argv); } for (ep = environ; *ep; ep++) - (void)printf("%s\n", *ep); + (void)printf("%s%c", *ep, term); exit(0); } @@ -140,7 +154,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Wed Feb 12 02:09:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34155249B95; Wed, 12 Feb 2020 02:09:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HNP60bkYz3DQS; Wed, 12 Feb 2020 02:09:14 +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 0E8D119C27; Wed, 12 Feb 2020 02:09:14 +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 01C29DeV054787; Wed, 12 Feb 2020 02:09:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C29Drr054783; Wed, 12 Feb 2020 02:09:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120209.01C29Drr054783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357791 - in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Commit-Revision: 357791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:09:14 -0000 Author: kevans Date: Wed Feb 12 02:09:12 2020 New Revision: 357791 URL: https://svnweb.freebsd.org/changeset/base/357791 Log: MFC r357563: env(1): grow -L user/class and -U user/class options This allows one to set the environment of the specified user either from login.conf alone (-L) or both login.conf and ~/.login_conf if present (-U). This is a supporting feature to allow service(8) to pull in the environment of the "daemon" class before invoking the rc script. Modified: stable/12/usr.bin/env/Makefile stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/env/Makefile stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.bin/env/Makefile ============================================================================== --- stable/12/usr.bin/env/Makefile Wed Feb 12 02:07:37 2020 (r357790) +++ stable/12/usr.bin/env/Makefile Wed Feb 12 02:09:12 2020 (r357791) @@ -4,4 +4,6 @@ PROG= env SRCS= env.c envopts.c +LIBADD= util + .include Modified: stable/12/usr.bin/env/env.1 ============================================================================== --- stable/12/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020 (r357790) +++ stable/12/usr.bin/env/env.1 Wed Feb 12 02:09:12 2020 (r357791) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd January 19, 2020 .Dt ENV 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl 0iv +.Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -76,6 +77,28 @@ The environment inherited by .Nm is ignored completely. +.\" -L | -U +.It Fl L | Fl U Ar user Ns Op / Ns Ar class +Add the environment variable definitions from +.Xr login.conf 5 +for the specified user and login class to the environment, after +processing any +.Fl i +or +.Fl u +options, but before processing any +.Ar name Ns = Ns Ar value +options. +If +.Fl L +is used, only the system-wide +.Pa /etc/login.conf.db +file is read; if +.Fl U +is used, then the specified user's +.Pa ~/.login_conf +is read as well. +The user may be specified by name or by uid. .\" -P .It Fl P Ar altpath Search the set of directories as specified by @@ -450,6 +473,7 @@ option as a synonym for .Xr printenv 1 , .Xr sh 1 , .Xr execvp 3 , +.Xr login.conf 5 , .Xr environ 7 .Sh STANDARDS The @@ -457,7 +481,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl P , S , u +.Fl 0 , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -474,6 +498,12 @@ and .Fl v options were added in .Fx 6.0 . +The +.Fl 0 , L +and +.Fl U +options were added in +.Fx 13.0 . .Sh BUGS The .Nm Modified: stable/12/usr.bin/env/env.c ============================================================================== --- stable/12/usr.bin/env/env.c Wed Feb 12 02:07:37 2020 (r357790) +++ stable/12/usr.bin/env/env.c Wed Feb 12 02:09:12 2020 (r357791) @@ -44,11 +44,16 @@ static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/9 #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include +#include +#include #include -#include #include +#include #include #include "envopts.h" @@ -71,13 +76,23 @@ main(int argc, char **argv) { char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; + char *login_class, *login_name; + struct passwd *pw; + login_cap_t *lc; + bool login_as_user; + uid_t uid; int ch, want_clear; int rtrn; altpath = NULL; + login_class = NULL; + login_name = NULL; + pw = NULL; + lc = NULL; + login_as_user = false; want_clear = 0; term = '\n'; - while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) + while ((ch = getopt(argc, argv, "-0iL:P:S:U:u:v")) != -1) switch(ch) { case '-': case 'i': @@ -86,6 +101,12 @@ main(int argc, char **argv) case '0': term = '\0'; break; + case 'U': + login_as_user = true; + /* FALLTHROUGH */ + case 'L': + login_name = optarg; + break; case 'P': altpath = strdup(optarg); break; @@ -119,6 +140,48 @@ main(int argc, char **argv) if (env_verbosity) fprintf(stderr, "#env clearing environ\n"); } + if (login_name != NULL) { + login_class = strchr(login_name, '/'); + if (login_class) + *login_class++ = '\0'; + pw = getpwnam(login_name); + if (pw == NULL) { + char *endp = NULL; + errno = 0; + uid = strtoul(login_name, &endp, 10); + if (errno == 0 && *endp == '\0') + pw = getpwuid(uid); + } + if (pw == NULL) + errx(EXIT_FAILURE, "no such user: %s", login_name); + if (login_class != NULL) { + lc = login_getclass(login_class); + if (lc == NULL) + errx(EXIT_FAILURE, "no such login class: %s", + login_class); + } else { + lc = login_getpwclass(pw); + if (lc == NULL) + errx(EXIT_FAILURE, "login_getpwclass failed"); + } + + /* + * This is not done with setusercontext() because that will + * try and use ~/.login_conf even when we don't want it to. + */ + setclassenvironment(lc, pw, 1); + setclassenvironment(lc, pw, 0); + if (login_as_user) { + login_close(lc); + if ((lc = login_getuserclass(pw)) != NULL) { + setclassenvironment(lc, pw, 1); + setclassenvironment(lc, pw, 0); + } + } + endpwent(); + if (lc != NULL) + login_close(lc); + } for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv) { if (env_verbosity) fprintf(stderr, "#env setenv:\t%s\n", *argv); @@ -154,7 +217,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-L|-U user[/class]] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Wed Feb 12 02:09:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68B11249B8F; Wed, 12 Feb 2020 02:09:13 +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) server-signature RSA-PSS (4096 bits) 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 48HNP526pfz3DQR; Wed, 12 Feb 2020 02:09:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43F2A19C26; Wed, 12 Feb 2020 02:09:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01C29DvN054778; Wed, 12 Feb 2020 02:09:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C29CVJ054775; Wed, 12 Feb 2020 02:09:12 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120209.01C29CVJ054775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357791 - in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/env 12/usr.bin/env X-SVN-Commit-Revision: 357791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:09:13 -0000 Author: kevans Date: Wed Feb 12 02:09:12 2020 New Revision: 357791 URL: https://svnweb.freebsd.org/changeset/base/357791 Log: MFC r357563: env(1): grow -L user/class and -U user/class options This allows one to set the environment of the specified user either from login.conf alone (-L) or both login.conf and ~/.login_conf if present (-U). This is a supporting feature to allow service(8) to pull in the environment of the "daemon" class before invoking the rc script. Modified: stable/11/usr.bin/env/Makefile stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/env/Makefile stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/env/Makefile ============================================================================== --- stable/11/usr.bin/env/Makefile Wed Feb 12 02:07:37 2020 (r357790) +++ stable/11/usr.bin/env/Makefile Wed Feb 12 02:09:12 2020 (r357791) @@ -4,4 +4,6 @@ PROG= env SRCS= env.c envopts.c +LIBADD= util + .include Modified: stable/11/usr.bin/env/env.1 ============================================================================== --- stable/11/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020 (r357790) +++ stable/11/usr.bin/env/env.1 Wed Feb 12 02:09:12 2020 (r357791) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd January 19, 2020 .Dt ENV 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl 0iv +.Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -76,6 +77,28 @@ The environment inherited by .Nm is ignored completely. +.\" -L | -U +.It Fl L | Fl U Ar user Ns Op / Ns Ar class +Add the environment variable definitions from +.Xr login.conf 5 +for the specified user and login class to the environment, after +processing any +.Fl i +or +.Fl u +options, but before processing any +.Ar name Ns = Ns Ar value +options. +If +.Fl L +is used, only the system-wide +.Pa /etc/login.conf.db +file is read; if +.Fl U +is used, then the specified user's +.Pa ~/.login_conf +is read as well. +The user may be specified by name or by uid. .\" -P .It Fl P Ar altpath Search the set of directories as specified by @@ -450,6 +473,7 @@ option as a synonym for .Xr printenv 1 , .Xr sh 1 , .Xr execvp 3 , +.Xr login.conf 5 , .Xr environ 7 .Sh STANDARDS The @@ -457,7 +481,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl P , S , u +.Fl 0 , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -474,6 +498,12 @@ and .Fl v options were added in .Fx 6.0 . +The +.Fl 0 , L +and +.Fl U +options were added in +.Fx 13.0 . .Sh BUGS The .Nm Modified: stable/11/usr.bin/env/env.c ============================================================================== --- stable/11/usr.bin/env/env.c Wed Feb 12 02:07:37 2020 (r357790) +++ stable/11/usr.bin/env/env.c Wed Feb 12 02:09:12 2020 (r357791) @@ -42,11 +42,16 @@ static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/9 #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include +#include +#include #include -#include #include +#include #include #include "envopts.h" @@ -69,13 +74,23 @@ main(int argc, char **argv) { char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; + char *login_class, *login_name; + struct passwd *pw; + login_cap_t *lc; + bool login_as_user; + uid_t uid; int ch, want_clear; int rtrn; altpath = NULL; + login_class = NULL; + login_name = NULL; + pw = NULL; + lc = NULL; + login_as_user = false; want_clear = 0; term = '\n'; - while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) + while ((ch = getopt(argc, argv, "-0iL:P:S:U:u:v")) != -1) switch(ch) { case '-': case 'i': @@ -84,6 +99,12 @@ main(int argc, char **argv) case '0': term = '\0'; break; + case 'U': + login_as_user = true; + /* FALLTHROUGH */ + case 'L': + login_name = optarg; + break; case 'P': altpath = strdup(optarg); break; @@ -117,6 +138,48 @@ main(int argc, char **argv) if (env_verbosity) fprintf(stderr, "#env clearing environ\n"); } + if (login_name != NULL) { + login_class = strchr(login_name, '/'); + if (login_class) + *login_class++ = '\0'; + pw = getpwnam(login_name); + if (pw == NULL) { + char *endp = NULL; + errno = 0; + uid = strtoul(login_name, &endp, 10); + if (errno == 0 && *endp == '\0') + pw = getpwuid(uid); + } + if (pw == NULL) + errx(EXIT_FAILURE, "no such user: %s", login_name); + if (login_class != NULL) { + lc = login_getclass(login_class); + if (lc == NULL) + errx(EXIT_FAILURE, "no such login class: %s", + login_class); + } else { + lc = login_getpwclass(pw); + if (lc == NULL) + errx(EXIT_FAILURE, "login_getpwclass failed"); + } + + /* + * This is not done with setusercontext() because that will + * try and use ~/.login_conf even when we don't want it to. + */ + setclassenvironment(lc, pw, 1); + setclassenvironment(lc, pw, 0); + if (login_as_user) { + login_close(lc); + if ((lc = login_getuserclass(pw)) != NULL) { + setclassenvironment(lc, pw, 1); + setclassenvironment(lc, pw, 0); + } + } + endpwent(); + if (lc != NULL) + login_close(lc); + } for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv) { if (env_verbosity) fprintf(stderr, "#env setenv:\t%s\n", *argv); @@ -152,7 +215,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-L|-U user[/class]] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); exit(1); } From owner-svn-src-all@freebsd.org Wed Feb 12 02:17:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 180E6249E24; Wed, 12 Feb 2020 02:17:21 +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) server-signature RSA-PSS (4096 bits) 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 48HNZS6kqCz3DwM; Wed, 12 Feb 2020 02:17:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDBB219DE7; Wed, 12 Feb 2020 02:17:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01C2HKgq061003; Wed, 12 Feb 2020 02:17:20 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C2HKYw061002; Wed, 12 Feb 2020 02:17:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120217.01C2HKYw061002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357792 - in stable: 11/sys/geom/eli 12/sys/geom/eli X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/geom/eli 12/sys/geom/eli X-SVN-Commit-Revision: 357792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:17:21 -0000 Author: kevans Date: Wed Feb 12 02:17:20 2020 New Revision: 357792 URL: https://svnweb.freebsd.org/changeset/base/357792 Log: MFC r357665: geli taste: allow GELIBOOT tagged providers as well Currently the installer will tag geliboot partitions with both BOOT and GELIBOOT; the former allows the kernel to taste it at boot, while the latter is what loaders keys off of. However, it seems reasonable to assume that if a provider's been tagged with GELIBOOT that the kernel should also take that as a hint to taste/attach at boot. This would allow us to stop tagging GELIBOOT partitions with BOOT in bsdinstall, but I'm not sure that there's a compelling reason to do so any time soon. Modified: stable/11/sys/geom/eli/g_eli.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/geom/eli/g_eli.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/geom/eli/g_eli.c ============================================================================== --- stable/11/sys/geom/eli/g_eli.c Wed Feb 12 02:09:12 2020 (r357791) +++ stable/11/sys/geom/eli/g_eli.c Wed Feb 12 02:17:20 2020 (r357792) @@ -1080,7 +1080,8 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, if (md.md_provsize != pp->mediasize) return (NULL); /* Should we attach it on boot? */ - if (!(md.md_flags & G_ELI_FLAG_BOOT)) + if (!(md.md_flags & G_ELI_FLAG_BOOT) && + !(md.md_flags & G_ELI_FLAG_GELIBOOT)) return (NULL); if (md.md_keys == 0x00) { G_ELI_DEBUG(0, "No valid keys on %s.", pp->name); From owner-svn-src-all@freebsd.org Wed Feb 12 02:17:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 739D4249E28; Wed, 12 Feb 2020 02:17:21 +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) server-signature RSA-PSS (4096 bits) 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 48HNZT2R5cz3DwN; Wed, 12 Feb 2020 02:17:21 +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 4EBBA19DEA; Wed, 12 Feb 2020 02:17:21 +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 01C2HLud061009; Wed, 12 Feb 2020 02:17:21 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C2HLg8061008; Wed, 12 Feb 2020 02:17:21 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002120217.01C2HLg8061008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 02:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357792 - in stable: 11/sys/geom/eli 12/sys/geom/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/geom/eli 12/sys/geom/eli X-SVN-Commit-Revision: 357792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:17:21 -0000 Author: kevans Date: Wed Feb 12 02:17:20 2020 New Revision: 357792 URL: https://svnweb.freebsd.org/changeset/base/357792 Log: MFC r357665: geli taste: allow GELIBOOT tagged providers as well Currently the installer will tag geliboot partitions with both BOOT and GELIBOOT; the former allows the kernel to taste it at boot, while the latter is what loaders keys off of. However, it seems reasonable to assume that if a provider's been tagged with GELIBOOT that the kernel should also take that as a hint to taste/attach at boot. This would allow us to stop tagging GELIBOOT partitions with BOOT in bsdinstall, but I'm not sure that there's a compelling reason to do so any time soon. Modified: stable/12/sys/geom/eli/g_eli.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/geom/eli/g_eli.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/geom/eli/g_eli.c ============================================================================== --- stable/12/sys/geom/eli/g_eli.c Wed Feb 12 02:09:12 2020 (r357791) +++ stable/12/sys/geom/eli/g_eli.c Wed Feb 12 02:17:20 2020 (r357792) @@ -1081,7 +1081,8 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, if (md.md_provsize != pp->mediasize) return (NULL); /* Should we attach it on boot? */ - if (!(md.md_flags & G_ELI_FLAG_BOOT)) + if (!(md.md_flags & G_ELI_FLAG_BOOT) && + !(md.md_flags & G_ELI_FLAG_GELIBOOT)) return (NULL); if (md.md_keys == 0x00) { G_ELI_DEBUG(0, "No valid keys on %s.", pp->name); From owner-svn-src-all@freebsd.org Wed Feb 12 02:55:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBEFE24AA31; Wed, 12 Feb 2020 02:55:07 +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) server-signature RSA-PSS (4096 bits) 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 48HPQ35w4xz3H0b; Wed, 12 Feb 2020 02:55:07 +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 C61661A51F; Wed, 12 Feb 2020 02:55:07 +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 01C2t7Vg084505; Wed, 12 Feb 2020 02:55:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C2t6w6084500; Wed, 12 Feb 2020 02:55:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <202002120255.01C2t6w6084500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 12 Feb 2020 02:55:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357793 - in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware X-SVN-Commit-Revision: 357793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 02:55:08 -0000 Author: np Date: Wed Feb 12 02:55:06 2020 New Revision: 357793 URL: https://svnweb.freebsd.org/changeset/base/357793 Log: cxgbe(4): Update T4/5/6 firmwares to 1.24.12.0. Obtained from: Chelsio Communications MFC after: 1 month Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/firmware/t4fw-1.24.12.0.bin (contents, props changed) head/sys/dev/cxgbe/firmware/t5fw-1.24.12.0.bin (contents, props changed) head/sys/dev/cxgbe/firmware/t6fw-1.24.12.0.bin (contents, props changed) Deleted: head/sys/dev/cxgbe/firmware/t4fw-1.24.11.0.bin head/sys/dev/cxgbe/firmware/t5fw-1.24.11.0.bin head/sys/dev/cxgbe/firmware/t6fw-1.24.11.0.bin Modified: head/sys/conf/files head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/modules/cxgbe/t4_firmware/Makefile head/sys/modules/cxgbe/t5_firmware/Makefile head/sys/modules/cxgbe/t6_firmware/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/conf/files Wed Feb 12 02:55:06 2020 (r357793) @@ -1473,7 +1473,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1507,7 +1507,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1541,7 +1541,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.24.12.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Added: head/sys/dev/cxgbe/firmware/t4fw-1.24.12.0.bin ============================================================================== Binary file. No diff available. Modified: head/sys/dev/cxgbe/firmware/t4fw_interface.h ============================================================================== --- head/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Feb 12 02:55:06 2020 (r357793) @@ -9940,17 +9940,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 24, - T4FW_VERSION_MICRO = 11, + T4FW_VERSION_MICRO = 12, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 24, - T5FW_VERSION_MICRO = 11, + T5FW_VERSION_MICRO = 12, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 24, - T6FW_VERSION_MICRO = 11, + T6FW_VERSION_MICRO = 12, T6FW_VERSION_BUILD = 0, }; Added: head/sys/dev/cxgbe/firmware/t5fw-1.24.12.0.bin ============================================================================== Binary file. No diff available. Added: head/sys/dev/cxgbe/firmware/t6fw-1.24.12.0.bin ============================================================================== Binary file. No diff available. Modified: head/sys/modules/cxgbe/t4_firmware/Makefile ============================================================================== --- head/sys/modules/cxgbe/t4_firmware/Makefile Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/modules/cxgbe/t4_firmware/Makefile Wed Feb 12 02:55:06 2020 (r357793) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.24.11.0 +T4FW_VER= 1.24.12.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include Modified: head/sys/modules/cxgbe/t5_firmware/Makefile ============================================================================== --- head/sys/modules/cxgbe/t5_firmware/Makefile Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/modules/cxgbe/t5_firmware/Makefile Wed Feb 12 02:55:06 2020 (r357793) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.24.11.0 +T5FW_VER= 1.24.12.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include Modified: head/sys/modules/cxgbe/t6_firmware/Makefile ============================================================================== --- head/sys/modules/cxgbe/t6_firmware/Makefile Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/modules/cxgbe/t6_firmware/Makefile Wed Feb 12 02:55:06 2020 (r357793) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.24.11.0 +T6FW_VER= 1.24.12.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From owner-svn-src-all@freebsd.org Wed Feb 12 06:52:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1503224EAAB; Wed, 12 Feb 2020 06:52:25 +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) server-signature RSA-PSS (4096 bits) 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 48HVgr6t9wz3yjy; Wed, 12 Feb 2020 06:52: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 E76C11D28F; Wed, 12 Feb 2020 06:52: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 01C6qO3a028050; Wed, 12 Feb 2020 06:52:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C6qN4N028042; Wed, 12 Feb 2020 06:52:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002120652.01C6qN4N028042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 12 Feb 2020 06:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357794 - in head/share/man: man4 man4/man4.sparc64 man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/share/man: man4 man4/man4.sparc64 man9 X-SVN-Commit-Revision: 357794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 06:52:25 -0000 Author: imp Date: Wed Feb 12 06:52:22 2020 New Revision: 357794 URL: https://svnweb.freebsd.org/changeset/base/357794 Log: Remove sparc64 specific bits of the man pages. Deleted: head/share/man/man4/man4.sparc64/Makefile head/share/man/man4/man4.sparc64/Makefile.depend head/share/man/man4/man4.sparc64/auxio.4 head/share/man/man4/man4.sparc64/central.4 head/share/man/man4/man4.sparc64/clkbrd.4 head/share/man/man4/man4.sparc64/creator.4 head/share/man/man4/man4.sparc64/ebus.4 head/share/man/man4/man4.sparc64/eeprom.4 head/share/man/man4/man4.sparc64/fhc.4 head/share/man/man4/man4.sparc64/machfb.4 head/share/man/man4/man4.sparc64/ofw_console.4 head/share/man/man4/man4.sparc64/openfirm.4 head/share/man/man4/man4.sparc64/openprom.4 head/share/man/man4/man4.sparc64/rtc.4 head/share/man/man4/man4.sparc64/sbus.4 head/share/man/man4/man4.sparc64/snd_audiocs.4 Modified: head/share/man/man4/cas.4 head/share/man/man4/dc.4 head/share/man/man4/ddb.4 head/share/man/man4/gem.4 head/share/man/man4/hme.4 head/share/man/man4/le.4 head/share/man/man4/pcm.4 head/share/man/man4/smp.4 head/share/man/man9/bus_dma.9 Modified: head/share/man/man4/cas.4 ============================================================================== --- head/share/man/man4/cas.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/cas.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -105,29 +105,6 @@ Sun Quad GigaSwift Ethernet UTP (QGE) Sun Quad GigaSwift Ethernet PCI-X (QGE-X) (part no.\& 501-6738) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include on-board -versions on boards equipped with more than one Ethernet interface and -all add-on cards. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/dc.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -262,28 +262,6 @@ Xircom Cardbus Ethernet 10/100 .It Xircom Cardbus Ethernet II 10/100 .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable for the built in Sun DMFE 10/100 Mbps Ethernet -interfaces on Sun Netra X1 and Sun Fire V100. -This system configuration variable can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for both of the built in -devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used rather than the system's -default MAC address. .Sh DIAGNOSTICS .Bl -diag .It "dc%d: couldn't map ports/memory" Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/ddb.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -1477,9 +1477,6 @@ event. .It Va kdb.enter.panic .Xr panic 9 was called. -.It Va kdb.enter.powerfail -The kernel debugger was entered as a result of a powerfail NMI on the sparc64 -platform. .It Va kdb.enter.powerpc The kernel debugger was entered as a result of an unimplemented interrupt type on the powerpc platform. @@ -1487,9 +1484,6 @@ type on the powerpc platform. The kernel debugger was entered as a result of the .Va debug.kdb.enter sysctl being set. -.It Va kdb.enter.trapsig -The kernel debugger was entered as a result of a trapsig event on the sparc64 -platform. .It Va kdb.enter.unionfs The kernel debugger was entered as a result of an assertion failure in the union file system. Modified: head/share/man/man4/gem.4 ============================================================================== --- head/share/man/man4/gem.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/gem.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -87,29 +87,6 @@ Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P) Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) (part no.\& 501-4375) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include the on-board -Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface -and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , Modified: head/share/man/man4/hme.4 ============================================================================== --- head/share/man/man4/hme.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/hme.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -105,29 +105,6 @@ Sun PCI Quad FastEthernet Controller Sun SBus Quad FastEthernet Controller .Pq Dq SUNW,qfe .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include on-board versions -on boards equipped with more than one Ethernet interface and all add-on cards -except the single-port SBus versions. .Sh SEE ALSO .Xr altq 4 , .Xr intro 4 , Modified: head/share/man/man4/le.4 ============================================================================== --- head/share/man/man4/le.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/le.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -244,59 +244,6 @@ Note that unlike the driver, the .Nm driver does not support selecting 100Mbps (Fast Ethernet) media types. -.Ss sparc64 -The -.Nm -driver supports the on-board -.Tn LANCE -interfaces found in -.Tn Sun Ultra 1 -machines. -The -.Nm -driver allows the selection of the following media types via -.Xr ifconfig 8 -with these on-board interfaces: -.Bl -tag -width ".Cm 10base5/AUI" -.It Cm autoselect -Enable autoselection of the media type. -.It Cm 10baseT/UTP -Select UTP media. -.It Cm 10base5/AUI -Select AUI media. -.El -.Pp -When using autoselection, a default media type is selected for use by -examining all ports for carrier. -The first media type with which a carrier is detected will be selected. -Additionally, if carrier is dropped on a port, the driver will switch -between the possible ports until one with carrier is found. -.Pp -The -.Nm -driver also supports the following -.Tn Sun SBus -Ethernet add-on adapters: -.Pp -.Bl -bullet -compact -.It -.Tn SCSI HBA and Buffered Ethernet -.Pq SBE/S, P/N 501-1869 -.It -.Tn Fast SCSI and Buffered Ethernet -.Pq FSBE/S, P/N 501-2015 and 501-2981 -.El -.Pp -The -.Nm -driver does not support the selection of media types and options via -.Xr ifconfig 8 -with -.Tn SBus -Ethernet add-on adapters. -.Pp -For further information on configuring media types and options, see -.Xr ifconfig 8 . .Sh DIAGNOSTICS .Bl -diag .It "le%d: overflow" Modified: head/share/man/man4/pcm.4 ============================================================================== --- head/share/man/man4/pcm.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/pcm.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -83,8 +83,6 @@ The following bridge device drivers are available: .It .Xr snd_atiixp 4 .It -.Xr snd_audiocs 4 (enabled by default on sparc64) -.It .Xr snd_cmi 4 (enabled by default on amd64, i386) .It .Xr snd_cs4281 4 @@ -103,7 +101,7 @@ The following bridge device drivers are available: .It .Xr snd_envy24ht 4 .It -.Xr snd_es137x 4 (enabled by default on amd64, i386, sparc64) +.Xr snd_es137x 4 (enabled by default on amd64, i386) .It .Xr snd_ess 4 .It @@ -135,9 +133,7 @@ snd_sb8 .It .Xr snd_spicds 4 .It -.Xr snd_t4dwave 4 (enabled by default on sparc64) -.It -.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc, sparc64) +.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc) .It .Xr snd_via8233 4 (enabled by default on amd64, i386) .It Modified: head/share/man/man4/smp.4 ============================================================================== --- head/share/man/man4/smp.4 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man4/smp.4 Wed Feb 12 06:52:22 2020 (r357794) @@ -118,7 +118,7 @@ tasks on CPUs that are closely grouped together. Support for multi-processor systems is present for all Tier-1 and Tier-2 architectures on .Fx . -Currently, this includes x86, powerpc, arm, and sparc64. +Currently, this includes x86, powerpc, mips, arm and arm64. Support is enabled using .Cd options SMP . It is permissible to use the SMP kernel configuration on non-SMP hardware. Modified: head/share/man/man9/bus_dma.9 ============================================================================== --- head/share/man/man9/bus_dma.9 Wed Feb 12 02:55:06 2020 (r357793) +++ head/share/man/man9/bus_dma.9 Wed Feb 12 06:52:22 2020 (r357794) @@ -716,11 +716,6 @@ and as opposed to streamable data such as receive and Use of this flag does not remove the requirement of using .Fn bus_dmamap_sync , but it may reduce the cost of performing these operations. -For -.Fn bus_dmamap_create , -the -.Dv BUS_DMA_COHERENT -flag is currently implemented on sparc64. .El .It Fa mapp Pointer to a @@ -785,11 +780,6 @@ The load should not be deferred in case of insufficien and instead should return immediately with an appropriate error. .It Dv BUS_DMA_NOCACHE The generated transactions to and from the virtual page are non-cacheable. -For -.Fn bus_dmamap_load , -the -.Dv BUS_DMA_NOCACHE -flag is currently implemented on sparc64. .El .El .Pp @@ -1050,7 +1040,7 @@ For .Fn bus_dmamem_alloc , the .Dv BUS_DMA_COHERENT -flag is currently implemented on arm, arm64 and sparc64. +flag is currently implemented on arm and arm64. .It Dv BUS_DMA_ZERO Causes the allocated memory to be set to all zeros. .It Dv BUS_DMA_NOCACHE From owner-svn-src-all@freebsd.org Wed Feb 12 06:53:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1086D24EC53; Wed, 12 Feb 2020 06:53:30 +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) server-signature RSA-PSS (4096 bits) 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 48HVj56lmNz402Q; Wed, 12 Feb 2020 06:53:29 +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 C8F731D29A; Wed, 12 Feb 2020 06:53:29 +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 01C6rTUG028142; Wed, 12 Feb 2020 06:53:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C6rTGb028141; Wed, 12 Feb 2020 06:53:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002120653.01C6rTGb028141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 12 Feb 2020 06:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357795 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 357795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 06:53:30 -0000 Author: imp Date: Wed Feb 12 06:53:29 2020 New Revision: 357795 URL: https://svnweb.freebsd.org/changeset/base/357795 Log: Remove sparc64 files These were disconnected from the build when the kernel was removed. Since they depend on removed parts of the kernel, remove them completely. Deleted: head/lib/libkvm/kvm_sparc64.c head/lib/libkvm/kvm_sparc64.h From owner-svn-src-all@freebsd.org Wed Feb 12 06:54:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6950D24EDED; Wed, 12 Feb 2020 06:54:29 +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) server-signature RSA-PSS (4096 bits) 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 48HVkF27hxz40GH; Wed, 12 Feb 2020 06:54:29 +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 442A71D29C; Wed, 12 Feb 2020 06:54:29 +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 01C6sTE1028238; Wed, 12 Feb 2020 06:54:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C6sTlP028237; Wed, 12 Feb 2020 06:54:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002120654.01C6sTlP028237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 12 Feb 2020 06:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357796 - head/lib X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib X-SVN-Commit-Revision: 357796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 06:54:29 -0000 Author: imp Date: Wed Feb 12 06:54:28 2020 New Revision: 357796 URL: https://svnweb.freebsd.org/changeset/base/357796 Log: Remove excluding libproc and librtld_db on sparc64. Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Wed Feb 12 06:53:29 2020 (r357795) +++ head/lib/Makefile Wed Feb 12 06:54:28 2020 (r357796) @@ -72,13 +72,13 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libpathconv \ libpcap \ libpjdlog \ - ${_libproc} \ + libproc \ libprocstat \ libregex \ librpcsvc \ librss \ librt \ - ${_librtld_db} \ + librtld_db \ libsbuf \ libsmb \ libsqlite3 \ @@ -193,11 +193,6 @@ SUBDIR.${MK_PMC}+= libopencsd .if ${MACHINE_CPUARCH} == "amd64" SUBDIR.${MK_PMC}+= libipt SUBDIR.${MK_BHYVE}+= libvmmapi -.endif - -.if ${MACHINE_CPUARCH} != "sparc64" -_libproc= libproc -_librtld_db= librtld_db .endif .if ${MACHINE_ARCH} != "powerpc" From owner-svn-src-all@freebsd.org Wed Feb 12 06:54:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AB2C24EE39; Wed, 12 Feb 2020 06:54:35 +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) server-signature RSA-PSS (4096 bits) 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 48HVkM2NSzz40Nd; Wed, 12 Feb 2020 06:54:35 +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 721FE1D29D; Wed, 12 Feb 2020 06:54:34 +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 01C6sYIF028292; Wed, 12 Feb 2020 06:54:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C6sYoI028291; Wed, 12 Feb 2020 06:54:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002120654.01C6sYoI028291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 12 Feb 2020 06:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357797 - head/lib/libarchive X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libarchive X-SVN-Commit-Revision: 357797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 06:54:35 -0000 Author: imp Date: Wed Feb 12 06:54:34 2020 New Revision: 357797 URL: https://svnweb.freebsd.org/changeset/base/357797 Log: Remove sparc64 specific warning suppression. Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Wed Feb 12 06:54:28 2020 (r357796) +++ head/lib/libarchive/Makefile Wed Feb 12 06:54:34 2020 (r357797) @@ -31,7 +31,7 @@ SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICON .endif .if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \ - ${MACHINE_ARCH:Msparc64*} != "" || ${MACHINE_ARCH:Mpowerpc*} != "" + ${MACHINE_ARCH:Mpowerpc*} != "" NO_WCAST_ALIGN= yes .if ${MACHINE_ARCH:M*64*} == "" CFLAGS+= -DPPMD_32BIT From owner-svn-src-all@freebsd.org Wed Feb 12 06:56:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64FA324F011; Wed, 12 Feb 2020 06:56:05 +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) server-signature RSA-PSS (4096 bits) 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 48HVm51dhRz40Xd; Wed, 12 Feb 2020 06:56:05 +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 3084E1D2A0; Wed, 12 Feb 2020 06:56:05 +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 01C6u5hg028446; Wed, 12 Feb 2020 06:56:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C6u5Ic028445; Wed, 12 Feb 2020 06:56:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002120656.01C6u5Ic028445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 12 Feb 2020 06:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357798 - head/lib/libcompiler_rt X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libcompiler_rt X-SVN-Commit-Revision: 357798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 06:56:05 -0000 Author: imp Date: Wed Feb 12 06:56:04 2020 New Revision: 357798 URL: https://svnweb.freebsd.org/changeset/base/357798 Log: Remove sparc64 specific inclusion of bswap32 built-ins. Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Wed Feb 12 06:54:34 2020 (r357797) +++ head/lib/libcompiler_rt/Makefile.inc Wed Feb 12 06:56:04 2020 (r357798) @@ -244,8 +244,7 @@ SRCS+= sync_synchronize.S .endif # On some archs GCC-6.3 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \ - ${MACHINE_CPUARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif From owner-svn-src-all@freebsd.org Wed Feb 12 08:30:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C980230C74; Wed, 12 Feb 2020 08:30:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HXrc0SQNz445y; Wed, 12 Feb 2020 08:30:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 068151E2E1; Wed, 12 Feb 2020 08:30:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01C8U7xm081776; Wed, 12 Feb 2020 08:30:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C8U75O081775; Wed, 12 Feb 2020 08:30:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002120830.01C8U75O081775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Feb 2020 08:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357799 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 357799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 08:30:08 -0000 Author: hselasky Date: Wed Feb 12 08:30:07 2020 New Revision: 357799 URL: https://svnweb.freebsd.org/changeset/base/357799 Log: Make sure the so-called end of receive interrupts don't starve in iflib. When the receive ring cannot be filled with mbufs, due to lack of memory, no more interrupts may be generated to fill the receive ring later on. Make sure to have a watchdog, to try refilling the receive ring from time to time, hopefully when more mbufs are available. Differential Revision: https://reviews.freebsd.org/D23315 MFC after: 1 week Reviewed by: gallatin@ Sponsored by: Mellanox Technologies Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Feb 12 06:56:04 2020 (r357798) +++ head/sys/net/iflib.c Wed Feb 12 08:30:07 2020 (r357799) @@ -129,6 +129,9 @@ __FBSDID("$FreeBSD$"); */ MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); +#define IFLIB_RXEOF_MORE (1U << 0) +#define IFLIB_RXEOF_EMPTY (2U << 0) + struct iflib_txq; typedef struct iflib_txq *iflib_txq_t; struct iflib_rxq; @@ -434,6 +437,7 @@ struct iflib_rxq { uint8_t ifr_fl_offset; struct lro_ctrl ifr_lc; struct grouptask ifr_task; + struct callout ifr_watchdog; struct iflib_filter_info ifr_filter_info; iflib_dma_info_t ifr_ifdi; @@ -1940,7 +1944,7 @@ _rxq_refill_cb(void *arg, bus_dma_segment_t *segs, int * (Re)populate an rxq free-buffer list with up to @count new packet buffers. * The caller must assure that @count does not exceed the queue's capacity. */ -static void +static uint8_t _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) { struct if_rxd_update iru; @@ -2069,9 +2073,11 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); fl->ifl_fragidx = frag_idx; + + return (n == -1 ? 0 : IFLIB_RXEOF_EMPTY); } -static __inline void +static __inline uint8_t __iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int max) { /* we avoid allowing pidx to catch up with cidx as it confuses ixl */ @@ -2084,7 +2090,8 @@ __iflib_fl_refill_lt(if_ctx_t ctx, iflib_fl_t fl, int MPASS(reclaimable == delta); if (reclaimable > 0) - _iflib_fl_refill(ctx, fl, min(max, reclaimable)); + return (_iflib_fl_refill(ctx, fl, min(max, reclaimable))); + return (0); } uint8_t @@ -2172,7 +2179,7 @@ iflib_fl_setup(iflib_fl_t fl) /* avoid pre-allocating zillions of clusters to an idle card * potentially speeding up attach */ - _iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); + (void) _iflib_fl_refill(ctx, fl, min(128, fl->ifl_size)); MPASS(min(128, fl->ifl_size) == fl->ifl_credits); if (min(128, fl->ifl_size) != fl->ifl_credits) return (ENOBUFS); @@ -2738,7 +2745,15 @@ iflib_get_ip_forwarding(struct lro_ctrl *lc __unused, } #endif -static bool +static void +_task_fn_rx_watchdog(void *context) +{ + iflib_rxq_t rxq = context; + + GROUPTASK_ENQUEUE(&rxq->ifr_task); +} + +static uint8_t iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) { if_t ifp; @@ -2752,6 +2767,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) iflib_fl_t fl; int lro_enabled; bool v4_forwarding, v6_forwarding, lro_possible; + uint8_t retval = 0; /* * XXX early demux data packets so that if_input processing only handles @@ -2772,9 +2788,9 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) cidxp = &rxq->ifr_fl[0].ifl_cidx; if ((avail = iflib_rxd_avail(ctx, rxq, *cidxp, budget)) == 0) { for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - __iflib_fl_refill_lt(ctx, fl, budget + 8); + retval |= __iflib_fl_refill_lt(ctx, fl, budget + 8); DBG_COUNTER_INC(rx_unavail); - return (false); + return (retval); } /* pfil needs the vnet to be set */ @@ -2832,7 +2848,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) CURVNET_RESTORE(); /* make sure that we can refill faster than drain */ for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) - __iflib_fl_refill_lt(ctx, fl, budget + 8); + retval |= __iflib_fl_refill_lt(ctx, fl, budget + 8); lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); if (lro_enabled) @@ -2891,15 +2907,15 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) #if defined(INET6) || defined(INET) tcp_lro_flush_all(&rxq->ifr_lc); #endif - if (avail) - return true; - return (iflib_rxd_avail(ctx, rxq, *cidxp, 1)); + if (avail != 0 || iflib_rxd_avail(ctx, rxq, *cidxp, 1) != 0) + retval |= IFLIB_RXEOF_MORE; + return (retval); err: STATE_LOCK(ctx); ctx->ifc_flags |= IFC_DO_RESET; iflib_admin_intr_deferred(ctx); STATE_UNLOCK(ctx); - return (false); + return (0); } #define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) @@ -3783,7 +3799,7 @@ _task_fn_rx(void *context) { iflib_rxq_t rxq = context; if_ctx_t ctx = rxq->ifr_ctx; - bool more; + uint8_t more; uint16_t budget; #ifdef IFLIB_DIAGNOSTICS @@ -3792,19 +3808,23 @@ _task_fn_rx(void *context) DBG_COUNTER_INC(task_fn_rxs); if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; - more = true; #ifdef DEV_NETMAP if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) { u_int work = 0; if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) { - more = false; + more = 0; + goto skip_rxeof; } } #endif budget = ctx->ifc_sysctl_rx_budget; if (budget == 0) budget = 16; /* XXX */ - if (more == false || (more = iflib_rxeof(rxq, budget)) == false) { + more = iflib_rxeof(rxq, budget); +#ifdef DEV_NETMAP +skip_rxeof: +#endif + if ((more & IFLIB_RXEOF_MORE) == 0) { if (ctx->ifc_flags & IFC_LEGACY) IFDI_INTR_ENABLE(ctx); else @@ -3813,8 +3833,11 @@ _task_fn_rx(void *context) } if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; - if (more) + + if (more & IFLIB_RXEOF_MORE) GROUPTASK_ENQUEUE(&rxq->ifr_task); + else if (more & IFLIB_RXEOF_EMPTY) + callout_reset_curcpu(&rxq->ifr_watchdog, 1, &_task_fn_rx_watchdog, rxq); } static void @@ -5031,6 +5054,7 @@ iflib_pseudo_deregister(if_ctx_t ctx) taskqgroup_detach(tqg, &txq->ift_task); } for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { + callout_drain(&rxq->ifr_watchdog); if (rxq->ifr_task.gt_uniq != NULL) taskqgroup_detach(tqg, &rxq->ifr_task); @@ -5533,6 +5557,7 @@ iflib_queues_alloc(if_ctx_t ctx) for (rxconf = i = 0; i < nrxqsets; i++, rxconf++, rxq++) { /* Set up some basics */ + callout_init(&rxq->ifr_watchdog, 1); if ((ifdip = malloc(sizeof(struct iflib_dma_info) * nrxqs, M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { From owner-svn-src-all@freebsd.org Wed Feb 12 09:19:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 799672324DF; Wed, 12 Feb 2020 09:19:48 +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) server-signature RSA-PSS (4096 bits) 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 48HYxw2cpqz47L4; Wed, 12 Feb 2020 09:19:48 +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 5549D1EC99; Wed, 12 Feb 2020 09:19:48 +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 01C9JmOL012461; Wed, 12 Feb 2020 09:19:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C9JmaE012460; Wed, 12 Feb 2020 09:19:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002120919.01C9JmaE012460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Feb 2020 09:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357800 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 357800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 09:19:48 -0000 Author: hselasky Date: Wed Feb 12 09:19:47 2020 New Revision: 357800 URL: https://svnweb.freebsd.org/changeset/base/357800 Log: Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process incoming packets in taskqueue context. This patch extends r357772. Tested by: yp@mm.st Sponsored by: Mellanox Technologies Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Feb 12 08:30:07 2020 (r357799) +++ head/sys/net/iflib.c Wed Feb 12 09:19:47 2020 (r357800) @@ -6060,23 +6060,25 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, if_irq_t irq gtask = &ctx->ifc_txqs[qid].ift_task; tqg = qgroup_if_io_tqg; fn = _task_fn_tx; + GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_RX: q = &ctx->ifc_rxqs[qid]; gtask = &ctx->ifc_rxqs[qid].ifr_task; tqg = qgroup_if_io_tqg; fn = _task_fn_rx; + NET_GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_IOV: q = ctx; gtask = &ctx->ifc_vflr_task; tqg = qgroup_if_config_tqg; fn = _task_fn_iov; + GROUPTASK_INIT(gtask, 0, fn, q); break; default: panic("unknown net intr type"); } - GROUPTASK_INIT(gtask, 0, fn, q); if (irq != NULL) { err = iflib_irq_set_affinity(ctx, irq, type, qid, gtask, tqg, q, name); @@ -6111,7 +6113,6 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filte struct grouptask *gtask; struct resource *res; struct taskqgroup *tqg; - gtask_fn_t *fn; void *q; int err, tqrid; bool rx_only; @@ -6121,7 +6122,6 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filte gtask = &rxq[0].ifr_task; tqg = qgroup_if_io_tqg; tqrid = *rid; - fn = _task_fn_rx; rx_only = (ctx->ifc_sctx->isc_flags & IFLIB_SINGLE_IRQ_RX_ONLY) != 0; ctx->ifc_flags |= IFC_LEGACY; @@ -6136,7 +6136,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filte iflib_fast_intr_rxtx, NULL, info, name); if (err != 0) return (err); - GROUPTASK_INIT(gtask, 0, fn, q); + NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, q); res = irq->ii_res; taskqgroup_attach(tqg, gtask, q, dev, res, name); From owner-svn-src-all@freebsd.org Wed Feb 12 09:58:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 237D0233073; Wed, 12 Feb 2020 09:58:21 +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) server-signature RSA-PSS (4096 bits) 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 48HZpN6y2Dz49DL; Wed, 12 Feb 2020 09:58:20 +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 E58841F3CB; Wed, 12 Feb 2020 09:58:20 +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 01C9wKPY037160; Wed, 12 Feb 2020 09:58:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01C9wKsj037156; Wed, 12 Feb 2020 09:58:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002120958.01C9wKsj037156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Feb 2020 09:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357801 - in head/sys/dev/mlx5: . mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 357801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 09:58:21 -0000 Author: hselasky Date: Wed Feb 12 09:58:19 2020 New Revision: 357801 URL: https://svnweb.freebsd.org/changeset/base/357801 Log: Add support for disabling and polling MSIX interrupts in mlx5core. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_eq.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Wed Feb 12 09:19:47 2020 (r357800) +++ head/sys/dev/mlx5/driver.h Wed Feb 12 09:58:19 2020 (r357801) @@ -1180,4 +1180,7 @@ static inline bool mlx5_rl_is_supported(struct mlx5_co } #endif +void mlx5_disable_interrupts(struct mlx5_core_dev *); +void mlx5_poll_interrupts(struct mlx5_core_dev *); + #endif /* MLX5_DRIVER_H */ Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Feb 12 09:19:47 2020 (r357800) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Feb 12 09:58:19 2020 (r357801) @@ -739,3 +739,28 @@ static void mlx5_port_general_notification_event(struc } } +void +mlx5_disable_interrupts(struct mlx5_core_dev *dev) +{ + int nvec = dev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE; + int x; + + for (x = 0; x != nvec; x++) + disable_irq(dev->priv.msix_arr[x].vector); +} + +void +mlx5_poll_interrupts(struct mlx5_core_dev *dev) +{ + struct mlx5_eq *eq; + + if (unlikely(dev->priv.disable_irqs != 0)) + return; + + mlx5_eq_int(dev, &dev->priv.eq_table.cmd_eq); + mlx5_eq_int(dev, &dev->priv.eq_table.async_eq); + mlx5_eq_int(dev, &dev->priv.eq_table.pages_eq); + + list_for_each_entry(eq, &dev->priv.eq_table.comp_eqs_list, list) + mlx5_eq_int(dev, eq); +} Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Feb 12 09:19:47 2020 (r357800) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Feb 12 09:58:19 2020 (r357801) @@ -1585,7 +1585,7 @@ done: return 0; } -static void mlx5_disable_interrupts(struct mlx5_core_dev *mdev) +static void mlx5_shutdown_disable_interrupts(struct mlx5_core_dev *mdev) { int nvec = mdev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE; int x; @@ -1609,7 +1609,7 @@ static void shutdown_one(struct pci_dev *pdev) set_bit(MLX5_INTERFACE_STATE_TEARDOWN, &dev->intf_state); /* disable all interrupts */ - mlx5_disable_interrupts(dev); + mlx5_shutdown_disable_interrupts(dev); err = mlx5_try_fast_unload(dev); if (err) From owner-svn-src-all@freebsd.org Wed Feb 12 10:03:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 119972333D5; Wed, 12 Feb 2020 10:03:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HZwF6kTvz49k4; Wed, 12 Feb 2020 10:03:25 +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 C82F11F58F; Wed, 12 Feb 2020 10:03:25 +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 01CA3PJ4042714; Wed, 12 Feb 2020 10:03:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CA3PZS042713; Wed, 12 Feb 2020 10:03:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002121003.01CA3PZS042713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 12 Feb 2020 10:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357802 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 357802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 10:03:26 -0000 Author: hselasky Date: Wed Feb 12 10:03:25 2020 New Revision: 357802 URL: https://svnweb.freebsd.org/changeset/base/357802 Log: Add support for debugnet in mlx5en(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Feb 12 09:58:19 2020 (r357801) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Feb 12 10:03:25 2020 (r357802) @@ -33,6 +33,8 @@ #include #include +#include + #ifndef ETH_DRIVER_VERSION #define ETH_DRIVER_VERSION "3.5.2" #endif @@ -399,6 +401,8 @@ static const struct media mlx5e_ext_mode_table[MLX5E_E }, }; +DEBUGNET_DEFINE(mlx5_en); + MALLOC_DEFINE(M_MLX5EN, "MLX5EN", "MLX5 Ethernet"); static void @@ -4444,6 +4448,9 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) /* Set autoselect by default */ ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO | IFM_FDX | IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); + + DEBUGNET_SET(ifp, mlx5_en); + ether_ifattach(ifp, dev_addr); /* Register for VLAN events */ @@ -4590,6 +4597,71 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp if_free(ifp); free(priv, M_MLX5EN); } + +#ifdef DEBUGNET +static void +mlx5_en_debugnet_init(struct ifnet *dev, int *nrxr, int *ncl, int *clsize) +{ + struct mlx5e_priv *priv = if_getsoftc(dev); + + PRIV_LOCK(priv); + *nrxr = priv->params.num_channels; + *ncl = DEBUGNET_MAX_IN_FLIGHT; + *clsize = MLX5E_MAX_RX_BYTES; + PRIV_UNLOCK(priv); +} + +static void +mlx5_en_debugnet_event(struct ifnet *dev, enum debugnet_ev event) +{ +} + +static int +mlx5_en_debugnet_transmit(struct ifnet *dev, struct mbuf *m) +{ + struct mlx5e_priv *priv = if_getsoftc(dev); + struct mlx5e_sq *sq; + int err; + + if ((if_getdrvflags(dev) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || (priv->media_status_last & IFM_ACTIVE) == 0) + return (ENOENT); + + sq = &priv->channel[0].sq[0]; + + if (sq->running == 0) { + m_freem(m); + return (ENOENT); + } + + if (mlx5e_sq_xmit(sq, &m) != 0) { + m_freem(m); + err = ENOBUFS; + } else { + err = 0; + } + + if (likely(sq->doorbell.d64 != 0)) { + mlx5e_tx_notify_hw(sq, sq->doorbell.d32, 0); + sq->doorbell.d64 = 0; + } + return (err); +} + +static int +mlx5_en_debugnet_poll(struct ifnet *dev, int count) +{ + struct mlx5e_priv *priv = if_getsoftc(dev); + + if ((if_getdrvflags(dev) & IFF_DRV_RUNNING) == 0 || + (priv->media_status_last & IFM_ACTIVE) == 0) + return (ENOENT); + + mlx5_poll_interrupts(priv->mdev); + + return (0); +} +#endif /* DEBUGNET */ static void * mlx5e_get_ifp(void *vpriv) From owner-svn-src-all@freebsd.org Wed Feb 12 11:10:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C232234715; Wed, 12 Feb 2020 11:10:11 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcPH12ypz4DyD; Wed, 12 Feb 2020 11:10:11 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F41A201A7; Wed, 12 Feb 2020 11:10:11 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBABPb079939; Wed, 12 Feb 2020 11:10:11 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBAAN6079938; Wed, 12 Feb 2020 11:10:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121110.01CBAAN6079938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357803 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:10:11 -0000 Author: mjg Date: Wed Feb 12 11:10:10 2020 New Revision: 357803 URL: https://svnweb.freebsd.org/changeset/base/357803 Log: epoch: convert zpcpu_get_cpua(.., curcpu) to zpcpu_get Modified: head/sys/kern/subr_epoch.c Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Wed Feb 12 10:03:25 2020 (r357802) +++ head/sys/kern/subr_epoch.c Wed Feb 12 11:10:10 2020 (r357803) @@ -357,7 +357,7 @@ static epoch_record_t epoch_currecord(epoch_t epoch) { - return (zpcpu_get_cpu(epoch->e_pcpu_record, curcpu)); + return (zpcpu_get(epoch->e_pcpu_record)); } #define INIT_CHECK(epoch) \ From owner-svn-src-all@freebsd.org Wed Feb 12 11:11:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5594B234878; Wed, 12 Feb 2020 11:11:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcQg1gdgz4FHq; Wed, 12 Feb 2020 11:11:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C45C201E9; Wed, 12 Feb 2020 11:11:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBBMsE083864; Wed, 12 Feb 2020 11:11:22 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBBMxr083861; Wed, 12 Feb 2020 11:11:22 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121111.01CBBMxr083861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357804 - in head/sys: kern riscv/include sys vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern riscv/include sys vm X-SVN-Commit-Revision: 357804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:11:23 -0000 Author: mjg Date: Wed Feb 12 11:11:22 2020 New Revision: 357804 URL: https://svnweb.freebsd.org/changeset/base/357804 Log: Store offset into zpcpu allocations in the per-cpu area. This shorten zpcpu_get and allows more optimizations. Reviewed by: jeff Differential Revision: https://reviews.freebsd.org/D23570 Modified: head/sys/kern/subr_pcpu.c head/sys/riscv/include/pcpu.h head/sys/sys/pcpu.h head/sys/vm/uma_core.c Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Wed Feb 12 11:10:10 2020 (r357803) +++ head/sys/kern/subr_pcpu.c Wed Feb 12 11:11:22 2020 (r357804) @@ -95,6 +95,7 @@ pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) cpu_pcpu_init(pcpu, cpuid, size); pcpu->pc_rm_queue.rmq_next = &pcpu->pc_rm_queue; pcpu->pc_rm_queue.rmq_prev = &pcpu->pc_rm_queue; + pcpu->pc_zpcpu_offset = zpcpu_offset_cpu(cpuid); } void Modified: head/sys/riscv/include/pcpu.h ============================================================================== --- head/sys/riscv/include/pcpu.h Wed Feb 12 11:10:10 2020 (r357803) +++ head/sys/riscv/include/pcpu.h Wed Feb 12 11:11:22 2020 (r357804) @@ -48,7 +48,7 @@ struct pmap *pc_curpmap; /* Currently active pmap */ \ uint32_t pc_pending_ipis; /* IPIs pending to this CPU */ \ uint32_t pc_hart; /* Hart ID */ \ - char __pad[57] + char __pad[49] #ifdef _KERNEL Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Wed Feb 12 11:10:10 2020 (r357803) +++ head/sys/sys/pcpu.h Wed Feb 12 11:11:22 2020 (r357804) @@ -194,6 +194,7 @@ struct pcpu { struct rm_queue pc_rm_queue; /* rmlock list of trackers */ uintptr_t pc_dynamic; /* Dynamic per-cpu data area */ uint64_t pc_early_dummy_counter; /* Startup time counter(9) */ + uintptr_t pc_zpcpu_offset; /* Offset into zpcpu allocs */ /* * Keep MD fields last, so that CPU-specific variations on a @@ -227,14 +228,28 @@ extern struct pcpu *cpuid_to_pcpu[]; #endif #define curproc (curthread->td_proc) +#ifndef zpcpu_offset_cpu +#define zpcpu_offset_cpu(cpu) (UMA_PCPU_ALLOC_SIZE * cpu) +#endif +#ifndef zpcpu_offset +#define zpcpu_offset() (PCPU_GET(zpcpu_offset)) +#endif + +#ifndef zpcpu_base_to_offset +#define zpcpu_base_to_offset(base) (base) +#endif +#ifndef zpcpu_offset_to_base +#define zpcpu_offset_to_base(base) (base) +#endif + /* Accessor to elements allocated via UMA_ZONE_PCPU zone. */ #define zpcpu_get(base) ({ \ - __typeof(base) _ptr = (void *)((char *)(base) + UMA_PCPU_ALLOC_SIZE * curcpu); \ + __typeof(base) _ptr = (void *)((char *)(base) + zpcpu_offset()); \ _ptr; \ }) #define zpcpu_get_cpu(base, cpu) ({ \ - __typeof(base) _ptr = (void *)((char *)(base) + UMA_PCPU_ALLOC_SIZE * cpu); \ + __typeof(base) _ptr = (void *)((char *)(base) + zpcpu_offset_cpu(cpu)); \ _ptr; \ }) Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Feb 12 11:10:10 2020 (r357803) +++ head/sys/vm/uma_core.c Wed Feb 12 11:11:22 2020 (r357804) @@ -2944,34 +2944,39 @@ uma_zwait(uma_zone_t zone) void * uma_zalloc_pcpu_arg(uma_zone_t zone, void *udata, int flags) { - void *item; + void *item, *pcpu_item; #ifdef SMP int i; MPASS(zone->uz_flags & UMA_ZONE_PCPU); #endif item = uma_zalloc_arg(zone, udata, flags & ~M_ZERO); - if (item != NULL && (flags & M_ZERO)) { + if (item == NULL) + return (NULL); + pcpu_item = zpcpu_base_to_offset(item); + if (flags & M_ZERO) { #ifdef SMP for (i = 0; i <= mp_maxid; i++) - bzero(zpcpu_get_cpu(item, i), zone->uz_size); + bzero(zpcpu_get_cpu(pcpu_item, i), zone->uz_size); #else bzero(item, zone->uz_size); #endif } - return (item); + return (pcpu_item); } /* * A stub while both regular and pcpu cases are identical. */ void -uma_zfree_pcpu_arg(uma_zone_t zone, void *item, void *udata) +uma_zfree_pcpu_arg(uma_zone_t zone, void *pcpu_item, void *udata) { + void *item; #ifdef SMP MPASS(zone->uz_flags & UMA_ZONE_PCPU); #endif + item = zpcpu_offset_to_base(pcpu_item); uma_zfree_arg(zone, item, udata); } From owner-svn-src-all@freebsd.org Wed Feb 12 11:12:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7A7A234B38; Wed, 12 Feb 2020 11:12:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcRf3yBxz4FYV; Wed, 12 Feb 2020 11:12:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 831C920348; Wed, 12 Feb 2020 11:12:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBCEEd085632; Wed, 12 Feb 2020 11:12:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBCExs085630; Wed, 12 Feb 2020 11:12:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121112.01CBCExs085630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357805 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 357805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:12:14 -0000 Author: mjg Date: Wed Feb 12 11:12:13 2020 New Revision: 357805 URL: https://svnweb.freebsd.org/changeset/base/357805 Log: amd64: store per-cpu allocations subtracted by __pcpu This eliminates a runtime subtraction from counter_u64_add. before: mov 0x4f00ed(%rip),%rax # 0xffffffff80c01788 sub 0x808ff6(%rip),%rax # 0xffffffff80f1a698 <__pcpu> addq $0x1,%gs:(%rax) after: mov 0x4f02fd(%rip),%rax # 0xffffffff80c01788 addq $0x1,%gs:(%rax) Reviewed by: jeff Differential Revision: https://reviews.freebsd.org/D23570 Modified: head/sys/amd64/include/counter.h head/sys/amd64/include/pcpu.h Modified: head/sys/amd64/include/counter.h ============================================================================== --- head/sys/amd64/include/counter.h Wed Feb 12 11:11:22 2020 (r357804) +++ head/sys/amd64/include/counter.h Wed Feb 12 11:12:13 2020 (r357805) @@ -33,7 +33,7 @@ #include -#define EARLY_COUNTER &temp_bsp_pcpu.pc_early_dummy_counter +#define EARLY_COUNTER (void *)__offsetof(struct pcpu, pc_early_dummy_counter) #define counter_enter() do {} while (0) #define counter_exit() do {} while (0) @@ -43,6 +43,7 @@ static inline uint64_t counter_u64_read_one(counter_u64_t c, int cpu) { + MPASS(c != EARLY_COUNTER); return (*zpcpu_get_cpu(c, cpu)); } @@ -65,6 +66,7 @@ counter_u64_zero_one_cpu(void *arg) counter_u64_t c; c = arg; + MPASS(c != EARLY_COUNTER); *(zpcpu_get(c)) = 0; } @@ -86,7 +88,7 @@ counter_u64_add(counter_u64_t c, int64_t inc) KASSERT(IS_BSP() || c != EARLY_COUNTER, ("EARLY_COUNTER used on AP")); __asm __volatile("addq\t%1,%%gs:(%0)" : - : "r" ((char *)c - (char *)&__pcpu[0]), "ri" (inc) + : "r" (c), "ri" (inc) : "memory", "cc"); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Wed Feb 12 11:11:22 2020 (r357804) +++ head/sys/amd64/include/pcpu.h Wed Feb 12 11:12:13 2020 (r357805) @@ -240,6 +240,10 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x c #define IS_BSP() (PCPU_GET(cpuid) == 0) +#define zpcpu_offset_cpu(cpu) ((uintptr_t)&__pcpu[0] + UMA_PCPU_ALLOC_SIZE * cpu) +#define zpcpu_base_to_offset(base) (void *)((uintptr_t)(base) - (uintptr_t)&__pcpu[0]) +#define zpcpu_offset_to_base(base) (void *)((uintptr_t)(base) + (uintptr_t)&__pcpu[0]) + #else /* !__GNUCLIKE_ASM || !__GNUCLIKE___TYPEOF */ #error "this file needs to be ported to your compiler" From owner-svn-src-all@freebsd.org Wed Feb 12 11:14:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E672B234C62; Wed, 12 Feb 2020 11:14:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcV75mmWz4Fk5; Wed, 12 Feb 2020 11:14:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C15E62036C; Wed, 12 Feb 2020 11:14:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBENxS085765; Wed, 12 Feb 2020 11:14:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBENXA085764; Wed, 12 Feb 2020 11:14:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121114.01CBENXA085764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357806 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 357806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:14:24 -0000 Author: mjg Date: Wed Feb 12 11:14:23 2020 New Revision: 357806 URL: https://svnweb.freebsd.org/changeset/base/357806 Log: Dedup zpcpu assertions into one macro and guard the rest with #ifndef Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Wed Feb 12 11:12:13 2020 (r357805) +++ head/sys/sys/pcpu.h Wed Feb 12 11:14:23 2020 (r357806) @@ -228,6 +228,10 @@ extern struct pcpu *cpuid_to_pcpu[]; #endif #define curproc (curthread->td_proc) +#ifndef ZPCPU_ASSERT_PROTECTED +#define ZPCPU_ASSERT_PROTECTED() MPASS(curthread->td_critnest > 0) +#endif + #ifndef zpcpu_offset_cpu #define zpcpu_offset_cpu(cpu) (UMA_PCPU_ALLOC_SIZE * cpu) #endif @@ -277,26 +281,32 @@ extern struct pcpu *cpuid_to_pcpu[]; _old; \ }) +#ifndef zpcpu_set_protected #define zpcpu_set_protected(base, val) ({ \ - MPASS(curthread->td_critnest > 0); \ + ZPCPU_ASSERT_PROTECTED(); \ __typeof(val) *_ptr = zpcpu_get(base); \ \ *_ptr = (val); \ }) +#endif +#ifndef zpcpu_add_protected #define zpcpu_add_protected(base, val) ({ \ - MPASS(curthread->td_critnest > 0); \ + ZPCPU_ASSERT_PROTECTED(); \ __typeof(val) *_ptr = zpcpu_get(base); \ \ *_ptr += (val); \ }) +#endif +#ifndef zpcpu_sub_protected #define zpcpu_sub_protected(base, val) ({ \ - MPASS(curthread->td_critnest > 0); \ + ZPCPU_ASSERT_PROTECTED(); \ __typeof(val) *_ptr = zpcpu_get(base); \ \ *_ptr -= (val); \ }) +#endif /* * Machine dependent callouts. cpu_pcpu_init() is responsible for From owner-svn-src-all@freebsd.org Wed Feb 12 11:15:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FE92234D02; Wed, 12 Feb 2020 11:15:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcWV3FR7z4Fs3; Wed, 12 Feb 2020 11:15:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AA2E2036D; Wed, 12 Feb 2020 11:15:34 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBFY86085892; Wed, 12 Feb 2020 11:15:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBFYL2085890; Wed, 12 Feb 2020 11:15:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121115.01CBFYL2085890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357807 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 357807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:15:34 -0000 Author: mjg Date: Wed Feb 12 11:15:33 2020 New Revision: 357807 URL: https://svnweb.freebsd.org/changeset/base/357807 Log: amd64: provide custom zpcpu set/add/sub routines Note that clobbers are highly overzealous, can be cleaned up later. Modified: head/sys/amd64/include/counter.h head/sys/amd64/include/pcpu.h Modified: head/sys/amd64/include/counter.h ============================================================================== --- head/sys/amd64/include/counter.h Wed Feb 12 11:14:23 2020 (r357806) +++ head/sys/amd64/include/counter.h Wed Feb 12 11:15:33 2020 (r357807) @@ -86,10 +86,7 @@ counter_u64_add(counter_u64_t c, int64_t inc) { KASSERT(IS_BSP() || c != EARLY_COUNTER, ("EARLY_COUNTER used on AP")); - __asm __volatile("addq\t%1,%%gs:(%0)" - : - : "r" (c), "ri" (inc) - : "memory", "cc"); + zpcpu_add(c, inc); } #endif /* ! __MACHINE_COUNTER_H__ */ Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Wed Feb 12 11:14:23 2020 (r357806) +++ head/sys/amd64/include/pcpu.h Wed Feb 12 11:15:33 2020 (r357807) @@ -244,6 +244,63 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x c #define zpcpu_base_to_offset(base) (void *)((uintptr_t)(base) - (uintptr_t)&__pcpu[0]) #define zpcpu_offset_to_base(base) (void *)((uintptr_t)(base) + (uintptr_t)&__pcpu[0]) +#define zpcpu_sub_protected(base, n) do { \ + ZPCPU_ASSERT_PROTECTED(); \ + zpcpu_sub(base, n); \ +} while (0) + +#define zpcpu_set_protected(base, n) do { \ + __typeof(*base) __n = (n); \ + ZPCPU_ASSERT_PROTECTED(); \ + switch (sizeof(*base)) { \ + case 4: \ + __asm __volatile("movl\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + case 8: \ + __asm __volatile("movq\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + default: \ + *zpcpu_get(base) = __n; \ + } \ +} while (0); + +#define zpcpu_add(base, n) do { \ + __typeof(*base) __n = (n); \ + CTASSERT(sizeof(*base) == 4 || sizeof(*base) == 8); \ + switch (sizeof(*base)) { \ + case 4: \ + __asm __volatile("addl\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + case 8: \ + __asm __volatile("addq\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + } \ +} while (0) + +#define zpcpu_add_protected(base, n) do { \ + ZPCPU_ASSERT_PROTECTED(); \ + zpcpu_add(base, n); \ +} while (0) + +#define zpcpu_sub(base, n) do { \ + __typeof(*base) __n = (n); \ + CTASSERT(sizeof(*base) == 4 || sizeof(*base) == 8); \ + switch (sizeof(*base)) { \ + case 4: \ + __asm __volatile("subl\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + case 8: \ + __asm __volatile("subq\t%1,%%gs:(%0)" \ + : : "r" (base), "ri" (__n) : "memory", "cc"); \ + break; \ + } \ +} while (0); + #else /* !__GNUCLIKE_ASM || !__GNUCLIKE___TYPEOF */ #error "this file needs to be ported to your compiler" From owner-svn-src-all@freebsd.org Wed Feb 12 11:16:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C39A234DC4; Wed, 12 Feb 2020 11:16:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcY36zSJz4G18; Wed, 12 Feb 2020 11:16:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D11D32036F; Wed, 12 Feb 2020 11:16:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBGtYT085994; Wed, 12 Feb 2020 11:16:55 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBGtGe085992; Wed, 12 Feb 2020 11:16:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121116.01CBGtGe085992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357808 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:16:56 -0000 Author: mjg Date: Wed Feb 12 11:16:55 2020 New Revision: 357808 URL: https://svnweb.freebsd.org/changeset/base/357808 Log: Add smp_rendezvous_cpus_retry This is a wrapper around smp_rendezvous_cpus which enables use of IPI handlers which can fail and require retrying. wait_func argument is added to to provide a routine which can be used to poll CPU of interest for when the IPI can be retried. Handlers which succeed must call smp_rendezvous_cpus_done to denote that fact. Discussed with: jeff Differential Revision: https://reviews.freebsd.org/D23582 Modified: head/sys/kern/subr_smp.c head/sys/sys/smp.h Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Wed Feb 12 11:15:33 2020 (r357807) +++ head/sys/kern/subr_smp.c Wed Feb 12 11:16:55 2020 (r357808) @@ -884,6 +884,47 @@ smp_no_rendezvous_barrier(void *dummy) #endif } +void +smp_rendezvous_cpus_retry(cpuset_t map, + void (* setup_func)(void *), + void (* action_func)(void *), + void (* teardown_func)(void *), + void (* wait_func)(void *, int), + struct smp_rendezvous_cpus_retry_arg *arg) +{ + int cpu; + + /* + * Execute an action on all specified CPUs while retrying until they + * all acknowledge completion. + */ + CPU_COPY(&map, &arg->cpus); + for (;;) { + smp_rendezvous_cpus( + arg->cpus, + setup_func, + action_func, + teardown_func, + arg); + + if (CPU_EMPTY(&arg->cpus)) + break; + + CPU_FOREACH(cpu) { + if (!CPU_ISSET(cpu, &arg->cpus)) + continue; + wait_func(arg, cpu); + } + } +} + +void +smp_rendezvous_cpus_done(struct smp_rendezvous_cpus_retry_arg *arg) +{ + + CPU_CLR_ATOMIC(curcpu, &arg->cpus); +} + /* * Wait for specified idle threads to switch once. This ensures that even * preempted threads have cycled through the switch function once, Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Wed Feb 12 11:15:33 2020 (r357807) +++ head/sys/sys/smp.h Wed Feb 12 11:16:55 2020 (r357808) @@ -276,6 +276,19 @@ void smp_rendezvous_cpus(cpuset_t, void (*)(void *), void (*)(void *), void *arg); + +struct smp_rendezvous_cpus_retry_arg { + cpuset_t cpus; +}; +void smp_rendezvous_cpus_retry(cpuset_t, + void (*)(void *), + void (*)(void *), + void (*)(void *), + void (*)(void *, int), + struct smp_rendezvous_cpus_retry_arg *); + +void smp_rendezvous_cpus_done(struct smp_rendezvous_cpus_retry_arg *); + #endif /* !LOCORE */ #endif /* _KERNEL */ #endif /* _SYS_SMP_H_ */ From owner-svn-src-all@freebsd.org Wed Feb 12 11:17:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50933234E37; Wed, 12 Feb 2020 11:17:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcYW1T7gz4G7p; Wed, 12 Feb 2020 11:17:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DA4020373; Wed, 12 Feb 2020 11:17:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBHJVW086062; Wed, 12 Feb 2020 11:17:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBHJ4x086061; Wed, 12 Feb 2020 11:17:19 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121117.01CBHJ4x086061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357809 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:17:19 -0000 Author: mjg Date: Wed Feb 12 11:17:18 2020 New Revision: 357809 URL: https://svnweb.freebsd.org/changeset/base/357809 Log: rms: use smp_rendezvous_cpus_retry instead of a hand-rolled variant Modified: head/sys/kern/kern_rmlock.c Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Wed Feb 12 11:16:55 2020 (r357808) +++ head/sys/kern/kern_rmlock.c Wed Feb 12 11:17:18 2020 (r357809) @@ -991,17 +991,17 @@ rms_runlock(struct rmslock *rms) struct rmslock_ipi { struct rmslock *rms; - cpuset_t signal; + struct smp_rendezvous_cpus_retry_arg srcra; }; static void -rms_wlock_IPI(void *arg) +rms_action_func(void *arg) { struct rmslock_ipi *rmsipi; struct rmslock *rms; int readers; - rmsipi = arg; + rmsipi = __containerof(arg, struct rmslock_ipi, srcra); rms = rmsipi->rms; if (*zpcpu_get(rms->readers_influx)) @@ -1009,65 +1009,40 @@ rms_wlock_IPI(void *arg) readers = zpcpu_replace(rms->readers_pcpu, 0); if (readers != 0) atomic_add_int(&rms->readers, readers); - CPU_CLR_ATOMIC(curcpu, &rmsipi->signal); + smp_rendezvous_cpus_done(arg); } static void +rms_wait_func(void *arg, int cpu) +{ + struct rmslock_ipi *rmsipi; + struct rmslock *rms; + int *in_op; + + rmsipi = __containerof(arg, struct rmslock_ipi, srcra); + rms = rmsipi->rms; + + in_op = zpcpu_get_cpu(rms->readers_influx, cpu); + while (atomic_load_int(in_op)) + cpu_spinwait(); +} + +static void rms_wlock_switch(struct rmslock *rms) { struct rmslock_ipi rmsipi; - int *in_op; - int cpu; MPASS(rms->readers == 0); MPASS(rms->writers == 1); rmsipi.rms = rms; - /* - * Publishes rms->writers. rlock and runlock will get this ordered - * via IPI in the worst case. - */ - atomic_thread_fence_rel(); - - /* - * Collect reader counts from all CPUs using an IPI. The handler can - * find itself running while the interrupted CPU was doing either - * rlock or runlock in which case it will fail. - * - * Successful attempts clear the cpu id in the bitmap. - * - * In case of failure we observe all failing CPUs not executing there to - * determine when to make the next attempt. Note that threads having - * the var set have preemption disabled. Setting of readers_influx - * only uses compiler barriers making these loads unreliable, which is - * fine -- the IPI handler will always see the correct result. - * - * We retry until all counts are collected. Forward progress is - * guaranteed by that fact that the total number of threads which can - * be caught like this is finite and they all are going to block on - * their own. - */ - CPU_COPY(&all_cpus, &rmsipi.signal); - for (;;) { - smp_rendezvous_cpus( - rmsipi.signal, - smp_no_rendezvous_barrier, - rms_wlock_IPI, - smp_no_rendezvous_barrier, - &rmsipi); - - if (CPU_EMPTY(&rmsipi.signal)) - break; - - CPU_FOREACH(cpu) { - if (!CPU_ISSET(cpu, &rmsipi.signal)) - continue; - in_op = zpcpu_get_cpu(rms->readers_influx, cpu); - while (atomic_load_int(in_op)) - cpu_spinwait(); - } - } + smp_rendezvous_cpus_retry(all_cpus, + smp_no_rendezvous_barrier, + rms_action_func, + smp_no_rendezvous_barrier, + rms_wait_func, + &rmsipi.srcra); } void From owner-svn-src-all@freebsd.org Wed Feb 12 11:17:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91BBB234ED0; Wed, 12 Feb 2020 11:17:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcZ23Kdcz4GGP; Wed, 12 Feb 2020 11:17:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D91220374; Wed, 12 Feb 2020 11:17:46 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBHkwV086130; Wed, 12 Feb 2020 11:17:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBHjuv086128; Wed, 12 Feb 2020 11:17:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121117.01CBHjuv086128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357810 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:17:46 -0000 Author: mjg Date: Wed Feb 12 11:17:45 2020 New Revision: 357810 URL: https://svnweb.freebsd.org/changeset/base/357810 Log: vfs: switch to smp_rendezvous_cpus_retry for vfs_op_thread_enter/exit In particular on amd64 this eliminates an atomic op in the common case, trading it for IPIs in the uncommon case of catching CPUs executing the code while the filesystem is getting suspended or unmounted. Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/sys/mount.h Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Feb 12 11:17:18 2020 (r357809) +++ head/sys/kern/vfs_mount.c Wed Feb 12 11:17:45 2020 (r357810) @@ -1441,16 +1441,7 @@ vfs_op_enter(struct mount *mp) MNT_IUNLOCK(mp); return; } - /* - * Paired with a fence in vfs_op_thread_enter(). See the comment - * above it for details. - */ - atomic_thread_fence_seq_cst(); vfs_op_barrier_wait(mp); - /* - * Paired with a fence in vfs_op_thread_exit(). - */ - atomic_thread_fence_acq(); CPU_FOREACH(cpu) { mp->mnt_ref += zpcpu_replace_cpu(mp->mnt_ref_pcpu, 0, cpu); @@ -1484,20 +1475,52 @@ vfs_op_exit(struct mount *mp) MNT_IUNLOCK(mp); } -/* - * It is assumed the caller already posted at least an acquire barrier. - */ +struct vfs_op_barrier_ipi { + struct mount *mp; + struct smp_rendezvous_cpus_retry_arg srcra; +}; + +static void +vfs_op_action_func(void *arg) +{ + struct vfs_op_barrier_ipi *vfsopipi; + struct mount *mp; + + vfsopipi = __containerof(arg, struct vfs_op_barrier_ipi, srcra); + mp = vfsopipi->mp; + + if (!vfs_op_thread_entered(mp)) + smp_rendezvous_cpus_done(arg); +} + +static void +vfs_op_wait_func(void *arg, int cpu) +{ + struct vfs_op_barrier_ipi *vfsopipi; + struct mount *mp; + int *in_op; + + vfsopipi = __containerof(arg, struct vfs_op_barrier_ipi, srcra); + mp = vfsopipi->mp; + + in_op = zpcpu_get_cpu(mp->mnt_thread_in_ops_pcpu, cpu); + while (atomic_load_int(in_op)) + cpu_spinwait(); +} + void vfs_op_barrier_wait(struct mount *mp) { - int *in_op; - int cpu; + struct vfs_op_barrier_ipi vfsopipi; - CPU_FOREACH(cpu) { - in_op = zpcpu_get_cpu(mp->mnt_thread_in_ops_pcpu, cpu); - while (atomic_load_int(in_op)) - cpu_spinwait(); - } + vfsopipi.mp = mp; + + smp_rendezvous_cpus_retry(all_cpus, + smp_no_rendezvous_barrier, + vfs_op_action_func, + smp_no_rendezvous_barrier, + vfs_op_wait_func, + &vfsopipi.srcra); } #ifdef DIAGNOSTIC Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Feb 12 11:17:18 2020 (r357809) +++ head/sys/kern/vfs_subr.c Wed Feb 12 11:17:45 2020 (r357810) @@ -6049,10 +6049,6 @@ restart: } MNT_IUNLOCK(mp); if (vp != NULL) { - /* - * Paired with a fence in vfs_op_thread_exit(). - */ - atomic_thread_fence_acq(); vfs_op_barrier_wait(mp); vrele(vp); } Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Wed Feb 12 11:17:18 2020 (r357809) +++ head/sys/sys/mount.h Wed Feb 12 11:17:45 2020 (r357810) @@ -983,14 +983,9 @@ enum mount_counter { MNT_COUNT_REF, MNT_COUNT_LOCKREF, int vfs_mount_fetch_counter(struct mount *, enum mount_counter); /* - * We mark ourselves as entering the section and post a sequentially consistent - * fence, meaning the store is completed before we get into the section and - * mnt_vfs_ops is only read afterwards. + * Code transitioning mnt_vfs_ops to > 0 issues IPIs until it observes + * all CPUs not executing code enclosed by mnt_thread_in_ops_pcpu. * - * Any thread transitioning the ops counter 0->1 does things in the opposite - * order - first bumps the count, posts a sequentially consistent fence and - * observes all CPUs not executing within the section. - * * This provides an invariant that by the time the last CPU is observed not * executing, everyone else entering will see the counter > 0 and exit. * @@ -1009,7 +1004,7 @@ int vfs_mount_fetch_counter(struct mount *, enum mount critical_enter(); \ MPASS(!vfs_op_thread_entered(mp)); \ zpcpu_set_protected(mp->mnt_thread_in_ops_pcpu, 1); \ - atomic_thread_fence_seq_cst(); \ + __compiler_membar(); \ if (__predict_false(mp->mnt_vfs_ops > 0)) { \ vfs_op_thread_exit(mp); \ _retval = false; \ @@ -1019,7 +1014,7 @@ int vfs_mount_fetch_counter(struct mount *, enum mount #define vfs_op_thread_exit(mp) do { \ MPASS(vfs_op_thread_entered(mp)); \ - atomic_thread_fence_rel(); \ + __compiler_membar(); \ zpcpu_set_protected(mp->mnt_thread_in_ops_pcpu, 0); \ critical_exit(); \ } while (0) From owner-svn-src-all@freebsd.org Wed Feb 12 11:18:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA593234F50; Wed, 12 Feb 2020 11:18:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HcZX5VDyz4GNr; Wed, 12 Feb 2020 11:18:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7D5B20375; Wed, 12 Feb 2020 11:18:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBICFt086198; Wed, 12 Feb 2020 11:18:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBICSY086197; Wed, 12 Feb 2020 11:18:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121118.01CBICSY086197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357811 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:18:12 -0000 Author: mjg Date: Wed Feb 12 11:18:12 2020 New Revision: 357811 URL: https://svnweb.freebsd.org/changeset/base/357811 Log: vfs: drop remaining zpcpu casts Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Feb 12 11:17:45 2020 (r357810) +++ head/sys/kern/vfs_mount.c Wed Feb 12 11:18:12 2020 (r357811) @@ -1533,9 +1533,9 @@ vfs_assert_mount_counters(struct mount *mp) return; CPU_FOREACH(cpu) { - if (*(int *)zpcpu_get_cpu(mp->mnt_ref_pcpu, cpu) != 0 || - *(int *)zpcpu_get_cpu(mp->mnt_lockref_pcpu, cpu) != 0 || - *(int *)zpcpu_get_cpu(mp->mnt_writeopcount_pcpu, cpu) != 0) + if (*zpcpu_get_cpu(mp->mnt_ref_pcpu, cpu) != 0 || + *zpcpu_get_cpu(mp->mnt_lockref_pcpu, cpu) != 0 || + *zpcpu_get_cpu(mp->mnt_writeopcount_pcpu, cpu) != 0) vfs_dump_mount_counters(mp); } } @@ -1605,7 +1605,7 @@ vfs_mount_fetch_counter(struct mount *mp, enum mount_c sum = *base; CPU_FOREACH(cpu) { - sum += *(int *)zpcpu_get_cpu(pcpu, cpu); + sum += *zpcpu_get_cpu(pcpu, cpu); } return (sum); } From owner-svn-src-all@freebsd.org Wed Feb 12 11:19:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA69E235027; Wed, 12 Feb 2020 11:19:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hcbb53mPz4GWw; Wed, 12 Feb 2020 11:19:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8E6220376; Wed, 12 Feb 2020 11:19:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CBJ7x5086287; Wed, 12 Feb 2020 11:19:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CBJ7xI086286; Wed, 12 Feb 2020 11:19:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002121119.01CBJ7xI086286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 11:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357812 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 11:19:07 -0000 Author: mjg Date: Wed Feb 12 11:19:07 2020 New Revision: 357812 URL: https://svnweb.freebsd.org/changeset/base/357812 Log: vfs: refactor vputx and add more comment Reviewed by: jeff (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D23530 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Feb 12 11:18:12 2020 (r357811) +++ head/sys/kern/vfs_subr.c Wed Feb 12 11:19:07 2020 (r357812) @@ -2798,14 +2798,37 @@ v_incr_devcount(struct vnode *vp) /* * Decrement si_usecount of the associated device, if any. + * + * The caller is required to hold the interlock when transitioning a VCHR use + * count to zero. This prevents a race with devfs_reclaim_vchr() that would + * leak a si_usecount reference. The vnode lock will also prevent this race + * if it is held while dropping the last ref. + * + * The race is: + * + * CPU1 CPU2 + * devfs_reclaim_vchr + * make v_usecount == 0 + * VI_LOCK + * sees v_usecount == 0, no updates + * vp->v_rdev = NULL; + * ... + * VI_UNLOCK + * VI_LOCK + * v_decr_devcount + * sees v_rdev == NULL, no updates + * + * In this scenario si_devcount decrement is not performed. */ static void v_decr_devcount(struct vnode *vp) { + ASSERT_VOP_LOCKED(vp, __func__); ASSERT_VI_LOCKED(vp, __FUNCTION__); if (vp->v_type == VCHR && vp->v_rdev != NULL) { dev_lock(); + VNPASS(vp->v_rdev->si_usecount > 0, vp); vp->v_rdev->si_usecount--; dev_unlock(); } @@ -3154,88 +3177,71 @@ vdefer_inactive_unlocked(struct vnode *vp) vdefer_inactive(vp); } -enum vputx_op { VPUTX_VRELE, VPUTX_VPUT, VPUTX_VUNREF }; +enum vput_op { VRELE, VPUT, VUNREF }; /* - * Decrement the use and hold counts for a vnode. + * Handle ->v_usecount transitioning to 0. * - * See an explanation near vget() as to why atomic operation is safe. + * By releasing the last usecount we take ownership of the hold count which + * provides liveness of the vnode, meaning we have to vdrop. * + * If the vnode is of type VCHR we may need to decrement si_usecount, see + * v_decr_devcount for details. + * + * For all vnodes we may need to perform inactive processing. It requires an + * exclusive lock on the vnode, while it is legal to call here with only a + * shared lock (or no locks). If locking the vnode in an expected manner fails, + * inactive processing gets deferred to the syncer. + * * XXX Some filesystems pass in an exclusively locked vnode and strongly depend * on the lock being held all the way until VOP_INACTIVE. This in particular * happens with UFS which adds half-constructed vnodes to the hash, where they * can be found by other code. */ static void -vputx(struct vnode *vp, enum vputx_op func) +vput_final(struct vnode *vp, enum vput_op func) { int error; bool want_unlock; - KASSERT(vp != NULL, ("vputx: null vp")); - if (func == VPUTX_VUNREF) - ASSERT_VOP_LOCKED(vp, "vunref"); - else if (func == VPUTX_VPUT) - ASSERT_VOP_LOCKED(vp, "vput"); - ASSERT_VI_UNLOCKED(vp, __func__); - VNASSERT(vp->v_holdcnt > 0 && vp->v_usecount > 0, vp, - ("%s: wrong ref counts", __func__)); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + VNPASS(vp->v_holdcnt > 0, vp); + VI_LOCK(vp); + if (func != VRELE) + v_decr_devcount(vp); + /* - * We want to hold the vnode until the inactive finishes to - * prevent vgone() races. We drop the use count here and the - * hold count below when we're done. - * - * If we release the last usecount we take ownership of the hold - * count which provides liveness of the vnode, in which case we - * have to vdrop. - */ - if (__predict_false(vp->v_type == VCHR && func == VPUTX_VRELE)) { - if (refcount_release_if_not_last(&vp->v_usecount)) - return; - VI_LOCK(vp); - if (!refcount_release(&vp->v_usecount)) { - VI_UNLOCK(vp); - return; - } - } else { - if (!refcount_release(&vp->v_usecount)) { - if (func == VPUTX_VPUT) - VOP_UNLOCK(vp); - return; - } - VI_LOCK(vp); - } - v_decr_devcount(vp); - /* * By the time we got here someone else might have transitioned * the count back to > 0. */ - if (vp->v_usecount > 0 || vp->v_iflag & VI_DOINGINACT) + if (vp->v_usecount > 0) goto out; /* - * Check if the fs wants to perform inactive processing. Note we - * may be only holding the interlock, in which case it is possible - * someone else called vgone on the vnode and ->v_data is now NULL. - * Since vgone performs inactive on its own there is nothing to do - * here but to drop our hold count. + * If the vnode is doomed vgone already performed inactive processing + * (if needed). */ - if (__predict_false(VN_IS_DOOMED(vp)) || - VOP_NEED_INACTIVE(vp) == 0) + if (VN_IS_DOOMED(vp)) goto out; + if (__predict_true(VOP_NEED_INACTIVE(vp) == 0)) + goto out; + + if (vp->v_iflag & VI_DOINGINACT) + goto out; + /* - * We must call VOP_INACTIVE with the node locked. Mark - * as VI_DOINGINACT to avoid recursion. + * Locking operations here will drop the interlock and possibly the + * vnode lock, opening a window where the vnode can get doomed all the + * while ->v_usecount is 0. Set VI_OWEINACT to let vgone know to + * perform inactive. */ vp->v_iflag |= VI_OWEINACT; want_unlock = false; error = 0; switch (func) { - case VPUTX_VRELE: + case VRELE: switch (VOP_ISLOCKED(vp)) { case LK_EXCLUSIVE: break; @@ -3255,7 +3261,7 @@ vputx(struct vnode *vp, enum vputx_op func) break; } break; - case VPUTX_VPUT: + case VPUT: want_unlock = true; if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { error = VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | @@ -3263,7 +3269,7 @@ vputx(struct vnode *vp, enum vputx_op func) VI_LOCK(vp); } break; - case VPUTX_VUNREF: + case VUNREF: if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { error = VOP_LOCK(vp, LK_TRYUPGRADE | LK_INTERLOCK); VI_LOCK(vp); @@ -3280,42 +3286,87 @@ vputx(struct vnode *vp, enum vputx_op func) } return; out: - if (func == VPUTX_VPUT) + if (func == VPUT) VOP_UNLOCK(vp); vdropl(vp); } /* - * Vnode put/release. - * If count drops to zero, call inactive routine and return to freelist. + * Decrement ->v_usecount for a vnode. + * + * Releasing the last use count requires additional processing, see vput_final + * above for details. + * + * Note that releasing use count without the vnode lock requires special casing + * for VCHR, see v_decr_devcount for details. + * + * Comment above each variant denotes lock state on entry and exit. */ + +static void __noinline +vrele_vchr(struct vnode *vp) +{ + + if (refcount_release_if_not_last(&vp->v_usecount)) + return; + VI_LOCK(vp); + if (!refcount_release(&vp->v_usecount)) { + VI_UNLOCK(vp); + return; + } + v_decr_devcount(vp); + VI_UNLOCK(vp); + vput_final(vp, VRELE); +} + +/* + * in: any + * out: same as passed in + */ void vrele(struct vnode *vp) { - vputx(vp, VPUTX_VRELE); + ASSERT_VI_UNLOCKED(vp, __func__); + if (__predict_false(vp->v_type == VCHR)) { + vrele_vchr(vp); + return; + } + if (!refcount_release(&vp->v_usecount)) + return; + vput_final(vp, VRELE); } /* - * Release an already locked vnode. This give the same effects as - * unlock+vrele(), but takes less time and avoids releasing and - * re-aquiring the lock (as vrele() acquires the lock internally.) + * in: locked + * out: unlocked */ void vput(struct vnode *vp) { - vputx(vp, VPUTX_VPUT); + ASSERT_VOP_LOCKED(vp, __func__); + ASSERT_VI_UNLOCKED(vp, __func__); + if (!refcount_release(&vp->v_usecount)) { + VOP_UNLOCK(vp); + return; + } + vput_final(vp, VPUT); } /* - * Release an exclusively locked vnode. Do not unlock the vnode lock. + * in: locked + * out: locked */ void vunref(struct vnode *vp) { - vputx(vp, VPUTX_VUNREF); + ASSERT_VOP_LOCKED(vp, __func__); + ASSERT_VI_UNLOCKED(vp, __func__); + if (!refcount_release(&vp->v_usecount)) + return; + vput_final(vp, VUNREF); } void From owner-svn-src-all@freebsd.org Wed Feb 12 12:23:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14C5B23718D; Wed, 12 Feb 2020 12:23:47 +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) server-signature RSA-PSS (4096 bits) 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 48Hf2B6v3Lz4L4S; Wed, 12 Feb 2020 12:23:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7FDF2115D; Wed, 12 Feb 2020 12:23:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CCNkfn027766; Wed, 12 Feb 2020 12:23:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CCNkSh027765; Wed, 12 Feb 2020 12:23:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002121223.01CCNkSh027765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 12 Feb 2020 12:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357813 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 357813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 12:23:47 -0000 Author: kib Date: Wed Feb 12 12:23:46 2020 New Revision: 357813 URL: https://svnweb.freebsd.org/changeset/base/357813 Log: Fix indent. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Feb 12 11:19:07 2020 (r357812) +++ head/libexec/rtld-elf/rtld.c Wed Feb 12 12:23:46 2020 (r357813) @@ -5627,26 +5627,30 @@ parse_args(char* argv[], int argc, bool *use_pathp, in print_usage(argv[0]); _exit(0); } else if (opt == 'f') { - /* - * -f XX can be used to specify a descriptor for the - * binary named at the command line (i.e., the later - * argument will specify the process name but the - * descriptor is what will actually be executed) - */ - if (j != arglen - 1) { - /* -f must be the last option in, e.g., -abcf */ - _rtld_error("Invalid options: %s", arg); - rtld_die(); - } - i++; - fd = parse_integer(argv[i]); - if (fd == -1) { - _rtld_error("Invalid file descriptor: '%s'", - argv[i]); - rtld_die(); - } - *fdp = fd; - break; + /* + * -f XX can be used to specify a + * descriptor for the binary named at + * the command line (i.e., the later + * argument will specify the process + * name but the descriptor is what + * will actually be executed). + * + * -f must be the last option in, e.g., -abcf. + */ + if (j != arglen - 1) { + _rtld_error("Invalid options: %s", arg); + rtld_die(); + } + i++; + fd = parse_integer(argv[i]); + if (fd == -1) { + _rtld_error( + "Invalid file descriptor: '%s'", + argv[i]); + rtld_die(); + } + *fdp = fd; + break; } else if (opt == 'p') { *use_pathp = true; } else { From owner-svn-src-all@freebsd.org Wed Feb 12 12:36:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64D4123760B; Wed, 12 Feb 2020 12:36:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HfKN26TGz4LkG; Wed, 12 Feb 2020 12:36:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43C2321378; Wed, 12 Feb 2020 12:36:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CCauUB033836; Wed, 12 Feb 2020 12:36:56 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CCatiH033835; Wed, 12 Feb 2020 12:36:55 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121236.01CCatiH033835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 12:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357814 - head/sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet/tcp_stacks X-SVN-Commit-Revision: 357814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 12:36:56 -0000 Author: rrs Date: Wed Feb 12 12:36:55 2020 New Revision: 357814 URL: https://svnweb.freebsd.org/changeset/base/357814 Log: Now that all of the stats framework is in FreeBSD the bits that disabled stats when netflix-stats is not defined is no longer needed. Lets remove these bits so that we will properly use stats per its definition in BBR and Rack. Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D23088 Modified: head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_stacks/rack_bbr_common.h Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Wed Feb 12 12:23:46 2020 (r357813) +++ head/sys/netinet/tcp_stacks/rack.c Wed Feb 12 12:36:55 2020 (r357814) @@ -1681,7 +1681,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r tp->t_stats_gput_prev); tp->t_flags &= ~TF_GPUTINPROG; tp->t_stats_gput_prev = gput; - +#ifdef NETFLIX_PEAKRATE if (tp->t_maxpeakrate) { /* * We update t_peakrate_thr. This gives us roughly @@ -1689,6 +1689,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r */ tcp_update_peakrate_thr(tp); } +#endif } #endif if (tp->snd_cwnd > tp->snd_ssthresh) { Modified: head/sys/netinet/tcp_stacks/rack_bbr_common.h ============================================================================== --- head/sys/netinet/tcp_stacks/rack_bbr_common.h Wed Feb 12 12:23:46 2020 (r357813) +++ head/sys/netinet/tcp_stacks/rack_bbr_common.h Wed Feb 12 12:36:55 2020 (r357814) @@ -27,11 +27,6 @@ * __FBSDID("$FreeBSD$"); */ -/* XXXLAS: Couple STATS to NETFLIX_STATS until stats(3) is fully upstreamed. */ -#ifndef NETFLIX_STATS -#undef STATS -#endif - /* Common defines and such used by both RACK and BBR */ /* Special values for mss accounting array */ #define TCP_MSS_ACCT_JUSTRET 0 From owner-svn-src-all@freebsd.org Wed Feb 12 12:40:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24E3323772A; Wed, 12 Feb 2020 12:40:07 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HfP30fPLz4Ltx; Wed, 12 Feb 2020 12:40:07 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D09E21395; Wed, 12 Feb 2020 12:40:07 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CCe6or034060; Wed, 12 Feb 2020 12:40:06 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CCe6ir034058; Wed, 12 Feb 2020 12:40:06 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121240.01CCe6ir034058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 12:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357815 - head/sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet/tcp_stacks X-SVN-Commit-Revision: 357815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 12:40:07 -0000 Author: rrs Date: Wed Feb 12 12:40:06 2020 New Revision: 357815 URL: https://svnweb.freebsd.org/changeset/base/357815 Log: Remove all trailing white space from the BBR/Rack fold. Bits left around by emacs (thanks emacs). Modified: head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_stacks/rack_bbr_common.c head/sys/netinet/tcp_stacks/rack_bbr_common.h head/sys/netinet/tcp_stacks/sack_filter.c head/sys/netinet/tcp_stacks/tcp_bbr.h head/sys/netinet/tcp_stacks/tcp_rack.h Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Wed Feb 12 12:36:55 2020 (r357814) +++ head/sys/netinet/tcp_stacks/bbr.c Wed Feb 12 12:40:06 2020 (r357815) @@ -208,7 +208,7 @@ static int32_t bbr_min_measurements_req = 1; /* We nee * to prevent it from being ok * to have no measurements). */ static int32_t bbr_no_pacing_until = 4; - + static int32_t bbr_min_usec_delta = 20000; /* 20,000 usecs */ static int32_t bbr_min_peer_delta = 20; /* 20 units */ static int32_t bbr_delta_percent = 150; /* 15.0 % */ @@ -380,9 +380,9 @@ static int32_t bbr_rto_max_sec = 4; /* 4 seconds */ static int32_t bbr_hptsi_per_second = 1000; /* - * For hptsi under bbr_cross_over connections what is delay + * For hptsi under bbr_cross_over connections what is delay * target 7ms (in usec) combined with a seg_max of 2 - * gets us close to identical google behavior in + * gets us close to identical google behavior in * TSO size selection (possibly more 1MSS sends). */ static int32_t bbr_hptsi_segments_delay_tar = 7000; @@ -596,9 +596,9 @@ activate_rxt: rsm = TAILQ_FIRST(&bbr->r_ctl.rc_tmap); if (rsm) { idx = rsm->r_rtr_cnt - 1; - if (TSTMP_GEQ(rsm->r_tim_lastsent[idx], bbr->r_ctl.rc_tlp_rxt_last_time)) + if (TSTMP_GEQ(rsm->r_tim_lastsent[idx], bbr->r_ctl.rc_tlp_rxt_last_time)) tstmp_touse = rsm->r_tim_lastsent[idx]; - else + else tstmp_touse = bbr->r_ctl.rc_tlp_rxt_last_time; if (TSTMP_GT(tstmp_touse, cts)) time_since_sent = cts - tstmp_touse; @@ -673,9 +673,9 @@ activate_rxt: } time_since_sent = 0; idx = rsm->r_rtr_cnt - 1; - if (TSTMP_GEQ(rsm->r_tim_lastsent[idx], bbr->r_ctl.rc_tlp_rxt_last_time)) + if (TSTMP_GEQ(rsm->r_tim_lastsent[idx], bbr->r_ctl.rc_tlp_rxt_last_time)) tstmp_touse = rsm->r_tim_lastsent[idx]; - else + else tstmp_touse = bbr->r_ctl.rc_tlp_rxt_last_time; if (TSTMP_GT(tstmp_touse, cts)) time_since_sent = cts - tstmp_touse; @@ -695,11 +695,11 @@ activate_rxt: } if ((bbr->rc_tlp_rtx_out == 1) && (rsm->r_start == bbr->r_ctl.rc_last_tlp_seq)) { - /* - * Second retransmit of the same TLP + /* + * Second retransmit of the same TLP * lets not. */ - bbr->rc_tlp_rtx_out = 0; + bbr->rc_tlp_rtx_out = 0; goto activate_rxt; } if (rsm->r_start != bbr->r_ctl.rc_last_tlp_seq) { @@ -766,7 +766,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb prev_delay = bbr->r_ctl.rc_last_delay_val; if (bbr->r_ctl.rc_last_delay_val && (slot == 0)) { - /* + /* * If a previous pacer delay was in place we * are not coming from the output side (where * we calculate a delay, more likely a timer). @@ -777,7 +777,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb delay_calc = cts - bbr->rc_pacer_started; if (delay_calc <= slot) slot -= delay_calc; - } + } } /* Do we have early to make up for by pushing out the pacing time? */ if (bbr->r_agg_early_set) { @@ -804,8 +804,8 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb if (bbr->rc_in_persist == 0) { delayed_ack = bbr_delack_time; } else { - /* - * We are in persists and have + /* + * We are in persists and have * gotten a new data element. */ if (hpts_timeout > bbr_delack_time) { @@ -816,7 +816,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb hpts_timeout = bbr_delack_time; } } - } + } if (delayed_ack && ((hpts_timeout == 0) || (delayed_ack < hpts_timeout))) { @@ -910,10 +910,10 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb * the do not disturbe even for sack. */ inp->inp_flags2 |= INP_DONT_SACK_QUEUE; - } else + } else inp->inp_flags2 &= ~INP_DONT_SACK_QUEUE; bbr->rc_pacer_started = cts; - + (void)tcp_hpts_insert_diag(tp->t_inpcb, HPTS_USEC_TO_SLOTS(slot), __LINE__, &diag); bbr->rc_timer_first = 0; @@ -923,8 +923,8 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb } else if (hpts_timeout) { (void)tcp_hpts_insert_diag(tp->t_inpcb, HPTS_USEC_TO_SLOTS(hpts_timeout), __LINE__, &diag); - /* - * We add the flag here as well if the slot is set, + /* + * We add the flag here as well if the slot is set, * since hpts will call in to clear the queue first before * calling the output routine (which does our timers). * We don't want to set the flag if its just a timer @@ -937,7 +937,7 @@ bbr_start_hpts_timer(struct tcp_bbr *bbr, struct tcpcb bbr->rc_pacer_started = cts; if ((bbr->r_ctl.rc_hpts_flags & PACE_TMR_RACK) && (bbr->rc_cwnd_limited == 0)) { - /* + /* * For a rack timer, don't wake us even * if a sack arrives as long as we are * not cwnd limited. @@ -1048,7 +1048,7 @@ bbr_timer_audit(struct tcpcb *tp, struct tcp_bbr *bbr, * We have outstanding data and * we *do* have a RACK, TLP or RXT * timer running. We won't restart - * anything here since thats probably ok we + * anything here since thats probably ok we * will get called with some timer here shortly. */ return; @@ -2223,7 +2223,7 @@ bbr_log_rtt_sample(struct tcp_bbr *bbr, uint32_t rtt, log.u_bbr.pkts_out = tcp_tv_to_mssectick(&bbr->rc_tv); log.u_bbr.flex6 = tsin; log.u_bbr.flex7 = 0; - log.u_bbr.flex8 = bbr->rc_ack_was_delayed; + log.u_bbr.flex8 = bbr->rc_ack_was_delayed; TCP_LOG_EVENTP(bbr->rc_tp, NULL, &bbr->rc_inp->inp_socket->so_rcv, &bbr->rc_inp->inp_socket->so_snd, @@ -2423,7 +2423,7 @@ bbr_log_startup_event(struct tcp_bbr *bbr, uint32_t ct log.u_bbr.flex1 = flex1; log.u_bbr.flex2 = flex2; log.u_bbr.flex3 = flex3; - log.u_bbr.flex4 = 0; + log.u_bbr.flex4 = 0; log.u_bbr.flex5 = bbr->r_ctl.rc_target_at_state; log.u_bbr.flex6 = bbr->r_ctl.rc_lost_at_startup; log.u_bbr.flex8 = reason; @@ -2693,7 +2693,7 @@ bbr_log_type_bbrupd(struct tcp_bbr *bbr, uint8_t flex8 log.u_bbr.flex8 = flex8; if (bbr->rc_ack_was_delayed) log.u_bbr.epoch = bbr->r_ctl.rc_ack_hdwr_delay; - else + else log.u_bbr.epoch = 0; TCP_LOG_EVENTP(bbr->rc_tp, NULL, &bbr->rc_inp->inp_socket->so_rcv, @@ -2725,7 +2725,7 @@ bbr_log_type_ltbw(struct tcp_bbr *bbr, uint32_t cts, i if (bbr->rc_lt_use_bw == 0) log.u_bbr.epoch = bbr->r_ctl.rc_pkt_epoch - bbr->r_ctl.rc_lt_epoch; else - log.u_bbr.epoch = bbr->r_ctl.rc_pkt_epoch - bbr->r_ctl.rc_lt_epoch_use; + log.u_bbr.epoch = bbr->r_ctl.rc_pkt_epoch - bbr->r_ctl.rc_lt_epoch_use; TCP_LOG_EVENTP(bbr->rc_tp, NULL, &bbr->rc_inp->inp_socket->so_rcv, &bbr->rc_inp->inp_socket->so_snd, @@ -2908,10 +2908,10 @@ bbr_set_pktepoch(struct tcp_bbr *bbr, uint32_t cts, in calclr /= (uint64_t)del; } else { /* Nothing delivered? 100.0% loss */ - calclr = 1000; + calclr = 1000; } bbr->r_ctl.rc_pkt_epoch_loss_rate = (uint32_t)calclr; - if (IN_RECOVERY(bbr->rc_tp->t_flags)) + if (IN_RECOVERY(bbr->rc_tp->t_flags)) bbr->r_ctl.recovery_lr += (uint32_t)calclr; bbr->r_ctl.rc_pkt_epoch++; if (bbr->rc_no_pacing && @@ -2959,8 +2959,8 @@ __bbr_get_bw(struct tcp_bbr *bbr) uint64_t bw, min_bw; uint64_t rtt; int gm_measure_cnt = 1; - - /* + + /* * For startup we make, like google, a * minimum b/w. This is generated from the * IW and the rttProp. We do fall back to srtt @@ -2970,7 +2970,7 @@ __bbr_get_bw(struct tcp_bbr *bbr) */ if (bbr->rc_bbr_state == BBR_STATE_STARTUP) { /* Attempt first to use rttProp */ - rtt = (uint64_t)get_filter_value_small(&bbr->r_ctl.rc_rttprop); + rtt = (uint64_t)get_filter_value_small(&bbr->r_ctl.rc_rttprop); if (rtt && (rtt < 0xffffffff)) { measure: min_bw = (uint64_t)(bbr_initial_cwnd(bbr, bbr->rc_tp)) * @@ -3158,7 +3158,7 @@ static void bbr_randomize_extra_state_time(struct tcp_bbr *bbr) { uint32_t ran, deduct; - + ran = arc4random_uniform(bbr_rand_ot); if (ran) { deduct = bbr->r_ctl.rc_level_state_extra / ran; @@ -3219,8 +3219,8 @@ reset_all: bbr->rc_bbr_state = BBR_STATE_PROBE_BW; bbr_log_type_statechange(bbr, cts, __LINE__); } else { - /* - * This should not happen really + /* + * This should not happen really * unless we remove the startup/drain * restrictions above. */ @@ -3293,7 +3293,7 @@ reset_all: } diff = bbr->r_ctl.rc_pkt_epoch - bbr->r_ctl.rc_lt_epoch; if (diff < bbr_lt_intvl_min_rtts) { - /* + /* * need more samples (we don't * start on a round like linux so * we need 1 more). @@ -3536,20 +3536,20 @@ bbr_get_target_cwnd(struct tcp_bbr *bbr, uint64_t bw, mss = min((bbr->rc_tp->t_maxseg - bbr->rc_last_options), bbr->r_ctl.rc_pace_max_segs); /* Get the base cwnd with gain rounded to a mss */ cwnd = roundup(bbr_get_raw_target_cwnd(bbr, bw, gain), mss); - /* + /* * Add in N (2 default since we do not have a - * fq layer to trap packets in) quanta's per the I-D - * section 4.2.3.2 quanta adjust. + * fq layer to trap packets in) quanta's per the I-D + * section 4.2.3.2 quanta adjust. */ cwnd += (bbr_quanta * bbr->r_ctl.rc_pace_max_segs); if (bbr->rc_use_google) { if((bbr->rc_bbr_state == BBR_STATE_PROBE_BW) && (bbr_state_val(bbr) == BBR_SUB_GAIN)) { - /* + /* * The linux implementation adds * an extra 2 x mss in gain cycle which * is documented no-where except in the code. - * so we add more for Neal undocumented feature + * so we add more for Neal undocumented feature */ cwnd += 2 * mss; } @@ -3605,7 +3605,7 @@ static uint32_t bbr_get_pacing_length(struct tcp_bbr *bbr, uint16_t gain, uint32_t useconds_time, uint64_t bw) { uint64_t divor, res, tim; - + if (useconds_time == 0) return (0); gain = bbr_gain_adjust(bbr, gain); @@ -3642,8 +3642,8 @@ bbr_get_pacing_delay(struct tcp_bbr *bbr, uint16_t gai bw = bbr_get_bw(bbr); if (bbr->rc_use_google) { uint64_t cbw; - - /* + + /* * Reduce the b/w by the google discount * factor 10 = 1%. */ @@ -3721,8 +3721,8 @@ bbr_ack_received(struct tcpcb *tp, struct tcp_bbr *bbr bytes_this_ack += sack_changed; if (bytes_this_ack > prev_acked) { bytes_this_ack -= prev_acked; - /* - * A byte ack'd gives us a full mss + /* + * A byte ack'd gives us a full mss * to be like linux i.e. they count packets. */ if ((bytes_this_ack < maxseg) && bbr->rc_use_google) @@ -3733,7 +3733,7 @@ bbr_ack_received(struct tcpcb *tp, struct tcp_bbr *bbr } cwnd = tp->snd_cwnd; bw = get_filter_value(&bbr->r_ctl.rc_delrate); - if (bw) + if (bw) target_cwnd = bbr_get_target_cwnd(bbr, bw, (uint32_t)bbr->r_ctl.rc_bbr_cwnd_gain); @@ -3741,7 +3741,7 @@ bbr_ack_received(struct tcpcb *tp, struct tcp_bbr *bbr target_cwnd = bbr_initial_cwnd(bbr, bbr->rc_tp); if (IN_RECOVERY(tp->t_flags) && (bbr->bbr_prev_in_rec == 0)) { - /* + /* * We are entering recovery and * thus packet conservation. */ @@ -3770,7 +3770,7 @@ bbr_ack_received(struct tcpcb *tp, struct tcp_bbr *bbr if (TSTMP_GEQ(bbr->r_ctl.rc_rcvtime, bbr->r_ctl.rc_recovery_start)) time_in = bbr->r_ctl.rc_rcvtime - bbr->r_ctl.rc_recovery_start; - else + else time_in = 0; if (time_in >= bbr_get_rtt(bbr, BBR_RTT_PROP)) { @@ -3818,7 +3818,7 @@ bbr_ack_received(struct tcpcb *tp, struct tcp_bbr *bbr meth = 3; cwnd += bytes_this_ack; } else { - /* + /* * Method 4 means we are at target so no gain in * startup and past the initial window. */ @@ -3888,7 +3888,7 @@ bbr_post_recovery(struct tcpcb *tp) uint64_t val, lr2use; uint32_t maxseg, newcwnd, acks_inflight, ratio, cwnd; uint32_t *cwnd_p; - + if (bbr_get_rtt(bbr, BBR_SRTT)) { val = ((uint64_t)bbr_get_rtt(bbr, BBR_RTT_PROP) * (uint64_t)1000); val /= bbr_get_rtt(bbr, BBR_SRTT); @@ -3911,8 +3911,8 @@ bbr_post_recovery(struct tcpcb *tp) (bbr_state_val(bbr) == BBR_SUB_DRAIN)) || ((bbr->rc_bbr_state == BBR_STATE_DRAIN) && bbr_slam_cwnd_in_main_drain)) { - /* - * Here we must poke at the saved cwnd + /* + * Here we must poke at the saved cwnd * as well as the cwnd. */ cwnd = bbr->r_ctl.rc_saved_cwnd; @@ -3954,7 +3954,7 @@ bbr_post_recovery(struct tcpcb *tp) } /* with standard delayed acks how many acks can I expect? */ if (bbr_drop_limit == 0) { - /* + /* * Anticpate how much we will * raise the cwnd based on the acks. */ @@ -4013,8 +4013,8 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, u /* Start a new epoch */ bbr_set_pktepoch(bbr, bbr->r_ctl.rc_rcvtime, __LINE__); if (bbr->rc_lt_is_sampling || bbr->rc_lt_use_bw) { - /* - * Move forward the lt epoch + /* + * Move forward the lt epoch * so it won't count the truncated * epoch. */ @@ -4022,7 +4022,7 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, u } if (bbr->rc_bbr_state == BBR_STATE_STARTUP) { /* - * Just like the policer detection code + * Just like the policer detection code * if we are in startup we must push * forward the last startup epoch * to hide the truncated PE. @@ -4036,7 +4036,7 @@ bbr_cong_signal(struct tcpcb *tp, struct tcphdr *th, u tcp_bbr_tso_size_check(bbr, bbr->r_ctl.rc_rcvtime); if (bbr->rc_inp->inp_in_hpts && ((bbr->r_ctl.rc_hpts_flags & PACE_TMR_RACK) == 0)) { - /* + /* * When we enter recovery, we need to restart * any timers. This may mean we gain an agg * early, which will be made up for at the last @@ -4358,7 +4358,7 @@ bbr_is_lost(struct tcp_bbr *bbr, struct bbr_sendmap *r { uint32_t thresh; - + thresh = bbr_calc_thresh_rack(bbr, bbr_get_rtt(bbr, BBR_RTT_RACK), cts, rsm); if ((cts - rsm->r_tim_lastsent[(rsm->r_rtr_cnt - 1)]) >= thresh) { @@ -4447,7 +4447,7 @@ bbr_timeout_rack(struct tcpcb *tp, struct tcp_bbr *bbr * settings. */ uint32_t lost; - + if (bbr->rc_all_timers_stopped) { return (1); } @@ -4519,7 +4519,7 @@ static int bbr_sack_mergable(struct bbr_sendmap *at, uint32_t start, uint32_t end) { - /* + /* * Given a sack block defined by * start and end, and a current postion * at. Return 1 if either side of at @@ -4554,7 +4554,7 @@ bbr_sack_mergable(struct bbr_sendmap *at, if ((r_rsm->r_start == end) || (SEQ_LT(start, r_rsm->r_start) && SEQ_GT(end, r_rsm->r_start))) { - /* + /* * map blk |---------| * sack blk |----| * @@ -4572,7 +4572,7 @@ bbr_merge_rsm(struct tcp_bbr *bbr, struct bbr_sendmap *l_rsm, struct bbr_sendmap *r_rsm) { - /* + /* * We are merging two ack'd RSM's, * the l_rsm is on the left (lower seq * values) and the r_rsm is on the right @@ -4604,7 +4604,7 @@ bbr_merge_rsm(struct tcp_bbr *bbr, /* This really should not happen */ bbr->r_ctl.rc_lost_bytes -= r_rsm->r_end - r_rsm->r_start; } - TAILQ_REMOVE(&bbr->r_ctl.rc_map, r_rsm, r_next); + TAILQ_REMOVE(&bbr->r_ctl.rc_map, r_rsm, r_next); if ((r_rsm->r_limit_type == 0) && (l_rsm->r_limit_type != 0)) { /* Transfer the split limit to the map we free */ r_rsm->r_limit_type = l_rsm->r_limit_type; @@ -4711,8 +4711,8 @@ need_retran: goto restore; } } else { - /* - * We must find the last segment + /* + * We must find the last segment * that was acceptable by the client. */ TAILQ_FOREACH_REVERSE(rsm, &bbr->r_ctl.rc_map, bbr_head, r_next) { @@ -4974,7 +4974,7 @@ bbr_remxt_tmr(struct tcpcb *tp) TAILQ_FOREACH(rsm, &bbr->r_ctl.rc_map, r_next) { if (rsm->r_flags & BBR_ACKED) { uint32_t old_flags; - + rsm->r_dupack = 0; if (rsm->r_in_tmap == 0) { /* We must re-add it back to the tlist */ @@ -4996,7 +4996,7 @@ bbr_remxt_tmr(struct tcpcb *tp) } if (bbr_marks_rxt_sack_passed) { /* - * With this option, we will rack out + * With this option, we will rack out * in 1ms increments the rest of the packets. */ rsm->r_flags |= BBR_SACK_PASSED | BBR_MARKED_LOST; @@ -5388,7 +5388,7 @@ static uint32_t bbr_get_earliest_send_outstanding(struct tcp_bbr *bbr, struct bbr_sendmap *u_rsm, uint32_t cts) { struct bbr_sendmap *rsm; - + rsm = TAILQ_FIRST(&bbr->r_ctl.rc_tmap); if ((rsm == NULL) || (u_rsm == rsm)) return (cts); @@ -5414,7 +5414,7 @@ bbr_update_rsm(struct tcpcb *tp, struct tcp_bbr *bbr, if (rsm->r_flags & BBR_MARKED_LOST) { /* We have retransmitted, its no longer lost */ rsm->r_flags &= ~BBR_MARKED_LOST; - bbr->r_ctl.rc_lost_bytes -= rsm->r_end - rsm->r_start; + bbr->r_ctl.rc_lost_bytes -= rsm->r_end - rsm->r_start; } if (rsm->r_flags & BBR_RXT_CLEARED) { /* @@ -5436,7 +5436,7 @@ bbr_update_rsm(struct tcpcb *tp, struct tcp_bbr *bbr, rsm->r_pacing_delay = pacing_time; rsm->r_delivered = bbr->r_ctl.rc_delivered; rsm->r_ts_valid = bbr->rc_ts_valid; - if (bbr->rc_ts_valid) + if (bbr->rc_ts_valid) rsm->r_del_ack_ts = bbr->r_ctl.last_inbound_ts; if (bbr->r_ctl.r_app_limited_until) rsm->r_app_limited = 1; @@ -5556,7 +5556,7 @@ static uint64_t bbr_get_hardware_rate(struct tcp_bbr *bbr) { uint64_t bw; - + bw = bbr_get_bw(bbr); bw *= (uint64_t)bbr_hptsi_gain[BBR_SUB_GAIN]; bw /= (uint64_t)BBR_UNIT; @@ -5592,7 +5592,7 @@ bbr_update_hardware_pacing_rate(struct tcp_bbr *bbr, u { const struct tcp_hwrate_limit_table *nrte; int error, rate = -1; - + if (bbr->r_ctl.crte == NULL) return; if ((bbr->rc_inp->inp_route.ro_rt == NULL) || @@ -5702,12 +5702,12 @@ bbr_adjust_for_hw_pacing(struct tcp_bbr *bbr, uint32_t * time between each segment the * hardware sends rounding up and * derive a bytes from that. We multiply - * that by bbr_hdwr_pace_adjust to get + * that by bbr_hdwr_pace_adjust to get * more bang for our buck. * * The goal is to have the software pacer * waiting no more than an additional - * pacing delay if we can (without the + * pacing delay if we can (without the * compensation i.e. x bbr_hdwr_pace_adjust). */ seg_sz = max(((cur_delay + rlp->time_between)/rlp->time_between), @@ -5724,12 +5724,12 @@ bbr_adjust_for_hw_pacing(struct tcp_bbr *bbr, uint32_t } seg_sz *= maxseg; } else if (delta == 0) { - /* + /* * The highest pacing rate is * above our b/w gained. This means * we probably are going quite fast at * the hardware highest rate. Lets just multiply - * the calculated TSO size by the + * the calculated TSO size by the * multiplier factor (its probably * 4 segments in the default config for * mlx). @@ -5764,7 +5764,7 @@ bbr_adjust_for_hw_pacing(struct tcp_bbr *bbr, uint32_t new_tso = bbr->r_ctl.rc_pace_max_segs; if (new_tso >= (PACE_MAX_IP_BYTES-maxseg)) new_tso = PACE_MAX_IP_BYTES - maxseg; - + if (new_tso != bbr->r_ctl.rc_pace_max_segs) { bbr_log_type_tsosize(bbr, cts, new_tso, 0, bbr->r_ctl.rc_pace_max_segs, maxseg, 0); bbr->r_ctl.rc_pace_max_segs = new_tso; @@ -5778,7 +5778,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t c uint32_t old_tso = 0, new_tso; uint32_t maxseg, bytes; uint32_t tls_seg=0; - /* + /* * Google/linux uses the following algorithm to determine * the TSO size based on the b/w of the link (from Neal Cardwell email 9/27/18): * @@ -5791,7 +5791,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t c * min_tso_segs = 2 * tso_segs = max(tso_segs, min_tso_segs) * - * * Note apply a device specific limit (we apply this in the + * * Note apply a device specific limit (we apply this in the * tcp_m_copym). * Note that before the initial measurement is made google bursts out * a full iwnd just like new-reno/cubic. @@ -5824,7 +5824,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t c * Note the default per-tcb-divisor is 1000 (same as google). * the goal cross over is 30Mbps however. To recreate googles * algorithm you need to set: - * + * * cross-over = 23,168,000 bps * goal-time = 18000 * per-tcb-max = 2 @@ -5898,7 +5898,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t c new_tso = maxseg; } else if (bbr->rc_use_google) { int min_tso_segs; - + /* Google considers the gain too */ if (bbr->r_ctl.rc_bbr_hptsi_gain != BBR_UNIT) { bw *= bbr->r_ctl.rc_bbr_hptsi_gain; @@ -5984,7 +5984,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t c } #ifdef KERN_TLS if (tls_seg) { - /* + /* * Lets move the output size * up to 1 or more TLS record sizes. */ @@ -6116,7 +6116,7 @@ again: rsm->r_first_sent_time = bbr_get_earliest_send_outstanding(bbr, rsm, cts); rsm->r_flight_at_send = ctf_flight_size(bbr->rc_tp, (bbr->r_ctl.rc_sacked + bbr->r_ctl.rc_lost_bytes)); - /* + /* * Here we must also add in this rsm since snd_max * is updated after we return from a new send. */ @@ -6274,7 +6274,7 @@ bbr_make_timestamp_determination(struct tcp_bbr *bbr) * And the peer's time between receiving them by doing: * * peer_delta = bbr->r_ctl.last_inbound_ts - bbr->r_ctl.bbr_ts_check_tstmp - * + * * We want to figure out if the timestamp values are in msec, 10msec or usec. * We also may find that we can't use the timestamps if say we see * that the peer_delta indicates that though we may have taken 10ms to @@ -6290,11 +6290,11 @@ bbr_make_timestamp_determination(struct tcp_bbr *bbr) * put a 1 there. If the value is faster then ours, we will disable the * use of timestamps (though we could revist this later if we find it to be not * just an isolated one or two flows)). - * + * * To detect the batching middle boxes we will come up with our compensation and * if with it in place, we find the peer is drastically off (by some margin) in * the smaller direction, then we will assume the worst case and disable use of timestamps. - * + * */ uint64_t delta, peer_delta, delta_up; @@ -6327,7 +6327,7 @@ bbr_make_timestamp_determination(struct tcp_bbr *bbr) /* Very unlikely, the peer without * compensation shows that it saw * the two sends arrive further apart - * then we saw then in micro-seconds. + * then we saw then in micro-seconds. */ if (peer_delta < (delta + ((delta * (uint64_t)1000)/ (uint64_t)bbr_delta_percent))) { /* well it looks like the peer is a micro-second clock. */ @@ -6352,7 +6352,7 @@ bbr_make_timestamp_determination(struct tcp_bbr *bbr) /* Ok if not usec, what about 10usec (though unlikely)? */ delta_up = (peer_delta * 1000 * 10) / (uint64_t)bbr_delta_percent; if (((peer_delta * 10) + delta_up) >= delta) { - bbr->r_ctl.bbr_peer_tsratio = 10; + bbr->r_ctl.bbr_peer_tsratio = 10; bbr_log_tstmp_validation(bbr, peer_delta, delta); return; } @@ -6401,7 +6401,7 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct rtt = bbr->r_ctl.cur_rtt; tsin = bbr->r_ctl.ts_in; if (bbr->rc_prtt_set_ts) { - /* + /* * We are to force feed the rttProp filter due * to an entry into PROBE_RTT. This assures * that the times are sync'd between when we @@ -6413,13 +6413,13 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct * value to the newest rtt. */ uint32_t rtt_prop; - + bbr->rc_prtt_set_ts = 0; rtt_prop = get_filter_value_small(&bbr->r_ctl.rc_rttprop); if (rtt > rtt_prop) filter_increase_by_small(&bbr->r_ctl.rc_rttprop, (rtt - rtt_prop), cts); else - apply_filter_min_small(&bbr->r_ctl.rc_rttprop, rtt, cts); + apply_filter_min_small(&bbr->r_ctl.rc_rttprop, rtt, cts); } if (bbr->rc_ack_was_delayed) rtt += bbr->r_ctl.rc_ack_hdwr_delay; @@ -6453,8 +6453,8 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct bbr->r_ctl.bbr_ts_check_our_cts = bbr->r_ctl.cur_rtt_send_time; } } else { - /* - * We have to have consecutive acks + /* + * We have to have consecutive acks * reset any "filled" state to none. */ bbr->rc_ts_data_set = 0; @@ -6573,7 +6573,7 @@ bbr_earlier_retran(struct tcpcb *tp, struct tcp_bbr *b */ return; } - + if (rsm->r_flags & BBR_WAS_SACKPASS) { /* * We retransmitted based on a sack and the earlier @@ -6586,7 +6586,7 @@ bbr_earlier_retran(struct tcpcb *tp, struct tcp_bbr *b if (rsm->r_flags & BBR_MARKED_LOST) { bbr->r_ctl.rc_lost -= rsm->r_end - rsm->r_start; bbr->r_ctl.rc_lost_bytes -= rsm->r_end - rsm->r_start; - rsm->r_flags &= ~BBR_MARKED_LOST; + rsm->r_flags &= ~BBR_MARKED_LOST; if (SEQ_GT(bbr->r_ctl.rc_lt_lost, bbr->r_ctl.rc_lost)) /* LT sampling also needs adjustment */ bbr->r_ctl.rc_lt_lost = bbr->r_ctl.rc_lost; @@ -6607,8 +6607,8 @@ bbr_set_reduced_rtt(struct tcp_bbr *bbr, uint32_t cts, if (bbr_can_force_probertt && (TSTMP_GT(cts, bbr->r_ctl.last_in_probertt)) && ((cts - bbr->r_ctl.last_in_probertt) > bbr->r_ctl.rc_probertt_int)) { - /* - * We should enter probe-rtt its been too long + /* + * We should enter probe-rtt its been too long * since we have been there. */ bbr_enter_probe_rtt(bbr, cts, __LINE__); @@ -6666,7 +6666,7 @@ bbr_nf_measurement(struct tcp_bbr *bbr, struct bbr_sen tim = (uint64_t)(bbr->r_ctl.rc_del_time - rsm->r_del_time); else tim = 1; - /* + /* * Now that we have processed the tim (skipping the sample * or possibly updating the time, go ahead and * calculate the cdr. @@ -6681,7 +6681,7 @@ bbr_nf_measurement(struct tcp_bbr *bbr, struct bbr_sen } upper = (bw >> 32) & 0x00000000ffffffff; lower = bw & 0x00000000ffffffff; - /* + /* * If we are using this b/w shove it in now so we * can see in the trace viewer if it gets over-ridden. */ @@ -6783,7 +6783,7 @@ bbr_google_measurement(struct tcp_bbr *bbr, struct bbr tim = (uint64_t)(bbr->r_ctl.rc_del_time - rsm->r_del_time); else tim = 1; - /* + /* * Now that we have processed the tim (skipping the sample * or possibly updating the time, go ahead and * calculate the cdr. @@ -6800,7 +6800,7 @@ bbr_google_measurement(struct tcp_bbr *bbr, struct bbr } upper = (bw >> 32) & 0x00000000ffffffff; lower = bw & 0x00000000ffffffff; - /* + /* * If we are using this b/w shove it in now so we * can see in the trace viewer if it gets over-ridden. */ @@ -6900,7 +6900,7 @@ bbr_update_bbr_info(struct tcp_bbr *bbr, struct bbr_se else bbr->rc_ack_is_cumack = 0; old_rttprop = bbr_get_rtt(bbr, BBR_RTT_PROP); - /* + /* * Note the following code differs to the original * BBR spec. It calls for <= not <. However after a * long discussion in email with Neal, he acknowledged @@ -6932,7 +6932,7 @@ bbr_update_bbr_info(struct tcp_bbr *bbr, struct bbr_se } if ((bbr->rc_use_google == 0) && (match == BBR_RTT_BY_TIMESTAMP)) { - /* + /* * We don't do b/w update with * these since they are not really * reliable. @@ -7137,7 +7137,7 @@ bbr_log_sack_passed(struct tcpcb *tp, continue; } if (nrsm->r_flags & BBR_SACK_PASSED) { - /* + /* * We found one that is already marked * passed, we have been here before and * so all others below this are marked. @@ -7240,7 +7240,7 @@ do_rest_ofb: /* * Need to split this in two pieces the before and after. */ - if (bbr_sack_mergable(rsm, start, end)) + if (bbr_sack_mergable(rsm, start, end)) nrsm = bbr_alloc_full_limit(bbr); else nrsm = bbr_alloc_limit(bbr, BBR_LIMIT_TYPE_SPLIT); @@ -7310,7 +7310,7 @@ do_rest_ofb: goto out; } /* Ok we need to split off this one at the tail */ - if (bbr_sack_mergable(rsm, start, end)) + if (bbr_sack_mergable(rsm, start, end)) nrsm = bbr_alloc_full_limit(bbr); else nrsm = bbr_alloc_limit(bbr, BBR_LIMIT_TYPE_SPLIT); @@ -7360,7 +7360,7 @@ do_rest_ofb: } out: if (rsm && (rsm->r_flags & BBR_ACKED)) { - /* + /* * Now can we merge this newly acked * block with either the previous or * next block? @@ -7462,7 +7462,7 @@ bbr_log_syn(struct tcpcb *tp, struct tcpopt *to) struct tcp_bbr *bbr; struct bbr_sendmap *rsm; uint32_t cts; - + bbr = (struct tcp_bbr *)tp->t_fb_ptr; cts = bbr->r_ctl.rc_rcvtime; rsm = TAILQ_FIRST(&bbr->r_ctl.rc_map); @@ -7526,7 +7526,7 @@ bbr_log_ack(struct tcpcb *tp, struct tcpopt *to, struc acked = th_ack - tp->snd_una; bbr_log_progress_event(bbr, tp, ticks, PROGRESS_UPDATE, __LINE__); bbr->rc_tp->t_acktime = ticks; - } else + } else acked = 0; if (SEQ_LEQ(th_ack, tp->snd_una)) { /* Only sent here for sack processing */ @@ -7601,7 +7601,7 @@ more: /* None here to ack */ goto proc_sack; } - /* + /* * Clear the dup ack counter, it will * either be freed or if there is some * remaining we need to start it at zero. @@ -7686,8 +7686,8 @@ more: } if ((rsm->r_flags & BBR_MARKED_LOST) && ((rsm->r_flags & BBR_ACKED) == 0)) { - /* - * It was marked lost and partly ack'd now + /* + * It was marked lost and partly ack'd now * for the first time. We lower the rc_lost_bytes * and still leave it MARKED. */ @@ -8030,7 +8030,7 @@ nothing_left: } sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una); bbr_log_ack_clear(bbr, bbr->r_ctl.rc_rcvtime); - /* + /* * We invalidate the last ack here since we * don't want to transfer forward the time * for our sum's calculations. @@ -8092,11 +8092,11 @@ bbr_restart_after_idle(struct tcp_bbr *bbr, uint32_t c * Note that if idle time does not exceed our * threshold, we do nothing continuing the state * transitions we were last walking through. - */ + */ if (idle_time >= bbr_idle_restart_threshold) { if (bbr->rc_use_idle_restart) { bbr->rc_bbr_state = BBR_STATE_IDLE_EXIT; - /* + /* * Set our target using BBR_UNIT, so * we increase at a dramatic rate but * we stop when we get the pipe @@ -8127,7 +8127,7 @@ bbr_exit_persist(struct tcpcb *tp, struct tcp_bbr *bbr bbr->rc_hit_state_1 = 0; tp->t_flags &= ~TF_FORCEDATA; bbr->r_ctl.rc_del_time = cts; - /* + /* * We invalidate the last ack here since we * don't want to transfer forward the time * for our sum's calculations. @@ -8167,7 +8167,7 @@ bbr_exit_persist(struct tcpcb *tp, struct tcp_bbr *bbr bbr->r_ctl.rc_bbr_state_time = cts; if ((bbr->rc_bbr_state == BBR_STATE_PROBE_BW) || (bbr->rc_bbr_state == BBR_STATE_PROBE_RTT)) { - /* + /* * If we are going back to probe-bw * or probe_rtt, we may need to possibly * do a fast restart. @@ -8181,7 +8181,7 @@ bbr_collapsed_window(struct tcp_bbr *bbr) { /* * Now we must walk the - * send map and divide the + * send map and divide the * ones left stranded. These * guys can't cause us to abort * the connection and are really @@ -8192,7 +8192,7 @@ bbr_collapsed_window(struct tcp_bbr *bbr) * the win and acked that data. We would * get into an ack war, the simplier * method then of just pretending we - * did not send those segments something + * did not send those segments something * won't work. */ struct bbr_sendmap *rsm, *nrsm; @@ -8219,8 +8219,8 @@ bbr_collapsed_window(struct tcp_bbr *bbr) /* Nothing to do strange */ return; } - /* - * Now can we split? + /* + * Now can we split? * * We don't want to split if splitting * would generate too many small segments @@ -8271,7 +8271,7 @@ bbr_collapsed_window(struct tcp_bbr *bbr) nrsm->r_in_tmap = 1; } } else { - /* + /* * Split not allowed just start here just * use this guy. */ @@ -8294,7 +8294,7 @@ bbr_un_collapse_window(struct tcp_bbr *bbr) { struct bbr_sendmap *rsm; int cleared = 0; - + TAILQ_FOREACH_REVERSE(rsm, &bbr->r_ctl.rc_map, bbr_head, r_next) { if (rsm->r_flags & BBR_RWND_COLLAPSED) { /* Clear the flag */ @@ -8843,7 +8843,7 @@ bbr_fastack(struct mbuf *m, struct tcphdr *th, struct /* Ok if we reach here, we can process a fast-ack */ nsegs = max(1, m->m_pkthdr.lro_nsegs); sack_changed = bbr_log_ack(tp, to, th, &prev_acked); - /* + /* * We never detect loss in fast ack [we can't * have a sack and can't be in recovery so * we always pass 0 (nothing detected)]. @@ -8959,7 +8959,7 @@ bbr_fastack(struct mbuf *m, struct tcphdr *th, struct } sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una); bbr_log_ack_clear(bbr, bbr->r_ctl.rc_rcvtime); - /* + /* * We invalidate the last ack here since we * don't want to transfer forward the time * for our sum's calculations. @@ -9060,19 +9060,19 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, str tp->t_flags |= TF_ACKNOW; } if (SEQ_GT(th->th_ack, tp->iss)) { - /* + /* * The SYN is acked * handle it specially. */ bbr_log_syn(tp, to); } if (SEQ_GT(th->th_ack, tp->snd_una)) { - /* - * We advance snd_una for the + /* + * We advance snd_una for the * fast open case. If th_ack is - * acknowledging data beyond + * acknowledging data beyond * snd_una we can't just call - * ack-processing since the + * ack-processing since the * data stream in our send-map * will start at snd_una + 1 (one * beyond the SYN). If its just @@ -9133,7 +9133,7 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, str if (thflags & TH_ACK) { if ((to->to_flags & TOF_TS) != 0) { uint32_t t, rtt; - + t = tcp_tv_to_mssectick(&bbr->rc_tv); if (TSTMP_GEQ(t, to->to_tsecr)) { rtt = t - to->to_tsecr; @@ -9316,7 +9316,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str if (thflags & TH_ACK) bbr_log_syn(tp, to); if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { - + tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; /* @@ -10260,7 +10260,7 @@ bbr_init(struct tcpcb *tp) bbr->rc_use_ts_limit = 1; else bbr->rc_use_ts_limit = 0; - if (bbr_ts_can_raise) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 12 13:04:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C61F2237F3E; Wed, 12 Feb 2020 13:04:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hfwz4qG1z4N36; Wed, 12 Feb 2020 13:04:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0A4D21916; Wed, 12 Feb 2020 13:04:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CD4JNH051423; Wed, 12 Feb 2020 13:04:19 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CD4JvF051422; Wed, 12 Feb 2020 13:04:19 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121304.01CD4JvF051422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 13:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357816 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 13:04:19 -0000 Author: rrs Date: Wed Feb 12 13:04:19 2020 New Revision: 357816 URL: https://svnweb.freebsd.org/changeset/base/357816 Log: This small fix makes it so we properly follow the RFC and only enable ECN when both the CWR and ECT bits our set within the SYN packet. Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D23645 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Feb 12 12:40:06 2020 (r357815) +++ head/sys/netinet/tcp_syncache.c Wed Feb 12 13:04:19 2020 (r357816) @@ -1668,7 +1668,8 @@ skip_alloc: sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */ if (ltflags & TF_NOOPT) sc->sc_flags |= SCF_NOOPT; - if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) + if (((th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) && + V_tcp_do_ecn) sc->sc_flags |= SCF_ECN; if (V_tcp_syncookies) From owner-svn-src-all@freebsd.org Wed Feb 12 13:07:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 103B5238004; Wed, 12 Feb 2020 13:07:10 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hg0G02NVz4NDM; Wed, 12 Feb 2020 13:07:10 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D196D21946; Wed, 12 Feb 2020 13:07:09 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CD790B051600; Wed, 12 Feb 2020 13:07:09 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CD7910051598; Wed, 12 Feb 2020 13:07:09 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121307.01CD7910051598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 13:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357817 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 13:07:10 -0000 Author: rrs Date: Wed Feb 12 13:07:09 2020 New Revision: 357817 URL: https://svnweb.freebsd.org/changeset/base/357817 Log: Whitespace, remove from three files trailing white space (leftover presents from emacs). Sponsored by: Netflix Inc. Modified: head/sys/netinet/tcp_hpts.c head/sys/netinet/tcp_hpts.h head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/tcp_hpts.c ============================================================================== --- head/sys/netinet/tcp_hpts.c Wed Feb 12 13:04:19 2020 (r357816) +++ head/sys/netinet/tcp_hpts.c Wed Feb 12 13:07:09 2020 (r357817) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); * Some notes about usage. * * The tcp_hpts system is designed to provide a high precision timer - * system for tcp. Its main purpose is to provide a mechanism for + * system for tcp. Its main purpose is to provide a mechanism for * pacing packets out onto the wire. It can be used in two ways * by a given TCP stack (and those two methods can be used simultaneously). * @@ -59,22 +59,22 @@ __FBSDID("$FreeBSD$"); * to prevent output processing until the time alotted has gone by. * Of course this is a bare bones example and the stack will probably * have more consideration then just the above. - * + * * Now the second function (actually two functions I guess :D) - * the tcp_hpts system provides is the ability to either abort - * a connection (later) or process input on a connection. + * the tcp_hpts system provides is the ability to either abort + * a connection (later) or process input on a connection. * Why would you want to do this? To keep processor locality * and or not have to worry about untangling any recursive * locks. The input function now is hooked to the new LRO - * system as well. + * system as well. * * In order to use the input redirection function the - * tcp stack must define an input function for + * tcp stack must define an input function for * tfb_do_queued_segments(). This function understands * how to dequeue a array of packets that were input and - * knows how to call the correct processing routine. + * knows how to call the correct processing routine. * - * Locking in this is important as well so most likely the + * Locking in this is important as well so most likely the * stack will need to define the tfb_do_segment_nounlock() * splitting tfb_do_segment() into two parts. The main processing * part that does not unlock the INP and returns a value of 1 or 0. @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); * The remains of tfb_do_segment() then become just a simple call * to the tfb_do_segment_nounlock() function and check the return * code and possibly unlock. - * + * * The stack must also set the flag on the INP that it supports this * feature i.e. INP_SUPPORTS_MBUFQ. The LRO code recoginizes * this flag as well and will queue packets when it is set. @@ -99,11 +99,11 @@ __FBSDID("$FreeBSD$"); * * There is a common functions within the rack_bbr_common code * version i.e. ctf_do_queued_segments(). This function - * knows how to take the input queue of packets from - * tp->t_in_pkts and process them digging out - * all the arguments, calling any bpf tap and + * knows how to take the input queue of packets from + * tp->t_in_pkts and process them digging out + * all the arguments, calling any bpf tap and * calling into tfb_do_segment_nounlock(). The common - * function (ctf_do_queued_segments()) requires that + * function (ctf_do_queued_segments()) requires that * you have defined the tfb_do_segment_nounlock() as * described above. * @@ -113,9 +113,9 @@ __FBSDID("$FreeBSD$"); * a stack wants to drop a connection it calls: * * tcp_set_inp_to_drop(tp, ETIMEDOUT) - * - * To schedule the tcp_hpts system to call - * + * + * To schedule the tcp_hpts system to call + * * tcp_drop(tp, drop_reason) * * at a future point. This is quite handy to prevent locking @@ -284,7 +284,7 @@ sysctl_net_inet_tcp_hpts_max_sleep(SYSCTL_HANDLER_ARGS error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if ((new < (NUM_OF_HPTSI_SLOTS / 4)) || - (new > HPTS_MAX_SLEEP_ALLOWED)) + (new > HPTS_MAX_SLEEP_ALLOWED)) error = EINVAL; else hpts_sleep_max = new; @@ -311,7 +311,7 @@ tcp_hpts_log(struct tcp_hpts_entry *hpts, struct tcpcb int ticks_to_run, int idx) { union tcp_log_stackspecific log; - + memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.flex1 = hpts->p_nxt_slot; log.u_bbr.flex2 = hpts->p_cur_slot; @@ -616,7 +616,7 @@ tcp_hpts_remove_locked_input(struct tcp_hpts_entry *hp * Valid values in the flags are * HPTS_REMOVE_OUTPUT - remove from the output of the hpts. * HPTS_REMOVE_INPUT - remove from the input of the hpts. - * Note that you can use one or both values together + * Note that you can use one or both values together * and get two actions. */ void @@ -651,7 +651,7 @@ hpts_tick(uint32_t wheel_tick, uint32_t plus) static inline int tick_to_wheel(uint32_t cts_in_wticks) { - /* + /* * Given a timestamp in wheel ticks (10usec inc's) * map it to our limited space wheel. */ @@ -668,8 +668,8 @@ hpts_ticks_diff(int prev_tick, int tick_now) if (tick_now > prev_tick) return (tick_now - prev_tick); else if (tick_now == prev_tick) - /* - * Special case, same means we can go all of our + /* + * Special case, same means we can go all of our * wheel less one slot. */ return (NUM_OF_HPTSI_SLOTS - 1); @@ -686,7 +686,7 @@ hpts_ticks_diff(int prev_tick, int tick_now) * a uint32_t *, fill it with the tick location. * * Note if you do not give this function the current - * time (that you think it is) mapped to the wheel + * time (that you think it is) mapped to the wheel * then the results will not be what you expect and * could lead to invalid inserts. */ @@ -721,8 +721,8 @@ max_ticks_available(struct tcp_hpts_entry *hpts, uint3 end_tick--; if (target_tick) *target_tick = end_tick; - /* - * Now we have close to the full wheel left minus the + /* + * Now we have close to the full wheel left minus the * time it has been since the pacer went to sleep. Note * that wheel_tick, passed in, should be the current time * from the perspective of the caller, mapped to the wheel. @@ -731,18 +731,18 @@ max_ticks_available(struct tcp_hpts_entry *hpts, uint3 dis_to_travel = hpts_ticks_diff(hpts->p_prev_slot, wheel_tick); else dis_to_travel = 1; - /* - * dis_to_travel in this case is the space from when the - * pacer stopped (p_prev_slot) and where our wheel_tick - * is now. To know how many slots we can put it in we + /* + * dis_to_travel in this case is the space from when the + * pacer stopped (p_prev_slot) and where our wheel_tick + * is now. To know how many slots we can put it in we * subtract from the wheel size. We would not want * to place something after p_prev_slot or it will * get ran too soon. */ return (NUM_OF_HPTSI_SLOTS - dis_to_travel); } - /* - * So how many slots are open between p_runningtick -> p_cur_slot + /* + * So how many slots are open between p_runningtick -> p_cur_slot * that is what is currently un-available for insertion. Special * case when we are at the last slot, this gets 1, so that * the answer to how many slots are available is all but 1. @@ -751,7 +751,7 @@ max_ticks_available(struct tcp_hpts_entry *hpts, uint3 dis_to_travel = 1; else dis_to_travel = hpts_ticks_diff(hpts->p_runningtick, hpts->p_cur_slot); - /* + /* * How long has the pacer been running? */ if (hpts->p_cur_slot != wheel_tick) { @@ -761,19 +761,19 @@ max_ticks_available(struct tcp_hpts_entry *hpts, uint3 /* The pacer is right on time, now == pacers start time */ pacer_to_now = 0; } - /* + /* * To get the number left we can insert into we simply * subract the distance the pacer has to run from how * many slots there are. */ avail_on_wheel = NUM_OF_HPTSI_SLOTS - dis_to_travel; - /* - * Now how many of those we will eat due to the pacer's - * time (p_cur_slot) of start being behind the + /* + * Now how many of those we will eat due to the pacer's + * time (p_cur_slot) of start being behind the * real time (wheel_tick)? */ if (avail_on_wheel <= pacer_to_now) { - /* + /* * Wheel wrap, we can't fit on the wheel, that * is unusual the system must be way overloaded! * Insert into the assured tick, and return special @@ -783,7 +783,7 @@ max_ticks_available(struct tcp_hpts_entry *hpts, uint3 *target_tick = hpts->p_nxt_slot; return (0); } else { - /* + /* * We know how many slots are open * on the wheel (the reverse of what * is left to run. Take away the time @@ -800,7 +800,7 @@ static int tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line, int32_t noref) { uint32_t need_wake = 0; - + HPTS_MTX_ASSERT(hpts); if (inp->inp_in_hpts == 0) { /* Ok we need to set it on the hpts in the current slot */ @@ -808,7 +808,7 @@ tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, if ((hpts->p_hpts_active == 0) || (hpts->p_wheel_complete)) { /* - * A sleeping hpts we want in next slot to run + * A sleeping hpts we want in next slot to run * note that in this state p_prev_slot == p_cur_slot */ inp->inp_hptsslot = hpts_tick(hpts->p_prev_slot, 1); @@ -817,7 +817,7 @@ tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, } else if ((void *)inp == hpts->p_inp) { /* * The hpts system is running and the caller - * was awoken by the hpts system. + * was awoken by the hpts system. * We can't allow you to go into the same slot we * are in (we don't want a loop :-D). */ @@ -855,7 +855,7 @@ static void check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t inp_hptsslot, int line) { /* - * Sanity checks for the pacer with invariants + * Sanity checks for the pacer with invariants * on insert. */ if (inp_hptsslot >= NUM_OF_HPTSI_SLOTS) @@ -863,7 +863,7 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hp hpts, inp, inp_hptsslot); if ((hpts->p_hpts_active) && (hpts->p_wheel_complete == 0)) { - /* + /* * If the pacer is processing a arc * of the wheel, we need to make * sure we are not inserting within @@ -929,7 +929,7 @@ tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, st if (maxticks == 0) { /* The pacer is in a wheel wrap behind, yikes! */ if (slot > 1) { - /* + /* * Reduce by 1 to prevent a forever loop in * case something else is wrong. Note this * probably does not hurt because the pacer @@ -1178,7 +1178,7 @@ hpts_cpuid(struct inpcb *inp){ * unknown cpuids to curcpu. Not the best, but apparently better * than defaulting to swi 0. */ - + if (inp->inp_flowtype == M_HASHTYPE_NONE) return (hpts_random_cpu(inp)); /* @@ -1201,7 +1201,7 @@ static void tcp_drop_in_pkts(struct tcpcb *tp) { struct mbuf *m, *n; - + m = tp->t_in_pkt; if (m) n = m->m_nextpkt; @@ -1327,8 +1327,8 @@ out: INP_WLOCK(inp); } } else if (tp->t_in_pkt) { - /* - * We reach here only if we had a + /* + * We reach here only if we had a * stack that supported INP_SUPPORTS_MBUFQ * and then somehow switched to a stack that * does not. The packets are basically stranded @@ -1380,8 +1380,8 @@ tcp_hptsi(struct tcp_hpts_entry *hpts) hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); if ((hpts->p_on_queue_cnt == 0) || (hpts->p_lasttick == hpts->p_curtick)) { - /* - * No time has yet passed, + /* + * No time has yet passed, * or nothing to do. */ hpts->p_prev_slot = hpts->p_cur_slot; @@ -1394,7 +1394,7 @@ again: ticks_to_run = hpts_ticks_diff(hpts->p_prev_slot, hpts->p_cur_slot); if (((hpts->p_curtick - hpts->p_lasttick) > ticks_to_run) && (hpts->p_on_queue_cnt != 0)) { - /* + /* * Wheel wrap is occuring, basically we * are behind and the distance between * run's has spread so much it has exceeded @@ -1413,7 +1413,7 @@ again: wrap_loop_cnt++; hpts->p_nxt_slot = hpts_tick(hpts->p_prev_slot, 1); hpts->p_runningtick = hpts_tick(hpts->p_prev_slot, 2); - /* + /* * Adjust p_cur_slot to be where we are starting from * hopefully we will catch up (fat chance if something * is broken this bad :( ) @@ -1427,7 +1427,7 @@ again: * put behind) does not really matter in this situation. */ #ifdef INVARIANTS - /* + /* * To prevent a panic we need to update the inpslot to the * new location. This is safe since it takes both the * INP lock and the pacer mutex to change the inp_hptsslot. @@ -1441,7 +1441,7 @@ again: ticks_to_run = NUM_OF_HPTSI_SLOTS - 1; counter_u64_add(wheel_wrap, 1); } else { - /* + /* * Nxt slot is always one after p_runningtick though * its not used usually unless we are doing wheel wrap. */ @@ -1492,12 +1492,12 @@ again: if (inp->inp_hpts_request) { /* * This guy is deferred out further in time - * then our wheel had available on it. + * then our wheel had available on it. * Push him back on the wheel or run it * depending. */ uint32_t maxticks, last_tick, remaining_slots; - + remaining_slots = ticks_to_run - (i + 1); if (inp->inp_hpts_request > remaining_slots) { /* @@ -1521,7 +1521,7 @@ again: /* Fall through we will so do it now */ } /* - * We clear the hpts flag here after dealing with + * We clear the hpts flag here after dealing with * remaining slots. This way anyone looking with the * TCB lock will see its on the hpts until just * before we unlock. @@ -1680,7 +1680,7 @@ no_one: #endif hpts->p_prev_slot = hpts->p_cur_slot; hpts->p_lasttick = hpts->p_curtick; - if (loop_cnt > max_pacer_loops) { + if (loop_cnt > max_pacer_loops) { /* * Something is serious slow we have * looped through processing the wheel @@ -1691,7 +1691,7 @@ no_one: * can never catch up :( * * We will just lie to this thread - * and let it thing p_curtick is + * and let it thing p_curtick is * correct. When it next awakens * it will find itself further behind. */ @@ -1713,7 +1713,7 @@ no_run: * input. */ hpts->p_wheel_complete = 1; - /* + /* * Run any input that may be there not covered * in running data. */ Modified: head/sys/netinet/tcp_hpts.h ============================================================================== --- head/sys/netinet/tcp_hpts.h Wed Feb 12 13:04:19 2020 (r357816) +++ head/sys/netinet/tcp_hpts.h Wed Feb 12 13:07:09 2020 (r357817) @@ -102,7 +102,7 @@ struct tcp_hpts_entry { uint32_t p_lasttick; /* Last tick before the current one */ uint8_t p_direct_wake :1, /* boolean */ p_on_min_sleep:1, /* boolean */ - p_avail:6; + p_avail:6; uint8_t p_fill[3]; /* Fill to 32 bits */ /* Cache line 0x40 */ void *p_inp; Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Feb 12 13:04:19 2020 (r357816) +++ head/sys/netinet/tcp_ratelimit.c Wed Feb 12 13:07:09 2020 (r357817) @@ -372,7 +372,7 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) struct if_ratelimit_query_results rl; struct sysctl_oid *rl_sysctl_root; /* - * We expect to enter with the + * We expect to enter with the * mutex locked. */ @@ -392,8 +392,8 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) rl.flags = RT_NOSUPPORT; ifp->if_ratelimit_query(ifp, &rl); if (rl.flags & RT_IS_UNUSABLE) { - /* - * The interface does not really support + /* + * The interface does not really support * the rate-limiting. */ memset(rs, 0, sizeof(struct tcp_rate_set)); From owner-svn-src-all@freebsd.org Wed Feb 12 13:31:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58D052385F7; Wed, 12 Feb 2020 13:31:43 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HgXb21Mnz4Phn; Wed, 12 Feb 2020 13:31:43 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4009421EBF; Wed, 12 Feb 2020 13:31:43 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CDVhpu065591; Wed, 12 Feb 2020 13:31:43 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CDVa0p065558; Wed, 12 Feb 2020 13:31:36 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121331.01CDVa0p065558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 13:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357818 - in head/sys/netinet: . cc X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys/netinet: . cc X-SVN-Commit-Revision: 357818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 13:31:43 -0000 Author: rrs Date: Wed Feb 12 13:31:36 2020 New Revision: 357818 URL: https://svnweb.freebsd.org/changeset/base/357818 Log: White space cleanup -- remove trailing tab's or spaces from any line. Sponsored by: Netflix Inc. Modified: head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_dctcp.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/icmp6.h head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in.h head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/in_proto.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_dummynet.h head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_fw.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_id.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_reass.c head/sys/netinet/raw_ip.c head/sys/netinet/siftr.c head/sys/netinet/tcp.h head/sys/netinet/tcp_fastopen.c head/sys/netinet/tcp_fsm.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_log_buf.c head/sys/netinet/tcp_log_buf.h head/sys/netinet/tcp_lro.c head/sys/netinet/tcp_lro.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_ratelimit.c head/sys/netinet/tcp_ratelimit.h head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet/udplite.h Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/cc/cc_cdg.c Wed Feb 12 13:31:36 2020 (r357818) @@ -607,7 +607,7 @@ cdg_ack_received(struct cc_var *ccv, uint16_t ack_type congestion = prob_backoff(qdiff_max); else if (cdg_data->max_qtrend > 0) congestion = prob_backoff(cdg_data->max_qtrend); - + /* Update estimate of queue state. */ if (cdg_data->min_qtrend > 0 && cdg_data->max_qtrend <= 0) { Modified: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- head/sys/netinet/cc/cc_dctcp.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/cc/cc_dctcp.c Wed Feb 12 13:31:36 2020 (r357818) @@ -274,9 +274,9 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) dctcp_data->bytes_total = 0; dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); } else - CCV(ccv, snd_ssthresh) = + CCV(ccv, snd_ssthresh) = max((cwin - (((uint64_t)cwin * - dctcp_data->alpha) >> (DCTCP_SHIFT+1))), + dctcp_data->alpha) >> (DCTCP_SHIFT+1))), 2 * mss); CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); Modified: head/sys/netinet/cc/cc_htcp.c ============================================================================== --- head/sys/netinet/cc/cc_htcp.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/cc/cc_htcp.c Wed Feb 12 13:31:36 2020 (r357818) @@ -364,7 +364,7 @@ htcp_post_recovery(struct cc_var *ccv) pipe = tcp_compute_pipe(ccv->ccvc.tcp); else pipe = CCV(ccv, snd_max) - ccv->curack; - + if (pipe < CCV(ccv, snd_ssthresh)) /* * Ensure that cwnd down not collape to 1 MSS under Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/icmp6.h Wed Feb 12 13:31:36 2020 (r357818) @@ -344,7 +344,7 @@ struct nd_opt_mtu { /* MTU option */ #define ND_OPT_NONCE_LEN ((1 * 8) - 2) #if ((ND_OPT_NONCE_LEN + 2) % 8) != 0 #error "(ND_OPT_NONCE_LEN + 2) must be a multiple of 8." -#endif +#endif struct nd_opt_nonce { /* nonce option */ u_int8_t nd_opt_nonce_type; u_int8_t nd_opt_nonce_len; @@ -607,7 +607,7 @@ struct icmp6stat { * for netinet6 code, it is already available in icp6s_outhist[]. */ uint64_t icp6s_reflect; - uint64_t icp6s_inhist[256]; + uint64_t icp6s_inhist[256]; uint64_t icp6s_nd_toomanyopt; /* too many ND options */ struct icmp6errstat icp6s_outerrhist; #define icp6s_odst_unreach_noroute \ Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/if_ether.c Wed Feb 12 13:31:36 2020 (r357818) @@ -211,7 +211,7 @@ arptimer(void *arg) LLE_WLOCK(lle); if (callout_pending(&lle->lle_timer)) { /* - * Here we are a bit odd here in the treatment of + * Here we are a bit odd here in the treatment of * active/pending. If the pending bit is set, it got * rescheduled before I ran. The active * bit we ignore, since if it was stopped @@ -709,7 +709,7 @@ arpintr(struct mbuf *m) layer = "ethernet"; break; case ARPHRD_INFINIBAND: - hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ + hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ layer = "infiniband"; break; case ARPHRD_IEEE1394: Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/igmp.c Wed Feb 12 13:31:36 2020 (r357818) @@ -877,7 +877,7 @@ out_locked: * We may be updating the group for the first time since we switched * to IGMPv3. If we are, then we must clear any recorded source lists, * and transition to REPORTING state; the group timer is overloaded - * for group and group-source query responses. + * for group and group-source query responses. * * Unlike IGMPv3, the delay per group should be jittered * to avoid bursts of IGMPv2 reports. @@ -2324,7 +2324,7 @@ igmp_initial_join(struct in_multi *inm, struct igmp_if struct ifnet *ifp; struct mbufq *mq; int error, retval, syncstates; - + CTR4(KTR_IGMPV3, "%s: initial join 0x%08x on ifp %p(%s)", __func__, ntohl(inm->inm_addr.s_addr), inm->inm_ifp, inm->inm_ifp->if_xname); Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in.c Wed Feb 12 13:31:36 2020 (r357818) @@ -820,11 +820,11 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) if ((target->ia_flags & IFA_ROUTE) == 0) { int fibnum; - + fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); - + /* * Removing address from !IFF_UP interface or * prefix which exists on other interface (along with route). Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in.h Wed Feb 12 13:31:36 2020 (r357818) @@ -323,8 +323,8 @@ __END_DECLS * Default local port range, used by IP_PORTRANGE_DEFAULT */ #define IPPORT_EPHEMERALFIRST 10000 -#define IPPORT_EPHEMERALLAST 65535 - +#define IPPORT_EPHEMERALLAST 65535 + /* * Dynamic port range, used by IP_PORTRANGE_HIGH. */ @@ -381,7 +381,7 @@ __END_DECLS (((in_addr_t)(i) & 0xffff0000) == 0xc0a80000)) #define IN_LOCAL_GROUP(i) (((in_addr_t)(i) & 0xffffff00) == 0xe0000000) - + #define IN_ANY_LOCAL(i) (IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i)) #define INADDR_LOOPBACK ((in_addr_t)0x7f000001) Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in_mcast.c Wed Feb 12 13:31:36 2020 (r357818) @@ -526,7 +526,7 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *g IN_MULTI_LIST_UNLOCK(); if (inm != NULL) return (0); - + memset(&gsin, 0, sizeof(gsin)); gsin.sin_family = AF_INET; gsin.sin_len = sizeof(struct sockaddr_in); @@ -2207,7 +2207,7 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt goto out_inp_unlocked; } if (error) { - CTR1(KTR_IGMPV3, "%s: in_joingroup_locked failed", + CTR1(KTR_IGMPV3, "%s: in_joingroup_locked failed", __func__); goto out_inp_locked; } @@ -2627,7 +2627,7 @@ inp_set_source_filters(struct inpcb *inp, struct socko int i; INP_WUNLOCK(inp); - + CTR2(KTR_IGMPV3, "%s: loading %lu source list entries", __func__, (unsigned long)msfr.msfr_nsrcs); kss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in_pcb.c Wed Feb 12 13:31:36 2020 (r357818) @@ -1059,7 +1059,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, /* * If we found a route, use the address corresponding to * the outgoing interface. - * + * * Otherwise assume faddr is reachable on a directly connected * network and try to find a corresponding interface to take * the source address from. @@ -1454,13 +1454,13 @@ in_pcbrele_rlocked(struct inpcb *inp) } return (0); } - + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); #ifdef TCPHPTS if (inp->inp_in_hpts || inp->inp_in_input) { struct tcp_hpts_entry *hpts; /* - * We should not be on the hpts at + * We should not be on the hpts at * this point in any form. we must * get the lock to be sure. */ @@ -1470,7 +1470,7 @@ in_pcbrele_rlocked(struct inpcb *inp) hpts, inp); mtx_unlock(&hpts->p_mtx); hpts = tcp_input_lock(inp); - if (inp->inp_in_input) + if (inp->inp_in_input) panic("Hpts:%p inp:%p at free still on input hpts", hpts, inp); mtx_unlock(&hpts->p_mtx); @@ -1508,7 +1508,7 @@ in_pcbrele_wlocked(struct inpcb *inp) if (inp->inp_in_hpts || inp->inp_in_input) { struct tcp_hpts_entry *hpts; /* - * We should not be on the hpts at + * We should not be on the hpts at * this point in any form. we must * get the lock to be sure. */ @@ -1518,7 +1518,7 @@ in_pcbrele_wlocked(struct inpcb *inp) hpts, inp); mtx_unlock(&hpts->p_mtx); hpts = tcp_input_lock(inp); - if (inp->inp_in_input) + if (inp->inp_in_input) panic("Hpts:%p inp:%p at free still on input hpts", hpts, inp); mtx_unlock(&hpts->p_mtx); @@ -1612,7 +1612,7 @@ in_pcbfree_deferred(epoch_context_t ctx) #endif #ifdef INET inp_freemoptions(imo); -#endif +#endif CURVNET_RESTORE(); } @@ -2731,7 +2731,7 @@ ip_fini(void *xtp) callout_stop(&ipport_tick_callout); } -/* +/* * The ipport_callout should start running at about the time we attach the * inet or inet6 domains. */ @@ -2745,7 +2745,7 @@ ipport_tick_init(const void *unused __unused) EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL, SHUTDOWN_PRI_DEFAULT); } -SYSINIT(ipport_tick_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, +SYSINIT(ipport_tick_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipport_tick_init, NULL); void Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in_pcb.h Wed Feb 12 13:31:36 2020 (r357818) @@ -163,22 +163,22 @@ struct in_conninfo { * (h) - Protected by the pcbhash lock for the inpcb * (s) - Protected by another subsystem's locks * (x) - Undefined locking - * + * * Notes on the tcp_hpts: - * + * * First Hpts lock order is * 1) INP_WLOCK() - * 2) HPTS_LOCK() i.e. hpts->pmtx + * 2) HPTS_LOCK() i.e. hpts->pmtx * - * To insert a TCB on the hpts you *must* be holding the INP_WLOCK(). - * You may check the inp->inp_in_hpts flag without the hpts lock. - * The hpts is the only one that will clear this flag holding + * To insert a TCB on the hpts you *must* be holding the INP_WLOCK(). + * You may check the inp->inp_in_hpts flag without the hpts lock. + * The hpts is the only one that will clear this flag holding * only the hpts lock. This means that in your tcp_output() - * routine when you test for the inp_in_hpts flag to be 1 - * it may be transitioning to 0 (by the hpts). - * That's ok since that will just mean an extra call to tcp_output + * routine when you test for the inp_in_hpts flag to be 1 + * it may be transitioning to 0 (by the hpts). + * That's ok since that will just mean an extra call to tcp_output * that most likely will find the call you executed - * (when the mis-match occured) will have put the TCB back + * (when the mis-match occured) will have put the TCB back * on the hpts and it will return. If your * call did not add the inp back to the hpts then you will either * over-send or the cwnd will block you from sending more. @@ -189,7 +189,7 @@ struct in_conninfo { * the INP_WLOCK() or from destroying your TCB where again * you should already have the INP_WLOCK(). * - * The inp_hpts_cpu, inp_hpts_cpu_set, inp_input_cpu and + * The inp_hpts_cpu, inp_hpts_cpu_set, inp_input_cpu and * inp_input_cpu_set fields are controlled completely by * the hpts. Do not ever set these. The inp_hpts_cpu_set * and inp_input_cpu_set fields indicate if the hpts has @@ -243,14 +243,14 @@ struct inpcb { * fits in the pacing window (i&b). */ /* * Note the next fields are protected by a - * different lock (hpts-lock). This means that + * different lock (hpts-lock). This means that * they must correspond in size to the smallest * protectable bit field (uint8_t on x86, and * other platfomrs potentially uint32_t?). Also * since CPU switches can occur at different times the two * fields can *not* be collapsed into a signal bit field. */ -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || defined(__i386__) volatile uint8_t inp_in_hpts; /* on output hpts (lock b) */ volatile uint8_t inp_in_input; /* on input hpts (lock b) */ #else Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in_proto.c Wed Feb 12 13:31:36 2020 (r357818) @@ -146,7 +146,7 @@ struct protosw inetsw[] = { .pr_usrreqs = &tcp_usrreqs }, #ifdef SCTP -{ +{ .pr_type = SOCK_SEQPACKET, .pr_domain = &inetdomain, .pr_protocol = IPPROTO_SCTP, @@ -158,7 +158,7 @@ struct protosw inetsw[] = { .pr_drain = sctp_drain, .pr_usrreqs = &sctp_usrreqs }, -{ +{ .pr_type = SOCK_STREAM, .pr_domain = &inetdomain, .pr_protocol = IPPROTO_SCTP, Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/in_rmx.c Wed Feb 12 13:31:36 2020 (r357818) @@ -187,7 +187,7 @@ in_ifadown(struct ifaddr *ifa, int delete) } /* - * inet versions of rt functions. These have fib extensions and + * inet versions of rt functions. These have fib extensions and * for now will just reference the _fib variants. * eventually this order will be reversed, */ Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_divert.c Wed Feb 12 13:31:36 2020 (r357818) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include @@ -252,10 +252,10 @@ divert_packet(struct mbuf *m, bool incoming) */ if (m->m_pkthdr.rcvif) { /* - * Hide the actual interface name in there in the + * Hide the actual interface name in there in the * sin_zero array. XXX This needs to be moved to a * different sockaddr type for divert, e.g. - * sockaddr_div with multiple fields like + * sockaddr_div with multiple fields like * sockaddr_dl. Presently we have only 7 bytes * but that will do for now as most interfaces * are 4 or less + 2 or less bytes for unit. @@ -268,7 +268,7 @@ divert_packet(struct mbuf *m, bool incoming) * and re-uses the sockaddr_in as suggested in the man pages, * this iface name will come along for the ride. * (see div_output for the other half of this.) - */ + */ strlcpy(divsrc.sin_zero, m->m_pkthdr.rcvif->if_xname, sizeof(divsrc.sin_zero)); } Modified: head/sys/netinet/ip_dummynet.h ============================================================================== --- head/sys/netinet/ip_dummynet.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_dummynet.h Wed Feb 12 13:31:36 2020 (r357818) @@ -277,7 +277,7 @@ the objects used by dummynet: to delay and bandwidth; + dn_profile describes a delay profile; + dn_flow describes the flow status (flow id, statistics) - + + dn_sch describes a scheduler + dn_fs describes a flowset (msk, weight, queue parameters) Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_fastfwd.c Wed Feb 12 13:31:36 2020 (r357818) @@ -57,7 +57,7 @@ * * We try to do the least expensive (in CPU ops) checks and operations * first to catch junk with as little overhead as possible. - * + * * We take full advantage of hardware support for IP checksum and * fragmentation offloading. * Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_fw.h Wed Feb 12 13:31:36 2020 (r357818) @@ -34,7 +34,7 @@ * The default rule number. By the design of ip_fw, the default rule * is the last one, so its number can also serve as the highest number * allowed for a rule. The ip_fw code relies on both meanings of this - * constant. + * constant. */ #define IPFW_DEFAULT_RULE 65535 @@ -239,7 +239,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_FORWARD_MAC, /* fwd mac */ O_NAT, /* nope */ O_REASS, /* none */ - + /* * More opcodes. */ @@ -277,7 +277,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_SETFIB, /* arg1=FIB number */ O_FIB, /* arg1=FIB desired fib number */ - + O_SOCKARG, /* socket argument */ O_CALLRETURN, /* arg1=called rule number */ @@ -485,9 +485,9 @@ struct cfg_redir { u_short pport_cnt; /* number of public ports */ u_short rport_cnt; /* number of remote ports */ int proto; /* protocol: tcp/udp */ - struct alias_link **alink; + struct alias_link **alink; /* num of entry in spool chain */ - u_int16_t spool_cnt; + u_int16_t spool_cnt; /* chain of spool instances */ LIST_HEAD(spool_chain, cfg_spool) spool_chain; }; @@ -504,9 +504,9 @@ struct cfg_nat { int mode; /* aliasing mode */ struct libalias *lib; /* libalias instance */ /* number of entry in spool chain */ - int redir_cnt; + int redir_cnt; /* chain of redir instances */ - LIST_HEAD(redir_chain, cfg_redir) redir_chain; + LIST_HEAD(redir_chain, cfg_redir) redir_chain; }; #endif @@ -537,7 +537,7 @@ struct nat44_cfg_redir { uint16_t pport_cnt; /* number of public ports */ uint16_t rport_cnt; /* number of remote ports */ uint16_t mode; /* type of redirect mode */ - uint16_t spool_cnt; /* num of entry in spool chain */ + uint16_t spool_cnt; /* num of entry in spool chain */ uint16_t spare; uint32_t proto; /* protocol: tcp/udp */ }; @@ -555,7 +555,7 @@ struct nat44_cfg_nat { /* Nat command. */ typedef struct _ipfw_insn_nat { ipfw_insn o; - struct cfg_nat *nat; + struct cfg_nat *nat; } ipfw_insn_nat; /* Apply ipv6 mask on ipv6 addr */ @@ -579,7 +579,7 @@ typedef struct _ipfw_insn_icmp6 { uint32_t d[7]; /* XXX This number si related to the netinet/icmp6.h * define ICMP6_MAXTYPE * as follows: n = ICMP6_MAXTYPE/32 + 1 - * Actually is 203 + * Actually is 203 */ } ipfw_insn_icmp6; @@ -900,7 +900,7 @@ typedef struct _ipfw_obj_tentry { uint32_t key; /* uid/gid/port */ struct in6_addr addr6; /* IPv6 address */ char iface[IF_NAMESIZE]; /* interface name */ - struct tflow_entry flow; + struct tflow_entry flow; } k; union { ipfw_table_value value; /* value data */ Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_icmp.c Wed Feb 12 13:31:36 2020 (r357818) @@ -563,7 +563,7 @@ icmp_input(struct mbuf **mp, int *offp, int proto) * - The outer IP header has no options. * - The outer IP header, the ICMP header, the inner IP header, * and the first n bytes of the inner payload are contiguous. - * n is at least 8, but might be larger based on + * n is at least 8, but might be larger based on * ICMP_ADVLENPREF. See its definition in ip_icmp.h. */ ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput; @@ -629,7 +629,7 @@ icmp_input(struct mbuf **mp, int *offp, int proto) (struct sockaddr *)&icmpdst, m->m_pkthdr.rcvif); if (ia == NULL) break; - if (ia->ia_ifp == NULL) + if (ia->ia_ifp == NULL) break; icp->icmp_type = ICMP_MASKREPLY; if (V_icmpmaskfake == 0) @@ -937,7 +937,7 @@ done: * * @src: sockaddr with address of redirect originator * @dst: sockaddr with destination in question - * @gateway: new proposed gateway + * @gateway: new proposed gateway * * Returns 0 on success. */ Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_id.c Wed Feb 12 13:31:36 2020 (r357818) @@ -280,7 +280,7 @@ ipid_sysinit(void) mtx_init(&V_ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); V_ip_id = counter_u64_alloc(M_WAITOK); - + CPU_FOREACH(i) arc4rand(zpcpu_get_cpu(V_ip_id, i), sizeof(uint64_t), 0); } Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_input.c Wed Feb 12 13:31:36 2020 (r357818) @@ -639,12 +639,12 @@ passin: return; /* greedy RSVP, snatches any PATH packet of the RSVP protocol and no - * matter if it is destined to another node, or whether it is + * matter if it is destined to another node, or whether it is * a multicast one, RSVP wants it! and prevents it from being forwarded * anywhere else. Also checks if the rsvp daemon is running before * grabbing the packet. */ - if (V_rsvp_on && ip->ip_p==IPPROTO_RSVP) + if (V_rsvp_on && ip->ip_p==IPPROTO_RSVP) goto ours; /* @@ -675,7 +675,7 @@ passin: * insert a workaround. If the packet got here, we already * checked with carp_iamatch() and carp_forus(). */ - checkif = V_ip_checkinterface && (V_ipforwarding == 0) && + checkif = V_ip_checkinterface && (V_ipforwarding == 0) && ifp != NULL && ((ifp->if_flags & IFF_LOOPBACK) == 0) && ifp->if_carp == NULL && (dchg == 0); @@ -689,7 +689,7 @@ passin: * arrived via the correct interface if checking is * enabled. */ - if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr && + if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr && (!checkif || ia->ia_ifp == ifp)) { counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); counter_u64_add(ia->ia_ifa.ifa_ibytes, @@ -1282,7 +1282,7 @@ ip_savecontrol(struct inpcb *inp, struct mbuf **mp, st } bcopy(sdp, sdl2, sdp->sdl_len); } else { -makedummy: +makedummy: sdl2->sdl_len = offsetof(struct sockaddr_dl, sdl_data[0]); sdl2->sdl_family = AF_LINK; @@ -1408,13 +1408,13 @@ rsvp_input(struct mbuf **mp, int *offp, int proto) * of the group to which the RSVP packet is addressed. But in this * case we want to throw the packet away. */ - + if (!V_rsvp_on) { m_freem(m); return (IPPROTO_DONE); } - if (V_ip_rsvpd != NULL) { + if (V_ip_rsvpd != NULL) { *mp = m; rip_input(mp, offp, proto); return (IPPROTO_DONE); Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_mroute.c Wed Feb 12 13:31:36 2020 (r357818) @@ -182,7 +182,7 @@ VNET_DEFINE_STATIC(vifi_t, numvifs); VNET_DEFINE_STATIC(struct vif *, viftable); #define V_viftable VNET(viftable) /* - * No one should be able to "query" this before initialisation happened in + * No one should be able to "query" this before initialisation happened in * vnet_mroute_init(), so we should still be fine. */ SYSCTL_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_VNET | CTLFLAG_RD, @@ -653,7 +653,7 @@ if_detached_event(void *arg __unused, struct ifnet *if MROUTER_UNLOCK(); } - + /* * Enable multicast forwarding. */ @@ -742,7 +742,7 @@ X_ip_mrouter_done(void) bzero((caddr_t)V_viftable, sizeof(V_viftable)); V_numvifs = 0; V_pim_assert_enabled = 0; - + VIF_UNLOCK(); callout_stop(&V_expire_upcalls_ch); @@ -2833,7 +2833,7 @@ vnet_mroute_uninit(const void *unused __unused) V_nexpire = NULL; } -VNET_SYSUNINIT(vnet_mroute_uninit, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE, +VNET_SYSUNINIT(vnet_mroute_uninit, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE, vnet_mroute_uninit, NULL); static int @@ -2844,7 +2844,7 @@ ip_mroute_modevent(module_t mod, int type, void *unuse case MOD_LOAD: MROUTER_LOCK_INIT(); - if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, + if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, if_detached_event, NULL, EVENTHANDLER_PRI_ANY); if (if_detach_event_tag == NULL) { printf("ip_mroute: unable to register " Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_options.c Wed Feb 12 13:31:36 2020 (r357818) @@ -75,8 +75,8 @@ SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourcerout #define V_ip_dosourceroute VNET(ip_dosourceroute) VNET_DEFINE_STATIC(int, ip_acceptsourceroute); -SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, +SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, "Enable accepting source routed IP packets"); #define V_ip_acceptsourceroute VNET(ip_acceptsourceroute) @@ -208,7 +208,7 @@ ip_dooptions(struct mbuf *m, int pass) * ICMP */ nosourcerouting: - log(LOG_WARNING, + log(LOG_WARNING, "attempted source route from %s " "to %s\n", inet_ntoa_r(ip->ip_src, srcbuf), Modified: head/sys/netinet/ip_reass.c ============================================================================== --- head/sys/netinet/ip_reass.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/ip_reass.c Wed Feb 12 13:31:36 2020 (r357818) @@ -637,7 +637,7 @@ ipreass_cleanup(void *arg __unused, struct ifnet *ifp) /* * Skip processing if IPv4 reassembly is not initialised or * torn down by ipreass_destroy(). - */ + */ if (V_ipq_zone == NULL) { CURVNET_RESTORE(); return; @@ -750,7 +750,7 @@ sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS) max = uma_zone_get_max(V_ipq_zone); if (max == 0) max = -1; - } else + } else max = 0; error = sysctl_handle_int(oidp, &max, 0, req); if (error || !req->newptr) Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/raw_ip.c Wed Feb 12 13:31:36 2020 (r357818) @@ -160,7 +160,7 @@ rip_inshash(struct inpcb *inp) INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); - + if (inp->inp_ip_p != 0 && inp->inp_laddr.s_addr != INADDR_ANY && inp->inp_faddr.s_addr != INADDR_ANY) { @@ -892,7 +892,7 @@ rip_detach(struct socket *so) inp = sotoinpcb(so); KASSERT(inp != NULL, ("rip_detach: inp == NULL")); - KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, + KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, ("rip_detach: not closed")); INP_INFO_WLOCK(&V_ripcbinfo); Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/siftr.c Wed Feb 12 13:31:36 2020 (r357818) @@ -235,9 +235,9 @@ struct pkt_node { /* Number of segments currently in the reassembly queue. */ int t_segqlen; /* Flowid for the connection. */ - u_int flowid; + u_int flowid; /* Flow type for the connection. */ - u_int flowtype; + u_int flowtype; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -1103,7 +1103,7 @@ siftr_chkpkt6(struct mbuf **m, struct ifnet *ifp, int * Only pkts selected by the tcp port filter * can be inserted into the pkt_queue */ - if ((siftr_port_filter != 0) && + if ((siftr_port_filter != 0) && (siftr_port_filter != ntohs(inp->inp_lport)) && (siftr_port_filter != ntohs(inp->inp_fport))) { goto inp_unlock6; Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp.h Wed Feb 12 13:31:36 2020 (r357818) @@ -333,7 +333,7 @@ struct tcp_info { u_int32_t tcpi_snd_rexmitpack; /* Retransmitted packets */ u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ - + /* Padding to grow without breaking ABI. */ u_int32_t __tcpi_pad[26]; /* Padding. */ }; Modified: head/sys/netinet/tcp_fastopen.c ============================================================================== --- head/sys/netinet/tcp_fastopen.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp_fastopen.c Wed Feb 12 13:31:36 2020 (r357818) @@ -386,7 +386,7 @@ void tcp_fastopen_init(void) { unsigned int i; - + V_counter_zone = uma_zcreate("tfo", sizeof(unsigned int), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); rm_init(&V_tcp_fastopen_keylock, "tfo_keylock"); @@ -450,7 +450,7 @@ tcp_fastopen_destroy(void) struct tcp_fastopen_ccache_bucket *ccb; unsigned int i; - for (i = 0; i < V_tcp_fastopen_ccache.buckets; i++) { + for (i = 0; i < V_tcp_fastopen_ccache.buckets; i++) { ccb = &V_tcp_fastopen_ccache.base[i]; tcp_fastopen_ccache_bucket_trim(ccb, 0); mtx_destroy(&ccb->ccb_mtx); @@ -807,7 +807,7 @@ sysctl_net_inet_tcp_fastopen_ccache_bucket_limit(SYSCT int error; unsigned int new; unsigned int i; - + new = V_tcp_fastopen_ccache.bucket_limit; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { @@ -823,7 +823,7 @@ sysctl_net_inet_tcp_fastopen_ccache_bucket_limit(SYSCT } V_tcp_fastopen_ccache.bucket_limit = new; } - + } return (error); } @@ -860,7 +860,7 @@ sysctl_net_inet_tcp_fastopen_client_enable(SYSCTL_HAND ccb->ccb_num_entries)); ccb->ccb_num_entries = 0; /* enable bucket */ CCB_UNLOCK(ccb); - } + } V_tcp_fastopen_client_enable = 1; } } @@ -876,7 +876,7 @@ tcp_fastopen_connect(struct tcpcb *tp) sbintime_t now; uint16_t server_mss; uint64_t psk_cookie; - + psk_cookie = 0; inp = tp->t_inpcb; cce = tcp_fastopen_ccache_lookup(&inp->inp_inc, &ccb); @@ -1032,7 +1032,7 @@ tcp_fastopen_ccache_lookup(struct in_conninfo *inc, ccb = &V_tcp_fastopen_ccache.base[hash & V_tcp_fastopen_ccache.mask]; *ccbp = ccb; CCB_LOCK(ccb); - + /* * Always returns with locked bucket. */ @@ -1055,7 +1055,7 @@ tcp_fastopen_ccache_create(struct tcp_fastopen_ccache_ struct in_conninfo *inc, uint16_t mss, uint8_t cookie_len, uint8_t *cookie) { struct tcp_fastopen_ccache_entry *cce; - + /* * 1. Create a new entry, or * 2. Reclaim an existing entry, or @@ -1063,7 +1063,7 @@ tcp_fastopen_ccache_create(struct tcp_fastopen_ccache_ */ CCB_LOCK_ASSERT(ccb); - + cce = NULL; if (ccb->ccb_num_entries < V_tcp_fastopen_ccache.bucket_limit) cce = uma_zalloc(V_tcp_fastopen_ccache.zone, M_NOWAIT); @@ -1106,7 +1106,7 @@ tcp_fastopen_ccache_create(struct tcp_fastopen_ccache_ cce->cookie_len = 0; cce->disable_time = getsbinuptime(); } - + return (cce); } @@ -1116,7 +1116,7 @@ tcp_fastopen_ccache_bucket_trim(struct tcp_fastopen_cc { struct tcp_fastopen_ccache_entry *cce, *cce_tmp; unsigned int entries; - + CCB_LOCK(ccb); entries = 0; TAILQ_FOREACH_SAFE(cce, &ccb->ccb_entries, cce_link, cce_tmp) { Modified: head/sys/netinet/tcp_fsm.h ============================================================================== --- head/sys/netinet/tcp_fsm.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp_fsm.h Wed Feb 12 13:31:36 2020 (r357818) @@ -97,7 +97,7 @@ static u_char tcp_outflags[TCP_NSTATES] = { TH_FIN|TH_ACK, /* 8, LAST_ACK */ TH_ACK, /* 9, FIN_WAIT_2 */ TH_ACK, /* 10, TIME_WAIT */ -}; +}; #endif #ifdef KPROF Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp_input.c Wed Feb 12 13:31:36 2020 (r357818) @@ -369,7 +369,7 @@ cc_ack_received(struct tcpcb *tp, struct tcphdr *th, u #endif } -void +void cc_conn_init(struct tcpcb *tp) { struct hc_metrics_lite metrics; @@ -1687,7 +1687,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru th->th_seq == tp->rcv_nxt && (thflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK && tp->snd_nxt == tp->snd_max && - tiwin && tiwin == tp->snd_wnd && + tiwin && tiwin == tp->snd_wnd && ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) && SEGQ_EMPTY(tp) && ((to.to_flags & TOF_TS) == 0 || @@ -1764,7 +1764,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (SEQ_GT(tp->snd_una, tp->snd_recover) && SEQ_LEQ(th->th_ack, tp->snd_recover)) tp->snd_recover = th->th_ack - 1; - + /* * Let the congestion control algorithm update * congestion control related information. This @@ -1908,7 +1908,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru goto dropwithreset; } else if (thflags & TH_SYN) { /* non-initial SYN is ignored */ - if ((tcp_timer_active(tp, TT_DELACK) || + if ((tcp_timer_active(tp, TT_DELACK) || tcp_timer_active(tp, TT_REXMT))) goto drop; } else if (!(thflags & (TH_ACK|TH_FIN|TH_RST))) { @@ -1985,7 +1985,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru tp->t_flags2 |= TF2_ECN_PERMIT; TCPSTAT_INC(tcps_ecn_shs); } - + /* * Received in SYN_SENT[*] state. * Transitions: @@ -2300,14 +2300,14 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru /* * If last ACK falls within this segment's sequence numbers, * record its timestamp. - * NOTE: + * NOTE: * 1) That the test incorporates suggestions from the latest * proposal of the tcplw@cray.com list (Braden 1993/04/26). * 2) That updating only on newer timestamps interferes with * our earlier PAWS tests, so this check should be solely * predicated on the sequence space of this segment. - * 3) That we modify the segment boundary check to be - * Last.ACK.Sent <= SEG.SEQ + SEG.Len + * 3) That we modify the segment boundary check to be + * Last.ACK.Sent <= SEG.SEQ + SEG.Len * instead of RFC1323's * Last.ACK.Sent < SEG.SEQ + SEG.Len, * This modified check allows us to overcome RFC1323's @@ -2376,7 +2376,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru /* * Account for the ACK of our SYN prior to * regular ACK processing below. - */ + */ tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { @@ -2511,10 +2511,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp->t_flags)) { int awnd; - + /* * Compute the amount of data in flight first. - * We can inject new data into the pipe iff + * We can inject new data into the pipe iff * we have less than 1/2 the original window's * worth of data in flight. */ Modified: head/sys/netinet/tcp_log_buf.c ============================================================================== --- head/sys/netinet/tcp_log_buf.c Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp_log_buf.c Wed Feb 12 13:31:36 2020 (r357818) @@ -648,7 +648,7 @@ restart: KASSERT(bucket_locked || tlb == NULL, ("%s: bucket_locked (%d) and tlb (%p) are " "inconsistent", __func__, bucket_locked, tlb)); - + if (bucket_locked) { TCPID_BUCKET_UNLOCK(tlb); bucket_locked = false; @@ -728,7 +728,7 @@ refind: * Remember that we constructed (struct tcp_log_id_node) so * we can safely cast the id to it for the purposes of finding. */ - KASSERT(tlb == NULL, ("%s:%d tlb unexpectedly non-NULL", + KASSERT(tlb == NULL, ("%s:%d tlb unexpectedly non-NULL", __func__, __LINE__)); tmp_tlb = RB_FIND(tcp_log_id_tree, &tcp_log_id_head, (struct tcp_log_id_bucket *) id); @@ -1351,7 +1351,7 @@ tcp_log_tcpcbfini(struct tcpcb *tp) * There are two ways we could keep logs: per-socket or per-ID. If * we are tracking logs with an ID, then the logs survive the * destruction of the TCPCB. - * + * * If the TCPCB is associated with an ID node, move the logs from the * TCPCB to the ID node. In theory, this is safe, for reasons which I * will now explain for my own benefit when I next need to figure out @@ -1361,7 +1361,7 @@ tcp_log_tcpcbfini(struct tcpcb *tp) * of this node (Rule C). Further, no one can remove this node from * the bucket while we hold the lock (Rule D). Basically, no one can * mess with this node. That leaves two states in which we could be: - * + * * 1. Another thread is currently waiting to acquire the INP lock, with * plans to do something with this node. When we drop the INP lock, * they will have a chance to do that. They will recheck the @@ -1770,7 +1770,7 @@ tcp_log_state_change(struct tcpcb *tp, int state) if (tcp_disable_all_bb_logs) { /* We are prohibited from doing any logs */ tp->t_logstate = TCP_LOG_STATE_OFF; - } + } tp->t_flags2 &= ~(TF2_LOG_AUTO); return (0); @@ -2110,7 +2110,7 @@ tcp_log_expandlogbuf(struct tcp_log_dev_queue *param) sopt.sopt_val = hdr + 1; sopt.sopt_valsize -= sizeof(struct tcp_log_header); sopt.sopt_td = NULL; - + error = tcp_log_logs_to_buf(&sopt, &entry->tldl_entries, (struct tcp_log_buffer **)&end, entry->tldl_count); if (error) { @@ -2380,7 +2380,7 @@ tcp_log_dumpbucketlogs(struct tcp_log_id_bucket *tlb, * If this isn't associated with a TCPCB, we can pull it off * the list now. We need to be careful that the expire timer * hasn't already taken ownership (tln_expiretime == SBT_MAX). - * If so, we let the expire timer code free the data. + * If so, we let the expire timer code free the data. */ if (cur_tln->tln_closed) { no_inp: @@ -2618,7 +2618,7 @@ tcp_log_dump_tp_bucket_logbufs(struct tcpcb *tp, char return; } - /* Turn this over to tcp_log_dumpbucketlogs() to finish the work. */ + /* Turn this over to tcp_log_dumpbucketlogs() to finish the work. */ tcp_log_dumpbucketlogs(tlb, reason); } Modified: head/sys/netinet/tcp_log_buf.h ============================================================================== --- head/sys/netinet/tcp_log_buf.h Wed Feb 12 13:07:09 2020 (r357817) +++ head/sys/netinet/tcp_log_buf.h Wed Feb 12 13:31:36 2020 (r357818) @@ -305,7 +305,7 @@ struct tcp_log_dev_log_queue { * information when needed. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 12 13:37:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BB112389AC; Wed, 12 Feb 2020 13:37:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hggk3CZwz4Q1p; Wed, 12 Feb 2020 13:37:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 650AD21F3D; Wed, 12 Feb 2020 13:37:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CDbsjs070016; Wed, 12 Feb 2020 13:37:54 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CDbsjk070013; Wed, 12 Feb 2020 13:37:54 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121337.01CDbsjk070013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 13:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357819 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 13:37:54 -0000 Author: rrs Date: Wed Feb 12 13:37:53 2020 New Revision: 357819 URL: https://svnweb.freebsd.org/changeset/base/357819 Log: Opps committed the wrong ratelimit version in the whitespace cleanup.. Restore it to the proper version. Sponsored by: Netfilx Inc. Modified: head/sys/netinet/tcp_ratelimit.c head/sys/netinet/tcp_ratelimit.h Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Feb 12 13:31:36 2020 (r357818) +++ head/sys/netinet/tcp_ratelimit.c Wed Feb 12 13:37:53 2020 (r357819) @@ -49,11 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#define TCPSTATES /* for logging */ #include #include -#define TCPSTATES /* for logging */ #include #ifdef INET6 #include @@ -66,186 +64,45 @@ __FBSDID("$FreeBSD$"); * For the purposes of each send, what is the size * of an ethernet frame. */ +#ifndef ETHERNET_SEGMENT_SIZE +#define ETHERNET_SEGMENT_SIZE 1500 +#endif MALLOC_DEFINE(M_TCPPACE, "tcp_hwpace", "TCP Hardware pacing memory"); #ifdef RATELIMIT -/* - * The following preferred table will seem weird to - * the casual viewer. Why do we not have any rates below - * 1Mbps? Why do we have a rate at 1.44Mbps called common? - * Why do the rates cluster in the 1-100Mbps range more - * than others? Why does the table jump around at the beginnign - * and then be more consistently raising? - * - * Let me try to answer those questions. A lot of - * this is dependant on the hardware. We have three basic - * supporters of rate limiting - * - * Chelsio - Supporting 16 configurable rates. - * Mlx - c4 supporting 13 fixed rates. - * Mlx - c5 & c6 supporting 127 configurable rates. - * - * The c4 is why we have a common rate that is available - * in all rate tables. This is a selected rate from the - * c4 table and we assure its available in all ratelimit - * tables. This way the tcp_ratelimit code has an assured - * rate it should always be able to get. This answers a - * couple of the questions above. - * - * So what about the rest, well the table is built to - * try to get the most out of a joint hardware/software - * pacing system. The software pacer will always pick - * a rate higher than the b/w that it is estimating - * - * on the path. This is done for two reasons. - * a) So we can discover more b/w - * and - * b) So we can send a block of MSS's down and then - * have the software timer go off after the previous - * send is completely out of the hardware. - * - * But when we do we don't want to have the delay - * between the last packet sent by the hardware be - * excessively long (to reach our desired rate). - * - * So let me give an example for clarity. - * - * Lets assume that the tcp stack sees that 29,110,000 bps is - * what the bw of the path is. The stack would select the - * rate 31Mbps. 31Mbps means that each send that is done - * by the hardware will cause a 387 micro-second gap between - * the pacets sent at that rate. For 29,110,000 bps we - * would need 412 micro-seconds gap between each send. - * - * Now we pick a MSS size based on the delta between the - * two rates (412 - 387) divided into the rate we really - * wish to send at rounded up. That results in a MSS - * send of 17 mss's at once. The hardware then will - * run out of data in a single 17MSS send in 6,579 micro-seconds. - * On the other hand the software pacer will send more data - * in 7,004 micro-seconds. This means that we will refill - * the hardware 25 microseconds after it would have sent - * next. This is a win since we no are only sending every - * 7ms or so and yet all the packets are spaced on - * the wire with 94% of what they should be and only - * the last packet is delayed extra to make up for the - * difference. Note that the above formula has two - * important caveat. If we are above (b/w wise) over - * 100Mbps we double the result of the MSS calculation. - * The second caveat is if we are 500Mbps or more - * we just send the maximum MSS at once i.e. 45MSS - * - */ #define COMMON_RATE 180500 uint64_t desired_rates[] = { - 122500, /* 1Mbps - rate 1 */ - 180500, /* 1.44Mpbs - rate 2 common rate */ - 375000, /* 3Mbps - rate 3 */ - 625000, /* 5Mbps - rate 4 */ - 875000, /* 7Mbps - rate 5 */ - 1125000, /* 9Mbps - rate 6 */ - 1375000, /* 11Mbps - rate 7 */ - 1625000, /* 13Mbps - rate 8 */ - 2625000, /* 21Mbps - rate 9 */ - 3875000, /* 31Mbps - rate 10 */ - 5125000, /* 41Meg - rate 11 */ - 12500000, /* 100Mbps - rate 12 */ - 25000000, /* 200Mbps - rate 13 */ - 50000000, /* 400Mbps - rate 14 */ - 63750000, /* 51Mbps - rate 15 */ - 100000000, /* 800Mbps - rate 16 */ - 1875000, /* 15Mbps - rate 17 */ - 2125000, /* 17Mbps - rate 18 */ - 2375000, /* 19Mbps - rate 19 */ - 2875000, /* 23Mbps - rate 20 */ - 3125000, /* 25Mbps - rate 21 */ - 3375000, /* 27Mbps - rate 22 */ - 3625000, /* 29Mbps - rate 23 */ - 4125000, /* 33Mbps - rate 24 */ - 4375000, /* 35Mbps - rate 25 */ - 4625000, /* 37Mbps - rate 26 */ - 4875000, /* 39Mbps - rate 27 */ - 5375000, /* 43Mbps - rate 28 */ - 5625000, /* 45Mbps - rate 29 */ - 5875000, /* 47Mbps - rate 30 */ - 6125000, /* 49Mbps - rate 31 */ - 6625000, /* 53Mbps - rate 32 */ - 6875000, /* 55Mbps - rate 33 */ - 7125000, /* 57Mbps - rate 34 */ - 7375000, /* 59Mbps - rate 35 */ - 7625000, /* 61Mbps - rate 36 */ - 7875000, /* 63Mbps - rate 37 */ - 8125000, /* 65Mbps - rate 38 */ - 8375000, /* 67Mbps - rate 39 */ - 8625000, /* 69Mbps - rate 40 */ - 8875000, /* 71Mbps - rate 41 */ - 9125000, /* 73Mbps - rate 42 */ - 9375000, /* 75Mbps - rate 43 */ - 9625000, /* 77Mbps - rate 44 */ - 9875000, /* 79Mbps - rate 45 */ - 10125000, /* 81Mbps - rate 46 */ - 10375000, /* 83Mbps - rate 47 */ - 10625000, /* 85Mbps - rate 48 */ - 10875000, /* 87Mbps - rate 49 */ - 11125000, /* 89Mbps - rate 50 */ - 11375000, /* 91Mbps - rate 51 */ - 11625000, /* 93Mbps - rate 52 */ - 11875000, /* 95Mbps - rate 53 */ - 13125000, /* 105Mbps - rate 54 */ - 13750000, /* 110Mbps - rate 55 */ - 14375000, /* 115Mbps - rate 56 */ - 15000000, /* 120Mbps - rate 57 */ - 15625000, /* 125Mbps - rate 58 */ - 16250000, /* 130Mbps - rate 59 */ - 16875000, /* 135Mbps - rate 60 */ - 17500000, /* 140Mbps - rate 61 */ - 18125000, /* 145Mbps - rate 62 */ - 18750000, /* 150Mbps - rate 64 */ - 20000000, /* 160Mbps - rate 65 */ - 21250000, /* 170Mbps - rate 66 */ - 22500000, /* 180Mbps - rate 67 */ - 23750000, /* 190Mbps - rate 68 */ - 26250000, /* 210Mbps - rate 69 */ - 27500000, /* 220Mbps - rate 70 */ - 28750000, /* 230Mbps - rate 71 */ - 30000000, /* 240Mbps - rate 72 */ - 31250000, /* 250Mbps - rate 73 */ - 34375000, /* 275Mbps - rate 74 */ - 37500000, /* 300Mbps - rate 75 */ - 40625000, /* 325Mbps - rate 76 */ - 43750000, /* 350Mbps - rate 77 */ - 46875000, /* 375Mbps - rate 78 */ - 53125000, /* 425Mbps - rate 79 */ - 56250000, /* 450Mbps - rate 80 */ - 59375000, /* 475Mbps - rate 81 */ - 62500000, /* 500Mbps - rate 82 */ - 68750000, /* 550Mbps - rate 83 */ - 75000000, /* 600Mbps - rate 84 */ - 81250000, /* 650Mbps - rate 85 */ - 87500000, /* 700Mbps - rate 86 */ - 93750000, /* 750Mbps - rate 87 */ - 106250000, /* 850Mbps - rate 88 */ - 112500000, /* 900Mbps - rate 89 */ - 125000000, /* 1Gbps - rate 90 */ - 156250000, /* 1.25Gps - rate 91 */ - 187500000, /* 1.5Gps - rate 92 */ - 218750000, /* 1.75Gps - rate 93 */ - 250000000, /* 2Gbps - rate 94 */ - 281250000, /* 2.25Gps - rate 95 */ - 312500000, /* 2.5Gbps - rate 96 */ - 343750000, /* 2.75Gbps - rate 97 */ - 375000000, /* 3Gbps - rate 98 */ - 500000000, /* 4Gbps - rate 99 */ - 625000000, /* 5Gbps - rate 100 */ - 750000000, /* 6Gbps - rate 101 */ - 875000000, /* 7Gbps - rate 102 */ - 1000000000, /* 8Gbps - rate 103 */ - 1125000000, /* 9Gbps - rate 104 */ - 1250000000, /* 10Gbps - rate 105 */ - 1875000000, /* 15Gbps - rate 106 */ - 2500000000 /* 20Gbps - rate 107 */ + 62500, /* 500Kbps */ + 180500, /* 1.44Mpbs */ + 375000, /* 3Mbps */ + 500000, /* 4Mbps */ + 625000, /* 5Mbps */ + 750000, /* 6Mbps */ + 1000000, /* 8Mbps */ + 1250000, /* 10Mbps */ + 2500000, /* 20Mbps */ + 3750000, /* 30Mbps */ + 5000000, /* 40Meg */ + 6250000, /* 50Mbps */ + 12500000, /* 100Mbps */ + 25000000, /* 200Mbps */ + 50000000, /* 400Mbps */ + 100000000, /* 800Mbps */ + 12500, /* 100kbps */ + 25000, /* 200kbps */ + 875000, /* 7Mbps */ + 1125000, /* 9Mbps */ + 1875000, /* 15Mbps */ + 3125000, /* 25Mbps */ + 8125000, /* 65Mbps */ + 10000000, /* 80Mbps */ + 18750000, /* 150Mbps */ + 20000000, /* 250Mbps */ + 37500000, /* 350Mbps */ + 62500000, /* 500Mbps */ + 78125000, /* 625Mbps */ + 125000000, /* 1Gbps */ }; - #define MAX_HDWR_RATES (sizeof(desired_rates)/sizeof(uint64_t)) #define RS_ORDERED_COUNT 16 /* * Number that are in order @@ -427,7 +284,7 @@ rs_defer_destroy(struct tcp_rate_set *rs) /* Set flag to only defer once. */ rs->rs_flags |= RS_FUNERAL_SCHD; - NET_EPOCH_CALL(rs_destroy, &rs->rs_epoch_ctx); + epoch_call(net_epoch, &rs->rs_epoch_ctx, rs_destroy); } #ifdef INET @@ -522,24 +379,16 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) * We can do nothing if we cannot * get a query back from the driver. */ - printf("No query functions for %s:%d-- failed\n", - ifp->if_dname, ifp->if_dunit); return (NULL); } rs = malloc(sizeof(struct tcp_rate_set), M_TCPPACE, M_NOWAIT | M_ZERO); if (rs == NULL) { if (error) *error = ENOMEM; - printf("No memory for malloc\n"); return (NULL); } - memset(&rl, 0, sizeof(rl)); rl.flags = RT_NOSUPPORT; ifp->if_ratelimit_query(ifp, &rl); - printf("if:%s:%d responds with flags:0x%x rate count:%d\n", - ifp->if_dname, - ifp->if_dunit, - rl.flags, rl.number_of_rates); if (rl.flags & RT_IS_UNUSABLE) { /* * The interface does not really support @@ -582,7 +431,7 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) mtx_unlock(&rs_mtx); return (rs); } else if ((rl.flags & RT_IS_FIXED_TABLE) == RT_IS_FIXED_TABLE) { - /* Mellanox C4 likely */ + /* Mellanox most likely */ rs->rs_ifp = ifp; rs->rs_if_dunit = ifp->if_dunit; rs->rs_rate_cnt = rl.number_of_rates; @@ -593,7 +442,7 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) rs->rs_disable = 0; rate_table_act = rl.rate_table; } else if ((rl.flags & RT_IS_SELECTABLE) == RT_IS_SELECTABLE) { - /* Chelsio, C5 and C6 of Mellanox? */ + /* Chelsio */ rs->rs_ifp = ifp; rs->rs_if_dunit = ifp->if_dunit; rs->rs_rate_cnt = rl.number_of_rates; @@ -685,14 +534,6 @@ bail: rs->rs_lowest_valid = i; } else { int err; - - if ((rl.flags & RT_IS_SETUP_REQ) && - (ifp->if_ratelimit_query)) { - err = ifp->if_ratelimit_setup(ifp, - rs->rs_rlt[i].rate, i); - if (err) - goto handle_err; - } #ifdef RSS hash_type = M_HASHTYPE_RSS_TCP_IPV4; #else @@ -704,7 +545,6 @@ bail: rs->rs_rlt[i].rate, &rs->rs_rlt[i].tag); if (err) { -handle_err: if (i == (rs->rs_rate_cnt - 1)) { /* * Huh - first rate and we can't get @@ -1038,7 +878,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, ui struct epoch_tracker et; int err; - NET_EPOCH_ENTER(et); + epoch_enter_preempt(net_epoch_preempt, &et); use_real_interface: CK_LIST_FOREACH(rs, &int_rs, next) { /* @@ -1071,14 +911,14 @@ use_real_interface: */ if (rs->rs_disable && error) *error = ENODEV; - NET_EPOCH_EXIT(et); + epoch_exit_preempt(net_epoch_preempt, &et); return (NULL); } if ((rs == NULL) || (rs->rs_disable != 0)) { if (rs->rs_disable && error) *error = ENOSPC; - NET_EPOCH_EXIT(et); + epoch_exit_preempt(net_epoch_preempt, &et); return (NULL); } if (rs->rs_flags & RS_IS_DEFF) { @@ -1089,7 +929,7 @@ use_real_interface: if (tifp == NULL) { if (rs->rs_disable && error) *error = ENOTSUP; - NET_EPOCH_EXIT(et); + epoch_exit_preempt(net_epoch_preempt, &et); return (NULL); } goto use_real_interface; @@ -1098,7 +938,7 @@ use_real_interface: ((rs->rs_flows_using + 1) > rs->rs_flow_limit)) { if (error) *error = ENOSPC; - NET_EPOCH_EXIT(et); + epoch_exit_preempt(net_epoch_preempt, &et); return (NULL); } rte = tcp_find_suitable_rate(rs, bytes_per_sec, flags); @@ -1122,7 +962,7 @@ use_real_interface: */ atomic_add_64(&rs->rs_flows_using, 1); } - NET_EPOCH_EXIT(et); + epoch_exit_preempt(net_epoch_preempt, &et); return (rte); } @@ -1138,22 +978,13 @@ tcp_rl_ifnet_link(void *arg __unused, struct ifnet *if * We only care on an interface going up that is rate-limit * capable. */ - printf("ifp:%s.%d does not support rate-limit(0x%x) or link_state is not UP(state:%d)\n", - ifp->if_dname, - ifp->if_dunit, - ifp->if_capabilities, - link_state); return; } mtx_lock(&rs_mtx); - printf("Link UP on interface %s.%d\n", - ifp->if_dname, - ifp->if_dunit); CK_LIST_FOREACH(rs, &int_rs, next) { if ((rs->rs_ifp == ifp) && (rs->rs_if_dunit == ifp->if_dunit)) { /* We already have initialized this guy */ - printf("Interface already initialized\n"); mtx_unlock(&rs_mtx); return; } @@ -1254,7 +1085,6 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if *error = EINVAL; rte = NULL; } - *error = 0; return (rte); } @@ -1362,112 +1192,6 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl mtx_unlock(&rs_mtx); } in_pcbdetach_txrtlmt(tp->t_inpcb); -} - -#define ONE_POINT_TWO_MEG 150000 /* 1.2 megabits in bytes */ -#define ONE_HUNDRED_MBPS 12500000 /* 100Mbps in bytes per second */ -#define FIVE_HUNDRED_MBPS 62500000 /* 500Mbps in bytes per second */ -#define MAX_MSS_SENT 43 /* 43 mss = 43 x 1500 = 64,500 bytes */ - -uint32_t -tcp_get_pacing_mss(uint64_t bw, uint32_t segsiz, int can_use_1mss, - const struct tcp_hwrate_limit_table *te) -{ - /* - * We use the google formula to calculate the - * TSO size. I.E. - * bw < 24Meg - * tso = 2mss - * else - * tso = min(bw/1000, 64k) - * - * Note for these calculations we ignore the - * packet overhead (enet hdr, ip hdr and tcp hdr). - */ - uint64_t lentim, res, bytes; - uint32_t new_tso, min_tso_segs; - - bytes = bw / 1000; - if (bytes > (64 * 1000)) - bytes = 64 * 1000; - /* Round up */ - new_tso = (bytes + segsiz - 1) / segsiz; - if (can_use_1mss && (bw < ONE_POINT_TWO_MEG)) - min_tso_segs = 1; - else - min_tso_segs = 2; - if (new_tso < min_tso_segs) - new_tso = min_tso_segs; - if (new_tso > MAX_MSS_SENT) - new_tso = MAX_MSS_SENT; - new_tso *= segsiz; - /* - * If we are not doing hardware pacing - * then we are done. - */ - if (te == NULL) - return(new_tso); - /* - * For hardware pacing we look at the - * rate you are sending at and compare - * that to the rate you have in hardware. - * - * If the hardware rate is slower than your - * software rate then you are in error and - * we will build a queue in our hardware whic - * is probably not desired, in such a case - * just return the non-hardware TSO size. - * - * If the rate in hardware is faster (which - * it should be) then look at how long it - * takes to send one ethernet segment size at - * your b/w and compare that to the time it - * takes to send at the rate you had selected. - * - * If your time is greater (which we hope it is) - * we get the delta between the two, and then - * divide that into your pacing time. This tells - * us how many MSS you can send down at once (rounded up). - * - * Note we also double this value if the b/w is over - * 100Mbps. If its over 500meg we just set you to the - * max (43 segments). - */ - if (te->rate > FIVE_HUNDRED_MBPS) - return (segsiz * MAX_MSS_SENT); - if (te->rate == bw) { - /* We are pacing at exactly the hdwr rate */ - return (segsiz * MAX_MSS_SENT); - } - lentim = ETHERNET_SEGMENT_SIZE * USECS_IN_SECOND; - res = lentim / bw; - if (res > te->time_between) { - uint32_t delta, segs; - - delta = res - te->time_between; - segs = (res + delta - 1)/delta; - if (te->rate > ONE_HUNDRED_MBPS) - segs *= 2; - if (segs < min_tso_segs) - segs = min_tso_segs; - if (segs > MAX_MSS_SENT) - segs = MAX_MSS_SENT; - segs *= segsiz; - if (segs < new_tso) { - /* unexpected ? */ - return(new_tso); - } else { - return (segs); - } - } else { - /* - * Your time is smaller which means - * we will grow a queue on our - * hardware. Send back the non-hardware - * rate. - */ - return (new_tso); - } } static eventhandler_tag rl_ifnet_departs; Modified: head/sys/netinet/tcp_ratelimit.h ============================================================================== --- head/sys/netinet/tcp_ratelimit.h Wed Feb 12 13:31:36 2020 (r357818) +++ head/sys/netinet/tcp_ratelimit.h Wed Feb 12 13:37:53 2020 (r357819) @@ -88,9 +88,6 @@ CK_LIST_HEAD(head_tcp_rate_set, tcp_rate_set); #define RS_PACING_SUB_OK 0x0010 /* If a rate can't be found get the * next best rate (highest or lowest). */ #ifdef _KERNEL -#ifndef ETHERNET_SEGMENT_SIZE -#define ETHERNET_SEGMENT_SIZE 1514 -#endif #ifdef RATELIMIT #define DETAILED_RATELIMIT_SYSCTL 1 /* * Undefine this if you don't want @@ -138,17 +135,7 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_tabl { return; } + #endif -/* - * Given a b/w and a segsiz, and optional hardware - * rate limit, return the ideal size to burst - * out at once. Note the parameter can_use_1mss - * dictates if the transport will tolerate a 1mss - * limit, if not it will bottom out at 2mss (think - * delayed ack). - */ -uint32_t -tcp_get_pacing_mss(uint64_t bw, uint32_t segsiz, int can_use_1mss, - const struct tcp_hwrate_limit_table *te); #endif #endif From owner-svn-src-all@freebsd.org Wed Feb 12 13:58:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A6F3238DD5; Wed, 12 Feb 2020 13:58:38 +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) server-signature RSA-PSS (4096 bits) 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 48Hh7f2LZ4z4QsZ; Wed, 12 Feb 2020 13:58:38 +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 47A37222F2; Wed, 12 Feb 2020 13:58:38 +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 01CDwciP081939; Wed, 12 Feb 2020 13:58:38 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CDwcEV081938; Wed, 12 Feb 2020 13:58:38 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202002121358.01CDwcEV081938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 12 Feb 2020 13:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357820 - 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: 357820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 13:58:38 -0000 Author: mhorne Date: Wed Feb 12 13:58:37 2020 New Revision: 357820 URL: https://svnweb.freebsd.org/changeset/base/357820 Log: RISC-V: un-ifdef vm.kvm_size and vm.kvm_free Fix formatting and add CTLFLAG_MPSAFE. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23522 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Wed Feb 12 13:37:53 2020 (r357819) +++ head/sys/riscv/riscv/pmap.c Wed Feb 12 13:58:37 2020 (r357820) @@ -1436,7 +1436,6 @@ pmap_release(pmap_t pmap) vm_page_free(m); } -#if 0 static int kvm_size(SYSCTL_HANDLER_ARGS) { @@ -1444,8 +1443,9 @@ kvm_size(SYSCTL_HANDLER_ARGS) return sysctl_handle_long(oidp, &ksize, 0, req); } -SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_size, "LU", "Size of KVM"); +SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_MPSAFE, + 0, 0, kvm_size, "LU", + "Size of KVM"); static int kvm_free(SYSCTL_HANDLER_ARGS) @@ -1454,9 +1454,9 @@ kvm_free(SYSCTL_HANDLER_ARGS) return sysctl_handle_long(oidp, &kfree, 0, req); } -SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, - 0, 0, kvm_free, "LU", "Amount of KVM free"); -#endif /* 0 */ +SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG | CTLFLAG_RD | CTLFLAG_MPSAFE, + 0, 0, kvm_free, "LU", + "Amount of KVM free"); /* * grow the number of kernel page table entries, if needed From owner-svn-src-all@freebsd.org Wed Feb 12 14:06:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CB3B23911C; Wed, 12 Feb 2020 14:06:03 +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) server-signature RSA-PSS (4096 bits) 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 48HhJC0PZKz4RcN; Wed, 12 Feb 2020 14:06:03 +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 E4E96224EC; Wed, 12 Feb 2020 14:06:02 +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 01CE62KI088165; Wed, 12 Feb 2020 14:06:02 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CE62BD088164; Wed, 12 Feb 2020 14:06:02 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202002121406.01CE62BD088164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 12 Feb 2020 14:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357821 - 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: 357821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 14:06:03 -0000 Author: mhorne Date: Wed Feb 12 14:06:02 2020 New Revision: 357821 URL: https://svnweb.freebsd.org/changeset/base/357821 Log: Implement vm.pmap.kernel_maps for RISC-V This is taken from the arm64 version, with the following simplifications: - Our current pmap implementation uses a 3-level paging scheme - The "mode" field has been omitted since RISC-V PTEs don't encode typical mode attributes Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23594 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Wed Feb 12 13:58:37 2020 (r357820) +++ head/sys/riscv/riscv/pmap.c Wed Feb 12 14:06:02 2020 (r357821) @@ -131,6 +131,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -4487,3 +4488,170 @@ pmap_get_tables(pmap_t pmap, vm_offset_t va, pd_entry_ return (true); } + +/* + * Track a range of the kernel's virtual address space that is contiguous + * in various mapping attributes. + */ +struct pmap_kernel_map_range { + vm_offset_t sva; + pt_entry_t attrs; + int l3pages; + int l2pages; + int l1pages; +}; + +static void +sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range, + vm_offset_t eva) +{ + + if (eva <= range->sva) + return; + + sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c %d %d %d\n", + range->sva, eva, + (range->attrs & PTE_W) == PTE_W ? 'w' : '-', + (range->attrs & PTE_X) == PTE_X ? 'x' : '-', + (range->attrs & PTE_U) == PTE_U ? 'u' : 's', + (range->attrs & PTE_G) == PTE_G ? 'g' : '-', + range->l1pages, range->l2pages, range->l3pages); + + /* Reset to sentinel value. */ + range->sva = 0xfffffffffffffffful; +} + +/* + * Determine whether the attributes specified by a page table entry match those + * being tracked by the current range. + */ +static bool +sysctl_kmaps_match(struct pmap_kernel_map_range *range, pt_entry_t attrs) +{ + + return (range->attrs == attrs); +} + +static void +sysctl_kmaps_reinit(struct pmap_kernel_map_range *range, vm_offset_t va, + pt_entry_t attrs) +{ + + memset(range, 0, sizeof(*range)); + range->sva = va; + range->attrs = attrs; +} + +/* + * Given a leaf PTE, derive the mapping's attributes. If they do not match + * those of the current run, dump the address range and its attributes, and + * begin a new run. + */ +static void +sysctl_kmaps_check(struct sbuf *sb, struct pmap_kernel_map_range *range, + vm_offset_t va, pd_entry_t l1e, pd_entry_t l2e, pt_entry_t l3e) +{ + pt_entry_t attrs; + + /* The PTE global bit is inherited by lower levels. */ + attrs = l1e & PTE_G; + if ((l1e & PTE_RWX) != 0) + attrs |= l1e & (PTE_RWX | PTE_U); + else if (l2e != 0) + attrs |= l2e & PTE_G; + if ((l2e & PTE_RWX) != 0) + attrs |= l2e & (PTE_RWX | PTE_U); + else if (l3e != 0) + attrs |= l3e & (PTE_RWX | PTE_U | PTE_G); + + if (range->sva > va || !sysctl_kmaps_match(range, attrs)) { + sysctl_kmaps_dump(sb, range, va); + sysctl_kmaps_reinit(range, va, attrs); + } +} + +static int +sysctl_kmaps(SYSCTL_HANDLER_ARGS) +{ + struct pmap_kernel_map_range range; + struct sbuf sbuf, *sb; + pd_entry_t l1e, *l2, l2e; + pt_entry_t *l3, l3e; + vm_offset_t sva; + vm_paddr_t pa; + int error, i, j, k; + + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + sb = &sbuf; + sbuf_new_for_sysctl(sb, NULL, PAGE_SIZE, req); + + /* Sentinel value. */ + range.sva = 0xfffffffffffffffful; + + /* + * Iterate over the kernel page tables without holding the kernel pmap + * lock. Kernel page table pages are never freed, so at worst we will + * observe inconsistencies in the output. + */ + sva = VM_MIN_KERNEL_ADDRESS; + for (i = pmap_l1_index(sva); i < Ln_ENTRIES; i++) { + if (i == pmap_l1_index(DMAP_MIN_ADDRESS)) + sbuf_printf(sb, "\nDirect map:\n"); + else if (i == pmap_l1_index(VM_MIN_KERNEL_ADDRESS)) + sbuf_printf(sb, "\nKernel map:\n"); + + l1e = kernel_pmap->pm_l1[i]; + if ((l1e & PTE_V) == 0) { + sysctl_kmaps_dump(sb, &range, sva); + sva += L1_SIZE; + continue; + } + if ((l1e & PTE_RWX) != 0) { + sysctl_kmaps_check(sb, &range, sva, l1e, 0, 0); + range.l1pages++; + sva += L1_SIZE; + continue; + } + pa = PTE_TO_PHYS(l1e); + l2 = (pd_entry_t *)PHYS_TO_DMAP(pa); + + for (j = pmap_l2_index(sva); j < Ln_ENTRIES; j++) { + l2e = l2[j]; + if ((l2e & PTE_V) == 0) { + sysctl_kmaps_dump(sb, &range, sva); + sva += L2_SIZE; + continue; + } + if ((l2e & PTE_RWX) != 0) { + sysctl_kmaps_check(sb, &range, sva, l1e, l2e, 0); + range.l2pages++; + sva += L2_SIZE; + continue; + } + pa = PTE_TO_PHYS(l2e); + l3 = (pd_entry_t *)PHYS_TO_DMAP(pa); + + for (k = pmap_l3_index(sva); k < Ln_ENTRIES; k++, + sva += L3_SIZE) { + l3e = l3[k]; + if ((l3e & PTE_V) == 0) { + sysctl_kmaps_dump(sb, &range, sva); + continue; + } + sysctl_kmaps_check(sb, &range, sva, + l1e, l2e, l3e); + range.l3pages++; + } + } + } + + error = sbuf_finish(sb); + sbuf_delete(sb); + return (error); +} +SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, 0, sysctl_kmaps, "A", + "Dump kernel address layout"); From owner-svn-src-all@freebsd.org Wed Feb 12 14:50:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4929B239CFB; Wed, 12 Feb 2020 14:50:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HjHB1CRBz4TXS; Wed, 12 Feb 2020 14:50:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 065F822D00; Wed, 12 Feb 2020 14:50:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CEoDAj012200; Wed, 12 Feb 2020 14:50:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CEoDiW012198; Wed, 12 Feb 2020 14:50:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202002121450.01CEoDiW012198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 12 Feb 2020 14:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357822 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 357822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 14:50:14 -0000 Author: gjb Date: Wed Feb 12 14:50:13 2020 New Revision: 357822 URL: https://svnweb.freebsd.org/changeset/base/357822 Log: MFC r332404 (kp): pf: limit ioctl to a reasonable and tuneable number of elements pf ioctls frequently take a variable number of elements as argument. This can potentially allow users to request very large allocations. These will fail, but even a failing M_NOWAIT might tie up resources and result in concurrent M_WAITOK allocations entering vm_wait and inducing reclamation of caches. Limit these ioctls to what should be a reasonable value, but allow users to tune it should they need to. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/sys/netpfil/pf/pf.c stable/11/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Wed Feb 12 14:06:02 2020 (r357821) +++ stable/11/sys/netpfil/pf/pf.c Wed Feb 12 14:50:13 2020 (r357822) @@ -363,11 +363,14 @@ u_long pf_hashmask; u_long pf_srchashmask; static u_long pf_hashsize; static u_long pf_srchashsize; +u_long pf_ioctl_maxcount = 65535; SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_RDTUN, &pf_hashsize, 0, "Size of pf(4) states hashtable"); SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, &pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); +SYSCTL_ULONG(_net_pf, OID_AUTO, request_maxcount, CTLFLAG_RDTUN, + &pf_ioctl_maxcount, 0, "Maximum number of tables, addresses, ... in a single ioctl() call"); VNET_DEFINE(void *, pf_swi_cookie); Modified: stable/11/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/11/sys/netpfil/pf/pf_ioctl.c Wed Feb 12 14:06:02 2020 (r357821) +++ stable/11/sys/netpfil/pf/pf_ioctl.c Wed Feb 12 14:50:13 2020 (r357822) @@ -86,8 +86,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#define PF_TABLES_MAX_REQUEST 65535 /* Maximum tables per request. */ - static struct pf_pool *pf_get_pool(char *, u_int32_t, u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t); @@ -215,6 +213,8 @@ pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; /* pflog */ pflog_packet_t *pflog_packet_ptr = NULL; +extern u_long pf_ioctl_maxcount; + static void pfattach_vnet(void) { @@ -2528,7 +2528,8 @@ DIOCCHANGEADDR_error: break; } - if (io->pfrio_size < 0 || io->pfrio_size > PF_TABLES_MAX_REQUEST) { + if (io->pfrio_size < 0 || io->pfrio_size > pf_ioctl_maxcount || + WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_table))) { error = ENOMEM; break; } @@ -2559,7 +2560,8 @@ DIOCCHANGEADDR_error: break; } - if (io->pfrio_size < 0 || io->pfrio_size > PF_TABLES_MAX_REQUEST) { + if (io->pfrio_size < 0 || io->pfrio_size > pf_ioctl_maxcount || + WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_table))) { error = ENOMEM; break; } @@ -2732,6 +2734,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -2769,6 +2772,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -2810,7 +2814,8 @@ DIOCCHANGEADDR_error: break; } count = max(io->pfrio_size, io->pfrio_size2); - if (WOULD_OVERFLOW(count, sizeof(struct pfr_addr))) { + if (count > pf_ioctl_maxcount || + WOULD_OVERFLOW(count, sizeof(struct pfr_addr))) { error = EINVAL; break; } @@ -2848,6 +2853,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -2879,6 +2885,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_astats))) { error = EINVAL; break; @@ -2910,6 +2917,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -2947,6 +2955,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -2984,6 +2993,7 @@ DIOCCHANGEADDR_error: break; } if (io->pfrio_size < 0 || + io->pfrio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfrio_size, sizeof(struct pfr_addr))) { error = EINVAL; break; @@ -3036,6 +3046,7 @@ DIOCCHANGEADDR_error: break; } if (io->size < 0 || + io->size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->size, sizeof(struct pfioc_trans_e))) { error = EINVAL; break; @@ -3112,6 +3123,7 @@ DIOCCHANGEADDR_error: break; } if (io->size < 0 || + io->size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->size, sizeof(struct pfioc_trans_e))) { error = EINVAL; break; @@ -3189,6 +3201,7 @@ DIOCCHANGEADDR_error: } if (io->size < 0 || + io->size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->size, sizeof(struct pfioc_trans_e))) { error = EINVAL; break; @@ -3407,6 +3420,7 @@ DIOCCHANGEADDR_error: } if (io->pfiio_size < 0 || + io->pfiio_size > pf_ioctl_maxcount || WOULD_OVERFLOW(io->pfiio_size, sizeof(struct pfi_kif))) { error = EINVAL; break; From owner-svn-src-all@freebsd.org Wed Feb 12 15:26:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49EAB23B1C7; Wed, 12 Feb 2020 15:26:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hk5Y1B4fz4WXP; Wed, 12 Feb 2020 15:26:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F83823489; Wed, 12 Feb 2020 15:26:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CFQuMO036092; Wed, 12 Feb 2020 15:26:56 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CFQun3036091; Wed, 12 Feb 2020 15:26:56 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <202002121526.01CFQun3036091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 12 Feb 2020 15:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357823 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 15:26:57 -0000 Author: rrs Date: Wed Feb 12 15:26:56 2020 New Revision: 357823 URL: https://svnweb.freebsd.org/changeset/base/357823 Log: Lets get the real correct version.. gessh. I need more coffee evidently. Sponsored by: Netflix Modified: head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Feb 12 14:50:13 2020 (r357822) +++ head/sys/netinet/tcp_ratelimit.c Wed Feb 12 15:26:56 2020 (r357823) @@ -49,9 +49,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define TCPSTATES /* for logging */ +#include +#include #include #include +#define TCPSTATES /* for logging */ #include #ifdef INET6 #include @@ -284,7 +286,7 @@ rs_defer_destroy(struct tcp_rate_set *rs) /* Set flag to only defer once. */ rs->rs_flags |= RS_FUNERAL_SCHD; - epoch_call(net_epoch, &rs->rs_epoch_ctx, rs_destroy); + NET_EPOCH_CALL(rs_destroy, &rs->rs_epoch_ctx); } #ifdef INET @@ -878,7 +880,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, ui struct epoch_tracker et; int err; - epoch_enter_preempt(net_epoch_preempt, &et); + NET_EPOCH_ENTER(et); use_real_interface: CK_LIST_FOREACH(rs, &int_rs, next) { /* @@ -911,14 +913,14 @@ use_real_interface: */ if (rs->rs_disable && error) *error = ENODEV; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } if ((rs == NULL) || (rs->rs_disable != 0)) { if (rs->rs_disable && error) *error = ENOSPC; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } if (rs->rs_flags & RS_IS_DEFF) { @@ -929,7 +931,7 @@ use_real_interface: if (tifp == NULL) { if (rs->rs_disable && error) *error = ENOTSUP; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } goto use_real_interface; @@ -938,7 +940,7 @@ use_real_interface: ((rs->rs_flows_using + 1) > rs->rs_flow_limit)) { if (error) *error = ENOSPC; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } rte = tcp_find_suitable_rate(rs, bytes_per_sec, flags); @@ -962,7 +964,7 @@ use_real_interface: */ atomic_add_64(&rs->rs_flows_using, 1); } - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (rte); } From owner-svn-src-all@freebsd.org Wed Feb 12 15:46:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36E5423B7F6; Wed, 12 Feb 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) server-signature RSA-PSS (4096 bits) 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 48HkXB0WBLz4Xh5; Wed, 12 Feb 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 0CBD5238DC; Wed, 12 Feb 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 01CFkXB9048619; Wed, 12 Feb 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 01CFkXfb048618; Wed, 12 Feb 2020 15:46:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002121546.01CFkXfb048618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 12 Feb 2020 15:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357824 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 357824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 15:46:34 -0000 Author: markj Date: Wed Feb 12 15:46:33 2020 New Revision: 357824 URL: https://svnweb.freebsd.org/changeset/base/357824 Log: MFC r357573: Fix map locking in the CLEAR_PKRU sysarch(2) handler. Modified: stable/12/sys/amd64/amd64/sys_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/sys_machdep.c Wed Feb 12 15:26:56 2020 (r357823) +++ stable/12/sys/amd64/amd64/sys_machdep.c Wed Feb 12 15:46:33 2020 (r357824) @@ -380,7 +380,7 @@ sysarch(struct thread *td, struct sysarch_args *uap) error = pmap_pkru_clear(PCPU_GET(curpmap), (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + a64pkru.len); - vm_map_unlock(map); + vm_map_unlock_read(map); break; default: From owner-svn-src-all@freebsd.org Wed Feb 12 15:51:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7AC923BAED; Wed, 12 Feb 2020 15:51:29 +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) server-signature RSA-PSS (4096 bits) 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 48Hkds4Wc8z4Y66; Wed, 12 Feb 2020 15:51:29 +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 9672D23986; Wed, 12 Feb 2020 15:51:29 +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 01CFpTxR051721; Wed, 12 Feb 2020 15:51:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CFpTZR051720; Wed, 12 Feb 2020 15:51:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002121551.01CFpTZR051720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 12 Feb 2020 15:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357825 - stable/12/lib/libc/net X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/lib/libc/net X-SVN-Commit-Revision: 357825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 15:51:29 -0000 Author: markj Date: Wed Feb 12 15:51:29 2020 New Revision: 357825 URL: https://svnweb.freebsd.org/changeset/base/357825 Log: MFC r357575: Improve validation of the sockaddr length in iruserok_sa(). PR: 243747 Modified: stable/12/lib/libc/net/rcmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/rcmd.c ============================================================================== --- stable/12/lib/libc/net/rcmd.c Wed Feb 12 15:46:33 2020 (r357824) +++ stable/12/lib/libc/net/rcmd.c Wed Feb 12 15:51:29 2020 (r357825) @@ -438,8 +438,8 @@ iruserok_sa(const void *ra, int rlen, int superuser, c struct sockaddr_storage ss; /* avoid alignment issue */ - if (rlen > sizeof(ss)) - return(-1); + if (rlen <= 0 || rlen > sizeof(ss)) + return (-1); memcpy(&ss, ra, rlen); raddr = (struct sockaddr *)&ss; From owner-svn-src-all@freebsd.org Wed Feb 12 16:00:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FF8323BCDF; Wed, 12 Feb 2020 16:00:01 +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) server-signature RSA-PSS (4096 bits) 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 48Hkqh6X49z4YV7; Wed, 12 Feb 2020 16:00:00 +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 DB74A23B44; Wed, 12 Feb 2020 16:00:00 +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 01CG00jL054853; Wed, 12 Feb 2020 16:00:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CG00Lf054776; Wed, 12 Feb 2020 16:00:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121600.01CG00Lf054776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 16:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357826 - in head/contrib/elftoolchain: elfcopy libelftc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/contrib/elftoolchain: elfcopy libelftc X-SVN-Commit-Revision: 357826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 16:00:01 -0000 Author: emaste Date: Wed Feb 12 15:59:59 2020 New Revision: 357826 URL: https://svnweb.freebsd.org/changeset/base/357826 Log: elfcopy: set ELF OS/ABI field when converting from binary PR: 228934 Submitted by: Tiger Gao Reviewed by: markj, jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23504 Modified: head/contrib/elftoolchain/elfcopy/main.c head/contrib/elftoolchain/libelftc/elftc.3 head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c head/contrib/elftoolchain/libelftc/libelftc.h Modified: head/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/main.c Wed Feb 12 15:51:29 2020 (r357825) +++ head/contrib/elftoolchain/elfcopy/main.c Wed Feb 12 15:59:59 2020 (r357826) @@ -1394,6 +1394,7 @@ set_output_target(struct elfcopy *ecp, const char *tar ecp->oec = elftc_bfd_target_class(tgt); ecp->oed = elftc_bfd_target_byteorder(tgt); ecp->oem = elftc_bfd_target_machine(tgt); + ecp->abi = elftc_bfd_target_osabi(tgt); } if (ecp->otf == ETF_EFI || ecp->otf == ETF_PE) ecp->oem = elftc_bfd_target_machine(tgt); Modified: head/contrib/elftoolchain/libelftc/elftc.3 ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc.3 Wed Feb 12 15:51:29 2020 (r357825) +++ head/contrib/elftoolchain/libelftc/elftc.3 Wed Feb 12 15:59:59 2020 (r357826) @@ -23,7 +23,7 @@ .\" .\" $Id: elftc.3 3645 2018-10-15 20:17:14Z jkoshy $ .\" -.Dd December 24, 2012 +.Dd February 12, 2020 .Dt ELFTC 3 .Os .Sh NAME @@ -57,6 +57,8 @@ Query the byte order for a binary object descriptor. Query the object format for a binary object descriptor. .It Fn elftc_bfd_target_machine Query the target machine for a binary object descriptor. +.It Fn elftc_bfd_target_osabi +Query the target osabi for a binary object descriptor. .El .It "C++ support" .Bl -tag -compact -width indent Modified: head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Wed Feb 12 15:51:29 2020 (r357825) +++ head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Wed Feb 12 15:59:59 2020 (r357826) @@ -23,7 +23,7 @@ .\" .\" $Id: elftc_bfd_find_target.3 3752 2019-06-28 01:12:53Z emaste $ .\" -.Dd June 27, 2019 +.Dd February 12, 2020 .Dt ELFTC_BFD_FIND_TARGET 3 .Os .Sh NAME @@ -48,6 +48,8 @@ .Fn elftc_bfd_target_flavor "Elftc_Bfd_Target *target" .Ft "unsigned int" .Fn elftc_bfd_target_machine "Elftc_Bfd_Target *target" +.Ft "unsigned int" +.Fn elftc_bfd_target_osabi "Elftc_Bfd_Target *target" .Sh DESCRIPTION Function .Fn elftc_bfd_find_target Modified: head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c Wed Feb 12 15:51:29 2020 (r357825) +++ head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c Wed Feb 12 15:59:59 2020 (r357826) @@ -71,3 +71,10 @@ elftc_bfd_target_machine(Elftc_Bfd_Target *tgt) return (tgt->bt_machine); } + +unsigned int +elftc_bfd_target_osabi(Elftc_Bfd_Target *tgt) +{ + + return (tgt->bt_osabi); +} Modified: head/contrib/elftoolchain/libelftc/libelftc.h ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc.h Wed Feb 12 15:51:29 2020 (r357825) +++ head/contrib/elftoolchain/libelftc/libelftc.h Wed Feb 12 15:59:59 2020 (r357826) @@ -72,6 +72,7 @@ Elftc_Bfd_Target_Flavor elftc_bfd_target_flavor(Elftc unsigned int elftc_bfd_target_byteorder(Elftc_Bfd_Target *_tgt); unsigned int elftc_bfd_target_class(Elftc_Bfd_Target *_tgt); unsigned int elftc_bfd_target_machine(Elftc_Bfd_Target *_tgt); +unsigned int elftc_bfd_target_osabi(Elftc_Bfd_Target *_tgt); int elftc_copyfile(int _srcfd, int _dstfd); int elftc_demangle(const char *_mangledname, char *_buffer, size_t _bufsize, unsigned int _flags); From owner-svn-src-all@freebsd.org Wed Feb 12 16:09:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81FAB23C0B1; Wed, 12 Feb 2020 16:09: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) server-signature RSA-PSS (4096 bits) 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 48Hl262rL3z4Z71; Wed, 12 Feb 2020 16:09: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 5826F23D66; Wed, 12 Feb 2020 16:09: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 01CG92Tk060511; Wed, 12 Feb 2020 16:09:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CG92UW060510; Wed, 12 Feb 2020 16:09:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002121609.01CG92UW060510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 16:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357827 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 357827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 16:09:02 -0000 Author: kevans Date: Wed Feb 12 16:09:01 2020 New Revision: 357827 URL: https://svnweb.freebsd.org/changeset/base/357827 Log: lualoader: disable autoboot on high-level interpreter errors If we hit an error at this level, we are almost certainly not in any kind of sane state where autoboot can do the right thing. Instead of letting it try and probably failing, disable autoboot so they immediately get kicked into a loader prompt for manual remediation/diagnosis. Reviewed by: tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23611 Modified: head/stand/common/interp_lua.c Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Wed Feb 12 15:59:59 2020 (r357826) +++ head/stand/common/interp_lua.c Wed Feb 12 16:09:01 2020 (r357827) @@ -128,6 +128,7 @@ interp_init(void) errstr = errstr == NULL ? "unknown" : errstr; printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); lua_pop(luap, 1); + setenv("autoboot_delay", "NO", 1); } } From owner-svn-src-all@freebsd.org Wed Feb 12 16:10:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40F3523C144; Wed, 12 Feb 2020 16:10:01 +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) server-signature RSA-PSS (4096 bits) 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 48Hl3F11WXz4ZG2; Wed, 12 Feb 2020 16:10:01 +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 1E31B23D6D; Wed, 12 Feb 2020 16:10:01 +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 01CGA0GT060636; Wed, 12 Feb 2020 16:10:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CGA0PA060635; Wed, 12 Feb 2020 16:10:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002121610.01CGA0PA060635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 16:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357828 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 357828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 16:10:01 -0000 Author: kevans Date: Wed Feb 12 16:10:00 2020 New Revision: 357828 URL: https://svnweb.freebsd.org/changeset/base/357828 Log: interp_lua: fix bogus indentation, NFC Modified: head/stand/common/interp_lua.c Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Wed Feb 12 16:09:01 2020 (r357827) +++ head/stand/common/interp_lua.c Wed Feb 12 16:10:00 2020 (r357828) @@ -124,10 +124,10 @@ interp_init(void) filename = LOADER_LUA; if (interp_include(filename) != 0) { - const char *errstr = lua_tostring(luap, -1); - errstr = errstr == NULL ? "unknown" : errstr; - printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); - lua_pop(luap, 1); + const char *errstr = lua_tostring(luap, -1); + errstr = errstr == NULL ? "unknown" : errstr; + printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); + lua_pop(luap, 1); setenv("autoboot_delay", "NO", 1); } } @@ -144,7 +144,7 @@ interp_run(const char *line) luap = softc->luap; LDBG("executing line..."); if ((status = luaL_dostring(luap, line)) != 0) { - lua_pop(luap, 1); + lua_pop(luap, 1); /* * The line wasn't executable as lua; run it through parse to * to get consistent parsing of command line arguments, then From owner-svn-src-all@freebsd.org Wed Feb 12 17:02:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7309423D444; Wed, 12 Feb 2020 17:02:16 +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) server-signature RSA-PSS (4096 bits) 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 48HmCX2XYbz4dd2; Wed, 12 Feb 2020 17:02:16 +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 525C0249AC; Wed, 12 Feb 2020 17:02:16 +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 01CH2GXW096584; Wed, 12 Feb 2020 17:02:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CH2GuS096583; Wed, 12 Feb 2020 17:02:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002121702.01CH2GuS096583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 12 Feb 2020 17:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357829 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:02:16 -0000 Author: tuexen Date: Wed Feb 12 17:02:15 2020 New Revision: 357829 URL: https://svnweb.freebsd.org/changeset/base/357829 Log: Mark the socket as disconnected when freeing the association the first time. This issue was found by running syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Feb 12 16:10:00 2020 (r357828) +++ head/sys/netinet/sctp_pcb.c Wed Feb 12 17:02:15 2020 (r357829) @@ -4744,6 +4744,31 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc else so = inp->sctp_socket; + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { + /* + * For TCP type we need special handling when we are + * connected. We also include the peel'ed off ones to. + */ + if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { + inp->sctp_flags &= ~SCTP_PCB_FLAGS_CONNECTED; + inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED; + if (so) { + SOCKBUF_LOCK(&so->so_rcv); + so->so_state &= ~(SS_ISCONNECTING | + SS_ISDISCONNECTING | + SS_ISCONFIRMING | + SS_ISCONNECTED); + so->so_state |= SS_ISDISCONNECTED; + socantrcvmore_locked(so); + socantsendmore(so); + sctp_sowwakeup(inp, so); + sctp_sorwakeup(inp, so); + SCTP_SOWAKEUP(so); + } + } + } + /* * We used timer based freeing if a reader or writer is in the way. * So we first check if we are actually being called from a timer, @@ -4870,31 +4895,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) /* nothing around */ so = NULL; - - if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || - (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - /* - * For TCP type we need special handling when we are - * connected. We also include the peel'ed off ones to. - */ - if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { - inp->sctp_flags &= ~SCTP_PCB_FLAGS_CONNECTED; - inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED; - if (so) { - SOCKBUF_LOCK(&so->so_rcv); - so->so_state &= ~(SS_ISCONNECTING | - SS_ISDISCONNECTING | - SS_ISCONFIRMING | - SS_ISCONNECTED); - so->so_state |= SS_ISDISCONNECTED; - socantrcvmore_locked(so); - socantsendmore(so); - sctp_sowwakeup(inp, so); - sctp_sorwakeup(inp, so); - SCTP_SOWAKEUP(so); - } - } - } /* * Make it invalid too, that way if its about to run it will abort From owner-svn-src-all@freebsd.org Wed Feb 12 17:05:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FD2E23D7C1; Wed, 12 Feb 2020 17:05:11 +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) server-signature RSA-PSS (4096 bits) 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 48HmGv3MYWz4f0x; Wed, 12 Feb 2020 17:05:11 +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 6E8F324A29; Wed, 12 Feb 2020 17:05:11 +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 01CH5BoJ096772; Wed, 12 Feb 2020 17:05:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CH5Bin096771; Wed, 12 Feb 2020 17:05:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002121705.01CH5Bin096771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 12 Feb 2020 17:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357830 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:05:11 -0000 Author: tuexen Date: Wed Feb 12 17:05:10 2020 New Revision: 357830 URL: https://svnweb.freebsd.org/changeset/base/357830 Log: Don't panic under INVARIANTS when we can't allocate memory for storing a vtag in time wait. This issue was found by running syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Feb 12 17:02:15 2020 (r357829) +++ head/sys/netinet/sctp_pcb.c Wed Feb 12 17:05:10 2020 (r357830) @@ -4634,9 +4634,6 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, SCTP_MALLOC(twait_block, struct sctp_tagblock *, sizeof(struct sctp_tagblock), SCTP_M_TIMW); if (twait_block == NULL) { -#ifdef INVARIANTS - panic("Can not alloc tagblock"); -#endif return; } memset(twait_block, 0, sizeof(struct sctp_tagblock)); From owner-svn-src-all@freebsd.org Wed Feb 12 17:12:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57BC323DACF; Wed, 12 Feb 2020 17:12:27 +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) server-signature RSA-PSS (4096 bits) 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 48HmRH1XDrz4fWd; Wed, 12 Feb 2020 17:12:27 +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 2FD0224C23; Wed, 12 Feb 2020 17:12:27 +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 01CHCQh9002472; Wed, 12 Feb 2020 17:12:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CHCQ2c002471; Wed, 12 Feb 2020 17:12:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121712.01CHCQ2c002471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 17:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357831 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:12:27 -0000 Author: emaste Date: Wed Feb 12 17:12:26 2020 New Revision: 357831 URL: https://svnweb.freebsd.org/changeset/base/357831 Log: Allow fdatasync in capability mode fdatasync is essentially a subset of fsync (and may be exactly fsync, depending on filesystem and development effort) and operates only on a provided fd. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Wed Feb 12 17:05:10 2020 (r357830) +++ head/sys/kern/capabilities.conf Wed Feb 12 17:12:26 2020 (r357831) @@ -224,6 +224,7 @@ fstatfs ## Allow further file descriptor-based I/O operations, subject to capability ## rights. ## +fdatasync fsync ftruncate From owner-svn-src-all@freebsd.org Wed Feb 12 17:26:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4608623E2C1; Wed, 12 Feb 2020 17:26:10 +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) server-signature RSA-PSS (4096 bits) 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 48Hml60LMyz3ByB; Wed, 12 Feb 2020 17:26:09 +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 01CHQ8bd004341 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 12 Feb 2020 09:26:08 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 01CHQ8UV004340; Wed, 12 Feb 2020 09:26:08 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 12 Feb 2020 09:26:08 -0800 From: Gleb Smirnoff To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357805 - head/sys/amd64/include Message-ID: <20200212172608.GD1253@FreeBSD.org> References: <202002121112.01CBCExs085630@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002121112.01CBCExs085630@repo.freebsd.org> X-Rspamd-Queue-Id: 48Hml60LMyz3ByB X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:26:10 -0000 On Wed, Feb 12, 2020 at 11:12:14AM +0000, Mateusz Guzik wrote: M> Author: mjg M> Date: Wed Feb 12 11:12:13 2020 M> New Revision: 357805 M> URL: https://svnweb.freebsd.org/changeset/base/357805 M> M> Log: M> amd64: store per-cpu allocations subtracted by __pcpu M> M> This eliminates a runtime subtraction from counter_u64_add. M> M> before: M> mov 0x4f00ed(%rip),%rax # 0xffffffff80c01788 M> sub 0x808ff6(%rip),%rax # 0xffffffff80f1a698 <__pcpu> M> addq $0x1,%gs:(%rax) M> M> after: M> mov 0x4f02fd(%rip),%rax # 0xffffffff80c01788 M> addq $0x1,%gs:(%rax) M> M> Reviewed by: jeff M> Differential Revision: https://reviews.freebsd.org/D23570 Neat optimization! Thanks. Why didn't we do it back when created counter? -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Wed Feb 12 17:30:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CAA723E3ED; Wed, 12 Feb 2020 17:30:10 +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) server-signature RSA-PSS (4096 bits) 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 48Hmqk1JNkz3CF6; Wed, 12 Feb 2020 17:30:10 +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 27EE424E0D; Wed, 12 Feb 2020 17:30:10 +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 01CHUAqw009392; Wed, 12 Feb 2020 17:30:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CHUAEd009391; Wed, 12 Feb 2020 17:30:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121730.01CHUAEd009391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 17:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357832 - head/usr.sbin/rmt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/rmt X-SVN-Commit-Revision: 357832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:30:10 -0000 Author: emaste Date: Wed Feb 12 17:30:09 2020 New Revision: 357832 URL: https://svnweb.freebsd.org/changeset/base/357832 Log: tag /etc/rmt symlink with pkgbase package For historical reasons the "remote magtape protocol module" rmt gets invoked as /etc/rmt, which is a symlink to /usr/sbin/rmt. Put it in the utilities package, as /usr/sbin/rmt is. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/rmt/Makefile Modified: head/usr.sbin/rmt/Makefile ============================================================================== --- head/usr.sbin/rmt/Makefile Wed Feb 12 17:12:26 2020 (r357831) +++ head/usr.sbin/rmt/Makefile Wed Feb 12 17:30:09 2020 (r357832) @@ -7,6 +7,7 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ${INSTALL_RSYMLINK} ..${BINDIR}/rmt ${DESTDIR}/etc/rmt + ${INSTALL_RSYMLINK} -T "package=utilities" \ + ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-all@freebsd.org Wed Feb 12 17:37:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31F6C23E6D6; Wed, 12 Feb 2020 17:37:33 +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) server-signature RSA-PSS (4096 bits) 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 48Hn0F0Zk1z3Cjk; Wed, 12 Feb 2020 17:37:33 +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 0AAEC24FF4; Wed, 12 Feb 2020 17:37:33 +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 01CHbWDQ014938; Wed, 12 Feb 2020 17:37:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CHbWCN014937; Wed, 12 Feb 2020 17:37:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121737.01CHbWCN014937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 17:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357833 - head/tests/sys/pjdfstest/tests X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tests/sys/pjdfstest/tests X-SVN-Commit-Revision: 357833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:37:33 -0000 Author: emaste Date: Wed Feb 12 17:37:32 2020 New Revision: 357833 URL: https://svnweb.freebsd.org/changeset/base/357833 Log: Tag pjdfstest symlink with pkgbase package As with the rest of pjdfstest, tag the symlink with package=tests. The tests -> . symlink seems a little strange but that's independent of pkgbase. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/pjdfstest/tests/Makefile Modified: head/tests/sys/pjdfstest/tests/Makefile ============================================================================== --- head/tests/sys/pjdfstest/tests/Makefile Wed Feb 12 17:30:09 2020 (r357832) +++ head/tests/sys/pjdfstest/tests/Makefile Wed Feb 12 17:37:32 2020 (r357833) @@ -18,7 +18,7 @@ misc.sh: ${PJDFSTEST_SRCDIR}/tests/misc.sh afterinstall: install-tests-symlink install-tests-symlink: .PHONY rm -f ${DESTDIR}${TESTSDIR}/tests - ${INSTALL_SYMLINK} . ${DESTDIR}${TESTSDIR}/tests + ${INSTALL_SYMLINK} -T "package=tests" . ${DESTDIR}${TESTSDIR}/tests TESTS_SUBDIRS= chflags TESTS_SUBDIRS+= chmod From owner-svn-src-all@freebsd.org Wed Feb 12 17:46:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2FCA23EA54; Wed, 12 Feb 2020 17:46:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48HnBK4mv8z3DQH; Wed, 12 Feb 2020 17:46:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x344.google.com with SMTP id t14so3557744wmi.5; Wed, 12 Feb 2020 09:46:17 -0800 (PST) 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=VgEVR/ZyetrrwaJ9lZY2hyTLolr+7uQwgHVJzc9Yyw4=; b=hm6LQGCZMC5A8ix1Q5YnMk2I3dbWWTAp+IRBEVb2lY+q7wgbMtL6riW1H5SRi5+O2N rTyifDCaKK/4WG5XyGjMC/Znrh6EAVLwAexAm05RjVdKoa5e9zjs803fwqcyeL5jygNN 1KynlW33sgrPQj+6Vtn1o4WtWm5ZV83Bh1H6tsjAnczgEo3jqDstgvaCKjLz3iYGqnbr pzTHR4qqxGAL4mBiFN5FYIu8J3stbjhwxp0cOUDj96hhDxsW6X5pnxD579534TBpVwZE 2LwRk3Orcje9WdtaBNDDRWd192MslGQ1+QANn1xaHnztGeQtnIQJyA7BWuXF8Mk4siFF 2OwA== 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=VgEVR/ZyetrrwaJ9lZY2hyTLolr+7uQwgHVJzc9Yyw4=; b=jTqDQY8j7Hm8gt2aEEC8QQiOZkJB2gu+fT8WShIxtKSlUpx/k03x3MJDuKCJkGaYAj JhT0Q4Hd7Hi3pY8yifFyhLYp27W3auv0cIimgIrasYySDCmuKHIbIDTT5NUDRkpqVE2s 5/Nw45Bof2Ai0xnDMFMd0OA9Ml0SD3Fhc94cVA+CJJ9gBf2dZyaF1JYhTzPZbSkTPlhC NNIKcmoCXp9r8MJaaKhn2tLyH1F2rMgGBXaGeC/e6eNWsUytvl0MJvYKOr/kr0K243mz BPNRtwfa0bAaRv82rzapE3H0BCJ+psS6x3bI+vUWdKXXuu/5F5sahKmA2GseXNAMrT3q SkcQ== X-Gm-Message-State: APjAAAW3FL6moYELY7FM/GobqoJzqd8u/WT959cH+ReqwxEgQlWDGqmi yj2l8d+c5wW8EF9CUED+r095xL8c5IVmOBLxQ9qqVg== X-Google-Smtp-Source: APXvYqxYUS++NF/HRU+gQUDzkpKPzxlVgaDSjvrNiZMtLSwg73aOHz2BIjrCQnMoFSpE48yl4i6CsO1oDlZNVQ+nvNk= X-Received: by 2002:a1c:8055:: with SMTP id b82mr179420wmd.127.1581529575491; Wed, 12 Feb 2020 09:46:15 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:6b02:0:0:0:0:0 with HTTP; Wed, 12 Feb 2020 09:46:14 -0800 (PST) In-Reply-To: <20200212172608.GD1253@FreeBSD.org> References: <202002121112.01CBCExs085630@repo.freebsd.org> <20200212172608.GD1253@FreeBSD.org> From: Mateusz Guzik Date: Wed, 12 Feb 2020 18:46:14 +0100 Message-ID: Subject: Re: svn commit: r357805 - head/sys/amd64/include To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48HnBK4mv8z3DQH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 17:46:17 -0000 On 2/12/20, Gleb Smirnoff wrote: > On Wed, Feb 12, 2020 at 11:12:14AM +0000, Mateusz Guzik wrote: > M> Author: mjg > M> Date: Wed Feb 12 11:12:13 2020 > M> New Revision: 357805 > M> URL: https://svnweb.freebsd.org/changeset/base/357805 > M> > M> Log: > M> amd64: store per-cpu allocations subtracted by __pcpu > M> > M> This eliminates a runtime subtraction from counter_u64_add. > M> > M> before: > M> mov 0x4f00ed(%rip),%rax # 0xffffffff80c01788 > > M> sub 0x808ff6(%rip),%rax # 0xffffffff80f1a698 <__pcpu> > M> addq $0x1,%gs:(%rax) > M> > M> after: > M> mov 0x4f02fd(%rip),%rax # 0xffffffff80c01788 > > M> addq $0x1,%gs:(%rax) > M> > M> Reviewed by: jeff > M> Differential Revision: https://reviews.freebsd.org/D23570 > > Neat optimization! Thanks. Why didn't we do it back when created counter? > Don't look at me, I did not work on it. You can top it for counters like the above -- most actual counters are known to be there at compilatin time and they never disappear. Meaning that in the simplest case they can just be a part of one big array in struct pcpu. Then assembly could resort to addq $0x1,%gs:(someoffset) removing the mov loading the address -- faster single threaded and less cache use. I'm confident I noted this at least few times. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Wed Feb 12 18:09:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5296023F01F; Wed, 12 Feb 2020 18:09:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hnhx1SLvz3FZQ; Wed, 12 Feb 2020 18:09:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D2032557A; Wed, 12 Feb 2020 18:09:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CI9Ls7033428; Wed, 12 Feb 2020 18:09:21 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CI9KRL033426; Wed, 12 Feb 2020 18:09:20 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002121809.01CI9KRL033426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 12 Feb 2020 18:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357834 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 357834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 18:09:21 -0000 Author: brooks Date: Wed Feb 12 18:09:20 2020 New Revision: 357834 URL: https://svnweb.freebsd.org/changeset/base/357834 Log: Make the warning for deprecated NO_ variables an error. Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE, and NO_WARNS as deprecated in 2014 with a warning added for each one found. Turn these into error in preperation for removal of compatability support before FreeBSD 13. This was previously committed in r354909 and reverted in r355011 due to unforseen impacts on ports. I've since corrected all amd64 and i386 ports reported in prior runs as well as instance of these variables I found via grep. Modified: head/UPDATING head/share/mk/bsd.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Feb 12 17:37:32 2020 (r357833) +++ head/UPDATING Wed Feb 12 18:09:20 2020 (r357834) @@ -26,6 +26,14 @@ 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".) +20200212: + Defining the long deprecated NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, + NO_MAN, NO_PROFILE, and NO_WARNS variables is now an error. Update + your Makefiles and scripts to define MK_=no instead as required. + + One exception to this is that program or library Makefiles should + define MAN to empty rather than setting MK_MAN=no. + 20200108: Clang/LLVM is now the default compiler and LLD the default linker for riscv64. Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Wed Feb 12 17:37:32 2020 (r357833) +++ head/share/mk/bsd.opts.mk Wed Feb 12 18:09:20 2020 (r357834) @@ -100,7 +100,7 @@ __DEFAULT_DEPENDENT_OPTIONS = \ PROFILE \ WARNS .if defined(NO_${var}) -.warning "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead." +.error "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead." MK_${var}:=no .endif .endfor From owner-svn-src-all@freebsd.org Wed Feb 12 18:11:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7E6923F0D6; Wed, 12 Feb 2020 18:11:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Hnkz4zyjz3Ftc; Wed, 12 Feb 2020 18:11:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5EF1255A7; Wed, 12 Feb 2020 18:11:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CIB77v034975; Wed, 12 Feb 2020 18:11:07 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CIB7Hw034974; Wed, 12 Feb 2020 18:11:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002121811.01CIB7Hw034974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 12 Feb 2020 18:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357835 - head/tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/fs/fusefs X-SVN-Commit-Revision: 357835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 18:11:08 -0000 Author: asomers Date: Wed Feb 12 18:11:07 2020 New Revision: 357835 URL: https://svnweb.freebsd.org/changeset/base/357835 Log: fusefs: fix some memory leaks in the tests. Oddly, most of these were not detected by Coverity. Reported by: Coverity (one of them, anyway) Coverity CID: 1404490 MFC after: 2 weeks Modified: head/tests/sys/fs/fusefs/read.cc head/tests/sys/fs/fusefs/write.cc Modified: head/tests/sys/fs/fusefs/read.cc ============================================================================== --- head/tests/sys/fs/fusefs/read.cc Wed Feb 12 18:09:20 2020 (r357834) +++ head/tests/sys/fs/fusefs/read.cc Wed Feb 12 18:11:07 2020 (r357835) @@ -778,6 +778,7 @@ TEST_F(Read, cache_block) ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno); ASSERT_EQ(0, memcmp(buf, contents1, bufsize)); leak(fd); + free(contents); } /* Reading with sendfile should work (though it obviously won't be 0-copy) */ @@ -899,6 +900,8 @@ TEST_P(ReadAhead, readahead) { ASSERT_EQ(0, memcmp(rbuf, contents, bufsize)); leak(fd); + free(rbuf); + free(contents); } INSTANTIATE_TEST_CASE_P(RA, ReadAhead, Modified: head/tests/sys/fs/fusefs/write.cc ============================================================================== --- head/tests/sys/fs/fusefs/write.cc Wed Feb 12 18:09:20 2020 (r357834) +++ head/tests/sys/fs/fusefs/write.cc Wed Feb 12 18:11:07 2020 (r357835) @@ -300,6 +300,8 @@ TEST_F(Write, append_to_cached) /* Write the new data. There should be no more read operations */ ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); leak(fd); + free(oldbuf); + free(oldcontents); } TEST_F(Write, append_direct_io) @@ -782,6 +784,8 @@ TEST_F(WriteCluster, clustering) << strerror(errno); } close(fd); + free(wbuf2x); + free(wbuf); } /* @@ -825,6 +829,7 @@ TEST_F(WriteCluster, DISABLED_cluster_write_err) << strerror(errno); } close(fd); + free(wbuf); } /* From owner-svn-src-all@freebsd.org Wed Feb 12 18:40:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C13FA23FD5F; Wed, 12 Feb 2020 18:40:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HpNs4nhyz3HbR; Wed, 12 Feb 2020 18:40:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B75F25B4E; Wed, 12 Feb 2020 18:40:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CIeTm4051561; Wed, 12 Feb 2020 18:40:29 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CIeTRE051560; Wed, 12 Feb 2020 18:40:29 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002121840.01CIeTRE051560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 12 Feb 2020 18:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357836 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 357836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 18:40:29 -0000 Author: brooks Date: Wed Feb 12 18:40:29 2020 New Revision: 357836 URL: https://svnweb.freebsd.org/changeset/base/357836 Log: MFC r356942: Correct a misleading indent. This dates to before the beginning of our repo and was found by clang 10. Sponsored by: DARPA Modified: stable/12/lib/libc/gen/ualarm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/ualarm.c ============================================================================== --- stable/12/lib/libc/gen/ualarm.c Wed Feb 12 18:11:07 2020 (r357835) +++ stable/12/lib/libc/gen/ualarm.c Wed Feb 12 18:40:29 2020 (r357836) @@ -56,6 +56,5 @@ ualarm(useconds_t usecs, useconds_t reload) if (setitimer(ITIMER_REAL, &new, &old) == 0) return (old.it_value.tv_sec * USPS + old.it_value.tv_usec); - /* else */ - return (-1); + return (-1); } From owner-svn-src-all@freebsd.org Wed Feb 12 18:48:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BFA3240201; Wed, 12 Feb 2020 18:48:40 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HpZJ2rNTz3JFF; Wed, 12 Feb 2020 18:48:40 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 584DF25D30; Wed, 12 Feb 2020 18:48:40 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CImesW057235; Wed, 12 Feb 2020 18:48:40 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CIme51057234; Wed, 12 Feb 2020 18:48:40 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202002121848.01CIme51057234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 12 Feb 2020 18:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357837 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 357837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 18:48:40 -0000 Author: brooks Date: Wed Feb 12 18:48:39 2020 New Revision: 357837 URL: https://svnweb.freebsd.org/changeset/base/357837 Log: MFC r356942: Correct a misleading indent. This dates to before the beginning of our repo and was found by clang 10. Sponsored by: DARPA Modified: stable/11/lib/libc/gen/ualarm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/ualarm.c ============================================================================== --- stable/11/lib/libc/gen/ualarm.c Wed Feb 12 18:40:29 2020 (r357836) +++ stable/11/lib/libc/gen/ualarm.c Wed Feb 12 18:48:39 2020 (r357837) @@ -56,6 +56,5 @@ ualarm(useconds_t usecs, useconds_t reload) if (setitimer(ITIMER_REAL, &new, &old) == 0) return (old.it_value.tv_sec * USPS + old.it_value.tv_usec); - /* else */ - return (-1); + return (-1); } From owner-svn-src-all@freebsd.org Wed Feb 12 18:59:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CAAA240606; Wed, 12 Feb 2020 18:59:01 +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) server-signature RSA-PSS (4096 bits) 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 48HppF2jwfz3Jqd; Wed, 12 Feb 2020 18:59:01 +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 5839225F41; Wed, 12 Feb 2020 18:59:01 +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 01CIx1wk062984; Wed, 12 Feb 2020 18:59:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CIx1bp062983; Wed, 12 Feb 2020 18:59:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121859.01CIx1bp062983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 18:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357838 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 18:59:01 -0000 Author: emaste Date: Wed Feb 12 18:59:00 2020 New Revision: 357838 URL: https://svnweb.freebsd.org/changeset/base/357838 Log: Allow getloginclass in capability mode As with e.g. getgroups and getlogin it allows querying current process credential state. Reported by: sigsys@gmail.com via kevans Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Wed Feb 12 18:48:39 2020 (r357837) +++ head/sys/kern/capabilities.conf Wed Feb 12 18:59:00 2020 (r357838) @@ -288,6 +288,7 @@ getitimer getgid getgroups getlogin +getloginclass ## ## Allow querying certain trivial global state. From owner-svn-src-all@freebsd.org Wed Feb 12 19:05:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B84E524082D; Wed, 12 Feb 2020 19:05:11 +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) server-signature RSA-PSS (4096 bits) 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 48HpxM4Fbyz3KGv; Wed, 12 Feb 2020 19:05:11 +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 8D35D26112; Wed, 12 Feb 2020 19:05:11 +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 01CJ5Bgv069081; Wed, 12 Feb 2020 19:05:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CJ5BrB069078; Wed, 12 Feb 2020 19:05:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002121905.01CJ5BrB069078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 19:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357839 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 357839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 19:05:11 -0000 Author: emaste Date: Wed Feb 12 19:05:10 2020 New Revision: 357839 URL: https://svnweb.freebsd.org/changeset/base/357839 Log: regen sysent after r357831, r357838 Capability mode changes allowing fdatasync and getloginclass. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Wed Feb 12 18:59:00 2020 (r357838) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Wed Feb 12 19:05:10 2020 (r357839) @@ -598,7 +598,7 @@ struct sysent freebsd32_sysent[] = { { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ { AS(freebsd32_pselect_args), (sy_call_t *)freebsd32_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = freebsd32_pselect */ - { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_GETLOGINCLASS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ + { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_GETLOGINCLASS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_SETLOGINCLASS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ { AS(rctl_get_rules_args), (sy_call_t *)sys_rctl_get_rules, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 526 = rctl_get_rules */ @@ -635,7 +635,7 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 548 = obsolete numa_getaffinity */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 549 = obsolete numa_setaffinity */ - { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ + { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 550 = fdatasync */ { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = freebsd32_fstat */ { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = freebsd32_fstatat */ { AS(freebsd32_fhstat_args), (sy_call_t *)freebsd32_fhstat, AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 553 = freebsd32_fhstat */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Wed Feb 12 18:59:00 2020 (r357838) +++ head/sys/kern/init_sysent.c Wed Feb 12 19:05:10 2020 (r357839) @@ -578,7 +578,7 @@ struct sysent sysent[] = { { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = pselect */ - { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_GETLOGINCLASS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ + { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_GETLOGINCLASS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_SETLOGINCLASS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ { AS(rctl_get_rules_args), (sy_call_t *)sys_rctl_get_rules, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 526 = rctl_get_rules */ @@ -605,7 +605,7 @@ struct sysent sysent[] = { { AS(utimensat_args), (sy_call_t *)sys_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = utimensat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 548 = obsolete numa_getaffinity */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 549 = obsolete numa_setaffinity */ - { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ + { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 550 = fdatasync */ { AS(fstat_args), (sy_call_t *)sys_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = fstat */ { AS(fstatat_args), (sy_call_t *)sys_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = fstatat */ { AS(fhstat_args), (sy_call_t *)sys_fhstat, AUE_FHSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 553 = fhstat */ From owner-svn-src-all@freebsd.org Wed Feb 12 19:06:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7AD22408DB; Wed, 12 Feb 2020 19:06:34 +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) server-signature RSA-PSS (4096 bits) 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 48Hpyy5xDbz3KQW; Wed, 12 Feb 2020 19:06:34 +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 C66C926115; Wed, 12 Feb 2020 19:06:34 +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 01CJ6Yt8069183; Wed, 12 Feb 2020 19:06:34 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CJ6YJ4069182; Wed, 12 Feb 2020 19:06:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002121906.01CJ6YJ4069182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 19:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357840 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 19:06:35 -0000 Author: kevans Date: Wed Feb 12 19:06:34 2020 New Revision: 357840 URL: https://svnweb.freebsd.org/changeset/base/357840 Log: sys/kern sysent: re-add dependency on capabilities.conf r356868 inadvertently removed this, so changes to capabilities.conf were no longer considered for being outdated. Modified: head/sys/kern/Makefile Modified: head/sys/kern/Makefile ============================================================================== --- head/sys/kern/Makefile Wed Feb 12 19:05:10 2020 (r357839) +++ head/sys/kern/Makefile Wed Feb 12 19:06:34 2020 (r357840) @@ -3,6 +3,7 @@ # # Makefile for init_sysent +SRCS+= capabilities.conf SYSENT_CONF= GENERATED= init_sysent.c \ syscalls.c \ From owner-svn-src-all@freebsd.org Wed Feb 12 20:06:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AA4B241ED3; Wed, 12 Feb 2020 20:06: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) server-signature RSA-PSS (4096 bits) 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 48HrJK6GxDz3R37; Wed, 12 Feb 2020 20:06:41 +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 D263726D47; Wed, 12 Feb 2020 20:06:41 +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 01CK6fEI009213; Wed, 12 Feb 2020 20:06:41 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CK6fDH009212; Wed, 12 Feb 2020 20:06:41 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202002122006.01CK6fDH009212@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: Wed, 12 Feb 2020 20:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357841 - head/usr.bin/diff X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/diff X-SVN-Commit-Revision: 357841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 20:06:42 -0000 Author: 0mp (doc,ports committer) Date: Wed Feb 12 20:06:41 2020 New Revision: 357841 URL: https://svnweb.freebsd.org/changeset/base/357841 Log: diff.1: Fix style & document -y as extension to POSIX - Long options must be stylized with the Fl macro as well. Reviewed by: bapt Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23642 Modified: head/usr.bin/diff/diff.1 Modified: head/usr.bin/diff/diff.1 ============================================================================== --- head/usr.bin/diff/diff.1 Wed Feb 12 19:06:34 2020 (r357840) +++ head/usr.bin/diff/diff.1 Wed Feb 12 20:06:41 2020 (r357841) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd February 7, 2020 +.Dd February 12, 2020 .Dt DIFF 1 .Os .Sh NAME @@ -184,17 +184,17 @@ .Ar dir1 dir2 .Nm diff .Op Fl aBbditwW -.Op --expand-tabs -.Op --ignore-all-blanks -.Op --ignore-blank-lines -.Op --ignore-case -.Op --minimal -.Op --no-ignore-file-name-case -.Op --strip-trailing-cr -.Op --suppress-common-lines -.Op --tabsize -.Op --text -.Op --width +.Op Fl -expand-tabs +.Op Fl -ignore-all-blanks +.Op Fl -ignore-blank-lines +.Op Fl -ignore-case +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -strip-trailing-cr +.Op Fl -suppress-common-lines +.Op Fl -tabsize +.Op Fl -text +.Op Fl -width .Fl y | Fl -side-by-side .Ar file1 file2 .Sh DESCRIPTION @@ -637,7 +637,7 @@ utility is compliant with the specification. .Pp The flags -.Op Fl aDdIiLlNnPpqSsTtwXx +.Op Fl aDdIiLlNnPpqSsTtwXxy are extensions to that specification. .Sh HISTORY A From owner-svn-src-all@freebsd.org Wed Feb 12 20:18:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1718224215E; Wed, 12 Feb 2020 20:18:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48HrYx6x94z3wjs; Wed, 12 Feb 2020 20:18:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E958126F3C; Wed, 12 Feb 2020 20:18:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01CKITTH015317; Wed, 12 Feb 2020 20:18:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CKITBj015316; Wed, 12 Feb 2020 20:18:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002122018.01CKITBj015316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 12 Feb 2020 20:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357842 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 357842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 20:18:30 -0000 Author: mjg Date: Wed Feb 12 20:18:29 2020 New Revision: 357842 URL: https://svnweb.freebsd.org/changeset/base/357842 Log: netipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu PR: 244077 Reported by: lwhsu Fixes: r357805 ("amd64: store per-cpu allocations subtracted by __pcpu") Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed Feb 12 20:06:41 2020 (r357841) +++ head/sys/netipsec/key.c Wed Feb 12 20:18:29 2020 (r357842) @@ -3128,7 +3128,7 @@ key_delsav(struct secasvar *sav) if ((sav->flags & SADB_X_EXT_F_CLONED) == 0) { mtx_destroy(sav->lock); free(sav->lock, M_IPSEC_MISC); - uma_zfree(V_key_lft_zone, sav->lft_c); + uma_zfree_pcpu(V_key_lft_zone, sav->lft_c); } free(sav, M_IPSEC_SA); } From owner-svn-src-all@freebsd.org Wed Feb 12 20:34:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4716242A9A; Wed, 12 Feb 2020 20:34:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48Hrw04q84z3xvQ; Wed, 12 Feb 2020 20:34:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-vs1-xe30.google.com with SMTP id r18so2429289vso.5; Wed, 12 Feb 2020 12:34:08 -0800 (PST) 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=+q5wzptr18WR4xi1OS3/WWKGjPC4RApHA8BPQ7bSy0g=; b=AucklhE4bkicWSNJuGqIga2+Xf3q8Z5M8Y3gyW8v5BmkOoyca/bolXx5TGuXMkqoLk j7D5loqBt8tL9midS/7FhjEchDcg6pZYmb12CmxpYVm9Mj5jBxBMRMQXTKs0+yjjaBhs WnPifABd/5Yon6C3s+TccD1hWkZzzFRGOkPplCh5TilOrmDmHoHnHyWBL6iksOBDUMew bmqSP+TS7nGoEv3MKhrS1L92ZsUWLJLKSv+438Z0ALm2I93m0iGHU9s2/CcW3LNFZY5H 1695MAJN3c5R/WSvZx8MzTyXYHxINApPZSYXwt9yTq/DYH7SPFwJEAk8d6jFtDMRTe+N Vtrg== 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=+q5wzptr18WR4xi1OS3/WWKGjPC4RApHA8BPQ7bSy0g=; b=R4Dyx7daZK7W/IYTI9apJvr2RFV4jPkP70Wo0kNSjULBTJp0KQiEpnfLpIJlCFUK0z rrpOjyBPkDpkLOpJ+oYIo1vDKojg12MMSkxTVoYsJQEpDl8+DriYWYyeui37TfBarbCX C8D5DXMJyOO0XBAq5FsDTt4CFRfJV4sqqntk19229KbNNgjKSPZ1KunkhGKaUsjWA4pr nmnBQOa/iE+40vIr0lxTKB23Kg5eNxfITRBY5hQfR3268Vl7uc5pT5FD5cQG0U/1b95h XCbRV5WKa1pUwoqy0EOfJBB8ZWzIrA+iXYqME7xlB8ZDwxu5FRJCVD4OiWbK7KLLzhDd a7uQ== X-Gm-Message-State: APjAAAUkFxFTz96huZJ0mn+5Di5B031cTPzJTnUNT2siEWz0nQcDybjL AtC//pc5kOR94cbsDO9QRJOsoKH2SUzP1kteAm0EPw== X-Google-Smtp-Source: APXvYqxus5C3HdsN5m1XKT+YyyjeMKNXHEKQQG+mC8GQ3uw0xcj3zYQ1/GtGSBDqsBmA+lMaSXvkhq/zv5xJF0qnGGg= X-Received: by 2002:a67:ec41:: with SMTP id z1mr211641vso.197.1581539647489; Wed, 12 Feb 2020 12:34:07 -0800 (PST) MIME-Version: 1.0 References: <202002121737.01CHbWCN014937@repo.freebsd.org> In-Reply-To: <202002121737.01CHbWCN014937@repo.freebsd.org> From: Enji Cooper Date: Wed, 12 Feb 2020 12:33:56 -0800 Message-ID: Subject: Re: svn commit: r357833 - head/tests/sys/pjdfstest/tests To: Ed Maste Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Hrw04q84z3xvQ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 20:34:08 -0000 On Wed, Feb 12, 2020 at 9:37 AM Ed Maste wrote: > > Author: emaste > Date: Wed Feb 12 17:37:32 2020 > New Revision: 357833 > URL: https://svnweb.freebsd.org/changeset/base/357833 > > Log: > Tag pjdfstest symlink with pkgbase package > > As with the rest of pjdfstest, tag the symlink with package=tests. > The tests -> . symlink seems a little strange but that's independent > of pkgbase. Sidenote: the reason for the symlink was to facilitate integrating the test suite without having to completely refactor the code. Thanks, -Enji From owner-svn-src-all@freebsd.org Wed Feb 12 21:16:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B764243775; Wed, 12 Feb 2020 21:16:31 +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) server-signature RSA-PSS (4096 bits) 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 48Hsrv1FPXz41Qq; Wed, 12 Feb 2020 21:16:31 +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 260A327A6E; Wed, 12 Feb 2020 21:16:31 +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 01CLGVDx052109; Wed, 12 Feb 2020 21:16:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CLGVtC052108; Wed, 12 Feb 2020 21:16:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202002122116.01CLGVtC052108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 12 Feb 2020 21:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357843 - head/tests/sys/net/routing X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/tests/sys/net/routing X-SVN-Commit-Revision: 357843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 21:16:31 -0000 Author: melifaro Date: Wed Feb 12 21:16:30 2020 New Revision: 357843 URL: https://svnweb.freebsd.org/changeset/base/357843 Log: * Fix flaking lle tests by filtering out non-relevant rtsock messages. * Consistently use RTM_DECLARE_ROOT_TEST() macro. * Temporarily remove iftype validation from IPv6 lle notifications. Reported by: kp Modified: head/tests/sys/net/routing/test_rtsock_lladdr.c Modified: head/tests/sys/net/routing/test_rtsock_lladdr.c ============================================================================== --- head/tests/sys/net/routing/test_rtsock_lladdr.c Wed Feb 12 20:18:29 2020 (r357842) +++ head/tests/sys/net/routing/test_rtsock_lladdr.c Wed Feb 12 21:16:30 2020 (r357843) @@ -98,14 +98,18 @@ prepare_route_message(struct rt_msghdr *rtm, int cmd, #define DESCRIBE_ROOT_TEST(_msg) config_describe_root_test(tc, _msg) #define CLEANUP_AFTER_TEST config_generic_cleanup(config_setup(tc)) - -ATF_TC_WITH_CLEANUP(rtm_add_v6_ll_lle_success); -ATF_TC_HEAD(rtm_add_v6_ll_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests addition of link-local IPv6 ND entry"); +#define RTM_DECLARE_ROOT_TEST(_name, _descr) \ +ATF_TC_WITH_CLEANUP(_name); \ +ATF_TC_HEAD(_name, tc) \ +{ \ + DESCRIBE_ROOT_TEST(_descr); \ +} \ +ATF_TC_CLEANUP(_name, tc) \ +{ \ + CLEANUP_AFTER_TEST; \ } +RTM_DECLARE_ROOT_TEST(rtm_add_v6_ll_lle_success, "Tests addition of link-local IPv6 ND entry"); ATF_TC_BODY(rtm_add_v6_ll_lle_success, tc) { DECLARE_TEST_VARS; @@ -134,7 +138,7 @@ ATF_TC_BODY(rtm_add_v6_ll_lle_success, tc) * af=link len=54 sdl_index=3 if_name=tap4242 addr=52:54:00:14:E3:10 */ - rtm = rtsock_read_rtm(c->rtsock_fd, buffer, sizeof(buffer)); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); sa = rtsock_find_rtm_sa(rtm, RTA_DST); ret = sa_equal_msg(sa, (struct sockaddr *)&sin6, msg, sizeof(msg)); @@ -145,23 +149,15 @@ ATF_TC_BODY(rtm_add_v6_ll_lle_success, tc) ret = sa_equal_msg_flags(sa, (struct sockaddr *)ðer, msg, sizeof(msg), sa_flags); RTSOCK_ATF_REQUIRE_MSG(rtm, ret != 0, "GATEWAY sa diff: %s", msg); +#if 0 + /* Disable the check until https://reviews.freebsd.org/D22003 merge */ /* Some additional checks to verify kernel has filled in interface data */ struct sockaddr_dl *sdl = (struct sockaddr_dl *)sa; RTSOCK_ATF_REQUIRE_MSG(rtm, sdl->sdl_type > 0, "sdl_type not set"); +#endif } -ATF_TC_CLEANUP(rtm_add_v6_ll_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - -ATF_TC_WITH_CLEANUP(rtm_add_v6_gu_lle_success); -ATF_TC_HEAD(rtm_add_v6_gu_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests addition of global IPv6 ND entry"); -} - +RTM_DECLARE_ROOT_TEST(rtm_add_v6_gu_lle_success, "Tests addition of global IPv6 ND entry"); ATF_TC_BODY(rtm_add_v6_gu_lle_success, tc) { DECLARE_TEST_VARS; @@ -194,7 +190,7 @@ ATF_TC_BODY(rtm_add_v6_gu_lle_success, tc) /* XXX: where is uRPF?! this should fail */ - rtm = rtsock_read_rtm(c->rtsock_fd, buffer, sizeof(buffer)); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); sa = rtsock_find_rtm_sa(rtm, RTA_DST); ret = sa_equal_msg(sa, (struct sockaddr *)&sin6, msg, sizeof(msg)); @@ -205,23 +201,15 @@ ATF_TC_BODY(rtm_add_v6_gu_lle_success, tc) ret = sa_equal_msg_flags(sa, (struct sockaddr *)ðer, msg, sizeof(msg), sa_flags); RTSOCK_ATF_REQUIRE_MSG(rtm, ret != 0, "GATEWAY sa diff: %s", msg); +#if 0 + /* Disable the check until https://reviews.freebsd.org/D22003 merge */ /* Some additional checks to verify kernel has filled in interface data */ struct sockaddr_dl *sdl = (struct sockaddr_dl *)sa; RTSOCK_ATF_REQUIRE_MSG(rtm, sdl->sdl_type > 0, "sdl_type not set"); +#endif } -ATF_TC_CLEANUP(rtm_add_v6_gu_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - -ATF_TC_WITH_CLEANUP(rtm_add_v4_gu_lle_success); -ATF_TC_HEAD(rtm_add_v4_gu_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests addition of IPv4 ARP entry"); -} - +RTM_DECLARE_ROOT_TEST(rtm_add_v4_gu_lle_success, "Tests addition of IPv4 ARP entry"); ATF_TC_BODY(rtm_add_v4_gu_lle_success, tc) { DECLARE_TEST_VARS; @@ -250,7 +238,7 @@ ATF_TC_BODY(rtm_add_v4_gu_lle_success, tc) * af=link len=54 sdl_index=3 if_name=tap4242 addr=52:54:00:14:E3:10 */ - rtm = rtsock_read_rtm(c->rtsock_fd, buffer, sizeof(buffer)); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); sa = rtsock_find_rtm_sa(rtm, RTA_DST); ret = sa_equal_msg(sa, (struct sockaddr *)&sin, msg, sizeof(msg)); @@ -266,18 +254,7 @@ ATF_TC_BODY(rtm_add_v4_gu_lle_success, tc) */ } -ATF_TC_CLEANUP(rtm_add_v4_gu_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - -ATF_TC_WITH_CLEANUP(rtm_del_v6_ll_lle_success); -ATF_TC_HEAD(rtm_del_v6_ll_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests removal of link-local IPv6 ND entry"); -} - +RTM_DECLARE_ROOT_TEST(rtm_del_v6_ll_lle_success, "Tests removal of link-local IPv6 ND entry"); ATF_TC_BODY(rtm_del_v6_ll_lle_success, tc) { DECLARE_TEST_VARS; @@ -323,18 +300,7 @@ ATF_TC_BODY(rtm_del_v6_ll_lle_success, tc) */ } -ATF_TC_CLEANUP(rtm_del_v6_ll_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - -ATF_TC_WITH_CLEANUP(rtm_del_v6_gu_lle_success); -ATF_TC_HEAD(rtm_del_v6_gu_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests removal of global IPv6 ND entry"); -} - +RTM_DECLARE_ROOT_TEST(rtm_del_v6_gu_lle_success, "Tests removal of global IPv6 ND entry"); ATF_TC_BODY(rtm_del_v6_gu_lle_success, tc) { DECLARE_TEST_VARS; @@ -380,18 +346,7 @@ ATF_TC_BODY(rtm_del_v6_gu_lle_success, tc) */ } -ATF_TC_CLEANUP(rtm_del_v6_gu_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - -ATF_TC_WITH_CLEANUP(rtm_del_v4_gu_lle_success); -ATF_TC_HEAD(rtm_del_v4_gu_lle_success, tc) -{ - - DESCRIBE_ROOT_TEST("Tests removal of IPv4 ARP entry"); -} - +RTM_DECLARE_ROOT_TEST(rtm_del_v4_gu_lle_success, "Tests removal of IPv4 ARP entry"); ATF_TC_BODY(rtm_del_v4_gu_lle_success, tc) { DECLARE_TEST_VARS; @@ -413,8 +368,6 @@ ATF_TC_BODY(rtm_del_v4_gu_lle_success, tc) rtsock_send_rtm(c->rtsock_fd, rtm); - rtsock_read_rtm(c->rtsock_fd, buffer, sizeof(buffer)); - /* We successfully added an entry, let's try to remove it. */ prepare_route_message(rtm, RTM_DELETE, (struct sockaddr *)&sin, (struct sockaddr *)ðer); @@ -437,12 +390,6 @@ ATF_TC_BODY(rtm_del_v4_gu_lle_success, tc) * TODO: Currently kernel code does not set sdl_type, contrary to IPv6. */ } - -ATF_TC_CLEANUP(rtm_del_v4_gu_lle_success, tc) -{ - CLEANUP_AFTER_TEST; -} - ATF_TP_ADD_TCS(tp) { From owner-svn-src-all@freebsd.org Wed Feb 12 21:52:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C7CA2443A5; Wed, 12 Feb 2020 21:52:11 +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) server-signature RSA-PSS (4096 bits) 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 48Htf264W4z43St; Wed, 12 Feb 2020 21:52:10 +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 CB9FB1EE; Wed, 12 Feb 2020 21:52:10 +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 01CLqA7j074685; Wed, 12 Feb 2020 21:52:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CLqANe074684; Wed, 12 Feb 2020 21:52:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002122152.01CLqANe074684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 12 Feb 2020 21:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357844 - head/contrib/elftoolchain/addr2line X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/addr2line X-SVN-Commit-Revision: 357844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 21:52:11 -0000 Author: emaste Date: Wed Feb 12 21:52:10 2020 New Revision: 357844 URL: https://svnweb.freebsd.org/changeset/base/357844 Log: addr2line: Handle DW_AT_ranges in compile units Based on original submission by Marat Radchenko in ELF Tool Chain ticket #545, rebased and updated by Tiger Gao. PR: 217736 Submitted by: Marat Radchenko Submitted by: Tiger Gao Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23501 Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Wed Feb 12 21:16:30 2020 (r357843) +++ head/contrib/elftoolchain/addr2line/addr2line.c Wed Feb 12 21:52:10 2020 (r357844) @@ -65,6 +65,7 @@ struct CU { Dwarf_Signed nsrcfiles; STAILQ_HEAD(, Func) funclist; Dwarf_Die die; + Dwarf_Debug dbg; }; static struct option longopts[] = { @@ -345,7 +346,8 @@ cont_search: collect_func(dbg, ret_die, parent, cu); /* Cleanup */ - dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die != cu->die) + dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) dwarf_dealloc(dbg, abst_die, DW_DLA_DIE); @@ -411,6 +413,102 @@ culookup(Dwarf_Unsigned addr) return (NULL); } +/* + * Check whether addr falls into range(s) of current CU, and save current CU + * to lookup tree if so. + */ +static int +check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct CU **cu) +{ + Dwarf_Error de; + Dwarf_Unsigned addr_base, lopc, hipc; + Dwarf_Off ranges_off; + Dwarf_Signed ranges_cnt; + Dwarf_Ranges *ranges; + int i, ret; + bool in_range; + + addr_base = 0; + ranges = NULL; + ranges_cnt = 0; + in_range = false; + + ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); + if (ret == DW_DLV_NO_ENTRY) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, + &de) == DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != + DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_range = true; + } + } + } else if (ret == DW_DLV_OK) { + ret = dwarf_get_ranges(dbg, ranges_off, &ranges, + &ranges_cnt, NULL, &de); + if (ret != DW_DLV_OK) + return (ret); + + if (!ranges || ranges_cnt <= 0) + return (DW_DLV_ERROR); + + for (i = 0; i < ranges_cnt; i++) { + if (ranges[i].dwr_type == DW_RANGES_END) + return (DW_DLV_NO_ENTRY); + + if (ranges[i].dwr_type == + DW_RANGES_ADDRESS_SELECTION) { + addr_base = ranges[i].dwr_addr2; + continue; + } + + /* DW_RANGES_ENTRY */ + lopc = ranges[i].dwr_addr1 + addr_base; + hipc = ranges[i].dwr_addr2 + addr_base; + + if (lopc == curlopc) + return (DW_DLV_ERROR); + + if (addr >= lopc && addr < hipc){ + in_range = true; + break; + } + } + } else { + return (DW_DLV_ERROR); + } + + if (in_range) { + if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + err(EXIT_FAILURE, "calloc"); + (*cu)->lopc = lopc; + (*cu)->hipc = hipc; + (*cu)->die = die; + (*cu)->dbg = dbg; + STAILQ_INIT(&(*cu)->funclist); + RB_INSERT(cutree, &cuhead, *cu); + curlopc = lopc; + return (DW_DLV_OK); + } else { + return (DW_DLV_NO_ENTRY); + } +} + static void translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) { @@ -418,10 +516,9 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr Dwarf_Line *lbuf; Dwarf_Error de; Dwarf_Half tag; - Dwarf_Unsigned lopc, hipc, addr, lineno, plineno; + Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - Dwarf_Off off; struct CU *cu; struct Func *f; const char *funcname; @@ -439,6 +536,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr cu = culookup(addr); if (cu != NULL) { die = cu->die; + dbg = cu->dbg; goto status_ok; } @@ -477,44 +575,11 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (lopc == curlopc) - goto out; - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - goto out; - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - if (dwarf_dieoffset(die, &off, &de) != DW_DLV_OK) { - warnx("dwarf_dieoffset failed: %s", - dwarf_errmsg(de)); - goto out; - } - - if (addr >= lopc && addr < hipc) { - if ((cu = calloc(1, sizeof(*cu))) == NULL) - err(EXIT_FAILURE, "calloc"); - cu->off = off; - cu->lopc = lopc; - cu->hipc = hipc; - cu->die = die; - STAILQ_INIT(&cu->funclist); - RB_INSERT(cutree, &cuhead, cu); - - curlopc = lopc; - break; - } - } + ret = check_range(dbg, die, addr, &cu); + if (ret == DW_DLV_OK) + break; + if (ret == DW_DLV_ERROR) + goto out; next_cu: if (die != NULL) { dwarf_dealloc(dbg, die, DW_DLA_DIE); From owner-svn-src-all@freebsd.org Wed Feb 12 22:01:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C8F224452A; Wed, 12 Feb 2020 22:01:37 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48Htrw3WByz444N; Wed, 12 Feb 2020 22:01:36 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f172.google.com with SMTP id s18so3166897iln.0; Wed, 12 Feb 2020 14:01:36 -0800 (PST) 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=0b+YYae6EHaSrG6EmAxUYAa6edXI0hKE5hcHwX1wIFA=; b=qQq/5i6wisYjqfhyO7Gyi7+MrPqY7kF4Xu5WxseQXv5MMZ8T+Hogzs47AQUOuKdydk shuqd/VFq8qxdfapKunodvXL16nAr81CzXnStidYO42t9SlboQHehajf+Eqou+zTvA2z TQIe5FDS6L0BOVS4xyUO3+PdHPcPp5b1e1ZmPSMcqvkl+8I2COET1hWwUsiPXaMunBah 7sJC7ZzGg3Ev/P9svKkXqXpsPHb0T6s3CjvxyohDBgzvxCq8VBZDpgps8SA6LBmy/Fcm 1H71mwi/LGDpzW5pd/FSDy3eRXIIgxMuYpaELPbfntNFpY+WlUoiXl+knUrHC+5VghEO E3ow== X-Gm-Message-State: APjAAAUnCyL4EEJSdj8ShErpIAeARu7Wm3QRKcHW2oTIG5R+qPGcUn4Z vJJXN6LbBCzUtMQERYTNW0ZL0/UpUfcBv0HOlC8UyZww X-Google-Smtp-Source: APXvYqwJIOJwjrY520MZfyQDko7bukv//tn05okzVSZg0I2ATuhkxOJIPO9APbHiVlNpN/uLH3oGqWHvkM1NyKXNMFg= X-Received: by 2002:a92:db4f:: with SMTP id w15mr12437113ilq.182.1581544895268; Wed, 12 Feb 2020 14:01:35 -0800 (PST) MIME-Version: 1.0 References: <202002121737.01CHbWCN014937@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Wed, 12 Feb 2020 17:01:23 -0500 Message-ID: Subject: Re: svn commit: r357833 - head/tests/sys/pjdfstest/tests To: Enji Cooper Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Htrw3WByz444N 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.172 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-4.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[172.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.30)[ip: (-6.75), ipnet: 209.85.128.0/17(-3.01), asn: 15169(-1.70), country: US(-0.05)]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[172.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 22:01:37 -0000 On Wed, 12 Feb 2020 at 15:34, Enji Cooper wrote: > > On Wed, Feb 12, 2020 at 9:37 AM Ed Maste wrote: > > > > Author: emaste > > Date: Wed Feb 12 17:37:32 2020 > > New Revision: 357833 > > URL: https://svnweb.freebsd.org/changeset/base/357833 > > > > Log: > > Tag pjdfstest symlink with pkgbase package > > > > As with the rest of pjdfstest, tag the symlink with package=tests. > > The tests -> . symlink seems a little strange but that's independent > > of pkgbase. > > Sidenote: the reason for the symlink was to facilitate integrating the > test suite without having to completely refactor the code. Thanks for the note - this probably ought to be a comment by the symlink; I'll add it at some point if you don't get to it first. From owner-svn-src-all@freebsd.org Wed Feb 12 22:29:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BE1A244E4F; Wed, 12 Feb 2020 22:29:09 +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) server-signature RSA-PSS (4096 bits) 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 48HvSh6yZjz45TM; Wed, 12 Feb 2020 22:29:08 +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 E57637C1; Wed, 12 Feb 2020 22:29:08 +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 01CMT83g095076; Wed, 12 Feb 2020 22:29:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CMT8I1095075; Wed, 12 Feb 2020 22:29:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002122229.01CMT8I1095075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 12 Feb 2020 22:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357845 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 357845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 22:29:09 -0000 Author: kevans Date: Wed Feb 12 22:29:08 2020 New Revision: 357845 URL: https://svnweb.freebsd.org/changeset/base/357845 Log: efiloader: don't execute hooks when setting currdev/loaddev We still need to set the hooks to prevent improper manipulations thereafter at the loader prompt, but as it is we're actively preventing loaddev from being set correctly in some circumstances (ZFS in particular) and doing more work than needed with currdev -- that hook in particular validates it as a correct device, which we can assume isn't needed in this context. Reviewed by: imp, sigsys@gmail.com Submitted/Diagnosed by: sigsys@gmail.com Differential Revision: https://reviews.freebsd.org/D23390 Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Wed Feb 12 21:52:10 2020 (r357844) +++ head/stand/efi/loader/main.c Wed Feb 12 22:29:08 2020 (r357845) @@ -180,8 +180,17 @@ static void set_currdev(const char *devname) { - env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); + /* + * Don't execute hooks here; we may need to try setting these more than + * once here if we're probing for the ZFS pool we're supposed to boot. + * The currdev hook is intended to just validate user input anyways, + * while the loaddev hook makes it immutable once we've determined what + * the proper currdev is. + */ + env_setenv("currdev", EV_VOLATILE | EV_NOHOOK, devname, efi_setcurrdev, + env_nounset); + env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset, + env_nounset); } static void From owner-svn-src-all@freebsd.org Wed Feb 12 22:44:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7564E245357; Wed, 12 Feb 2020 22:44:19 +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) server-signature RSA-PSS (4096 bits) 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 48HvpC32l4z46hX; Wed, 12 Feb 2020 22:44:19 +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 6398CB5C; Wed, 12 Feb 2020 22:44:19 +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 01CMiJmR006789; Wed, 12 Feb 2020 22:44:19 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CMiIkf006785; Wed, 12 Feb 2020 22:44:18 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202002122244.01CMiIkf006785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 12 Feb 2020 22:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357846 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 357846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 22:44:19 -0000 Author: vmaffione Date: Wed Feb 12 22:44:18 2020 New Revision: 357846 URL: https://svnweb.freebsd.org/changeset/base/357846 Log: bhyve: move virtio-net header processing to pci_virtio_net This patch cleans up the API between the net frontends (e1000, virtio-net) and the net backends (tap and netmap). We move the virtio-net header stripping/prepending to the virtio-net code, where this functionality belongs. In this way, the netbe_send() and netbe_recv() signatures can have const struct iov * rather than struct iov *. Reviewed by: grehan, bcr, aleksandr.fedorov@itglobal.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23342 Modified: head/usr.sbin/bhyve/net_backends.c head/usr.sbin/bhyve/net_backends.h head/usr.sbin/bhyve/net_utils.c head/usr.sbin/bhyve/pci_e82545.c head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/net_backends.c ============================================================================== --- head/usr.sbin/bhyve/net_backends.c Wed Feb 12 22:29:08 2020 (r357845) +++ head/usr.sbin/bhyve/net_backends.c Wed Feb 12 22:44:18 2020 (r357846) @@ -99,7 +99,8 @@ struct net_backend { * vector provided by the caller has 'iovcnt' elements and contains * the packet to send. */ - ssize_t (*send)(struct net_backend *be, struct iovec *iov, int iovcnt); + ssize_t (*send)(struct net_backend *be, const struct iovec *iov, + int iovcnt); /* * Called to receive a packet from the backend. When the function @@ -108,7 +109,8 @@ struct net_backend { * The function returns 0 if the backend doesn't have a new packet to * receive. */ - ssize_t (*recv)(struct net_backend *be, struct iovec *iov, int iovcnt); + ssize_t (*recv)(struct net_backend *be, const struct iovec *iov, + int iovcnt); /* * Ask the backend to enable or disable receive operation in the @@ -238,13 +240,13 @@ error: * Called to send a buffer chain out to the tap device */ static ssize_t -tap_send(struct net_backend *be, struct iovec *iov, int iovcnt) +tap_send(struct net_backend *be, const struct iovec *iov, int iovcnt) { return (writev(be->fd, iov, iovcnt)); } static ssize_t -tap_recv(struct net_backend *be, struct iovec *iov, int iovcnt) +tap_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) { ssize_t ret; @@ -458,7 +460,7 @@ netmap_cleanup(struct net_backend *be) } static ssize_t -netmap_send(struct net_backend *be, struct iovec *iov, +netmap_send(struct net_backend *be, const struct iovec *iov, int iovcnt) { struct netmap_priv *priv = (struct netmap_priv *)be->opaque; @@ -538,7 +540,7 @@ txsync: } static ssize_t -netmap_recv(struct net_backend *be, struct iovec *iov, int iovcnt) +netmap_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) { struct netmap_priv *priv = (struct netmap_priv *)be->opaque; struct netmap_slot *slot = NULL; @@ -749,42 +751,10 @@ netbe_set_cap(struct net_backend *be, uint64_t feature return (ret); } -static __inline struct iovec * -iov_trim(struct iovec *iov, int *iovcnt, unsigned int tlen) -{ - struct iovec *riov; - - /* XXX short-cut: assume first segment is >= tlen */ - assert(iov[0].iov_len >= tlen); - - iov[0].iov_len -= tlen; - if (iov[0].iov_len == 0) { - assert(*iovcnt > 1); - *iovcnt -= 1; - riov = &iov[1]; - } else { - iov[0].iov_base = (void *)((uintptr_t)iov[0].iov_base + tlen); - riov = &iov[0]; - } - - return (riov); -} - ssize_t -netbe_send(struct net_backend *be, struct iovec *iov, int iovcnt) +netbe_send(struct net_backend *be, const struct iovec *iov, int iovcnt) { - assert(be != NULL); - if (be->be_vnet_hdr_len != be->fe_vnet_hdr_len) { - /* - * The frontend uses a virtio-net header, but the backend - * does not. We ignore it (as it must be all zeroes) and - * strip it. - */ - assert(be->be_vnet_hdr_len == 0); - iov = iov_trim(iov, &iovcnt, be->fe_vnet_hdr_len); - } - return (be->send(be, iov, iovcnt)); } @@ -794,46 +764,10 @@ netbe_send(struct net_backend *be, struct iovec *iov, * the length of the packet just read. Return -1 in case of errors. */ ssize_t -netbe_recv(struct net_backend *be, struct iovec *iov, int iovcnt) +netbe_recv(struct net_backend *be, const struct iovec *iov, int iovcnt) { - /* Length of prepended virtio-net header. */ - unsigned int hlen = be->fe_vnet_hdr_len; - int ret; - assert(be != NULL); - - if (hlen && hlen != be->be_vnet_hdr_len) { - /* - * The frontend uses a virtio-net header, but the backend - * does not. We need to prepend a zeroed header. - */ - struct virtio_net_rxhdr *vh; - - assert(be->be_vnet_hdr_len == 0); - - /* - * Get a pointer to the rx header, and use the - * data immediately following it for the packet buffer. - */ - vh = iov[0].iov_base; - iov = iov_trim(iov, &iovcnt, hlen); - - /* - * The only valid field in the rx packet header is the - * number of buffers if merged rx bufs were negotiated. - */ - memset(vh, 0, hlen); - if (hlen == VNET_HDR_LEN) { - vh->vrh_bufs = 1; - } - } - - ret = be->recv(be, iov, iovcnt); - if (ret > 0) { - ret += hlen; - } - - return (ret); + return (be->recv(be, iov, iovcnt)); } /* @@ -870,4 +804,11 @@ netbe_rx_enable(struct net_backend *be) { return be->recv_enable(be); +} + +size_t +netbe_get_vnet_hdr_len(struct net_backend *be) +{ + + return (be->be_vnet_hdr_len); } Modified: head/usr.sbin/bhyve/net_backends.h ============================================================================== --- head/usr.sbin/bhyve/net_backends.h Wed Feb 12 22:29:08 2020 (r357845) +++ head/usr.sbin/bhyve/net_backends.h Wed Feb 12 22:44:18 2020 (r357846) @@ -43,8 +43,9 @@ void netbe_cleanup(net_backend_t *be); uint64_t netbe_get_cap(net_backend_t *be); int netbe_set_cap(net_backend_t *be, uint64_t cap, unsigned vnet_hdr_len); -ssize_t netbe_send(net_backend_t *be, struct iovec *iov, int iovcnt); -ssize_t netbe_recv(net_backend_t *be, struct iovec *iov, int iovcnt); +size_t netbe_get_vnet_hdr_len(net_backend_t *be); +ssize_t netbe_send(net_backend_t *be, const struct iovec *iov, int iovcnt); +ssize_t netbe_recv(net_backend_t *be, const struct iovec *iov, int iovcnt); ssize_t netbe_rx_discard(net_backend_t *be); void netbe_rx_disable(net_backend_t *be); void netbe_rx_enable(net_backend_t *be); Modified: head/usr.sbin/bhyve/net_utils.c ============================================================================== --- head/usr.sbin/bhyve/net_utils.c Wed Feb 12 22:29:08 2020 (r357845) +++ head/usr.sbin/bhyve/net_utils.c Wed Feb 12 22:44:18 2020 (r357846) @@ -44,21 +44,19 @@ int net_parsemac(char *mac_str, uint8_t *mac_addr) { struct ether_addr *ea; - char *tmpstr; char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - tmpstr = strsep(&mac_str,"="); + if (mac_str == NULL) + return (EINVAL); - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); + ea = ether_aton(mac_str); - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - EPRINTLN("Invalid MAC %s", mac_str); - return (EINVAL); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } + if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || + memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { + EPRINTLN("Invalid MAC %s", mac_str); + return (EINVAL); + } else + memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); return (0); } Modified: head/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- head/usr.sbin/bhyve/pci_e82545.c Wed Feb 12 22:29:08 2020 (r357845) +++ head/usr.sbin/bhyve/pci_e82545.c Wed Feb 12 22:44:18 2020 (r357846) @@ -2328,18 +2328,36 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, mac_provided = 0; sc->esc_be = NULL; if (opts != NULL) { - int err; + int err = 0; devname = vtopts = strdup(opts); (void) strsep(&vtopts, ","); - if (vtopts != NULL) { - err = net_parsemac(vtopts, sc->esc_mac.octet); - if (err != 0) { - free(devname); - return (err); + /* + * Parse the list of options in the form + * key1=value1,...,keyN=valueN. + */ + while (vtopts != NULL) { + char *value = vtopts; + char *key; + + key = strsep(&value, "="); + if (value == NULL) + break; + vtopts = value; + (void) strsep(&vtopts, ","); + + if (strcmp(key, "mac") == 0) { + err = net_parsemac(value, sc->esc_mac.octet); + if (err) + break; + mac_provided = 1; } - mac_provided = 1; + } + + if (err) { + free(devname); + return (err); } err = netbe_init(&sc->esc_be, devname, e82545_rx_callback, sc); Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Wed Feb 12 22:29:08 2020 (r357845) +++ head/usr.sbin/bhyve/pci_virtio_net.c Wed Feb 12 22:44:18 2020 (r357846) @@ -117,6 +117,9 @@ struct pci_vtnet_softc { pthread_cond_t tx_cond; int tx_in_progress; + size_t vhdrlen; + size_t be_vhdrlen; + struct virtio_net_config vsc_config; struct virtio_consts vsc_consts; }; @@ -180,6 +183,38 @@ pci_vtnet_reset(void *vsc) pthread_mutex_unlock(&sc->rx_mtx); } +static __inline struct iovec * +iov_trim_hdr(struct iovec *iov, int *iovcnt, unsigned int hlen) +{ + struct iovec *riov; + + if (iov[0].iov_len < hlen) { + /* + * Not enough header space in the first fragment. + * That's not ok for us. + */ + return NULL; + } + + iov[0].iov_len -= hlen; + if (iov[0].iov_len == 0) { + *iovcnt -= 1; + if (*iovcnt == 0) { + /* + * Only space for the header. That's not + * enough for us. + */ + return NULL; + } + riov = &iov[1]; + } else { + iov[0].iov_base = (void *)((uintptr_t)iov[0].iov_base + hlen); + riov = &iov[0]; + } + + return (riov); +} + struct virtio_mrg_rxbuf_info { uint16_t idx; uint16_t pad; @@ -189,31 +224,34 @@ struct virtio_mrg_rxbuf_info { static void pci_vtnet_rx(struct pci_vtnet_softc *sc) { + int prepend_hdr_len = sc->vhdrlen - sc->be_vhdrlen; struct virtio_mrg_rxbuf_info info[VTNET_MAXSEGS]; struct iovec iov[VTNET_MAXSEGS + 1]; struct vqueue_info *vq; - uint32_t cur_iov_bytes; - struct iovec *cur_iov; - uint16_t cur_iov_len; + uint32_t riov_bytes; + struct iovec *riov; + int riov_len; uint32_t ulen; int n_chains; int len; vq = &sc->vsc_queues[VTNET_RXQ]; for (;;) { + struct virtio_net_rxhdr *hdr; + /* * Get a descriptor chain to store the next ingress * packet. In case of mergeable rx buffers, get as * many chains as necessary in order to make room * for a maximum sized LRO packet. */ - cur_iov_bytes = 0; - cur_iov_len = 0; - cur_iov = iov; + riov_bytes = 0; + riov_len = 0; + riov = iov; n_chains = 0; do { - int n = vq_getchain(vq, &info[n_chains].idx, cur_iov, - VTNET_MAXSEGS - cur_iov_len, NULL); + int n = vq_getchain(vq, &info[n_chains].idx, riov, + VTNET_MAXSEGS - riov_len, NULL); if (n == 0) { /* @@ -239,21 +277,43 @@ pci_vtnet_rx(struct pci_vtnet_softc *sc) vq_kick_disable(vq); continue; } - assert(n >= 1 && cur_iov_len + n <= VTNET_MAXSEGS); - cur_iov_len += n; + assert(n >= 1 && riov_len + n <= VTNET_MAXSEGS); + riov_len += n; if (!sc->rx_merge) { n_chains = 1; break; } - info[n_chains].len = (uint32_t)count_iov(cur_iov, n); - cur_iov_bytes += info[n_chains].len; - cur_iov += n; + info[n_chains].len = (uint32_t)count_iov(riov, n); + riov_bytes += info[n_chains].len; + riov += n; n_chains++; - } while (cur_iov_bytes < VTNET_MAX_PKT_LEN && - cur_iov_len < VTNET_MAXSEGS); + } while (riov_bytes < VTNET_MAX_PKT_LEN && + riov_len < VTNET_MAXSEGS); - len = netbe_recv(sc->vsc_be, iov, cur_iov_len); + riov = iov; + hdr = riov[0].iov_base; + if (prepend_hdr_len > 0) { + /* + * The frontend uses a virtio-net header, but the + * backend does not. We need to prepend a zeroed + * header. + */ + riov = iov_trim_hdr(riov, &riov_len, prepend_hdr_len); + if (riov == NULL) { + /* + * The first collected chain is nonsensical, + * as it is not even enough to store the + * virtio-net header. Just drop it. + */ + vq_relchain(vq, info[0].idx, 0); + vq_retchains(vq, n_chains - 1); + continue; + } + memset(hdr, 0, prepend_hdr_len); + } + len = netbe_recv(sc->vsc_be, riov, riov_len); + if (len <= 0) { /* * No more packets (len == 0), or backend errored @@ -266,18 +326,18 @@ pci_vtnet_rx(struct pci_vtnet_softc *sc) return; } - ulen = (uint32_t)len; /* avoid too many casts below */ + ulen = (uint32_t)(len + prepend_hdr_len); - /* Publish the used buffers to the guest. */ + /* + * Publish the used buffers to the guest, reporting the + * number of bytes that we wrote. + */ if (!sc->rx_merge) { vq_relchain(vq, info[0].idx, ulen); } else { - struct virtio_net_rxhdr *hdr = iov[0].iov_base; uint32_t iolen; int i = 0; - assert(iov[0].iov_len >= sizeof(*hdr)); - do { iolen = info[i].len; if (iolen > ulen) { @@ -333,6 +393,7 @@ static void pci_vtnet_proctx(struct pci_vtnet_softc *sc, struct vqueue_info *vq) { struct iovec iov[VTNET_MAXSEGS + 1]; + struct iovec *siov = iov; uint16_t idx; ssize_t len; int n; @@ -344,10 +405,34 @@ pci_vtnet_proctx(struct pci_vtnet_softc *sc, struct vq n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); assert(n >= 1 && n <= VTNET_MAXSEGS); - len = netbe_send(sc->vsc_be, iov, n); + if (sc->vhdrlen != sc->be_vhdrlen) { + /* + * The frontend uses a virtio-net header, but the backend + * does not. We simply strip the header and ignore it, as + * it should be zero-filled. + */ + siov = iov_trim_hdr(siov, &n, sc->vhdrlen); + } - /* chain is processed, release it and set len */ - vq_relchain(vq, idx, len > 0 ? len : 0); + if (siov == NULL) { + /* The chain is nonsensical. Just drop it. */ + len = 0; + } else { + len = netbe_send(sc->vsc_be, siov, n); + if (len < 0) { + /* + * If send failed, report that 0 bytes + * were read. + */ + len = 0; + } + } + + /* + * Return the processed chain to the guest, reporting + * the number of bytes that we read. + */ + vq_relchain(vq, idx, len); } /* Called on TX kick. */ @@ -466,21 +551,40 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * if (opts != NULL) { char *devname; char *vtopts; - int err; + int err = 0; + /* Get the device name. */ devname = vtopts = strdup(opts); (void) strsep(&vtopts, ","); - if (vtopts != NULL) { - err = net_parsemac(vtopts, sc->vsc_config.mac); - if (err != 0) { - free(devname); - free(sc); - return (err); + /* + * Parse the list of options in the form + * key1=value1,...,keyN=valueN. + */ + while (vtopts != NULL) { + char *value = vtopts; + char *key; + + key = strsep(&value, "="); + if (value == NULL) + break; + vtopts = value; + (void) strsep(&vtopts, ","); + + if (strcmp(key, "mac") == 0) { + err = net_parsemac(value, sc->vsc_config.mac); + if (err) + break; + mac_provided = 1; } - mac_provided = 1; } + if (err) { + free(devname); + free(sc); + return (err); + } + err = netbe_init(&sc->vsc_be, devname, pci_vtnet_rx_callback, sc); free(devname); @@ -520,6 +624,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * sc->resetting = 0; sc->rx_merge = 0; + sc->vhdrlen = sizeof(struct virtio_net_rxhdr) - 2; pthread_mutex_init(&sc->rx_mtx, NULL); /* @@ -574,24 +679,25 @@ static void pci_vtnet_neg_features(void *vsc, uint64_t negotiated_features) { struct pci_vtnet_softc *sc = vsc; - unsigned int rx_vhdrlen; sc->vsc_features = negotiated_features; if (negotiated_features & VIRTIO_NET_F_MRG_RXBUF) { - rx_vhdrlen = sizeof(struct virtio_net_rxhdr); + sc->vhdrlen = sizeof(struct virtio_net_rxhdr); sc->rx_merge = 1; } else { /* * Without mergeable rx buffers, virtio-net header is 2 * bytes shorter than sizeof(struct virtio_net_rxhdr). */ - rx_vhdrlen = sizeof(struct virtio_net_rxhdr) - 2; + sc->vhdrlen = sizeof(struct virtio_net_rxhdr) - 2; sc->rx_merge = 0; } /* Tell the backend to enable some capabilities it has advertised. */ - netbe_set_cap(sc->vsc_be, negotiated_features, rx_vhdrlen); + netbe_set_cap(sc->vsc_be, negotiated_features, sc->vhdrlen); + sc->be_vhdrlen = netbe_get_vnet_hdr_len(sc->vsc_be); + assert(sc->be_vhdrlen == 0 || sc->be_vhdrlen == sc->vhdrlen); } static struct pci_devemu pci_de_vnet = { From owner-svn-src-all@freebsd.org Wed Feb 12 23:54:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8BDF246841; Wed, 12 Feb 2020 23:54:38 +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) server-signature RSA-PSS (4096 bits) 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 48HxML4ScSz4BGK; Wed, 12 Feb 2020 23:54:38 +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 9477118E5; Wed, 12 Feb 2020 23:54:38 +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 01CNscC2048721; Wed, 12 Feb 2020 23:54:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01CNscsA048720; Wed, 12 Feb 2020 23:54:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002122354.01CNscsA048720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 12 Feb 2020 23:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357847 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 357847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2020 23:54:38 -0000 Author: dim Date: Wed Feb 12 23:54:38 2020 New Revision: 357847 URL: https://svnweb.freebsd.org/changeset/base/357847 Log: Fix typo introduced with r347534 (cap_sysctl additions). This ensures the old libcap_sysctl.so.1 gets cleaned up when running "make delete-old-libs". Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Feb 12 22:44:18 2020 (r357846) +++ head/ObsoleteFiles.inc Wed Feb 12 23:54:38 2020 (r357847) @@ -757,7 +757,7 @@ OLD_FILES+=usr/share/man/man4/wb.4.gz OLD_FILES+=usr/share/man/man4/xe.4.gz OLD_FILES+=usr/share/man/man4/if_xe.4.gz # 20190513: libcap_sysctl interface change -OLD_FILES+=lib/casper/libcap_sysctl.1 +OLD_FILES+=lib/casper/libcap_sysctl.so.1 # 20190509: tests/sys/opencrypto requires the net/py-dpkt package. OLD_FILES+=usr/tests/sys/opencrypto/dpkt.py OLD_FILES+=usr/tests/sys/opencrypto/dpkt.pyc From owner-svn-src-all@freebsd.org Thu Feb 13 01:23:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCBE12489FE; Thu, 13 Feb 2020 01:23:32 +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) server-signature RSA-PSS (4096 bits) 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 48HzKw4bh0z4HDL; Thu, 13 Feb 2020 01:23:32 +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 990D02A18; Thu, 13 Feb 2020 01:23:32 +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 01D1NWPm004154; Thu, 13 Feb 2020 01:23:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D1NWe0004153; Thu, 13 Feb 2020 01:23:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002130123.01D1NWe0004153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Feb 2020 01:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357848 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 357848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 01:23:32 -0000 Author: imp Date: Thu Feb 13 01:23:32 2020 New Revision: 357848 URL: https://svnweb.freebsd.org/changeset/base/357848 Log: Export the current da flags as bitfield Export the current flags. They can be useful to other programs wanting to do special thigns for removable or similar devices. Differential Revision: https://reviews.freebsd.org/D23417 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Feb 12 23:54:38 2020 (r357847) +++ head/sys/cam/scsi/scsi_da.c Thu Feb 13 01:23:32 2020 (r357848) @@ -122,6 +122,28 @@ typedef enum { DA_FLAG_CAN_ATA_ZONE = 0x040000, DA_FLAG_TUR_PENDING = 0x080000 } da_flags; +#define DA_FLAG_STRING \ + "\020" \ + "\001PACK_INVALID" \ + "\002NEW_PACK" \ + "\003PACK_LOCKED" \ + "\004PACK_REMOVABLE" \ + "\005UNUSED" \ + "\006NEED_OTAG" \ + "\007WAS_OTAG" \ + "\010RETRY_UA" \ + "\011OPEN" \ + "\012SCTX_INIT" \ + "\013CAN_RC16" \ + "\014PROBED" \ + "\015DIRTY" \ + "\016ANNOUCNED" \ + "\017CAN_ATA_DMA" \ + "\020CAN_ATA_LOG" \ + "\021CAN_ATA_IDLOG" \ + "\022CAN_ATA_SUPACP" \ + "\023CAN_ATA_ZONE" \ + "\024TUR_PENDING" typedef enum { DA_Q_NONE = 0x00, @@ -1442,6 +1464,7 @@ static void dasysctlinit(void *context, int pending); static int dasysctlsofttimeout(SYSCTL_HANDLER_ARGS); static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS); static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS); +static int daflagssysctl(SYSCTL_HANDLER_ARGS); static int dazonemodesysctl(SYSCTL_HANDLER_ARGS); static int dazonesupsysctl(SYSCTL_HANDLER_ARGS); static int dadeletemaxsysctl(SYSCTL_HANDLER_ARGS); @@ -2316,6 +2339,11 @@ dasysctlinit(void *context, int pending) 0, "DIF protection type"); + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "flags", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + softc, 0, daflagssysctl, "A", + "Flags for drive"); + #ifdef CAM_TEST_FAILURE SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "invalidate", CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -2588,6 +2616,24 @@ dadeletemethodchoose(struct da_softc *softc, da_delete /* Fallback to default. */ dadeletemethodset(softc, default_method); +} + +static int +daflagssysctl(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sbuf; + struct da_softc *softc = arg1; + int error; + + sbuf_new_for_sysctl(&sbuf, NULL, 0, req); + if (softc->flags != 0) + sbuf_printf(&sbuf, "0x%b", softc->flags, DA_FLAG_STRING); + else + sbuf_printf(&sbuf, "0"); + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + + return (error); } static int From owner-svn-src-all@freebsd.org Thu Feb 13 01:23:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AD7F248A78; Thu, 13 Feb 2020 01:23:45 +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) server-signature RSA-PSS (4096 bits) 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 48HzL91nHMz4HLy; Thu, 13 Feb 2020 01:23:45 +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 386942A1E; Thu, 13 Feb 2020 01:23:45 +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 01D1NjTQ004217; Thu, 13 Feb 2020 01:23:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D1NjnN004216; Thu, 13 Feb 2020 01:23:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002130123.01D1NjnN004216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Feb 2020 01:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357849 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 357849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 01:23:45 -0000 Author: imp Date: Thu Feb 13 01:23:44 2020 New Revision: 357849 URL: https://svnweb.freebsd.org/changeset/base/357849 Log: Convert rotating and unmapped_io to a DA flag Rotating and unmapped_io are really da flags. Convert them to a flag so it will be reported with the other flags for the device. Deprecate the .rotating and .unmapped_io sysctls in FreeBSD 14 and remove the softc ints. Differential Revision: https://reviews.freebsd.org/D23417 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Feb 13 01:23:32 2020 (r357848) +++ head/sys/cam/scsi/scsi_da.c Thu Feb 13 01:23:44 2020 (r357849) @@ -106,6 +106,7 @@ typedef enum { DA_FLAG_NEW_PACK = 0x000002, DA_FLAG_PACK_LOCKED = 0x000004, DA_FLAG_PACK_REMOVABLE = 0x000008, + DA_FLAG_ROTATING = 0x000010, DA_FLAG_NEED_OTAG = 0x000020, DA_FLAG_WAS_OTAG = 0x000040, DA_FLAG_RETRY_UA = 0x000080, @@ -120,7 +121,8 @@ typedef enum { DA_FLAG_CAN_ATA_IDLOG = 0x010000, DA_FLAG_CAN_ATA_SUPCAP = 0x020000, DA_FLAG_CAN_ATA_ZONE = 0x040000, - DA_FLAG_TUR_PENDING = 0x080000 + DA_FLAG_TUR_PENDING = 0x080000, + DA_FLAG_UNMAPPEDIO = 0x100000 } da_flags; #define DA_FLAG_STRING \ "\020" \ @@ -128,7 +130,7 @@ typedef enum { "\002NEW_PACK" \ "\003PACK_LOCKED" \ "\004PACK_REMOVABLE" \ - "\005UNUSED" \ + "\005ROTATING" \ "\006NEED_OTAG" \ "\007WAS_OTAG" \ "\010RETRY_UA" \ @@ -143,7 +145,8 @@ typedef enum { "\021CAN_ATA_IDLOG" \ "\022CAN_ATA_SUPACP" \ "\023CAN_ATA_ZONE" \ - "\024TUR_PENDING" + "\024TUR_PENDING" \ + "\025UNMAPPEDIO" typedef enum { DA_Q_NONE = 0x00, @@ -367,8 +370,6 @@ struct da_softc { da_delete_methods delete_method_pref; da_delete_methods delete_method; da_delete_func_t *delete_func; - int unmappedio; - int rotating; int p_type; struct disk_params params; struct disk *disk; @@ -1464,6 +1465,7 @@ static void dasysctlinit(void *context, int pending); static int dasysctlsofttimeout(SYSCTL_HANDLER_ARGS); static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS); static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS); +static int dabitsysctl(SYSCTL_HANDLER_ARGS); static int daflagssysctl(SYSCTL_HANDLER_ARGS); static int dazonemodesysctl(SYSCTL_HANDLER_ARGS); static int dazonesupsysctl(SYSCTL_HANDLER_ARGS); @@ -2315,24 +2317,6 @@ dasysctlinit(void *context, int pending) SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, - "unmapped_io", - CTLFLAG_RD, - &softc->unmappedio, - 0, - "Unmapped I/O support"); - - SYSCTL_ADD_INT(&softc->sysctl_ctx, - SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, - "rotating", - CTLFLAG_RD, - &softc->rotating, - 0, - "Rotating media"); - - SYSCTL_ADD_INT(&softc->sysctl_ctx, - SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "p_type", CTLFLAG_RD, &softc->p_type, @@ -2343,6 +2327,14 @@ dasysctlinit(void *context, int pending) OID_AUTO, "flags", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 0, daflagssysctl, "A", "Flags for drive"); + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "rotating", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + &softc->flags, DA_FLAG_ROTATING, dabitsysctl, "I", + "Rotating media *DEPRECATED* gone in FreeBSD 14"); + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "unmapped_io", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + &softc->flags, DA_FLAG_UNMAPPEDIO, dabitsysctl, "I", + "Unmapped I/O support *DEPRECATED* gone in FreeBSD 14"); #ifdef CAM_TEST_FAILURE SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), @@ -2619,6 +2611,21 @@ dadeletemethodchoose(struct da_softc *softc, da_delete } static int +dabitsysctl(SYSCTL_HANDLER_ARGS) +{ + int flags = (intptr_t)arg1; + int test = arg2; + int tmpout, error; + + tmpout = !!(flags & test); + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); + if (error || !req->newptr) + return (error); + + return (EPERM); +} + +static int daflagssysctl(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; @@ -2775,7 +2782,7 @@ daregister(struct cam_periph *periph, void *arg) softc->unmap_gran_align = 0; softc->ws_max_blks = WS16_MAX_BLKS; softc->trim_max_ranges = ATA_TRIM_MAX_RANGES; - softc->rotating = 1; + softc->flags |= DA_FLAG_ROTATING; periph->softc = softc; @@ -2908,7 +2915,7 @@ daregister(struct cam_periph *periph, void *arg) if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; if ((cpi.hba_misc & PIM_UNMAPPED) != 0) { - softc->unmappedio = 1; + softc->flags |= DA_FLAG_UNMAPPEDIO; softc->disk->d_flags |= DISKFLAG_UNMAPPED_BIO; } cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, @@ -5188,7 +5195,7 @@ dadone_probebdc(struct cam_periph *periph, union ccb * SVPD_BDC_RATE_NON_ROTATING) { cam_iosched_set_sort_queue( softc->cam_iosched, 0); - softc->rotating = 0; + softc->flags &= ~DA_FLAG_ROTATING; } if (softc->disk->d_rotation_rate != old_rate) { disk_attr_changed(softc->disk, @@ -5298,7 +5305,7 @@ dadone_probeata(struct cam_periph *periph, union ccb * softc->disk->d_rotation_rate = ata_params->media_rotation_rate; if (softc->disk->d_rotation_rate == ATA_RATE_NON_ROTATING) { cam_iosched_set_sort_queue(softc->cam_iosched, 0); - softc->rotating = 0; + softc->flags &= ~DA_FLAG_ROTATING; } if (softc->disk->d_rotation_rate != old_rate) { disk_attr_changed(softc->disk, From owner-svn-src-all@freebsd.org Thu Feb 13 01:42:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 774B02496A2; Thu, 13 Feb 2020 01:42:14 +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) server-signature RSA-PSS (4096 bits) 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 48HzlV2cZGz4JVv; Thu, 13 Feb 2020 01:42:14 +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 5517B2DFD; Thu, 13 Feb 2020 01:42:14 +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 01D1gEF2015193; Thu, 13 Feb 2020 01:42:14 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D1gEnW015192; Thu, 13 Feb 2020 01:42:14 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202002130142.01D1gEnW015192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Thu, 13 Feb 2020 01:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357850 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 357850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 01:42:14 -0000 Author: freqlabs Date: Thu Feb 13 01:42:13 2020 New Revision: 357850 URL: https://svnweb.freebsd.org/changeset/base/357850 Log: Add myself (freqlabs) as a src committer Approved by: mav (mentor) MFC after: 3 days Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Feb 13 01:23:44 2020 (r357849) +++ head/share/misc/committers-src.dot Thu Feb 13 01:42:13 2020 (r357850) @@ -175,6 +175,7 @@ fabient [label="Fabien Thomas\nfabient@FreeBSD.org\n20 fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/30"] +freqlabs [label="Ryan Moeller\nfreqlabs@FreeBSD.org\n2020/02/10"] fsu [label="Fedor Uporov\nfsu@FreeBSD.org\n2017/08/28"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] @@ -716,6 +717,7 @@ markm -> sheldonh mav -> ae mav -> eugen +mav -> freqlabs mav -> ram mdf -> gleb @@ -730,6 +732,8 @@ mlaier -> benjsc mlaier -> dhartmei mlaier -> thompsa mlaier -> eri + +mmacy -> freqlabs msmith -> cokane msmith -> jasone From owner-svn-src-all@freebsd.org Thu Feb 13 03:11:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDAC324B6B6; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48J1kg4fh4z4Ng3; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A24041D0; Thu, 13 Feb 2020 03:11:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01D3BdtK068162; Thu, 13 Feb 2020 03:11:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D3BdpA068161; Thu, 13 Feb 2020 03:11:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002130311.01D3BdpA068161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 13 Feb 2020 03:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357851 - stable/11/lib/libc/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/lib/libc/stdio X-SVN-Commit-Revision: 357851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 03:11:39 -0000 Author: kevans Date: Thu Feb 13 03:11:39 2020 New Revision: 357851 URL: https://svnweb.freebsd.org/changeset/base/357851 Log: MFC r327181: fsync(3): correctly document return values In r268924 the behavior of fflush was changed to return success on read only streams. Document this. Modified: stable/11/lib/libc/stdio/fflush.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdio/fflush.3 ============================================================================== --- stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 01:42:13 2020 (r357850) +++ stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 03:11:39 2020 (r357851) @@ -32,7 +32,7 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd December 25, 2017 .Dt FFLUSH 3 .Os .Sh NAME @@ -87,9 +87,7 @@ is set to indicate the error. The .Fa stream argument -is not an open stream, or, in the case of -.Fn fflush , -not a stream open for writing. +is not an open stream. .El .Pp The function @@ -97,7 +95,12 @@ The function may also fail and set .Va errno for any of the errors specified for the routine -.Xr write 2 . +.Xr write 2 , +except that in case of +.Fa stream +being a read-only descriptor, +.Fn fflush +returns 0. .Sh SEE ALSO .Xr write 2 , .Xr fclose 3 , From owner-svn-src-all@freebsd.org Thu Feb 13 03:13:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 541C724B770; Thu, 13 Feb 2020 03:13:32 +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) server-signature RSA-PSS (4096 bits) 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 48J1mr1bBzz4Ns0; Thu, 13 Feb 2020 03:13:32 +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 31AF04235; Thu, 13 Feb 2020 03:13:32 +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 01D3DWg3070586; Thu, 13 Feb 2020 03:13:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D3DTYC070573; Thu, 13 Feb 2020 03:13:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002130313.01D3DTYC070573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 13 Feb 2020 03:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357852 - in stable: 11/include 11/lib/libc/stdio 12/include 12/lib/libc/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/include 11/lib/libc/stdio 12/include 12/lib/libc/stdio X-SVN-Commit-Revision: 357852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 03:13:32 -0000 Author: kevans Date: Thu Feb 13 03:13:29 2020 New Revision: 357852 URL: https://svnweb.freebsd.org/changeset/base/357852 Log: MFC r357284, r357419: stdio unlocked r357284: stdio: provide _unlocked variants of fflush, fputc, fputs, fread, fwrite fflush_unlocked is currently desired in ports by sysutils/metalog, and redefined as the locked fflush. fputc_unlocked, fputs_unlocked, fread_unlocked, and fwrite_unlocked are currently desired in ports by devel/elfutils, and redefined as the locked fputs, fread, and fwrite respectively. r357419: libc: provide fputc_unlocked Among the same justification as the other stdio _unlocked; in addition to an inline version in , we must provide a function in libc as well for the functionality. This fixes the lang/gcc* builds, which want to use the symbol from libc. Modified: stable/11/include/stdio.h stable/11/lib/libc/stdio/Makefile.inc stable/11/lib/libc/stdio/Symbol.map stable/11/lib/libc/stdio/fflush.3 stable/11/lib/libc/stdio/fflush.c stable/11/lib/libc/stdio/fputc.c stable/11/lib/libc/stdio/fputs.3 stable/11/lib/libc/stdio/fputs.c stable/11/lib/libc/stdio/fread.3 stable/11/lib/libc/stdio/fread.c stable/11/lib/libc/stdio/fwrite.c stable/11/lib/libc/stdio/putc.3 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/include/stdio.h stable/12/lib/libc/stdio/Makefile.inc stable/12/lib/libc/stdio/Symbol.map stable/12/lib/libc/stdio/fflush.3 stable/12/lib/libc/stdio/fflush.c stable/12/lib/libc/stdio/fputc.c stable/12/lib/libc/stdio/fputs.3 stable/12/lib/libc/stdio/fputs.c stable/12/lib/libc/stdio/fread.3 stable/12/lib/libc/stdio/fread.c stable/12/lib/libc/stdio/fwrite.c stable/12/lib/libc/stdio/putc.3 Directory Properties: stable/12/ (props changed) Modified: stable/11/include/stdio.h ============================================================================== --- stable/11/include/stdio.h Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/include/stdio.h Thu Feb 13 03:13:29 2020 (r357852) @@ -345,7 +345,13 @@ int putchar_unlocked(int); void clearerr_unlocked(FILE *); int feof_unlocked(FILE *); int ferror_unlocked(FILE *); +int fflush_unlocked(FILE *); int fileno_unlocked(FILE *); +int fputc_unlocked(int, FILE *); +int fputs_unlocked(const char * __restrict, FILE * __restrict); +size_t fread_unlocked(void * __restrict, size_t, size_t, FILE * __restrict); +size_t fwrite_unlocked(const void * __restrict, size_t, size_t, + FILE * __restrict); #endif #if __POSIX_VISIBLE >= 200112 @@ -541,10 +547,11 @@ extern int __isthreaded; * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 * B.8.2.7 for the rationale behind the *_unlocked() macros. */ +#define clearerr_unlocked(p) __sclearerr(p) #define feof_unlocked(p) __sfeof(p) #define ferror_unlocked(p) __sferror(p) -#define clearerr_unlocked(p) __sclearerr(p) #define fileno_unlocked(p) __sfileno(p) +#define fputc_unlocked(s, p) __sputc(s, p) #endif #if __POSIX_VISIBLE >= 199506 #define getc_unlocked(fp) __sgetc(fp) Modified: stable/11/lib/libc/stdio/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdio/Makefile.inc Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/Makefile.inc Thu Feb 13 03:13:29 2020 (r357852) @@ -48,13 +48,17 @@ MLINKS+=ferror.3 ferror_unlocked.3 \ ferror.3 clearerr.3 ferror.3 clearerr_unlocked.3 \ ferror.3 feof.3 ferror.3 feof_unlocked.3 \ ferror.3 fileno.3 ferror.3 fileno_unlocked.3 -MLINKS+=fflush.3 fpurge.3 +MLINKS+=fflush.3 fflush_unlocked.3 \ + fflush.3 fpurge.3 MLINKS+=fgets.3 gets.3 MLINKS+=fgets.3 gets_s.3 MLINKS+=flockfile.3 ftrylockfile.3 flockfile.3 funlockfile.3 MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 fopen.3 fmemopen.3 -MLINKS+=fputs.3 puts.3 -MLINKS+=fread.3 fwrite.3 +MLINKS+=fputs.3 fputs_unlocked.3 \ + fputs.3 puts.3 +MLINKS+=fread.3 fread_unlocked.3 \ + fread.3 fwrite.3 \ + fread.3 fwrite_unlocked.3 MLINKS+=fseek.3 fgetpos.3 fseek.3 fseeko.3 fseek.3 fsetpos.3 fseek.3 ftell.3 \ fseek.3 ftello.3 fseek.3 rewind.3 MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3 Modified: stable/11/lib/libc/stdio/Symbol.map ============================================================================== --- stable/11/lib/libc/stdio/Symbol.map Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/Symbol.map Thu Feb 13 03:13:29 2020 (r357852) @@ -171,6 +171,14 @@ FBSD_1.5 { gets_s; }; +FBSD_1.6 { + fflush_unlocked; + fputc_unlocked; + fputs_unlocked; + fread_unlocked; + fwrite_unlocked; +}; + FBSDprivate_1.0 { _flockfile; _flockfile_debug_stub; Modified: stable/11/lib/libc/stdio/fflush.3 ============================================================================== --- stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 25, 2017 +.Dd January 23, 2020 .Dt FFLUSH 3 .Os .Sh NAME .Nm fflush , +.Nm fflush_unlocked , .Nm fpurge .Nd flush a stream .Sh LIBRARY @@ -46,6 +47,8 @@ .Ft int .Fn fflush "FILE *stream" .Ft int +.Fn fflush_unlocked "FILE *stream" +.Ft int .Fn fpurge "FILE *stream" .Sh DESCRIPTION The function @@ -63,6 +66,16 @@ argument is flushes .Em all open output streams. +.Pp +The +.Fn fflush_unlocked +function is equivalent to +.Fn fflush , +except that the caller is responsible for locking the stream with +.Xr flockfile 3 +before calling it. +This function may be used to avoid the overhead of locking the stream and to +prevent races when multiple threads are operating on the same stream. .Pp The function .Fn fpurge Modified: stable/11/lib/libc/stdio/fflush.c ============================================================================== --- stable/11/lib/libc/stdio/fflush.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fflush.c Thu Feb 13 03:13:29 2020 (r357852) @@ -98,6 +98,8 @@ __fflush(FILE *fp) return (retval); } +__weak_reference(__fflush, fflush_unlocked); + int __sflush(FILE *fp) { Modified: stable/11/lib/libc/stdio/fputc.c ============================================================================== --- stable/11/lib/libc/stdio/fputc.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fputc.c Thu Feb 13 03:13:29 2020 (r357852) @@ -42,14 +42,24 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "libc_private.h" +#undef fputc_unlocked + int +fputc_unlocked(int c, FILE *fp) +{ + + /* Orientation set by __sputc() when buffer is full. */ + /* ORIENT(fp, -1); */ + return (__sputc(c, fp)); +} + +int fputc(int c, FILE *fp) { int retval; + FLOCKFILE_CANCELSAFE(fp); - /* Orientation set by __sputc() when buffer is full. */ - /* ORIENT(fp, -1); */ - retval = __sputc(c, fp); + retval = fputc_unlocked(c, fp); FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: stable/11/lib/libc/stdio/fputs.3 ============================================================================== --- stable/11/lib/libc/stdio/fputs.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fputs.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)fputs.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 23, 2020 .Dt FPUTS 3 .Os .Sh NAME .Nm fputs , +.Nm fputs_unlocked , .Nm puts .Nd output a line to a stream .Sh LIBRARY @@ -46,6 +47,8 @@ .Ft int .Fn fputs "const char *str" "FILE *stream" .Ft int +.Fn fputs_unlocked "const char *str" "FILE *stream" +.Ft int .Fn puts "const char *str" .Sh DESCRIPTION The function @@ -57,6 +60,16 @@ to the stream pointed to by .\" The terminating .\" .Dv NUL .\" character is not written. +.Pp +The +.Fn fputs_unlocked +function is equivalent to +.Fn fputs , +except that the caller is responsible for locking the stream with +.Xr flockfile 3 +before calling it. +This function may be used to avoid the overhead of locking the stream and to +prevent races when multiple threads are operating on the same stream. .Pp The function .Fn puts Modified: stable/11/lib/libc/stdio/fputs.c ============================================================================== --- stable/11/lib/libc/stdio/fputs.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fputs.c Thu Feb 13 03:13:29 2020 (r357852) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); * Write the given string to the given file. */ int -fputs(const char * __restrict s, FILE * __restrict fp) +fputs_unlocked(const char * __restrict s, FILE * __restrict fp) { int retval; struct __suio uio; @@ -59,11 +59,20 @@ fputs(const char * __restrict s, FILE * __restrict fp) uio.uio_resid = iov.iov_len = strlen(s); uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); retval = __sfvwrite(fp, &uio); - FUNLOCKFILE_CANCELSAFE(); if (retval == 0) return (iov.iov_len > INT_MAX ? INT_MAX : iov.iov_len); + return (retval); +} + +int +fputs(const char * __restrict s, FILE * __restrict fp) +{ + int retval; + + FLOCKFILE_CANCELSAFE(fp); + retval = fputs_unlocked(s, fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: stable/11/lib/libc/stdio/fread.3 ============================================================================== --- stable/11/lib/libc/stdio/fread.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fread.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,12 +32,14 @@ .\" @(#)fread.3 8.2 (Berkeley) 3/8/94 .\" $FreeBSD$ .\" -.Dd March 8, 1994 +.Dd January 23, 2020 .Dt FREAD 3 .Os .Sh NAME .Nm fread , -.Nm fwrite +.Nm fread_unlocked , +.Nm fwrite , +.Nm fwrite_unlocked .Nd binary stream input/output .Sh LIBRARY .Lb libc @@ -46,7 +48,11 @@ .Ft size_t .Fn fread "void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" .Ft size_t +.Fn fread_unlocked "void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" +.Ft size_t .Fn fwrite "const void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" +.Ft size_t +.Fn fwrite_unlocked "const void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" .Sh DESCRIPTION The function .Fn fread @@ -69,6 +75,21 @@ bytes long, to the stream pointed to by .Fa stream , obtaining them from the location given by .Fa ptr . +.Pp +The +.Fn fread_unlocked +and +.Fn fwrite_unlocked +functions are equivalent to +.Fn fread +and +.Fn fwrite +respectively, except that the caller is responsible for locking the stream +with +.Xr flockfile 3 +before calling them. +These functions may be used to avoid the overhead of locking the stream +and to prevent races when multiple threads are operating on the same stream. .Sh RETURN VALUES The functions .Fn fread Modified: stable/11/lib/libc/stdio/fread.c ============================================================================== --- stable/11/lib/libc/stdio/fread.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fread.c Thu Feb 13 03:13:29 2020 (r357852) @@ -113,3 +113,5 @@ __fread(void * __restrict buf, size_t size, size_t cou fp->_p += resid; return (count); } + +__weak_reference(__fread, fread_unlocked); Modified: stable/11/lib/libc/stdio/fwrite.c ============================================================================== --- stable/11/lib/libc/stdio/fwrite.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/fwrite.c Thu Feb 13 03:13:29 2020 (r357852) @@ -50,7 +50,8 @@ __FBSDID("$FreeBSD$"); * Return the number of whole objects written. */ size_t -fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict fp) +fwrite_unlocked(const void * __restrict buf, size_t size, size_t count, + FILE * __restrict fp) { size_t n; struct __suio uio; @@ -82,7 +83,6 @@ fwrite(const void * __restrict buf, size_t size, size_ uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); /* * The usual case is success (__sfvwrite returns 0); @@ -91,6 +91,17 @@ fwrite(const void * __restrict buf, size_t size, size_ */ if (__sfvwrite(fp, &uio) != 0) count = (n - uio.uio_resid) / size; - FUNLOCKFILE_CANCELSAFE(); return (count); +} + +size_t +fwrite(const void * __restrict buf, size_t size, size_t count, + FILE * __restrict fp) +{ + size_t n; + + FLOCKFILE_CANCELSAFE(fp); + n = fwrite_unlocked(buf, size, count, fp); + FUNLOCKFILE_CANCELSAFE(); + return (n); } Modified: stable/11/lib/libc/stdio/putc.3 ============================================================================== --- stable/11/lib/libc/stdio/putc.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/11/lib/libc/stdio/putc.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)putc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 10, 2003 +.Dd January 23, 2020 .Dt PUTC 3 .Os .Sh NAME .Nm fputc , +.Nm fputc_unlocked , .Nm putc , .Nm putc_unlocked , .Nm putchar , @@ -50,6 +51,8 @@ .Ft int .Fn fputc "int c" "FILE *stream" .Ft int +.Fn fputc_unlocked "int c" "FILE *stream" +.Ft int .Fn putc "int c" "FILE *stream" .Ft int .Fn putc_unlocked "int c" "FILE *stream" @@ -97,11 +100,13 @@ to the named output .Fa stream . .Pp The -.Fn putc_unlocked +.Fn fputc_unlocked , +.Fn putc_unlocked , and .Fn putchar_unlocked functions are equivalent to -.Fn putc +.Fn fputc , +.Fn putc , and .Fn putchar respectively, From owner-svn-src-all@freebsd.org Thu Feb 13 03:13:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A98424B7A2; Thu, 13 Feb 2020 03:13:35 +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) server-signature RSA-PSS (4096 bits) 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 48J1mt65Hzz4NtM; Thu, 13 Feb 2020 03:13:34 +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 B1BBB4236; Thu, 13 Feb 2020 03:13:34 +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 01D3DYPc070605; Thu, 13 Feb 2020 03:13:34 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D3DWs7070594; Thu, 13 Feb 2020 03:13:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002130313.01D3DWs7070594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 13 Feb 2020 03:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357852 - in stable: 11/include 11/lib/libc/stdio 12/include 12/lib/libc/stdio X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/include 11/lib/libc/stdio 12/include 12/lib/libc/stdio X-SVN-Commit-Revision: 357852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 03:13:35 -0000 Author: kevans Date: Thu Feb 13 03:13:29 2020 New Revision: 357852 URL: https://svnweb.freebsd.org/changeset/base/357852 Log: MFC r357284, r357419: stdio unlocked r357284: stdio: provide _unlocked variants of fflush, fputc, fputs, fread, fwrite fflush_unlocked is currently desired in ports by sysutils/metalog, and redefined as the locked fflush. fputc_unlocked, fputs_unlocked, fread_unlocked, and fwrite_unlocked are currently desired in ports by devel/elfutils, and redefined as the locked fputs, fread, and fwrite respectively. r357419: libc: provide fputc_unlocked Among the same justification as the other stdio _unlocked; in addition to an inline version in , we must provide a function in libc as well for the functionality. This fixes the lang/gcc* builds, which want to use the symbol from libc. Modified: stable/12/include/stdio.h stable/12/lib/libc/stdio/Makefile.inc stable/12/lib/libc/stdio/Symbol.map stable/12/lib/libc/stdio/fflush.3 stable/12/lib/libc/stdio/fflush.c stable/12/lib/libc/stdio/fputc.c stable/12/lib/libc/stdio/fputs.3 stable/12/lib/libc/stdio/fputs.c stable/12/lib/libc/stdio/fread.3 stable/12/lib/libc/stdio/fread.c stable/12/lib/libc/stdio/fwrite.c stable/12/lib/libc/stdio/putc.3 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/include/stdio.h stable/11/lib/libc/stdio/Makefile.inc stable/11/lib/libc/stdio/Symbol.map stable/11/lib/libc/stdio/fflush.3 stable/11/lib/libc/stdio/fflush.c stable/11/lib/libc/stdio/fputc.c stable/11/lib/libc/stdio/fputs.3 stable/11/lib/libc/stdio/fputs.c stable/11/lib/libc/stdio/fread.3 stable/11/lib/libc/stdio/fread.c stable/11/lib/libc/stdio/fwrite.c stable/11/lib/libc/stdio/putc.3 Directory Properties: stable/11/ (props changed) Modified: stable/12/include/stdio.h ============================================================================== --- stable/12/include/stdio.h Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/include/stdio.h Thu Feb 13 03:13:29 2020 (r357852) @@ -347,7 +347,13 @@ int putchar_unlocked(int); void clearerr_unlocked(FILE *); int feof_unlocked(FILE *); int ferror_unlocked(FILE *); +int fflush_unlocked(FILE *); int fileno_unlocked(FILE *); +int fputc_unlocked(int, FILE *); +int fputs_unlocked(const char * __restrict, FILE * __restrict); +size_t fread_unlocked(void * __restrict, size_t, size_t, FILE * __restrict); +size_t fwrite_unlocked(const void * __restrict, size_t, size_t, + FILE * __restrict); #endif #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 @@ -508,10 +514,11 @@ extern int __isthreaded; * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 * B.8.2.7 for the rationale behind the *_unlocked() macros. */ +#define clearerr_unlocked(p) __sclearerr(p) #define feof_unlocked(p) __sfeof(p) #define ferror_unlocked(p) __sferror(p) -#define clearerr_unlocked(p) __sclearerr(p) #define fileno_unlocked(p) __sfileno(p) +#define fputc_unlocked(s, p) __sputc(s, p) #endif #if __POSIX_VISIBLE >= 199506 #define getc_unlocked(fp) __sgetc(fp) Modified: stable/12/lib/libc/stdio/Makefile.inc ============================================================================== --- stable/12/lib/libc/stdio/Makefile.inc Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/Makefile.inc Thu Feb 13 03:13:29 2020 (r357852) @@ -48,13 +48,17 @@ MLINKS+=ferror.3 ferror_unlocked.3 \ ferror.3 clearerr.3 ferror.3 clearerr_unlocked.3 \ ferror.3 feof.3 ferror.3 feof_unlocked.3 \ ferror.3 fileno.3 ferror.3 fileno_unlocked.3 -MLINKS+=fflush.3 fpurge.3 +MLINKS+=fflush.3 fflush_unlocked.3 \ + fflush.3 fpurge.3 MLINKS+=fgets.3 gets.3 MLINKS+=fgets.3 gets_s.3 MLINKS+=flockfile.3 ftrylockfile.3 flockfile.3 funlockfile.3 MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 fopen.3 fmemopen.3 -MLINKS+=fputs.3 puts.3 -MLINKS+=fread.3 fwrite.3 +MLINKS+=fputs.3 fputs_unlocked.3 \ + fputs.3 puts.3 +MLINKS+=fread.3 fread_unlocked.3 \ + fread.3 fwrite.3 \ + fread.3 fwrite_unlocked.3 MLINKS+=fseek.3 fgetpos.3 fseek.3 fseeko.3 fseek.3 fsetpos.3 fseek.3 ftell.3 \ fseek.3 ftello.3 fseek.3 rewind.3 MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3 Modified: stable/12/lib/libc/stdio/Symbol.map ============================================================================== --- stable/12/lib/libc/stdio/Symbol.map Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/Symbol.map Thu Feb 13 03:13:29 2020 (r357852) @@ -171,6 +171,14 @@ FBSD_1.5 { gets_s; }; +FBSD_1.6 { + fflush_unlocked; + fputc_unlocked; + fputs_unlocked; + fread_unlocked; + fwrite_unlocked; +}; + FBSDprivate_1.0 { _flockfile; _flockfile_debug_stub; Modified: stable/12/lib/libc/stdio/fflush.3 ============================================================================== --- stable/12/lib/libc/stdio/fflush.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fflush.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 25, 2017 +.Dd January 23, 2020 .Dt FFLUSH 3 .Os .Sh NAME .Nm fflush , +.Nm fflush_unlocked , .Nm fpurge .Nd flush a stream .Sh LIBRARY @@ -46,6 +47,8 @@ .Ft int .Fn fflush "FILE *stream" .Ft int +.Fn fflush_unlocked "FILE *stream" +.Ft int .Fn fpurge "FILE *stream" .Sh DESCRIPTION The function @@ -63,6 +66,16 @@ argument is flushes .Em all open output streams. +.Pp +The +.Fn fflush_unlocked +function is equivalent to +.Fn fflush , +except that the caller is responsible for locking the stream with +.Xr flockfile 3 +before calling it. +This function may be used to avoid the overhead of locking the stream and to +prevent races when multiple threads are operating on the same stream. .Pp The function .Fn fpurge Modified: stable/12/lib/libc/stdio/fflush.c ============================================================================== --- stable/12/lib/libc/stdio/fflush.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fflush.c Thu Feb 13 03:13:29 2020 (r357852) @@ -100,6 +100,8 @@ __fflush(FILE *fp) return (retval); } +__weak_reference(__fflush, fflush_unlocked); + int __sflush(FILE *fp) { Modified: stable/12/lib/libc/stdio/fputc.c ============================================================================== --- stable/12/lib/libc/stdio/fputc.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fputc.c Thu Feb 13 03:13:29 2020 (r357852) @@ -44,14 +44,24 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "libc_private.h" +#undef fputc_unlocked + int +fputc_unlocked(int c, FILE *fp) +{ + + /* Orientation set by __sputc() when buffer is full. */ + /* ORIENT(fp, -1); */ + return (__sputc(c, fp)); +} + +int fputc(int c, FILE *fp) { int retval; + FLOCKFILE_CANCELSAFE(fp); - /* Orientation set by __sputc() when buffer is full. */ - /* ORIENT(fp, -1); */ - retval = __sputc(c, fp); + retval = fputc_unlocked(c, fp); FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: stable/12/lib/libc/stdio/fputs.3 ============================================================================== --- stable/12/lib/libc/stdio/fputs.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fputs.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)fputs.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 23, 2020 .Dt FPUTS 3 .Os .Sh NAME .Nm fputs , +.Nm fputs_unlocked , .Nm puts .Nd output a line to a stream .Sh LIBRARY @@ -46,6 +47,8 @@ .Ft int .Fn fputs "const char *str" "FILE *stream" .Ft int +.Fn fputs_unlocked "const char *str" "FILE *stream" +.Ft int .Fn puts "const char *str" .Sh DESCRIPTION The function @@ -57,6 +60,16 @@ to the stream pointed to by .\" The terminating .\" .Dv NUL .\" character is not written. +.Pp +The +.Fn fputs_unlocked +function is equivalent to +.Fn fputs , +except that the caller is responsible for locking the stream with +.Xr flockfile 3 +before calling it. +This function may be used to avoid the overhead of locking the stream and to +prevent races when multiple threads are operating on the same stream. .Pp The function .Fn puts Modified: stable/12/lib/libc/stdio/fputs.c ============================================================================== --- stable/12/lib/libc/stdio/fputs.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fputs.c Thu Feb 13 03:13:29 2020 (r357852) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * Write the given string to the given file. */ int -fputs(const char * __restrict s, FILE * __restrict fp) +fputs_unlocked(const char * __restrict s, FILE * __restrict fp) { int retval; struct __suio uio; @@ -61,11 +61,20 @@ fputs(const char * __restrict s, FILE * __restrict fp) uio.uio_resid = iov.iov_len = strlen(s); uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); retval = __sfvwrite(fp, &uio); - FUNLOCKFILE_CANCELSAFE(); if (retval == 0) return (iov.iov_len > INT_MAX ? INT_MAX : iov.iov_len); + return (retval); +} + +int +fputs(const char * __restrict s, FILE * __restrict fp) +{ + int retval; + + FLOCKFILE_CANCELSAFE(fp); + retval = fputs_unlocked(s, fp); + FUNLOCKFILE_CANCELSAFE(); return (retval); } Modified: stable/12/lib/libc/stdio/fread.3 ============================================================================== --- stable/12/lib/libc/stdio/fread.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fread.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,12 +32,14 @@ .\" @(#)fread.3 8.2 (Berkeley) 3/8/94 .\" $FreeBSD$ .\" -.Dd March 8, 1994 +.Dd January 23, 2020 .Dt FREAD 3 .Os .Sh NAME .Nm fread , -.Nm fwrite +.Nm fread_unlocked , +.Nm fwrite , +.Nm fwrite_unlocked .Nd binary stream input/output .Sh LIBRARY .Lb libc @@ -46,7 +48,11 @@ .Ft size_t .Fn fread "void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" .Ft size_t +.Fn fread_unlocked "void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" +.Ft size_t .Fn fwrite "const void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" +.Ft size_t +.Fn fwrite_unlocked "const void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream" .Sh DESCRIPTION The function .Fn fread @@ -69,6 +75,21 @@ bytes long, to the stream pointed to by .Fa stream , obtaining them from the location given by .Fa ptr . +.Pp +The +.Fn fread_unlocked +and +.Fn fwrite_unlocked +functions are equivalent to +.Fn fread +and +.Fn fwrite +respectively, except that the caller is responsible for locking the stream +with +.Xr flockfile 3 +before calling them. +These functions may be used to avoid the overhead of locking the stream +and to prevent races when multiple threads are operating on the same stream. .Sh RETURN VALUES The functions .Fn fread Modified: stable/12/lib/libc/stdio/fread.c ============================================================================== --- stable/12/lib/libc/stdio/fread.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fread.c Thu Feb 13 03:13:29 2020 (r357852) @@ -115,3 +115,5 @@ __fread(void * __restrict buf, size_t size, size_t cou fp->_p += resid; return (count); } + +__weak_reference(__fread, fread_unlocked); Modified: stable/12/lib/libc/stdio/fwrite.c ============================================================================== --- stable/12/lib/libc/stdio/fwrite.c Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/fwrite.c Thu Feb 13 03:13:29 2020 (r357852) @@ -52,7 +52,8 @@ __FBSDID("$FreeBSD$"); * Return the number of whole objects written. */ size_t -fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict fp) +fwrite_unlocked(const void * __restrict buf, size_t size, size_t count, + FILE * __restrict fp) { size_t n; struct __suio uio; @@ -84,7 +85,6 @@ fwrite(const void * __restrict buf, size_t size, size_ uio.uio_iov = &iov; uio.uio_iovcnt = 1; - FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); /* * The usual case is success (__sfvwrite returns 0); @@ -93,6 +93,17 @@ fwrite(const void * __restrict buf, size_t size, size_ */ if (__sfvwrite(fp, &uio) != 0) count = (n - uio.uio_resid) / size; - FUNLOCKFILE_CANCELSAFE(); return (count); +} + +size_t +fwrite(const void * __restrict buf, size_t size, size_t count, + FILE * __restrict fp) +{ + size_t n; + + FLOCKFILE_CANCELSAFE(fp); + n = fwrite_unlocked(buf, size, count, fp); + FUNLOCKFILE_CANCELSAFE(); + return (n); } Modified: stable/12/lib/libc/stdio/putc.3 ============================================================================== --- stable/12/lib/libc/stdio/putc.3 Thu Feb 13 03:11:39 2020 (r357851) +++ stable/12/lib/libc/stdio/putc.3 Thu Feb 13 03:13:29 2020 (r357852) @@ -32,11 +32,12 @@ .\" @(#)putc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 10, 2003 +.Dd January 23, 2020 .Dt PUTC 3 .Os .Sh NAME .Nm fputc , +.Nm fputc_unlocked , .Nm putc , .Nm putc_unlocked , .Nm putchar , @@ -50,6 +51,8 @@ .Ft int .Fn fputc "int c" "FILE *stream" .Ft int +.Fn fputc_unlocked "int c" "FILE *stream" +.Ft int .Fn putc "int c" "FILE *stream" .Ft int .Fn putc_unlocked "int c" "FILE *stream" @@ -97,11 +100,13 @@ to the named output .Fa stream . .Pp The -.Fn putc_unlocked +.Fn fputc_unlocked , +.Fn putc_unlocked , and .Fn putchar_unlocked functions are equivalent to -.Fn putc +.Fn fputc , +.Fn putc , and .Fn putchar respectively, From owner-svn-src-all@freebsd.org Thu Feb 13 03:37:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE6D224BFF0; Thu, 13 Feb 2020 03:37:11 +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) server-signature RSA-PSS (4096 bits) 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 48J2J75BLzz4QPM; Thu, 13 Feb 2020 03:37:11 +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 AD3BD45DA; Thu, 13 Feb 2020 03:37:11 +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 01D3bBli083079; Thu, 13 Feb 2020 03:37:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01D3bBrI083078; Thu, 13 Feb 2020 03:37:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002130337.01D3bBrI083078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Feb 2020 03:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357853 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 357853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 03:37:11 -0000 Author: imp Date: Thu Feb 13 03:37:11 2020 New Revision: 357853 URL: https://svnweb.freebsd.org/changeset/base/357853 Log: Use INT instead of string for the ints. Because the string "I" was right, the old code appeared to work. This was a cut and paste error. Noticed by: rpokala@ Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Feb 13 03:13:29 2020 (r357852) +++ head/sys/cam/scsi/scsi_da.c Thu Feb 13 03:37:11 2020 (r357853) @@ -2328,11 +2328,11 @@ dasysctlinit(void *context, int pending) softc, 0, daflagssysctl, "A", "Flags for drive"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "rotating", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + OID_AUTO, "rotating", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, &softc->flags, DA_FLAG_ROTATING, dabitsysctl, "I", "Rotating media *DEPRECATED* gone in FreeBSD 14"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "unmapped_io", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + OID_AUTO, "unmapped_io", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, &softc->flags, DA_FLAG_UNMAPPEDIO, dabitsysctl, "I", "Unmapped I/O support *DEPRECATED* gone in FreeBSD 14"); From owner-svn-src-all@freebsd.org Thu Feb 13 11:00:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B00A253D72; Thu, 13 Feb 2020 11:00:21 +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) server-signature RSA-PSS (4096 bits) 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 48JD7T0KgPz3KB5; Thu, 13 Feb 2020 11:00:21 +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 06A2F975C; Thu, 13 Feb 2020 11:00:21 +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 01DB0KtS044854; Thu, 13 Feb 2020 11:00:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DB0KRY044853; Thu, 13 Feb 2020 11:00:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002131100.01DB0KRY044853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 13 Feb 2020 11:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357854 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 357854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 11:00:21 -0000 Author: dim Date: Thu Feb 13 11:00:20 2020 New Revision: 357854 URL: https://svnweb.freebsd.org/changeset/base/357854 Log: Cleanup gsched tool and geom_sched.so library after r356185. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Feb 13 03:37:11 2020 (r357853) +++ head/ObsoleteFiles.inc Thu Feb 13 11:00:20 2020 (r357854) @@ -54,6 +54,10 @@ OLD_FILES+=usr/include/ssp/string.h OLD_FILES+=usr/include/ssp/unistd.h OLD_DIRS+=usr/include/ssp +# 20191229: GEOM_SCHED class and gsched tool removed +OLD_FILES+=sbin/gsched +OLD_LIBS+=lib/geom/geom_sched.so + # 20191222: new clang import which bumps version from 9.0.0 to 9.0.1. OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/algorithm OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/complex From owner-svn-src-all@freebsd.org Thu Feb 13 13:58:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89D60257768; Thu, 13 Feb 2020 13:58:35 +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) server-signature RSA-PSS (4096 bits) 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 48JJ572wGPz3yWq; Thu, 13 Feb 2020 13:58:35 +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 5AC7FB85D; Thu, 13 Feb 2020 13:58:35 +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 01DDwZxm052796; Thu, 13 Feb 2020 13:58:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DDwZgB052795; Thu, 13 Feb 2020 13:58:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002131358.01DDwZgB052795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 13 Feb 2020 13:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357856 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 13:58:35 -0000 Author: tuexen Date: Thu Feb 13 13:58:34 2020 New Revision: 357856 URL: https://svnweb.freebsd.org/changeset/base/357856 Log: Whitespace cleanup. No functional change. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_log_buf.h Modified: head/sys/netinet/tcp_log_buf.h ============================================================================== --- head/sys/netinet/tcp_log_buf.h Thu Feb 13 12:52:24 2020 (r357855) +++ head/sys/netinet/tcp_log_buf.h Thu Feb 13 13:58:34 2020 (r357856) @@ -130,7 +130,7 @@ struct tcp_log_buffer int tlb_state; /* TCPCB t_state */ uint32_t tlb_starttime; /* TCPCB t_starttime */ - uint32_t tlb_iss; /* TCPCB iss */ + uint32_t tlb_iss; /* TCPCB iss */ uint32_t tlb_flags; /* TCPCB flags */ uint32_t tlb_snd_una; /* TCPCB snd_una */ uint32_t tlb_snd_max; /* TCPCB snd_max */ @@ -145,12 +145,12 @@ struct tcp_log_buffer uint32_t tlb_rcv_adv; /* TCPCB rcv_adv */ uint32_t tlb_rcv_nxt; /* TCPCB rcv_nxt */ tcp_seq tlb_sack_newdata; /* TCPCB sack_newdata */ - uint32_t tlb_rcv_wnd; /* TCPCB rcv_wnd */ + uint32_t tlb_rcv_wnd; /* TCPCB rcv_wnd */ uint32_t tlb_dupacks; /* TCPCB t_dupacks */ int tlb_segqlen; /* TCPCB segqlen */ int tlb_snd_numholes; /* TCPCB snd_numholes */ - uint32_t tlb_flex1; /* Event specific information */ - uint32_t tlb_flex2; /* Event specific information */ + uint32_t tlb_flex1; /* Event specific information */ + uint32_t tlb_flex2; /* Event specific information */ uint8_t tlb_snd_scale:4, /* TCPCB snd_scale */ tlb_rcv_scale:4; /* TCPCB rcv_scale */ uint8_t _pad[3]; /* Padding */ @@ -169,15 +169,15 @@ struct tcp_log_buffer } ALIGN_TCP_LOG; enum tcp_log_events { - TCP_LOG_IN = 1, /* Incoming packet 1 */ - TCP_LOG_OUT, /* Transmit (without other event) 2 */ - TCP_LOG_RTO, /* Retransmit timeout 3 */ - TCP_LOG_TF_ACK, /* Transmit due to TF_ACK 4 */ - TCP_LOG_BAD_RETRAN, /* Detected bad retransmission 5 */ - TCP_LOG_PRR, /* Doing PRR 6 */ - TCP_LOG_REORDER,/* Detected reorder 7 */ - TCP_LOG_HPTS, /* Hpts sending a packet 8 */ - BBR_LOG_BBRUPD, /* We updated BBR info 9 */ + TCP_LOG_IN = 1, /* Incoming packet 1 */ + TCP_LOG_OUT, /* Transmit (without other event) 2 */ + TCP_LOG_RTO, /* Retransmit timeout 3 */ + TCP_LOG_TF_ACK, /* Transmit due to TF_ACK 4 */ + TCP_LOG_BAD_RETRAN, /* Detected bad retransmission 5 */ + TCP_LOG_PRR, /* Doing PRR 6 */ + TCP_LOG_REORDER, /* Detected reorder 7 */ + TCP_LOG_HPTS, /* Hpts sending a packet 8 */ + BBR_LOG_BBRUPD, /* We updated BBR info 9 */ BBR_LOG_BBRSND, /* We did a slot calculation and sending is done 10 */ BBR_LOG_ACKCLEAR, /* A ack clears all outstanding 11 */ BBR_LOG_INQUEUE, /* The tcb had a packet input to it 12 */ @@ -195,8 +195,8 @@ enum tcp_log_events { BBR_LOG_PERSIST, /* BBR changed to/from a persists 24 */ TCP_LOG_FLOWEND, /* End of a flow 25 */ BBR_LOG_RTO, /* BBR's timeout includes BBR info 26 */ - BBR_LOG_DOSEG_DONE, /* hpts do_segment completes 27 */ - BBR_LOG_EXIT_GAIN, /* hpts do_segment completes 28 */ + BBR_LOG_DOSEG_DONE, /* hpts do_segment completes 27 */ + BBR_LOG_EXIT_GAIN, /* hpts do_segment completes 28 */ BBR_LOG_THRESH_CALC, /* Doing threshold calculation 29 */ BBR_LOG_EXTRACWNDGAIN, /* Removed 30 */ TCP_LOG_USERSEND, /* User level sends data 31 */ @@ -204,29 +204,29 @@ enum tcp_log_events { BBR_LOG_STATE_TARGET, /* Log of target at state 33 */ BBR_LOG_TIME_EPOCH, /* A timed based Epoch occured 34 */ BBR_LOG_TO_PROCESS, /* A to was processed 35 */ - BBR_LOG_BBRTSO, /* TSO update 36 */ - BBR_LOG_HPTSDIAG, /* Hpts diag insert 37 */ + BBR_LOG_BBRTSO, /* TSO update 36 */ + BBR_LOG_HPTSDIAG, /* Hpts diag insert 37 */ BBR_LOG_LOWGAIN, /* Low gain accounting 38 */ BBR_LOG_PROGRESS, /* Progress timer event 39 */ - TCP_LOG_SOCKET_OPT, /* A socket option is set 40 */ + TCP_LOG_SOCKET_OPT, /* A socket option is set 40 */ BBR_LOG_TIMERPREP, /* A BBR var to debug out TLP issues 41 */ - BBR_LOG_ENOBUF_JMP, /* We had a enobuf jump 42 */ - BBR_LOG_HPTSI_CALC, /* calc the hptsi time 43 */ + BBR_LOG_ENOBUF_JMP, /* We had a enobuf jump 42 */ + BBR_LOG_HPTSI_CALC, /* calc the hptsi time 43 */ BBR_LOG_RTT_SHRINKS, /* We had a log reduction of rttProp 44 */ - BBR_LOG_BW_RED_EV, /* B/W reduction events 45 */ + BBR_LOG_BW_RED_EV, /* B/W reduction events 45 */ BBR_LOG_REDUCE, /* old bbr log reduce for 4.1 and earlier 46*/ TCP_LOG_RTT, /* A rtt (in useconds) is being sampled and applied to the srtt algo 47 */ - BBR_LOG_SETTINGS_CHG, /* Settings changed for loss response 48 */ - BBR_LOG_SRTT_GAIN_EVENT, /* SRTT gaining -- now not used 49 */ - TCP_LOG_REASS, /* Reassembly buffer logging 50 */ - TCP_HDWR_TLS, /* TCP Hardware TLS logs 51 */ - BBR_LOG_HDWR_PACE, /* TCP Hardware pacing log 52 */ - BBR_LOG_TSTMP_VAL, /* Temp debug timestamp validation 53 */ - TCP_LOG_CONNEND, /* End of connection 54 */ - TCP_LOG_LRO, /* LRO entry 55 */ - TCP_SACK_FILTER_RES, /* Results of SACK Filter 56 */ - TCP_SAD_DETECTION, /* Sack Attack Detection 57 */ - TCP_LOG_END /* End (keep at end) 58 */ + BBR_LOG_SETTINGS_CHG, /* Settings changed for loss response 48 */ + BBR_LOG_SRTT_GAIN_EVENT, /* SRTT gaining -- now not used 49 */ + TCP_LOG_REASS, /* Reassembly buffer logging 50 */ + TCP_HDWR_TLS, /* TCP Hardware TLS logs 51 */ + BBR_LOG_HDWR_PACE, /* TCP Hardware pacing log 52 */ + BBR_LOG_TSTMP_VAL, /* Temp debug timestamp validation 53 */ + TCP_LOG_CONNEND, /* End of connection 54 */ + TCP_LOG_LRO, /* LRO entry 55 */ + TCP_SACK_FILTER_RES, /* Results of SACK Filter 56 */ + TCP_SAD_DETECTION, /* Sack Attack Detection 57 */ + TCP_LOG_END /* End (keep at end) 58 */ }; enum tcp_log_states { @@ -296,8 +296,8 @@ struct tcp_log_dev_log_queue { do { \ if (tp->t_logstate != TCP_LOG_STATE_OFF) \ tcp_log_event_(tp, th, rxbuf, txbuf, eventid, \ - errornum, len, stackinfo, th_hostorder, \ - tp->t_output_caller, __func__, __LINE__, tv); \ + errornum, len, stackinfo, th_hostorder, \ + tp->t_output_caller, __func__, __LINE__, tv);\ } while (0) /* @@ -326,11 +326,11 @@ struct tcp_log_dev_log_queue { if (tcp_log_verbose) \ TCP_LOG_EVENT_VERBOSE(tp, th, rxbuf, txbuf, \ eventid, errornum, len, stackinfo, \ - th_hostorder, NULL); \ + th_hostorder, NULL); \ else if (tp->t_logstate != TCP_LOG_STATE_OFF) \ tcp_log_event_(tp, th, rxbuf, txbuf, eventid, \ errornum, len, stackinfo, th_hostorder, \ - NULL, NULL, 0, NULL); \ + NULL, NULL, 0, NULL); \ } while (0) #endif /* TCP_LOG_FORCEVERBOSE */ #define TCP_LOG_EVENTP(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder, tv) \ From owner-svn-src-all@freebsd.org Thu Feb 13 14:05:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94170257A19; Thu, 13 Feb 2020 14:05:23 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 48JJDz38sVz400Y; Thu, 13 Feb 2020 14:05:23 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j2F7C-000Opv-Ku; Thu, 13 Feb 2020 17:05:14 +0300 Date: Thu, 13 Feb 2020 17:05:14 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357849 - head/sys/cam/scsi Message-ID: <20200213140514.GG8028@zxy.spb.ru> References: <202002130123.01D1NjnN004216@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002130123.01D1NjnN004216@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48JJDz38sVz400Y X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 14:05:23 -0000 On Thu, Feb 13, 2020 at 01:23:45AM +0000, Warner Losh wrote: > Author: imp > Date: Thu Feb 13 01:23:44 2020 > New Revision: 357849 > URL: https://svnweb.freebsd.org/changeset/base/357849 > > Log: > Convert rotating and unmapped_io to a DA flag > > Rotating and unmapped_io are really da flags. Convert them to a flag so it will > be reported with the other flags for the device. Deprecate the .rotating and > .unmapped_io sysctls in FreeBSD 14 and remove the softc ints. Can you clarification this deprecate? From owner-svn-src-all@freebsd.org Thu Feb 13 14:09:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5FEE257B2E; Thu, 13 Feb 2020 14:09:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JJKK5jMgz40Fn; Thu, 13 Feb 2020 14:09:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BADC6BA33; Thu, 13 Feb 2020 14:09:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DE99dp058919; Thu, 13 Feb 2020 14:09:09 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DE99Gc058918; Thu, 13 Feb 2020 14:09:09 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202002131409.01DE99Gc058918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 13 Feb 2020 14:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357857 - head/tests/sys X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys X-SVN-Commit-Revision: 357857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 14:09:10 -0000 Author: kp Date: Thu Feb 13 14:09:09 2020 New Revision: 357857 URL: https://svnweb.freebsd.org/changeset/base/357857 Log: tests: Enable net tests We have a number of tests in the net subdirectory that were not executed. List the net directory so we run those tests. Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Thu Feb 13 13:58:34 2020 (r357856) +++ head/tests/sys/Makefile Thu Feb 13 14:09:09 2020 (r357857) @@ -19,6 +19,7 @@ TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mac TESTS_SUBDIRS+= mqueue +TESTS_SUBDIRS+= net TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= netinet6 TESTS_SUBDIRS+= netipsec From owner-svn-src-all@freebsd.org Thu Feb 13 15:06:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74C681C93B0; Thu, 13 Feb 2020 15:06:20 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward500o.mail.yandex.net (forward500o.mail.yandex.net [37.140.190.195]) (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 48JKbJ2B0Jz449q; Thu, 13 Feb 2020 15:06:19 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback8q.mail.yandex.net (mxback8q.mail.yandex.net [IPv6:2a02:6b8:c0e:42:0:640:b38f:32ec]) by forward500o.mail.yandex.net (Yandex) with ESMTP id D44186068E; Thu, 13 Feb 2020 18:06:16 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback8q.mail.yandex.net (mxback/Yandex) with ESMTP id hrCbzQrpOr-6G9KC3EV; Thu, 13 Feb 2020 18:06:16 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1581606376; bh=Hz1kzt/o4DuopeSBLHZD+sShLt9Y/X+z0HSCtZf7KNo=; h=Message-Id:Subject:In-Reply-To:Date:References:To:From; b=aFoJpYtYGQEQ4ybqZnyVQrvKGy1h/SSgiwMAC+lfH8j2VilWRL+x9+XbdO7CDHfc/ N4l4zOiLKHiGzk8dyuzLgcCT4ffVX1lXQDE+oZvmNe1w1gW5noTY5CE+4DJ77KH8j8 uAIN/wINfFSqAJj6tK5HO8TCz3antCdCo9Xna/dc= Received: by vla4-d1c3bcedfacb.qloud-c.yandex.net with HTTP; Thu, 13 Feb 2020 18:06:16 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Kristof Provost , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <202002131409.01DE99Gc058918@repo.freebsd.org> References: <202002131409.01DE99Gc058918@repo.freebsd.org> Subject: Re: svn commit: r357857 - head/tests/sys MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 13 Feb 2020 15:06:16 +0000 Message-Id: <3540831581606376@vla4-d1c3bcedfacb.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 48JKbJ2B0Jz449q X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:06:20 -0000 13.02.2020, 14:09, "Kristof Provost" : > Author: kp > Date: Thu Feb 13 14:09:09 2020 > New Revision: 357857 > URL: https://svnweb.freebsd.org/changeset/base/357857 > > Log: >   tests: Enable net tests > >   We have a number of tests in the net subdirectory that were not executed. List >   the net directory so we run those tests. Better late than never :-) Thank you for catching and fixing this! > > Modified: >   head/tests/sys/Makefile > > Modified: head/tests/sys/Makefile > ============================================================================== > --- head/tests/sys/Makefile Thu Feb 13 13:58:34 2020 (r357856) > +++ head/tests/sys/Makefile Thu Feb 13 14:09:09 2020 (r357857) > @@ -19,6 +19,7 @@ TESTS_SUBDIRS+= kern >  TESTS_SUBDIRS+= kqueue >  TESTS_SUBDIRS+= mac >  TESTS_SUBDIRS+= mqueue > +TESTS_SUBDIRS+= net >  TESTS_SUBDIRS+= netinet >  TESTS_SUBDIRS+= netinet6 >  TESTS_SUBDIRS+= netipsec From owner-svn-src-all@freebsd.org Thu Feb 13 15:14:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7EF31C9ADF; Thu, 13 Feb 2020 15:14:48 +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) server-signature RSA-PSS (4096 bits) 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 48JKn44mHmz453l; Thu, 13 Feb 2020 15:14:48 +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 9CD3DC921; Thu, 13 Feb 2020 15:14:48 +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 01DFEm4G002059; Thu, 13 Feb 2020 15:14:48 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DFEkGu002049; Thu, 13 Feb 2020 15:14:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202002131514.01DFEkGu002049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 13 Feb 2020 15:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357858 - in head: cddl/lib/libdtrace sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: cddl/lib/libdtrace sys/netinet X-SVN-Commit-Revision: 357858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:14:48 -0000 Author: tuexen Date: Thu Feb 13 15:14:46 2020 New Revision: 357858 URL: https://svnweb.freebsd.org/changeset/base/357858 Log: sack_newdata and snd_recover hold the same value. Therefore, use only a single instance: use snd_recover also where sack_newdata was used. Submitted by: Richard Scheffenegger Differential Revision: https://reviews.freebsd.org/D18811 Modified: head/cddl/lib/libdtrace/tcp.d head/sys/netinet/tcp_input.c head/sys/netinet/tcp_log_buf.c head/sys/netinet/tcp_log_buf.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Thu Feb 13 14:09:09 2020 (r357857) +++ head/cddl/lib/libdtrace/tcp.d Thu Feb 13 15:14:46 2020 (r357858) @@ -244,7 +244,7 @@ translator tcpsinfo_t < struct tcpcb *p > { tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh; tcps_srecover = p == NULL ? -1 : p->snd_recover; tcps_sack_fack = p == NULL ? 0 : p->snd_fack; - tcps_sack_snxt = p == NULL ? 0 : p->sack_newdata; + tcps_sack_snxt = p == NULL ? 0 : p->snd_recover; tcps_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz; tcps_mss = p == NULL ? -1 : p->t_maxseg; tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0; Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_input.c Thu Feb 13 15:14:46 2020 (r357858) @@ -2564,7 +2564,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (tp->t_flags & TF_SACK_PERMIT) { TCPSTAT_INC( tcps_sack_recovery_episode); - tp->sack_newdata = tp->snd_nxt; + tp->snd_recover = tp->snd_nxt; tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; Modified: head/sys/netinet/tcp_log_buf.c ============================================================================== --- head/sys/netinet/tcp_log_buf.c Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_log_buf.c Thu Feb 13 15:14:46 2020 (r357858) @@ -1686,7 +1686,6 @@ retry: COPY_STAT(rcv_up); COPY_STAT(rcv_adv); COPY_STAT(rcv_nxt); - COPY_STAT(sack_newdata); COPY_STAT(rcv_wnd); COPY_STAT_T(dupacks); COPY_STAT_T(segqlen); Modified: head/sys/netinet/tcp_log_buf.h ============================================================================== --- head/sys/netinet/tcp_log_buf.h Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_log_buf.h Thu Feb 13 15:14:46 2020 (r357858) @@ -32,7 +32,7 @@ #define TCP_LOG_REASON_LEN 32 #define TCP_LOG_TAG_LEN 32 -#define TCP_LOG_BUF_VER (7) +#define TCP_LOG_BUF_VER (8) /* * Because the (struct tcp_log_buffer) includes 8-byte uint64_t's, it requires @@ -144,7 +144,6 @@ struct tcp_log_buffer uint32_t tlb_rcv_up; /* TCPCB rcv_up */ uint32_t tlb_rcv_adv; /* TCPCB rcv_adv */ uint32_t tlb_rcv_nxt; /* TCPCB rcv_nxt */ - tcp_seq tlb_sack_newdata; /* TCPCB sack_newdata */ uint32_t tlb_rcv_wnd; /* TCPCB rcv_wnd */ uint32_t tlb_dupacks; /* TCPCB t_dupacks */ int tlb_segqlen; /* TCPCB segqlen */ Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_output.c Thu Feb 13 15:14:46 2020 (r357858) @@ -420,7 +420,7 @@ after_sack_rexmit: */ if (len > 0) { cwin = tp->snd_cwnd - - (tp->snd_nxt - tp->sack_newdata) - + (tp->snd_nxt - tp->snd_recover) - sack_bytes_rxmt; if (cwin < 0) cwin = 0; Modified: head/sys/netinet/tcp_sack.c ============================================================================== --- head/sys/netinet/tcp_sack.c Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_sack.c Thu Feb 13 15:14:46 2020 (r357858) @@ -780,7 +780,7 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *t if ((BYTES_THIS_ACK(tp, th) / tp->t_maxseg) >= 2) num_segs = 2; tp->snd_cwnd = (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->sack_newdata) + num_segs * tp->t_maxseg); + (tp->snd_nxt - tp->snd_recover) + num_segs * tp->t_maxseg); if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_flags |= TF_ACKNOW; Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_usrreq.c Thu Feb 13 15:14:46 2020 (r357858) @@ -2806,8 +2806,8 @@ db_print_tcpcb(struct tcpcb *tp, const char *name, int tp->snd_numholes, TAILQ_FIRST(&tp->snd_holes)); db_print_indent(indent); - db_printf("snd_fack: 0x%08x rcv_numsacks: %d sack_newdata: " - "0x%08x\n", tp->snd_fack, tp->rcv_numsacks, tp->sack_newdata); + db_printf("snd_fack: 0x%08x rcv_numsacks: %d\n", + tp->snd_fack, tp->rcv_numsacks); /* Skip sackblks, sackhint. */ Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Feb 13 14:09:09 2020 (r357857) +++ head/sys/netinet/tcp_var.h Thu Feb 13 15:14:46 2020 (r357858) @@ -186,8 +186,6 @@ struct tcpcb { TAILQ_HEAD(sackhole_head, sackhole) snd_holes; /* SACK scoreboard (sorted) */ tcp_seq snd_fack; /* last seq number(+1) sack'd by rcv'r*/ - tcp_seq sack_newdata; /* New data xmitted in this recovery - episode starts at this seq number */ struct sackblk sackblks[MAX_SACK_BLKS]; /* seq nos. of sack blocks */ struct sackhint sackhint; /* SACK scoreboard hint */ int t_rttlow; /* smallest observerved RTT */ From owner-svn-src-all@freebsd.org Thu Feb 13 15:28:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFDB31CA4E2; Thu, 13 Feb 2020 15:28:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JL5N4jWfz46Mt; Thu, 13 Feb 2020 15:28:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C61ACB68; Thu, 13 Feb 2020 15:28:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DFSueS008159; Thu, 13 Feb 2020 15:28:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DFSuUZ008158; Thu, 13 Feb 2020 15:28:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002131528.01DFSuUZ008158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 15:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357859 - head/usr.sbin/sesutil X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.sbin/sesutil X-SVN-Commit-Revision: 357859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:28:56 -0000 Author: asomers Date: Thu Feb 13 15:28:56 2020 New Revision: 357859 URL: https://svnweb.freebsd.org/changeset/base/357859 Log: sesutil: fix Coverity CIDs * 1411604: file descriptor leak * 1411586: memory leaks, null dereference on ENOMEM Reported by: Coverity Scan Coverity CIDs: 1411604, 1411586 Reviewed by: trasz MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D23651 Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Thu Feb 13 15:14:46 2020 (r357858) +++ head/usr.sbin/sesutil/sesutil.c Thu Feb 13 15:28:56 2020 (r357859) @@ -570,17 +570,17 @@ fetch_device_details(char *devnames, char **model, cha { char ident[DISK_IDENT_SIZE]; struct diocgattr_arg arg; - char *device, *tmp; + char *tmp; off_t mediasize; + int comma; int fd; - tmp = strdup(devnames); + comma = (int)strcspn(devnames, ","); + asprintf(&tmp, "/dev/%.*s", comma, devnames); if (tmp == NULL) - err(1, "strdup"); - - device = strsep(&tmp, ","); - asprintf(&tmp, "/dev/%s", device); + err(1, "asprintf"); fd = open(tmp, O_RDONLY); + free(tmp); if (fd < 0) { /* * This can happen with a disk so broken it cannot @@ -589,6 +589,7 @@ fetch_device_details(char *devnames, char **model, cha *model = strdup("?"); *serial = strdup("?"); *size = -1; + close(fd); return; } @@ -608,6 +609,7 @@ fetch_device_details(char *devnames, char **model, cha *size = mediasize; else *size = -1; + close(fd); } static void From owner-svn-src-all@freebsd.org Thu Feb 13 15:36:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16BB71CA942 for ; Thu, 13 Feb 2020 15:36:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48JLG24Vscz473T for ; Thu, 13 Feb 2020 15:36:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf32.google.com with SMTP id g6so2800699qvy.5 for ; Thu, 13 Feb 2020 07:36:26 -0800 (PST) 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=gfbPHl+wSwYTaJV+fgSbLCQlXb+12+mjylwykHRFe5Y=; b=N/IAeXwgwZ+V+tYMVwW/d2OID9C907kYFevydjBIjFB+inZ6nRih6J2Y4Ak+Vplgwl PkaBmBQS60k9emGoTGawM2meMTvIQqLEqAROTgCQx0Ghx9gk/GEMJPg93Qw2fLqgzj8Y XPw9kPMdsFSJaIUB57x9gpJidI+Z/4D95E7Pun/FaxcqkFkd2GIpCV6CyANyiH1rj2O3 EsL3CavOrVPPaGveS7Da85lQWQ3p+FfxZGCLmEnOqDk2XCkUnG3U9GrqcXF0AVUf1URW aL/jGaDxdzMcsGgxijWfatZqygZyA9eIbAA6YO22OWtBwB1c8Jlnyinhy3Mjfpn5E4Nx vqcQ== 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=gfbPHl+wSwYTaJV+fgSbLCQlXb+12+mjylwykHRFe5Y=; b=AfxdNmUirU7IxAmK+XFSIjB8FYPsiC7HbWBqMlCoRNT3YyP+Zn4rorc/SDuecyw5Th 2GSDA5BnTJUJ34e7jpYBXfbWbfV1f4aXRWe/l2IKf6XoBtLtvdN4jNSAfLvZsgd9w0wx q0QJO8XkPds01Pw3sNWWmZJ/7U2IZFRHoS3/9CS5MK9zC+JHIPqeNNxO/Ps7TERGDkoX qSTRzwUAOOrz9RKgyW3ZXiMKzI8VYDwhQSRE7cOhx//bxBRqpZdomd8mqY0kTdwciVtz xJ56DQ6DNvx/0vWZmnRMaEWUkcKzgltqhxcu3Fhu8985f2yPhzeBNQ/+wMxa5hIOfVJM f4mg== X-Gm-Message-State: APjAAAX+vFmVKJGxtsaIprczOE9dgKo7PbmwdsjG9DF4Ijrsd9/SX35G vwqmi7GjX2yizODr3HXrsUA4TJweHQp57LeZVaonYgja X-Google-Smtp-Source: APXvYqy70Ehrj5GaR311ulooJQnOkDhIP9Dj7pJ51nOE7wFooGFcC2o5UIR4pvrj+xVmYYp8Mo8J3F3sfvdN+rOm7wk= X-Received: by 2002:ad4:424e:: with SMTP id l14mr12242954qvq.118.1581608180162; Thu, 13 Feb 2020 07:36:20 -0800 (PST) MIME-Version: 1.0 References: <202002130123.01D1NjnN004216@repo.freebsd.org> <20200213140514.GG8028@zxy.spb.ru> In-Reply-To: <20200213140514.GG8028@zxy.spb.ru> From: Warner Losh Date: Thu, 13 Feb 2020 08:36:08 -0700 Message-ID: Subject: Re: svn commit: r357849 - head/sys/cam/scsi To: Slawa Olhovchenkov Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48JLG24Vscz473T X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=N/IAeXwg; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f32) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.72 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.73)[ipnet: 2607:f8b0::/32(-1.91), asn: 15169(-1.69), country: US(-0.05)]; 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" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:36:28 -0000 On Thu, Feb 13, 2020 at 7:05 AM Slawa Olhovchenkov wrote: > On Thu, Feb 13, 2020 at 01:23:45AM +0000, Warner Losh wrote: > > > Author: imp > > Date: Thu Feb 13 01:23:44 2020 > > New Revision: 357849 > > URL: https://svnweb.freebsd.org/changeset/base/357849 > > > > Log: > > Convert rotating and unmapped_io to a DA flag > > > > Rotating and unmapped_io are really da flags. Convert them to a flag > so it will > > be reported with the other flags for the device. Deprecate the > .rotating and > > .unmapped_io sysctls in FreeBSD 14 and remove the softc ints. > > Can you clarification this deprecate? > The functionality has moved into the new .flags sysctl. I plan on keeping the old sysctls through 13, but remove them in 14 sometime. This will also give us time to ensure things are the same for all CAM devices, etc. The plans are somewhere between preliminary and firm and could change for good reasons. Warner From owner-svn-src-all@freebsd.org Thu Feb 13 15:42:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8389E1CABEB; Thu, 13 Feb 2020 15:42:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JLNl2yGkz47hV; Thu, 13 Feb 2020 15:42:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60B38CE15; Thu, 13 Feb 2020 15:42:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DFgF65019214; Thu, 13 Feb 2020 15:42:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DFgFh5019213; Thu, 13 Feb 2020 15:42:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202002131542.01DFgFh5019213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 13 Feb 2020 15:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357860 - head/usr.sbin/services_mkdb X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.sbin/services_mkdb X-SVN-Commit-Revision: 357860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:42:15 -0000 Author: pfg Date: Thu Feb 13 15:42:14 2020 New Revision: 357860 URL: https://svnweb.freebsd.org/changeset/base/357860 Log: Revert r357343: services: Add PROFInet and EtherCAT. Both are admitedly very niche features and no known users exist currently. I am doing a further review/update of the services file (see D23621) and both of these are not likely to be considered. Modified: head/usr.sbin/services_mkdb/services Modified: head/usr.sbin/services_mkdb/services ============================================================================== --- head/usr.sbin/services_mkdb/services Thu Feb 13 15:28:56 2020 (r357859) +++ head/usr.sbin/services_mkdb/services Thu Feb 13 15:42:14 2020 (r357860) @@ -2494,14 +2494,6 @@ wnn6_DS 26208/tcp #Wnn6 (Dserver) sgsap 29118/sctp #SGsAP in 3GPP sbcap 29168/sctp #SBcAP in 3GPP iuhsctpassoc 29169/sctp #HNBAP and RUA Common Association -profinet-rt 34962/tcp #PROFInet RT Unicast -profinet-rt 34962/udp #PROFInet RT Unicast -profinet-rtm 34963/tcp #PROFInet RT Multicast -profinet-rtm 34963/udp #PROFInet RT Multicast -profinet-cm 34964/tcp #PROFInet Context Manager -profinet-cm 34964/udp #PROFInet Context Manager -ethercat 34980/tcp #EtherCAT Port -ethercat 34980/udp #EhterCAT Port s1-control 36412/sctp #S1-Control Plane (3GPP) x2-control 36422/sctp #X2-Control Plane (3GPP) dbbrowse 47557/tcp #Databeam Corporation From owner-svn-src-all@freebsd.org Thu Feb 13 15:43:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 420881CAE9F; Thu, 13 Feb 2020 15:43:40 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 48JLQM2zN4z47sm; Thu, 13 Feb 2020 15:43:39 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j2GeP-000PLR-0C; Thu, 13 Feb 2020 18:43:37 +0300 Date: Thu, 13 Feb 2020 18:43:36 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: svn-src-head , svn-src-all , src-committers , Warner Losh Subject: Re: svn commit: r357849 - head/sys/cam/scsi Message-ID: <20200213154336.GH8028@zxy.spb.ru> References: <202002130123.01D1NjnN004216@repo.freebsd.org> <20200213140514.GG8028@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48JLQM2zN4z47sm X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [0.59 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.38)[-0.382,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.01)[-0.009,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.08)[asn: 5495(0.39), country: RU(0.01)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 15:43:40 -0000 On Thu, Feb 13, 2020 at 08:36:08AM -0700, Warner Losh wrote: > On Thu, Feb 13, 2020 at 7:05 AM Slawa Olhovchenkov wrote: > > > On Thu, Feb 13, 2020 at 01:23:45AM +0000, Warner Losh wrote: > > > > > Author: imp > > > Date: Thu Feb 13 01:23:44 2020 > > > New Revision: 357849 > > > URL: https://svnweb.freebsd.org/changeset/base/357849 > > > > > > Log: > > > Convert rotating and unmapped_io to a DA flag > > > > > > Rotating and unmapped_io are really da flags. Convert them to a flag > > so it will > > > be reported with the other flags for the device. Deprecate the > > .rotating and > > > .unmapped_io sysctls in FreeBSD 14 and remove the softc ints. > > > > Can you clarification this deprecate? > > > > The functionality has moved into the new .flags sysctl. I plan on keeping Thanks! From owner-svn-src-all@freebsd.org Thu Feb 13 16:03:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA3B71CB800; Thu, 13 Feb 2020 16:03:12 +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) server-signature RSA-PSS (4096 bits) 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 48JLrw68ccz49MX; Thu, 13 Feb 2020 16:03:12 +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 CE087D320; Thu, 13 Feb 2020 16:03:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DG3CfX031993; Thu, 13 Feb 2020 16:03:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DG3CW4031992; Thu, 13 Feb 2020 16:03:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002131603.01DG3CW4031992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 13 Feb 2020 16:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357861 - head/sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/input X-SVN-Commit-Revision: 357861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 16:03:12 -0000 Author: hselasky Date: Thu Feb 13 16:03:12 2020 New Revision: 357861 URL: https://svnweb.freebsd.org/changeset/base/357861 Log: Improve USB gaming keyboard support. Add support for decoding pressed keys as a bitmap. The keys in the bitmap are described in the interface specific HID descriptor. Some keyboards even have multiple input interfaces, only using the bitmap method when the event array is full. That typically means when more than seven keys are pressed simultaneously. The internals of the USB keyboard driver have been slightly reworked to keep track of all keys in a single bitmap having 256 bits. This bitmap is then divided into blocks of 64-bits as an optimisation. Simplify automatic key repeat logic, because only the last key pressed can be repeated. PR: 224592 PR: 233884 Tested by: Alex V. Petrov MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Thu Feb 13 15:42:14 2020 (r357860) +++ head/sys/dev/usb/input/ukbd.c Thu Feb 13 16:03:12 2020 (r357861) @@ -109,27 +109,21 @@ SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_R #define UKBD_EMULATE_ATSCANCODE 1 #define UKBD_DRIVER_NAME "ukbd" -#define UKBD_NMOD 8 /* units */ -#define UKBD_NKEYCODE 6 /* units */ -#define UKBD_IN_BUF_SIZE (2*(UKBD_NMOD + (2*UKBD_NKEYCODE))) /* bytes */ -#define UKBD_IN_BUF_FULL ((UKBD_IN_BUF_SIZE / 2) - 1) /* bytes */ +#define UKBD_NKEYCODE 256 /* units */ +#define UKBD_IN_BUF_SIZE (4 * UKBD_NKEYCODE) /* scancodes */ +#define UKBD_IN_BUF_FULL ((UKBD_IN_BUF_SIZE / 2) - 1) /* scancodes */ #define UKBD_NFKEY (sizeof(fkey_tab)/sizeof(fkey_tab[0])) /* units */ #define UKBD_BUFFER_SIZE 64 /* bytes */ +#define UKBD_KEY_PRESSED(map, key) ({ \ + CTASSERT((key) >= 0 && (key) < UKBD_NKEYCODE); \ + ((map)[(key) / 64] & (1ULL << ((key) % 64))); \ +}) +#define MOD_EJECT 0x01 +#define MOD_FN 0x02 + struct ukbd_data { - uint16_t modifiers; -#define MOD_CONTROL_L 0x01 -#define MOD_CONTROL_R 0x10 -#define MOD_SHIFT_L 0x02 -#define MOD_SHIFT_R 0x20 -#define MOD_ALT_L 0x04 -#define MOD_ALT_R 0x40 -#define MOD_WIN_L 0x08 -#define MOD_WIN_R 0x80 -/* internal */ -#define MOD_EJECT 0x0100 -#define MOD_FN 0x0200 - uint8_t keycode[UKBD_NKEYCODE]; + uint64_t bitmap[howmany(UKBD_NKEYCODE, 64)]; }; enum { @@ -144,17 +138,10 @@ struct ukbd_softc { keymap_t sc_keymap; accentmap_t sc_accmap; fkeytab_t sc_fkeymap[UKBD_NFKEY]; + uint64_t sc_loc_key_valid[howmany(UKBD_NKEYCODE, 64)]; struct hid_location sc_loc_apple_eject; struct hid_location sc_loc_apple_fn; - struct hid_location sc_loc_ctrl_l; - struct hid_location sc_loc_ctrl_r; - struct hid_location sc_loc_shift_l; - struct hid_location sc_loc_shift_r; - struct hid_location sc_loc_alt_l; - struct hid_location sc_loc_alt_r; - struct hid_location sc_loc_win_l; - struct hid_location sc_loc_win_r; - struct hid_location sc_loc_events; + struct hid_location sc_loc_key[UKBD_NKEYCODE]; struct hid_location sc_loc_numlock; struct hid_location sc_loc_capslock; struct hid_location sc_loc_scrolllock; @@ -172,8 +159,7 @@ struct ukbd_softc { sbintime_t sc_co_basetime; int sc_delay; - uint32_t sc_ntime[UKBD_NKEYCODE]; - uint32_t sc_otime[UKBD_NKEYCODE]; + uint32_t sc_repeat_time; uint32_t sc_input[UKBD_IN_BUF_SIZE]; /* input buffer */ uint32_t sc_time_ms; uint32_t sc_composed_char; /* composed char code, if non-zero */ @@ -191,15 +177,6 @@ struct ukbd_softc { #define UKBD_FLAG_APPLE_EJECT 0x00000040 #define UKBD_FLAG_APPLE_FN 0x00000080 #define UKBD_FLAG_APPLE_SWAP 0x00000100 -#define UKBD_FLAG_CTRL_L 0x00000400 -#define UKBD_FLAG_CTRL_R 0x00000800 -#define UKBD_FLAG_SHIFT_L 0x00001000 -#define UKBD_FLAG_SHIFT_R 0x00002000 -#define UKBD_FLAG_ALT_L 0x00004000 -#define UKBD_FLAG_ALT_R 0x00008000 -#define UKBD_FLAG_WIN_L 0x00010000 -#define UKBD_FLAG_WIN_R 0x00020000 -#define UKBD_FLAG_EVENTS 0x00040000 #define UKBD_FLAG_NUMLOCK 0x00080000 #define UKBD_FLAG_CAPSLOCK 0x00100000 #define UKBD_FLAG_SCROLLLOCK 0x00200000 @@ -214,31 +191,23 @@ struct ukbd_softc { uint16_t sc_inputs; uint16_t sc_inputhead; uint16_t sc_inputtail; - uint16_t sc_modifiers; uint8_t sc_leds; /* store for async led requests */ uint8_t sc_iface_index; uint8_t sc_iface_no; uint8_t sc_id_apple_eject; uint8_t sc_id_apple_fn; - uint8_t sc_id_ctrl_l; - uint8_t sc_id_ctrl_r; - uint8_t sc_id_shift_l; - uint8_t sc_id_shift_r; - uint8_t sc_id_alt_l; - uint8_t sc_id_alt_r; - uint8_t sc_id_win_l; - uint8_t sc_id_win_r; - uint8_t sc_id_event; + uint8_t sc_id_loc_key[UKBD_NKEYCODE]; uint8_t sc_id_numlock; uint8_t sc_id_capslock; uint8_t sc_id_scrolllock; - uint8_t sc_id_events; uint8_t sc_kbd_id; + uint8_t sc_repeat_key; uint8_t sc_buffer[UKBD_BUFFER_SIZE]; }; +#define KEY_NONE 0x00 #define KEY_ERROR 0x01 #define KEY_PRESS 0 @@ -259,21 +228,6 @@ struct ukbd_softc { #define UKBD_UNLOCK() USB_MTX_UNLOCK(&Giant) #define UKBD_LOCK_ASSERT() USB_MTX_ASSERT(&Giant, MA_OWNED) -struct ukbd_mods { - uint32_t mask, key; -}; - -static const struct ukbd_mods ukbd_mods[UKBD_NMOD] = { - {MOD_CONTROL_L, 0xe0}, - {MOD_CONTROL_R, 0xe4}, - {MOD_SHIFT_L, 0xe1}, - {MOD_SHIFT_R, 0xe5}, - {MOD_ALT_L, 0xe2}, - {MOD_ALT_R, 0xe6}, - {MOD_WIN_L, 0xe3}, - {MOD_WIN_R, 0xe7}, -}; - #define NN 0 /* no translation */ /* * Translate USB keycodes to AT keyboard scancodes. @@ -347,8 +301,8 @@ static void ukbd_timeout(void *); static void ukbd_set_leds(struct ukbd_softc *, uint8_t); static int ukbd_set_typematic(keyboard_t *, int); #ifdef UKBD_EMULATE_ATSCANCODE -static uint32_t ukbd_atkeycode(int, int); -static int ukbd_key2scan(struct ukbd_softc *, int, int, int); +static uint32_t ukbd_atkeycode(int, const uint64_t *); +static int ukbd_key2scan(struct ukbd_softc *, int, const uint64_t *, int); #endif static uint32_t ukbd_read_char(keyboard_t *, int); static void ukbd_clear_state(keyboard_t *); @@ -371,16 +325,26 @@ static const struct evdev_methods ukbd_evdev_methods = }; #endif -static uint8_t +static bool ukbd_any_key_pressed(struct ukbd_softc *sc) { - uint8_t i; - uint8_t j; + bool ret = false; + unsigned i; - for (j = i = 0; i < UKBD_NKEYCODE; i++) - j |= sc->sc_odata.keycode[i]; + for (i = 0; i != howmany(UKBD_NKEYCODE, 64); i++) + ret |= (sc->sc_odata.bitmap[i] != 0); + return (ret); +} - return (j ? 1 : 0); +static bool +ukbd_any_key_valid(struct ukbd_softc *sc) +{ + bool ret = false; + unsigned i; + + for (i = 0; i != howmany(UKBD_NKEYCODE, 64); i++) + ret |= (sc->sc_loc_key_valid[i] != 0); + return (ret); } static void @@ -522,99 +486,63 @@ ukbd_get_key(struct ukbd_softc *sc, uint8_t wait) static void ukbd_interrupt(struct ukbd_softc *sc) { - uint32_t n_mod; - uint32_t o_mod; - uint32_t now = sc->sc_time_ms; - int32_t dtime; - uint8_t key; - uint8_t i; - uint8_t j; + const uint32_t now = sc->sc_time_ms; + unsigned key; + bool old_keys; UKBD_LOCK_ASSERT(); - if (sc->sc_ndata.keycode[0] == KEY_ERROR) - return; + old_keys = ukbd_any_key_pressed(sc); - n_mod = sc->sc_ndata.modifiers; - o_mod = sc->sc_odata.modifiers; - if (n_mod != o_mod) { - for (i = 0; i < UKBD_NMOD; i++) { - if ((n_mod & ukbd_mods[i].mask) != - (o_mod & ukbd_mods[i].mask)) { - ukbd_put_key(sc, ukbd_mods[i].key | - ((n_mod & ukbd_mods[i].mask) ? - KEY_PRESS : KEY_RELEASE)); - } - } - } - /* Check for released keys. */ - for (i = 0; i < UKBD_NKEYCODE; i++) { - key = sc->sc_odata.keycode[i]; - if (key == 0) { - continue; - } - for (j = 0; j < UKBD_NKEYCODE; j++) { - if (sc->sc_ndata.keycode[j] == 0) { - continue; - } - if (key == sc->sc_ndata.keycode[j]) { - goto rfound; - } - } - ukbd_put_key(sc, key | KEY_RELEASE); -rfound: ; - } + /* Check for key changes */ + for (key = 0; key != UKBD_NKEYCODE; key++) { + const uint64_t mask = 1ULL << (key % 64); + const uint64_t delta = + sc->sc_odata.bitmap[key / 64] ^ + sc->sc_ndata.bitmap[key / 64]; - /* Check for pressed keys. */ - for (i = 0; i < UKBD_NKEYCODE; i++) { - key = sc->sc_ndata.keycode[i]; - if (key == 0) { - continue; - } - sc->sc_ntime[i] = now + sc->sc_kbd.kb_delay1; - for (j = 0; j < UKBD_NKEYCODE; j++) { - if (sc->sc_odata.keycode[j] == 0) { - continue; - } - if (key == sc->sc_odata.keycode[j]) { + if (mask == 1 && delta == 0) { + key += 63; + continue; /* skip empty areas */ + } else if (delta & mask) { + if (sc->sc_odata.bitmap[key / 64] & mask) { + ukbd_put_key(sc, key | KEY_RELEASE); - /* key is still pressed */ + /* clear repeating key, if any */ + if (sc->sc_repeat_key == key) + sc->sc_repeat_key = 0; + } else { + ukbd_put_key(sc, key | KEY_PRESS); - sc->sc_ntime[i] = sc->sc_otime[j]; - dtime = (sc->sc_otime[j] - now); - - if (dtime > 0) { - /* time has not elapsed */ - goto pfound; - } - sc->sc_ntime[i] = now + sc->sc_kbd.kb_delay2; - break; + /* set repeat time for last key */ + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; + sc->sc_repeat_key = key; } } - if (j == UKBD_NKEYCODE) { - /* New key - set initial delay and [re]start timer */ - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } - ukbd_put_key(sc, key | KEY_PRESS); - - /* - * If any other key is presently down, force its repeat to be - * well in the future (100s). This makes the last key to be - * pressed do the autorepeat. - */ - for (j = 0; j != UKBD_NKEYCODE; j++) { - if (j != i) - sc->sc_ntime[j] = now + (100 * 1000); - } -pfound: ; } + /* synchronize old data with new data */ sc->sc_odata = sc->sc_ndata; + + /* check if last key is still pressed */ + if (sc->sc_repeat_key != 0) { + const int32_t dtime = (sc->sc_repeat_time - now); - memcpy(sc->sc_otime, sc->sc_ntime, sizeof(sc->sc_otime)); + /* check if time has elapsed */ + if (dtime <= 0) { + ukbd_put_key(sc, sc->sc_repeat_key | KEY_PRESS); + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay2; + } + } + /* check for first new key and set initial delay and [re]start timer */ + if (old_keys == false && ukbd_any_key_pressed(sc) == true) { + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); + } + + /* wakeup keyboard system */ ukbd_event_keyinput(sc); } @@ -664,8 +592,9 @@ ukbd_timeout(void *arg) } } -static uint8_t -ukbd_apple_fn(uint8_t keycode) { +static uint32_t +ukbd_apple_fn(uint32_t keycode) +{ switch (keycode) { case 0x28: return 0x49; /* RETURN -> INSERT */ case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ @@ -677,8 +606,9 @@ ukbd_apple_fn(uint8_t keycode) { } } -static uint8_t -ukbd_apple_swap(uint8_t keycode) { +static uint32_t +ukbd_apple_swap(uint32_t keycode) +{ switch (keycode) { case 0x35: return 0x64; case 0x64: return 0x35; @@ -691,9 +621,10 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t { struct ukbd_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint8_t i; - uint8_t offset; + uint32_t i; uint8_t id; + uint8_t modifiers; + int offset; int len; UKBD_LOCK_ASSERT(); @@ -733,117 +664,72 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t /* clear temporary storage */ memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); + /* clear modifiers */ + modifiers = 0; + /* scan through HID data */ if ((sc->sc_flags & UKBD_FLAG_APPLE_EJECT) && (id == sc->sc_id_apple_eject)) { if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_eject)) - sc->sc_modifiers |= MOD_EJECT; - else - sc->sc_modifiers &= ~MOD_EJECT; + modifiers |= MOD_EJECT; } if ((sc->sc_flags & UKBD_FLAG_APPLE_FN) && (id == sc->sc_id_apple_fn)) { if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_fn)) - sc->sc_modifiers |= MOD_FN; - else - sc->sc_modifiers &= ~MOD_FN; + modifiers |= MOD_FN; } - if ((sc->sc_flags & UKBD_FLAG_CTRL_L) && - (id == sc->sc_id_ctrl_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_ctrl_l)) - sc-> sc_modifiers |= MOD_CONTROL_L; - else - sc-> sc_modifiers &= ~MOD_CONTROL_L; - } - if ((sc->sc_flags & UKBD_FLAG_CTRL_R) && - (id == sc->sc_id_ctrl_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_ctrl_r)) - sc->sc_modifiers |= MOD_CONTROL_R; - else - sc->sc_modifiers &= ~MOD_CONTROL_R; - } - if ((sc->sc_flags & UKBD_FLAG_SHIFT_L) && - (id == sc->sc_id_shift_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_shift_l)) - sc->sc_modifiers |= MOD_SHIFT_L; - else - sc->sc_modifiers &= ~MOD_SHIFT_L; - } - if ((sc->sc_flags & UKBD_FLAG_SHIFT_R) && - (id == sc->sc_id_shift_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_shift_r)) - sc->sc_modifiers |= MOD_SHIFT_R; - else - sc->sc_modifiers &= ~MOD_SHIFT_R; - } - if ((sc->sc_flags & UKBD_FLAG_ALT_L) && - (id == sc->sc_id_alt_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_alt_l)) - sc->sc_modifiers |= MOD_ALT_L; - else - sc->sc_modifiers &= ~MOD_ALT_L; - } - if ((sc->sc_flags & UKBD_FLAG_ALT_R) && - (id == sc->sc_id_alt_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_alt_r)) - sc->sc_modifiers |= MOD_ALT_R; - else - sc->sc_modifiers &= ~MOD_ALT_R; - } - if ((sc->sc_flags & UKBD_FLAG_WIN_L) && - (id == sc->sc_id_win_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_win_l)) - sc->sc_modifiers |= MOD_WIN_L; - else - sc->sc_modifiers &= ~MOD_WIN_L; - } - if ((sc->sc_flags & UKBD_FLAG_WIN_R) && - (id == sc->sc_id_win_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_win_r)) - sc->sc_modifiers |= MOD_WIN_R; - else - sc->sc_modifiers &= ~MOD_WIN_R; - } - sc->sc_ndata.modifiers = sc->sc_modifiers; + for (i = 0; i != UKBD_NKEYCODE; i++) { + const uint64_t valid = sc->sc_loc_key_valid[i / 64]; + const uint64_t mask = 1ULL << (i % 64); - if ((sc->sc_flags & UKBD_FLAG_EVENTS) && - (id == sc->sc_id_events)) { - i = sc->sc_loc_events.count; - if (i > UKBD_NKEYCODE) - i = UKBD_NKEYCODE; - if (i > len) - i = len; - while (i--) { - sc->sc_ndata.keycode[i] = - hid_get_data(sc->sc_buffer + i, len - i, - &sc->sc_loc_events); - } - } + if (mask == 1 && valid == 0) { + i += 63; + continue; /* skip empty areas */ + } else if (~valid & mask) { + continue; /* location is not valid */ + } else if (id != sc->sc_id_loc_key[i]) { + continue; /* invalid HID ID */ + } else if (i == 0) { + offset = sc->sc_loc_key[0].count; + if (offset < 0 || offset > len) + offset = len; + while (offset--) { + uint32_t key = + hid_get_data(sc->sc_buffer + offset, len - offset, + &sc->sc_loc_key[i]); + if (modifiers & MOD_FN) + key = ukbd_apple_fn(key); + if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) + key = ukbd_apple_swap(key); + if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE) + continue; + /* set key in bitmap */ + sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64); + } + } else if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_key[i])) { + uint32_t key = i; -#ifdef USB_DEBUG - DPRINTF("modifiers = 0x%04x\n", (int)sc->sc_modifiers); - for (i = 0; i < UKBD_NKEYCODE; i++) { - if (sc->sc_ndata.keycode[i]) { - DPRINTF("[%d] = 0x%02x\n", - (int)i, (int)sc->sc_ndata.keycode[i]); + if (modifiers & MOD_FN) + key = ukbd_apple_fn(key); + if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) + key = ukbd_apple_swap(key); + if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE) + continue; + /* set key in bitmap */ + sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64); } } -#endif - if (sc->sc_modifiers & MOD_FN) { - for (i = 0; i < UKBD_NKEYCODE; i++) { - sc->sc_ndata.keycode[i] = - ukbd_apple_fn(sc->sc_ndata.keycode[i]); - } - } +#ifdef USB_DEBUG + DPRINTF("modifiers = 0x%04x\n", modifiers); + for (i = 0; i != UKBD_NKEYCODE; i++) { + const uint64_t valid = sc->sc_ndata.bitmap[i / 64]; + const uint64_t mask = 1ULL << (i % 64); - if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) { - for (i = 0; i < UKBD_NKEYCODE; i++) { - sc->sc_ndata.keycode[i] = - ukbd_apple_swap(sc->sc_ndata.keycode[i]); - } + if (valid & mask) + DPRINTF("Key 0x%02x pressed\n", i); } - +#endif ukbd_interrupt(sc); case USB_ST_SETUP: @@ -1072,10 +958,14 @@ static void ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) { uint32_t flags; + uint32_t key; /* reset detected bits */ sc->sc_flags &= ~UKBD_FLAG_HID_MASK; + /* reset detected keys */ + memset(sc->sc_loc_key_valid, 0, sizeof(sc->sc_loc_key_valid)); + /* check if there is an ID byte */ sc->sc_kbd_size = hid_report_size(ptr, len, hid_input, &sc->sc_kbd_id); @@ -1098,84 +988,34 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *p sc->sc_flags |= UKBD_FLAG_APPLE_FN; DPRINTFN(1, "Found Apple FN-key\n"); } - /* figure out some keys */ - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE0), - hid_input, 0, &sc->sc_loc_ctrl_l, &flags, - &sc->sc_id_ctrl_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_CTRL_L; - DPRINTFN(1, "Found left control\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE4), - hid_input, 0, &sc->sc_loc_ctrl_r, &flags, - &sc->sc_id_ctrl_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_CTRL_R; - DPRINTFN(1, "Found right control\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE1), - hid_input, 0, &sc->sc_loc_shift_l, &flags, - &sc->sc_id_shift_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_SHIFT_L; - DPRINTFN(1, "Found left shift\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE5), - hid_input, 0, &sc->sc_loc_shift_r, &flags, - &sc->sc_id_shift_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_SHIFT_R; - DPRINTFN(1, "Found right shift\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE2), - hid_input, 0, &sc->sc_loc_alt_l, &flags, - &sc->sc_id_alt_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_ALT_L; - DPRINTFN(1, "Found left alt\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE6), - hid_input, 0, &sc->sc_loc_alt_r, &flags, - &sc->sc_id_alt_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_ALT_R; - DPRINTFN(1, "Found right alt\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE3), - hid_input, 0, &sc->sc_loc_win_l, &flags, - &sc->sc_id_win_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_WIN_L; - DPRINTFN(1, "Found left GUI\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE7), - hid_input, 0, &sc->sc_loc_win_r, &flags, - &sc->sc_id_win_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_WIN_R; - DPRINTFN(1, "Found right GUI\n"); - } + /* figure out event buffer */ if (hid_locate(ptr, len, HID_USAGE2(HUP_KEYBOARD, 0x00), - hid_input, 0, &sc->sc_loc_events, &flags, - &sc->sc_id_events)) { + hid_input, 0, &sc->sc_loc_key[0], &flags, + &sc->sc_id_loc_key[0])) { if (flags & HIO_VARIABLE) { DPRINTFN(1, "Ignoring keyboard event control\n"); } else { - sc->sc_flags |= UKBD_FLAG_EVENTS; + sc->sc_loc_key_valid[0] |= 1; DPRINTFN(1, "Found keyboard event array\n"); } } + /* figure out the keys */ + for (key = 1; key != UKBD_NKEYCODE; key++) { + if (hid_locate(ptr, len, + HID_USAGE2(HUP_KEYBOARD, key), + hid_input, 0, &sc->sc_loc_key[key], &flags, + &sc->sc_id_loc_key[key])) { + if (flags & HIO_VARIABLE) { + sc->sc_loc_key_valid[key / 64] |= + 1ULL << (key % 64); + DPRINTFN(1, "Found key 0x%02x\n", key); + } + } + } + /* figure out leds on keyboard */ sc->sc_led_size = hid_report_size(ptr, len, hid_output, NULL); @@ -1301,7 +1141,7 @@ ukbd_attach(device_t dev) /* check if we should use the boot protocol */ if (usb_test_quirk(uaa, UQ_KBD_BOOTPROTO) || - (err != 0) || (!(sc->sc_flags & UKBD_FLAG_EVENTS))) { + (err != 0) || ukbd_any_key_valid(sc) == false) { DPRINTF("Forcing boot protocol\n"); @@ -1660,11 +1500,11 @@ ukbd_read(keyboard_t *kbd, int wait) ++(kbd->kb_count); #ifdef UKBD_EMULATE_ATSCANCODE - keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.bitmap); if (keycode == NN) { return -1; } - return (ukbd_key2scan(sc, keycode, sc->sc_ndata.modifiers, + return (ukbd_key2scan(sc, keycode, sc->sc_ndata.bitmap, (usbcode & KEY_RELEASE))); #else /* !UKBD_EMULATE_ATSCANCODE */ return (usbcode); @@ -1731,13 +1571,13 @@ next_code: #ifdef UKBD_EMULATE_ATSCANCODE /* USB key index -> key code -> AT scan code */ - keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.bitmap); if (keycode == NN) { return (NOKEY); } /* return an AT scan code for the K_RAW mode */ if (sc->sc_mode == K_RAW) { - return (ukbd_key2scan(sc, keycode, sc->sc_ndata.modifiers, + return (ukbd_key2scan(sc, keycode, sc->sc_ndata.bitmap, (usbcode & KEY_RELEASE))); } #else /* !UKBD_EMULATE_ATSCANCODE */ @@ -2061,8 +1901,8 @@ ukbd_clear_state(keyboard_t *kbd) #endif memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); memset(&sc->sc_odata, 0, sizeof(sc->sc_odata)); - memset(&sc->sc_ntime, 0, sizeof(sc->sc_ntime)); - memset(&sc->sc_otime, 0, sizeof(sc->sc_otime)); + sc->sc_repeat_time = 0; + sc->sc_repeat_key = 0; } /* save the internal state, not used */ @@ -2149,11 +1989,12 @@ ukbd_set_typematic(keyboard_t *kbd, int code) #ifdef UKBD_EMULATE_ATSCANCODE static uint32_t -ukbd_atkeycode(int usbcode, int shift) +ukbd_atkeycode(int usbcode, const uint64_t *bitmap) { uint32_t keycode; keycode = ukbd_trtab[KEY_INDEX(usbcode)]; + /* * Translate Alt-PrintScreen to SysRq. * @@ -2168,13 +2009,14 @@ ukbd_atkeycode(int usbcode, int shift) * is routine. */ if ((keycode == 0x5c || keycode == 0x7e) && - shift & (MOD_ALT_L | MOD_ALT_R)) + (UKBD_KEY_PRESSED(bitmap, 0xe2 /* ALT-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe6 /* ALT-R */))) return (0x54); return (keycode); } static int -ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) +ukbd_key2scan(struct ukbd_softc *sc, int code, const uint64_t *bitmap, int up) { static const int scan[] = { /* 89 */ @@ -2234,12 +2076,17 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi code = scan[code - 89]; } /* PrintScreen */ - if (code == 0x137 && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R | - MOD_SHIFT_L | MOD_SHIFT_R)))) { + if (code == 0x137 && (!( + UKBD_KEY_PRESSED(bitmap, 0xe0 /* CTRL-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe4 /* CTRL-R */) || + UKBD_KEY_PRESSED(bitmap, 0xe1 /* SHIFT-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe5 /* SHIFT-R */)))) { code |= SCAN_PREFIX_SHIFT; } /* Pause/Break */ - if ((code == 0x146) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { + if ((code == 0x146) && (!( + UKBD_KEY_PRESSED(bitmap, 0xe0 /* CTRL-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe4 /* CTRL-R */)))) { code = (0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL); } code |= (up ? SCAN_RELEASE : SCAN_PRESS); From owner-svn-src-all@freebsd.org Thu Feb 13 16:17:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A6E21CBDC4; Thu, 13 Feb 2020 16:17: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) server-signature RSA-PSS (4096 bits) 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 48JM8y2jKcz4BJP; Thu, 13 Feb 2020 16:17: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 5834AD4FE; Thu, 13 Feb 2020 16:17: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 01DGH6vA038430; Thu, 13 Feb 2020 16:17:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DGH6Ul038429; Thu, 13 Feb 2020 16:17:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002131617.01DGH6Ul038429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 13 Feb 2020 16:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357862 - head/contrib/elftoolchain/addr2line X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/addr2line X-SVN-Commit-Revision: 357862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 16:17:06 -0000 Author: emaste Date: Thu Feb 13 16:17:05 2020 New Revision: 357862 URL: https://svnweb.freebsd.org/changeset/base/357862 Log: addr2line: use stdbool.h header for bool Presumably a bool definition is obtained via header contamination on FreeBSD-CURRENT. Found while trying to upstream FreeBSD addr2line changes - the FreeBSD 11.2 CI build failed there. Reported by: Cirrus-CI, upstream ELF Tool Chain MFC with: r357844 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Thu Feb 13 16:03:12 2020 (r357861) +++ head/contrib/elftoolchain/addr2line/addr2line.c Thu Feb 13 16:17:05 2020 (r357862) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Thu Feb 13 18:26:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B360D1CFA2A; Thu, 13 Feb 2020 18:26:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JQ1r48mKz4Jln; Thu, 13 Feb 2020 18:26:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89E46EEA7; Thu, 13 Feb 2020 18:26:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DIQ8b4015920; Thu, 13 Feb 2020 18:26:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DIQ8jS015918; Thu, 13 Feb 2020 18:26:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002131826.01DIQ8jS015918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 18:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357863 - stable/12/lib/geom/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/lib/geom/eli X-SVN-Commit-Revision: 357863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 18:26:08 -0000 Author: asomers Date: Thu Feb 13 18:26:07 2020 New Revision: 357863 URL: https://svnweb.freebsd.org/changeset/base/357863 Log: MFC r354234: geli: raise WARNS to 6 Sponsored by: Axcient Modified: stable/12/lib/geom/eli/Makefile stable/12/lib/geom/eli/geom_eli.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/geom/eli/Makefile ============================================================================== --- stable/12/lib/geom/eli/Makefile Thu Feb 13 16:17:05 2020 (r357862) +++ stable/12/lib/geom/eli/Makefile Thu Feb 13 18:26:07 2020 (r357863) @@ -13,8 +13,6 @@ SRCS+= sha512c.c LIBADD= md crypto -WARNS?= 3 - CFLAGS+=-I${SRCTOP}/sys .include Modified: stable/12/lib/geom/eli/geom_eli.c ============================================================================== --- stable/12/lib/geom/eli/geom_eli.c Thu Feb 13 16:17:05 2020 (r357862) +++ stable/12/lib/geom/eli/geom_eli.c Thu Feb 13 18:26:07 2020 (r357863) @@ -700,7 +700,7 @@ eli_init(struct gctl_req *req) unsigned char key[G_ELI_USERKEYLEN]; char backfile[MAXPATHLEN]; const char *str, *prov; - unsigned int secsize, version; + unsigned int secsize, eli_version; off_t mediasize; intmax_t val; int error, i, nargs, nparams, param; @@ -717,16 +717,16 @@ eli_init(struct gctl_req *req) strlcpy(md.md_magic, G_ELI_MAGIC, sizeof(md.md_magic)); val = gctl_get_intmax(req, "mdversion"); if (val == -1) { - version = G_ELI_VERSION; + eli_version = G_ELI_VERSION; } else if (val < 0 || val > G_ELI_VERSION) { gctl_error(req, "Invalid version specified should be between %u and %u.", G_ELI_VERSION_00, G_ELI_VERSION); return; } else { - version = val; + eli_version = val; } - md.md_version = version; + md.md_version = eli_version; md.md_flags = 0; if (gctl_get_int(req, "boot")) md.md_flags |= G_ELI_FLAG_BOOT; @@ -739,7 +739,7 @@ eli_init(struct gctl_req *req) md.md_ealgo = CRYPTO_ALGORITHM_MIN - 1; str = gctl_get_ascii(req, "aalgo"); if (*str != '\0') { - if (version < G_ELI_VERSION_01) { + if (eli_version < G_ELI_VERSION_01) { gctl_error(req, "Data authentication is supported starting from version %u.", G_ELI_VERSION_01); @@ -771,7 +771,7 @@ eli_init(struct gctl_req *req) md.md_ealgo > CRYPTO_ALGORITHM_MAX) { str = gctl_get_ascii(req, "ealgo"); if (*str == '\0') { - if (version < G_ELI_VERSION_05) + if (eli_version < G_ELI_VERSION_05) str = "aes-cbc"; else str = GELI_ENC_ALGO; @@ -783,14 +783,14 @@ eli_init(struct gctl_req *req) return; } if (md.md_ealgo == CRYPTO_CAMELLIA_CBC && - version < G_ELI_VERSION_04) { + eli_version < G_ELI_VERSION_04) { gctl_error(req, "Camellia-CBC algorithm is supported starting from version %u.", G_ELI_VERSION_04); return; } if (md.md_ealgo == CRYPTO_AES_XTS && - version < G_ELI_VERSION_05) { + eli_version < G_ELI_VERSION_05) { gctl_error(req, "AES-XTS algorithm is supported starting from version %u.", G_ELI_VERSION_05); @@ -1870,7 +1870,7 @@ eli_version(struct gctl_req *req) { struct g_eli_metadata md; const char *name; - unsigned int version; + unsigned int eli_version; int error, i, nargs; nargs = gctl_get_int(req, "nargs"); @@ -1900,8 +1900,8 @@ eli_version(struct gctl_req *req) gctl_error(req, "Not fully done."); continue; } - version = le32dec(&md.md_version); - printf("%s: %u\n", name, version); + eli_version = le32dec(&md.md_version); + printf("%s: %u\n", name, eli_version); } } From owner-svn-src-all@freebsd.org Thu Feb 13 19:03:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66F4C231509; Thu, 13 Feb 2020 19:03:14 +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) server-signature RSA-PSS (4096 bits) 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 48JQrf26vxz4PnK; Thu, 13 Feb 2020 19:03:14 +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 44270F64F; Thu, 13 Feb 2020 19:03:14 +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 01DJ3Ev9044493; Thu, 13 Feb 2020 19:03:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJ3DDN044487; Thu, 13 Feb 2020 19:03:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131903.01DJ3DDN044487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357865 - in head/sys/amd64/vmm: . io X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/amd64/vmm: . io X-SVN-Commit-Revision: 357865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:03:14 -0000 Author: kib Date: Thu Feb 13 19:03:12 2020 New Revision: 357865 URL: https://svnweb.freebsd.org/changeset/base/357865 Log: vmm: Add Hygon Dhyana support. Submitted by: Pu Wen Discussed with: grehan Reviewed by: jhb (previous version) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23553 Modified: head/sys/amd64/vmm/io/iommu.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_util.c head/sys/amd64/vmm/vmm_util.h head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/io/iommu.c ============================================================================== --- head/sys/amd64/vmm/io/iommu.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/io/iommu.c Thu Feb 13 19:03:12 2020 (r357865) @@ -184,7 +184,7 @@ iommu_init(void) if (vmm_is_intel()) ops = &iommu_ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops = &iommu_ops_amd; else ops = NULL; Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm.c Thu Feb 13 19:03:12 2020 (r357865) @@ -347,7 +347,7 @@ vmm_init(void) if (vmm_is_intel()) ops = &vmm_ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops = &vmm_ops_amd; else return (ENXIO); Modified: head/sys/amd64/vmm/vmm_stat.c ============================================================================== --- head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 19:03:12 2020 (r357865) @@ -67,7 +67,7 @@ vmm_stat_register(void *arg) if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) return; - if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) + if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_svm()) return; if (vst_num_elems + vst->nelems >= MAX_VMM_STAT_ELEMS) { Modified: head/sys/amd64/vmm/vmm_util.c ============================================================================== --- head/sys/amd64/vmm/vmm_util.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_util.c Thu Feb 13 19:03:12 2020 (r357865) @@ -46,9 +46,10 @@ vmm_is_intel(void) } bool -vmm_is_amd(void) +vmm_is_svm(void) { - return (strcmp(cpu_vendor, "AuthenticAMD") == 0); + return (strcmp(cpu_vendor, "AuthenticAMD") == 0 || + strcmp(cpu_vendor, "HygonGenuine") == 0); } bool Modified: head/sys/amd64/vmm/vmm_util.h ============================================================================== --- head/sys/amd64/vmm/vmm_util.h Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_util.h Thu Feb 13 19:03:12 2020 (r357865) @@ -34,7 +34,7 @@ struct trapframe; bool vmm_is_intel(void); -bool vmm_is_amd(void); +bool vmm_is_svm(void); bool vmm_supports_1G_pages(void); void dump_trapframe(struct trapframe *tf); Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/x86.c Thu Feb 13 19:03:12 2020 (r357865) @@ -135,7 +135,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); - if (vmm_is_amd()) { + if (vmm_is_svm()) { /* * As on Intel (0000_0007:0, EDX), mask out * unsupported or unsafe AMD extended features @@ -234,7 +234,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_8000_001D: /* AMD Cache topology, like 0000_0004 for Intel. */ - if (!vmm_is_amd()) + if (!vmm_is_svm()) goto default_leaf; /* @@ -276,8 +276,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_001E: - /* AMD Family 16h+ additional identifiers */ - if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) + /* + * AMD Family 16h+ and Hygon Family 18h additional + * identifiers. + */ + if (!vmm_is_svm() || CPUID_TO_FAMILY(cpu_id) < 0x16) goto default_leaf; vm_get_topology(vm, &sockets, &cores, &threads, From owner-svn-src-all@freebsd.org Thu Feb 13 19:05:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D61E02315E5; Thu, 13 Feb 2020 19:05:14 +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) server-signature RSA-PSS (4096 bits) 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 48JQty5Kc8z4Pxk; Thu, 13 Feb 2020 19:05:14 +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 B23F1F670; Thu, 13 Feb 2020 19:05:14 +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 01DJ5EbM044647; Thu, 13 Feb 2020 19:05:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJ5E4D044645; Thu, 13 Feb 2020 19:05:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131905.01DJ5E4D044645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357866 - in head/usr.sbin: bhyve bhyvectl X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/usr.sbin: bhyve bhyvectl X-SVN-Commit-Revision: 357866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:05:14 -0000 Author: kib Date: Thu Feb 13 19:05:14 2020 New Revision: 357866 URL: https://svnweb.freebsd.org/changeset/base/357866 Log: bhyve, bhyvectl: Add Hygon Dhyana support. Submitted by: Pu Wen Reviewed by: jhb MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23554 Modified: head/usr.sbin/bhyve/xmsr.c head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyve/xmsr.c ============================================================================== --- head/usr.sbin/bhyve/xmsr.c Thu Feb 13 19:03:12 2020 (r357865) +++ head/usr.sbin/bhyve/xmsr.c Thu Feb 13 19:05:14 2020 (r357866) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "debug.h" #include "xmsr.h" -static int cpu_vendor_intel, cpu_vendor_amd; +static int cpu_vendor_intel, cpu_vendor_amd, cpu_vendor_hygon; int emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t val) @@ -64,7 +64,7 @@ emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t nu default: break; } - } else if (cpu_vendor_amd) { + } else if (cpu_vendor_amd || cpu_vendor_hygon) { switch (num) { case MSR_HWCR: /* @@ -128,7 +128,7 @@ emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t nu error = -1; break; } - } else if (cpu_vendor_amd) { + } else if (cpu_vendor_amd || cpu_vendor_hygon) { switch (num) { case MSR_BIOS_SIGN: *val = 0; @@ -225,6 +225,8 @@ init_msr(void) error = 0; if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { cpu_vendor_amd = 1; + } else if (strcmp(cpu_vendor, "HygonGenuine") == 0) { + cpu_vendor_hygon = 1; } else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { cpu_vendor_intel = 1; } else { Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Thu Feb 13 19:03:12 2020 (r357865) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu Feb 13 19:05:14 2020 (r357866) @@ -657,6 +657,8 @@ cpu_vendor_intel(void) if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { return (false); + } else if (strcmp(cpu_vendor, "HygonGenuine") == 0) { + return (false); } else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { return (true); } else { From owner-svn-src-all@freebsd.org Thu Feb 13 19:05:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15EAF231608; Thu, 13 Feb 2020 19:05:21 +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) server-signature RSA-PSS (4096 bits) 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 48JQv41Cswz4Q4Q; Thu, 13 Feb 2020 19:05:20 +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 EEF4AF671; Thu, 13 Feb 2020 19:05:19 +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 01DJ5JqC044696; Thu, 13 Feb 2020 19:05:19 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJ5Ja6044695; Thu, 13 Feb 2020 19:05:19 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002131905.01DJ5Ja6044695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 13 Feb 2020 19:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357867 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 357867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:05:21 -0000 Author: lwhsu Date: Thu Feb 13 19:05:19 2020 New Revision: 357867 URL: https://svnweb.freebsd.org/changeset/base/357867 Log: Fix GCC build. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/net/randsleep.c Modified: head/tests/sys/net/randsleep.c ============================================================================== --- head/tests/sys/net/randsleep.c Thu Feb 13 19:05:14 2020 (r357866) +++ head/tests/sys/net/randsleep.c Thu Feb 13 19:05:19 2020 (r357867) @@ -37,7 +37,7 @@ #include #include -#define RANDOM_MAX ((1<<31) - 1) +#define RANDOM_MAX (((long)1<<31) - 1) int main(int argc, char** argv){ useconds_t max_usecs, usecs; From owner-svn-src-all@freebsd.org Thu Feb 13 19:07:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D97782317B4; Thu, 13 Feb 2020 19:07:42 +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) server-signature RSA-PSS (4096 bits) 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 48JQxp5Pmkz4QFs; Thu, 13 Feb 2020 19:07:42 +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 B4E13F692; Thu, 13 Feb 2020 19:07:42 +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 01DJ7gWN044860; Thu, 13 Feb 2020 19:07:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJ7gqi044859; Thu, 13 Feb 2020 19:07:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131907.01DJ7gqi044859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357868 - head/sys/dev/amdpm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/amdpm X-SVN-Commit-Revision: 357868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:07:42 -0000 Author: kib Date: Thu Feb 13 19:07:42 2020 New Revision: 357868 URL: https://svnweb.freebsd.org/changeset/base/357868 Log: amdpm: Add Hygon Dhyana support. Submitted by: Pu Wen MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23557 Modified: head/sys/dev/amdpm/amdpm.c Modified: head/sys/dev/amdpm/amdpm.c ============================================================================== --- head/sys/dev/amdpm/amdpm.c Thu Feb 13 19:05:19 2020 (r357867) +++ head/sys/dev/amdpm/amdpm.c Thu Feb 13 19:07:42 2020 (r357868) @@ -67,6 +67,8 @@ static int amdpm_debug = 0; #define AMDPM_DEVICEID_AMD768PM 0x7443 #define AMDPM_DEVICEID_AMD8111PM 0x746B +#define AMDPM_VENDORID_HYGON 0x1d94 + /* nVidia nForce chipset */ #define AMDPM_VENDORID_NVIDIA 0x10de #define AMDPM_DEVICEID_NF_SMB 0x01b4 @@ -199,7 +201,8 @@ amdpm_attach(device_t dev) pci_write_config(dev, AMDPCI_GEN_CONFIG_PM, val_b | AMDPCI_PMIOEN, 1); /* Allocate I/O space */ - if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD) + if (pci_get_vendor(dev) == AMDPM_VENDORID_AMD || + pci_get_vendor(dev) == AMDPM_VENDORID_HYGON) amdpm_sc->rid = AMDPCI_PMBASE; else amdpm_sc->rid = NFPCI_PMBASE; From owner-svn-src-all@freebsd.org Thu Feb 13 19:09:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41D75231A2D; Thu, 13 Feb 2020 19:09:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JQzn12Q3z4QZM; Thu, 13 Feb 2020 19:09:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EBAEF697; Thu, 13 Feb 2020 19:09:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DJ9PK5044990; Thu, 13 Feb 2020 19:09:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJ9OYD044987; Thu, 13 Feb 2020 19:09:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131909.01DJ9OYD044987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357869 - in head/sys/dev: amdsbwd intpm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/dev: amdsbwd intpm X-SVN-Commit-Revision: 357869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:09:25 -0000 Author: kib Date: Thu Feb 13 19:09:24 2020 New Revision: 357869 URL: https://svnweb.freebsd.org/changeset/base/357869 Log: amdsbwd, intpm: Add Hygon Dhyana support. Initialize the FCH SMBus controller for Hygon Dhyana CPU. Set the vendor of the FCH description via the exact CPU vendor. Submitted by: Pu Wen MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23558 Modified: head/sys/dev/amdsbwd/amd_chipset.h head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/intpm/intpm.c Modified: head/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- head/sys/dev/amdsbwd/amd_chipset.h Thu Feb 13 19:07:42 2020 (r357868) +++ head/sys/dev/amdsbwd/amd_chipset.h Thu Feb 13 19:09:24 2020 (r357869) @@ -146,3 +146,5 @@ #define AMDCZ_SMBUS_DEVID 0x790b1022 #define AMDCZ49_SMBUS_REVID 0x49 +#define HYGONCZ_SMBUS_DEVID 0x790b1d94 + Modified: head/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- head/sys/dev/amdsbwd/amdsbwd.c Thu Feb 13 19:07:42 2020 (r357868) +++ head/sys/dev/amdsbwd/amdsbwd.c Thu Feb 13 19:09:24 2020 (r357869) @@ -60,6 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -269,7 +271,8 @@ amdsbwd_identify(driver_t *driver, device_t parent) return; if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID && pci_get_devid(smb_dev) != AMDFCH_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID) + pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID && + pci_get_devid(smb_dev) != HYGONCZ_SMBUS_DEVID) return; child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1); @@ -378,6 +381,7 @@ static void amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; + char buf[36]; val = pmio_read(pmres, AMDFCH41_PM_ISA_CTRL); if ((val & AMDFCH41_MMIO_EN) != 0) { @@ -416,7 +420,9 @@ amdsbwd_probe_fch41(device_t dev, struct resource *pmr amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - device_set_desc(dev, "AMD FCH Rev 41h+ Watchdog Timer"); + snprintf(buf, sizeof(buf), "%s FCH Rev 41h+ Watchdog Timer", + cpu_vendor_id == CPU_VENDOR_HYGON ? "Hygon" : "AMD"); + device_set_desc_copy(dev, buf); } static int Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Thu Feb 13 19:07:42 2020 (r357868) +++ head/sys/dev/intpm/intpm.c Thu Feb 13 19:09:24 2020 (r357869) @@ -102,6 +102,7 @@ const struct intsmb_device { { AMDSB_SMBUS_DEVID, "AMD SB600/7xx/8xx/9xx SMBus Controller" }, { AMDFCH_SMBUS_DEVID, "AMD FCH SMBus Controller" }, { AMDCZ_SMBUS_DEVID, "AMD FCH SMBus Controller" }, + { HYGONCZ_SMBUS_DEVID, "Hygon FCH SMBus Controller" }, }; static int @@ -243,6 +244,7 @@ intsmb_attach(device_t dev) break; case AMDFCH_SMBUS_DEVID: case AMDCZ_SMBUS_DEVID: + case HYGONCZ_SMBUS_DEVID: sc->sb8xx = 1; break; } From owner-svn-src-all@freebsd.org Thu Feb 13 19:10:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FDB6231B8B; Thu, 13 Feb 2020 19:10:52 +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) server-signature RSA-PSS (4096 bits) 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 48JR1R4qrvz4QsJ; Thu, 13 Feb 2020 19:10:51 +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 A10D3F6C8; Thu, 13 Feb 2020 19:10:51 +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 01DJAplN045856; Thu, 13 Feb 2020 19:10:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJAp9m045855; Thu, 13 Feb 2020 19:10:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131910.01DJAp9m045855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357870 - head/sys/dev/amd_ecc_inject X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/amd_ecc_inject X-SVN-Commit-Revision: 357870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:10:52 -0000 Author: kib Date: Thu Feb 13 19:10:51 2020 New Revision: 357870 URL: https://svnweb.freebsd.org/changeset/base/357870 Log: ecc_inject: Add Hygon Dhyana support. Submitted by: Pu Wen MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23561 Modified: head/sys/dev/amd_ecc_inject/ecc_inject.c Modified: head/sys/dev/amd_ecc_inject/ecc_inject.c ============================================================================== --- head/sys/dev/amd_ecc_inject/ecc_inject.c Thu Feb 13 19:09:24 2020 (r357869) +++ head/sys/dev/amd_ecc_inject/ecc_inject.c Thu Feb 13 19:10:51 2020 (r357870) @@ -203,7 +203,8 @@ ecc_ei_load(void) { uint32_t val; - if (cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) { + if ((cpu_vendor_id != CPU_VENDOR_AMD || CPUID_TO_FAMILY(cpu_id) < 0x10) && + cpu_vendor_id != CPU_VENDOR_HYGON) { printf("DRAM ECC error injection is not supported\n"); return (ENXIO); } From owner-svn-src-all@freebsd.org Thu Feb 13 19:12:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB92A231D8C; Thu, 13 Feb 2020 19:12:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JR2v54mhz4R5M; Thu, 13 Feb 2020 19:12:07 +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 A91EEF73B; Thu, 13 Feb 2020 19:12:07 +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 01DJC7oU047546; Thu, 13 Feb 2020 19:12:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJC7Gu047545; Thu, 13 Feb 2020 19:12:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002131912.01DJC7Gu047545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 19:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357871 - head/sys/dev/hyperv/vmbus/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/hyperv/vmbus/amd64 X-SVN-Commit-Revision: 357871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:12:07 -0000 Author: kib Date: Thu Feb 13 19:12:07 2020 New Revision: 357871 URL: https://svnweb.freebsd.org/changeset/base/357871 Log: hyperv: Add Hygon Dhyana support. Submitted by: Pu Wen MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23563 Modified: head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Modified: head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c ============================================================================== --- head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Thu Feb 13 19:10:51 2020 (r357870) +++ head/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c Thu Feb 13 19:12:07 2020 (r357871) @@ -188,6 +188,7 @@ hyperv_tsc_tcinit(void *dummy __unused) switch (cpu_vendor_id) { case CPU_VENDOR_AMD: + case CPU_VENDOR_HYGON: hyperv_tsc_timecounter.tc_get_timecount = hyperv_tsc_timecount_mfence; tc64 = hyperv_tc64_tsc_mfence; From owner-svn-src-all@freebsd.org Thu Feb 13 19:28:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 394CD232586; Thu, 13 Feb 2020 19:28:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JRPq0JFvz4S4T; Thu, 13 Feb 2020 19:28:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00EE4FA7B; Thu, 13 Feb 2020 19:28:30 +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 01DJSUMg057500; Thu, 13 Feb 2020 19:28:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJSUg4057499; Thu, 13 Feb 2020 19:28:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002131928.01DJSUg4057499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 13 Feb 2020 19:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357873 - head/sbin/sconfig X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/sbin/sconfig X-SVN-Commit-Revision: 357873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:28:31 -0000 Author: dim Date: Thu Feb 13 19:28:30 2020 New Revision: 357873 URL: https://svnweb.freebsd.org/changeset/base/357873 Log: Merge r357864 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in sconfig: sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation] exit (-1); ^ sbin/sconfig/sconfig.c:907:6: note: previous statement is here } else ^ The intent was to group the exit() call with the previous fprintf() call. MFC after: 3 days Modified: head/sbin/sconfig/sconfig.c Directory Properties: head/ (props changed) Modified: head/sbin/sconfig/sconfig.c ============================================================================== --- head/sbin/sconfig/sconfig.c Thu Feb 13 19:25:49 2020 (r357872) +++ head/sbin/sconfig/sconfig.c Thu Feb 13 19:28:30 2020 (r357873) @@ -904,9 +904,10 @@ setup_chan (int fd, int argc, char **argv) } else if (strncasecmp ("rs449", argv[i]+5, 5) == 0) { port = 2; ioctl (fd, SERIAL_SETPORT, &port); - } else + } else { fprintf (stderr, "invalid port type\n"); exit (-1); + } #if 1 } else if (strcasecmp ("reset", argv[i]) == 0) { ioctl (fd, SERIAL_RESET, 0); From owner-svn-src-all@freebsd.org Thu Feb 13 19:29:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56015232631; Thu, 13 Feb 2020 19:29:59 +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) server-signature RSA-PSS (4096 bits) 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 48JRRW1f9sz4SDG; Thu, 13 Feb 2020 19:29:59 +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 19D2BFA7C; Thu, 13 Feb 2020 19:29:59 +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 01DJTwIU057639; Thu, 13 Feb 2020 19:29:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DJTw5j057634; Thu, 13 Feb 2020 19:29:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002131929.01DJTw5j057634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 13 Feb 2020 19:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357874 - in head/sys: conf modules/ce modules/cp X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/sys: conf modules/ce modules/cp X-SVN-Commit-Revision: 357874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 19:29:59 -0000 Author: dim Date: Thu Feb 13 19:29:57 2020 New Revision: 357874 URL: https://svnweb.freebsd.org/changeset/base/357874 Log: Merge r357872 from the clang1000-import branch: Disable new clang 10.0.0 warnings about misleading indentation in ce(4) and cp(4). These are false positives, since some of the driver source has been deliberately obfuscated. MFC after: 3 days Modified: head/sys/conf/files.i386 head/sys/conf/kern.mk head/sys/modules/ce/Makefile head/sys/modules/cp/Makefile Directory Properties: head/ (props changed) Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Feb 13 19:28:30 2020 (r357873) +++ head/sys/conf/files.i386 Thu Feb 13 19:29:57 2020 (r357874) @@ -93,8 +93,9 @@ dev/agp/agp_via.c optional agp dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce \ - compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" -dev/cp/cpddk.c optional cp + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} ${NO_WMISLEADING_INDENTATION}" +dev/cp/cpddk.c optional cp \ + compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}" dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau dev/ctau/ctddk.c optional ctau Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Feb 13 19:28:30 2020 (r357873) +++ head/sys/conf/kern.mk Thu Feb 13 19:29:57 2020 (r357874) @@ -37,6 +37,9 @@ CWARNEXTRA+= -Wno-error-shift-negative-value .if ${COMPILER_VERSION} >= 40000 CWARNEXTRA+= -Wno-address-of-packed-member .endif +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif .endif .if ${COMPILER_TYPE} == "gcc" Modified: head/sys/modules/ce/Makefile ============================================================================== --- head/sys/modules/ce/Makefile Thu Feb 13 19:28:30 2020 (r357873) +++ head/sys/modules/ce/Makefile Thu Feb 13 19:29:57 2020 (r357874) @@ -27,4 +27,5 @@ opt_ng_cronyx.h: .include -CWARNFLAGS.tau32-ddk.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WMISLEADING_INDENTATION} Modified: head/sys/modules/cp/Makefile ============================================================================== --- head/sys/modules/cp/Makefile Thu Feb 13 19:28:30 2020 (r357873) +++ head/sys/modules/cp/Makefile Thu Feb 13 19:29:57 2020 (r357874) @@ -26,3 +26,5 @@ opt_ng_cronyx.h: .endif .include + +CWARNFLAGS.cpddk.c+= ${NO_WMISLEADING_INDENTATION} From owner-svn-src-all@freebsd.org Thu Feb 13 20:23:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB2FC233B53; Thu, 13 Feb 2020 20:23:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JSdm3w5Lz4Vsd; Thu, 13 Feb 2020 20:23:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8190B185B7; Thu, 13 Feb 2020 20:23:56 +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 01DKNuFi093059; Thu, 13 Feb 2020 20:23:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKNt23093056; Thu, 13 Feb 2020 20:23:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002132023.01DKNt23093056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 13 Feb 2020 20:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357875 - in head/usr.bin/diff: . tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.bin/diff: . tests X-SVN-Commit-Revision: 357875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:23:56 -0000 Author: kevans Date: Thu Feb 13 20:23:55 2020 New Revision: 357875 URL: https://svnweb.freebsd.org/changeset/base/357875 Log: diff: fix segfault with --tabsize and no/malformed argument --tabsize was previously listed as optional_argument, but didn't account for the optionality of it in the argument handling. This is irrelevant -- the manpage doesn't indicate that the argument is optional, and indeed there's no clear interpretation of omitting the argument because there's no other side effect of --tabsize. The "malformed" argument part of the header on this message is simply referring to usage like this: % diff --tabsize 4 A B With an optional_argument, the argument must be attached to the parameter directly (e.g. --tabsize=4), so the argument is effectively NULL with the above invocation as if no argument had been passed. PR: 243974 Submitted by: fehmi noyan isi (diff.c portion) MFC after: 3 days Modified: head/usr.bin/diff/diff.1 head/usr.bin/diff/diff.c head/usr.bin/diff/tests/diff_test.sh Modified: head/usr.bin/diff/diff.1 ============================================================================== --- head/usr.bin/diff/diff.1 Thu Feb 13 19:29:57 2020 (r357874) +++ head/usr.bin/diff/diff.1 Thu Feb 13 20:23:55 2020 (r357875) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd February 12, 2020 +.Dd February 13, 2020 .Dt DIFF 1 .Os .Sh NAME @@ -60,7 +60,7 @@ .Op Fl -starting-file .Op Fl -speed-large-files .Op Fl -strip-trailing-cr -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Op Fl -unified .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern @@ -88,7 +88,7 @@ .Op Fl -speed-large-files .Op Fl -starting-file .Op Fl -strip-trailing-cr -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Fl C Ar number | -context Ar number .Ar file1 file2 @@ -113,7 +113,7 @@ .Op Fl -speed-large-files .Op Fl -starting-file .Op Fl -strip-trailing-cr -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Fl D Ar string | Fl -ifdef Ar string .Ar file1 file2 @@ -139,7 +139,7 @@ .Op Fl -speed-large-files .Op Fl -starting-file .Op Fl -strip-trailing-cr -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Fl U Ar number | Fl -unified Ar number .Ar file1 file2 @@ -170,7 +170,7 @@ .Op Fl -show-c-function .Op Fl -speed-large-files .Op Fl -strip-trailing-cr -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Op Fl -unidirectional-new-file .Op Fl -unified @@ -192,7 +192,7 @@ .Op Fl -no-ignore-file-name-case .Op Fl -strip-trailing-cr .Op Fl -suppress-common-lines -.Op Fl -tabsize +.Op Fl -tabsize Ar number .Op Fl -text .Op Fl -width .Fl y | Fl -side-by-side Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Thu Feb 13 19:29:57 2020 (r357874) +++ head/usr.bin/diff/diff.c Thu Feb 13 20:23:55 2020 (r357875) @@ -93,7 +93,7 @@ static struct option longopts[] = { { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, { "normal", no_argument, NULL, OPT_NORMAL }, { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, - { "tabsize", optional_argument, NULL, OPT_TSIZE }, + { "tabsize", required_argument, NULL, OPT_TSIZE }, { "changed-group-format", required_argument, NULL, OPT_CHANGED_GROUP_FORMAT}, { "suppress-common-lines", no_argument, NULL, OPT_SUPPRESS_COMMON }, { NULL, 0, 0, '\0'} Modified: head/usr.bin/diff/tests/diff_test.sh ============================================================================== --- head/usr.bin/diff/tests/diff_test.sh Thu Feb 13 19:29:57 2020 (r357874) +++ head/usr.bin/diff/tests/diff_test.sh Thu Feb 13 20:23:55 2020 (r357875) @@ -10,6 +10,7 @@ atf_test_case side_by_side atf_test_case brief_format atf_test_case b230049 atf_test_case Bflag +atf_test_case tabsize simple_body() { @@ -164,6 +165,16 @@ Bflag_body() atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff -B E F } +tabsize_body() +{ + printf "\tA\n" > A + printf "\tB\n" > B + + atf_check -s exit:1 \ + -o inline:"1c1\n< A\n---\n> B\n" \ + diff -t --tabsize 1 A B +} + atf_init_test_cases() { atf_add_test_case simple @@ -176,4 +187,5 @@ atf_init_test_cases() atf_add_test_case brief_format atf_add_test_case b230049 atf_add_test_case Bflag + atf_add_test_case tabsize } From owner-svn-src-all@freebsd.org Thu Feb 13 20:32:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95F2F23435E; Thu, 13 Feb 2020 20:32:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JSqB3Xlcz4Wfj; Thu, 13 Feb 2020 20:32:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74CC118667; Thu, 13 Feb 2020 20:32:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKW6Hn098590; Thu, 13 Feb 2020 20:32:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKW5mh098044; Thu, 13 Feb 2020 20:32:05 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132032.01DKW5mh098044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357876 - in stable/12: etc/mtree sys/geom sys/geom/multipath tests/sys/geom/class tests/sys/geom/class/multipath X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/12: etc/mtree sys/geom sys/geom/multipath tests/sys/geom/class tests/sys/geom/class/multipath X-SVN-Commit-Revision: 357876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:32:06 -0000 Author: asomers Date: Thu Feb 13 20:32:05 2020 New Revision: 357876 URL: https://svnweb.freebsd.org/changeset/base/357876 Log: MFC r355431: gmultipath: add ATF tests Add ATF tests for most gmultipath operations. Add some dtrace probes too, primarily for configuration changes that happen in response to provider errors. PR: 178473 Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D22235 Added: stable/12/tests/sys/geom/class/multipath/ - copied from r355431, head/tests/sys/geom/class/multipath/ Modified: stable/12/etc/mtree/BSD.tests.dist stable/12/sys/geom/geom_subr.c stable/12/sys/geom/multipath/g_multipath.c stable/12/tests/sys/geom/class/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.tests.dist ============================================================================== --- stable/12/etc/mtree/BSD.tests.dist Thu Feb 13 20:23:55 2020 (r357875) +++ stable/12/etc/mtree/BSD.tests.dist Thu Feb 13 20:32:05 2020 (r357876) @@ -744,6 +744,8 @@ .. mirror .. + multipath + .. nop .. part Modified: stable/12/sys/geom/geom_subr.c ============================================================================== --- stable/12/sys/geom/geom_subr.c Thu Feb 13 20:23:55 2020 (r357875) +++ stable/12/sys/geom/geom_subr.c Thu Feb 13 20:32:05 2020 (r357876) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,6 +65,8 @@ __FBSDID("$FreeBSD$"); #ifdef KDB #include #endif + +SDT_PROVIDER_DEFINE(geom); struct class_list_head g_classes = LIST_HEAD_INITIALIZER(g_classes); static struct g_tailq_head geoms = TAILQ_HEAD_INITIALIZER(geoms); Modified: stable/12/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/12/sys/geom/multipath/g_multipath.c Thu Feb 13 20:23:55 2020 (r357875) +++ stable/12/sys/geom/multipath/g_multipath.c Thu Feb 13 20:32:05 2020 (r357876) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -61,6 +62,14 @@ static u_int g_multipath_exclusive = 1; SYSCTL_UINT(_kern_geom_multipath, OID_AUTO, exclusive, CTLFLAG_RW, &g_multipath_exclusive, 0, "Exclusively open providers"); +SDT_PROVIDER_DECLARE(geom); +SDT_PROBE_DEFINE2(geom, multipath, config, restore, "char*", "char*"); +SDT_PROBE_DEFINE2(geom, multipath, config, remove, "char*", "char*"); +SDT_PROBE_DEFINE2(geom, multipath, config, disconnect, "char*", "char*"); +SDT_PROBE_DEFINE3(geom, multipath, config, fail, "char*", "char*", "int"); +SDT_PROBE_DEFINE2(geom, multipath, config, taste, "char*", "char*"); +SDT_PROBE_DEFINE2(geom, multipath, io, restart, "struct bio*", "struct bio*"); + static enum { GKT_NIL, GKT_RUN, @@ -146,6 +155,8 @@ g_multipath_fault(struct g_consumer *cp, int cause) printf("GEOM_MULTIPATH: " "all paths in %s were marked FAIL, restore %s\n", sc->sc_name, lcp->provider->name); + SDT_PROBE2(geom, multipath, config, restore, + sc->sc_name, lcp->provider->name); lcp->index &= ~MP_FAIL; } } @@ -217,6 +228,8 @@ g_mpd(void *arg, int flags __unused) if (cp->provider) { printf("GEOM_MULTIPATH: %s removed from %s\n", cp->provider->name, gp->name); + SDT_PROBE2(geom, multipath, config, remove, + gp->name, cp->provider->name); g_detach(cp); } g_destroy_consumer(cp); @@ -234,6 +247,8 @@ g_multipath_orphan(struct g_consumer *cp) g_topology_assert(); printf("GEOM_MULTIPATH: %s in %s was disconnected\n", cp->provider->name, cp->geom->name); + SDT_PROBE2(geom, multipath, config, disconnect, + cp->geom->name, cp->provider->name); sc = cp->geom->softc; cnt = (uintptr_t *)&cp->private; mtx_lock(&sc->sc_mtx); @@ -411,6 +426,8 @@ g_multipath_done_error(struct bio *bp) if ((cp->index & MP_FAIL) == 0) { printf("GEOM_MULTIPATH: Error %d, %s in %s marked FAIL\n", bp->bio_error, pp->name, sc->sc_name); + SDT_PROBE3(geom, multipath, config, fail, + sc->sc_name, pp->name, bp->bio_error); g_multipath_fault(cp, MP_FAIL); } (*cnt)--; @@ -426,6 +443,7 @@ g_multipath_done_error(struct bio *bp) */ if (pbp->bio_children < (uintptr_t)pbp->bio_driver1) { pbp->bio_inbed++; + SDT_PROBE2(geom, multipath, io, restart, bp, pbp); g_destroy_bio(bp); g_multipath_start(pbp); } else { @@ -831,6 +849,7 @@ g_multipath_taste(struct g_class *mp, struct g_provide return (NULL); if (g_multipath_debug) printf("MULTIPATH: %s/%s\n", md.md_name, md.md_uuid); + SDT_PROBE2(geom, multipath, config, taste, md.md_name, md.md_uuid); /* * Let's check if such a device already is present. We check against @@ -1230,8 +1249,12 @@ g_multipath_ctl_fail(struct gctl_req *req, struct g_cl name, sc->sc_name, fail ? "FAIL" : "OK"); if (fail) { g_multipath_fault(cp, MP_FAIL); + SDT_PROBE3(geom, multipath, config, fail, + sc->sc_name, cp->provider->name, 0); } else { cp->index &= ~MP_FAIL; + SDT_PROBE2(geom, multipath, config, restore, + sc->sc_name, cp->provider->name); } } } @@ -1277,6 +1300,8 @@ g_multipath_ctl_remove(struct gctl_req *req, struct g_ found = 1; printf("GEOM_MULTIPATH: removing %s from %s\n", cp->provider->name, cp->geom->name); + SDT_PROBE2(geom, multipath, config, remove, + cp->geom->name, cp->provider->name); sc->sc_ndisks--; g_multipath_fault(cp, MP_LOST); cnt = (uintptr_t *)&cp->private; Modified: stable/12/tests/sys/geom/class/Makefile ============================================================================== --- stable/12/tests/sys/geom/class/Makefile Thu Feb 13 20:23:55 2020 (r357875) +++ stable/12/tests/sys/geom/class/Makefile Thu Feb 13 20:32:05 2020 (r357876) @@ -8,6 +8,7 @@ TESTS_SUBDIRS+= concat TESTS_SUBDIRS+= eli TESTS_SUBDIRS+= gate TESTS_SUBDIRS+= mirror +TESTS_SUBDIRS+= multipath TESTS_SUBDIRS+= nop TESTS_SUBDIRS+= part TESTS_SUBDIRS+= raid3 From owner-svn-src-all@freebsd.org Thu Feb 13 20:40:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FD1D23484F; Thu, 13 Feb 2020 20:40:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JT112QtBz4X9h; Thu, 13 Feb 2020 20:40:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34F72187E0; Thu, 13 Feb 2020 20:40:37 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKebEZ002360; Thu, 13 Feb 2020 20:40:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKebTn002359; Thu, 13 Feb 2020 20:40:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132040.01DKebTn002359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357877 - stable/12/sys/cam/scsi X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/sys/cam/scsi X-SVN-Commit-Revision: 357877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:40:37 -0000 Author: asomers Date: Thu Feb 13 20:40:36 2020 New Revision: 357877 URL: https://svnweb.freebsd.org/changeset/base/357877 Log: MFC r355430: ses: sanitize illegal strings in SES element descriptors The SES4r3 standard requires that element descriptors may only contain ASCII characters in the range 0x20 to 0x7e. Some SuperMicro expanders violate that rule. This patch adds a sanity check to ses(4). Descriptors in violation will be replaced by "". This patch fixes "sesutil --libxo xml" on such systems. Previously it would generate non-well-formed XML output. PR: 241929 Reviewed by: allanjude Sponsored by: Axcient Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_enc_ses.c Thu Feb 13 20:32:05 2020 (r357876) +++ stable/12/sys/cam/scsi/scsi_enc_ses.c Thu Feb 13 20:40:36 2020 (r357877) @@ -110,7 +110,7 @@ typedef struct ses_addl_status { typedef struct ses_element { uint8_t eip; /* eip bit is set */ uint16_t descr_len; /* length of the descriptor */ - char *descr; /* descriptor for this object */ + const char *descr; /* descriptor for this object */ struct ses_addl_status addl; /* additional status info */ } ses_element_t; @@ -1977,6 +1977,35 @@ ses_publish_cache(enc_softc_t *enc, struct enc_fsm_sta return (0); } +/* + * \brief Sanitize an element descriptor + * + * The SES4r3 standard, sections 3.1.2 and 6.1.10, specifies that element + * descriptors may only contain ASCII characters in the range 0x20 to 0x7e. + * But some vendors violate that rule. Ensure that we only expose compliant + * descriptors to userland. + * + * \param desc SES element descriptor as reported by the hardware + * \param len Length of desc in bytes, not necessarily including + * trailing NUL. It will be modified if desc is invalid. + */ +static const char* +ses_sanitize_elm_desc(const char *desc, uint16_t *len) +{ + const char *invalid = ""; + int i; + + for (i = 0; i < *len; i++) { + if (desc[i] < 0x20 || desc[i] > 0x7e) { + *len = strlen(invalid); + return (invalid); + } else if (desc[i] == 0) { + break; + } + } + return (desc); +} + /** * \brief Parse the descriptors for each object. * @@ -2061,7 +2090,8 @@ ses_process_elm_descs(enc_softc_t *enc, struct enc_fsm if (length > 0) { elmpriv = element->elm_private; elmpriv->descr_len = length; - elmpriv->descr = &buf[offset]; + elmpriv->descr = ses_sanitize_elm_desc(&buf[offset], + &elmpriv->descr_len); } /* skip over the descriptor itself */ From owner-svn-src-all@freebsd.org Thu Feb 13 20:41:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55C4223490E; Thu, 13 Feb 2020 20:41:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JT1s1hQsz4XLW; Thu, 13 Feb 2020 20:41:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3543F1892A; Thu, 13 Feb 2020 20:41:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKfLbZ004668; Thu, 13 Feb 2020 20:41:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKfKhC004665; Thu, 13 Feb 2020 20:41:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132041.01DKfKhC004665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357878 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 357878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:41:21 -0000 Author: asomers Date: Thu Feb 13 20:41:20 2020 New Revision: 357878 URL: https://svnweb.freebsd.org/changeset/base/357878 Log: MFC r355488-r355489 r355488: lio_listio(2): add a HISTORY section r355489: clock_gettime(2): add a HISTORY section Modified: stable/12/lib/libc/sys/clock_gettime.2 stable/12/lib/libc/sys/lio_listio.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/clock_gettime.2 ============================================================================== --- stable/12/lib/libc/sys/clock_gettime.2 Thu Feb 13 20:40:36 2020 (r357877) +++ stable/12/lib/libc/sys/clock_gettime.2 Thu Feb 13 20:41:20 2020 (r357878) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2017 +.Dd December 7, 2019 .Dt CLOCK_GETTIME 2 .Os .Sh NAME @@ -174,3 +174,11 @@ The clock IDs .Fa CLOCK_UPTIME_PRECISE , .Fa CLOCK_SECOND are FreeBSD extensions to the POSIX interface. +.Sh HISTORY +The +.Fn clock_gettime , +.Fn clock_settime , +and +.Fn clock_getres +system calls first appeared in +.Fx 3.0 . Modified: stable/12/lib/libc/sys/lio_listio.2 ============================================================================== --- stable/12/lib/libc/sys/lio_listio.2 Thu Feb 13 20:40:36 2020 (r357877) +++ stable/12/lib/libc/sys/lio_listio.2 Thu Feb 13 20:41:20 2020 (r357878) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 23, 2017 +.Dd Dec 7, 2019 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -216,3 +216,8 @@ The .Fn lio_listio function is expected to conform to .St -p1003.1-2001 . +.Sh HISTORY +The +.Fn lio_listio +system call first appeared in +.Fx 3.0 . From owner-svn-src-all@freebsd.org Thu Feb 13 20:45:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF1CE234C8C; Thu, 13 Feb 2020 20:45:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JT6h62WYz4Xrb; Thu, 13 Feb 2020 20:45:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA99C189A9; Thu, 13 Feb 2020 20:45:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKjW0n005825; Thu, 13 Feb 2020 20:45:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKjWML005824; Thu, 13 Feb 2020 20:45:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132045.01DKjWML005824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357879 - stable/12/usr.sbin/extattr X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/usr.sbin/extattr X-SVN-Commit-Revision: 357879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:45:33 -0000 Author: asomers Date: Thu Feb 13 20:45:32 2020 New Revision: 357879 URL: https://svnweb.freebsd.org/changeset/base/357879 Log: MFC r356809: setextattr: Increase stdin buffer size to 4096 Extended attribute values can potentially be quite large. One test for ZFS is supposed to set a 200MB xattr. However, the buffer size for reading values from stdin with setextattr -i is so small that the test times out waiting for tiny chunks of data to be buffered and appended to an sbuf. Increasing the buffer size should help alleviate some of the burden of reallocating larger sbufs when writing large extended attributes. Submitted by: Ryan Moeller Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D23211 Modified: stable/12/usr.sbin/extattr/rmextattr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/extattr/rmextattr.c ============================================================================== --- stable/12/usr.sbin/extattr/rmextattr.c Thu Feb 13 20:41:20 2020 (r357878) +++ stable/12/usr.sbin/extattr/rmextattr.c Thu Feb 13 20:45:32 2020 (r357879) @@ -104,7 +104,7 @@ mkbuf(char **buf, int *oldlen, int newlen) int main(int argc, char *argv[]) { -#define STDIN_BUF_SZ 1024 +#define STDIN_BUF_SZ 4096 char stdin_data[STDIN_BUF_SZ]; char *p; From owner-svn-src-all@freebsd.org Thu Feb 13 20:46:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70942234DD8; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JT7L2H11z4Y3g; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 495F5189B0; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKk642005908; Thu, 13 Feb 2020 20:46:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKk6KO005907; Thu, 13 Feb 2020 20:46:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132046.01DKk6KO005907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357880 - stable/12/tests/sys/geom/class/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/tests/sys/geom/class/eli X-SVN-Commit-Revision: 357880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:46:06 -0000 Author: asomers Date: Thu Feb 13 20:46:05 2020 New Revision: 357880 URL: https://svnweb.freebsd.org/changeset/base/357880 Log: MFC r357211: geli: add a test case for attaching multiple providers with 1 command Reviewed by: cem Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D23400 Modified: stable/12/tests/sys/geom/class/eli/attach_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/geom/class/eli/attach_test.sh ============================================================================== --- stable/12/tests/sys/geom/class/eli/attach_test.sh Thu Feb 13 20:45:32 2020 (r357879) +++ stable/12/tests/sys/geom/class/eli/attach_test.sh Thu Feb 13 20:46:05 2020 (r357880) @@ -68,6 +68,36 @@ attach_r_cleanup() geli_test_cleanup } +atf_test_case attach_multiple cleanup +attach_multiple_head() +{ + atf_set "descr" "geli attach can attach multiple providers" + atf_set "require.user" "root" +} +attach_multiple_body() +{ + geli_test_setup + + sectors=100 + md0=$(attach_md -t malloc -s `expr $sectors + 1`) + md1=$(attach_md -t malloc -s `expr $sectors + 1`) + md2=$(attach_md -t malloc -s `expr $sectors + 1`) + atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none + + atf_check geli init -B none -P -K keyfile ${md0} + atf_check geli init -B none -P -K keyfile ${md1} + atf_check geli init -B none -P -K keyfile ${md2} + atf_check geli attach -p -k keyfile ${md0} ${md1} ${md2} + # verify that it did create all 3 geli devices + atf_check -s exit:0 test -c /dev/${md0}.eli + atf_check -s exit:0 test -c /dev/${md1}.eli + atf_check -s exit:0 test -c /dev/${md2}.eli +} +attach_multiple_cleanup() +{ + geli_test_cleanup +} + atf_test_case nokey cleanup nokey_head() { @@ -95,5 +125,6 @@ atf_init_test_cases() { atf_add_test_case attach_d atf_add_test_case attach_r + atf_add_test_case attach_multiple atf_add_test_case nokey } From owner-svn-src-all@freebsd.org Thu Feb 13 20:49:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EA3623504B; Thu, 13 Feb 2020 20:49:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JTCZ11LWz4YJN; Thu, 13 Feb 2020 20:49:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 044B1189B6; Thu, 13 Feb 2020 20:49:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKnj2K006126; Thu, 13 Feb 2020 20:49:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKnjWs006125; Thu, 13 Feb 2020 20:49:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132049.01DKnjWs006125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357881 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 357881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:49:46 -0000 Author: asomers Date: Thu Feb 13 20:49:45 2020 New Revision: 357881 URL: https://svnweb.freebsd.org/changeset/base/357881 Log: MFC r357235: Speed up "zpool import" in the presence of many zvols By default, zpools may not be backed by zvols (that can be changed with the "vfs.zfs.vol.recursive" sysctl). When that sysctl is set to 0, the kernel does not attempt to read zvols when looking for vdevs. But the zpool command still does. This change brings the zpool command into line with the kernel's behavior. It speeds "zpool import" when an already imported pool has many zvols, or a zvol with many snapshots. PR: 241083 Reported by: Martin Birgmeier Reviewed by: mav, Ryan Moeller Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D22077 Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Feb 13 20:46:05 2020 (r357880) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Feb 13 20:49:45 2020 (r357881) @@ -1244,12 +1244,20 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importarg avl_tree_t slice_cache; rdsk_node_t *slice; void *cookie; + boolean_t skip_zvols = B_FALSE; + int value; + size_t size = sizeof(value); if (dirs == 0) { dirs = 1; dir = &default_dir; } + if (sysctlbyname("vfs.zfs.vol.recursive", &value, &size, NULL, 0) == 0 + && value == 0) { + skip_zvols = B_TRUE; + } + /* * Go through and read the label configuration information from every * possible device, organizing the information according to pool GUID @@ -1314,6 +1322,10 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importarg } LIST_FOREACH(mp, &mesh.lg_class, lg_class) { + if (skip_zvols && + strcmp(mp->lg_name, "ZFS::ZVOL") == 0) { + continue; + } LIST_FOREACH(gp, &mp->lg_geom, lg_geom) { LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { slice = zfs_alloc(hdl, sizeof (rdsk_node_t)); From owner-svn-src-all@freebsd.org Thu Feb 13 20:50:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F036823510F; Thu, 13 Feb 2020 20:50:21 +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) server-signature RSA-PSS (4096 bits) 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 48JTDF645dz4YQm; Thu, 13 Feb 2020 20:50:21 +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 CB717189BE; Thu, 13 Feb 2020 20:50:21 +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 01DKoLbI006257; Thu, 13 Feb 2020 20:50:21 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKoL6e006256; Thu, 13 Feb 2020 20:50:21 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002132050.01DKoL6e006256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 13 Feb 2020 20:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357882 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:50:22 -0000 Author: jeff Date: Thu Feb 13 20:50:21 2020 New Revision: 357882 URL: https://svnweb.freebsd.org/changeset/base/357882 Log: Add more precise SMR entry asserts. Modified: head/sys/kern/subr_smr.c head/sys/sys/smr.h Modified: head/sys/kern/subr_smr.c ============================================================================== --- head/sys/kern/subr_smr.c Thu Feb 13 20:49:45 2020 (r357881) +++ head/sys/kern/subr_smr.c Thu Feb 13 20:50:21 2020 (r357882) @@ -193,8 +193,7 @@ smr_advance(smr_t smr) /* * It is illegal to enter while in an smr section. */ - KASSERT(curthread->td_critnest == 0, - ("smr_advance: Not allowed in a critical section.")); + SMR_ASSERT_NOT_ENTERED(smr); /* * Modifications not done in a smr section need to be visible @@ -237,6 +236,8 @@ smr_advance_deferred(smr_t smr, int limit) smr_seq_t goal; smr_t csmr; + SMR_ASSERT_NOT_ENTERED(smr); + critical_enter(); csmr = zpcpu_get(smr); if (++csmr->c_deferred >= limit) { @@ -275,8 +276,8 @@ smr_poll(smr_t smr, smr_seq_t goal, bool wait) /* * It is illegal to enter while in an smr section. */ - KASSERT(!wait || curthread->td_critnest == 0, - ("smr_poll: Blocking not allowed in a critical section.")); + KASSERT(!wait || !SMR_ENTERED(smr), + ("smr_poll: Blocking not allowed in a SMR section.")); /* * Use a critical section so that we can avoid ABA races Modified: head/sys/sys/smr.h ============================================================================== --- head/sys/sys/smr.h Thu Feb 13 20:49:45 2020 (r357881) +++ head/sys/sys/smr.h Thu Feb 13 20:50:21 2020 (r357882) @@ -68,6 +68,15 @@ struct smr { int c_deferred; /* Deferred advance counter. */ }; +#define SMR_ENTERED(smr) \ + (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) + +#define SMR_ASSERT_ENTERED(smr) \ + KASSERT(SMR_ENTERED(smr), ("Not in smr section")) + +#define SMR_ASSERT_NOT_ENTERED(smr) \ + KASSERT(!SMR_ENTERED(smr), ("In smr section.")); + /* * Return the current write sequence number. */ From owner-svn-src-all@freebsd.org Thu Feb 13 20:58:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 250EE2355DB; Thu, 13 Feb 2020 20:58:52 +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) server-signature RSA-PSS (4096 bits) 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 48JTQ408Ykz4Z6N; Thu, 13 Feb 2020 20:58:52 +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 EFF3618BB3; Thu, 13 Feb 2020 20:58:51 +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 01DKwp41011902; Thu, 13 Feb 2020 20:58:51 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKwpeW011901; Thu, 13 Feb 2020 20:58:51 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002132058.01DKwpeW011901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 13 Feb 2020 20:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357883 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:58:52 -0000 Author: jeff Date: Thu Feb 13 20:58:51 2020 New Revision: 357883 URL: https://svnweb.freebsd.org/changeset/base/357883 Log: Fix a case where ub_seq would fail to be set if the cross bucket was flushed due to memory pressure. Reviewed by: markj Differential Revision: http://reviews.freebsd.org/D23614 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 13 20:50:21 2020 (r357882) +++ head/sys/vm/uma_core.c Thu Feb 13 20:58:51 2020 (r357883) @@ -553,12 +553,13 @@ zone_fetch_bucket(uma_zone_t zone, uma_zone_domain_t z if ((bucket = STAILQ_FIRST(&zdom->uzd_buckets)) == NULL) return (NULL); + /* SMR Buckets can not be re-used until readers expire. */ if ((zone->uz_flags & UMA_ZONE_SMR) != 0 && bucket->ub_seq != SMR_SEQ_INVALID) { if (!smr_poll(zone->uz_smr, bucket->ub_seq, false)) return (NULL); bucket->ub_seq = SMR_SEQ_INVALID; - dtor = (zone->uz_dtor != NULL) | UMA_ALWAYS_CTORDTOR; + dtor = (zone->uz_dtor != NULL) || UMA_ALWAYS_CTORDTOR; } MPASS(zdom->uzd_nitems >= bucket->ub_cnt); STAILQ_REMOVE_HEAD(&zdom->uzd_buckets, ub_link); @@ -678,6 +679,7 @@ cache_bucket_load(uma_cache_bucket_t bucket, uma_bucke CRITICAL_ASSERT(curthread); MPASS(bucket->ucb_bucket == NULL); + MPASS(b->ub_seq == SMR_SEQ_INVALID); bucket->ucb_bucket = b; bucket->ucb_cnt = b->ub_cnt; @@ -979,10 +981,10 @@ bucket_drain(uma_zone_t zone, uma_bucket_t bucket) if ((zone->uz_flags & UMA_ZONE_SMR) != 0 && bucket->ub_seq != SMR_SEQ_INVALID) { smr_wait(zone->uz_smr, bucket->ub_seq); + bucket->ub_seq = SMR_SEQ_INVALID; for (i = 0; i < bucket->ub_cnt; i++) item_dtor(zone, bucket->ub_bucket[i], zone->uz_size, NULL, SKIP_NONE); - bucket->ub_seq = SMR_SEQ_INVALID; } if (zone->uz_fini) for (i = 0; i < bucket->ub_cnt; i++) @@ -1014,6 +1016,7 @@ cache_drain(uma_zone_t zone) { uma_cache_t cache; uma_bucket_t bucket; + smr_seq_t seq; int cpu; /* @@ -1024,6 +1027,9 @@ cache_drain(uma_zone_t zone) * XXX: It would good to be able to assert that the zone is being * torn down to prevent improper use of cache_drain(). */ + seq = SMR_SEQ_INVALID; + if ((zone->uz_flags & UMA_ZONE_SMR) != 0) + seq = smr_current(zone->uz_smr); CPU_FOREACH(cpu) { cache = &zone->uz_cpu[cpu]; bucket = cache_bucket_unload_alloc(cache); @@ -1033,11 +1039,13 @@ cache_drain(uma_zone_t zone) } bucket = cache_bucket_unload_free(cache); if (bucket != NULL) { + bucket->ub_seq = seq; bucket_drain(zone, bucket); bucket_free(zone, bucket, NULL); } bucket = cache_bucket_unload_cross(cache); if (bucket != NULL) { + bucket->ub_seq = seq; bucket_drain(zone, bucket); bucket_free(zone, bucket, NULL); } @@ -1069,7 +1077,6 @@ cache_drain_safe_cpu(uma_zone_t zone, void *unused) return; b1 = b2 = b3 = NULL; - ZONE_LOCK(zone); critical_enter(); if (zone->uz_flags & UMA_ZONE_FIRSTTOUCH) domain = PCPU_GET(domain); @@ -1077,32 +1084,33 @@ cache_drain_safe_cpu(uma_zone_t zone, void *unused) domain = 0; cache = &zone->uz_cpu[curcpu]; b1 = cache_bucket_unload_alloc(cache); - if (b1 != NULL && b1->ub_cnt != 0) { - zone_put_bucket(zone, &zone->uz_domain[domain], b1, false); - b1 = NULL; - } /* * Don't flush SMR zone buckets. This leaves the zone without a * bucket and forces every free to synchronize(). */ - if ((zone->uz_flags & UMA_ZONE_SMR) != 0) - goto out; - b2 = cache_bucket_unload_free(cache); + if ((zone->uz_flags & UMA_ZONE_SMR) == 0) { + b2 = cache_bucket_unload_free(cache); + b3 = cache_bucket_unload_cross(cache); + } + critical_exit(); + + ZONE_LOCK(zone); + if (b1 != NULL && b1->ub_cnt != 0) { + zone_put_bucket(zone, &zone->uz_domain[domain], b1, false); + b1 = NULL; + } if (b2 != NULL && b2->ub_cnt != 0) { zone_put_bucket(zone, &zone->uz_domain[domain], b2, false); b2 = NULL; } - b3 = cache_bucket_unload_cross(cache); - -out: - critical_exit(); ZONE_UNLOCK(zone); - if (b1) + + if (b1 != NULL) bucket_free(zone, b1, NULL); - if (b2) + if (b2 != NULL) bucket_free(zone, b2, NULL); - if (b3) { + if (b3 != NULL) { bucket_drain(zone, b3); bucket_free(zone, b3, NULL); } @@ -4004,6 +4012,7 @@ zone_free_cross(uma_zone_t zone, uma_bucket_t bucket, struct uma_bucketlist fullbuckets; uma_zone_domain_t zdom; uma_bucket_t b; + smr_seq_t seq; void *item; int domain; @@ -4019,6 +4028,14 @@ zone_free_cross(uma_zone_t zone, uma_bucket_t bucket, * per-domain locking could be used if necessary. */ ZONE_CROSS_LOCK(zone); + + /* + * It is possible for buckets to arrive here out of order so we fetch + * the current smr seq rather than accepting the bucket's. + */ + seq = SMR_SEQ_INVALID; + if ((zone->uz_flags & UMA_ZONE_SMR) != 0) + seq = smr_current(zone->uz_smr); while (bucket->ub_cnt > 0) { item = bucket->ub_bucket[bucket->ub_cnt - 1]; domain = _vm_phys_domain(pmap_kextract((vm_offset_t)item)); @@ -4028,10 +4045,11 @@ zone_free_cross(uma_zone_t zone, uma_bucket_t bucket, if (zdom->uzd_cross == NULL) break; } - zdom->uzd_cross->ub_bucket[zdom->uzd_cross->ub_cnt++] = item; - if (zdom->uzd_cross->ub_cnt == zdom->uzd_cross->ub_entries) { - STAILQ_INSERT_HEAD(&fullbuckets, zdom->uzd_cross, - ub_link); + b = zdom->uzd_cross; + b->ub_bucket[b->ub_cnt++] = item; + b->ub_seq = seq; + if (b->ub_cnt == b->ub_entries) { + STAILQ_INSERT_HEAD(&fullbuckets, b, ub_link); zdom->uzd_cross = NULL; } bucket->ub_cnt--; @@ -4040,8 +4058,6 @@ zone_free_cross(uma_zone_t zone, uma_bucket_t bucket, if (!STAILQ_EMPTY(&fullbuckets)) { ZONE_LOCK(zone); while ((b = STAILQ_FIRST(&fullbuckets)) != NULL) { - if ((zone->uz_flags & UMA_ZONE_SMR) != 0) - bucket->ub_seq = smr_current(zone->uz_smr); STAILQ_REMOVE_HEAD(&fullbuckets, ub_link); if (zone->uz_bkt_count >= zone->uz_bkt_max) { ZONE_UNLOCK(zone); From owner-svn-src-all@freebsd.org Thu Feb 13 21:10:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25D292359E4; Thu, 13 Feb 2020 21:10:18 +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) server-signature RSA-PSS (4096 bits) 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 48JTgF70PNz4Zjc; Thu, 13 Feb 2020 21:10:17 +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 E6D6F18D89; Thu, 13 Feb 2020 21:10:17 +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 01DLAHqw017954; Thu, 13 Feb 2020 21:10:17 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DLAHiv017953; Thu, 13 Feb 2020 21:10:17 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <202002132110.01DLAHiv017953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 13 Feb 2020 21:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357884 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 21:10:18 -0000 Author: jeff Date: Thu Feb 13 21:10:17 2020 New Revision: 357884 URL: https://svnweb.freebsd.org/changeset/base/357884 Log: Since r357804 pcpu zones are required to use zalloc_pcpu(). Prior to this it was only required if you were zeroing. Switch to these interfaces. Reviewed by: mjg Modified: head/sys/kern/subr_smr.c Modified: head/sys/kern/subr_smr.c ============================================================================== --- head/sys/kern/subr_smr.c Thu Feb 13 20:58:51 2020 (r357883) +++ head/sys/kern/subr_smr.c Thu Feb 13 21:10:17 2020 (r357884) @@ -414,7 +414,7 @@ smr_create(const char *name) int i; s = uma_zalloc(smr_shared_zone, M_WAITOK); - smr = uma_zalloc(smr_zone, M_WAITOK); + smr = uma_zalloc_pcpu(smr_zone, M_WAITOK); s->s_name = name; s->s_rd_seq = s->s_wr_seq = SMR_SEQ_INIT; @@ -436,7 +436,7 @@ smr_destroy(smr_t smr) smr_synchronize(smr); uma_zfree(smr_shared_zone, smr->c_shared); - uma_zfree(smr_zone, smr); + uma_zfree_pcpu(smr_zone, smr); } /* From owner-svn-src-all@freebsd.org Thu Feb 13 21:33:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E19C1236A14; Thu, 13 Feb 2020 21:33:31 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48JVB34bspz4c9W; Thu, 13 Feb 2020 21:33:31 +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 01DLXMdn099054 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 13 Feb 2020 23:33:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01DLXMdn099054 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01DLXM84099053; Thu, 13 Feb 2020 23:33:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Feb 2020 23:33:22 +0200 From: Konstantin Belousov To: Li-Wen Hsu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357867 - head/tests/sys/net Message-ID: <20200213213322.GL4808@kib.kiev.ua> References: <202002131905.01DJ5Ja6044695@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002131905.01DJ5Ja6044695@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: 48JVB34bspz4c9W X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 21:33:31 -0000 On Thu, Feb 13, 2020 at 07:05:19PM +0000, Li-Wen Hsu wrote: > Author: lwhsu > Date: Thu Feb 13 19:05:19 2020 > New Revision: 357867 > URL: https://svnweb.freebsd.org/changeset/base/357867 > > Log: > Fix GCC build. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/tests/sys/net/randsleep.c > > Modified: head/tests/sys/net/randsleep.c > ============================================================================== > --- head/tests/sys/net/randsleep.c Thu Feb 13 19:05:14 2020 (r357866) > +++ head/tests/sys/net/randsleep.c Thu Feb 13 19:05:19 2020 (r357867) > @@ -37,7 +37,7 @@ > #include > #include > > -#define RANDOM_MAX ((1<<31) - 1) > +#define RANDOM_MAX (((long)1<<31) - 1) This still gives UB on ILP32 platforms. I believe the better fix would be (1u << 31) - 1. > > int main(int argc, char** argv){ > useconds_t max_usecs, usecs; From owner-svn-src-all@freebsd.org Thu Feb 13 21:49:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACD60237270; Thu, 13 Feb 2020 21:49:14 +0000 (UTC) (envelope-from rpokala@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) server-signature RSA-PSS (4096 bits) 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 48JVXB45n9z4cyt; Thu, 13 Feb 2020 21:49:14 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.228] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id C3BA85C61; Thu, 13 Feb 2020 21:49:13 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.22.0.200209 Date: Thu, 13 Feb 2020 13:49:09 -0800 Subject: Re: svn commit: r357865 - in head/sys/amd64/vmm: . io From: Ravi Pokala To: Konstantin Belousov , , , Message-ID: <5C7C143D-5F7E-4B5E-933F-6AFD0C37BD88@panasas.com> Thread-Topic: svn commit: r357865 - in head/sys/amd64/vmm: . io References: <202002131903.01DJ3DDN044487@repo.freebsd.org> In-Reply-To: <202002131903.01DJ3DDN044487@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 21:49:14 -0000 Why "svm"? -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Konstantin Belousov <= kib@FreeBSD.org> Date: 2020-02-13, Thursday at 11:03 To: , , Subject: svn commit: r357865 - in head/sys/amd64/vmm: . io Author: kib Date: Thu Feb 13 19:03:12 2020 New Revision: 357865 URL: https://svnweb.freebsd.org/changeset/base/357865 =20 Log: vmm: Add Hygon Dhyana support. =20 Submitted by: Pu Wen Discussed with: grehan Reviewed by: jhb (previous version) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23553 =20 Modified: head/sys/amd64/vmm/io/iommu.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_util.c head/sys/amd64/vmm/vmm_util.h head/sys/amd64/vmm/x86.c =20 Modified: head/sys/amd64/vmm/io/iommu.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/amd64/vmm/io/iommu.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/io/iommu.c Thu Feb 13 19:03:12 2020 (r357865) @@ -184,7 +184,7 @@ iommu_init(void) =20 if (vmm_is_intel()) ops =3D &iommu_ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops =3D &iommu_ops_amd; else ops =3D NULL; =20 Modified: head/sys/amd64/vmm/vmm.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/amd64/vmm/vmm.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm.c Thu Feb 13 19:03:12 2020 (r357865) @@ -347,7 +347,7 @@ vmm_init(void) if (vmm_is_intel()) ops =3D &vmm_ops_intel; - else if (vmm_is_amd()) + else if (vmm_is_svm()) ops =3D &vmm_ops_amd; else return (ENXIO); =20 Modified: head/sys/amd64/vmm/vmm_stat.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/amd64/vmm/vmm_stat.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 19:03:12 2020 (r357865) @@ -67,7 +67,7 @@ vmm_stat_register(void *arg) if (vst->scope =3D=3D VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) return; =20 - if (vst->scope =3D=3D VMM_STAT_SCOPE_AMD && !vmm_is_amd()) + if (vst->scope =3D=3D VMM_STAT_SCOPE_AMD && !vmm_is_svm()) return; =20 if (vst_num_elems + vst->nelems >=3D MAX_VMM_STAT_ELEMS) { =20 Modified: head/sys/amd64/vmm/vmm_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/sys/amd64/vmm/vmm_util.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_util.c Thu Feb 13 19:03:12 2020 (r357865) @@ -46,9 +46,10 @@ vmm_is_intel(void) } =20 bool -vmm_is_amd(void) +vmm_is_svm(void) { - return (strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0); + return (strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0 || + strcmp(cpu_vendor, "HygonGenuine") =3D=3D 0); } =20 bool =20 Modified: head/sys/amd64/vmm/vmm_util.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/sys/amd64/vmm/vmm_util.h Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/vmm_util.h Thu Feb 13 19:03:12 2020 (r357865) @@ -34,7 +34,7 @@ struct trapframe; =20 bool vmm_is_intel(void); -bool vmm_is_amd(void); +bool vmm_is_svm(void); bool vmm_supports_1G_pages(void); =20 void dump_trapframe(struct trapframe *tf); =20 Modified: head/sys/amd64/vmm/x86.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/amd64/vmm/x86.c Thu Feb 13 18:37:17 2020 (r357864) +++ head/sys/amd64/vmm/x86.c Thu Feb 13 19:03:12 2020 (r357865) @@ -135,7 +135,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); - if (vmm_is_amd()) { + if (vmm_is_svm()) { /* * As on Intel (0000_0007:0, EDX), mask out * unsupported or unsafe AMD extended features @@ -234,7 +234,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, =20 case CPUID_8000_001D: /* AMD Cache topology, like 0000_0004 for Intel. */ - if (!vmm_is_amd()) + if (!vmm_is_svm()) goto default_leaf; =20 /* @@ -276,8 +276,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; =20 case CPUID_8000_001E: - /* AMD Family 16h+ additional identifiers */ - if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) + /* + * AMD Family 16h+ and Hygon Family 18h additional + * identifiers. + */ + if (!vmm_is_svm() || CPUID_TO_FAMILY(cpu_id) < 0x16) goto default_leaf; =20 vm_get_topology(vm, &sockets, &cores, &threads, =20 From owner-svn-src-all@freebsd.org Thu Feb 13 22:09:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5A0F2379AC; Thu, 13 Feb 2020 22:09:02 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48JVz23Snvz4f4C; Thu, 13 Feb 2020 22:09:02 +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 01DM8s6B007136 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 14 Feb 2020 00:08:57 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01DM8s6B007136 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01DM8r1W007135; Fri, 14 Feb 2020 00:08:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 14 Feb 2020 00:08:53 +0200 From: Konstantin Belousov To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357865 - in head/sys/amd64/vmm: . io Message-ID: <20200213220853.GM4808@kib.kiev.ua> References: <202002131903.01DJ3DDN044487@repo.freebsd.org> <5C7C143D-5F7E-4B5E-933F-6AFD0C37BD88@panasas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5C7C143D-5F7E-4B5E-933F-6AFD0C37BD88@panasas.com> 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: 48JVz23Snvz4f4C X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:09:02 -0000 On Thu, Feb 13, 2020 at 01:49:09PM -0800, Ravi Pokala wrote: > Why "svm"? Because this is how AMD calls its virtualization extensions. Secure Virtual Machine. > > -Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Konstantin Belousov > Date: 2020-02-13, Thursday at 11:03 > To: , , > Subject: svn commit: r357865 - in head/sys/amd64/vmm: . io > > Author: kib > Date: Thu Feb 13 19:03:12 2020 > New Revision: 357865 > URL: https://svnweb.freebsd.org/changeset/base/357865 > > Log: > vmm: Add Hygon Dhyana support. > > Submitted by: Pu Wen > Discussed with: grehan > Reviewed by: jhb (previous version) > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D23553 > > Modified: > head/sys/amd64/vmm/io/iommu.c > head/sys/amd64/vmm/vmm.c > head/sys/amd64/vmm/vmm_stat.c > head/sys/amd64/vmm/vmm_util.c > head/sys/amd64/vmm/vmm_util.h > head/sys/amd64/vmm/x86.c > > Modified: head/sys/amd64/vmm/io/iommu.c > ============================================================================== > --- head/sys/amd64/vmm/io/iommu.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/io/iommu.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -184,7 +184,7 @@ iommu_init(void) > > if (vmm_is_intel()) > ops = &iommu_ops_intel; > - else if (vmm_is_amd()) > + else if (vmm_is_svm()) > ops = &iommu_ops_amd; > else > ops = NULL; > > Modified: head/sys/amd64/vmm/vmm.c > ============================================================================== > --- head/sys/amd64/vmm/vmm.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/vmm.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -347,7 +347,7 @@ vmm_init(void) > > if (vmm_is_intel()) > ops = &vmm_ops_intel; > - else if (vmm_is_amd()) > + else if (vmm_is_svm()) > ops = &vmm_ops_amd; > else > return (ENXIO); > > Modified: head/sys/amd64/vmm/vmm_stat.c > ============================================================================== > --- head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -67,7 +67,7 @@ vmm_stat_register(void *arg) > if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) > return; > > - if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) > + if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_svm()) > return; > > if (vst_num_elems + vst->nelems >= MAX_VMM_STAT_ELEMS) { > > Modified: head/sys/amd64/vmm/vmm_util.c > ============================================================================== > --- head/sys/amd64/vmm/vmm_util.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/vmm_util.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -46,9 +46,10 @@ vmm_is_intel(void) > } > > bool > -vmm_is_amd(void) > +vmm_is_svm(void) > { > - return (strcmp(cpu_vendor, "AuthenticAMD") == 0); > + return (strcmp(cpu_vendor, "AuthenticAMD") == 0 || > + strcmp(cpu_vendor, "HygonGenuine") == 0); > } > > bool > > Modified: head/sys/amd64/vmm/vmm_util.h > ============================================================================== > --- head/sys/amd64/vmm/vmm_util.h Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/vmm_util.h Thu Feb 13 19:03:12 2020 (r357865) > @@ -34,7 +34,7 @@ > struct trapframe; > > bool vmm_is_intel(void); > -bool vmm_is_amd(void); > +bool vmm_is_svm(void); > bool vmm_supports_1G_pages(void); > > void dump_trapframe(struct trapframe *tf); > > Modified: head/sys/amd64/vmm/x86.c > ============================================================================== > --- head/sys/amd64/vmm/x86.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/x86.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -135,7 +135,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > break; > case CPUID_8000_0008: > cpuid_count(*eax, *ecx, regs); > - if (vmm_is_amd()) { > + if (vmm_is_svm()) { > /* > * As on Intel (0000_0007:0, EDX), mask out > * unsupported or unsafe AMD extended features > @@ -234,7 +234,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > > case CPUID_8000_001D: > /* AMD Cache topology, like 0000_0004 for Intel. */ > - if (!vmm_is_amd()) > + if (!vmm_is_svm()) > goto default_leaf; > > /* > @@ -276,8 +276,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > break; > > case CPUID_8000_001E: > - /* AMD Family 16h+ additional identifiers */ > - if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) > + /* > + * AMD Family 16h+ and Hygon Family 18h additional > + * identifiers. > + */ > + if (!vmm_is_svm() || CPUID_TO_FAMILY(cpu_id) < 0x16) > goto default_leaf; > > vm_get_topology(vm, &sockets, &cores, &threads, > > > From owner-svn-src-all@freebsd.org Thu Feb 13 22:16:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C240237C79; Thu, 13 Feb 2020 22:16:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JW770t6tz4fTm; Thu, 13 Feb 2020 22:16:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1952E19B0D; Thu, 13 Feb 2020 22:16:03 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DMG2r6059674; Thu, 13 Feb 2020 22:16:02 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMG2gw059673; Thu, 13 Feb 2020 22:16:02 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002132216.01DMG2gw059673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Feb 2020 22:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357885 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:16:03 -0000 Author: mjg Date: Thu Feb 13 22:16:02 2020 New Revision: 357885 URL: https://svnweb.freebsd.org/changeset/base/357885 Log: Annotate suser_enabled as __read_mostly It is read a lot in priv code. Modified: head/sys/kern/kern_priv.c Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Thu Feb 13 21:10:17 2020 (r357884) +++ head/sys/kern/kern_priv.c Thu Feb 13 22:16:02 2020 (r357885) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); * userland programs, and should not be done without careful consideration of * the consequences. */ -static int suser_enabled = 1; +static int __read_mostly suser_enabled = 1; SYSCTL_INT(_security_bsd, OID_AUTO, suser_enabled, CTLFLAG_RWTUN, &suser_enabled, 0, "processes with uid 0 have privilege"); From owner-svn-src-all@freebsd.org Thu Feb 13 22:16:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F0F0237D14; Thu, 13 Feb 2020 22:16:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JW7g0xLTz4fcP; Thu, 13 Feb 2020 22:16:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B91C19B0F; Thu, 13 Feb 2020 22:16:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DMGUil059744; Thu, 13 Feb 2020 22:16:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMGU1h059742; Thu, 13 Feb 2020 22:16:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002132216.01DMGU1h059742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Feb 2020 22:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357886 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:16:31 -0000 Author: mjg Date: Thu Feb 13 22:16:30 2020 New Revision: 357886 URL: https://svnweb.freebsd.org/changeset/base/357886 Log: Inline jailed(). It is constantly called from priv_check. Modified: head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Feb 13 22:16:02 2020 (r357885) +++ head/sys/kern/kern_jail.c Thu Feb 13 22:16:30 2020 (r357886) @@ -2821,16 +2821,6 @@ prison_ischild(struct prison *pr1, struct prison *pr2) } /* - * Return 1 if the passed credential is in a jail, otherwise 0. - */ -int -jailed(struct ucred *cred) -{ - - return (cred->cr_prison != &prison0); -} - -/* * Return 1 if the passed credential is in a jail and that jail does not * have its own virtual network stack, otherwise 0. */ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Thu Feb 13 22:16:02 2020 (r357885) +++ head/sys/sys/jail.h Thu Feb 13 22:16:30 2020 (r357886) @@ -369,7 +369,12 @@ struct mount; struct sockaddr; struct statfs; struct vfsconf; -int jailed(struct ucred *cred); + +/* + * Return 1 if the passed credential is in a jail, otherwise 0. + */ +#define jailed(cred) (cred->cr_prison != &prison0) + int jailed_without_vnet(struct ucred *); void getcredhostname(struct ucred *, char *, size_t); void getcreddomainname(struct ucred *, char *, size_t); From owner-svn-src-all@freebsd.org Thu Feb 13 22:19:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA5B3237E35; Thu, 13 Feb 2020 22:19:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JWBt4Xphz4fmP; Thu, 13 Feb 2020 22:19:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9674119B14; Thu, 13 Feb 2020 22:19:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DMJIYs059921; Thu, 13 Feb 2020 22:19:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMJIq4059919; Thu, 13 Feb 2020 22:19:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002132219.01DMJIq4059919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Feb 2020 22:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357887 - head/sys/security/mac X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/security/mac X-SVN-Commit-Revision: 357887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:19:18 -0000 Author: mjg Date: Thu Feb 13 22:19:17 2020 New Revision: 357887 URL: https://svnweb.freebsd.org/changeset/base/357887 Log: mac: implement fast path for checks All checking routines walk a linked list of all modules in order to determine if given hook is installed. This became a significant problem after mac_ntpd started being loaded by default. Implement a way perform checks for select hooks by testing a boolean. Use it for priv_check and priv_grant, which are constantly called from priv_check. The real fix would use hotpatching, but the above provides a way to know when to do it. Modified: head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_framework.h head/sys/security/mac/mac_priv.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Thu Feb 13 22:16:30 2020 (r357886) +++ head/sys/security/mac/mac_framework.c Thu Feb 13 22:19:17 2020 (r357887) @@ -118,6 +118,17 @@ SYSCTL_UINT(_security_mac, OID_AUTO, version, CTLFLAG_ ""); /* + * Flags for inlined checks. + */ +#define FPFLAG(f) \ +bool __read_frequently mac_##f##_fp_flag + +FPFLAG(priv_check); +FPFLAG(priv_grant); + +#undef FPFLAG + +/* * Labels consist of a indexed set of "slots", which are allocated policies * as required. The MAC Framework maintains a bitmask of slots allocated so * far to prevent reuse. Slots cannot be reused, as the MAC Framework @@ -376,6 +387,84 @@ mac_policy_update(void) } } +/* + * There are frequently used code paths which check for rarely installed + * policies. Gross hack below enables doing it in a cheap manner. + */ + +#define FPO(f) (offsetof(struct mac_policy_ops, mpo_##f) / sizeof(uintptr_t)) + +struct mac_policy_fastpath_elem { + int count; + bool *flag; + size_t offset; +}; + +struct mac_policy_fastpath_elem mac_policy_fastpath_array[] = { + { .offset = FPO(priv_check), .flag = &mac_priv_check_fp_flag }, + { .offset = FPO(priv_grant), .flag = &mac_priv_grant_fp_flag }, +}; + +static void +mac_policy_fastpath_enable(struct mac_policy_fastpath_elem *mpfe) +{ + + MPASS(mpfe->count >= 0); + mpfe->count++; + if (mpfe->count == 1) { + MPASS(*mpfe->flag == false); + *mpfe->flag = true; + } +} + +static void +mac_policy_fastpath_disable(struct mac_policy_fastpath_elem *mpfe) +{ + + MPASS(mpfe->count >= 1); + mpfe->count--; + if (mpfe->count == 0) { + MPASS(*mpfe->flag == true); + *mpfe->flag = false; + } +} + +static void +mac_policy_fastpath_register(struct mac_policy_conf *mpc) +{ + struct mac_policy_fastpath_elem *mpfe; + uintptr_t **ops; + int i; + + mac_policy_xlock_assert(); + + ops = (uintptr_t **)mpc->mpc_ops; + for (i = 0; i < nitems(mac_policy_fastpath_array); i++) { + mpfe = &mac_policy_fastpath_array[i]; + if (ops[mpfe->offset] != NULL) + mac_policy_fastpath_enable(mpfe); + } +} + +static void +mac_policy_fastpath_unregister(struct mac_policy_conf *mpc) +{ + struct mac_policy_fastpath_elem *mpfe; + uintptr_t **ops; + int i; + + mac_policy_xlock_assert(); + + ops = (uintptr_t **)mpc->mpc_ops; + for (i = 0; i < nitems(mac_policy_fastpath_array); i++) { + mpfe = &mac_policy_fastpath_array[i]; + if (ops[mpfe->offset] != NULL) + mac_policy_fastpath_disable(mpfe); + } +} + +#undef FPO + static int mac_policy_register(struct mac_policy_conf *mpc) { @@ -446,6 +535,9 @@ mac_policy_register(struct mac_policy_conf *mpc) */ if (mpc->mpc_ops->mpo_init != NULL) (*(mpc->mpc_ops->mpo_init))(mpc); + + mac_policy_fastpath_register(mpc); + mac_policy_update(); SDT_PROBE1(mac, , policy, register, mpc); @@ -487,6 +579,9 @@ mac_policy_unregister(struct mac_policy_conf *mpc) mac_policy_xunlock(); return (EBUSY); } + + mac_policy_fastpath_unregister(mpc); + if (mpc->mpc_ops->mpo_destroy != NULL) (*(mpc->mpc_ops->mpo_destroy))(mpc); Modified: head/sys/security/mac/mac_framework.h ============================================================================== --- head/sys/security/mac/mac_framework.h Thu Feb 13 22:16:30 2020 (r357886) +++ head/sys/security/mac/mac_framework.h Thu Feb 13 22:19:17 2020 (r357887) @@ -258,8 +258,27 @@ void mac_posixshm_create(struct ucred *cred, struct s void mac_posixshm_destroy(struct shmfd *); void mac_posixshm_init(struct shmfd *); -int mac_priv_check(struct ucred *cred, int priv); -int mac_priv_grant(struct ucred *cred, int priv); +int mac_priv_check_impl(struct ucred *cred, int priv); +extern bool mac_priv_check_fp_flag; +static inline int +mac_priv_check(struct ucred *cred, int priv) +{ + + if (__predict_false(mac_priv_check_fp_flag)) + return (mac_priv_check_impl(cred, priv)); + return (0); +} + +int mac_priv_grant_impl(struct ucred *cred, int priv); +extern bool mac_priv_grant_fp_flag; +static inline int +mac_priv_grant(struct ucred *cred, int priv) +{ + + if (__predict_false(mac_priv_grant_fp_flag)) + return (mac_priv_grant_impl(cred, priv)); + return (EPERM); +} int mac_proc_check_debug(struct ucred *cred, struct proc *p); int mac_proc_check_sched(struct ucred *cred, struct proc *p); Modified: head/sys/security/mac/mac_priv.c ============================================================================== --- head/sys/security/mac/mac_priv.c Thu Feb 13 22:16:30 2020 (r357886) +++ head/sys/security/mac/mac_priv.c Thu Feb 13 22:19:17 2020 (r357887) @@ -67,7 +67,7 @@ MAC_CHECK_PROBE_DEFINE2(priv_check, "struct ucred *", * policy denies access. */ int -mac_priv_check(struct ucred *cred, int priv) +mac_priv_check_impl(struct ucred *cred, int priv) { int error; @@ -84,7 +84,7 @@ MAC_GRANT_PROBE_DEFINE2(priv_grant, "struct ucred *", * policy grants access. */ int -mac_priv_grant(struct ucred *cred, int priv) +mac_priv_grant_impl(struct ucred *cred, int priv) { int error; From owner-svn-src-all@freebsd.org Thu Feb 13 22:22:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B27192381B6; Thu, 13 Feb 2020 22:22:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JWGJ4B98z4gFw; Thu, 13 Feb 2020 22:22:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AC9419CE7; Thu, 13 Feb 2020 22:22:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DMMGAH063178; Thu, 13 Feb 2020 22:22:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMMF3d063173; Thu, 13 Feb 2020 22:22:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002132222.01DMMF3d063173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Feb 2020 22:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357888 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:22:16 -0000 Author: mjg Date: Thu Feb 13 22:22:15 2020 New Revision: 357888 URL: https://svnweb.freebsd.org/changeset/base/357888 Log: Partially decompose priv_check by adding priv_check_cred_vfs_generation During buildkernel there are very frequent calls to priv_check and they all are for PRIV_VFS_GENERATION (coming from stat/fstat). This results in branching on several potential privileges checking if perhaps that's the one which has to be evaluated. Instead of the kitchen-sink approach provide a way to have commonly used privs directly evaluated. Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_priv.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/sys/priv.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Feb 13 22:19:17 2020 (r357887) +++ head/sys/kern/kern_jail.c Thu Feb 13 22:22:15 2020 (r357888) @@ -2998,6 +2998,16 @@ int prison_priv_check(struct ucred *cred, int priv) { + /* + * Some policies have custom handlers. This routine should not be + * called for them. See priv_check_cred(). + */ + switch (priv) { + case PRIV_VFS_GENERATION: + KASSERT(0, ("prison_priv_check instead of a custom handler " + "called for %d\n", priv)); + } + if (!jailed(cred)) return (0); Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Thu Feb 13 22:19:17 2020 (r357887) +++ head/sys/kern/kern_priv.c Thu Feb 13 22:22:15 2020 (r357888) @@ -71,6 +71,51 @@ SDT_PROVIDER_DEFINE(priv); SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__ok, "int"); SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__err, "int"); +static __always_inline int +priv_check_cred_pre(struct ucred *cred, int priv) +{ + int error; + +#ifdef MAC + error = mac_priv_check(cred, priv); +#else + error = 0; +#endif + return (error); +} + +static __always_inline int +priv_check_cred_post(struct ucred *cred, int priv, int error, bool handled) +{ + + if (__predict_true(handled)) + goto out; + /* + * Now check with MAC, if enabled, to see if a policy module grants + * privilege. + */ +#ifdef MAC + if (mac_priv_grant(cred, priv) == 0) { + error = 0; + goto out; + } +#endif + + /* + * The default is deny, so if no policies have granted it, reject + * with a privilege error here. + */ + error = EPERM; +out: + if (SDT_PROBES_ENABLED()) { + if (error) + SDT_PROBE1(priv, kernel, priv_check, priv__err, priv); + else + SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv); + } + return (error); +} + /* * Check a credential for privilege. Lots of good reasons to deny privilege; * only a few to grant it. @@ -83,15 +128,18 @@ priv_check_cred(struct ucred *cred, int priv) KASSERT(PRIV_VALID(priv), ("priv_check_cred: invalid privilege %d", priv)); + switch (priv) { + case PRIV_VFS_GENERATION: + return (priv_check_cred_vfs_generation(cred)); + } + /* * We first evaluate policies that may deny the granting of * privilege unilaterally. */ -#ifdef MAC - error = mac_priv_check(cred, priv); + error = priv_check_cred_pre(cred, priv); if (error) goto out; -#endif /* * Jail policy will restrict certain privileges that may otherwise be @@ -177,30 +225,9 @@ priv_check_cred(struct ucred *cred, int priv) } } - /* - * Now check with MAC, if enabled, to see if a policy module grants - * privilege. - */ -#ifdef MAC - if (mac_priv_grant(cred, priv) == 0) { - error = 0; - goto out; - } -#endif - - /* - * The default is deny, so if no policies have granted it, reject - * with a privilege error here. - */ - error = EPERM; + return (priv_check_cred_post(cred, priv, error, false)); out: - if (SDT_PROBES_ENABLED()) { - if (error) - SDT_PROBE1(priv, kernel, priv_check, priv__err, priv); - else - SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv); - } - return (error); + return (priv_check_cred_post(cred, priv, error, true)); } int @@ -210,4 +237,29 @@ priv_check(struct thread *td, int priv) KASSERT(td == curthread, ("priv_check: td != curthread")); return (priv_check_cred(td->td_ucred, priv)); +} + +int +priv_check_cred_vfs_generation(struct ucred *cred) +{ + int error; + + error = priv_check_cred_pre(cred, PRIV_VFS_GENERATION); + if (error) + goto out; + + if (jailed(cred)) { + error = EPERM; + goto out; + } + + if (cred->cr_uid == 0 && suser_enabled) { + error = 0; + goto out; + } + + return (priv_check_cred_post(cred, PRIV_VFS_GENERATION, error, false)); +out: + return (priv_check_cred_post(cred, PRIV_VFS_GENERATION, error, true)); + } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Feb 13 22:19:17 2020 (r357887) +++ head/sys/kern/vfs_syscalls.c Thu Feb 13 22:22:15 2020 (r357888) @@ -273,7 +273,7 @@ kern_do_statfs(struct thread *td, struct mount *mp, st error = VFS_STATFS(mp, buf); if (error != 0) goto out; - if (priv_check(td, PRIV_VFS_GENERATION)) { + if (priv_check_cred_vfs_generation(td->td_ucred)) { buf->f_fsid.val[0] = buf->f_fsid.val[1] = 0; prison_enforce_statfs(td->td_ucred, mp, buf); } @@ -488,7 +488,7 @@ restart: continue; } } - if (priv_check(td, PRIV_VFS_GENERATION)) { + if (priv_check_cred_vfs_generation(td->td_ucred)) { sptmp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); *sptmp = *sp; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Feb 13 22:19:17 2020 (r357887) +++ head/sys/kern/vfs_vnops.c Thu Feb 13 22:22:15 2020 (r357888) @@ -1477,7 +1477,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucre sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; - if (priv_check(td, PRIV_VFS_GENERATION)) + if (priv_check_cred_vfs_generation(td->td_ucred)) sb->st_gen = 0; else sb->st_gen = vap->va_gen; Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Thu Feb 13 22:19:17 2020 (r357887) +++ head/sys/sys/priv.h Thu Feb 13 22:22:15 2020 (r357888) @@ -533,6 +533,7 @@ struct thread; struct ucred; int priv_check(struct thread *td, int priv); int priv_check_cred(struct ucred *cred, int priv); +int priv_check_cred_vfs_generation(struct ucred *cred); #endif #endif /* !_SYS_PRIV_H_ */ From owner-svn-src-all@freebsd.org Thu Feb 13 22:22:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 968A0238275; Thu, 13 Feb 2020 22:22:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JWH43QPdz3Bpf; Thu, 13 Feb 2020 22:22:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 709A019D02; Thu, 13 Feb 2020 22:22:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DMMuJv065722; Thu, 13 Feb 2020 22:22:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMMtuF065718; Thu, 13 Feb 2020 22:22:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002132222.01DMMtuF065718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 13 Feb 2020 22:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357889 - in head/sys: kern security/mac X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/mac X-SVN-Commit-Revision: 357889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:22:56 -0000 Author: mjg Date: Thu Feb 13 22:22:55 2020 New Revision: 357889 URL: https://svnweb.freebsd.org/changeset/base/357889 Log: vfs: use mac fastpath for lookup, open, read, write, mmap Modified: head/sys/kern/vfs_lookup.c head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_framework.h head/sys/security/mac/mac_vfs.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Feb 13 22:22:15 2020 (r357888) +++ head/sys/kern/vfs_lookup.c Thu Feb 13 22:22:55 2020 (r357889) @@ -932,12 +932,9 @@ dirloop: */ unionlookup: #ifdef MAC - if ((cnp->cn_flags & NOMACCHECK) == 0) { - error = mac_vnode_check_lookup(cnp->cn_thread->td_ucred, dp, - cnp); - if (error) - goto bad; - } + error = mac_vnode_check_lookup(cnp->cn_thread->td_ucred, dp, cnp); + if (error) + goto bad; #endif ndp->ni_dvp = dp; ndp->ni_vp = NULL; Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Thu Feb 13 22:22:15 2020 (r357888) +++ head/sys/security/mac/mac_framework.c Thu Feb 13 22:22:55 2020 (r357889) @@ -125,6 +125,12 @@ bool __read_frequently mac_##f##_fp_flag FPFLAG(priv_check); FPFLAG(priv_grant); +FPFLAG(vnode_check_lookup); +FPFLAG(vnode_check_open); +FPFLAG(vnode_check_stat); +FPFLAG(vnode_check_read); +FPFLAG(vnode_check_write); +FPFLAG(vnode_check_mmap); #undef FPFLAG @@ -403,6 +409,18 @@ struct mac_policy_fastpath_elem { struct mac_policy_fastpath_elem mac_policy_fastpath_array[] = { { .offset = FPO(priv_check), .flag = &mac_priv_check_fp_flag }, { .offset = FPO(priv_grant), .flag = &mac_priv_grant_fp_flag }, + { .offset = FPO(vnode_check_lookup), + .flag = &mac_vnode_check_lookup_fp_flag }, + { .offset = FPO(vnode_check_open), + .flag = &mac_vnode_check_open_fp_flag }, + { .offset = FPO(vnode_check_stat), + .flag = &mac_vnode_check_stat_fp_flag }, + { .offset = FPO(vnode_check_read), + .flag = &mac_vnode_check_read_fp_flag }, + { .offset = FPO(vnode_check_write), + .flag = &mac_vnode_check_write_fp_flag }, + { .offset = FPO(vnode_check_mmap), + .flag = &mac_vnode_check_mmap_fp_flag }, }; static void Modified: head/sys/security/mac/mac_framework.h ============================================================================== --- head/sys/security/mac/mac_framework.h Thu Feb 13 22:22:15 2020 (r357888) +++ head/sys/security/mac/mac_framework.h Thu Feb 13 22:22:55 2020 (r357889) @@ -390,6 +390,12 @@ void mac_sysvshm_init(struct shmid_kernel *); void mac_thread_userret(struct thread *td); +#ifdef DEBUG_VFS_LOCKS +void mac_vnode_assert_locked(struct vnode *vp, const char *func); +#else +#define mac_vnode_assert_locked(vp, func) do { } while (0) +#endif + int mac_vnode_associate_extattr(struct mount *mp, struct vnode *vp); void mac_vnode_associate_singlelabel(struct mount *mp, struct vnode *vp); int mac_vnode_check_access(struct ucred *cred, struct vnode *vp, @@ -412,18 +418,53 @@ int mac_vnode_check_link(struct ucred *cred, struct vn struct vnode *vp, struct componentname *cnp); int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, int attrnamespace); -int mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, + +int mac_vnode_check_lookup_impl(struct ucred *cred, struct vnode *dvp, struct componentname *cnp); -int mac_vnode_check_mmap(struct ucred *cred, struct vnode *vp, int prot, +extern bool mac_vnode_check_lookup_fp_flag; +static inline int +mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, + struct componentname *cnp) +{ + + mac_vnode_assert_locked(dvp, "mac_vnode_check_lookup"); + if (__predict_false(mac_vnode_check_lookup_fp_flag)) + return (mac_vnode_check_lookup_impl(cred, dvp, cnp)); + return (0); +} + +int mac_vnode_check_mmap_impl(struct ucred *cred, struct vnode *vp, int prot, int flags); +extern bool mac_vnode_check_mmap_fp_flag; +static inline int +mac_vnode_check_mmap(struct ucred *cred, struct vnode *vp, int prot, + int flags) +{ + + mac_vnode_assert_locked(vp, "mac_vnode_check_mmap"); + if (__predict_false(mac_vnode_check_mmap_fp_flag)) + return (mac_vnode_check_mmap_impl(cred, vp, prot, flags)); + return (0); +} + +int mac_vnode_check_open_impl(struct ucred *cred, struct vnode *vp, + accmode_t accmode); +extern bool mac_vnode_check_open_fp_flag; +static inline int +mac_vnode_check_open(struct ucred *cred, struct vnode *vp, + accmode_t accmode) +{ + + mac_vnode_assert_locked(vp, "mac_vnode_check_open"); + if (__predict_false(mac_vnode_check_open_fp_flag)) + return (mac_vnode_check_open_impl(cred, vp, accmode)); + return (0); +} + int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot); -int mac_vnode_check_open(struct ucred *cred, struct vnode *vp, - accmode_t accmode); int mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); -int mac_vnode_check_read(struct ucred *active_cred, - struct ucred *file_cred, struct vnode *vp); int mac_vnode_check_readdir(struct ucred *cred, struct vnode *vp); int mac_vnode_check_readlink(struct ucred *cred, struct vnode *vp); int mac_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, @@ -443,12 +484,51 @@ int mac_vnode_check_setowner(struct ucred *cred, struc uid_t uid, gid_t gid); int mac_vnode_check_setutimes(struct ucred *cred, struct vnode *vp, struct timespec atime, struct timespec mtime); -int mac_vnode_check_stat(struct ucred *active_cred, + +int mac_vnode_check_stat_impl(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); +extern bool mac_vnode_check_stat_fp_flag; +static inline int +mac_vnode_check_stat(struct ucred *active_cred, struct ucred *file_cred, + struct vnode *vp) +{ + + mac_vnode_assert_locked(vp, "mac_vnode_check_stat"); + if (__predict_false(mac_vnode_check_stat_fp_flag)) + return (mac_vnode_check_stat_impl(active_cred, file_cred, vp)); + return (0); +} + +int mac_vnode_check_read_impl(struct ucred *active_cred, + struct ucred *file_cred, struct vnode *vp); +extern bool mac_vnode_check_read_fp_flag; +static inline int +mac_vnode_check_read(struct ucred *active_cred, struct ucred *file_cred, + struct vnode *vp) +{ + + mac_vnode_assert_locked(vp, "mac_vnode_check_read"); + if (__predict_false(mac_vnode_check_read_fp_flag)) + return (mac_vnode_check_read_impl(active_cred, file_cred, vp)); + return (0); +} + +int mac_vnode_check_write_impl(struct ucred *active_cred, + struct ucred *file_cred, struct vnode *vp); +extern bool mac_vnode_check_write_fp_flag; +static inline int +mac_vnode_check_write(struct ucred *active_cred, struct ucred *file_cred, + struct vnode *vp) +{ + + mac_vnode_assert_locked(vp, "mac_vnode_check_write"); + if (__predict_false(mac_vnode_check_write_fp_flag)) + return (mac_vnode_check_write_impl(active_cred, file_cred, vp)); + return (0); +} + int mac_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp); -int mac_vnode_check_write(struct ucred *active_cred, - struct ucred *file_cred, struct vnode *vp); void mac_vnode_copy_label(struct label *, struct label *); void mac_vnode_init(struct vnode *); int mac_vnode_create_extattr(struct ucred *cred, struct mount *mp, Modified: head/sys/security/mac/mac_vfs.c ============================================================================== --- head/sys/security/mac/mac_vfs.c Thu Feb 13 22:22:15 2020 (r357888) +++ head/sys/security/mac/mac_vfs.c Thu Feb 13 22:22:55 2020 (r357889) @@ -565,13 +565,15 @@ MAC_CHECK_PROBE_DEFINE3(vnode_check_lookup, "struct uc "struct vnode *", "struct componentname *"); int -mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, +mac_vnode_check_lookup_impl(struct ucred *cred, struct vnode *dvp, struct componentname *cnp) { int error; ASSERT_VOP_LOCKED(dvp, "mac_vnode_check_lookup"); + if ((cnp->cn_flags & NOMACCHECK) != 0) + return (0); MAC_POLICY_CHECK(vnode_check_lookup, cred, dvp, dvp->v_label, cnp); MAC_CHECK_PROBE3(vnode_check_lookup, error, cred, dvp, cnp); @@ -582,7 +584,7 @@ MAC_CHECK_PROBE_DEFINE4(vnode_check_mmap, "struct ucre "int", "int"); int -mac_vnode_check_mmap(struct ucred *cred, struct vnode *vp, int prot, +mac_vnode_check_mmap_impl(struct ucred *cred, struct vnode *vp, int prot, int flags) { int error; @@ -629,7 +631,7 @@ MAC_CHECK_PROBE_DEFINE3(vnode_check_open, "struct ucre "accmode_t"); int -mac_vnode_check_open(struct ucred *cred, struct vnode *vp, accmode_t accmode) +mac_vnode_check_open_impl(struct ucred *cred, struct vnode *vp, accmode_t accmode) { int error; @@ -664,7 +666,7 @@ MAC_CHECK_PROBE_DEFINE3(vnode_check_read, "struct ucre "struct vnode *"); int -mac_vnode_check_read(struct ucred *active_cred, struct ucred *file_cred, +mac_vnode_check_read_impl(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp) { int error; @@ -889,7 +891,7 @@ MAC_CHECK_PROBE_DEFINE3(vnode_check_stat, "struct ucre "struct vnode *"); int -mac_vnode_check_stat(struct ucred *active_cred, struct ucred *file_cred, +mac_vnode_check_stat_impl(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp) { int error; @@ -927,7 +929,7 @@ MAC_CHECK_PROBE_DEFINE3(vnode_check_write, "struct ucr "struct ucred *", "struct vnode *"); int -mac_vnode_check_write(struct ucred *active_cred, struct ucred *file_cred, +mac_vnode_check_write_impl(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp) { int error; @@ -1068,3 +1070,12 @@ vn_setlabel(struct vnode *vp, struct label *intlabel, return (0); } + +#ifdef DEBUG_VFS_LOCKS +void +mac_vnode_assert_locked(struct vnode *vp, const char *func) +{ + + ASSERT_VOP_LOCKED(vp, func); +} +#endif From owner-svn-src-all@freebsd.org Thu Feb 13 22:55:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D712E238D8C; Thu, 13 Feb 2020 22:55:46 +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) server-signature RSA-PSS (4096 bits) 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 48JX0y5KNdz3DYy; Thu, 13 Feb 2020 22:55:46 +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 B18011A2E0; Thu, 13 Feb 2020 22:55:46 +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 01DMtkVw083841; Thu, 13 Feb 2020 22:55:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DMtk6O083838; Thu, 13 Feb 2020 22:55:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202002132255.01DMtk6O083838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 13 Feb 2020 22:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357890 - in head/sys/dev/cxgbe: . crypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . crypto X-SVN-Commit-Revision: 357890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 22:55:46 -0000 Author: jhb Date: Thu Feb 13 22:55:45 2020 New Revision: 357890 URL: https://svnweb.freebsd.org/changeset/base/357890 Log: Remove the per-TXQ tls_wrs stat. It duplicated the kern_tls_records stat and was not conditional on NIC TLS being enabled. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D23670 Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/crypto/t4_kern_tls.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Feb 13 22:22:55 2020 (r357889) +++ head/sys/dev/cxgbe/adapter.h Thu Feb 13 22:55:45 2020 (r357890) @@ -574,7 +574,6 @@ struct sge_txq { uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ uint64_t raw_wrs; /* # of raw work requests (alloc_wr_mbuf) */ - uint64_t tls_wrs; /* # of TLS work requests */ uint64_t kern_tls_records; uint64_t kern_tls_short; Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Feb 13 22:22:55 2020 (r357889) +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Feb 13 22:55:45 2020 (r357890) @@ -2082,7 +2082,6 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq ndesc += howmany(wr_len, EQ_ESIZE); MPASS(ndesc <= available); - txq->tls_wrs++; txq->kern_tls_records++; txq->kern_tls_octets += tlen - mtod(m_tls, vm_offset_t); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Feb 13 22:22:55 2020 (r357889) +++ head/sys/dev/cxgbe/t4_main.c Thu Feb 13 22:55:45 2020 (r357890) @@ -10359,7 +10359,6 @@ clear_stats(struct adapter *sc, u_int port_id) txq->txpkts0_pkts = 0; txq->txpkts1_pkts = 0; txq->raw_wrs = 0; - txq->tls_wrs = 0; txq->kern_tls_records = 0; txq->kern_tls_short = 0; txq->kern_tls_partial = 0; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Feb 13 22:22:55 2020 (r357889) +++ head/sys/dev/cxgbe/t4_sge.c Thu Feb 13 22:55:45 2020 (r357890) @@ -4204,8 +4204,6 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int "# of frames tx'd using type1 txpkts work requests"); SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "raw_wrs", CTLFLAG_RD, &txq->raw_wrs, "# of raw work requests (non-packets)"); - SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "tls_wrs", CTLFLAG_RD, - &txq->tls_wrs, "# of TLS work requests (TLS records)"); #ifdef KERN_TLS if (sc->flags & KERN_TLS_OK) { From owner-svn-src-all@freebsd.org Thu Feb 13 23:04:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3873F2391AB; Thu, 13 Feb 2020 23:04:12 +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) server-signature RSA-PSS (4096 bits) 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 48JXBh09m7z3FKg; Thu, 13 Feb 2020 23:04:12 +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 012F41A4C8; Thu, 13 Feb 2020 23:04:12 +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 01DN4B1f090284; Thu, 13 Feb 2020 23:04:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DN4Buq090283; Thu, 13 Feb 2020 23:04:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202002132304.01DN4Buq090283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 13 Feb 2020 23:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357891 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 357891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 23:04:12 -0000 Author: jhb Date: Thu Feb 13 23:04:11 2020 New Revision: 357891 URL: https://svnweb.freebsd.org/changeset/base/357891 Log: Don't check the auth algorithm for GCM. The upstream OpenSSL changes only set the cipher for GCM since the authentication is redundant, and changes to OCF will soon remove the GCM authentication algorithm constants entirely for the same reason. In addition, ktls_create_session() already validates these fields and wouldn't pass down an invalid auth_algorithm value to any drivers or ktls backends. Reviewed by: hselasky Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D23671 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Feb 13 22:55:45 2020 (r357890) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Thu Feb 13 23:04:11 2020 (r357891) @@ -339,10 +339,6 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, case CRYPTO_AES_NIST_GCM_16: switch (en->cipher_key_len) { case 128 / 8: - if (en->auth_algorithm != CRYPTO_AES_128_NIST_GMAC) { - error = EINVAL; - goto failure; - } if (en->tls_vminor == TLS_MINOR_VER_TWO) { if (MLX5_CAP_TLS(priv->mdev, tls_1_2_aes_gcm_128) == 0) { error = EPROTONOSUPPORT; @@ -360,10 +356,6 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp, break; case 256 / 8: - if (en->auth_algorithm != CRYPTO_AES_256_NIST_GMAC) { - error = EINVAL; - goto failure; - } if (en->tls_vminor == TLS_MINOR_VER_TWO) { if (MLX5_CAP_TLS(priv->mdev, tls_1_2_aes_gcm_256) == 0) { error = EPROTONOSUPPORT; From owner-svn-src-all@freebsd.org Thu Feb 13 23:15:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42170239544; Thu, 13 Feb 2020 23:15: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) server-signature RSA-PSS (4096 bits) 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 48JXRZ10QZz3FxG; Thu, 13 Feb 2020 23:15: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 1D4D61A6A2; Thu, 13 Feb 2020 23:15: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 01DNFLUf096760; Thu, 13 Feb 2020 23:15:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DNFLYc096759; Thu, 13 Feb 2020 23:15:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002132315.01DNFLYc096759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Feb 2020 23:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357892 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 23:15:22 -0000 Author: markj Date: Thu Feb 13 23:15:21 2020 New Revision: 357892 URL: https://svnweb.freebsd.org/changeset/base/357892 Log: Update the zone-global count of cached items in bucket_cache_reclaim(). This was missed in r351673. The count is used to enfore cache limits, which are rarely used. Discussed with: jeff Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Feb 13 23:04:11 2020 (r357891) +++ head/sys/vm/uma_core.c Thu Feb 13 23:15:21 2020 (r357892) @@ -1204,6 +1204,7 @@ bucket_cache_reclaim(uma_zone_t zone, bool drain) tofree = bucket->ub_cnt; STAILQ_REMOVE_HEAD(&zdom->uzd_buckets, ub_link); zdom->uzd_nitems -= tofree; + zone->uz_bkt_count -= tofree; /* * Shift the bounds of the current WSS interval to avoid From owner-svn-src-all@freebsd.org Thu Feb 13 23:18:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 414D623967E; Thu, 13 Feb 2020 23:18:36 +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) server-signature RSA-PSS (4096 bits) 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 48JXWJ11GDz3GBX; Thu, 13 Feb 2020 23:18:36 +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 1DA971A6CF; Thu, 13 Feb 2020 23:18:36 +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 01DNIZ29096948; Thu, 13 Feb 2020 23:18:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DNIZ4J096947; Thu, 13 Feb 2020 23:18:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002132318.01DNIZ4J096947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Feb 2020 23:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357893 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 23:18:36 -0000 Author: markj Date: Thu Feb 13 23:18:35 2020 New Revision: 357893 URL: https://svnweb.freebsd.org/changeset/base/357893 Log: Fix handling of WAITFAIL in vm_page_grab() and vm_page_grab_pages(). After sleeping through a memory shortage, we must return NULL rather than retry. Discussed with: jeff Reported by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Feb 13 23:15:21 2020 (r357892) +++ head/sys/vm/vm_page.c Thu Feb 13 23:18:35 2020 (r357893) @@ -4258,7 +4258,7 @@ retrylookup: return (NULL); m = vm_page_alloc(object, pindex, pflags); if (m == NULL) { - if ((allocflags & VM_ALLOC_NOWAIT) != 0) + if ((allocflags & (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL)) != 0) return (NULL); goto retrylookup; } @@ -4466,7 +4466,8 @@ retrylookup: m = vm_page_alloc_after(object, pindex + i, pflags | VM_ALLOC_COUNT(count - i), mpred); if (m == NULL) { - if ((allocflags & VM_ALLOC_NOWAIT) != 0) + if ((allocflags & (VM_ALLOC_NOWAIT | + VM_ALLOC_WAITFAIL)) != 0) break; goto retrylookup; } From owner-svn-src-all@freebsd.org Thu Feb 13 23:22:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF9352398CE; Thu, 13 Feb 2020 23:22:12 +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) server-signature RSA-PSS (4096 bits) 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 48JXbS659pz3GcK; Thu, 13 Feb 2020 23:22:12 +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 CC3301A76F; Thu, 13 Feb 2020 23:22:12 +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 01DNMCst002494; Thu, 13 Feb 2020 23:22:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DNMCv0002493; Thu, 13 Feb 2020 23:22:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002132322.01DNMCv0002493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 23:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357894 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 357894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 23:22:13 -0000 Author: kib Date: Thu Feb 13 23:22:12 2020 New Revision: 357894 URL: https://svnweb.freebsd.org/changeset/base/357894 Log: Return success, instead of ESRCH, from pthread_cancel(3) applied to the exited but not yet joined thread. Before, if the thread exited but was not yet joined, we returned ESRCH. According to IEEE Std 1003.1™-2017 recommendation in the description of pthread_cancel(3): If an implementation detects use of a thread ID after the end of its lifetime, it is recommended that the function should fail and report an [ESRCH] error. So it seems desirable to not return ESRCH until the lifetime of the thread ID ends. According to the section 2.9.2 Thread IDs, The lifetime of a thread ID ends after the thread terminates if it was created with the detachstate attribute set to PTHREAD_CREATE_DETACHED or if pthread_detach() or pthread_join() has been called for that thread. In other words, lifetime for thread ID of exited but not yet joined thread did not ended yet. Prompted by: cperciva Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libthr/thread/thr_cancel.c Modified: head/lib/libthr/thread/thr_cancel.c ============================================================================== --- head/lib/libthr/thread/thr_cancel.c Thu Feb 13 23:18:35 2020 (r357893) +++ head/lib/libthr/thread/thr_cancel.c Thu Feb 13 23:22:12 2020 (r357894) @@ -71,7 +71,7 @@ _thr_cancel(pthread_t pthread) * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD) From owner-svn-src-all@freebsd.org Thu Feb 13 23:42:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3189239DE8; Thu, 13 Feb 2020 23:42:11 +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) server-signature RSA-PSS (4096 bits) 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 48JY2W4dh2z3HJL; Thu, 13 Feb 2020 23:42:11 +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 9A2851AC18; Thu, 13 Feb 2020 23:42:11 +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 01DNgBTw010503; Thu, 13 Feb 2020 23:42:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DNg9Bk010493; Thu, 13 Feb 2020 23:42:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002132342.01DNg9Bk010493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 13 Feb 2020 23:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Commit-Revision: 357895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 23:42:11 -0000 Author: kib Date: Thu Feb 13 23:42:09 2020 New Revision: 357895 URL: https://svnweb.freebsd.org/changeset/base/357895 Log: Handle non-plt IRELATIVE relocations, at least for x86. lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. Reported, reviewed, and tested by: dim (amd64, previous version) Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23652 Modified: head/libexec/rtld-elf/aarch64/reloc.c head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/riscv/reloc.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/sparc64/reloc.c Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/aarch64/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -258,31 +258,56 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat return (0); } +static void +reloc_iresolve_one(Obj_Entry *obj, const Elf_Rela *rela, + RtldLockState *lockstate) +{ + Elf_Addr *where, target, *ptr; + + ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + lock_release(rtld_bind_lock, lockstate); + target = call_ifunc_resolver(ptr); + wlock_acquire(rtld_bind_lock, lockstate); + *where = target; +} + int reloc_iresolve(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; - Elf_Addr *where, target, *ptr; if (!obj->irelative) return (0); - relalim = (const Elf_Rela *)((const char *)obj->pltrela + obj->pltrelasize); + obj->irelative = false; + relalim = (const Elf_Rela *)((const char *)obj->pltrela + + obj->pltrelasize); for (rela = obj->pltrela; rela < relalim; rela++) { - if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) { - ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); - where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - lock_release(rtld_bind_lock, lockstate); - target = call_ifunc_resolver(ptr); - wlock_acquire(rtld_bind_lock, lockstate); - *where = target; - } + if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); } - obj->irelative = false; return (0); } int +reloc_iresolve_nonplt(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +{ + const Elf_Rela *relalim; + const Elf_Rela *rela; + + if (!obj->irelative_nonplt) + return (0); + obj->irelative_nonplt = false; + relalim = (const Elf_Rela *)((const char *)obj->rela + obj->relasize); + for (rela = obj->rela; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) == R_AARCH64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); + } + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj, int flags, struct Struct_RtldLockState *lockstate) { @@ -497,6 +522,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int *where = (Elf_Addr)(obj->relocbase + rela->r_addend); break; case R_AARCH64_NONE: + break; + case R_AARCH64_IRELATIVE: + obj->irelative_nonplt = true; break; default: rtld_printf("%s: Unhandled relocation %lu\n", Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/amd64/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -303,6 +303,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int case R_X86_64_RELATIVE: *where = (Elf_Addr)(obj->relocbase + rela->r_addend); break; + case R_X86_64_IRELATIVE: + obj->irelative_nonplt = true; + break; + /* * missing: * R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, @@ -410,34 +414,53 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, return (target); } +static void +reloc_iresolve_one(Obj_Entry *obj, const Elf_Rela *rela, + RtldLockState *lockstate) +{ + Elf_Addr *where, target, *ptr; + + ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + lock_release(rtld_bind_lock, lockstate); + target = call_ifunc_resolver(ptr); + wlock_acquire(rtld_bind_lock, lockstate); + *where = target; +} + int reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) { - const Elf_Rela *relalim; - const Elf_Rela *rela; + const Elf_Rela *relalim; + const Elf_Rela *rela; - if (!obj->irelative) + if (!obj->irelative) + return (0); + obj->irelative = false; + relalim = (const Elf_Rela *)((const char *)obj->pltrela + + obj->pltrelasize); + for (rela = obj->pltrela; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) == R_X86_64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); + } return (0); - relalim = (const Elf_Rela *)((const char *)obj->pltrela + obj->pltrelasize); - for (rela = obj->pltrela; rela < relalim; rela++) { - Elf_Addr *where, target, *ptr; +} - switch (ELF_R_TYPE(rela->r_info)) { - case R_X86_64_JMP_SLOT: - break; +int +reloc_iresolve_nonplt(Obj_Entry *obj, RtldLockState *lockstate) +{ + const Elf_Rela *relalim; + const Elf_Rela *rela; - case R_X86_64_IRELATIVE: - ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); - where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - lock_release(rtld_bind_lock, lockstate); - target = call_ifunc_resolver(ptr); - wlock_acquire(rtld_bind_lock, lockstate); - *where = target; - break; + if (!obj->irelative_nonplt) + return (0); + obj->irelative_nonplt = false; + relalim = (const Elf_Rela *)((const char *)obj->rela + obj->relasize); + for (rela = obj->rela; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) == R_X86_64_IRELATIVE) + reloc_iresolve_one(obj, rela, lockstate); } - } - obj->irelative = false; - return (0); + return (0); } int Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/arm/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -452,6 +452,15 @@ reloc_iresolve(Obj_Entry *obj __unused, } int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + + /* XXX not implemented */ + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, struct Struct_RtldLockState *lockstate __unused) { Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/i386/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -263,6 +263,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int case R_386_TLS_DTPOFF32: *where += (Elf_Addr) def->st_value; break; + case R_386_IRELATIVE: + obj->irelative_nonplt = true; + break; default: _rtld_error("%s: Unsupported relocation type %d" " in non-PLT relocations\n", obj->path, @@ -365,29 +368,51 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, return (target); } +static void +reloc_iresolve_one(Obj_Entry *obj, const Elf_Rel *rel, + RtldLockState *lockstate) +{ + Elf_Addr *where, target; + + where = (Elf_Addr *)(obj->relocbase + rel->r_offset); + lock_release(rtld_bind_lock, lockstate); + target = call_ifunc_resolver(obj->relocbase + *where); + wlock_acquire(rtld_bind_lock, lockstate); + *where = target; +} + int reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) { - const Elf_Rel *rellim; - const Elf_Rel *rel; - Elf_Addr *where, target; + const Elf_Rel *rellim; + const Elf_Rel *rel; - if (!obj->irelative) + if (!obj->irelative) + return (0); + obj->irelative = false; + rellim = (const Elf_Rel *)((const char *)obj->pltrel + obj->pltrelsize); + for (rel = obj->pltrel; rel < rellim; rel++) { + if (ELF_R_TYPE(rel->r_info) == R_386_RELATIVE) + reloc_iresolve_one(obj, rel, lockstate); + } return (0); - rellim = (const Elf_Rel *)((const char *)obj->pltrel + obj->pltrelsize); - for (rel = obj->pltrel; rel < rellim; rel++) { - switch (ELF_R_TYPE(rel->r_info)) { - case R_386_IRELATIVE: - where = (Elf_Addr *)(obj->relocbase + rel->r_offset); - lock_release(rtld_bind_lock, lockstate); - target = call_ifunc_resolver(obj->relocbase + *where); - wlock_acquire(rtld_bind_lock, lockstate); - *where = target; - break; +} + +int +reloc_iresolve_nonplt(Obj_Entry *obj, RtldLockState *lockstate) +{ + const Elf_Rel *rellim; + const Elf_Rel *rel; + + if (!obj->irelative_nonplt) + return (0); + obj->irelative_nonplt = false; + rellim = (const Elf_Rel *)((const char *)obj->rel + obj->relsize); + for (rel = obj->rel; rel < rellim; rel++) { + if (ELF_R_TYPE(rel->r_info) == R_386_IRELATIVE) + reloc_iresolve_one(obj, rel, lockstate); } - } - obj->irelative = false; - return (0); + return (0); } int Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/mips/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -723,6 +723,15 @@ reloc_iresolve(Obj_Entry *obj __unused, } int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + + /* XXX not implemented */ + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, struct Struct_RtldLockState *lockstate __unused) { Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/powerpc/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -653,6 +653,13 @@ reloc_iresolve(Obj_Entry *obj, } int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, struct Struct_RtldLockState *lockstate __unused) { Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/powerpc64/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -652,6 +652,13 @@ reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __u #endif } +int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + return (0); +} + void init_pltgot(Obj_Entry *obj) { Modified: head/libexec/rtld-elf/riscv/reloc.c ============================================================================== --- head/libexec/rtld-elf/riscv/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/riscv/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -212,6 +212,15 @@ reloc_iresolve(Obj_Entry *obj __unused, } int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + + /* XXX not implemented */ + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, struct Struct_RtldLockState *lockstate __unused) { Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/rtld.c Thu Feb 13 23:42:09 2020 (r357895) @@ -3034,10 +3034,13 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in if (obj->ifuncs_resolved) return (0); obj->ifuncs_resolved = true; - if (!obj->irelative && !((obj->bind_now || bind_now) && obj->gnu_ifunc)) + if (!obj->irelative && !obj->irelative_nonplt && + !((obj->bind_now || bind_now) && obj->gnu_ifunc)) return (0); if (obj_disable_relro(obj) == -1 || (obj->irelative && reloc_iresolve(obj, lockstate) == -1) || + (obj->irelative_nonplt && reloc_iresolve_nonplt(obj, + lockstate) == -1) || ((obj->bind_now || bind_now) && obj->gnu_ifunc && reloc_gnu_ifunc(obj, flags, lockstate) == -1) || obj_enforce_relro(obj) == -1) Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/rtld.h Thu Feb 13 23:42:09 2020 (r357895) @@ -264,6 +264,7 @@ typedef struct Struct_Obj_Entry { bool dag_inited : 1; /* Object has its DAG initialized. */ bool filtees_loaded : 1; /* Filtees loaded */ bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ + bool irelative_nonplt : 1; /* Object has R_MACHDEP_IRELATIVE non-plt relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ bool non_plt_gnu_ifunc : 1; /* Object has non-plt IFUNC references */ bool ifuncs_resolved : 1; /* Object ifuncs were already resolved */ @@ -406,6 +407,7 @@ int reloc_non_plt(Obj_Entry *, Obj_Entry *, int flags, int reloc_plt(Obj_Entry *, int flags, struct Struct_RtldLockState *); int reloc_jmpslots(Obj_Entry *, int flags, struct Struct_RtldLockState *); int reloc_iresolve(Obj_Entry *, struct Struct_RtldLockState *); +int reloc_iresolve_nonplt(Obj_Entry *, struct Struct_RtldLockState *); int reloc_gnu_ifunc(Obj_Entry *, int flags, struct Struct_RtldLockState *); void ifunc_init(Elf_Auxinfo[__min_size(AT_COUNT)]); void pre_init(void); Modified: head/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/sparc64/reloc.c Thu Feb 13 23:22:12 2020 (r357894) +++ head/libexec/rtld-elf/sparc64/reloc.c Thu Feb 13 23:42:09 2020 (r357895) @@ -570,6 +570,15 @@ reloc_iresolve(Obj_Entry *obj __unused, } int +reloc_iresolve_nonplt(Obj_Entry *obj __unused, + struct Struct_RtldLockState *lockstate __unused) +{ + + /* XXX not implemented */ + return (0); +} + +int reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, struct Struct_RtldLockState *lockstate __unused) { From owner-svn-src-all@freebsd.org Fri Feb 14 00:13:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FDCD23AB0D; Fri, 14 Feb 2020 00:13:00 +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) server-signature RSA-PSS (4096 bits) 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 48JYk42Jzxz3Jvf; Fri, 14 Feb 2020 00:13:00 +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 4AC601B1CE; Fri, 14 Feb 2020 00:13:00 +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 01E0D0KZ032661; Fri, 14 Feb 2020 00:13:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E0D0hv032660; Fri, 14 Feb 2020 00:13:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002140013.01E0D0hv032660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Feb 2020 00:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357896 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 357896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 00:13:00 -0000 Author: imp Date: Fri Feb 14 00:12:59 2020 New Revision: 357896 URL: https://svnweb.freebsd.org/changeset/base/357896 Log: xpt_release_simq_timeout is unused. Remove it. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Feb 13 23:42:09 2020 (r357895) +++ head/sys/cam/cam_xpt.c Fri Feb 14 00:12:59 2020 (r357896) @@ -248,7 +248,6 @@ static void xpt_run_allocq(struct cam_periph *periph, static void xpt_run_allocq_task(void *context, int pending); static void xpt_run_devq(struct cam_devq *devq); static callout_func_t xpt_release_devq_timeout; -static void xpt_release_simq_timeout(void *arg) __unused; static void xpt_acquire_bus(struct cam_eb *bus); static void xpt_release_bus(struct cam_eb *bus); static uint32_t xpt_freeze_devq_device(struct cam_ed *dev, u_int count); @@ -4619,18 +4618,6 @@ xpt_release_simq(struct cam_sim *sim, int run_queue) } } mtx_unlock(&devq->send_mtx); -} - -/* - * XXX Appears to be unused. - */ -static void -xpt_release_simq_timeout(void *arg) -{ - struct cam_sim *sim; - - sim = (struct cam_sim *)arg; - xpt_release_simq(sim, /* run_queue */ TRUE); } void From owner-svn-src-all@freebsd.org Fri Feb 14 00:13:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4604623ABCB; Fri, 14 Feb 2020 00:13: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) server-signature RSA-PSS (4096 bits) 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 48JYkX17jsz3K3l; Fri, 14 Feb 2020 00:13: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 227B11B1D1; Fri, 14 Feb 2020 00:13: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 01E0DOnJ032724; Fri, 14 Feb 2020 00:13:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E0DOnw032723; Fri, 14 Feb 2020 00:13:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002140013.01E0DOnw032723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Feb 2020 00:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357897 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 357897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 00:13:24 -0000 Author: imp Date: Fri Feb 14 00:13:23 2020 New Revision: 357897 URL: https://svnweb.freebsd.org/changeset/base/357897 Log: Add a KASSERT that there's no outstanding CCBs when we call camperiphfree. We know that if there are any outstanding CCBs, then when they dereference the path that's freed at the bottom of camperiphfree there will be some flavor of panic. This moves that eventual panic to a traceback of when we free the last reference on the device, which is earlier but may not be early enough. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Feb 14 00:12:59 2020 (r357896) +++ head/sys/cam/cam_periph.c Fri Feb 14 00:13:23 2020 (r357897) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For KASSERTs only */ #include #include @@ -681,6 +682,10 @@ camperiphfree(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); KASSERT(periph->periph_allocating == 0, ("%s%d: freed while allocating", periph->periph_name, periph->unit_number)); + KASSERT(periph->path->device->ccbq.dev_active == 0, + ("%s%d: freed with %d active CCBs\n", + periph->periph_name, periph->unit_number, + periph->path->device->ccbq.dev_active)); for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) { if (strcmp((*p_drv)->driver_name, periph->periph_name) == 0) break; From owner-svn-src-all@freebsd.org Fri Feb 14 00:29:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D529F23B050; Fri, 14 Feb 2020 00:29:21 +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) server-signature RSA-PSS (4096 bits) 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 48JZ4x51gXz3KbD; Fri, 14 Feb 2020 00:29:21 +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 A7B881B3A1; Fri, 14 Feb 2020 00:29:21 +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 01E0TLLM039396; Fri, 14 Feb 2020 00:29:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E0TLps039395; Fri, 14 Feb 2020 00:29:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002140029.01E0TLps039395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 14 Feb 2020 00:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357898 - head/sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/input X-SVN-Commit-Revision: 357898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 00:29:21 -0000 Author: hselasky Date: Fri Feb 14 00:29:21 2020 New Revision: 357898 URL: https://svnweb.freebsd.org/changeset/base/357898 Log: Exclude modifier keys from keyboard repeat logic. This restores USB keyboard driver behaviour prior to r357861. Requested by: jkim@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Fri Feb 14 00:13:23 2020 (r357897) +++ head/sys/dev/usb/input/ukbd.c Fri Feb 14 00:29:21 2020 (r357898) @@ -347,6 +347,13 @@ ukbd_any_key_valid(struct ukbd_softc *sc) return (ret); } +static bool +ukbd_is_modifier_key(uint32_t key) +{ + + return (key >= 0xe0 && key <= 0xe7); +} + static void ukbd_start_timer(struct ukbd_softc *sc) { @@ -488,12 +495,9 @@ ukbd_interrupt(struct ukbd_softc *sc) { const uint32_t now = sc->sc_time_ms; unsigned key; - bool old_keys; UKBD_LOCK_ASSERT(); - old_keys = ukbd_any_key_pressed(sc); - /* Check for key changes */ for (key = 0; key != UKBD_NKEYCODE; key++) { const uint64_t mask = 1ULL << (key % 64); @@ -514,6 +518,19 @@ ukbd_interrupt(struct ukbd_softc *sc) } else { ukbd_put_key(sc, key | KEY_PRESS); + if (ukbd_is_modifier_key(key)) + continue; + + /* + * Check for first new key and set + * initial delay and [re]start timer: + */ + if (sc->sc_repeat_key == 0) { + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); + } + /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; sc->sc_repeat_key = key; @@ -533,13 +550,6 @@ ukbd_interrupt(struct ukbd_softc *sc) ukbd_put_key(sc, sc->sc_repeat_key | KEY_PRESS); sc->sc_repeat_time = now + sc->sc_kbd.kb_delay2; } - } - - /* check for first new key and set initial delay and [re]start timer */ - if (old_keys == false && ukbd_any_key_pressed(sc) == true) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); } /* wakeup keyboard system */ From owner-svn-src-all@freebsd.org Fri Feb 14 01:03:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A78523BD0A; Fri, 14 Feb 2020 01:03:27 +0000 (UTC) (envelope-from rpokala@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) server-signature RSA-PSS (4096 bits) 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 48JZrH37Lpz3MKy; Fri, 14 Feb 2020 01:03:27 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.228] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id D9B9A73F8; Fri, 14 Feb 2020 01:03:26 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.22.0.200209 Date: Thu, 13 Feb 2020 17:03:23 -0800 Subject: Re: svn commit: r357865 - in head/sys/amd64/vmm: . io From: Ravi Pokala To: Konstantin Belousov CC: , , Message-ID: Thread-Topic: svn commit: r357865 - in head/sys/amd64/vmm: . io References: <202002131903.01DJ3DDN044487@repo.freebsd.org> <5C7C143D-5F7E-4B5E-933F-6AFD0C37BD88@panasas.com> <20200213220853.GM4808@kib.kiev.ua> In-Reply-To: <20200213220853.GM4808@kib.kiev.ua> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 01:03:27 -0000 =EF=BB=BF-----Original Message----- From: on behalf of Konstantin Belousov <= kostikbel@gmail.com> Date: 2020-02-13, Thursday at 14:08 To: Ravi Pokala Cc: , , Subject: Re: svn commit: r357865 - in head/sys/amd64/vmm: . io On Thu, Feb 13, 2020 at 01:49:09PM -0800, Ravi Pokala wrote: > Why "svm"? Because this is how AMD calls its virtualization extensions. Secure Virtual Machine. Okay, thanks. That would have been good to note in the commit message. ;-) Thanks, Ravi (rpokala@) =20 >=20 > -Ravi (rpokala@) >=20 > =EF=BB=BF-----Original Message----- > From: on behalf of Konstantin Belo= usov > Date: 2020-02-13, Thursday at 11:03 > To: , , > Subject: svn commit: r357865 - in head/sys/amd64/vmm: . io >=20 > Author: kib > Date: Thu Feb 13 19:03:12 2020 > New Revision: 357865 > URL: https://svnweb.freebsd.org/changeset/base/357865 > =20 > Log: > vmm: Add Hygon Dhyana support. > =20 > Submitted by: Pu Wen > Discussed with: grehan > Reviewed by: jhb (previous version) > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D23553 > =20 > Modified: > head/sys/amd64/vmm/io/iommu.c > head/sys/amd64/vmm/vmm.c > head/sys/amd64/vmm/vmm_stat.c > head/sys/amd64/vmm/vmm_util.c > head/sys/amd64/vmm/vmm_util.h > head/sys/amd64/vmm/x86.c > =20 > Modified: head/sys/amd64/vmm/io/iommu.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/amd64/vmm/io/iommu.c Thu Feb 13 18:37:17 2020 (r3578= 64) > +++ head/sys/amd64/vmm/io/iommu.c Thu Feb 13 19:03:12 2020 (r3578= 65) > @@ -184,7 +184,7 @@ iommu_init(void) > =20 > if (vmm_is_intel()) > ops =3D &iommu_ops_intel; > - else if (vmm_is_amd()) > + else if (vmm_is_svm()) > ops =3D &iommu_ops_amd; > else > ops =3D NULL; > =20 > Modified: head/sys/amd64/vmm/vmm.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/amd64/vmm/vmm.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/vmm.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -347,7 +347,7 @@ vmm_init(void) > > if (vmm_is_intel()) > ops =3D &vmm_ops_intel; > - else if (vmm_is_amd()) > + else if (vmm_is_svm()) > ops =3D &vmm_ops_amd; > else > return (ENXIO); > =20 > Modified: head/sys/amd64/vmm/vmm_stat.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/amd64/vmm/vmm_stat.c Thu Feb 13 18:37:17 2020 (r3578= 64) > +++ head/sys/amd64/vmm/vmm_stat.c Thu Feb 13 19:03:12 2020 (r3578= 65) > @@ -67,7 +67,7 @@ vmm_stat_register(void *arg) > if (vst->scope =3D=3D VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) > return; > =20 > - if (vst->scope =3D=3D VMM_STAT_SCOPE_AMD && !vmm_is_amd()) > + if (vst->scope =3D=3D VMM_STAT_SCOPE_AMD && !vmm_is_svm()) > return; > =20 > if (vst_num_elems + vst->nelems >=3D MAX_VMM_STAT_ELEMS) { > =20 > Modified: head/sys/amd64/vmm/vmm_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/sys/amd64/vmm/vmm_util.c Thu Feb 13 18:37:17 2020 (r3578= 64) > +++ head/sys/amd64/vmm/vmm_util.c Thu Feb 13 19:03:12 2020 (r3578= 65) > @@ -46,9 +46,10 @@ vmm_is_intel(void) > } > =20 > bool > -vmm_is_amd(void) > +vmm_is_svm(void) > { > - return (strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0); > + return (strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0 || > + strcmp(cpu_vendor, "HygonGenuine") =3D=3D 0); > } > =20 > bool > =20 > Modified: head/sys/amd64/vmm/vmm_util.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/sys/amd64/vmm/vmm_util.h Thu Feb 13 18:37:17 2020 (r3578= 64) > +++ head/sys/amd64/vmm/vmm_util.h Thu Feb 13 19:03:12 2020 (r3578= 65) > @@ -34,7 +34,7 @@ > struct trapframe; > =20 > bool vmm_is_intel(void); > -bool vmm_is_amd(void); > +bool vmm_is_svm(void); > bool vmm_supports_1G_pages(void); > =20 > void dump_trapframe(struct trapframe *tf); > =20 > Modified: head/sys/amd64/vmm/x86.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/amd64/vmm/x86.c Thu Feb 13 18:37:17 2020 (r357864) > +++ head/sys/amd64/vmm/x86.c Thu Feb 13 19:03:12 2020 (r357865) > @@ -135,7 +135,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > break; > case CPUID_8000_0008: > cpuid_count(*eax, *ecx, regs); > - if (vmm_is_amd()) { > + if (vmm_is_svm()) { > /* > * As on Intel (0000_0007:0, EDX), mask out > * unsupported or unsafe AMD extended features > @@ -234,7 +234,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > =20 > case CPUID_8000_001D: > /* AMD Cache topology, like 0000_0004 for Intel. */ > - if (!vmm_is_amd()) > + if (!vmm_is_svm()) > goto default_leaf; > =20 > /* > @@ -276,8 +276,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id= , > break; > =20 > case CPUID_8000_001E: > - /* AMD Family 16h+ additional identifiers */ > - if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) > + /* > + * AMD Family 16h+ and Hygon Family 18h additional > + * identifiers. > + */ > + if (!vmm_is_svm() || CPUID_TO_FAMILY(cpu_id) < 0x16) > goto default_leaf; > =20 > vm_get_topology(vm, &sockets, &cores, &threads, > =20 >=20 >=20 =20 From owner-svn-src-all@freebsd.org Fri Feb 14 02:22:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C651B23D5E9; Fri, 14 Feb 2020 02:22:09 +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) server-signature RSA-PSS (4096 bits) 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 48Jcb54xY8z3QVX; Fri, 14 Feb 2020 02:22:09 +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 8AE361C980; Fri, 14 Feb 2020 02:22:09 +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 01E2M9Hh008893; Fri, 14 Feb 2020 02:22:09 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E2M8VP008889; Fri, 14 Feb 2020 02:22:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002140222.01E2M8VP008889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 02:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357899 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 02:22:09 -0000 Author: kevans Date: Fri Feb 14 02:22:08 2020 New Revision: 357899 URL: https://svnweb.freebsd.org/changeset/base/357899 Log: u_char -> vm_prot_t in a couple of places, NFC The latter is a typedef of the former; the typedef exists and these bits are representing vmprot values, so use the correct type. Submitted by: sigsys@gmail.com MFC after: 3 days Modified: head/sys/kern/kern_descrip.c head/sys/kern/sys_capability.c head/sys/sys/capsicum.h head/sys/sys/file.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Feb 14 00:29:21 2020 (r357898) +++ head/sys/kern/kern_descrip.c Fri Feb 14 02:22:08 2020 (r357899) @@ -2898,7 +2898,7 @@ fget(struct thread *td, int fd, cap_rights_t *rightsp, } int -fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, u_char *maxprotp, +fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, struct file **fpp) { int error; Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Fri Feb 14 00:29:21 2020 (r357898) +++ head/sys/kern/sys_capability.c Fri Feb 14 02:22:08 2020 (r357899) @@ -193,10 +193,10 @@ cap_check_failed_notcapable(const cap_rights_t *havep, /* * Convert capability rights into VM access flags. */ -u_char +vm_prot_t cap_rights_to_vmprot(const cap_rights_t *havep) { - u_char maxprot; + vm_prot_t maxprot; maxprot = VM_PROT_NONE; if (cap_rights_is_set(havep, CAP_MMAP_R)) Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Fri Feb 14 00:29:21 2020 (r357898) +++ head/sys/sys/capsicum.h Fri Feb 14 02:22:08 2020 (r357899) @@ -514,7 +514,7 @@ int cap_check(const cap_rights_t *havep, const cap_rig /* * Convert capability rights into VM access flags. */ -u_char cap_rights_to_vmprot(const cap_rights_t *havep); +vm_prot_t cap_rights_to_vmprot(const cap_rights_t *havep); /* * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Fri Feb 14 00:29:21 2020 (r357898) +++ head/sys/sys/file.h Fri Feb 14 02:22:08 2020 (r357899) @@ -247,7 +247,7 @@ extern int maxfilesperproc; /* per process limit on nu int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, - u_char *maxprotp, struct file **fpp); + vm_prot_t *maxprotp, struct file **fpp); int fget_read(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); int fget_write(struct thread *td, int fd, cap_rights_t *rightsp, From owner-svn-src-all@freebsd.org Fri Feb 14 02:27:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B6AB23D794; Fri, 14 Feb 2020 02:27:01 +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) server-signature RSA-PSS (4096 bits) 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 48Jchj3cCgz3QmT; Fri, 14 Feb 2020 02:27:01 +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 771971C9AA; Fri, 14 Feb 2020 02:27:01 +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 01E2R10T010855; Fri, 14 Feb 2020 02:27:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E2R1ai010854; Fri, 14 Feb 2020 02:27:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002140227.01E2R1ai010854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 02:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357900 - in stable: 11/etc/periodic/daily 12/usr.sbin/periodic/etc/daily X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc/periodic/daily 12/usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 357900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 02:27:01 -0000 Author: kevans Date: Fri Feb 14 02:27:01 2020 New Revision: 357900 URL: https://svnweb.freebsd.org/changeset/base/357900 Log: MFC r357756: backup-passwd: mask out all passwords in the diff The previous expression borked if a username had a plus or hyphen in it. This is needlessly restrictive- at leSt a hyphen in the middle is valid. Instead of playing this game, let's just assume the username can't contain a colon and mask out the second field. Modified: stable/11/etc/periodic/daily/200.backup-passwd Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/periodic/etc/daily/200.backup-passwd Directory Properties: stable/12/ (props changed) Modified: stable/11/etc/periodic/daily/200.backup-passwd ============================================================================== --- stable/11/etc/periodic/daily/200.backup-passwd Fri Feb 14 02:22:08 2020 (r357899) +++ stable/11/etc/periodic/daily/200.backup-passwd Fri Feb 14 02:27:01 2020 (r357900) @@ -42,7 +42,7 @@ case "$daily_backup_passwd_enable" in [ $rc -lt 1 ] && rc=1 echo "$host passwd diffs:" diff -uI '^#' $bak/master.passwd.bak /etc/master.passwd |\ - sed 's/^\([-+ ][^-+:]*\):[^:]*:/\1:(password):/' + sed 's/^\([-+ ][^:]*\):[^:]*:/\1:(password):/' mv $bak/master.passwd.bak $bak/master.passwd.bak2 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 fi From owner-svn-src-all@freebsd.org Fri Feb 14 02:27:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED82323D7A3; Fri, 14 Feb 2020 02:27:01 +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) server-signature RSA-PSS (4096 bits) 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 48Jchj63Jrz3QmV; Fri, 14 Feb 2020 02:27:01 +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 CB0161C9AB; Fri, 14 Feb 2020 02:27:01 +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 01E2R1lf010861; Fri, 14 Feb 2020 02:27:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E2R1Df010860; Fri, 14 Feb 2020 02:27:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002140227.01E2R1Df010860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 02:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357900 - in stable: 11/etc/periodic/daily 12/usr.sbin/periodic/etc/daily X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc/periodic/daily 12/usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 357900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 02:27:02 -0000 Author: kevans Date: Fri Feb 14 02:27:01 2020 New Revision: 357900 URL: https://svnweb.freebsd.org/changeset/base/357900 Log: MFC r357756: backup-passwd: mask out all passwords in the diff The previous expression borked if a username had a plus or hyphen in it. This is needlessly restrictive- at leSt a hyphen in the middle is valid. Instead of playing this game, let's just assume the username can't contain a colon and mask out the second field. Modified: stable/12/usr.sbin/periodic/etc/daily/200.backup-passwd Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/etc/periodic/daily/200.backup-passwd Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/periodic/etc/daily/200.backup-passwd ============================================================================== --- stable/12/usr.sbin/periodic/etc/daily/200.backup-passwd Fri Feb 14 02:22:08 2020 (r357899) +++ stable/12/usr.sbin/periodic/etc/daily/200.backup-passwd Fri Feb 14 02:27:01 2020 (r357900) @@ -42,7 +42,7 @@ case "$daily_backup_passwd_enable" in [ $rc -lt 1 ] && rc=1 echo "$host passwd diffs:" diff -uI '^#' $bak/master.passwd.bak /etc/master.passwd |\ - sed 's/^\([-+ ][^-+:]*\):[^:]*:/\1:(password):/' + sed 's/^\([-+ ][^:]*\):[^:]*:/\1:(password):/' mv $bak/master.passwd.bak $bak/master.passwd.bak2 cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 fi From owner-svn-src-all@freebsd.org Fri Feb 14 02:31:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5ED423D953; Fri, 14 Feb 2020 02:31:20 +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) server-signature RSA-PSS (4096 bits) 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 48Jcnh4dNbz3RBx; Fri, 14 Feb 2020 02:31:20 +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 9A3C51CAFC; Fri, 14 Feb 2020 02:31:20 +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 01E2VKTV013400; Fri, 14 Feb 2020 02:31:20 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E2VKIB013399; Fri, 14 Feb 2020 02:31:20 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202002140231.01E2VKIB013399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 14 Feb 2020 02:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357901 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 357901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 02:31:20 -0000 Author: cperciva Date: Fri Feb 14 02:31:20 2020 New Revision: 357901 URL: https://svnweb.freebsd.org/changeset/base/357901 Log: MFC r353022: Switch EC2 AMIs from using the dual-dhclient script to using the new dual-dhclient-daemon daemon. This makes it possible to stop/restart the dhclients. Modified: stable/12/release/tools/ec2.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Fri Feb 14 02:27:01 2020 (r357900) +++ stable/12/release/tools/ec2.conf Fri Feb 14 02:31:20 2020 (r357901) @@ -6,7 +6,7 @@ # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap further # package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient" +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient-daemon" # Include the amazon-ssm-agent package in amd64 images, since some users want # to be able to use it on systems which are not connected to the Internet. From owner-svn-src-all@freebsd.org Fri Feb 14 03:21:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52D1823EA90; Fri, 14 Feb 2020 03:21:04 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Jdv41XXQz3ymw; Fri, 14 Feb 2020 03:21:04 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 301D21D47C; Fri, 14 Feb 2020 03:21:04 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01E3L4Qu042150; Fri, 14 Feb 2020 03:21:04 GMT (envelope-from jrm@FreeBSD.org) Received: (from jrm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E3L4TK042149; Fri, 14 Feb 2020 03:21:04 GMT (envelope-from jrm@FreeBSD.org) Message-Id: <202002140321.01E3L4TK042149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrm set sender to jrm@FreeBSD.org using -f From: Joseph Mingrone Date: Fri, 14 Feb 2020 03:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r357902 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: jrm X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 357902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 03:21:04 -0000 Author: jrm (ports committer) Date: Fri Feb 14 03:21:03 2020 New Revision: 357902 URL: https://svnweb.freebsd.org/changeset/base/357902 Log: Take in Garrett Wollman (wollman's) commit bit for safe keeping and after discussion with Garrett. Thank you for nearly a quarter century of contributions to the src repository! Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Feb 14 02:31:20 2020 (r357901) +++ svnadmin/conf/access Fri Feb 14 03:21:03 2020 (r357902) @@ -216,7 +216,6 @@ whu will wma wosch -wollman wulf yuripv zec From owner-svn-src-all@freebsd.org Fri Feb 14 04:16:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8541323FAB9; Fri, 14 Feb 2020 04:16:23 +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) server-signature RSA-PSS (4096 bits) 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 48Jg6v2xZYz424J; Fri, 14 Feb 2020 04:16:23 +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 5BD661DE52; Fri, 14 Feb 2020 04:16:23 +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 01E4GNcO077717; Fri, 14 Feb 2020 04:16:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E4GN9l077716; Fri, 14 Feb 2020 04:16:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002140416.01E4GN9l077716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 04:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357903 - head/contrib/ncurses/ncurses/base X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/ncurses/ncurses/base X-SVN-Commit-Revision: 357903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 04:16:23 -0000 Author: kevans Date: Fri Feb 14 04:16:22 2020 New Revision: 357903 URL: https://svnweb.freebsd.org/changeset/base/357903 Log: ncurses: correct check for gcc >= 5.0 The hack in question is intended to workaround seemingly bogus #line markers in cpp output. As far as I can tell, llvm cpp doesn't do this by default, so there's no reason to add -P. In our /bin/sh, the main incantation should be placed in a sub-shell in order to properly pipe the output to fgrep. The main motivation for this change is admittedly to stop emitting the noise about clang not being gcc in make -s buildworld MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22952 Modified: head/contrib/ncurses/ncurses/base/MKlib_gen.sh Modified: head/contrib/ncurses/ncurses/base/MKlib_gen.sh ============================================================================== --- head/contrib/ncurses/ncurses/base/MKlib_gen.sh Fri Feb 14 03:21:03 2020 (r357902) +++ head/contrib/ncurses/ncurses/base/MKlib_gen.sh Fri Feb 14 04:16:22 2020 (r357903) @@ -73,7 +73,7 @@ USE="$3" # determine if we are using gcc, and if so, what version because the proposed # solution uses a nonstandard option. PRG=`echo "$1" | $AWK '{ sub(/^[[:space:]]*/,""); sub(/[[:space:]].*$/, ""); print; }' || exit 0` -FSF=`"$PRG" --version 2>/dev/null || exit 0 | fgrep "Free Software Foundation" | head -n 1` +FSF=`("$PRG" --version 2>/dev/null || exit 0) | fgrep "Free Software Foundation" | head -n 1` ALL=`"$PRG" -dumpversion 2>/dev/null || exit 0` ONE=`echo "$ALL" | sed -e 's/\..*$//'` if test -n "$FSF" && test -n "$ALL" && test -n "$ONE" ; then From owner-svn-src-all@freebsd.org Fri Feb 14 09:25:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 505F9244EF9; Fri, 14 Feb 2020 09:25:30 +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) server-signature RSA-PSS (4096 bits) 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 48JnzZ1FSGz4HG9; Fri, 14 Feb 2020 09:25:30 +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 262A5216C6; Fri, 14 Feb 2020 09:25:30 +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 01E9PUse062626; Fri, 14 Feb 2020 09:25:30 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E9PUlM062625; Fri, 14 Feb 2020 09:25:30 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202002140925.01E9PUlM062625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 14 Feb 2020 09:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357904 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 357904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 09:25:30 -0000 Author: lwhsu Date: Fri Feb 14 09:25:29 2020 New Revision: 357904 URL: https://svnweb.freebsd.org/changeset/base/357904 Log: Properly fix GCC build in r357867 Submitted by: kib Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/net/randsleep.c Modified: head/tests/sys/net/randsleep.c ============================================================================== --- head/tests/sys/net/randsleep.c Fri Feb 14 04:16:22 2020 (r357903) +++ head/tests/sys/net/randsleep.c Fri Feb 14 09:25:29 2020 (r357904) @@ -37,7 +37,7 @@ #include #include -#define RANDOM_MAX (((long)1<<31) - 1) +#define RANDOM_MAX ((1U<<31) - 1) int main(int argc, char** argv){ useconds_t max_usecs, usecs; From owner-svn-src-all@freebsd.org Fri Feb 14 09:29:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE4F2244FAB; Fri, 14 Feb 2020 09:29:28 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48Jp476d7yz4HZ2; Fri, 14 Feb 2020 09:29:27 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f171.google.com with SMTP id j78so1027247ybg.12; Fri, 14 Feb 2020 01:29:27 -0800 (PST) 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=Z1jhfMlAPbZPjmVrTDXgt/CUO+0EHcsuNLVV8EwK2NI=; b=DcrmN5sYyUWN+kYNW6FyBZlE3C1GBHqMwLfIh3rjkbvEiQWOanHRAw6Dq1kjBWBwKD k82Dfj/z/ifcBljaOWrK17pxt7Jo40rUh3/97uuuKQYwApd3i1k+vzhpE9gANbDg5AiM 46hh/SOHFVILOehyMw2GLu2AkcS9HrGkdgZ3cm4pqGnenaOO456iET1TsHH7/E/C3Dxr N8IxsNPqNEtmITMleJw/CeX5Q/NGYIPCi2JwGKaFSG4CTUyqcDq//F9JKSr2WMcFMwxI EGoh0ETDdIsJm2TUkwZxoLl5DnUg3eu4jnYe03mJmo5xDlvC4qLo9+BPvrKGy5FY/DL8 BN8A== X-Gm-Message-State: APjAAAVrtyJ0wYzKoy1h52094iyZp6G5qUlb7mqezKGzev9VOVxPcQ22 2uvRJUo3UDedgX6liztmF5gW6t1JKE2rHbVLoWA= X-Google-Smtp-Source: APXvYqzSLb16eueQdfY0PKE9fWaQmL5w4YmZqMKLSvIjswxJTzrFIbFEKmPfajkqaTp0ReGQyFIcSHRSaDRJUzDtjJ4= X-Received: by 2002:a25:8452:: with SMTP id r18mr1772039ybm.176.1581672566506; Fri, 14 Feb 2020 01:29:26 -0800 (PST) MIME-Version: 1.0 References: <202002131905.01DJ5Ja6044695@repo.freebsd.org> <20200213213322.GL4808@kib.kiev.ua> In-Reply-To: <20200213213322.GL4808@kib.kiev.ua> From: Li-Wen Hsu Date: Fri, 14 Feb 2020 17:29:14 +0800 Message-ID: Subject: Re: svn commit: r357867 - head/tests/sys/net To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Jp476d7yz4HZ2 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.171 as permitted sender) smtp.mailfrom=lwhsufreebsd@gmail.com X-Spamd-Result: default: False [-4.72 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[171.219.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.72)[ip: (-8.85), ipnet: 209.85.128.0/17(-3.01), asn: 15169(-1.68), country: US(-0.05)]; FORGED_SENDER(0.30)[lwhsu@freebsd.org,lwhsufreebsd@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[171.219.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; 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-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 09:29:28 -0000 On Fri, Feb 14, 2020 at 5:33 AM Konstantin Belousov wrote: > On Thu, Feb 13, 2020 at 07:05:19PM +0000, Li-Wen Hsu wrote: > > -#define RANDOM_MAX ((1<<31) - 1) > > +#define RANDOM_MAX (((long)1<<31) - 1) > This still gives UB on ILP32 platforms. I believe the better fix would be > (1u << 31) - 1. Thanks for pointing this out. It is fixed this in r357904. Li-Wen From owner-svn-src-all@freebsd.org Fri Feb 14 09:36:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4364524526C; Fri, 14 Feb 2020 09:36:37 +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) server-signature RSA-PSS (4096 bits) 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 48JpDP13wqz4JDC; Fri, 14 Feb 2020 09:36:37 +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 0131A21896; Fri, 14 Feb 2020 09:36:37 +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 01E9aaR1068451; Fri, 14 Feb 2020 09:36:36 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01E9aZiw068445; Fri, 14 Feb 2020 09:36:35 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202002140936.01E9aZiw068445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 14 Feb 2020 09:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357905 - in head/tests/sys: common netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/tests/sys: common netinet netinet6 X-SVN-Commit-Revision: 357905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 09:36:37 -0000 Author: melifaro Date: Fri Feb 14 09:36:35 2020 New Revision: 357905 URL: https://svnweb.freebsd.org/changeset/base/357905 Log: Add basic IPDIVERT tests. Reviewed by: lwhsu,kp Differential Revision: https://reviews.freebsd.org/D23316 Added: head/tests/sys/common/divert.py (contents, props changed) head/tests/sys/netinet/divert.sh (contents, props changed) head/tests/sys/netinet6/divert.sh (contents, props changed) Modified: head/tests/sys/common/Makefile head/tests/sys/netinet/Makefile head/tests/sys/netinet6/Makefile Modified: head/tests/sys/common/Makefile ============================================================================== --- head/tests/sys/common/Makefile Fri Feb 14 09:25:29 2020 (r357904) +++ head/tests/sys/common/Makefile Fri Feb 14 09:36:35 2020 (r357905) @@ -3,5 +3,8 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/common ${PACKAGE}FILES+= vnet.subr +${PACKAGE}FILES+= divert.py + +${PACKAGE}FILESMODE_divert.py=0555 .include Added: head/tests/sys/common/divert.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/common/divert.py Fri Feb 14 09:36:35 2020 (r357905) @@ -0,0 +1,83 @@ +#!/usr/bin/env python +# - +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + + +import socket +import scapy.all as sc +import argparse + + +IPPROTO_DIVERT = 258 + + +def parse_args(): + parser = argparse.ArgumentParser(description='divert socket tester') + parser.add_argument('--dip', type=str, help='destination packet IP') + parser.add_argument('--divert_port', type=int, default=6668, + help='divert port to use') + parser.add_argument('--test_name', type=str, required=True, + help='test name to run') + return parser.parse_args() + + +def ipdivert_ip_output_remote_success(args): + packet = sc.IP(dst=args.dip) / sc.ICMP(type='echo-request') + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: + s.bind(('0.0.0.0', args.divert_port)) + s.sendto(bytes(packet), ('0.0.0.0', 0)) + + +def ipdivert_ip6_output_remote_success(args): + packet = sc.IPv6(dst=args.dip) / sc.ICMPv6EchoRequest() + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: + s.bind(('0.0.0.0', args.divert_port)) + s.sendto(bytes(packet), ('0.0.0.0', 0)) + + +def ipdivert_ip_input_local_success(args): + """Sends IPv4 packet to OS stack as inbound local packet.""" + packet = sc.IP(dst=args.dip) / sc.ICMP(type='echo-request') + with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as s: + s.bind(('0.0.0.0', args.divert_port)) + s.sendto(bytes(packet), (args.dip, 0)) + + +# XXX: IPv6 local divert is currently not supported +# TODO: add IPv4 ifname output verification + + +def main(): + args = parse_args() + test_ptr = globals()[args.test_name] + test_ptr(args) + + +if __name__ == '__main__': + main() Modified: head/tests/sys/netinet/Makefile ============================================================================== --- head/tests/sys/netinet/Makefile Fri Feb 14 09:25:29 2020 (r357904) +++ head/tests/sys/netinet/Makefile Fri Feb 14 09:36:35 2020 (r357905) @@ -9,7 +9,7 @@ ATF_TESTS_C= ip_reass_test \ so_reuseport_lb_test \ socket_afinet -ATF_TESTS_SH= fibs_test redirect +ATF_TESTS_SH= fibs_test redirect divert PROGS= udp_dontroute tcp_user_cookie Added: head/tests/sys/netinet/divert.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet/divert.sh Fri Feb 14 09:36:35 2020 (r357905) @@ -0,0 +1,148 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +load_divert_module() { + kldstat -q -n ipdivert + if [ $? -ne 0 ]; then + atf_skip "ipdivert module is not loaded" + fi +} + +atf_test_case "ipdivert_ip_output_remote_success" "cleanup" +ipdivert_ip_output_remote_success_head() { + + atf_set descr 'Test diverting IPv4 packet to remote destination' + atf_set require.user root + atf_set require.progs scapy +} + +ipdivert_ip_output_remote_success_body() { + + ids=65530 + id=`printf "%x" ${ids}` + if [ $$ -gt 65535 ]; then + xl=`printf "%x" $(($$ - 65535))` + yl="1" + else + xl=`printf "%x" $$` + yl="" + fi + + vnet_init + load_divert_module + + ip4a="192.0.2.5" + ip4b="192.0.2.6" + + script_name="../common/divert.py" + + epair=$(vnet_mkepair) + ifconfig ${epair}a up + ifconfig ${epair}a inet ${ip4a}/30 + + jname="v4t-${id}-${yl}-${xl}" + vnet_mkjail ${jname} ${epair}b + jexec ${jname} ifconfig ${epair}b up + jexec ${jname} ifconfig ${epair}b inet ${ip4b}/30 + + atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \ + --dip ${ip4b} --test_name ipdivert_ip_output_remote_success + + count=`jexec ${jname} netstat -s -p icmp | grep 'Input histogram:' -A8 | grep -c 'echo: '` + # Verify redirect got installed + atf_check_equal "1" "${count}" +} + +ipdivert_ip_output_remote_success_cleanup() { + + vnet_cleanup +} + +atf_test_case "ipdivert_ip_input_local_success" "cleanup" +ipdivert_ip_input_local_success_head() { + + atf_set descr 'Test diverting IPv4 packet to remote destination' + atf_set require.user root + atf_set require.progs scapy +} + +ipdivert_ip_input_local_success_body() { + + ids=65529 + id=`printf "%x" ${ids}` + if [ $$ -gt 65535 ]; then + xl=`printf "%x" $(($$ - 65535))` + yl="1" + else + xl=`printf "%x" $$` + yl="" + fi + + vnet_init + load_divert_module + + ip4a="192.0.2.5" + ip4b="192.0.2.6" + + script_name="../common/divert.py" + + epair=$(vnet_mkepair) + ifconfig ${epair}a up + ifconfig ${epair}a inet ${ip4a}/30 + + jname="v4t-${id}-${yl}-${xl}" + vnet_mkjail ${jname} ${epair}b + jexec ${jname} ifconfig ${epair}b up + jexec ${jname} ifconfig ${epair}b inet ${ip4b}/30 + + atf_check -s exit:0 jexec ${jname} $(atf_get_srcdir)/${script_name} \ + --dip ${ip4b} --test_name ipdivert_ip_input_local_success + + count=`jexec ${jname} netstat -s -p icmp | grep 'Input histogram:' -A8 | grep -c 'echo: '` + # Verify redirect got installed + atf_check_equal "1" "${count}" +} + +ipdivert_ip_input_local_success_cleanup() { + + vnet_cleanup +} + +atf_init_test_cases() +{ + + atf_add_test_case "ipdivert_ip_output_remote_success" + atf_add_test_case "ipdivert_ip_input_local_success" +} + +# end + Modified: head/tests/sys/netinet6/Makefile ============================================================================== --- head/tests/sys/netinet6/Makefile Fri Feb 14 09:25:29 2020 (r357904) +++ head/tests/sys/netinet6/Makefile Fri Feb 14 09:36:35 2020 (r357905) @@ -9,7 +9,8 @@ ATF_TESTS_SH= \ exthdr \ mld \ scapyi386 \ - redirect + redirect \ + divert ${PACKAGE}FILES+= exthdr.py ${PACKAGE}FILES+= mld.py Added: head/tests/sys/netinet6/divert.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netinet6/divert.sh Fri Feb 14 09:36:35 2020 (r357905) @@ -0,0 +1,103 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2020 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +load_divert_module() { + kldstat -q -n ipdivert + if [ $? -ne 0 ]; then + atf_skip "ipdivert module is not loaded" + fi +} + +atf_test_case "ipdivert_ip6_output_remote_success" "cleanup" +ipdivert_ip6_output_remote_success_head() { + + atf_set descr 'Test valid IPv6 redirect' + atf_set require.user root + atf_set require.progs scapy +} + +ipdivert_ip6_output_remote_success_body() { + + ids=65530 + id=`printf "%x" ${ids}` + if [ $$ -gt 65535 ]; then + xl=`printf "%x" $(($$ - 65535))` + yl="1" + else + xl=`printf "%x" $$` + yl="" + fi + + vnet_init + load_divert_module + + ip6a="2001:db8:6666:0000:${yl}:${id}:1:${xl}" + ip6b="2001:db8:6666:0000:${yl}:${id}:2:${xl}" + + script_name="../common/divert.py" + + epair=$(vnet_mkepair) + ifconfig ${epair}a up + ifconfig ${epair}a inet6 ${ip6a}/64 + + jname="v6t-${id}-${yl}-${xl}" + vnet_mkjail ${jname} ${epair}b + jexec ${jname} ifconfig ${epair}b up + jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/64 + + # wait for DAD to complete + sleep 2 + + # echo "LOCAL: ${local_ll_ip} ${local_ll_mac}" + # echo "REMOTE: ${remote_rtr_ll_ip} ${remote_rtr_mac}" + + atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \ + --dip ${ip6b} --test_name ipdivert_ip6_output_remote_success + + count=`jexec ${jname} netstat -s -p icmp6 | grep 'Input histogram:' -A1 | grep -c 'echo:'` + # Verify redirect got installed + atf_check_equal "1" "${count}" +} + +ipdivert_ip6_output_remote_success_cleanup() { + + vnet_cleanup +} + +atf_init_test_cases() +{ + + atf_add_test_case "ipdivert_ip6_output_remote_success" +} + +# end + From owner-svn-src-all@freebsd.org Fri Feb 14 10:17:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41F1B246059; Fri, 14 Feb 2020 10:17:26 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48Jq7V11bnz4Lwp; Fri, 14 Feb 2020 10:17:26 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qt1-f196.google.com with SMTP id e21so6569824qtp.13; Fri, 14 Feb 2020 02:17:26 -0800 (PST) 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=HtznAglzSiKEPVtNmBrsKvoJdP0RRQ9S39CaKBfoATY=; b=L8XTJ2qO0Ua610oVVKax8qTkuisfQV0w+tZ9g6M0Kg0B5RkyqYq4z8q3qnpRJQROR/ rgwu0iBmMAnDGTWff0aMKyHryiLnWsjvonwNmPaWWXTprO7vczW8R7VIR8XII4wRc+Jz HmvZyMpsH+6q+Z+ZH46zAgQ2oUhtBkMg7hOoplswlxPoqvXa6PVYsEIBukbtuS2GZlTg ehdi0WUdYP5ORFwZQEuXpLJL21Kc40BlgkWNK5TxIfIzIm0zTotYNRFX/I9eBNWgsIxP ua5w0/xNJ+0QtksHrBUaIsO3lQ9jK7FFmJSHd2mZExZtZxnrx12FKVoxgvr1/JkI+zYC wncw== X-Gm-Message-State: APjAAAXPVes9qTTFaIfcQ/LXvUxq/f1+O4ayWNii1QyWND5pY2gUFNDy 7VS05qGZVnjEalu4fmKGG5MLYl55nD8DxhsnySkVBFAZ X-Google-Smtp-Source: APXvYqyARwiciuI4AAGDwgDbSONluJwx1uicM+zy3j+2tsYWPpbXoh+qEcR1f+cV1I47FppO6TQtWqI+GPZ1stpfRCE= X-Received: by 2002:ac8:3ac3:: with SMTP id x61mr1895096qte.25.1581675444514; Fri, 14 Feb 2020 02:17:24 -0800 (PST) MIME-Version: 1.0 References: <202002132342.01DNg9Bk010493@repo.freebsd.org> In-Reply-To: <202002132342.01DNg9Bk010493@repo.freebsd.org> From: Antoine Brodin Date: Fri, 14 Feb 2020 11:17:12 +0100 Message-ID: Subject: Re: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Jq7V11bnz4Lwp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 10:17:26 -0000 On Fri, Feb 14, 2020 at 12:42 AM Konstantin Belousov wrote: > > Author: kib > Date: Thu Feb 13 23:42:09 2020 > New Revision: 357895 > URL: https://svnweb.freebsd.org/changeset/base/357895 > > Log: > Handle non-plt IRELATIVE relocations, at least for x86. > > lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. > > Reported, reviewed, and tested by: dim (amd64, previous version) > Discussed with: emaste > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D23652 Hi, This broke lang/gcc* For instance: http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p526077_s357895/logs/errors/gcc9-9.2.0_1.log Antoine From owner-svn-src-all@freebsd.org Fri Feb 14 11:20:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA68C24757A; Fri, 14 Feb 2020 11:20:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JrXB4ZFrz4QGD; Fri, 14 Feb 2020 11:20:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97EDF22BBA; Fri, 14 Feb 2020 11:20:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EBKQOn029164; Fri, 14 Feb 2020 11:20:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EBKQOY029163; Fri, 14 Feb 2020 11:20:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141120.01EBKQOY029163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 11:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357906 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 11:20:26 -0000 Author: mjg Date: Fri Feb 14 11:20:25 2020 New Revision: 357906 URL: https://svnweb.freebsd.org/changeset/base/357906 Log: lockmgr: retire the unused lockmgr_unlock_fast_path routine Modified: head/sys/kern/kern_lock.c head/sys/sys/lockmgr.h Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Feb 14 09:36:35 2020 (r357905) +++ head/sys/kern/kern_lock.c Fri Feb 14 11:20:25 2020 (r357906) @@ -1114,46 +1114,6 @@ out: return (0); } -int -lockmgr_unlock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk) -{ - struct lock_class *class; - uintptr_t x, tid; - const char *file; - int line; - - if (KERNEL_PANICKED()) - return (0); - - file = __FILE__; - line = __LINE__; - - _lockmgr_assert(lk, KA_LOCKED, file, line); - x = lk->lk_lock; - if (__predict_true(x & LK_SHARE) != 0) { - lockmgr_note_shared_release(lk, file, line); - if (lockmgr_sunlock_try(lk, &x)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_READER); - } else { - return (lockmgr_sunlock_hard(lk, x, flags, ilk, file, line)); - } - } else { - tid = (uintptr_t)curthread; - lockmgr_note_exclusive_release(lk, file, line); - if (!lockmgr_recursed(lk) && - atomic_cmpset_rel_ptr(&lk->lk_lock, tid, LK_UNLOCKED)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_WRITER); - } else { - return (lockmgr_xunlock_hard(lk, x, flags, ilk, file, line)); - } - } - if (__predict_false(flags & LK_INTERLOCK)) { - class = LOCK_CLASS(ilk); - class->lc_unlock(ilk); - } - return (0); -} - /* * Lightweight entry points for common operations. * Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Fri Feb 14 09:36:35 2020 (r357905) +++ head/sys/sys/lockmgr.h Fri Feb 14 11:20:25 2020 (r357906) @@ -72,8 +72,6 @@ int __lockmgr_args(struct lock *lk, u_int flags, stru const char *wmesg, int prio, int timo, const char *file, int line); int lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line); -int lockmgr_unlock_fast_path(struct lock *lk, u_int flags, - struct lock_object *ilk); int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_unlock(struct lock *lk); From owner-svn-src-all@freebsd.org Fri Feb 14 11:21:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15E352476A5; Fri, 14 Feb 2020 11:21:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JrYN6srwz4QV0; Fri, 14 Feb 2020 11:21:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E740922C07; Fri, 14 Feb 2020 11:21:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EBLSwM030612; Fri, 14 Feb 2020 11:21:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EBLSVF030609; Fri, 14 Feb 2020 11:21:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141121.01EBLSVF030609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 11:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357907 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 11:21:29 -0000 Author: mjg Date: Fri Feb 14 11:21:28 2020 New Revision: 357907 URL: https://svnweb.freebsd.org/changeset/base/357907 Log: lockmgr: rename lock_fast_path to lock_flags The routine is not much of a fast path and the flags name better describes its purpose. Modified: head/sys/kern/kern_lock.c head/sys/kern/vfs_default.c head/sys/sys/lockmgr.h Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/kern/kern_lock.c Fri Feb 14 11:21:28 2020 (r357907) @@ -934,7 +934,7 @@ out: } int -lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk, +lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line) { struct lock_class *class; @@ -1123,7 +1123,7 @@ out: * 2. returning with an error after sleep * 3. unlocking the interlock * - * If in doubt, use lockmgr_*_fast_path. + * If in doubt, use lockmgr_lock_flags. */ int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line) Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/kern/vfs_default.c Fri Feb 14 11:21:28 2020 (r357907) @@ -513,7 +513,7 @@ vop_stdlock(ap) struct mtx *ilk; ilk = VI_MTX(vp); - return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags, + return (lockmgr_lock_flags(vp->v_vnlock, ap->a_flags, &ilk->lock_object, ap->a_file, ap->a_line)); } Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/sys/lockmgr.h Fri Feb 14 11:21:28 2020 (r357907) @@ -70,7 +70,7 @@ struct thread; */ int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, const char *wmesg, int prio, int timo, const char *file, int line); -int lockmgr_lock_fast_path(struct lock *lk, u_int flags, +int lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line); int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line); From owner-svn-src-all@freebsd.org Fri Feb 14 11:22:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38A2B2478F4; Fri, 14 Feb 2020 11:22:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JrZD5Rmhz4QnY; Fri, 14 Feb 2020 11:22:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B636122D58; Fri, 14 Feb 2020 11:22:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EBMC6a034715; Fri, 14 Feb 2020 11:22:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EBMCG1034714; Fri, 14 Feb 2020 11:22:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141122.01EBMCG1034714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 11:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357908 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 11:22:13 -0000 Author: mjg Date: Fri Feb 14 11:22:12 2020 New Revision: 357908 URL: https://svnweb.freebsd.org/changeset/base/357908 Log: fd: annotate finstall with prediction branches Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Feb 14 11:21:28 2020 (r357907) +++ head/sys/kern/kern_descrip.c Fri Feb 14 11:22:12 2020 (r357908) @@ -1978,7 +1978,8 @@ finstall(struct thread *td, struct file *fp, int *fd, if (!fhold(fp)) return (EBADF); FILEDESC_XLOCK(fdp); - if ((error = fdalloc(td, 0, fd))) { + error = fdalloc(td, 0, fd); + if (__predict_false(error != 0)) { FILEDESC_XUNLOCK(fdp); fdrop(fp, td); return (error); From owner-svn-src-all@freebsd.org Fri Feb 14 11:51:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99CA823065B; Fri, 14 Feb 2020 11:51:48 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48JsDN1zNzz4SJJ; Fri, 14 Feb 2020 11:51:47 +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 01EBpXQG009882 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 14 Feb 2020 13:51:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01EBpXQG009882 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01EBpXI4009881; Fri, 14 Feb 2020 13:51:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 14 Feb 2020 13:51:33 +0200 From: Konstantin Belousov To: Antoine Brodin Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 Message-ID: <20200214115133.GN4808@kib.kiev.ua> References: <202002132342.01DNg9Bk010493@repo.freebsd.org> 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: 48JsDN1zNzz4SJJ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 11:51:48 -0000 On Fri, Feb 14, 2020 at 11:17:12AM +0100, Antoine Brodin wrote: > On Fri, Feb 14, 2020 at 12:42 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Thu Feb 13 23:42:09 2020 > > New Revision: 357895 > > URL: https://svnweb.freebsd.org/changeset/base/357895 > > > > Log: > > Handle non-plt IRELATIVE relocations, at least for x86. > > > > lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. > > > > Reported, reviewed, and tested by: dim (amd64, previous version) > > Discussed with: emaste > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D23652 > > Hi, > > This broke lang/gcc* > For instance: > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p526077_s357895/logs/errors/gcc9-9.2.0_1.log > There should be the configure log with more details. Also hopefully the binary that segfaulted is also around, please provide me with it as well. From owner-svn-src-all@freebsd.org Fri Feb 14 11:56:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEAA62309E8; Fri, 14 Feb 2020 11:56:50 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JsLB5Wz2z4Sdh; Fri, 14 Feb 2020 11:56:50 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B910923304; Fri, 14 Feb 2020 11:56:50 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EBuoUH052783; Fri, 14 Feb 2020 11:56:50 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EBuo4u052782; Fri, 14 Feb 2020 11:56:50 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141156.01EBuo4u052782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 11:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357909 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 11:56:50 -0000 Author: mjg Date: Fri Feb 14 11:56:50 2020 New Revision: 357909 URL: https://svnweb.freebsd.org/changeset/base/357909 Log: lockmgr: add a change missed in r357907 Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Feb 14 11:22:12 2020 (r357908) +++ head/sys/kern/vfs_default.c Fri Feb 14 11:56:50 2020 (r357909) @@ -573,7 +573,7 @@ vop_lock(ap) } other: ilk = VI_MTX(vp); - return (lockmgr_lock_fast_path(&vp->v_lock, flags, + return (lockmgr_lock_flags(&vp->v_lock, flags, &ilk->lock_object, ap->a_file, ap->a_line)); } From owner-svn-src-all@freebsd.org Fri Feb 14 12:37:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC5B423326B; Fri, 14 Feb 2020 12:37:53 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48JtFX5xLlz4Wvv; Fri, 14 Feb 2020 12:37:52 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qk1-f196.google.com with SMTP id u124so8480377qkh.13; Fri, 14 Feb 2020 04:37:52 -0800 (PST) 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=8HRRq0C3BcYiOwYBH5L8k8/i/bJOjSGV+LlZbNlHfLc=; b=S/6752zdoFA4LJdH1aelxtcYU4KH617Jq4pfy0W/9MLhU7xMhFoFov8S/mUERo1wVG C30so/GCW+jcN0RXaV+v42MrZ3AtaZySge3hbmKQuYSfG9Njb6SDlns8pHW9bfi/2E1T Xjj470B0x/N70KaFQ+qN8EEZlvz3jPoa6hXPs8tPuWIy2eWqP9LlabNohAX/AWqNFK+f KJ+Ks+Zn1krqkK6R0q/+aTEvMj6+a4ZS5qoUEhpc9zDBmKgHpln3Sy8Z7ygMEaIzPKCF ivCFWv5yaUTT88xmDPF4kUAcJdAriVHgyBwRSqB27kXUa4a3FCafgX3NPzoj0CeyTh71 4Xkg== X-Gm-Message-State: APjAAAUbqJRbx43k80w0xo/MlMQO/FLEj0SqF6ylCA/TiiTm2r7l3eDX OayzDLe63V5TRY6XH9gE1uhp0ni571Ee+c7Y8Rc= X-Google-Smtp-Source: APXvYqxlULi2xhHR/IQpJbS4QvEgB8oApawurUHgNSWgQt9oczz12MAd8Cj58upksRXz2mi9zS8NYM74A7vsTYDKrgI= X-Received: by 2002:a05:620a:7eb:: with SMTP id k11mr2232548qkk.486.1581683871497; Fri, 14 Feb 2020 04:37:51 -0800 (PST) MIME-Version: 1.0 References: <202002132342.01DNg9Bk010493@repo.freebsd.org> <20200214115133.GN4808@kib.kiev.ua> In-Reply-To: <20200214115133.GN4808@kib.kiev.ua> From: Antoine Brodin Date: Fri, 14 Feb 2020 13:37:40 +0100 Message-ID: Subject: Re: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48JtFX5xLlz4Wvv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of antoinebrodinfreebsd@gmail.com designates 209.85.222.196 as permitted sender) smtp.mailfrom=antoinebrodinfreebsd@gmail.com X-Spamd-Result: default: False [-3.84 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[196.222.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.84)[ip: (-4.46), ipnet: 209.85.128.0/17(-3.01), asn: 15169(-1.68), country: US(-0.05)]; FORGED_SENDER(0.30)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[196.222.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 12:37:53 -0000 On Fri, Feb 14, 2020 at 12:51 PM Konstantin Belousov wrote: > > On Fri, Feb 14, 2020 at 11:17:12AM +0100, Antoine Brodin wrote: > > On Fri, Feb 14, 2020 at 12:42 AM Konstantin Belousov wrote: > > > > > > Author: kib > > > Date: Thu Feb 13 23:42:09 2020 > > > New Revision: 357895 > > > URL: https://svnweb.freebsd.org/changeset/base/357895 > > > > > > Log: > > > Handle non-plt IRELATIVE relocations, at least for x86. > > > > > > lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. > > > > > > Reported, reviewed, and tested by: dim (amd64, previous version) > > > Discussed with: emaste > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > > Differential revision: https://reviews.freebsd.org/D23652 > > > > Hi, > > > > This broke lang/gcc* > > For instance: > > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p526077_s357895/logs/errors/gcc9-9.2.0_1.log > > > > There should be the configure log with more details. > Also hopefully the binary that segfaulted is also around, please > provide me with it as well. The config.log is available at: https://people.freebsd.org/~antoine/config.log It seems that contest is deleted after the segfault. Antoine From owner-svn-src-all@freebsd.org Fri Feb 14 12:45:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEDD42339D7; Fri, 14 Feb 2020 12:45:41 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48JtQX731fz4Xfs; Fri, 14 Feb 2020 12:45:40 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-qv1-f65.google.com with SMTP id o18so4201322qvf.1; Fri, 14 Feb 2020 04:45:40 -0800 (PST) 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=D3ZOlg1pE9SPz01r6e919fddPIzo3yl8kpR6SUSqHDQ=; b=hgabsLYGLPLPQ/MT1H08vuEuzTOV+W24wGM+YgEV0mA0FW7otkNeIXyLL9vTVvNEHp h8aLVEIarqiLN6KufQdlzXO7O9maJRW4A06iIZQ0KfClVYaIa4+X8HFyktshBie7Cqjp H4aEegrvU8W1z94FEP+ECOlD6BGHU2YNdtRlEFvj2Ko79AETwExoykrXmv/wnmaZRkXb aZXnvfyuxin5qVC1zTGMnWJm3K1w17wRdZ+HYmigBF3t6VnXdM7QdKixcP0U7Zjo58LG 0FMiCYm+jKwCWmZz8V8nlpSOzLVdnDN7skpR0bv8LU9bdCG+Ocb39ifUcZBQZiezLRWu BLRQ== X-Gm-Message-State: APjAAAVemcbTTEk9vYLizoKkW6xxn5WKSmXL5T6XhcHaPJueoSFKlpP4 kvdHf/Pwvt4hmuJZK1454D6ocN87DAiXP1YyCCc= X-Google-Smtp-Source: APXvYqwwY0GloriN2pQ3FHq2ojKhcXFtUrRCJdC0cmemVMZJwbBXBDSFvSBb3tx2my75R41th4YuPb52mj97fvnOykk= X-Received: by 2002:ad4:52eb:: with SMTP id p11mr1803214qvu.211.1581684340063; Fri, 14 Feb 2020 04:45:40 -0800 (PST) MIME-Version: 1.0 References: <202002132342.01DNg9Bk010493@repo.freebsd.org> <20200214115133.GN4808@kib.kiev.ua> In-Reply-To: From: Antoine Brodin Date: Fri, 14 Feb 2020 13:45:28 +0100 Message-ID: Subject: Re: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48JtQX731fz4Xfs X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of antoinebrodinfreebsd@gmail.com designates 209.85.219.65 as permitted sender) smtp.mailfrom=antoinebrodinfreebsd@gmail.com X-Spamd-Result: default: False [-2.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; 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]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[65.219.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.95)[ipnet: 209.85.128.0/17(-3.01), asn: 15169(-1.68), country: US(-0.05)]; FORGED_SENDER(0.30)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[65.219.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 12:45:41 -0000 On Fri, Feb 14, 2020 at 1:37 PM Antoine Brodin wrote: > > On Fri, Feb 14, 2020 at 12:51 PM Konstantin Belousov > wrote: > > > > On Fri, Feb 14, 2020 at 11:17:12AM +0100, Antoine Brodin wrote: > > > On Fri, Feb 14, 2020 at 12:42 AM Konstantin Belousov wrote: > > > > > > > > Author: kib > > > > Date: Thu Feb 13 23:42:09 2020 > > > > New Revision: 357895 > > > > URL: https://svnweb.freebsd.org/changeset/base/357895 > > > > > > > > Log: > > > > Handle non-plt IRELATIVE relocations, at least for x86. > > > > > > > > lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. > > > > > > > > Reported, reviewed, and tested by: dim (amd64, previous version) > > > > Discussed with: emaste > > > > Sponsored by: The FreeBSD Foundation > > > > MFC after: 1 week > > > > Differential revision: https://reviews.freebsd.org/D23652 > > > > > > Hi, > > > > > > This broke lang/gcc* > > > For instance: > > > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p526077_s357895/logs/errors/gcc9-9.2.0_1.log > > > > > > > There should be the configure log with more details. > > Also hopefully the binary that segfaulted is also around, please > > provide me with it as well. > > The config.log is available at: > https://people.freebsd.org/~antoine/config.log > > It seems that contest is deleted after the segfault. A "hello world" compiled with cc -m32 or gcc -m32 runs fine before the change, but segfaults after. Antoine From owner-svn-src-all@freebsd.org Fri Feb 14 12:59:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DE24233E75; Fri, 14 Feb 2020 12:59:28 +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) server-signature RSA-PSS (4096 bits) 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 48JtkS0SSBz4YDk; Fri, 14 Feb 2020 12:59:28 +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 0AF3E23E10; Fri, 14 Feb 2020 12:59:28 +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 01ECxRED088929; Fri, 14 Feb 2020 12:59:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ECxRbd088927; Fri, 14 Feb 2020 12:59:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002141259.01ECxRbd088927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 12:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357910 - head/libexec/rtld-elf/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/libexec/rtld-elf/i386 X-SVN-Commit-Revision: 357910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 12:59:28 -0000 Author: kib Date: Fri Feb 14 12:59:27 2020 New Revision: 357910 URL: https://svnweb.freebsd.org/changeset/base/357910 Log: r357895: fix typo in the relocation name for i386 IRELATIVE. Reported by: antoine Sponsored by: The FreeBSD Foundation MFC after: 6 days Modified: head/libexec/rtld-elf/i386/reloc.c Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Fri Feb 14 11:56:50 2020 (r357909) +++ head/libexec/rtld-elf/i386/reloc.c Fri Feb 14 12:59:27 2020 (r357910) @@ -392,7 +392,7 @@ reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstat obj->irelative = false; rellim = (const Elf_Rel *)((const char *)obj->pltrel + obj->pltrelsize); for (rel = obj->pltrel; rel < rellim; rel++) { - if (ELF_R_TYPE(rel->r_info) == R_386_RELATIVE) + if (ELF_R_TYPE(rel->r_info) == R_386_IRELATIVE) reloc_iresolve_one(obj, rel, lockstate); } return (0); From owner-svn-src-all@freebsd.org Fri Feb 14 13:00:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6E30233F64; Fri, 14 Feb 2020 13:00:36 +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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Jtlm3335z4YMx; Fri, 14 Feb 2020 13:00:36 +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 01ED0SD7025973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 14 Feb 2020 15:00:31 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 01ED0SD7025973 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 01ED0S9u025972; Fri, 14 Feb 2020 15:00:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 14 Feb 2020 15:00:28 +0200 From: Konstantin Belousov To: Antoine Brodin Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r357895 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 Message-ID: <20200214130028.GP4808@kib.kiev.ua> References: <202002132342.01DNg9Bk010493@repo.freebsd.org> <20200214115133.GN4808@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: 48Jtlm3335z4YMx X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:00:36 -0000 On Fri, Feb 14, 2020 at 01:37:40PM +0100, Antoine Brodin wrote: > On Fri, Feb 14, 2020 at 12:51 PM Konstantin Belousov > wrote: > > > > On Fri, Feb 14, 2020 at 11:17:12AM +0100, Antoine Brodin wrote: > > > On Fri, Feb 14, 2020 at 12:42 AM Konstantin Belousov wrote: > > > > > > > > Author: kib > > > > Date: Thu Feb 13 23:42:09 2020 > > > > New Revision: 357895 > > > > URL: https://svnweb.freebsd.org/changeset/base/357895 > > > > > > > > Log: > > > > Handle non-plt IRELATIVE relocations, at least for x86. > > > > > > > > lld 10.0 seems to generate this relocation for rdtsc_mb() ifunc in our libc. > > > > > > > > Reported, reviewed, and tested by: dim (amd64, previous version) > > > > Discussed with: emaste > > > > Sponsored by: The FreeBSD Foundation > > > > MFC after: 1 week > > > > Differential revision: https://reviews.freebsd.org/D23652 > > > > > > Hi, > > > > > > This broke lang/gcc* > > > For instance: > > > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p526077_s357895/logs/errors/gcc9-9.2.0_1.log > > > > > > > There should be the configure log with more details. > > Also hopefully the binary that segfaulted is also around, please > > provide me with it as well. > > The config.log is available at: > https://people.freebsd.org/~antoine/config.log > > It seems that contest is deleted after the segfault. It is enough information I think. The problem happened with -m32, i.e. 32bit binaries. I expect that r357910 fix the bug. Thank you for noting this so fast. From owner-svn-src-all@freebsd.org Fri Feb 14 13:08:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C53C4234299; Fri, 14 Feb 2020 13:08:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JtxC4jw1z4Ytt; Fri, 14 Feb 2020 13:08:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82FA123FDA; Fri, 14 Feb 2020 13:08:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ED8l8f094753; Fri, 14 Feb 2020 13:08:47 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ED8kdt094749; Fri, 14 Feb 2020 13:08:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141308.01ED8kdt094749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 13:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357911 - in head/sys: kern security/audit sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/audit sys X-SVN-Commit-Revision: 357911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:08:47 -0000 Author: mjg Date: Fri Feb 14 13:08:46 2020 New Revision: 357911 URL: https://svnweb.freebsd.org/changeset/base/357911 Log: Annotate branches in the syscall path This in particular significantly shortens amd64_syscall, which otherwise keeps jumping forward over 2KB of code in total. Note some of these branches should be either eliminated altogether or coalesced. Modified: head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/security/audit/audit.h head/sys/sys/ktrace.h Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Fri Feb 14 12:59:27 2020 (r357910) +++ head/sys/kern/subr_syscall.c Fri Feb 14 13:08:46 2020 (r357911) @@ -69,7 +69,7 @@ syscallenter(struct thread *td) if (__predict_false(td->td_cowgen != p->p_cowgen)) thread_cow_update(td); traced = (p->p_flag & P_TRACED) != 0; - if (traced || td->td_dbgflags & TDB_USERWR) { + if (__predict_false(traced || td->td_dbgflags & TDB_USERWR)) { PROC_LOCK(p); td->td_dbgflags &= ~TDB_USERWR; if (traced) @@ -85,19 +85,19 @@ syscallenter(struct thread *td) (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "arg0:%p", sa->args[0], "arg1:%p", sa->args[1], "arg2:%p", sa->args[2]); - if (error != 0) { + if (__predict_false(error != 0)) { td->td_errno = error; goto retval; } STOPEVENT(p, S_SCE, sa->narg); - if ((p->p_flag & P_TRACED) != 0) { + if (__predict_false((p->p_flag & P_TRACED) != 0)) { PROC_LOCK(p); if (p->p_ptevents & PTRACE_SCE) ptracestop((td), SIGTRAP, NULL); PROC_UNLOCK(p); } - if ((td->td_dbgflags & TDB_USERWR) != 0) { + if (__predict_false((td->td_dbgflags & TDB_USERWR) != 0)) { /* * Reread syscall number and arguments if debugger * modified registers or memory. @@ -118,8 +118,8 @@ syscallenter(struct thread *td) * In capability mode, we only allow access to system calls * flagged with SYF_CAPENABLED. */ - if (IN_CAPABILITY_MODE(td) && - !(sa->callp->sy_flags & SYF_CAPENABLED)) { + if (__predict_false(IN_CAPABILITY_MODE(td) && + !(sa->callp->sy_flags & SYF_CAPENABLED))) { td->td_errno = error = ECAPMODE; goto retval; } @@ -152,7 +152,7 @@ syscallenter(struct thread *td) AUDIT_SYSCALL_EXIT(error, td); /* Save the latest error return value. */ - if ((td->td_pflags & TDP_NERRNO) == 0) + if (__predict_false((td->td_pflags & TDP_NERRNO) == 0)) td->td_errno = error; #ifdef KDTRACE_HOOKS @@ -168,7 +168,7 @@ syscallenter(struct thread *td) (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "error:%d", error, "retval0:%#lx", td->td_retval[0], "retval1:%#lx", td->td_retval[1]); - if (traced) { + if (__predict_false(traced)) { PROC_LOCK(p); td->td_dbgflags &= ~TDB_SCE; PROC_UNLOCK(p); @@ -189,9 +189,10 @@ syscallret(struct thread *td) p = td->td_proc; sa = &td->td_sa; - if ((trap_enotcap || (p->p_flag2 & P2_TRAPCAP) != 0) && - IN_CAPABILITY_MODE(td)) { - if (td->td_errno == ENOTCAPABLE || td->td_errno == ECAPMODE) { + if (__predict_false(td->td_errno == ENOTCAPABLE || + td->td_errno == ECAPMODE)) { + if ((trap_enotcap || + (p->p_flag2 & P2_TRAPCAP) != 0) && IN_CAPABILITY_MODE(td)) { ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGTRAP; ksi.ksi_errno = td->td_errno; @@ -211,20 +212,21 @@ syscallret(struct thread *td) } #endif - if (p->p_flag & P_TRACED) { + traced = 0; + if (__predict_false(p->p_flag & P_TRACED)) { traced = 1; PROC_LOCK(p); td->td_dbgflags |= TDB_SCX; PROC_UNLOCK(p); - } else - traced = 0; + } /* * This works because errno is findable through the * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ STOPEVENT(p, S_SCX, sa->code); - if (traced || (td->td_dbgflags & (TDB_EXEC | TDB_FORK)) != 0) { + if (__predict_false(traced || + (td->td_dbgflags & (TDB_EXEC | TDB_FORK)) != 0)) { PROC_LOCK(p); /* * If tracing the execed process, trap to the debugger Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Fri Feb 14 12:59:27 2020 (r357910) +++ head/sys/kern/subr_trap.c Fri Feb 14 13:08:46 2020 (r357911) @@ -141,13 +141,13 @@ userret(struct thread *td, struct trapframe *frame) * If this thread tickled GEOM, we need to wait for the giggling to * stop before we return to userland */ - if (td->td_pflags & TDP_GEOM) + if (__predict_false(td->td_pflags & TDP_GEOM)) g_waitidle(); /* * Charge system time if profiling. */ - if (p->p_flag & P_PROFIL) + if (__predict_false(p->p_flag & P_PROFIL)) addupc_task(td, TRAPF_PC(frame), td->td_pticks * psratio); #ifdef HWPMC_HOOKS Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Fri Feb 14 12:59:27 2020 (r357910) +++ head/sys/security/audit/audit.h Fri Feb 14 13:08:46 2020 (r357911) @@ -378,7 +378,7 @@ void audit_thread_free(struct thread *td); } while (0) #define AUDIT_SYSCALL_ENTER(code, td) do { \ - if (audit_syscalls_enabled) { \ + if (__predict_false(audit_syscalls_enabled)) { \ audit_syscall_enter(code, td); \ } \ } while (0) Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Fri Feb 14 12:59:27 2020 (r357910) +++ head/sys/sys/ktrace.h Fri Feb 14 13:08:46 2020 (r357911) @@ -73,7 +73,7 @@ struct ktr_header { #define KTRPOINT(td, type) (__predict_false(KTRCHECK((td), (type)))) #define KTRCHECKDRAIN(td) (!(STAILQ_EMPTY(&(td)->td_proc->p_ktr))) #define KTRUSERRET(td) do { \ - if (KTRCHECKDRAIN(td)) \ + if (__predict_false(KTRCHECKDRAIN(td))) \ ktruserret(td); \ } while (0) From owner-svn-src-all@freebsd.org Fri Feb 14 13:09:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FE1F234328; Fri, 14 Feb 2020 13:09:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JtyG0V17z4Z2Q; Fri, 14 Feb 2020 13:09:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08EFB23FDB; Fri, 14 Feb 2020 13:09:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ED9fk4094833; Fri, 14 Feb 2020 13:09:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ED9fg9094830; Fri, 14 Feb 2020 13:09:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141309.01ED9fg9094830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 13:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357912 - in head/sys: kern security/audit sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/audit sys X-SVN-Commit-Revision: 357912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:09:42 -0000 Author: mjg Date: Fri Feb 14 13:09:41 2020 New Revision: 357912 URL: https://svnweb.freebsd.org/changeset/base/357912 Log: Merge audit and systrace checks This further shortens the syscall routine by not having to re-check after the system call. Modified: head/sys/kern/subr_syscall.c head/sys/security/audit/audit.h head/sys/sys/sysent.h Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Fri Feb 14 13:08:46 2020 (r357911) +++ head/sys/kern/subr_syscall.c Fri Feb 14 13:09:41 2020 (r357912) @@ -131,15 +131,6 @@ syscallenter(struct thread *td) goto retval; } -#ifdef KDTRACE_HOOKS - /* Give the syscall:::entry DTrace probe a chance to fire. */ - if (__predict_false(systrace_enabled && sa->callp->sy_entry != 0)) - (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); -#endif - - /* Let system calls set td_errno directly. */ - td->td_pflags &= ~TDP_NERRNO; - /* * Fetch fast sigblock value at the time of syscall * entry because sleepqueue primitives might call @@ -147,20 +138,32 @@ syscallenter(struct thread *td) */ fetch_sigfastblock(td); - AUDIT_SYSCALL_ENTER(sa->code, td); - error = (sa->callp->sy_call)(td, sa->args); - AUDIT_SYSCALL_EXIT(error, td); + /* Let system calls set td_errno directly. */ + td->td_pflags &= ~TDP_NERRNO; - /* Save the latest error return value. */ - if (__predict_false((td->td_pflags & TDP_NERRNO) == 0)) - td->td_errno = error; - + if (__predict_false(systrace_enabled || AUDIT_SYSCALL_ENTER(sa->code, td))) { #ifdef KDTRACE_HOOKS - /* Give the syscall:::return DTrace probe a chance to fire. */ - if (__predict_false(systrace_enabled && sa->callp->sy_return != 0)) - (*systrace_probe_func)(sa, SYSTRACE_RETURN, - error ? -1 : td->td_retval[0]); + /* Give the syscall:::entry DTrace probe a chance to fire. */ + if (__predict_false(sa->callp->sy_entry != 0)) + (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif + error = (sa->callp->sy_call)(td, sa->args); + /* Save the latest error return value. */ + if (__predict_false((td->td_pflags & TDP_NERRNO) == 0)) + td->td_errno = error; + AUDIT_SYSCALL_EXIT(error, td); +#ifdef KDTRACE_HOOKS + /* Give the syscall:::return DTrace probe a chance to fire. */ + if (__predict_false(sa->callp->sy_return != 0)) + (*systrace_probe_func)(sa, SYSTRACE_RETURN, + error ? -1 : td->td_retval[0]); +#endif + } else { + error = (sa->callp->sy_call)(td, sa->args); + /* Save the latest error return value. */ + if (__predict_false((td->td_pflags & TDP_NERRNO) == 0)) + td->td_errno = error; + } syscall_thread_exit(td, sa->callp); retval: Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Fri Feb 14 13:08:46 2020 (r357911) +++ head/sys/security/audit/audit.h Fri Feb 14 13:09:41 2020 (r357912) @@ -377,11 +377,14 @@ void audit_thread_free(struct thread *td); audit_arg_vnode2((vp)); \ } while (0) -#define AUDIT_SYSCALL_ENTER(code, td) do { \ +#define AUDIT_SYSCALL_ENTER(code, td) ({ \ + bool _audit_entered = false; \ if (__predict_false(audit_syscalls_enabled)) { \ audit_syscall_enter(code, td); \ + _audit_entered = true; \ } \ -} while (0) + _audit_entered; \ +}) /* * Wrap the audit_syscall_exit() function so that it is called only when @@ -449,7 +452,7 @@ void audit_thread_free(struct thread *td); #define AUDIT_ARG_VNODE1(vp) #define AUDIT_ARG_VNODE2(vp) -#define AUDIT_SYSCALL_ENTER(code, td) +#define AUDIT_SYSCALL_ENTER(code, td) 0 #define AUDIT_SYSCALL_EXIT(error, td) #define AUDIT_SYSCLOSE(p, fd) Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Feb 14 13:08:46 2020 (r357911) +++ head/sys/sys/sysent.h Fri Feb 14 13:09:41 2020 (r357912) @@ -54,7 +54,11 @@ typedef void (*systrace_probe_func_t)(struct syscall_a typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *); #ifdef _KERNEL +#ifdef KDTRACE_HOOKS extern bool systrace_enabled; +#else +#define systrace_enabled 0 +#endif #endif extern systrace_probe_func_t systrace_probe_func; From owner-svn-src-all@freebsd.org Fri Feb 14 13:10:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19DEF2343F4; Fri, 14 Feb 2020 13:10:53 +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) server-signature RSA-PSS (4096 bits) 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 48Jtzc5HGhz4ZBG; Fri, 14 Feb 2020 13:10:52 +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 B0AF923FFF; Fri, 14 Feb 2020 13:10:52 +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 01EDAqPq096501; Fri, 14 Feb 2020 13:10:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EDAqpG096500; Fri, 14 Feb 2020 13:10:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002141310.01EDAqpG096500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 13:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357913 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 357913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:10:53 -0000 Author: kib Date: Fri Feb 14 13:10:52 2020 New Revision: 357913 URL: https://svnweb.freebsd.org/changeset/base/357913 Log: MFC r357668: linux futex_put(): do not touch futex after dropping our reference. Modified: stable/12/sys/compat/linux/linux_futex.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Fri Feb 14 13:09:41 2020 (r357912) +++ stable/12/sys/compat/linux/linux_futex.c Fri Feb 14 13:10:52 2020 (r357913) @@ -332,9 +332,9 @@ futex_put(struct futex *f, struct waiting_proc *wp) f->f_key.shared); LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d", f->f_uaddr, f->f_refcount, f->f_key.shared); - FUTEXES_UNLOCK; if (FUTEX_LOCKED(f)) futex_unlock(f); + FUTEXES_UNLOCK; LIN_SDT_PROBE0(futex, futex_put, return); } From owner-svn-src-all@freebsd.org Fri Feb 14 13:14:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C0602346F8; Fri, 14 Feb 2020 13:14:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Jv3c0z7cz4ZZS; Fri, 14 Feb 2020 13:14:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CACD2419D; Fri, 14 Feb 2020 13:14:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EDEJSd000657; Fri, 14 Feb 2020 13:14:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EDEJsQ000656; Fri, 14 Feb 2020 13:14:19 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141314.01EDEJsQ000656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 13:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357914 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 357914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:14:20 -0000 Author: mjg Date: Fri Feb 14 13:14:19 2020 New Revision: 357914 URL: https://svnweb.freebsd.org/changeset/base/357914 Log: amd64: only check for error != 0 in the inlined part of l1d flush check this replaces the following near the syscall exit: cmp $0x39,%rax ja 0xffffffff8108f82c movabs $0x200001800060005,%rcx bt %rax,%rcx jae 0xffffffff8108f82c with: test %edi,%edi jne 0xffffffff8091a49c Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Fri Feb 14 13:10:52 2020 (r357913) +++ head/sys/amd64/amd64/trap.c Fri Feb 14 13:14:19 2020 (r357914) @@ -1068,25 +1068,32 @@ flush_l1d_hw(void) wrmsr(MSR_IA32_FLUSH_CMD, IA32_FLUSH_CMD_L1D); } -static void __inline -amd64_syscall_ret_flush_l1d_inline(int error) +static void __noinline +amd64_syscall_ret_flush_l1d_check(int error) { void (*p)(void); - if (error != 0 && error != EEXIST && error != EAGAIN && - error != EXDEV && error != ENOENT && error != ENOTCONN && - error != EINPROGRESS) { - p = syscall_ret_l1d_flush; + if (error != EEXIST && error != EAGAIN && error != EXDEV && + error != ENOENT && error != ENOTCONN && error != EINPROGRESS) { + p = (void *)atomic_load_ptr(&syscall_ret_l1d_flush); if (p != NULL) p(); } } +static void __inline +amd64_syscall_ret_flush_l1d_check_inline(int error) +{ + + if (__predict_false(error != 0)) + amd64_syscall_ret_flush_l1d_check(error); +} + void amd64_syscall_ret_flush_l1d(int error) { - amd64_syscall_ret_flush_l1d_inline(error); + amd64_syscall_ret_flush_l1d_check_inline(error); } void @@ -1190,5 +1197,5 @@ amd64_syscall(struct thread *td, int traced) if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); - amd64_syscall_ret_flush_l1d_inline(td->td_errno); + amd64_syscall_ret_flush_l1d_check_inline(td->td_errno); } From owner-svn-src-all@freebsd.org Fri Feb 14 13:22:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9778234A3E; Fri, 14 Feb 2020 13:22:38 +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) server-signature RSA-PSS (4096 bits) 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 48JvFB3zgbz4b89; Fri, 14 Feb 2020 13:22:38 +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 83E792435C; Fri, 14 Feb 2020 13:22:38 +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 01EDMcIt007206; Fri, 14 Feb 2020 13:22:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EDMcnE007205; Fri, 14 Feb 2020 13:22:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002141322.01EDMcnE007205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 13:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357915 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 357915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:22:38 -0000 Author: kib Date: Fri Feb 14 13:22:38 2020 New Revision: 357915 URL: https://svnweb.freebsd.org/changeset/base/357915 Log: MFC r357668: linux futex_put(): do not touch futex after dropping our reference. Modified: stable/11/sys/compat/linux/linux_futex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_futex.c ============================================================================== --- stable/11/sys/compat/linux/linux_futex.c Fri Feb 14 13:14:19 2020 (r357914) +++ stable/11/sys/compat/linux/linux_futex.c Fri Feb 14 13:22:38 2020 (r357915) @@ -338,9 +338,9 @@ futex_put(struct futex *f, struct waiting_proc *wp) f->f_key.shared); LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d", f->f_uaddr, f->f_refcount, f->f_key.shared); - FUTEXES_UNLOCK; if (FUTEX_LOCKED(f)) futex_unlock(f); + FUTEXES_UNLOCK; LIN_SDT_PROBE0(futex, futex_put, return); } From owner-svn-src-all@freebsd.org Fri Feb 14 13:25:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2926A234B1A; Fri, 14 Feb 2020 13:25:38 +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) server-signature RSA-PSS (4096 bits) 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 48JvJf0Hxyz4bHL; Fri, 14 Feb 2020 13:25:38 +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 054F524362; Fri, 14 Feb 2020 13:25:38 +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 01EDPbS5007396; Fri, 14 Feb 2020 13:25:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EDPbRv007395; Fri, 14 Feb 2020 13:25:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002141325.01EDPbRv007395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 13:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357916 - stable/12/sys/dev/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/acpica X-SVN-Commit-Revision: 357916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:25:38 -0000 Author: kib Date: Fri Feb 14 13:25:37 2020 New Revision: 357916 URL: https://svnweb.freebsd.org/changeset/base/357916 Log: MFC r357669: acpi_hpet: Add Hygon Dhyana support. Modified: stable/12/sys/dev/acpica/acpi_hpet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_hpet.c Fri Feb 14 13:22:38 2020 (r357915) +++ stable/12/sys/dev/acpica/acpi_hpet.c Fri Feb 14 13:25:37 2020 (r357916) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #define HPET_VENDID_AMD 0x4353 #define HPET_VENDID_AMD2 0x1022 +#define HPET_VENDID_HYGON 0x1d94 #define HPET_VENDID_INTEL 0x8086 #define HPET_VENDID_NVIDIA 0x10de #define HPET_VENDID_SW 0x1166 @@ -604,7 +605,8 @@ hpet_attach(device_t dev) * properly, that makes it very unreliable - it freezes after any * interrupt loss. Avoid legacy IRQs for AMD. */ - if (vendor == HPET_VENDID_AMD || vendor == HPET_VENDID_AMD2) + if (vendor == HPET_VENDID_AMD || vendor == HPET_VENDID_AMD2 || + vendor == HPET_VENDID_HYGON) sc->allowed_irqs = 0x00000000; /* * NVidia MCP5x chipsets have number of unexplained interrupt From owner-svn-src-all@freebsd.org Fri Feb 14 13:26:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FF8A234BC9; Fri, 14 Feb 2020 13:26:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48JvKy2prsz4bPj; Fri, 14 Feb 2020 13:26:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B40324364; Fri, 14 Feb 2020 13:26:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EDQkVm007503; Fri, 14 Feb 2020 13:26:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EDQjqG007498; Fri, 14 Feb 2020 13:26:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002141326.01EDQjqG007498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 13:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357917 - in stable/12: lib/libpmc lib/libpmc/pmu-events/arch/x86 sys/dev/hwpmc X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libpmc lib/libpmc/pmu-events/arch/x86 sys/dev/hwpmc X-SVN-Commit-Revision: 357917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 13:26:46 -0000 Author: kib Date: Fri Feb 14 13:26:45 2020 New Revision: 357917 URL: https://svnweb.freebsd.org/changeset/base/357917 Log: MFC r357670: pmc: Add Hygon Dhyana support. Modified: stable/12/lib/libpmc/libpmc_pmu_util.c stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv stable/12/sys/dev/hwpmc/hwpmc_amd.c stable/12/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libpmc/libpmc_pmu_util.c ============================================================================== --- stable/12/lib/libpmc/libpmc_pmu_util.c Fri Feb 14 13:25:37 2020 (r357916) +++ stable/12/lib/libpmc/libpmc_pmu_util.c Fri Feb 14 13:26:45 2020 (r357917) @@ -103,7 +103,8 @@ pmu_events_mfr(void) free(buf); return (PMU_INVALID); } - if (strcasestr(buf, "AuthenticAMD") != NULL) + if (strcasestr(buf, "AuthenticAMD") != NULL || + strcasestr(buf, "HygonGenuine") != NULL) mfr = PMU_AMD; else if (strcasestr(buf, "GenuineIntel") != NULL) mfr = PMU_INTEL; Modified: stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv ============================================================================== --- stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv Fri Feb 14 13:25:37 2020 (r357916) +++ stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv Fri Feb 14 13:26:45 2020 (r357917) @@ -41,3 +41,4 @@ AuthenticAMD-23-02,v1,amdfam17h,core AuthenticAMD-23-03,v1,amdfam17h,core AuthenticAMD-23-04,v1,amdfam17h,core AuthenticAMD-23-05,v1,amdfam17h,core +HygonGenuine-24-00,v1,amdfam17h,core Modified: stable/12/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_amd.c Fri Feb 14 13:25:37 2020 (r357916) +++ stable/12/sys/dev/hwpmc/hwpmc_amd.c Fri Feb 14 13:26:45 2020 (r357917) @@ -1045,6 +1045,9 @@ pmc_amd_initialize(void) if (CPUID_TO_FAMILY(cpu_id) == 0x17) snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X", CPUID_TO_FAMILY(cpu_id), model); + if (CPUID_TO_FAMILY(cpu_id) == 0x18) + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X", + CPUID_TO_FAMILY(cpu_id), model); switch (cpu_id & 0xF00) { #if defined(__i386__) Modified: stable/12/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_x86.c Fri Feb 14 13:25:37 2020 (r357916) +++ stable/12/sys/dev/hwpmc/hwpmc_x86.c Fri Feb 14 13:26:45 2020 (r357917) @@ -248,7 +248,8 @@ pmc_md_initialize() struct pmc_mdep *md; /* determine the CPU kind */ - if (cpu_vendor_id == CPU_VENDOR_AMD) + if (cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_HYGON) md = pmc_amd_initialize(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) md = pmc_intel_initialize(); @@ -271,7 +272,8 @@ pmc_md_finalize(struct pmc_mdep *md) { lapic_disable_pmc(); - if (cpu_vendor_id == CPU_VENDOR_AMD) + if (cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_HYGON) pmc_amd_finalize(md); else if (cpu_vendor_id == CPU_VENDOR_INTEL) pmc_intel_finalize(md); From owner-svn-src-all@freebsd.org Fri Feb 14 14:03:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EABB6235AC9; Fri, 14 Feb 2020 14:03: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) server-signature RSA-PSS (4096 bits) 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 48Jw8c5rRhz4dSV; Fri, 14 Feb 2020 14:03: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 C3BAF24B00; Fri, 14 Feb 2020 14:03: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 01EE3iKq031282; Fri, 14 Feb 2020 14:03:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EE3iB6031281; Fri, 14 Feb 2020 14:03:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002141403.01EE3iB6031281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 14:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357918 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 357918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 14:03:45 -0000 Author: kevans Date: Fri Feb 14 14:03:44 2020 New Revision: 357918 URL: https://svnweb.freebsd.org/changeset/base/357918 Log: committers-ports: add koobs@ information, somewhat belatedly Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Feb 14 13:26:45 2020 (r357917) +++ head/share/misc/committers-ports.dot Fri Feb 14 14:03:44 2020 (r357918) @@ -159,6 +159,7 @@ kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21" kmoore [label="Kris Moore\nkmoore@FreeBSD.org\n2009/04/14"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] koitsu [label="Jeremy Chadwick\nkoitsu@FreeBSD.org\n2006/11/10"] +koobs [label="Kubilay Kocak\nkoobs@FreeBSD.org\n2012/12/24"] krion [label="Kirill Ponomarew\nkrion@FreeBSD.org\n2003/07/20"] kwm [label="Koop Mast\nkwm@FreeBSD.org\n2004/09/14"] laszlof [label="Frank Laszlo\nlaszlof@FreeBSD.org\n2006/11/07"] From owner-svn-src-all@freebsd.org Fri Feb 14 14:55:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1037723783A; Fri, 14 Feb 2020 14:55:41 +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) server-signature RSA-PSS (4096 bits) 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 48JxJX6gCRz3CmQ; Fri, 14 Feb 2020 14:55:40 +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 E03492549D; Fri, 14 Feb 2020 14:55:40 +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 01EEteLB060717; Fri, 14 Feb 2020 14:55:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EEteUr060716; Fri, 14 Feb 2020 14:55:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002141455.01EEteUr060716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Feb 2020 14:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357919 - head/sys/dev/ahci X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ahci X-SVN-Commit-Revision: 357919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 14:55:41 -0000 Author: mav Date: Fri Feb 14 14:55:40 2020 New Revision: 357919 URL: https://svnweb.freebsd.org/changeset/base/357919 Log: Add Hygon PCI ID and description for AHCI SATA controller. Submitted by: Pu Wen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23556 Modified: head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Fri Feb 14 14:03:44 2020 (r357918) +++ head/sys/dev/ahci/ahci_pci.c Fri Feb 14 14:55:40 2020 (r357919) @@ -90,6 +90,7 @@ static const struct { {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, + {0x79011d94, 0x00, "Hygon KERNCZ", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, {0x26818086, 0x00, "Intel ESB2", 0}, From owner-svn-src-all@freebsd.org Fri Feb 14 15:04:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5D4023801B; Fri, 14 Feb 2020 15:04:57 +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) server-signature RSA-PSS (4096 bits) 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 48JxWF4Mcsz3Dm8; Fri, 14 Feb 2020 15:04:57 +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 90ACA2572E; Fri, 14 Feb 2020 15:04:57 +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 01EF4vRY066510; Fri, 14 Feb 2020 15:04:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EF4vDN066509; Fri, 14 Feb 2020 15:04:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002141504.01EF4vDN066509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Feb 2020 15:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357920 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 357920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 15:04:57 -0000 Author: mav Date: Fri Feb 14 15:04:56 2020 New Revision: 357920 URL: https://svnweb.freebsd.org/changeset/base/357920 Log: Add support for Hygon NTB PCI device in ntb_hw_amd driver. Submitted by: Pu Wen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23565 Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Fri Feb 14 14:55:40 2020 (r357919) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Fri Feb 14 15:04:56 2020 (r357920) @@ -101,6 +101,16 @@ static const struct amd_ntb_hw_info amd_ntb_hw_info_li .msix_vector_count = 24, .quirks = 0, .desc = "AMD Non-Transparent Bridge"}, + + { .vendor_id = NTB_HW_HYGON_VENDOR_ID, + .device_id = NTB_HW_HYGON_DEVICE_ID1, + .mw_count = 3, + .bar_start_idx = 1, + .spad_count = 16, + .db_count = 16, + .msix_vector_count = 24, + .quirks = QUIRK_MW0_32BIT, + .desc = "Hygon Non-Transparent Bridge"}, }; static const struct pci_device_table amd_ntb_devs[] = { @@ -109,7 +119,10 @@ static const struct pci_device_table amd_ntb_devs[] = PCI_DESCR("AMD Non-Transparent Bridge") }, { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID2), .driver_data = (uintptr_t)&amd_ntb_hw_info_list[1], - PCI_DESCR("AMD Non-Transparent Bridge") } + PCI_DESCR("AMD Non-Transparent Bridge") }, + { PCI_DEV(NTB_HW_HYGON_VENDOR_ID, NTB_HW_HYGON_DEVICE_ID1), + .driver_data = (uintptr_t)&amd_ntb_hw_info_list[0], + PCI_DESCR("Hygon Non-Transparent Bridge") } }; static unsigned g_amd_ntb_hw_debug_level; Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Fri Feb 14 14:55:40 2020 (r357919) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Fri Feb 14 15:04:56 2020 (r357920) @@ -51,6 +51,9 @@ #define NTB_HW_AMD_DEVICE_ID1 0x145B #define NTB_HW_AMD_DEVICE_ID2 0x148B +#define NTB_HW_HYGON_VENDOR_ID 0x19D4 +#define NTB_HW_HYGON_DEVICE_ID1 0x145B + #define NTB_DEF_PEER_CNT 1 #define NTB_DEF_PEER_IDX 0 From owner-svn-src-all@freebsd.org Fri Feb 14 16:56:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE9B623AD53; Fri, 14 Feb 2020 16:56:59 +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) server-signature RSA-PSS (4096 bits) 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 48K00W5QMvz3N6b; Fri, 14 Feb 2020 16:56:59 +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 B0AF326CD1; Fri, 14 Feb 2020 16:56:59 +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 01EGuxeY033977; Fri, 14 Feb 2020 16:56:59 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EGuxYO033976; Fri, 14 Feb 2020 16:56:59 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002141656.01EGuxYO033976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Fri, 14 Feb 2020 16:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357921 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 357921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 16:56:59 -0000 Author: kaktus Date: Fri Feb 14 16:56:59 2020 New Revision: 357921 URL: https://svnweb.freebsd.org/changeset/base/357921 Log: sysctl(9): properly use xor in ENFORCE_FLAGS macro Assert on not specifying any of the (soon to be) required flags as well as specifying both of them. Pointed out by: cem, hselasky Reviewed by: hselasky, kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23678 Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Feb 14 15:04:56 2020 (r357920) +++ head/sys/sys/sysctl.h Fri Feb 14 16:56:59 2020 (r357921) @@ -270,9 +270,9 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define __DESCR(d) "" #endif -#ifdef notyet +#ifdef notyet #define SYSCTL_ENFORCE_FLAGS(x) \ - _Static_assert(((CTLFLAG_MPSAFE ^ CTLFLAG_NEEDGIANT) & (x)), \ + _Static_assert((((x) & CTLFLAG_MPSAFE) != 0) ^ (((x) & CTLFLAG_NEEDGIANT) != 0), \ "Has to be either CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT") #else #define SYSCTL_ENFORCE_FLAGS(x) From owner-svn-src-all@freebsd.org Fri Feb 14 17:05:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7EE823B1B4; Fri, 14 Feb 2020 17:05:35 +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) server-signature RSA-PSS (4096 bits) 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 48K0BR5bmmz3NrJ; Fri, 14 Feb 2020 17:05:35 +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 BB74D26EAD; Fri, 14 Feb 2020 17:05:35 +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 01EH5Zhu039857; Fri, 14 Feb 2020 17:05:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EH5Zb7039856; Fri, 14 Feb 2020 17:05:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141705.01EH5Zb7039856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 17:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357922 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 357922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 17:05:36 -0000 Author: emaste Date: Fri Feb 14 17:05:35 2020 New Revision: 357922 URL: https://svnweb.freebsd.org/changeset/base/357922 Log: openssh: add a note about libwrap in config.h LIBWRAP is defined by the Makefile based on MK_TCP_WRAPPERS and should not be defined in config.h. PR: 210141 Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/FREEBSD-upgrade Modified: head/crypto/openssh/FREEBSD-upgrade ============================================================================== --- head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 16:56:59 2020 (r357921) +++ head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 17:05:35 2020 (r357922) @@ -71,6 +71,9 @@ 0E) Review changes to config.h very carefully. + Note that libwrap should not be defined in config.h; as of + r311585 it is conditional on MK_TCP_WRAPPERS. + 0F) If source files have been added or removed, update the appropriate makefiles to reflect changes in the vendor's Makefile.in. From owner-svn-src-all@freebsd.org Fri Feb 14 18:46:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBE5C23DEB8; Fri, 14 Feb 2020 18:46:35 +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) server-signature RSA-PSS (4096 bits) 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 48K2Qz55tyz41kw; Fri, 14 Feb 2020 18:46:35 +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 A60C7199; Fri, 14 Feb 2020 18:46:35 +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 01EIkZC3099383; Fri, 14 Feb 2020 18:46:35 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EIkYUb099379; Fri, 14 Feb 2020 18:46:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002141846.01EIkYUb099379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 18:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357923 - head/usr.bin/dtc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/dtc X-SVN-Commit-Revision: 357923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 18:46:35 -0000 Author: kevans Date: Fri Feb 14 18:46:34 2020 New Revision: 357923 URL: https://svnweb.freebsd.org/changeset/base/357923 Log: Pull in latest fixes from dtc, up to 0060471 This includes a small battery of /memreserve/ fixes to make sure dtc is properly writing these regions into the output file and reading them back out. As of this update, dtc will now also assume common defaults for -I/-O if only one is specified; namely, dts for one implies dtb for the other and vice versa (Requested by: jhibbits, preserves GPL dtc behavior too). MFC after: 1 week Modified: head/usr.bin/dtc/dtb.cc head/usr.bin/dtc/dtc.cc head/usr.bin/dtc/fdt.cc head/usr.bin/dtc/fdt.hh Modified: head/usr.bin/dtc/dtb.cc ============================================================================== --- head/usr.bin/dtc/dtb.cc Fri Feb 14 17:05:35 2020 (r357922) +++ head/usr.bin/dtc/dtb.cc Fri Feb 14 18:46:34 2020 (r357923) @@ -36,7 +36,6 @@ #include #include #include -#include #include #include Modified: head/usr.bin/dtc/dtc.cc ============================================================================== --- head/usr.bin/dtc/dtc.cc Fri Feb 14 17:05:35 2020 (r357922) +++ head/usr.bin/dtc/dtc.cc Fri Feb 14 18:46:34 2020 (r357923) @@ -94,6 +94,8 @@ void version(const char* progname) } // Anonymous namespace using fdt::device_tree; +using fdt::tree_write_fn_ptr; +using fdt::tree_read_fn_ptr; int main(int argc, char **argv) @@ -104,8 +106,8 @@ main(int argc, char **argv) const char *in_file = "-"; FILE *depfile = 0; bool debug_mode = false; - auto write_fn = &device_tree::write_binary; - auto read_fn = &device_tree::parse_dts; + tree_write_fn_ptr write_fn = nullptr; + tree_read_fn_ptr read_fn = nullptr; uint32_t boot_cpu = 0; bool boot_cpu_specified = false; bool keep_going = false; @@ -135,6 +137,10 @@ main(int argc, char **argv) if (arg == "dtb") { read_fn = &device_tree::parse_dtb; + if (write_fn == nullptr) + { + write_fn = &device_tree::write_dts; + } } else if (arg == "dts") { @@ -161,6 +167,10 @@ main(int argc, char **argv) else if (arg == "dts") { write_fn = &device_tree::write_dts; + if (read_fn == nullptr) + { + read_fn = &device_tree::parse_dtb; + } } else { @@ -297,6 +307,14 @@ main(int argc, char **argv) fprintf(stderr, "Unknown option %c\n", ch); return EXIT_FAILURE; } + } + if (read_fn == nullptr) + { + read_fn = &device_tree::parse_dts; + } + if (write_fn == nullptr) + { + write_fn = &device_tree::write_binary; } if (optind < argc) { Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Fri Feb 14 17:05:35 2020 (r357922) +++ head/usr.bin/dtc/fdt.cc Fri Feb 14 18:46:34 2020 (r357923) @@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input, { input.next_token(); // Read the header - while (input.consume("/dts-v1/;")) + if (input.consume("/dts-v1/;")) { read_header = true; - input.next_token(); } + input.next_token(); if (input.consume("/plugin/;")) { is_plugin = true; @@ -1589,9 +1589,12 @@ device_tree::parse_file(text_input_buffer &input, { input.parse_error("Expected size on /memreserve/ node."); } + else + { + reservations.push_back(reservation(start, len)); + } input.next_token(); input.consume(';'); - reservations.push_back(reservation(start, len)); input.next_token(); } while (valid && !input.finished()) @@ -1661,7 +1664,7 @@ device_tree::write(int fd) reservation_writer.write_comment(string("Reservation start")); reservation_writer.write_data(i.first); reservation_writer.write_comment(string("Reservation length")); - reservation_writer.write_data(i.first); + reservation_writer.write_data(i.second); } // Write n spare reserve map entries, plus the trailing 0. for (uint32_t i=0 ; i<=spare_reserve_map_entries ; i++) @@ -1747,10 +1750,11 @@ device_tree::write_dts(int fd) if (!reservations.empty()) { const char msg[] = "/memreserve/"; - fwrite(msg, sizeof(msg), 1, file); + // Exclude the null byte when we're writing it out to the file. + fwrite(msg, sizeof(msg) - 1, 1, file); for (auto &i : reservations) { - fprintf(file, " %" PRIx64 " %" PRIx64, i.first, i.second); + fprintf(file, " 0x%" PRIx64 " 0x%" PRIx64, i.first, i.second); } fputs(";\n\n", file); } @@ -1793,6 +1797,10 @@ device_tree::parse_dtb(const string &fn, FILE *) fprintf(stderr, "Failed to read memory reservation table\n"); valid = false; return; + } + if (start != 0 || length != 0) + { + reservations.push_back(reservation(start, length)); } } while (!((start == 0) && (length == 0))); input_buffer struct_table = Modified: head/usr.bin/dtc/fdt.hh ============================================================================== --- head/usr.bin/dtc/fdt.hh Fri Feb 14 17:05:35 2020 (r357922) +++ head/usr.bin/dtc/fdt.hh Fri Feb 14 18:46:34 2020 (r357923) @@ -59,6 +59,14 @@ class property; class node; class device_tree; /** + * Type for device tree write functions. + */ +typedef void (device_tree::* tree_write_fn_ptr)(int); +/** + * Type for device tree read functions. + */ +typedef void (device_tree::* tree_read_fn_ptr)(const std::string &, FILE *); +/** * Type for (owned) pointers to properties. */ typedef std::shared_ptr property_ptr; From owner-svn-src-all@freebsd.org Fri Feb 14 18:50:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 437E523DFB4; Fri, 14 Feb 2020 18:50:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K2W00wczz41vr; Fri, 14 Feb 2020 18:50:04 +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 1B0311A0; Fri, 14 Feb 2020 18:50:04 +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 01EIo3Kd099640; Fri, 14 Feb 2020 18:50:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EIo311099639; Fri, 14 Feb 2020 18:50:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002141850.01EIo311099639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 18:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357924 - head/usr.bin/dtc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/dtc X-SVN-Commit-Revision: 357924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 18:50:04 -0000 Author: kevans Date: Fri Feb 14 18:50:03 2020 New Revision: 357924 URL: https://svnweb.freebsd.org/changeset/base/357924 Log: dtc: re-apply r353961, r354115 I missed in final review of r357923's diff that these ones hadn't yet been sent upstream and inadvertently reverted them. =-( Re-apply now. Modified: head/usr.bin/dtc/dtb.cc head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/dtb.cc ============================================================================== --- head/usr.bin/dtc/dtb.cc Fri Feb 14 18:46:34 2020 (r357923) +++ head/usr.bin/dtc/dtb.cc Fri Feb 14 18:50:03 2020 (r357924) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Fri Feb 14 18:46:34 2020 (r357923) +++ head/usr.bin/dtc/fdt.cc Fri Feb 14 18:50:03 2020 (r357924) @@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input, { input.next_token(); // Read the header - if (input.consume("/dts-v1/;")) + while (input.consume("/dts-v1/;")) { read_header = true; + input.next_token(); } - input.next_token(); if (input.consume("/plugin/;")) { is_plugin = true; From owner-svn-src-all@freebsd.org Fri Feb 14 18:59:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3C7623E5D5; Fri, 14 Feb 2020 18:59:50 +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) server-signature RSA-PSS (4096 bits) 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 48K2kG4pL1z42dV; Fri, 14 Feb 2020 18:59:50 +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 A04593A6; Fri, 14 Feb 2020 18:59:50 +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 01EIxoxN005740; Fri, 14 Feb 2020 18:59:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EIxovQ005739; Fri, 14 Feb 2020 18:59:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141859.01EIxovQ005739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 18:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357925 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 357925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 18:59:50 -0000 Author: emaste Date: Fri Feb 14 18:59:50 2020 New Revision: 357925 URL: https://svnweb.freebsd.org/changeset/base/357925 Log: sshd: add upgrade process note about TCP wrappers We need to add user-facing deprecation notices for TCP wrappers; start with a note in the upgrade process docmentation. Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/FREEBSD-upgrade Modified: head/crypto/openssh/FREEBSD-upgrade ============================================================================== --- head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 18:50:03 2020 (r357924) +++ head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 18:59:50 2020 (r357925) @@ -142,6 +142,9 @@ Support for TCP wrappers was removed in upstream 6.7p1. We've added it back by porting the 6.6p1 code forward. + TCP wrappers support in sshd will be disabled in HEAD and will + be removed from FreeBSD in the future. + 6) Agent client reference counting We've added code to ssh-agent.c to implement client reference From owner-svn-src-all@freebsd.org Fri Feb 14 19:07:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E39BE23EA8E; Fri, 14 Feb 2020 19:07:00 +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) server-signature RSA-PSS (4096 bits) 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 48K2tX5MWJz43Gk; Fri, 14 Feb 2020 19:07:00 +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 98AB757F; Fri, 14 Feb 2020 19:07:00 +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 01EJ7022011481; Fri, 14 Feb 2020 19:07:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJ6x5M011464; Fri, 14 Feb 2020 19:06:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141906.01EJ6x5M011464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 19:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357926 - in head/crypto/openssh: . contrib/redhat contrib/suse openbsd-compat regress regress/misc/fuzz-harness regress/unittests/sshkey regress/unittests/sshkey/testdata regress/unitt... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/crypto/openssh: . contrib/redhat contrib/suse openbsd-compat regress regress/misc/fuzz-harness regress/unittests/sshkey regress/unittests/sshkey/testdata regress/unittests/test_helper X-SVN-Commit-Revision: 357926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:07:00 -0000 Author: emaste Date: Fri Feb 14 19:06:59 2020 New Revision: 357926 URL: https://svnweb.freebsd.org/changeset/base/357926 Log: Upgrade to OpenSSH 7.9p1. MFC after: 2 months Sponsored by: The FreeBSD Foundation Added: head/crypto/openssh/regress/misc/fuzz-harness/authopt_fuzz.cc - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/misc/fuzz-harness/authopt_fuzz.cc head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1 - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1 head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1-cert.pub - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1-cert.pub head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1.pub - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha1.pub head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512 - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512 head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512-cert.pub - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512-cert.pub head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512.pub - copied unchanged from r343774, vendor-crypto/openssh/dist/regress/unittests/sshkey/testdata/rsa_1_sha512.pub Modified: head/crypto/openssh/.depend head/crypto/openssh/.skipped-commit-ids head/crypto/openssh/ChangeLog head/crypto/openssh/Makefile.in head/crypto/openssh/PROTOCOL head/crypto/openssh/PROTOCOL.krl head/crypto/openssh/PROTOCOL.mux head/crypto/openssh/README head/crypto/openssh/auth-options.c head/crypto/openssh/auth-passwd.c head/crypto/openssh/auth.c head/crypto/openssh/auth2-hostbased.c head/crypto/openssh/auth2-pubkey.c head/crypto/openssh/authfile.c head/crypto/openssh/channels.c head/crypto/openssh/channels.h head/crypto/openssh/clientloop.c head/crypto/openssh/configure.ac head/crypto/openssh/contrib/redhat/openssh.spec head/crypto/openssh/contrib/suse/openssh.spec head/crypto/openssh/dh.c head/crypto/openssh/groupaccess.c head/crypto/openssh/kexgexs.c head/crypto/openssh/krl.c head/crypto/openssh/krl.h head/crypto/openssh/misc.c head/crypto/openssh/misc.h head/crypto/openssh/moduli head/crypto/openssh/mux.c head/crypto/openssh/myproposal.h head/crypto/openssh/nchan.c head/crypto/openssh/openbsd-compat/bsd-asprintf.c head/crypto/openssh/openbsd-compat/bsd-misc.c head/crypto/openssh/openbsd-compat/openssl-compat.c head/crypto/openssh/openbsd-compat/port-linux.c head/crypto/openssh/openbsd-compat/port-uw.c head/crypto/openssh/openbsd-compat/setproctitle.c head/crypto/openssh/openbsd-compat/xcrypt.c head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/regress/README.regress head/crypto/openssh/regress/krl.sh head/crypto/openssh/regress/misc/fuzz-harness/Makefile head/crypto/openssh/regress/unittests/sshkey/common.c head/crypto/openssh/regress/unittests/sshkey/mktestdata.sh head/crypto/openssh/regress/unittests/sshkey/test_file.c head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c head/crypto/openssh/regress/unittests/test_helper/fuzz.c head/crypto/openssh/regress/unittests/test_helper/test_helper.c head/crypto/openssh/sandbox-seccomp-filter.c head/crypto/openssh/scp.1 head/crypto/openssh/servconf.c head/crypto/openssh/servconf.h head/crypto/openssh/session.c head/crypto/openssh/session.h head/crypto/openssh/sftp-common.c head/crypto/openssh/sftp.1 head/crypto/openssh/sftp.c head/crypto/openssh/ssh-add.c head/crypto/openssh/ssh-keygen.1 head/crypto/openssh/ssh-keygen.c head/crypto/openssh/ssh.1 head/crypto/openssh/ssh.c head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/ssh_namespace.h head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/sshkey.c head/crypto/openssh/sshkey.h head/crypto/openssh/version.h Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/.depend ============================================================================== --- head/crypto/openssh/.depend Fri Feb 14 18:59:50 2020 (r357925) +++ head/crypto/openssh/.depend Fri Feb 14 19:06:59 2020 (r357926) @@ -83,8 +83,8 @@ match.o: includes.h config.h defines.h platform.h open md5crypt.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h misc.h log.h ssh.h sshbuf.h ssherr.h moduli.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h -monitor.o: rijndael.h kex.h mac.h dh.h packet.h dispatch.h opacket.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h +monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h openbsd-compat/openssl-compat.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h +monitor.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h dh.h packet.h dispatch.h opacket.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h monitor_fdpass.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h monitor_fdpass.h monitor_wrap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h hostfile.h auth.h auth-pam.h audit.h loginrec.h monitor_wrap.o: auth-options.h packet.h dispatch.h opacket.h log.h monitor.h monitor_wrap.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h ssherr.h @@ -156,7 +156,7 @@ sshd.o: includes.h config.h defines.h platform.h openb sshd.o: poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h myproposal.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h ssherr.h ssherr.o: ssherr.h sshkey-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h sshkey-xmss.h match.h xmss_fast.h +sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h sshkey-xmss.h match.h xmss_fast.h openbsd-compat/openssl-compat.h sshlogin.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshlogin.h ssherr.h loginrec.h log.h sshbuf.h misc.h servconf.h sshpty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h log.h misc.h sshtty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h Modified: head/crypto/openssh/.skipped-commit-ids ============================================================================== --- head/crypto/openssh/.skipped-commit-ids Fri Feb 14 18:59:50 2020 (r357925) +++ head/crypto/openssh/.skipped-commit-ids Fri Feb 14 19:06:59 2020 (r357926) @@ -4,6 +4,7 @@ f2c9feb26963615c4fece921906cf72e248b61ee more Makefile fa728823ba21c4b45212750e1d3a4b2086fd1a62 more Makefile refactoring 1de0e85522051eb2ffa00437e1885e9d7b3e0c2e moduli update 814b2f670df75759e1581ecef530980b2b3d7e0f remove redundant make defs +04431e8e7872f49a2129bf080a6b73c19d576d40 moduli update Old upstream tree: Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Fri Feb 14 18:59:50 2020 (r357925) +++ head/crypto/openssh/ChangeLog Fri Feb 14 19:06:59 2020 (r357926) @@ -1,3 +1,827 @@ +commit aede1c34243a6f7feae2fb2cb686ade5f9be6f3d +Author: Damien Miller +Date: Wed Oct 17 11:01:20 2018 +1100 + + Require OpenSSL 1.1.x series 1.1.0g or greater + + Previous versions have a bug with EVP_CipherInit() when passed a + NULL EVP_CIPHER, per https://github.com/openssl/openssl/pull/4613 + + ok dtucker@ + +commit 08300c211409c212e010fe2e2f2883e573a04ce2 +Author: Damien Miller +Date: Wed Oct 17 08:12:02 2018 +1100 + + unbreak compilation with --with-ssl-engine + + Missing last argument to OPENSSL_init_crypto() + +commit 1673274aee67ce0eb6f00578b6f3d2bcbd58f937 +Author: Darren Tucker +Date: Tue Oct 16 14:45:57 2018 +1100 + + Remove gcc spectre mitigation flags. + + Current impementions of the gcc spectre mitigation flags cause + miscompilations when combined with other flags and do not provide much + protection. Found by fweimer at redhat.com, ok djm@ + +commit 4e23deefd7959ef83c73ed9cce574423438f6133 +Author: Damien Miller +Date: Tue Oct 16 10:51:52 2018 +1100 + + Avoid deprecated OPENSSL_config when using 1.1.x + + OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of + OPENSSL_init_crypto; pointed out by Jakub Jelen + +commit 797cdd9c8468ed1125ce60d590ae3f1397866af4 +Author: Darren Tucker +Date: Fri Oct 12 16:58:47 2018 +1100 + + Don't avoid our *sprintf replacements. + + Don't let systems with broken printf(3) avoid our replacements + via asprintf(3)/vasprintf(3) calling libc internally. From djm@ + +commit e526127cbd2f8ad88fb41229df0c9b850c722830 +Author: Darren Tucker +Date: Fri Oct 12 16:43:35 2018 +1100 + + Check if snprintf understands %zu. + + If the platforms snprintf and friends don't understand %zu, use the + compat replacement. Prevents segfaults on those platforms. + +commit cf39f875191708c5f2f1a3c1c9019f106e74aea3 +Author: Damien Miller +Date: Fri Oct 12 09:48:05 2018 +1100 + + remove stale link, tweak + +commit a7205e68decf7de2005810853b4ce6b222b65e2a +Author: Damien Miller +Date: Fri Oct 12 09:47:20 2018 +1100 + + update version numbers ahead of release + +commit 1a4a9cf80f5b92b9d1dadd0bfa8867c04d195391 +Author: djm@openbsd.org +Date: Thu Oct 11 03:48:04 2018 +0000 + + upstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to + + older OpenSSH that can't handle them. spotted by Adam Eijdenberg; ok dtucker + + OpenBSD-Commit-ID: 662bbc402e3d7c9b6c322806269698106a6ae631 + +commit dc8ddcdf1a95e011c263486c25869bb5bf4e30ec +Author: Damien Miller +Date: Thu Oct 11 13:08:59 2018 +1100 + + update depends + +commit 26841ac265603fd2253e6832e03602823dbb4022 +Author: Damien Miller +Date: Thu Oct 11 13:02:11 2018 +1100 + + some more duplicated key algorithm lines + + From Adam Eijdenberg + +commit 5d9d17603bfbb620195a4581025052832b4c4adc +Author: Damien Miller +Date: Thu Oct 11 11:56:36 2018 +1100 + + fix duplicated algorithm specification lines + + Spotted by Adam Eijdenberg + +commit ebfafd9c7a5b2a7fb515ee95dbe0e44e11d0a663 +Author: djm@openbsd.org +Date: Thu Oct 11 00:52:46 2018 +0000 + + upstream: typo in plain RSA algorithm counterpart names for + + certificates; spotted by Adam Eijdenberg; ok dtucker@ + + OpenBSD-Commit-ID: bfcdeb6f4fc9e7607f5096574c8f118f2e709e00 + +commit c29b111e7d87c2324ff71c80653dd8da168c13b9 +Author: Damien Miller +Date: Thu Oct 11 11:29:35 2018 +1100 + + check pw_passwd != NULL here too + + Again, for systems with broken NIS implementations. + + Prompted by coolbugcheckers AT gmail.com + +commit fe8e8f349a553ef4c567acd418aac769a82b7729 +Author: Damien Miller +Date: Thu Oct 11 11:03:15 2018 +1100 + + check for NULL return from shadow_pw() + + probably unreachable on this platform; pointed out by + coolbugcheckers AT gmail.com + +commit acc59cbe7a1fb169e1c3caba65a39bd74d6e030d +Author: deraadt@openbsd.org +Date: Wed Oct 10 16:43:49 2018 +0000 + + upstream: introducing openssh 7.9 + + OpenBSD-Commit-ID: 42d526a9fe01a40dd299ac58014d3349adf40e25 + +commit 12731158c75c8760a8bea06350eeb3e763fe1a07 +Author: Damien Miller +Date: Thu Oct 11 10:29:29 2018 +1100 + + supply callback to PEM_read_bio_PrivateKey + + OpenSSL 1.1.0i has changed the behaviour of their PEM APIs, + so that empty passphrases are interpreted differently. This + probabalistically breaks loading some keys, because the PEM format + is terrible and doesn't include a proper MAC. + + Avoid this by providing a basic callback to avoid passing empty + passphrases to OpenSSL in cases where one is required. + + Based on patch from Jakub Jelen in bz#2913; ok dtucker@ + +commit d1d301a1dd5d6cc3a9ed93ab7ab09dda4cb456e0 +Author: Damien Miller +Date: Wed Oct 10 14:57:00 2018 +1100 + + in pick_salt() avoid dereference of NULL passwords + + Apparently some NIS implementations can leave pw->pw_passwd (or the + shadow equivalent) NULL. + + bz#2909; based on patch from Todd Eigenschink + +commit edbb6febccee084d212fdc0cb05b40cb1c646ab1 +Author: djm@openbsd.org +Date: Tue Oct 9 05:42:23 2018 +0000 + + upstream: Treat all PEM_read_bio_PrivateKey() errors when a passphrase + + is specified as "incorrect passphrase" instead of trying to choose between + that and "invalid format". + + libcrypto can return ASN1 parsing errors rather than the expected + decrypt error in certain infrequent cases when trying to decrypt/parse + PEM private keys when supplied with an invalid passphrase. + + Report and repro recipe from Thomas Deutschmann in bz#2901 + + ok markus@ + + OpenBSD-Commit-ID: b1d4cd92395f9743f81c0d23aab2524109580870 + +commit 2581333d564d8697837729b3d07d45738eaf5a54 +Author: naddy@openbsd.org +Date: Fri Oct 5 14:26:09 2018 +0000 + + upstream: Support using service names for port numbers. + + * Try to resolve a port specification with getservbyname(3) if a + numeric conversion fails. + * Make the "Port" option in ssh_config handle its argument as a + port rather than a plain integer. + + ok dtucker@ deraadt@ + + OpenBSD-Commit-ID: e7f03633133205ab3dfbc67f9df7475fabae660d + +commit e0d6501e86734c48c8c503f81e1c0926e98c5c4c +Author: djm@openbsd.org +Date: Thu Oct 4 07:47:35 2018 +0000 + + upstream: when the peer sends a channel-close message, make sure we + + close the local extended read fd (stderr) along with the regular read fd + (stdout). Avoids weird stuck processed in multiplexing mode. + + Report and analysis by Nelson Elhage and Geoffrey Thomas in bz#2863 + + ok dtucker@ markus@ + + OpenBSD-Commit-ID: a48a2467fe938de4de69d2e7193d5fa701f12ae9 + +commit 6f1aabb128246f445e33b8844fad3de9cb1d18cb +Author: djm@openbsd.org +Date: Thu Oct 4 01:04:52 2018 +0000 + + upstream: factor out channel status formatting from + + channel_open_message() so we can use it in other debug messages + + OpenBSD-Commit-ID: 9c3903ca28fcabad57f566c9d0045b41ab7d52ba + +commit f1dd179e122bdfdb7ca3072d9603607740efda05 +Author: djm@openbsd.org +Date: Thu Oct 4 00:10:11 2018 +0000 + + upstream: include a little more information about the status and + + disposition of channel's extended (stderr) fd; makes debugging some things a + bit easier. No behaviour change. + + OpenBSD-Commit-ID: 483eb6467dc7d5dbca8eb109c453e7a43075f7ce + +commit 2d1428b11c8b6f616f070f2ecedce12328526944 +Author: djm@openbsd.org +Date: Thu Oct 4 00:04:41 2018 +0000 + + upstream: explicit_bzero here to be consistent with other kex*.c; + + report from coolbugcheckers AT gmail.com + + OpenBSD-Commit-ID: a90f146c5b5f5b1408700395e394f70b440856cb + +commit 5eff5b858e717e901e6af6596306a114de9f79f2 +Author: djm@openbsd.org +Date: Wed Oct 3 06:38:35 2018 +0000 + + upstream: Allow ssh_config IdentityAgent directive to accept + + environment variable names as well as explicit paths. ok dtucker@ + + OpenBSD-Commit-ID: 2f0996e103876c53d8c9dd51dcce9889d700767b + +commit a46ac4d86b25414d78b632e8173578b37e5f8a83 +Author: djm@openbsd.org +Date: Tue Oct 2 12:51:58 2018 +0000 + + upstream: mention INFO@openssh.com for sending SIGINFO + + OpenBSD-Commit-ID: 132471eeb0df658210afd27852fe65131b26e900 + +commit ff3a411cae0b484274b7900ef52ff4dad3e12876 +Author: Damien Miller +Date: Tue Oct 2 22:49:40 2018 +1000 + + only support SIGINFO on systems with SIGINFO + +commit cd98925c6405e972dc9f211afc7e75e838abe81c +Author: djm@openbsd.org +Date: Tue Oct 2 12:40:07 2018 +0000 + + upstream: Add server support for signalling sessions via the SSH + + channel/ session protocol. Signalling is only supported to sesssions that are + not subsystems and were not started with a forced command. + + Long requested in bz#1424 + + Based on a patch from markus@ and reworked by dtucker@; + ok markus@ dtucker@ + + OpenBSD-Commit-ID: 4bea826f575862eaac569c4bedd1056a268be1c3 + +commit dba50258333f2604a87848762af07ba2cc40407a +Author: djm@openbsd.org +Date: Wed Sep 26 07:32:44 2018 +0000 + + upstream: remove big ugly TODO comment from start of file. Some of + + the mentioned tasks are obsolete and, of the remainder, most are already + captured in PROTOCOL.mux where they better belong + + OpenBSD-Commit-ID: 16d9d76dee42a5bb651c9d6740f7f0ef68aeb407 + +commit 92b61a38ee9b765f5049f03cd1143e13f3878905 +Author: djm@openbsd.org +Date: Wed Sep 26 07:30:05 2018 +0000 + + upstream: Document mux proxy mode; added by Markus in openssh-7.4 + + Also add a little bit of information about the overall packet format + + OpenBSD-Commit-ID: bdb6f6ea8580ef96792e270cae7857786ad84a95 + +commit 9d883a1ce4f89b175fd77405ff32674620703fb2 +Author: djm@openbsd.org +Date: Wed Sep 26 01:48:57 2018 +0000 + + upstream: s/process_mux_master/mux_master_process/ in mux master + + function names, + + Gives better symmetry with the existing mux_client_*() names and makes + it more obvious when a message comes from the master vs client (they + are interleved in ControlMaster=auto mode). + + no functional change beyond prefixing a could of log messages with + __func__ where they were previously lacking. + + OpenBSD-Commit-ID: b01f7c3fdf92692e1713a822a89dc499333daf75 + +commit c2fa53cd6462da82d3a851dc3a4a3f6b920337c8 +Author: Darren Tucker +Date: Sat Sep 22 14:41:24 2018 +1000 + + Remove unused variable in _ssh_compat_fflush. + +commit d1b3540c21212624af907488960d703c7d987b42 +Author: Darren Tucker +Date: Thu Sep 20 18:08:43 2018 +1000 + + Import updated moduli. + +commit b5e412a8993ad17b9e1141c78408df15d3d987e1 +Author: djm@openbsd.org +Date: Fri Sep 21 12:46:22 2018 +0000 + + upstream: Allow ssh_config ForwardX11Timeout=0 to disable the + + timeout and allow X11 connections in untrusted mode indefinitely. ok dtucker@ + + OpenBSD-Commit-ID: ea1ceed3f540b48e5803f933e59a03b20db10c69 + +commit cb24d9fcc901429d77211f274031653476864ec6 +Author: djm@openbsd.org +Date: Fri Sep 21 12:23:17 2018 +0000 + + upstream: when compiled with GSSAPI support, cache supported method + + OIDs by calling ssh_gssapi_prepare_supported_oids() regardless of whether + GSSAPI authentication is enabled in the main config. + + This avoids sandbox violations for configurations that enable GSSAPI + auth later, e.g. + + Match user djm + GSSAPIAuthentication yes + + bz#2107; ok dtucker@ + + OpenBSD-Commit-ID: a5dd42d87c74e27cfb712b15b0f97ab20e0afd1d + +commit bbc8af72ba68da014d4de6e21a85eb5123384226 +Author: djm@openbsd.org +Date: Fri Sep 21 12:20:12 2018 +0000 + + upstream: In sshkey_in_file(), ignore keys that are considered for + + being too short (i.e. SSH_ERR_KEY_LENGTH). These keys will not be considered + to be "in the file". This allows key revocation lists to contain short keys + without the entire revocation list being considered invalid. + + bz#2897; ok dtucker + + OpenBSD-Commit-ID: d9f3d857d07194a42ad7e62889a74dc3f9d9924b + +commit 383a33d160cefbfd1b40fef81f72eadbf9303a66 +Author: djm@openbsd.org +Date: Fri Sep 21 03:11:36 2018 +0000 + + upstream: Treat connections with ProxyJump specified the same as ones + + with a ProxyCommand set with regards to hostname canonicalisation (i.e. don't + try to canonicalise the hostname unless CanonicalizeHostname is set to + 'always'). + + Patch from Sven Wegener via bz#2896 + + OpenBSD-Commit-ID: 527ff501cf98bf65fb4b29ed0cb847dda10f4d37 + +commit 0cbed248ed81584129b67c348dbb801660f25a6a +Author: djm@openbsd.org +Date: Thu Sep 20 23:40:16 2018 +0000 + + upstream: actually make CASignatureAlgorithms available as a config + + option + + OpenBSD-Commit-ID: 93fa7ff58314ed7b1ab7744090a6a91232e6ae52 + +commit 62528870c0ec48cd86a37dd7320fb85886c3e6ee +Author: dtucker@openbsd.org +Date: Thu Sep 20 08:07:03 2018 +0000 + + upstream: Import updated moduli. + + OpenBSD-Commit-ID: 04431e8e7872f49a2129bf080a6b73c19d576d40 + +commit e6933a2ffa0659d57f3c7b7c457b2c62b2a84613 +Author: jmc@openbsd.org +Date: Thu Sep 20 06:58:48 2018 +0000 + + upstream: reorder CASignatureAlgorithms, and add them to the + + various -o lists; ok djm + + OpenBSD-Commit-ID: ecb88baecc3c54988b4d1654446ea033da359288 + +commit aa083aa9624ea7b764d5a81c4c676719a1a3e42b +Author: djm@openbsd.org +Date: Thu Sep 20 03:31:49 2018 +0000 + + upstream: fix "ssh -Q sig" to show correct signature algorithm list + + (it was erroneously showing certificate algorithms); prompted by markus@ + + OpenBSD-Commit-ID: 1cdee002f2f0c21456979deeb887fc889afb154d + +commit ecac7e1f7add6b28874959a11f2238d149dc2c07 +Author: djm@openbsd.org +Date: Thu Sep 20 03:30:44 2018 +0000 + + upstream: add CASignatureAlgorithms option for the client, allowing + + it to specify which signature algorithms may be used by CAs when signing + certificates. Useful if you want to ban RSA/SHA1; ok markus@ + + OpenBSD-Commit-ID: 9159e5e9f67504829bf53ff222057307a6e3230f + +commit 86e5737c39153af134158f24d0cab5827cbd5852 +Author: djm@openbsd.org +Date: Thu Sep 20 03:28:06 2018 +0000 + + upstream: Add sshd_config CASignatureAlgorithms option to allow + + control over which signature algorithms a CA may use when signing + certificates. In particular, this allows a sshd to ban certificates signed + with RSA/SHA1. + + ok markus@ + + OpenBSD-Commit-ID: b05c86ef8b52b913ed48d54a9b9c1a7714d96bac + +commit f80e68ea7d62e2dfafc12f1a60ab544ae4033a0f +Author: djm@openbsd.org +Date: Wed Sep 19 02:03:02 2018 +0000 + + upstream: Make "ssh-add -q" do what it says on the tin: silence + + output from successful operations. + + Based on patch from Thijs van Dijk; ok dtucker@ deraadt@ + + OpenBSD-Commit-ID: c4f754ecc055c10af166116ce7515104aa8522e1 + +commit 5e532320e9e51de720d5f3cc2596e95d29f6e98f +Author: millert@openbsd.org +Date: Mon Sep 17 15:40:14 2018 +0000 + + upstream: When choosing a prime from the moduli file, avoid + + re-using the linenum variable for something that is not a line number to + avoid the confusion that resulted in the bug in rev. 1.64. This also lets us + pass the actual linenum to parse_prime() so the error messages include the + correct line number. OK markus@ some time ago. + + OpenBSD-Commit-ID: 4d8e5d3e924d6e8eb70053e3defa23c151a00084 + +commit cce8cbe0ed7d1ba3a575310e0b63c193326ae616 +Author: Darren Tucker +Date: Sat Sep 15 19:44:06 2018 +1000 + + Fix openssl-1.1 fallout for --without-openssl. + + ok djm@ + +commit 149519b9f201dac755f3cba4789f4d76fecf0ee1 +Author: Damien Miller +Date: Sat Sep 15 19:37:48 2018 +1000 + + add futex(2) syscall to seccomp sandbox + + Apparently needed for some glibc/openssl combinations. + + Patch from Arkadiusz Miśkiewicz + +commit 4488ae1a6940af704c4dbf70f55bf2f756a16536 +Author: Damien Miller +Date: Sat Sep 15 19:36:55 2018 +1000 + + really add source for authopt_fuzz this time + +commit 9201784b4a257c8345fbd740bcbdd70054885707 +Author: Damien Miller +Date: Sat Sep 15 19:35:40 2018 +1000 + + remove accidentally checked-in authopt_fuzz binary + +commit beb9e522dc7717df08179f9e59f36b361bfa14ab +Author: djm@openbsd.org +Date: Fri Sep 14 05:26:27 2018 +0000 + + upstream: second try, deals properly with missing and private-only + + Use consistent format in debug log for keys readied, offered and + received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains (where available) the key filename, its type and fingerprint, + and whether the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: f1c6a8e9cfc4e108c359db77f24f9a40e1e25ea7 + +commit 6bc5a24ac867bfdc3ed615589d69ac640f51674b +Author: Damien Miller +Date: Fri Sep 14 15:16:34 2018 +1000 + + fuzzer harness for authorized_keys option parsing + +commit 6c8b82fc6929b6a9a3f645151b6ec26c5507d9ef +Author: djm@openbsd.org +Date: Fri Sep 14 04:44:04 2018 +0000 + + upstream: revert following; deals badly with agent keys + + revision 1.285 + date: 2018/09/14 04:17:12; author: djm; state: Exp; lines: +47 -26; commitid: lflGFcNb2X2HebaK; + Use consistent format in debug log for keys readied, offered and + received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains the key filename, its type and fingerprint, and whether + the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: e496bd004e452d4b051f33ed9ae6a54ab918f56d + +commit 6da046f9c3374ce7e269ded15d8ff8bc45017301 +Author: djm@openbsd.org +Date: Fri Sep 14 04:17:44 2018 +0000 + + upstream: garbage-collect moribund ssh_new_private() API. + + OpenBSD-Commit-ID: 7c05bf13b094093dfa01848a9306c82eb6e95f6c + +commit 1f24ac5fc05252ceb1c1d0e8cab6a283b883c780 +Author: djm@openbsd.org +Date: Fri Sep 14 04:17:12 2018 +0000 + + upstream: Use consistent format in debug log for keys readied, + + offered and received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains the key filename, its type and fingerprint, and whether + the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: 2a01d59285a8a7e01185bb0a43316084b4f06a1f + +commit 488c9325bb7233e975dbfbf89fa055edc3d3eddc +Author: millert@openbsd.org +Date: Thu Sep 13 15:23:32 2018 +0000 + + upstream: Fix warnings caused by user_from_uid() and group_from_gid() + + now returning const char *. + + OpenBSD-Commit-ID: b5fe571ea77cfa7b9035062829ab05eb87d7cc6f + +commit 0aa1f230846ebce698e52051a107f3127024a05a +Author: Damien Miller +Date: Fri Sep 14 10:31:47 2018 +1000 + + allow SIGUSR1 as synonym for SIGINFO + + Lets users on those unfortunate operating systems that lack SIGINFO + still be able to obtain progress information from unit tests :) + +commit d64e78526596f098096113fcf148216798c327ff +Author: Damien Miller +Date: Thu Sep 13 19:05:48 2018 +1000 + + add compat header + +commit a3fd8074e2e2f06602e25618721f9556c731312c +Author: djm@openbsd.org +Date: Thu Sep 13 09:03:20 2018 +0000 + + upstream: missed a bit of openssl-1.0.x API in this unittest + + OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9 + +commit 86e0a9f3d249d5580390daf58e015e68b01cef10 +Author: djm@openbsd.org +Date: Thu Sep 13 05:06:51 2018 +0000 + + upstream: use only openssl-1.1.x API here too + + OpenBSD-Regress-ID: ae877064597c349954b1b443769723563cecbc8f + +commit 48f54b9d12c1c79fba333bc86d455d8f4cda8cfc +Author: Damien Miller +Date: Thu Sep 13 12:13:50 2018 +1000 + + adapt -portable to OpenSSL 1.1x API + + Polyfill missing API with replacement functions extracted from LibreSSL + +commit 86112951d63d48839f035b5795be62635a463f99 +Author: Damien Miller +Date: Thu Sep 13 12:12:42 2018 +1000 + + forgot to stage these test files in commit d70d061 + +commit 482d23bcacdd3664f21cc82a5135f66fc598275f +Author: djm@openbsd.org +Date: Thu Sep 13 02:08:33 2018 +0000 + + upstream: hold our collective noses and use the openssl-1.1.x API in + + OpenSSH; feedback and ok tb@ jsing@ markus@ + + OpenBSD-Commit-ID: cacbcac87ce5da0d3ca7ef1b38a6f7fb349e4417 + +commit d70d061828730a56636ab6f1f24fe4a8ccefcfc1 +Author: djm@openbsd.org +Date: Wed Sep 12 01:36:45 2018 +0000 + + upstream: Include certs with multiple RSA signature variants in + + test data Ensure that cert->signature_key is populated correctly + + OpenBSD-Regress-ID: 56e68f70fe46cb3a193ca207385bdb301fd6603a + +commit f803b2682992cfededd40c91818b653b5d923ef5 +Author: djm@openbsd.org +Date: Wed Sep 12 01:23:48 2018 +0000 + + upstream: test revocation by explicit hash and by fingerprint + + OpenBSD-Regress-ID: 079c18a9ab9663f4af419327c759fc1e2bc78fd8 + +commit 2de78bc7da70e1338b32feeefcc6045cf49efcd4 +Author: djm@openbsd.org +Date: Wed Sep 12 01:22:43 2018 +0000 + + upstream: s/sshkey_demote/sshkey_from_private/g + + OpenBSD-Regress-ID: 782bde7407d94a87aa8d1db7c23750e09d4443c4 + +commit 41c115a5ea1cb79a6a3182773c58a23f760e8076 +Author: Damien Miller +Date: Wed Sep 12 16:50:01 2018 +1000 + + delete the correct thing; kexfuzz binary + +commit f0fcd7e65087db8c2496f13ed39d772f8e38b088 +Author: djm@openbsd.org +Date: Wed Sep 12 06:18:59 2018 +0000 + + upstream: fix edit mistake; spotted by jmc@ + + OpenBSD-Commit-ID: dd724e1c52c9d6084f4cd260ec7e1b2b138261c6 + +commit 4cc259bac699f4d2a5c52b92230f9e488c88a223 +Author: djm@openbsd.org +Date: Wed Sep 12 01:34:02 2018 +0000 + + upstream: add SSH_ALLOWED_CA_SIGALGS - the default list of + + signature algorithms that are allowed for CA signatures. Notably excludes + ssh-dsa. + + ok markus@ + + OpenBSD-Commit-ID: 1628e4181dc8ab71909378eafe5d06159a22deb4 + +commit ba9e788315b1f6a350f910cb2a9e95b2ce584e89 +Author: djm@openbsd.org +Date: Wed Sep 12 01:32:54 2018 +0000 + + upstream: add sshkey_check_cert_sigtype() that checks a + + cert->signature_type against a supplied whitelist; ok markus + + OpenBSD-Commit-ID: caadb8073292ed7a9535e5adc067d11d356d9302 + +commit a70fd4ad7bd9f2ed223ff635a3d41e483057f23b +Author: djm@openbsd.org +Date: Wed Sep 12 01:31:30 2018 +0000 + + upstream: add cert->signature_type field and keep it in sync with + + certificate signature wrt loading and certification operations; ok markus@ + + OpenBSD-Commit-ID: e8b8b9f76b66707a0cd926109c4383db8f664df3 + +commit 357128ac48630a9970e3af0e6ff820300a28da47 +Author: djm@openbsd.org +Date: Wed Sep 12 01:30:10 2018 +0000 + + upstream: Add "ssh -Q sig" to allow listing supported signature + + algorithms ok markus@ + + OpenBSD-Commit-ID: 7a8c6eb6c249dc37823ba5081fce64876d10fe2b + +commit 9405c6214f667be604a820c6823b27d0ea77937d +Author: djm@openbsd.org +Date: Wed Sep 12 01:21:34 2018 +0000 + + upstream: allow key revocation by SHA256 hash and allow ssh-keygen + + to create KRLs using SHA256/base64 key fingerprints; ok markus@ + + OpenBSD-Commit-ID: a0590fd34e7f1141f2873ab3acc57442560e6a94 + +commit 50e2687ee0941c0ea216d6ffea370ffd2c1f14b9 +Author: djm@openbsd.org +Date: Wed Sep 12 01:19:12 2018 +0000 + + upstream: log certificate fingerprint in authentication + + success/failure message (previously we logged only key ID and CA key + fingerprint). + + ok markus@ + + OpenBSD-Commit-ID: a8ef2d172b7f1ddbcce26d6434b2de6d94f6c05d + +commit de37ca909487d23e5844aca289b3f5e75d3f1e1f +Author: dtucker@openbsd.org +Date: Fri Sep 7 04:26:56 2018 +0000 + + upstream: Add FALLTHROUGH comments where appropriate. Patch from + + jjelen at redhat via bz#2687. + + OpenBSD-Commit-ID: c48eb457be697a19d6d2950c6d0879f3ccc851d3 + +commit 247766cd3111d5d8c6ea39833a3257ca8fb820f2 +Author: djm@openbsd.org +Date: Fri Sep 7 01:42:54 2018 +0000 + + upstream: ssh -MM requires confirmation for all operations that + + change the multiplexing state, not just new sessions. + + mention that confirmation is checked via ssh-askpass + + OpenBSD-Commit-ID: 0f1b45551ebb9cc5c9a4fe54ad3b23ce90f1f5c2 + +commit db8bb80e3ac1bcb3e1305d846cd98c6b869bf03f +Author: mestre@openbsd.org +Date: Tue Aug 28 12:25:53 2018 +0000 + + upstream: fix misplaced parenthesis inside if-clause. it's harmless + + and the only issue is showing an unknown error (since it's not defined) + during fatal(), if it ever an error occurs inside that condition. + + OK deraadt@ markus@ djm@ + + OpenBSD-Commit-ID: acb0a8e6936bfbe590504752d01d1d251a7101d8 + +commit 086cc614f550b7d4f100c95e472a6b6b823938ab +Author: mestre@openbsd.org +Date: Tue Aug 28 12:17:45 2018 +0000 + + upstream: fix build with DEBUG_PK enabled + + OK dtucker@ + + OpenBSD-Commit-ID: ec1568cf27726e9638a0415481c20c406e7b441c + +commit 2678833013e97f8b18f09779b7f70bcbf5eb2ab2 +Author: Darren Tucker +Date: Fri Sep 7 14:41:53 2018 +1000 + + Handle ngroups>_SC_NGROUPS_MAX. + + Based on github pull request #99 from Darren Maffat at Oracle: Solaris' + getgrouplist considers _SC_NGROUPS_MAX more of a guideline and can return + a larger number of groups. In this case, retry getgrouplist with a + larger array and defer allocating groups_byname. ok djm@ + +commit 039bf2a81797b8f3af6058d34005a4896a363221 +Author: Darren Tucker +Date: Fri Sep 7 14:06:57 2018 +1000 + + Initial len for the fmt=NULL case. + + Patch from jjelen at redhat via bz#2687. (OpenSSH never calls + setproctitle with a null format so len is always initialized). + +commit ea9c06e11d2e8fb2f4d5e02f8a41e23d2bd31ca9 +Author: Darren Tucker +Date: Fri Sep 7 14:01:39 2018 +1000 + + Include stdlib.h. + + Patch from jjelen at redhat via bz#2687. + +commit 9617816dbe73ec4d65075f4d897443f63a97c87f +Author: Damien Miller +Date: Mon Aug 27 13:08:01 2018 +1000 + + document some more regress control env variables + + Specifically SKIP_UNIT, USE_VALGRING and LTESTS. Sort the list of + environment variables. + + Based on patch from Jakub Jelen + commit 71508e06fab14bc415a79a08f5535ad7bffa93d9 Author: Damien Miller Date: Thu Aug 23 15:41:42 2018 +1000 @@ -8880,862 +9704,3 @@ Date: Thu Oct 20 03:42:09 2016 +1100 Remote channels .orig and .rej files. These files were incorrectly added during an OpenBSD sync. - -commit 246aa842a4ad368d8ce030495e657ef3a0e1f95c -Author: dtucker@openbsd.org -Date: Tue Oct 18 17:32:54 2016 +0000 - - upstream commit - - Remove channel_input_port_forward_request(); the only caller - was the recently-removed SSH1 server code so it's now dead code. ok markus@ - - Upstream-ID: 05453983230a1f439562535fec2818f63f297af9 - -commit 2c6697c443d2c9c908260eed73eb9143223e3ec9 -Author: millert@openbsd.org -Date: Tue Oct 18 12:41:22 2016 +0000 - - upstream commit - - Install a signal handler for tty-generated signals and - wait for the ssh child to suspend before suspending sftp. This lets ssh - restore the terminal mode as needed when it is suspended at the password - prompt. OK dtucker@ - - Upstream-ID: a31c1f42aa3e2985dcc91e46e6a17bd22e372d69 - -commit fd2a8f1033fa2316fff719fd5176968277560158 -Author: jmc@openbsd.org -Date: Sat Oct 15 19:56:25 2016 +0000 - - upstream commit - - various formatting fixes, specifically removing Dq; - - Upstream-ID: 81e85df2b8e474f5f93d66e61d9a4419ce87347c - -commit 8f866d8a57b9a2dc5dd04504e27f593b551618e3 -Author: Darren Tucker -Date: Wed Oct 19 03:26:09 2016 +1100 - - Import readpassphrase.c rev 1.26. - - Author: miller@openbsd.org: - Avoid generate SIGTTOU when restoring the terminal mode. If we get - SIGTTOU it means the process is not in the foreground process group - which, in most cases, means that the shell has taken control of the tty. - Requiring the user the fg the process in this case doesn't make sense - and can result in both SIGTSTP and SIGTTOU being sent which can lead to - the process being suspended again immediately after being brought into - the foreground. - -commit f901440cc844062c9bab0183d133f7ccc58ac3a5 -Author: Darren Tucker -Date: Wed Oct 19 03:23:16 2016 +1100 - - Import readpassphrase.c rev 1.25. - - Wrap so internal calls go direct and - readpassphrase is weak. - - (DEF_WEAK is a no-op in portable.) - -commit 032147b69527e5448a511049b2d43dbcae582624 -Author: Darren Tucker -Date: Sat Oct 15 05:51:12 2016 +1100 - - Move DEF_WEAK into defines.h. - - As well pull in more recent changes from OpenBSD these will start to - arrive so put it where the definition is shared. - -commit e0259a82ddd950cfb109ddee86fcebbc09c6bd04 -Author: Darren Tucker -Date: Sat Oct 15 04:34:46 2016 +1100 - - Remove do_pam_set_tty which is dead code. - - The callers of do_pam_set_tty were removed in 2008, so this is now dead - code. bz#2604, pointed out by jjelen at redhat.com. - -commit ca04de83f210959ad2ed870a30ba1732c3ae00e3 -Author: Damien Miller -Date: Thu Oct 13 18:53:43 2016 +1100 - - unbreak principals-command test - - Undo inconsistetly updated variable name. - -commit 1723ec92eb485ce06b4cbf49712d21975d873909 -Author: djm@openbsd.org -Date: Tue Oct 11 21:49:54 2016 +0000 - - upstream commit - - fix the KEX fuzzer - the previous method of obtaining the - packet contents was broken. This now uses the new per-packet input hook, so - it sees exact post-decrypt packets and doesn't have to pass packet integrity - checks. ok markus@ - - Upstream-Regress-ID: 402fb6ffabd97de590e8e57b25788949dce8d2fd - -commit 09f997893f109799cddbfce6d7e67f787045cbb2 -Author: natano@openbsd.org -Date: Thu Oct 6 09:31:38 2016 +0000 - - upstream commit - - Move USER out of the way to unbreak the BUILDUSER - mechanism. ok tb - - Upstream-Regress-ID: 74ab9687417dd071d62316eaadd20ddad1d5af3c - -commit 3049a012c482a7016f674db168f23fd524edce27 -Author: bluhm@openbsd.org -Date: Fri Sep 30 11:55:20 2016 +0000 - - upstream commit - - In ssh tests set REGRESS_FAIL_EARLY with ?= so that the - environment can change it. OK djm@ - - Upstream-Regress-ID: 77bcb50e47b68c7209c7f0a5a020d73761e5143b - -commit 39af7b444db28c1cb01b7ea468a4f574a44f375b -Author: djm@openbsd.org -Date: Tue Oct 11 21:47:45 2016 +0000 - - upstream commit - - Add a per-packet input hook that is called with the - decrypted packet contents. This will be used for fuzzing; ok markus@ - - Upstream-ID: a3221cee6b1725dd4ae1dd2c13841b4784cb75dc - -commit ec165c392ca54317dbe3064a8c200de6531e89ad *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 14 19:19:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 689C323EEDC; Fri, 14 Feb 2020 19:19:43 +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) server-signature RSA-PSS (4096 bits) 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 48K39C2kB6z43vp; Fri, 14 Feb 2020 19:19:43 +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 39EFE752; Fri, 14 Feb 2020 19:19:43 +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 01EJJhxd017668; Fri, 14 Feb 2020 19:19:43 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJJdMs017647; Fri, 14 Feb 2020 19:19:39 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002141919.01EJJdMs017647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 14 Feb 2020 19:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357927 - in vendor-sys/acpica/dist: . generate/lint generate/unix generate/unix/acpidump generate/unix/acpiexec source/common source/compiler source/components/events source/components... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . generate/lint generate/unix generate/unix/acpidump generate/unix/acpiexec source/common source/compiler source/components/events source/components/hardware source/componen... X-SVN-Commit-Revision: 357927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:19:43 -0000 Author: jkim Date: Fri Feb 14 19:19:39 2020 New Revision: 357927 URL: https://svnweb.freebsd.org/changeset/base/357927 Log: Merge ACPICA 20200214. Deleted: vendor-sys/acpica/dist/source/compiler/aslcompiler.y Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/lint/files.lnt vendor-sys/acpica/dist/generate/lint/lint.bat vendor-sys/acpica/dist/generate/lint/readme.txt vendor-sys/acpica/dist/generate/lint/std16.lnt vendor-sys/acpica/dist/generate/lint/std64.lnt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/include/acconvert.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/tests/misc/grammar.asl vendor-sys/acpica/dist/tests/templates/templates.sh Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/changes.txt Fri Feb 14 19:19:39 2020 (r357927) @@ -1,4 +1,102 @@ ---------------------------------------- +14 February 2020. Summary of changes for version 20200214: + + +1) ACPICA kernel-resident subsystem: + +Enable sleep button on ACPI legacy wake: Hibernation (S4) is triggered +in a guest when it receives a sleep trigger from the hypervisor. When the +guest resumes from this power state, it does not see the SleepEnabled +bit. In other words, the sleepHibernation (S4) is triggered in a guest +when it receives a sleep trigger from the hypervisor. When the guest +resumes from this power state, it does not see the SleepEnabled bit. In +other words, the sleep button is not enabled on waking from an S4 state. +This causes subsequent invocation of sleep state to fail since the +guest.button is not enabled on waking from an S4 state. This causes +subsequent invocation of sleep state to fail in the guest. Fix this +problem by enabling the sleep button in ACPI legacy wake. From Anchal +Agarwal . + +Implemented a new external interface, AcpiAnyGpeStatusSet (). To be used +for checking the status bits of all enabled GPEs in one go. It is needed +to distinguish spurious SCIs from genuine ones when deciding whether or +not to wake up the system from suspend-to-idle. + +Generic Makefiles: replace HOST name with ACPI_HOST: Some machines may be +using HOST in their environment to represent the host name for their +machines. Avoid this problem by renaming this variable from HOST to +ACPI_HOST. + +MSVC 2017 project files: Enable multiprocessor generation to improve +build performance. + +Added a macro to get the byte width of a Generic Address structure. New +ACPI_ACCESS_BYTE_WIDTH is in addition to the existing +ACPI_ACCESS_BIT_WIDTH. From Mika Westerberg. + + +2) iASL Compiler/Disassembler and ACPICA tools: + +iASL: Implemented full support for the (optional, rarely used) ReturnType +and ParameterTypesList for the Method, Function, and External operators. +For Method declarations, the number of individual ParameterTypes must +match the declaration of the number of arguments (NumArgs). This also +Fixes a problem with the External operator where extra/extraneous bytes +were emitted in the AML code if the optional ReturnType/ParameterTypes +were specified for a MethodObj declaration. +New error message: +1) Method NumArgs count does not match length of ParameterTypes list + +iASL: Implemented detection of type mismatches between External +declarations and named object declarations. Also, detect type mismatches +between multiple External declarations of the same Name. +New error messages: +1) Type mismatch between external declaration and actual object +declaration detected +2) Type mismatch between multiple external declarations detected + +iASL: Implemented new error messages for External operators that specify +a ReturnType and/or ParameterTypesList for any object type other than +control methods (MethodObj). +New error messages: +1) Return type is only allowed for Externals declared as MethodObj +2) Parameter type is only allowed for Externals declared as MethodObj + +iASL: Implemented two new remark/warning messages for ASL code that +creates named objects from within a control method. This is very +inefficient since the named object must be created and deleted each time +the method is executed. +New messages: +1) Creation of named objects within a method is highly inefficient, use +globals or method local variables instead (remark) +2) Static OperationRegion should be declared outside control method +(warning) + +iASL: Improved illegal forward reference detection by adding support to +detect forward-reference method invocations. + +iASL: Detect and issue an error message for NameStrings that contain too +many individual NameSegs (>255). This is an AML limitation that is +defined in the ACPI specification. +New message: +1) NameString contains too many NameSegs (>255) + +acpidump: windows: use GetSystemFirmwareTable API for all tables except +SSDT. By using this API, acpidump is able to get all tables in the XSDT + +iASL: Removed unused parser file and updated msvc2017 project files. +Removed the obsolete AslCompiler.y from the repository. + +iASL: msvc2017: Fixed macros in the file dependency list to prevent +unnecessary rebuilds. Replace %(Directory) with %(RelativeDir). + +Disassembler: Prevent spilling error messages to the output file. All +errors are directed to the console instead. These error messages +prevented re-compilation of the resulting disassembled ASL output file +(.DSL). + + +---------------------------------------- 10 January 2020. Summary of changes for version 20200110: @@ -8845,8 +8943,8 @@ much larger code and data size. Fix build error under Bison-2.4. -Dissasembler: Enhanced FADT support. Added decoding of the Boot -Architecture +Disassembler: Enhanced FADT support. Added decoding of the Boot +Architecture flags. Now decode all flags, regardless of the FADT version. Flag output includes the FADT version which first defined each flag. Modified: vendor-sys/acpica/dist/generate/lint/files.lnt ============================================================================== --- vendor-sys/acpica/dist/generate/lint/files.lnt Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/lint/files.lnt Fri Feb 14 19:19:39 2020 (r357927) @@ -12,4 +12,3 @@ ..\..\source\components\resources\*.c ..\..\source\components\tables\*.c ..\..\source\components\utilities\*.c - Modified: vendor-sys/acpica/dist/generate/lint/lint.bat ============================================================================== --- vendor-sys/acpica/dist/generate/lint/lint.bat Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/lint/lint.bat Fri Feb 14 19:19:39 2020 (r357927) @@ -13,4 +13,3 @@ echo 32-bit lint completed >> LintOut.txt @echo off echo --- echo Output placed in LintOut.txt - Modified: vendor-sys/acpica/dist/generate/lint/readme.txt ============================================================================== --- vendor-sys/acpica/dist/generate/lint/readme.txt Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/lint/readme.txt Fri Feb 14 19:19:39 2020 (r357927) @@ -11,4 +11,3 @@ std32.lnt - 32-bit options std64.lnt - 64-bit options options.lnt - common options others - windows/dos compiler option files - Modified: vendor-sys/acpica/dist/generate/lint/std16.lnt ============================================================================== --- vendor-sys/acpica/dist/generate/lint/std16.lnt Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/lint/std16.lnt Fri Feb 14 19:19:39 2020 (r357927) @@ -13,4 +13,3 @@ c:\acpi\generate\lint\co-msc40.lnt options.lnt -mL -si2 -spN2 -spF4 -sl4 - Modified: vendor-sys/acpica/dist/generate/lint/std64.lnt ============================================================================== --- vendor-sys/acpica/dist/generate/lint/std64.lnt Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/lint/std64.lnt Fri Feb 14 19:19:39 2020 (r357927) @@ -15,4 +15,3 @@ co.lnt options.lnt - Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Feb 14 19:19:39 2020 (r357927) @@ -26,15 +26,15 @@ # Notes: # gcc should be version 4 or greater, otherwise some of the options # used will not be recognized. -# Optional: Set HOST to an appropriate value (_LINUX, _FreeBSD, _APPLE, _CYGWIN, etc.) +# Optional: Set ACPI_HOST to an appropriate value (_LINUX, _FreeBSD, _APPLE, _CYGWIN, etc.) # See include/platform/acenv.h for supported values. -# Note: HOST is not nearly as important for applications as it +# Note: ACPI_HOST is not nearly as important for applications as it # is for the kernel-resident version of ACPICA, and it may # not be necessary to change it. # .SUFFIXES : PROGS = acpibin acpidump acpiexamples acpiexec acpihelp acpinames acpisrc acpixtract iasl -HOST ?= _CYGWIN +ACPI_HOST ?= _CYGWIN CC ?= gcc # @@ -52,26 +52,26 @@ UNAME_S := $(shell uname -s) # Host detection and configuration # ifeq ($(UNAME_S), Darwin) # Mac OS X -HOST = _APPLE +ACPI_HOST = _APPLE endif ifeq ($(UNAME_S), DragonFly) -HOST = _DragonFly +ACPI_HOST = _DragonFly endif ifeq ($(UNAME_S), FreeBSD) -HOST = _FreeBSD +ACPI_HOST = _FreeBSD endif ifeq ($(UNAME_S), NetBSD) -HOST = _NetBSD +ACPI_HOST = _NetBSD endif ifeq ($(UNAME_S), QNX) -HOST = _QNX +ACPI_HOST = _QNX endif -ifeq ($(HOST), _APPLE) +ifeq ($(ACPI_HOST), _APPLE) INSTALL = cp INSTALLFLAGS ?= -f else @@ -183,7 +183,7 @@ OPT_CFLAGS += -D_FORTIFY_SOURCE=2 endif CFLAGS += \ - -D$(HOST)\ + -D$(ACPI_HOST)\ -D_GNU_SOURCE\ -I$(ACPICA_INCLUDE) @@ -191,7 +191,7 @@ CFLAGS += \ # QNX requires __EXT to enable most functions in its C library, analogous # to _GNU_SOURCE. # -ifeq ($(HOST), _QNX) +ifeq ($(ACPI_HOST), _QNX) CFLAGS+=-D__EXT endif @@ -231,11 +231,11 @@ CWARNINGFLAGS += \ # # Per-host flags and exclusions # -ifneq ($(HOST), _FreeBSD) +ifneq ($(ACPI_HOST), _FreeBSD) CWARNINGFLAGS += \ -Wempty-body - ifneq ($(HOST), _APPLE) + ifneq ($(ACPI_HOST), _APPLE) CWARNINGFLAGS += \ -Woverride-init\ -Wlogical-op\ Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Fri Feb 14 19:19:39 2020 (r357927) @@ -54,19 +54,19 @@ OBJECTS = \ # # Per-host interfaces # -ifeq ($(HOST), _DragonFly) +ifeq ($(ACPI_HOST), _DragonFly) HOST_FAMILY = BSD endif -ifeq ($(HOST), _FreeBSD) +ifeq ($(ACPI_HOST), _FreeBSD) HOST_FAMILY = BSD endif -ifeq ($(HOST), _NetBSD) +ifeq ($(ACPI_HOST), _NetBSD) HOST_FAMILY = BSD endif -ifeq ($(HOST), _QNX) +ifeq ($(ACPI_HOST), _QNX) HOST_FAMILY = BSD endif Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Fri Feb 14 19:19:39 2020 (r357927) @@ -255,12 +255,12 @@ CFLAGS += \ -DACPI_CHECKSUM_ABORT=TRUE endif -ifneq ($(HOST),_QNX) +ifneq ($(ACPI_HOST),_QNX) LDFLAGS += -lpthread endif -ifneq ($(HOST),_APPLE) -ifneq ($(HOST),_QNX) +ifneq ($(ACPI_HOST),_APPLE) +ifneq ($(ACPI_HOST),_QNX) LDFLAGS += -lrt endif endif Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Feb 14 19:19:39 2020 (r357927) @@ -156,6 +156,7 @@ #include "acnamesp.h" #include "acparser.h" #include "acapps.h" +#include "acconvert.h" #define _COMPONENT ACPI_TOOLS @@ -379,8 +380,6 @@ AdAmlDisassemble ( Status = AE_ERROR; goto Cleanup; } - - AcpiOsRedirectOutput (File); } *OutFilename = DisasmFilename; @@ -467,6 +466,11 @@ AdDisassembleOneTable ( if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) { + if (File) + { + AcpiOsRedirectOutput (File); + } + AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE); /* This is a "Data Table" (non-AML table) */ @@ -489,6 +493,10 @@ AdDisassembleOneTable ( return (AE_OK); } + /* Initialize the converter output file */ + + ASL_CV_INIT_FILETREE(Table, File); + /* * This is an AML table (DSDT or SSDT). * Always parse the tables, only option is what to display @@ -499,6 +507,13 @@ AdDisassembleOneTable ( AcpiOsPrintf ("Could not parse ACPI tables, %s\n", AcpiFormatException (Status)); return (Status); + } + + /* Redirect output for code generation and debugging output */ + + if (File) + { + AcpiOsRedirectOutput (File); } /* Debug output, namespace and parse tree */ Modified: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/common/dmtables.c Fri Feb 14 19:19:39 2020 (r357927) @@ -506,7 +506,6 @@ AdParseTable ( AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); - ASL_CV_INIT_FILETREE(Table, AmlStart, AmlLength); AcpiUtSetIntegerWidth (Table->Revision); Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Feb 14 19:19:39 2020 (r357927) @@ -151,6 +151,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" +#include "acnamesp.h" #include @@ -421,6 +422,7 @@ AnCheckMethodReturnValue ( { ACPI_PARSE_OBJECT *OwningOp; ACPI_NAMESPACE_NODE *Node; + char *ExternalPath; Node = ArgOp->Asl.Node; @@ -435,18 +437,19 @@ AnCheckMethodReturnValue ( /* Examine the parent op of this method */ OwningOp = Node->Op; + ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE); + if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL) { /* Method NEVER returns a value */ - AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName); + AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, ExternalPath); } else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL) { /* Method SOMETIMES returns a value, SOMETIMES not */ - AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, - Op, Op->Asl.ExternalName); + AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, Op, ExternalPath); } else if (!(ThisNodeBtype & RequiredBtypes)) { @@ -469,6 +472,11 @@ AnCheckMethodReturnValue ( AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer); } + } + + if (ExternalPath) + { + ACPI_FREE (ExternalPath); } } Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Feb 14 19:19:39 2020 (r357927) @@ -647,7 +647,7 @@ void AslCompilerFileHeader ( UINT32 FileId) { - struct tm *NewTime; + char *NewTime; time_t Aclock; char *Prefix = ""; @@ -691,13 +691,17 @@ AslCompilerFileHeader ( /* Compilation header with timestamp */ - (void) time (&Aclock); - NewTime = localtime (&Aclock); + Aclock = time (NULL); + NewTime = ctime (&Aclock); FlPrintFile (FileId, - "%sCompilation of \"%s\" - %s%s\n", - Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime), - Prefix); + "%sCompilation of \"%s\" -", + Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename); + + if (NewTime) + { + FlPrintFile (FileId, " %s%s\n", NewTime, Prefix); + } switch (FileId) { Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Feb 14 19:19:39 2020 (r357927) @@ -373,7 +373,16 @@ MtMethodAnalysisWalkEnd ( UINT32 Level, void *Context); +UINT32 +MtProcessTypeOp ( + ACPI_PARSE_OBJECT *TypeOp); +UINT8 +MtProcessParameterTypeList ( + ACPI_PARSE_OBJECT *ParamTypeOp, + UINT32 *TypeList); + + /* * aslbtypes - bitfield data types */ @@ -1233,9 +1242,13 @@ UtDumpBasicOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level); -void * -UtGetParentMethod ( +ACPI_NAMESPACE_NODE * +UtGetParentMethodNode ( ACPI_NAMESPACE_NODE *Node); + +ACPI_PARSE_OBJECT * +UtGetParentMethodOp ( + ACPI_PARSE_OBJECT *Op); BOOLEAN UtNodeIsDescendantOf ( Modified: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Feb 14 19:19:39 2020 (r357927) @@ -192,12 +192,54 @@ ExDoExternal ( ACPI_PARSE_OBJECT *Prev; ACPI_PARSE_OBJECT *Next; ACPI_PARSE_OBJECT *ArgCountOp; + ACPI_PARSE_OBJECT *TypeOp; + ACPI_PARSE_OBJECT *ExternTypeOp = Op->Asl.Child->Asl.Next; + UINT32 ExternType; + UINT8 ParamCount = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS; + UINT32 ParamTypes[ACPI_METHOD_NUM_ARGS]; + ExternType = AnMapObjTypeToBtype (ExternTypeOp); + + /* + * The parser allows optional parameter return types regardless of the + * type. Check object type keyword emit error if optional parameter/return + * types exist. + * + * Check the parameter return type + */ + TypeOp = ExternTypeOp->Asl.Next; + if (TypeOp->Asl.Child) + { + /* Ignore the return type for now. */ + + (void) MtProcessTypeOp (TypeOp->Asl.Child); + if (ExternType != ACPI_BTYPE_METHOD) + { + sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType)); + AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_RET_TYPE, TypeOp, + AslGbl_MsgBuffer); + } + } + + /* Check the parameter types */ + + TypeOp = TypeOp->Asl.Next; + if (TypeOp->Asl.Child) + { + ParamCount = MtProcessParameterTypeList (TypeOp->Asl.Child, ParamTypes); + if (ExternType != ACPI_BTYPE_METHOD) + { + sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType)); + AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_PARAM_TYPE, TypeOp, + AslGbl_MsgBuffer); + } + } + ArgCountOp = Op->Asl.Child->Asl.Next->Asl.Next; ArgCountOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE; ArgCountOp->Asl.ParseOpcode = PARSEOP_BYTECONST; - ArgCountOp->Asl.Value.Integer = 0; + ArgCountOp->Asl.Value.Integer = ParamCount; UtSetParseOpName (ArgCountOp); /* Create new list node of arbitrary type */ Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Feb 14 19:19:39 2020 (r357927) @@ -196,6 +196,15 @@ LdCheckSpecialNames ( ACPI_NAMESPACE_NODE *Node, ACPI_PARSE_OBJECT *Op); +static ACPI_STATUS +LdAnalyzeExternals ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op, + ACPI_OBJECT_TYPE ExternalOpType, + ACPI_OBJECT_TYPE ObjectType, + ACPI_WALK_STATE *WalkState); + + /******************************************************************************* * * FUNCTION: LdLoadNamespace @@ -575,7 +584,8 @@ LdNamespace1Begin ( /* Check for a possible illegal forward reference */ if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) || - (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING)) + (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) || + (Op->Asl.ParseOpcode == PARSEOP_METHODCALL)) { /* * Op->Asl.Namepath will be NULL for these opcodes. @@ -591,7 +601,8 @@ LdNamespace1Begin ( * We only want references to named objects: * Store (2, WXYZ) -> Attempt to resolve the name */ - if (OpInfo->Class == AML_CLASS_NAMED_OBJECT) + if ((Op->Asl.ParseOpcode != PARSEOP_METHODCALL) && + (OpInfo->Class == AML_CLASS_NAMED_OBJECT)) { return (AE_OK); } @@ -899,58 +910,26 @@ LdNamespace1Begin ( Node->Type = (UINT8) ObjectType; Status = AE_OK; } - else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)) + else if ((Node->Flags & ANOBJ_IS_EXTERNAL) || + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) { - /* - * Allow one create on an object or segment that was - * previously declared External - */ - Node->Flags &= ~ANOBJ_IS_EXTERNAL; - Node->Type = (UINT8) ObjectType; - - /* Just retyped a node, probably will need to open a scope */ - - if (AcpiNsOpensScope (ObjectType)) + Status = LdAnalyzeExternals (Node, Op, ActualObjectType, + ObjectType, WalkState); + if (ACPI_FAILURE (Status)) { - Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState); - if (ACPI_FAILURE (Status)) + if (Status == AE_ERROR) { - return_ACPI_STATUS (Status); + /* + * The use of AE_ERROR here indicates that there was a + * compiler error emitted in LdAnalyzeExternals which + * means that the caller should proceed to the next Op + * for analysis of subsequent parse objects. + */ + Status = AE_OK; } + return_ACPI_STATUS (Status); } - - Status = AE_OK; } - else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) - { - /* - * Allow externals in same scope as the definition of the - * actual object. Similar to C. Allows multiple definition - * blocks that refer to each other in the same file. - */ - Status = AE_OK; - } - else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - (ObjectType == ACPI_TYPE_ANY)) - { - /* Allow update of externals of unknown type. */ - - if (AcpiNsOpensScope (ActualObjectType)) - { - Node->Type = (UINT8) ActualObjectType; - Status = AE_OK; - } - else - { - sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName, - AcpiUtGetTypeName (Node->Type)); - AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer); - return_ACPI_STATUS (AE_OK); - } - } else { /* Valid error, object already exists */ @@ -1013,15 +992,17 @@ FinishNode: * Set the actual data type if appropriate (EXTERNAL term only) * As of 11/19/2019, ASL External() does not support parameter * counts. When an External method is loaded, the parameter count is - * unknown setting Node->Value to ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS - * indicates that the parameter count for this method is unknown. - * This information is used in ASL cross reference to help determine the - * parameter count through method calls. + * recorded in the external's arg count parameter. The parameter count may + * or may not be known in the declaration. If the value of this node turns + * out to be ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS, it indicates that + * we do not know the parameter count and that we must look at the usage of + * the External method call to get this information. */ if (ActualObjectType != ACPI_TYPE_ANY) { Node->Type = (UINT8) ActualObjectType; - Node->Value = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS; + Node->Value = (UINT32) + Op->Asl.Child->Asl.Next->Asl.Next->Asl.Value.Integer; } if (Op->Asl.ParseOpcode == PARSEOP_METHOD) @@ -1034,6 +1015,145 @@ FinishNode: } return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: LdAnalyzeExternals + * + * PARAMETERS: Node - Node that represents the named object + * Op - Named object declaring this named object + * ExternalOpType - Type of ExternalOp + * ObjectType - Type of Declared object + * WalkState - Current WalkState + * + * RETURN: Status + * + * DESCRIPTION: Node and Op represents an identically named object declaration + * that is either declared by the ASL external keyword or declared + * by operators that declare named objects (i.e. Name, Device, + * OperationRegion, and etc.). This function ensures that the + * declarations do not contradict each other. + * + ******************************************************************************/ + +static ACPI_STATUS +LdAnalyzeExternals ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op, + ACPI_OBJECT_TYPE ExternalOpType, + ACPI_OBJECT_TYPE ObjectType, + ACPI_WALK_STATE *WalkState) +{ + ACPI_STATUS Status = AE_OK; + ACPI_OBJECT_TYPE ActualExternalOpType; + ACPI_OBJECT_TYPE ActualOpType; + ACPI_PARSE_OBJECT *ExternalOp; + ACPI_PARSE_OBJECT *ActualOp; + + + /* + * The declaration represented by Node and Op must have the same type. + * The type of the external Op is represented by ExternalOpType. However, + * the type of the pre-existing declaration depends on whether if Op + * is an external declaration or an actual declaration. + */ + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) + { + ActualExternalOpType = ExternalOpType; + ActualOpType = Node->Type; + } + else + { + ActualExternalOpType = Node->Type; + ActualOpType = ObjectType; + } + + if ((ActualOpType != ACPI_TYPE_ANY) && + (ActualExternalOpType != ACPI_TYPE_ANY) && + (ActualExternalOpType != ActualOpType)) + { + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL && + Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) + { + AslDualParseOpError (ASL_ERROR, + ASL_MSG_DUPLICATE_EXTERN_MISMATCH, Op, NULL, + ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, Node->Op, NULL); + } + else + { + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL && + Node->Op->Asl.ParseOpcode != PARSEOP_EXTERNAL) + { + ExternalOp = Op; + ActualOp = Node->Op; + } + else + { + ExternalOp = Node->Op; + ActualOp = Op; + } + AslDualParseOpError (ASL_ERROR, + ASL_MSG_DECLARATION_TYPE_MISMATCH, ExternalOp, NULL, + ASL_MSG_TYPE_MISMATCH_FOUND_HERE, ActualOp, NULL); + } + } + + if ((Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)) + { + /* + * Allow one create on an object or segment that was + * previously declared External + */ + Node->Flags &= ~ANOBJ_IS_EXTERNAL; + Node->Type = (UINT8) ObjectType; + + /* Just retyped a node, probably will need to open a scope */ + + if (AcpiNsOpensScope (ObjectType)) + { + Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + + Status = AE_OK; + } + else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) + { + /* + * Allow externals in same scope as the definition of the + * actual object. Similar to C. Allows multiple definition + * blocks that refer to each other in the same file. + */ + Status = AE_OK; + } + else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && + (ObjectType == ACPI_TYPE_ANY)) + { + /* Allow update of externals of unknown type. */ + + if (AcpiNsOpensScope (ExternalOpType)) + { + Node->Type = (UINT8) ExternalOpType; + Status = AE_OK; + } + else + { + sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName, + AcpiUtGetTypeName (Node->Type)); + AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer); + Status = AE_ERROR; + } + } + + return (Status); } Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Feb 14 19:19:39 2020 (r357927) @@ -320,7 +320,7 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator", /* ASL_MSG_SEEK */ "Could not seek file", /* ASL_MSG_SERIALIZED */ "Control Method marked Serialized", -/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized", +/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized due to creation of named objects within", /* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)", /* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value", /* ASL_MSG_STRING_LENGTH */ "String literal too long", @@ -370,7 +370,16 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_INVALID_PROCESSOR_UID */ "_UID inside processor declaration must be an integer", /* ASL_MSG_LEGACY_PROCESSOR_OP */ "Legacy Processor() keyword detected. Use Device() keyword instead.", /* ASL_MSG_NAMESTRING_LENGTH */ "NameString contains too many NameSegs (>255)", -/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:" +/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:", +/* ASL_MSG_EXTERN_INVALID_RET_TYPE */ "Return type is only allowed for Externals declared as MethodObj", +/* ASL_MSG_EXTERN_INVALID_PARAM_TYPE */ "Parameter type is only allowed for Externals declared as MethodObj", +/* ASL_MSG_NAMED_OBJECT_CREATION */ "Creation of named objects within a method is highly inefficient, use globals or method local variables instead", +/* ASL_MSG_ARG_COUNT_MISMATCH */ "Method NumArgs count does not match length of ParameterTypes list", +/* ASL_MSG_STATIC_OPREGION_IN_METHOD */ "Static OperationRegion should be declared outside control method", +/* ASL_MSG_DECLARATION_TYPE_MISMATCH */ "Type mismatch between external declaration and actual object declaration detected", +/* ASL_MSG_TYPE_MISMATCH_FOUND_HERE */ "Actual object declaration:", +/* ASL_MSG_DUPLICATE_EXTERN_MISMATCH */ "Type mismatch between multiple external declarations detected", +/* ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE */"Duplicate external declaration:", }; /* Table compiler */ Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Feb 14 19:19:39 2020 (r357927) @@ -373,6 +373,16 @@ typedef enum ASL_MSG_LEGACY_PROCESSOR_OP, ASL_MSG_NAMESTRING_LENGTH, ASL_MSG_CASE_FOUND_HERE, + ASL_MSG_EXTERN_INVALID_RET_TYPE, + ASL_MSG_EXTERN_INVALID_PARAM_TYPE, + ASL_MSG_NAMED_OBJECT_CREATION, + ASL_MSG_ARG_COUNT_MISMATCH, + ASL_MSG_STATIC_OPREGION_IN_METHOD, + ASL_MSG_DECLARATION_TYPE_MISMATCH, + ASL_MSG_TYPE_MISMATCH_FOUND_HERE, + ASL_MSG_DUPLICATE_EXTERN_MISMATCH, + ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, + /* These messages are used by the Data Table compiler only */ Modified: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Feb 14 19:06:59 2020 (r357926) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Feb 14 19:19:39 2020 (r357927) @@ -151,6 +151,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" +#include "acnamesp.h" #include "acparser.h" #include "amlcode.h" @@ -166,7 +167,11 @@ MtCheckNamedObjectInMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +static void +MtCheckStaticOperationRegionInMethod ( + ACPI_PARSE_OBJECT *Op); + /******************************************************************************* * * FUNCTION: MtMethodAnalysisWalkBegin @@ -197,7 +202,6 @@ MtMethodAnalysisWalkBegin ( char ArgName[] = "Arg0"; ACPI_PARSE_OBJECT *ArgNode; ACPI_PARSE_OBJECT *NextType; - ACPI_PARSE_OBJECT *NextParamType; UINT8 ActualArgs = 0; BOOLEAN HidExists; BOOLEAN AdrExists; @@ -282,50 +286,35 @@ MtMethodAnalysisWalkBegin ( Next = Next->Asl.Next; NextType = Next->Asl.Child; - while (NextType) - { - /* Get and map each of the ReturnTypes */ - MethodInfo->ValidReturnTypes |= AnMapObjTypeToBtype (NextType); - NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - NextType = NextType->Asl.Next; - } + MethodInfo->ValidReturnTypes = MtProcessTypeOp (NextType); /* Get the ParameterType node */ Next = Next->Asl.Next; NextType = Next->Asl.Child; - while (NextType) + if (!NextType) { - if (NextType->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) - { - NextParamType = NextType->Asl.Child; - while (NextParamType) - { - MethodInfo->ValidArgTypes[ActualArgs] |= - AnMapObjTypeToBtype (NextParamType); - - NextParamType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - NextParamType = NextParamType->Asl.Next; - } - } - else - { - MethodInfo->ValidArgTypes[ActualArgs] = - AnMapObjTypeToBtype (NextType); - - NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - ActualArgs++; - } - - NextType = NextType->Asl.Next; + /* + * The optional parameter types list was omitted at the source + * level. Use the Argument count parameter instead. + */ + ActualArgs = MethodInfo->NumArguments; } + else + { + ActualArgs = MtProcessParameterTypeList (NextType, + MethodInfo->ValidArgTypes); + } if ((MethodInfo->NumArguments) && (MethodInfo->NumArguments != ActualArgs)) { - /* error: Param list did not match number of args */ + sprintf (AslGbl_MsgBuffer, + "Length = %u", ActualArgs); + AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_MISMATCH, + Op->Asl.Child->Asl.Next, AslGbl_MsgBuffer); } /* Allow numarguments == 0 for Function() */ @@ -576,6 +565,8 @@ MtMethodAnalysisWalkBegin ( AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName); } + + MtCheckStaticOperationRegionInMethod (Op); break; case PARSEOP_NAME: @@ -630,6 +621,71 @@ MtMethodAnalysisWalkBegin ( /******************************************************************************* * + * FUNCTION: MtProcessTypeOp + * + * PARAMETERS: Op - Op representing a btype + * + * RETURN: Btype represented by Op + * + * DESCRIPTION: Process a parse object that represents single parameter type or + * a return type in method, function, and external declarations. + * + ******************************************************************************/ + +UINT32 +MtProcessTypeOp ( + ACPI_PARSE_OBJECT *TypeOp) +{ + UINT32 Btype = ACPI_BTYPE_ANY; + + + while (TypeOp) + { + Btype |= AnMapObjTypeToBtype (TypeOp); + TypeOp->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + TypeOp = TypeOp->Asl.Next; + } + + return (Btype); +} + + +/******************************************************************************* + * + * FUNCTION: MtProcessParameterTypeList + * + * PARAMETERS: Op - Op representing a btype + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 14 19:20:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 852A823EF77; Fri, 14 Feb 2020 19:20:31 +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) server-signature RSA-PSS (4096 bits) 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 48K3B72xJNz4430; Fri, 14 Feb 2020 19:20:31 +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 45CC3756; Fri, 14 Feb 2020 19:20:31 +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 01EJKVlW017787; Fri, 14 Feb 2020 19:20:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJKVUq017786; Fri, 14 Feb 2020 19:20:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002141920.01EJKVUq017786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 14 Feb 2020 19:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357928 - vendor-sys/acpica/20200214 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20200214 X-SVN-Commit-Revision: 357928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:20:31 -0000 Author: jkim Date: Fri Feb 14 19:20:30 2020 New Revision: 357928 URL: https://svnweb.freebsd.org/changeset/base/357928 Log: Tag ACPICA 20200214. Added: vendor-sys/acpica/20200214/ - copied from r357927, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Fri Feb 14 19:31:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0230623F315; Fri, 14 Feb 2020 19:31:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K3Qh6Jgbz44bY; Fri, 14 Feb 2020 19:31:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3DDDAA2; Fri, 14 Feb 2020 19:31:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EJVO4B028583; Fri, 14 Feb 2020 19:31:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJVO8V028582; Fri, 14 Feb 2020 19:31:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002141931.01EJVO8V028582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 14 Feb 2020 19:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357929 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 357929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:31:25 -0000 Author: dim Date: Fri Feb 14 19:31:24 2020 New Revision: 357929 URL: https://svnweb.freebsd.org/changeset/base/357929 Log: Remove /usr/include/ssp from BSD.include.dist after r356356 This avoids having to delete it every time with "make delete-old". PR: 242950 MFC after: 2 weeks X-MFC-With: r356356 Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Fri Feb 14 19:20:30 2020 (r357928) +++ head/etc/mtree/BSD.include.dist Fri Feb 14 19:31:24 2020 (r357929) @@ -357,8 +357,6 @@ mac_veriexec .. .. - ssp - .. sys disk .. From owner-svn-src-all@freebsd.org Fri Feb 14 19:33:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9811823F73E; Fri, 14 Feb 2020 19:33:50 +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) server-signature RSA-PSS (4096 bits) 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 48K3TV3ZMZz45BD; Fri, 14 Feb 2020 19:33:50 +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 75D01B1E; Fri, 14 Feb 2020 19:33:50 +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 01EJXoec029803; Fri, 14 Feb 2020 19:33:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJXoCM029802; Fri, 14 Feb 2020 19:33:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141933.01EJXoCM029802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 19:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357932 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 357932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:33:50 -0000 Author: emaste Date: Fri Feb 14 19:33:50 2020 New Revision: 357932 URL: https://svnweb.freebsd.org/changeset/base/357932 Log: Update OpenSSH upgrade instructions to use https, not ftp ftp://ftp.openbsd.org/ does not work. Modified: head/crypto/openssh/FREEBSD-upgrade Modified: head/crypto/openssh/FREEBSD-upgrade ============================================================================== --- head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 19:33:48 2020 (r357931) +++ head/crypto/openssh/FREEBSD-upgrade Fri Feb 14 19:33:50 2020 (r357932) @@ -5,7 +5,7 @@ pretty fast once you're done with this checklist. 01) Download the latest OpenSSH-portable tarball and signature from - OpenBSD (ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/). + OpenBSD (https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/). 02) Verify the signature: From owner-svn-src-all@freebsd.org Fri Feb 14 19:34:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04C0323F7CA; Fri, 14 Feb 2020 19:34:18 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 48K3V15zgDz45P3; Fri, 14 Feb 2020 19:34:17 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qk1-f172.google.com with SMTP id z19so10317210qkj.5; Fri, 14 Feb 2020 11:34:17 -0800 (PST) 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=XiVW1WrEWOgWE6221BBk8lMyklEY8ZSjFEAnGXuxupY=; b=UWV/LWSee35Mojao82t8t79GttzTlJgLMeb/ayWZ6Z5XHXbPO7t+fokHjvGVfJElgx Ckze+enHz9/VNfhYkWzZUS+riokU07lVoWSKv6sXQz/Lk/8981Wrf7eHbNNl2nOamqQu m7gxQv87p8Dr4o3mZG8ZOZoTZNlHd3mPMa9aYatOxmNGmEHjA+yJw4NRvHdBPzQ07w+K t+IYe5rFkV5d94T3e+6bqDfhl6OY50TG8o1GkwYUHxBbOzk/xnzvLruqrysBPtWmiMq1 V2ptnaLLCfxtrfHLowDwyOS7yIM8Tjq872CR2RHsbZ6NCA0baYTWPNYoWRWbTHn4T/IT e09Q== X-Gm-Message-State: APjAAAUWa71L8G9dab/q6DeGpLUBW1i9mYfMB5cbwXdloI17cBklX05j UMzHnJdR3SOHMGyJbx/vVCKtxqGF X-Google-Smtp-Source: APXvYqyv/7qtR6EfyHwi6T9Us3WsaN5pYOcT8kMC4xs2bBx02E42PINPcNO/pCtHZQjuINKwBiEykw== X-Received: by 2002:a37:a9d2:: with SMTP id s201mr4092504qke.171.1581708856634; Fri, 14 Feb 2020 11:34:16 -0800 (PST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com. [209.85.222.179]) by smtp.gmail.com with ESMTPSA id a196sm1285993qkg.105.2020.02.14.11.34.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Feb 2020 11:34:16 -0800 (PST) Received: by mail-qk1-f179.google.com with SMTP id z19so10317167qkj.5; Fri, 14 Feb 2020 11:34:16 -0800 (PST) X-Received: by 2002:ae9:e10e:: with SMTP id g14mr4238546qkm.430.1581708856108; Fri, 14 Feb 2020 11:34:16 -0800 (PST) MIME-Version: 1.0 References: <202002141931.01EJVO8V028582@repo.freebsd.org> In-Reply-To: <202002141931.01EJVO8V028582@repo.freebsd.org> From: Kyle Evans Date: Fri, 14 Feb 2020 13:34:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r357929 - head/etc/mtree To: Dimitry Andric Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48K3V15zgDz45P3 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:34:18 -0000 On Fri, Feb 14, 2020 at 1:31 PM Dimitry Andric wrote: > > Author: dim > Date: Fri Feb 14 19:31:24 2020 > New Revision: 357929 > URL: https://svnweb.freebsd.org/changeset/base/357929 > > Log: > Remove /usr/include/ssp from BSD.include.dist after r356356 > > This avoids having to delete it every time with "make delete-old". > Ack- thanks! From owner-svn-src-all@freebsd.org Fri Feb 14 19:47:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA427240093; Fri, 14 Feb 2020 19:47:16 +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) server-signature RSA-PSS (4096 bits) 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 48K3n04pzfz46tW; Fri, 14 Feb 2020 19:47:16 +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 85085D1A; Fri, 14 Feb 2020 19:47:16 +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 01EJlGw5036537; Fri, 14 Feb 2020 19:47:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJlFdV036532; Fri, 14 Feb 2020 19:47:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141947.01EJlFdV036532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 19:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357933 - in vendor-crypto/openssh/dist: . contrib/cygwin contrib/redhat contrib/suse openbsd-compat openbsd-compat/regress regress regress/misc/kexfuzz regress/unittests regress/unitte... X-SVN-Group: vendor-crypto X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in vendor-crypto/openssh/dist: . contrib/cygwin contrib/redhat contrib/suse openbsd-compat openbsd-compat/regress regress regress/misc/kexfuzz regress/unittests regress/unittests/kex regress/unittests... X-SVN-Commit-Revision: 357933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:47:16 -0000 Author: emaste Date: Fri Feb 14 19:47:15 2020 New Revision: 357933 URL: https://svnweb.freebsd.org/changeset/base/357933 Log: Vendor import of OpenSSH 8.0p1. Added: vendor-crypto/openssh/dist/README.md vendor-crypto/openssh/dist/kexgen.c vendor-crypto/openssh/dist/kexsntrup4591761x25519.c vendor-crypto/openssh/dist/openbsd-compat/regress/utimensattest.c vendor-crypto/openssh/dist/sntrup4591761.c vendor-crypto/openssh/dist/sntrup4591761.sh Deleted: vendor-crypto/openssh/dist/kexc25519c.c vendor-crypto/openssh/dist/kexc25519s.c vendor-crypto/openssh/dist/kexdhc.c vendor-crypto/openssh/dist/kexdhs.c vendor-crypto/openssh/dist/kexecdhc.c vendor-crypto/openssh/dist/kexecdhs.c vendor-crypto/openssh/dist/opacket.c vendor-crypto/openssh/dist/opacket.h Modified: vendor-crypto/openssh/dist/.depend vendor-crypto/openssh/dist/.gitignore vendor-crypto/openssh/dist/.skipped-commit-ids vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/INSTALL vendor-crypto/openssh/dist/Makefile.in vendor-crypto/openssh/dist/OVERVIEW vendor-crypto/openssh/dist/PROTOCOL.certkeys vendor-crypto/openssh/dist/README vendor-crypto/openssh/dist/atomicio.c vendor-crypto/openssh/dist/atomicio.h vendor-crypto/openssh/dist/audit-bsm.c vendor-crypto/openssh/dist/audit-linux.c vendor-crypto/openssh/dist/audit.c vendor-crypto/openssh/dist/audit.h vendor-crypto/openssh/dist/auth-pam.c vendor-crypto/openssh/dist/auth-pam.h vendor-crypto/openssh/dist/auth.c vendor-crypto/openssh/dist/auth.h vendor-crypto/openssh/dist/auth2-hostbased.c vendor-crypto/openssh/dist/auth2-pubkey.c vendor-crypto/openssh/dist/auth2.c vendor-crypto/openssh/dist/authfd.c vendor-crypto/openssh/dist/channels.c vendor-crypto/openssh/dist/clientloop.c vendor-crypto/openssh/dist/config.h.in vendor-crypto/openssh/dist/configure vendor-crypto/openssh/dist/configure.ac vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config vendor-crypto/openssh/dist/contrib/redhat/openssh.spec vendor-crypto/openssh/dist/contrib/suse/openssh.spec vendor-crypto/openssh/dist/crypto_api.h vendor-crypto/openssh/dist/dh.c vendor-crypto/openssh/dist/dh.h vendor-crypto/openssh/dist/dispatch.c vendor-crypto/openssh/dist/dispatch.h vendor-crypto/openssh/dist/entropy.c vendor-crypto/openssh/dist/groupaccess.c vendor-crypto/openssh/dist/kex.c vendor-crypto/openssh/dist/kex.h vendor-crypto/openssh/dist/kexc25519.c vendor-crypto/openssh/dist/kexdh.c vendor-crypto/openssh/dist/kexecdh.c vendor-crypto/openssh/dist/kexgex.c vendor-crypto/openssh/dist/kexgexc.c vendor-crypto/openssh/dist/kexgexs.c vendor-crypto/openssh/dist/loginrec.c vendor-crypto/openssh/dist/loginrec.h vendor-crypto/openssh/dist/match.c vendor-crypto/openssh/dist/match.h vendor-crypto/openssh/dist/misc.c vendor-crypto/openssh/dist/misc.h vendor-crypto/openssh/dist/moduli vendor-crypto/openssh/dist/moduli.0 vendor-crypto/openssh/dist/moduli.c vendor-crypto/openssh/dist/monitor.c vendor-crypto/openssh/dist/monitor.h vendor-crypto/openssh/dist/monitor_wrap.c vendor-crypto/openssh/dist/monitor_wrap.h vendor-crypto/openssh/dist/mux.c vendor-crypto/openssh/dist/myproposal.h vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.c vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.h vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.c vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.h vendor-crypto/openssh/dist/openbsd-compat/libressl-api-compat.c vendor-crypto/openssh/dist/openbsd-compat/openbsd-compat.h vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.c vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.h vendor-crypto/openssh/dist/openbsd-compat/port-aix.c vendor-crypto/openssh/dist/openbsd-compat/port-aix.h vendor-crypto/openssh/dist/openbsd-compat/regress/Makefile.in vendor-crypto/openssh/dist/openbsd-compat/sys-queue.h vendor-crypto/openssh/dist/packet.c vendor-crypto/openssh/dist/packet.h vendor-crypto/openssh/dist/progressmeter.c vendor-crypto/openssh/dist/progressmeter.h vendor-crypto/openssh/dist/readconf.c vendor-crypto/openssh/dist/readconf.h vendor-crypto/openssh/dist/readpass.c vendor-crypto/openssh/dist/regress/Makefile vendor-crypto/openssh/dist/regress/agent-pkcs11.sh vendor-crypto/openssh/dist/regress/agent-timeout.sh vendor-crypto/openssh/dist/regress/agent.sh vendor-crypto/openssh/dist/regress/cert-hostkey.sh vendor-crypto/openssh/dist/regress/cert-userkey.sh vendor-crypto/openssh/dist/regress/keys-command.sh vendor-crypto/openssh/dist/regress/keyscan.sh vendor-crypto/openssh/dist/regress/misc/kexfuzz/Makefile vendor-crypto/openssh/dist/regress/misc/kexfuzz/kexfuzz.c vendor-crypto/openssh/dist/regress/multiplex.sh vendor-crypto/openssh/dist/regress/multipubkey.sh vendor-crypto/openssh/dist/regress/principals-command.sh vendor-crypto/openssh/dist/regress/sftp-chroot.sh vendor-crypto/openssh/dist/regress/sftp-cmds.sh vendor-crypto/openssh/dist/regress/test-exec.sh vendor-crypto/openssh/dist/regress/unittests/Makefile.inc vendor-crypto/openssh/dist/regress/unittests/kex/Makefile vendor-crypto/openssh/dist/regress/unittests/kex/test_kex.c vendor-crypto/openssh/dist/regress/unittests/sshbuf/Makefile vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_fuzz.c vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c vendor-crypto/openssh/dist/regress/unittests/sshkey/Makefile vendor-crypto/openssh/dist/regress/unittests/sshkey/test_fuzz.c vendor-crypto/openssh/dist/regress/unittests/sshkey/tests.c vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.c vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.h vendor-crypto/openssh/dist/scp.0 vendor-crypto/openssh/dist/scp.1 vendor-crypto/openssh/dist/scp.c vendor-crypto/openssh/dist/servconf.c vendor-crypto/openssh/dist/servconf.h vendor-crypto/openssh/dist/serverloop.c vendor-crypto/openssh/dist/session.c vendor-crypto/openssh/dist/sftp-client.c vendor-crypto/openssh/dist/sftp-client.h vendor-crypto/openssh/dist/sftp-common.c vendor-crypto/openssh/dist/sftp-server-main.c vendor-crypto/openssh/dist/sftp-server.0 vendor-crypto/openssh/dist/sftp-server.c vendor-crypto/openssh/dist/sftp.0 vendor-crypto/openssh/dist/sftp.1 vendor-crypto/openssh/dist/sftp.c vendor-crypto/openssh/dist/ssh-add.0 vendor-crypto/openssh/dist/ssh-add.1 vendor-crypto/openssh/dist/ssh-add.c vendor-crypto/openssh/dist/ssh-agent.0 vendor-crypto/openssh/dist/ssh-agent.c vendor-crypto/openssh/dist/ssh-ecdsa.c vendor-crypto/openssh/dist/ssh-keygen.0 vendor-crypto/openssh/dist/ssh-keygen.1 vendor-crypto/openssh/dist/ssh-keygen.c vendor-crypto/openssh/dist/ssh-keyscan.0 vendor-crypto/openssh/dist/ssh-keyscan.c vendor-crypto/openssh/dist/ssh-keysign.0 vendor-crypto/openssh/dist/ssh-keysign.c vendor-crypto/openssh/dist/ssh-pkcs11-client.c vendor-crypto/openssh/dist/ssh-pkcs11-helper.0 vendor-crypto/openssh/dist/ssh-pkcs11-helper.8 vendor-crypto/openssh/dist/ssh-pkcs11-helper.c vendor-crypto/openssh/dist/ssh-pkcs11.c vendor-crypto/openssh/dist/ssh-pkcs11.h vendor-crypto/openssh/dist/ssh.0 vendor-crypto/openssh/dist/ssh.1 vendor-crypto/openssh/dist/ssh.c vendor-crypto/openssh/dist/ssh.h vendor-crypto/openssh/dist/ssh_api.c vendor-crypto/openssh/dist/ssh_config vendor-crypto/openssh/dist/ssh_config.0 vendor-crypto/openssh/dist/ssh_config.5 vendor-crypto/openssh/dist/sshbuf-getput-crypto.c vendor-crypto/openssh/dist/sshbuf.c vendor-crypto/openssh/dist/sshbuf.h vendor-crypto/openssh/dist/sshconnect.c vendor-crypto/openssh/dist/sshconnect.h vendor-crypto/openssh/dist/sshconnect2.c vendor-crypto/openssh/dist/sshd.0 vendor-crypto/openssh/dist/sshd.c vendor-crypto/openssh/dist/sshd_config.0 vendor-crypto/openssh/dist/sshd_config.5 vendor-crypto/openssh/dist/sshkey.c vendor-crypto/openssh/dist/sshkey.h vendor-crypto/openssh/dist/version.h Modified: vendor-crypto/openssh/dist/.depend ============================================================================== --- vendor-crypto/openssh/dist/.depend Fri Feb 14 19:33:50 2020 (r357932) +++ vendor-crypto/openssh/dist/.depend Fri Feb 14 19:47:15 2020 (r357933) @@ -6,47 +6,47 @@ audit-bsm.o: includes.h config.h defines.h platform.h audit-linux.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h audit.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h auth-bsdauth.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -auth-krb5.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h sshbuf.h sshkey.h misc.h servconf.h uidswap.h hostfile.h auth.h auth-pam.h audit.h loginrec.h +auth-krb5.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h sshbuf.h sshkey.h misc.h servconf.h uidswap.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssherr.h log.h sshbuf.h misc.h sshkey.h match.h ssh2.h auth-options.h auth-pam.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -auth-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h sshbuf.h ssherr.h log.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h -auth-rhosts.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h uidswap.h pathnames.h log.h misc.h sshbuf.h sshkey.h servconf.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h +auth-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h sshbuf.h ssherr.h log.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h +auth-rhosts.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h uidswap.h pathnames.h log.h misc.h sshbuf.h sshkey.h servconf.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-shadow.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h auth-sia.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h auth-skey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -auth.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h match.h groupaccess.h log.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h canohost.h uidswap.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h -auth.o: authfile.h monitor_wrap.h ssherr.h compat.h channels.h -auth2-chall.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh2.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h ssherr.h log.h misc.h servconf.h +auth.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h match.h groupaccess.h log.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h canohost.h uidswap.h packet.h openbsd-compat/sys-queue.h dispatch.h authfile.h +auth.o: monitor_wrap.h ssherr.h compat.h channels.h +auth2-chall.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh2.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h ssherr.h log.h misc.h servconf.h auth2-gss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -auth2-hostbased.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h sshbuf.h log.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h canohost.h monitor_wrap.h -auth2-hostbased.o: pathnames.h ssherr.h match.h -auth2-kbdint.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h hostfile.h auth.h auth-pam.h audit.h loginrec.h log.h misc.h servconf.h ssherr.h -auth2-none.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h misc.h servconf.h compat.h ssh2.h ssherr.h monitor_wrap.h -auth2-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h ssherr.h log.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h monitor_wrap.h misc.h servconf.h -auth2-pubkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h sshbuf.h log.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h uidswap.h -auth2-pubkey.o: auth-options.h canohost.h monitor_wrap.h authfile.h match.h ssherr.h channels.h session.h -auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h sshbuf.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h ssherr.h -auth2.o: monitor_wrap.h digest.h +auth2-hostbased.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h sshbuf.h log.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h canohost.h monitor_wrap.h pathnames.h +auth2-hostbased.o: ssherr.h match.h +auth2-kbdint.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h hostfile.h auth.h auth-pam.h audit.h loginrec.h log.h misc.h servconf.h ssherr.h +auth2-none.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h misc.h servconf.h compat.h ssh2.h ssherr.h monitor_wrap.h +auth2-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h ssherr.h log.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h monitor_wrap.h misc.h servconf.h +auth2-pubkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h sshbuf.h log.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h uidswap.h auth-options.h +auth2-pubkey.o: canohost.h monitor_wrap.h authfile.h match.h ssherr.h channels.h session.h +auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h sshbuf.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h ssherr.h monitor_wrap.h +auth2.o: digest.h authfd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h sshbuf.h sshkey.h authfd.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h compat.h log.h atomicio.h misc.h ssherr.h authfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh.h log.h authfile.h misc.h atomicio.h sshkey.h sshbuf.h ssherr.h krl.h bitmap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h bitmap.h -canohost.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h canohost.h misc.h +canohost.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h canohost.h misc.h chacha.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h chacha.h -channels.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h ssherr.h sshbuf.h packet.h dispatch.h opacket.h log.h misc.h channels.h compat.h canohost.h sshkey.h authfd.h pathnames.h match.h +channels.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h ssherr.h sshbuf.h packet.h dispatch.h log.h misc.h channels.h compat.h canohost.h sshkey.h authfd.h pathnames.h match.h cipher-aes.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/openssl-compat.h cipher-aesctr.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher-aesctr.h rijndael.h cipher-chachapoly.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h sshbuf.h ssherr.h cipher-chachapoly.h chacha.h poly1305.h cipher-ctr.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h misc.h sshbuf.h ssherr.h digest.h openbsd-compat/openssl-compat.h cleanup.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h -clientloop.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h packet.h dispatch.h opacket.h sshbuf.h compat.h channels.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h +clientloop.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h packet.h dispatch.h sshbuf.h compat.h channels.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h clientloop.o: myproposal.h log.h misc.h readconf.h clientloop.h sshconnect.h authfd.h atomicio.h sshpty.h match.h msg.h ssherr.h hostfile.h -compat.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h compat.h log.h match.h kex.h mac.h +compat.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h compat.h log.h match.h kex.h mac.h crypto_api.h crc32.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crc32.h dh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h digest-libc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h digest.h digest-openssl.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -dispatch.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh2.h log.h dispatch.h packet.h openbsd-compat/sys-queue.h opacket.h compat.h ssherr.h +dispatch.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh2.h log.h dispatch.h packet.h openbsd-compat/sys-queue.h compat.h ssherr.h dns.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h ssherr.h dns.h log.h digest.h ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ge25519.h fe25519.h sc25519.h entropy.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h @@ -60,23 +60,19 @@ gss-serv.o: includes.h config.h defines.h platform.h o hash.o: crypto_api.h includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h digest.h log.h ssherr.h hmac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshbuf.h digest.h hmac.h hostfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h match.h sshkey.h hostfile.h log.h misc.h ssherr.h digest.h hmac.h -kex.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h log.h match.h misc.h monitor.h ssherr.h sshbuf .h -kex.o: digest.h -kexc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshbuf.h ssh2.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h log.h digest.h ssherr.h -kexc25519c.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h log.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h ssh2.h sshbuf.h digest.h ssherr.h -kexc25519s.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h kex.h mac.h log.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h ssh2.h sshbuf.h ssherr.h +kex.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh.h ssh2.h atomicio.h version.h packet.h openbsd-compat/sys-queue.h dispatch.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h log.h match.h +kex.o: misc.h monitor.h ssherr.h sshbuf.h digest.h +kexc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h kex.h mac.h crypto_api.h sshbuf.h digest.h ssherr.h ssh2.h kexdh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -kexdhc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -kexdhs.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h kexecdh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -kexecdhc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -kexecdhs.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h +kexgen.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h kex.h mac.h crypto_api.h log.h packet.h openbsd-compat/sys-queue.h dispatch.h ssh2.h sshbuf.h digest.h ssherr.h kexgex.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h kexgexc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h kexgexs.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h +kexsntrup4591761x25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h kex.h mac.h crypto_api.h sshbuf.h digest.h ssherr.h krl.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h sshbuf.h ssherr.h sshkey.h authfile.h misc.h log.h digest.h bitmap.h krl.h log.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h -loginrec.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h hostfile.h ssh.h loginrec.h log.h atomicio.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h canohost.h auth.h auth-pam.h audit.h sshbuf.h ssherr.h +loginrec.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h hostfile.h ssh.h loginrec.h log.h atomicio.h packet.h openbsd-compat/sys-queue.h dispatch.h canohost.h auth.h auth-pam.h audit.h sshbuf.h ssherr.h logintest.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h loginrec.h mac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h digest.h hmac.h umac.h mac.h misc.h ssherr.h sshbuf.h openbsd-compat/openssl-compat.h match.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h match.h misc.h @@ -84,24 +80,23 @@ md5crypt.o: includes.h config.h defines.h platform.h o misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h misc.h log.h ssh.h sshbuf.h ssherr.h moduli.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h openbsd-compat/openssl-compat.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h -monitor.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h dh.h packet.h dispatch.h opacket.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h +monitor.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h dh.h packet.h dispatch.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h monitor_fdpass.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h monitor_fdpass.h -monitor_wrap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h hostfile.h auth.h auth-pam.h audit.h loginrec.h -monitor_wrap.o: auth-options.h packet.h dispatch.h opacket.h log.h monitor.h monitor_wrap.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h ssherr.h +monitor_wrap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h hostfile.h auth.h auth-pam.h audit.h loginrec .h +monitor_wrap.o: auth-options.h packet.h dispatch.h log.h monitor.h monitor_wrap.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h ssherr.h msg.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshbuf.h ssherr.h log.h atomicio.h msg.h misc.h -mux.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h log.h ssh.h ssh2.h pathnames.h misc.h match.h sshbuf.h channels.h msg.h packet.h dispatch.h opacket.h monitor_fdpass.h sshpty.h sshkey.h readconf.h clientloop.h ssherr.h -nchan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h ssh2.h sshbuf.h ssherr.h packet.h dispatch.h opacket.h channels.h compat.h log.h -opacket.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h -packet.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h crc32.h compat.h ssh2.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h digest.h log.h canohost.h misc.h channels.h ssh.h -packet.o: packet.h dispatch.h opacket.h ssherr.h sshbuf.h +mux.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h log.h ssh.h ssh2.h pathnames.h misc.h match.h sshbuf.h channels.h msg.h packet.h dispatch.h monitor_fdpass.h sshpty.h sshkey.h readconf.h clientloop.h ssherr.h +nchan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h ssh2.h sshbuf.h ssherr.h packet.h dispatch.h channels.h compat.h log.h +packet.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h crc32.h compat.h ssh2.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h digest.h log.h canohost.h misc.h channels. h +packet.o: ssh.h packet.h dispatch.h ssherr.h sshbuf.h platform-misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h platform-pledge.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h platform-tracing.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h platform.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h poly1305.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h poly1305.h -progressmeter.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h progressmeter.h atomicio.h misc.h -readconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h xmalloc.h ssh.h ssherr.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h pathnames.h log.h sshkey.h misc.h readconf.h match.h kex.h mac.h uidswap.h -readconf.o: myproposal.h digest.h +progressmeter.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h progressmeter.h atomicio.h misc.h utf8.h +readconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/glob.h xmalloc.h ssh.h ssherr.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h pathnames.h log.h sshkey.h misc.h readconf.h match.h kex.h mac.h crypto_api.h +readconf.o: uidswap.h myproposal.h digest.h readpass.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h misc.h pathnames.h log.h ssh.h uidswap.h rijndael.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h rijndael.h sandbox-capsicum.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h @@ -114,25 +109,26 @@ sandbox-solaris.o: includes.h config.h defines.h platf sandbox-systrace.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sc25519.h crypto_api.h scp.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h atomicio.h pathnames.h log.h misc.h progressmeter.h utf8.h -servconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h log.h sshbuf.h misc.h servconf.h compat.h pathnames.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h match.h channels. h -servconf.o: groupaccess.h canohost.h packet.h dispatch.h opacket.h ssherr.h hostfile.h auth.h auth-pam.h audit.h loginrec.h myproposal.h digest.h -serverloop.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h packet.h dispatch.h opacket.h sshbuf.h log.h misc.h servconf.h canohost.h sshpty.h channels.h compat.h ssh2.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h -serverloop.o: cipher-aesctr.h rijndael.h kex.h mac.h hostfile.h auth.h auth-pam.h audit.h loginrec.h session.h auth-options.h serverloop.h ssherr.h -session.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h opacket.h sshbuf.h ssherr.h match.h uidswap.h compat.h channels.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h -session.o: cipher-aesctr.h rijndael.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h authfd.h pathnames.h log.h misc.h servconf.h sshlogin.h serverloop.h canohost.h session.h kex.h mac.h monitor_wrap.h sftp.h atomicio.h +servconf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h log.h sshbuf.h misc.h servconf.h compat.h pathnames.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h +servconf.o: match.h channels.h groupaccess.h canohost.h packet.h dispatch.h ssherr.h hostfile.h auth.h auth-pam.h audit.h loginrec.h myproposal.h digest.h +serverloop.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h packet.h dispatch.h sshbuf.h log.h misc.h servconf.h canohost.h sshpty.h channels.h compat.h ssh2.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr. h +serverloop.o: rijndael.h kex.h mac.h crypto_api.h hostfile.h auth.h auth-pam.h audit.h loginrec.h session.h auth-options.h serverloop.h ssherr.h +session.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h sshbuf.h ssherr.h match.h uidswap.h compat.h channels.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h +session.o: rijndael.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h authfd.h pathnames.h log.h misc.h servconf.h sshlogin.h serverloop.h canohost.h session.h kex.h mac.h crypto_api.h monitor_wrap.h sftp.h atomicio.h sftp-client.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssherr.h sshbuf.h log.h atomicio.h progressmeter.h misc.h utf8.h sftp.h sftp-common.h sftp-client.h openbsd-compat/glob.h sftp-common.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssherr.h sshbuf.h log.h misc.h sftp.h sftp-common.h sftp-glob.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sftp.h sftp-common.h sftp-client.h openbsd-compat/glob.h sftp-server-main.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h sftp.h misc.h xmalloc.h sftp-server.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshbuf.h ssherr.h log.h misc.h match.h uidswap.h sftp.h sftp-common.h sftp.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h pathnames.h misc.h utf8.h sftp.h ssherr.h sshbuf.h sftp-common.h sftp-client.h openbsd-compat/glob.h +sntrup4591761.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh-add.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/openssl-compat.h xmalloc.h ssh.h log.h sshkey.h sshbuf.h authfd.h authfile.h pathnames.h misc.h ssherr.h digest.h ssh-agent.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h authfd.h compat.h log.h misc.h digest.h ssherr.h match.h ssh-dss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-ecdsa.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-ed25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h log.h sshbuf.h sshkey.h ssherr.h ssh.h ssh-keygen.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h sshkey.h authfile.h uuencode.h sshbuf.h pathnames.h log.h misc.h match.h hostfile.h dns.h ssh.h ssh2.h ssherr.h ssh-pkcs11.h atomicio.h krl.h digest.h utf8.h authfd.h -ssh-keyscan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h compat.h myproposal.h packet.h dispatch.h opacket.h log.h +ssh-keyscan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h compat.h myproposal.h packet.h dispatch.h log. h ssh-keyscan.o: atomicio.h misc.h hostfile.h ssherr.h ssh_api.h ssh2.h dns.h ssh-keysign.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h sshkey.h ssh.h ssh2.h misc.h sshbuf.h authfile.h msg.h canohost.h pathnames.h readconf.h uidswap.h ssherr.h ssh-pkcs11-client.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h @@ -140,27 +136,27 @@ ssh-pkcs11-helper.o: includes.h config.h defines.h pla ssh-pkcs11.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-rsa.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -ssh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/openssl-compat.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h canohost.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h packet.h dispatch.h opacket.h -ssh.o: sshbuf.h channels.h sshkey.h authfd.h authfile.h pathnames.h clientloop.h log.h misc.h readconf.h sshconnect.h kex.h mac.h sshpty.h match.h msg.h version.h ssherr.h myproposal.h utf8.h -ssh_api.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh_api.h openbsd-compat/sys-queue.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h ssh.h ssh2.h packet.h dispatch.h opacket.h compat.h log.h authfile.h misc.h -ssh_api.o: version.h myproposal.h ssherr.h sshbuf.h +ssh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/openssl-compat.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h canohost.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h packet.h dispatch.h sshbuf.h +ssh.o: channels.h sshkey.h authfd.h authfile.h pathnames.h clientloop.h log.h misc.h readconf.h sshconnect.h kex.h mac.h crypto_api.h sshpty.h match.h msg.h version.h ssherr.h myproposal.h utf8.h +ssh_api.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh_api.h openbsd-compat/sys-queue.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h ssh.h ssh2.h packet.h dispatch.h compat.h log.h authfile.h misc.h +ssh_api.o: version.h myproposal.h ssherr.h sshbuf.h openbsd-compat/openssl-compat.h sshbuf-getput-basic.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h sshbuf-getput-crypto.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h sshbuf-misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h sshbuf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h misc.h -sshconnect.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h hostfile.h ssh.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h compat.h sshkey.h sshconnect.h log.h misc.h readconf.h atomicio.h dns.h monitor_fdpass.h ssh2.h version.h authfile.h -sshconnect.o: ssherr.h authfd.h -sshconnect2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshbuf.h packet.h dispatch.h opacket.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h myproposal.h +sshconnect.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h hostfile.h ssh.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h compat.h sshkey.h sshconnect.h log.h misc.h readconf.h atomicio.h dns.h monitor_fdpass.h ssh2.h version.h authfile.h ssherr.h +sshconnect.o: authfd.h kex.h mac.h crypto_api.h +sshconnect2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshbuf.h packet.h dispatch.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h myproposal .h sshconnect2.o: sshconnect.h authfile.h dh.h authfd.h log.h misc.h readconf.h match.h canohost.h msg.h pathnames.h uidswap.h hostfile.h ssherr.h utf8.h -sshd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h opacket.h log.h sshbuf.h misc.h match.h servconf.h uidswap.h compat.h cipher.h cipher-chachapoly.h chacha.h -sshd.o: poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h myproposal.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h ssherr.h +sshd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h log.h sshbuf.h misc.h match.h servconf.h uidswap.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h +sshd.o: cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h crypto_api.h myproposal.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h ssherr.h ssherr.o: ssherr.h sshkey-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h sshkey-xmss.h match.h xmss_fast.h openbsd-compat/openssl-compat.h sshlogin.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshlogin.h ssherr.h loginrec.h log.h sshbuf.h misc.h servconf.h sshpty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h log.h misc.h sshtty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h -ttymodes.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h opacket.h log.h compat.h sshbuf.h ssherr.h ttymodes.h +ttymodes.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h compat.h sshbuf.h ssherr.h ttymodes.h uidswap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h uidswap.h xmalloc.h umac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h umac128.o: umac.c includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h umac.h misc.h rijndael.h Modified: vendor-crypto/openssh/dist/.gitignore ============================================================================== --- vendor-crypto/openssh/dist/.gitignore Fri Feb 14 19:33:50 2020 (r357932) +++ vendor-crypto/openssh/dist/.gitignore Fri Feb 14 19:47:15 2020 (r357933) @@ -26,3 +26,4 @@ ssh-keysign ssh-pkcs11-helper sshd !regress/misc/fuzz-harness/Makefile +tags Modified: vendor-crypto/openssh/dist/.skipped-commit-ids ============================================================================== --- vendor-crypto/openssh/dist/.skipped-commit-ids Fri Feb 14 19:33:50 2020 (r357932) +++ vendor-crypto/openssh/dist/.skipped-commit-ids Fri Feb 14 19:47:15 2020 (r357933) @@ -5,6 +5,7 @@ fa728823ba21c4b45212750e1d3a4b2086fd1a62 more Makefile 1de0e85522051eb2ffa00437e1885e9d7b3e0c2e moduli update 814b2f670df75759e1581ecef530980b2b3d7e0f remove redundant make defs 04431e8e7872f49a2129bf080a6b73c19d576d40 moduli update +c07772f58028fda683ee6abd41c73da3ff70d403 moduli update Old upstream tree: Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Fri Feb 14 19:33:50 2020 (r357932) +++ vendor-crypto/openssh/dist/ChangeLog Fri Feb 14 19:47:15 2020 (r357933) @@ -1,3 +1,2602 @@ +commit fd0fa130ecf06d7d092932adcd5d77f1549bfc8d +Author: Damien Miller +Date: Thu Apr 18 08:52:57 2019 +1000 + + makedepend + +commit 5de397a876b587ba05a9169237deffdc71f273b0 +Author: Damien Miller +Date: Fri Apr 5 11:29:51 2019 -0700 + + second thoughts: leave README in place + + A number of contrib/* files refer to the existing README so let's leave + it in place for release and add the new markdown version in parallel. + + I'll get rid of README after release. + +commit 5d3127d9274519b25ed10e320f45045ba8d7f3be +Author: Damien Miller +Date: Fri Apr 5 11:29:31 2019 -0700 + + Revert "rewrite README" + + This reverts commit 9444d82678cb7781820da4d1c23b3c2b9fb1e12f. + +commit 9444d82678cb7781820da4d1c23b3c2b9fb1e12f +Author: Damien Miller +Date: Fri Apr 5 11:21:48 2019 -0700 + + rewrite README + + Include basic build instructions and comments on commonly-used build- + time flags, links to the manual pages and other resources. + + Now in Markdown format for better viewing on github, etc. + +commit a924de0c4908902433813ba205bee1446bd1a157 +Author: Damien Miller +Date: Fri Apr 5 03:41:52 2019 +1100 + + update versions + +commit 312dcee739bca5d6878c536537b2a8a497314b75 +Author: djm@openbsd.org +Date: Wed Apr 3 15:48:45 2019 +0000 + + upstream: openssh-8.0 + + OpenBSD-Commit-ID: 5aafdf218679dab982fea20771afd643be9a127b + +commit 885bc114692046d55e2a170b932bdc0092fa3456 +Author: Damien Miller +Date: Thu Apr 4 02:47:40 2019 +1100 + + session: Do not use removed API + + from Jakub Jelen + +commit 9d7b2882b0c9a5e9bf8312ce4075bf178e2b98be +Author: djm@openbsd.org +Date: Fri Mar 29 11:31:40 2019 +0000 + + upstream: when logging/fataling on error, include a bit more detail + + than just the function name and the error message + + OpenBSD-Commit-ID: dd72d7eba2215fcb89be516c378f633ea5bcca9f + +commit 79a87d32783d6c9db40af8f35e091d9d30365ae7 +Author: Darren Tucker +Date: Wed Apr 3 06:27:45 2019 +1100 + + Remove "struct ssh" from sys_auth_record_login. + + It's not needed, and is not available from the call site in loginrec.c + Should only affect AIX, spotted by Kevin Brott. + +commit 138c0d52cdc90f9895333b82fc57d81cce7a3d90 +Author: Darren Tucker +Date: Tue Apr 2 18:21:35 2019 +1100 + + Adapt custom_failed_login to new prototype. + + Spotted by Kevin Brott. + +commit a0ca4009ab2f0b1007ec8ab6864dbf9b760a8ed5 +Author: Darren Tucker +Date: Mon Apr 1 20:07:23 2019 +1100 + + Add includes.h for compat layer. + + Should fix build on AIX 7.2. + +commit 00991151786ce9b1d577bdad1f83a81d19c8236d +Author: Tim Rice +Date: Sun Mar 31 22:14:22 2019 -0700 + + Stop USL compilers for erroring with "integral constant expression expected" + +commit 43f47ebbdd4037b569c23b8f4f7981f53b567f1d +Author: Tim Rice +Date: Sun Mar 31 19:22:19 2019 -0700 + + Only use O_NOFOLLOW in fchownat and fchmodat if defined + +commit 342d6e51589b184c337cccfc4c788b60ff8b3765 +Author: Jakub Jelen +Date: Fri Mar 29 12:29:41 2019 +0100 + + Adjust softhsm2 path on Fedora Linux for regress + + The SoftHSM lives in Fedora in /usr/lib64/pkcs11/libsofthsm2.so + +commit f5abb05f8c7358dacdcb866fe2813f6d8efd5830 +Author: Darren Tucker +Date: Thu Mar 28 09:26:14 2019 +1100 + + Only use O_NOFOLLOW in utimensat if defined. + + Fixes build on systems that don't have it (Solaris <=9) Found by + Tom G. Christensen. + +commit 786cd4c1837fdc3fe7b4befe54a3f37db7df8715 +Author: Corinna Vinschen +Date: Wed Mar 27 18:18:21 2019 +0100 + + drop old Cygwin considerations + + - Cygwin supports non-DOS characters in filenames + - Cygwin does not support Windows XP anymore + + Signed-off-by: Corinna Vinschen + +commit 21da87f439b48a85b951ef1518fe85ac0273e719 +Author: djm@openbsd.org +Date: Wed Mar 27 09:29:14 2019 +0000 + + upstream: fix interaction between ClientAliveInterval and RekeyLimit + + that could cause connection to close incorrectly; Report and patch from Jakub + Jelen in bz#2757; ok dtucker@ markus@ + + OpenBSD-Commit-ID: 17229a8a65bd8e6c2080318ec2b7a61e1aede3fb + +commit 4f0019a9afdb4a94d83b75e82dbbbe0cbe826c56 +Author: djm@openbsd.org +Date: Mon Mar 25 22:34:52 2019 +0000 + + upstream: Fix authentication failures when "AuthenticationMethods + + any" in a Match block overrides a more restrictive global default. + + Spotted by jmc@, ok markus@ + + OpenBSD-Commit-ID: a90a4fe2ab81d0eeeb8fdfc21af81f7eabda6666 + +commit d6e5def308610f194c0ec3ef97a34a3e9630e190 +Author: djm@openbsd.org +Date: Mon Mar 25 22:33:44 2019 +0000 + + upstream: whitespace + + OpenBSD-Commit-ID: 106e853ae8a477e8385bc53824d3884a8159db07 + +commit 26e0cef07b04479537c971dec898741df1290fe5 +Author: dtucker@openbsd.org +Date: Mon Mar 25 16:19:44 2019 +0000 + + upstream: Expand comment to document rationale for default key + + sizes. "seems worthwhile" deraadt. + + OpenBSD-Commit-ID: 72e5c0983d7da1fb72f191870f36cb58263a2456 + +commit f47269ea67eb4ff87454bf0d2a03e55532786482 +Author: dtucker@openbsd.org +Date: Mon Mar 25 15:49:00 2019 +0000 + + upstream: Increase the default RSA key size to 3072 bits. Based on + + the estimates from NIST Special Publication 800-57, 3k bits provides security + equivalent to 128 bits which is the smallest symmetric cipher we enable by + default. ok markus@ deraadt@ + + OpenBSD-Commit-ID: 461dd32ebe808f88f4fc3ec74749b0e6bef2276b + +commit 62949c5b37af28d8490d94866e314a76be683a5e +Author: jmc@openbsd.org +Date: Fri Mar 22 20:58:34 2019 +0000 + + upstream: full stop in the wrong place; + + OpenBSD-Commit-ID: 478a0567c83553a2aebf95d0f1bd67ac1b1253e4 + +commit 1b1332b5bb975d759a50b37f0e8bc8cfb07a0bb0 +Author: jmc@openbsd.org +Date: Sat Mar 16 19:14:21 2019 +0000 + + upstream: benno helped me clean up the tcp forwarding section; + + OpenBSD-Commit-ID: d4bec27edefde636fb632b7f0b7c656b9c7b7f08 + +commit 2aee9a49f668092ac5c9d34e904ef7a9722e541d +Author: markus@openbsd.org +Date: Fri Mar 8 17:24:43 2019 +0000 + + upstream: fix use-after-free in ssh-pkcs11; found by hshoexer w/AFL + + OpenBSD-Commit-ID: febce81cca72b71f70513fbee4ff52ca050f675c + +commit 9edbd7821e6837e98e7e95546cede804dac96754 +Author: Darren Tucker +Date: Thu Mar 14 10:17:28 2019 +1100 + + Fix build when configured --without-openssl. + + ok djm@ + +commit 825ab32f0d04a791e9d19d743c61ff8ed9b4d8e5 +Author: Darren Tucker +Date: Thu Mar 14 08:51:17 2019 +1100 + + On Cygwin run sshd as SYSTEM where possible. + + Seteuid now creates user token using S4U. We don't create a token + from scratch anymore, so we don't need the "Create a process token" + privilege. The service can run under SYSTEM again... + + ...unless Cygwin is running on Windows Vista or Windows 7 in the + WOW64 32 bit emulation layer. It turns out that WOW64 on these systems + didn't implement MsV1_0 S4U Logon so we still need the fallback + to NtCreateToken for these systems. + + Signed-off-by: Corinna Vinschen + +commit a212107bfdf4d3e870ab7a443e4d906e5b9578c3 +Author: Darren Tucker +Date: Wed Mar 13 10:49:16 2019 +1100 + + Replace alloca with xcalloc. + + The latter checks for memory exhaustion and integer overflow and may be + at a less predictable place. Sanity check by vinschen at redhat.com, ok + djm@ + +commit daa7505aadca68ba1a2c70cbdfce423208eb91ee +Author: Darren Tucker +Date: Tue Mar 12 09:19:19 2019 +1100 + + Use Cygwin-specific matching only for users+groups. + + Patch from vinschen at redhat.com, updated a little by me. + +commit fd10cf027b56f9aaa80c9e3844626a05066589a4 +Author: dtucker@openbsd.org +Date: Wed Mar 6 22:14:23 2019 +0000 + + upstream: Move checks for lists of users or groups into their own + + function. This is a no-op on OpenBSD but will make things easier in + -portable, eg on systems where these checks should be case-insensitive. ok + djm@ + + OpenBSD-Commit-ID: 8bc9c8d98670e23f8eaaaefe29c1f98e7ba0487e + +commit ab5fee8eb6a011002fd9e32b1597f02aa8804a25 +Author: dtucker@openbsd.org +Date: Wed Mar 6 21:06:59 2019 +0000 + + upstream: Reset last-seen time when sending a keepalive. Prevents + + sending two keepalives successively and prematurely terminating connection + when ClientAliveCount=1. While there, collapse two similar tests into one. + ok markus@ + + OpenBSD-Commit-ID: 043670d201dfe222537a2a4bed16ce1087de5ddd + +commit c13b74530f9f1d9df7aeae012004b31b2de4438e +Author: naddy@openbsd.org +Date: Tue Mar 5 16:17:12 2019 +0000 + + upstream: PKCS#11 support is no longer limited to RSA; ok benno@ + + kn@ + + OpenBSD-Commit-ID: 1a9bec64d530aed5f434a960e7515a3e80cbc826 + +commit e9552d6043db7cd170ac6ba1b4d2c7a5eb2c3201 +Author: djm@openbsd.org +Date: Fri Mar 1 03:29:32 2019 +0000 + + upstream: in ssh_set_newkeys(), mention the direction that we're + + keying in debug messages. Previously it would be difficult to tell which + direction it was talking about + + OpenBSD-Commit-ID: c2b71bfcceb2a7389b9d0b497fb2122a406a522d + +commit 76a24b3fa193a9ca3e47a8779d497cb06500798b +Author: djm@openbsd.org +Date: Fri Mar 1 02:32:39 2019 +0000 + + upstream: Fix two race conditions in sshd relating to SIGHUP: + + 1. Recently-forked child processes will briefly remain listening to + listen_socks. If the main server sshd process completes its restart + via execv() before these sockets are closed by the child processes + then it can fail to listen at the desired addresses/ports and/or + fail to restart. + + 2. When a SIGHUP is received, there may be forked child processes that + are awaiting their reexecution state. If the main server sshd + process restarts before passing this state, these child processes + will yield errors and use a fallback path of reading the current + sshd_config from the filesystem rather than use the one that sshd + was started with. + + To fix both of these cases, we reuse the startup_pipes that are shared + between the main server sshd and forked children. Previously this was + used solely to implement tracking of pre-auth child processes for + MaxStartups, but this extends the messaging over these pipes to include + a child->parent message that the parent process is safe to restart. This + message is sent from the child after it has completed its preliminaries: + closing listen_socks and receiving its reexec state. + + bz#2953, reported by Michal Koutný; ok markus@ dtucker@ + + OpenBSD-Commit-ID: 7df09eacfa3ce13e9a7b1e9f17276ecc924d65ab + +commit de817e9dfab99473017d28cdf69e60397d00ea21 +Author: djm@openbsd.org +Date: Fri Mar 1 02:16:47 2019 +0000 + + upstream: mention PKCS11Provide=none, reword a little and remove + + mention of RSA keys only (since we support ECDSA now and might support others + in the future). Inspired by Jakub Jelen via bz#2974 + + OpenBSD-Commit-ID: a92e3686561bf624ccc64ab320c96c9e9a263aa5 + +commit 95a8058c1a90a27acbb91392ba206854abc85226 +Author: djm@openbsd.org +Date: Fri Mar 1 02:08:50 2019 +0000 + + upstream: let PKCS11Provider=none do what users expect + + print PKCS11Provider instead of obsolete SmartcardDevice in config dump. + + bz#2974 ok dtucker@ + + OpenBSD-Commit-ID: c303d6f0230a33aa2dd92dc9b68843d56a64f846 + +commit 8e7bac35aa576d2fd7560836da83733e864ce649 +Author: markus@openbsd.org +Date: Wed Feb 27 19:37:01 2019 +0000 + + upstream: dup stdout/in for proxycommand=-, otherwise stdout might + + be redirected to /dev/null; ok djm@ + + OpenBSD-Commit-ID: 97dfce4c47ed4055042de8ebde85b7d88793e595 + +commit 9b61130fbd95d196bce81ebeca94a4cb7c0d5ba0 +Author: djm@openbsd.org +Date: Sat Feb 23 08:20:43 2019 +0000 + + upstream: openssh-7.9 accidentally reused the server's algorithm lists + + in the client for KEX, ciphers and MACs. The ciphers and MACs were identical + between the client and server, but the error accidentially disabled the + diffie-hellman-group-exchange-sha1 KEX method. + + This fixes the client code to use the correct method list, but + because nobody complained, it also disables the + diffie-hellman-group-exchange-sha1 KEX method. + + Reported by nuxi AT vault24.org via bz#2697; ok dtucker + + OpenBSD-Commit-ID: e30c33a23c10fd536fefa120e86af1842e33fd57 + +commit 37638c752041d591371900df820f070037878a2d +Author: Corinna Vinschen +Date: Wed Feb 20 13:41:25 2019 +0100 + + Cygwin: implement case-insensitive Unicode user and group name matching + + The previous revert enabled case-insensitive user names again. This + patch implements the case-insensitive user and group name matching. + To allow Unicode chars, implement the matcher using wchar_t chars in + Cygwin-specific code. Keep the generic code changes as small as possible. + Cygwin: implement case-insensitive Unicode user and group name matching + + Signed-off-by: Corinna Vinschen + +commit bed1d43698807a07bb4ddb93a46b0bd84b9970b3 +Author: Darren Tucker +Date: Fri Feb 22 15:21:21 2019 +1100 + + Revert unintended parts of previous commit. + +commit f02afa350afac1b2f2d1413259a27a4ba1e2ca24 +Author: Corinna Vinschen +Date: Wed Feb 20 13:41:24 2019 +0100 + + Revert "[auth.c] On Cygwin, refuse usernames that have differences in case" + + This reverts commit acc9b29486dfd649dfda474e5c1a03b317449f1c. + + Signed-off-by: Corinna Vinschen + +commit 4c55b674835478eb80a1a7aeae588aa654e2a433 +Author: Corinna Vinschen +Date: Sat Feb 16 14:13:43 2019 +0100 + + Add tags to .gitignore + + Signed-off-by: Corinna Vinschen + +commit 625b62634c33eaef4b80d07529954fe5c6435fe5 +Author: djm@openbsd.org +Date: Fri Feb 22 03:37:11 2019 +0000 + + upstream: perform removal of agent-forwarding directory in forward + + setup error path with user's privileged. This is a no-op as this code always + runs with user privilege now that we no longer support running sshd with + privilege separation disabled, but as long as the privsep skeleton is there + we should follow the rules. + MIME-Version: 1.0 + Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit + + bz#2969 with patch from Erik Sjölund + + OpenBSD-Commit-ID: 2b708401a5a8d6133c865d7698d9852210dca846 + +commit d9ecfaba0b2f1887d20e4368230632e709ca83be +Author: jmc@openbsd.org +Date: Mon Feb 18 07:02:34 2019 +0000 + + upstream: sync the description of ~/.ssh/config with djm's updated + + description in ssh.1; issue pointed out by andreas kahari + + ok dtucker djm + + OpenBSD-Commit-ID: 1b01ef0ae2c6328165150badae317ec92e52b01c + +commit 38e83e4f219c752ebb1560633b73f06f0392018b +Author: djm@openbsd.org +Date: Tue Feb 12 23:53:10 2019 +0000 + + upstream: fix regression in r1.302 reported by naddy@ - only the first + + public key from the agent was being attempted for use. + + OpenBSD-Commit-ID: 07116aea521a04888718b2157f1ca723b2f46c8d + +commit 5c68ea8da790d711e6dd5f4c30d089c54032c59a +Author: djm@openbsd.org +Date: Mon Feb 11 09:44:42 2019 +0000 + + upstream: cleanup GSSAPI authentication context after completion of the + + authmethod. Move function-static GSSAPI state to the client Authctxt + structure. Make static a bunch of functions that aren't used outside this + file. + + Based on patch from Markus Schmidt ; ok markus@ + + OpenBSD-Commit-ID: 497fb792c0ddb4f1ba631b6eed526861f115dbe5 + +commit a8c807f1956f81a92a758d3d0237d0ff06d0be5d +Author: benno@openbsd.org +Date: Sun Feb 10 16:35:41 2019 +0000 + + upstream: ssh-keygen -D pkcs11.so needs to initialize pkcs11 + + interactive, so it can ask for the smartcards PIN. ok markus@ + + OpenBSD-Commit-ID: 1be7ccf88f1876e0fc4d7c9b3f96019ac5655bab + +commit 3d896c157c722bc47adca51a58dca859225b5874 +Author: djm@openbsd.org +Date: Sun Feb 10 11:15:52 2019 +0000 + + upstream: when checking that filenames sent by the server side + + match what the client requested, be prepared to handle shell-style brace + alternations, e.g. "{foo,bar}". + + "looks good to me" millert@ + in snaps for the last week courtesy + deraadt@ + + OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e + +commit 318e4f8548a4f5c0c913f61e27d4fc21ffb1eaae +Author: djm@openbsd.org +Date: Sun Feb 10 11:10:57 2019 +0000 + + upstream: syslog when connection is dropped for attempting to run a + + command when ForceCommand=internal-sftp is in effect; bz2960; ok dtucker@ + + OpenBSD-Commit-ID: 8c87fa66d7fc6c0fffa3a3c28e8ab5e8dde234b8 + +commit 2ff2e19653b8c0798b8b8eff209651bdb1be2761 +Author: Damien Miller +Date: Fri Feb 8 14:53:35 2019 +1100 + + don't set $MAIL if UsePam=yes + + PAM typically specifies the user environment if it's enabled, so don't + second guess. bz#2937; ok dtucker@ + +commit 03e92dd27d491fe6d1a54e7b2f44ef1b0a916e52 +Author: Damien Miller +Date: Fri Feb 8 14:50:36 2019 +1100 + + use same close logic for stderr as stdout + + Avoids sending SIGPIPE to child processes after their parent exits + if they attempt to write to stderr. + + Analysis and patch from JD Paul; patch reworked by Jakub Jelen and + myself. bz#2071; ok dtucker@ + +commit 8c53d409baeeaf652c0c125a9b164edc9dbeb6de +Author: dtucker@openbsd.org +Date: Tue Feb 5 11:35:56 2019 +0000 + + upstream: Adapt code in the non-USE_PIPES codepath to the new packet + + API. This code is not normally reachable since USE_PIPES is always defined. + bz#2961, patch from adrian.fita at gmail com. + + OpenBSD-Commit-ID: 8d8428d678d1d5eb4bb21921df34e8173e6d238a + +commit 7a7fdca78de4b4774950be056099e579ef595414 +Author: djm@openbsd.org +Date: Mon Feb 4 23:37:54 2019 +0000 + + upstream: fix NULL-deref crash in PKCS#11 code when attempting + + login to a token requiring a PIN; reported by benno@ fix mostly by markus@ + + OpenBSD-Commit-ID: 438d0b114b1b4ba25a9869733db1921209aa9a31 + +commit cac302a4b42a988e54d32eb254b29b79b648dbf5 +Author: dtucker@openbsd.org +Date: Mon Feb 4 02:39:42 2019 +0000 + + upstream: Remove obsolete "Protocol" from commented out examples. Patch + + from samy.mahmoudi at gmail com. + + OpenBSD-Commit-ID: 16aede33dae299725a03abdac5dcb4d73f5d0cbf + +commit 483b3b638500fd498b4b529356e5a0e18cf76891 +Author: dtucker@openbsd.org +Date: Fri Feb 1 03:52:23 2019 +0000 + + upstream: Save connection timeout and restore for 2nd and + + subsequent attempts, preventing them from having no timeout. bz#2918, ok + djm@ + + OpenBSD-Commit-ID: 4977f1d0521d9b6bba0c9a20d3d226cefac48292 + +commit 5f004620fdc1b2108139300ee12f4014530fb559 +Author: markus@openbsd.org +Date: Wed Jan 30 19:51:15 2019 +0000 + + upstream: Add authors for public domain sntrup4591761 code; + + confirmed by Daniel J. Bernstein + + OpenBSD-Commit-ID: b4621f22b8b8ef13e063c852af5e54dbbfa413c1 + +commit 2c21b75a7be6ebdcbceaebb43157c48dbb36f3d8 +Author: jmc@openbsd.org +Date: Sun Jan 27 07:14:11 2019 +0000 + + upstream: add -T to usage(); + + OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899 + +commit 19a0f0529d3df04118da829528cac7ceff380b24 +Author: dtucker@openbsd.org +Date: Mon Jan 28 03:50:39 2019 +0000 + + upstream: The test sshd_config in in $OBJ. + + OpenBSD-Regress-ID: 1e5d908a286d8e7de3a15a0020c8857f3a7c9172 + +commit 8fe25440206319d15b52d12b948a5dfdec14dca3 +Author: dtucker@openbsd.org +Date: Mon Jan 28 03:28:10 2019 +0000 + + upstream: Remove leftover debugging. + + OpenBSD-Regress-ID: 3d86c3d4867e46b35af3fd2ac8c96df0ffdcfeb9 + +commit e30d32364d12c351eec9e14be6c61116f9d6cc90 +Author: dtucker@openbsd.org +Date: Mon Jan 28 00:12:36 2019 +0000 + + upstream: Enable ssh-dss for the agent test. Disable it for the + + certificate test. + + OpenBSD-Regress-ID: 388c1e03e1def539d350f139b37d69f12334668d + +commit ffdde469ed56249f5dc8af98da468dde35531398 +Author: dtucker@openbsd.org +Date: Mon Jan 28 00:08:26 2019 +0000 + + upstream: Count the number of key types instead of assuming there + + are only two. + + OpenBSD-Regress-ID: 0998702c41235782cf0beee396ec49b5056eaed9 + +commit 1d05b4adcba08ab068466e5c08dee2f5417ec53a +Author: Corinna Vinschen +Date: Sat Jan 26 23:42:40 2019 +0100 + + Cygwin: only tweak sshd_config file if it's new, drop creating sshd user + + The sshd_config tweaks were executed even if the old file was + still in place. Fix that. Also disable sshd user creation. + It's not used on Cygwin. + +commit 89843de0c4c733501f6b4f988098e6e06963df37 +Author: Corinna Vinschen +Date: Sat Jan 26 23:03:12 2019 +0100 + + Cygwin: Change service name to cygsshd + + Microsoft hijacked the sshd service name without asking. + +commit 2a9b3a2ce411d16cda9c79ab713c55f65b0ec257 +Author: dtucker@openbsd.org +Date: Sun Jan 27 06:30:53 2019 +0000 + + upstream: Generate all key supported key types and enable for keyscan + + test. + + OpenBSD-Regress-ID: 72f72ff49946c61bc949e1692dd9e3d71370891b + +commit 391ffc4b9d31fa1f4ad566499fef9176ff8a07dc +Author: djm@openbsd.org +Date: Sat Jan 26 22:41:28 2019 +0000 + + upstream: check in scp client that filenames sent during + + remote->local directory copies satisfy the wildcard specified by the user. + + This checking provides some protection against a malicious server + sending unexpected filenames, but it comes at a risk of rejecting wanted + files due to differences between client and server wildcard expansion rules. + + For this reason, this also adds a new -T flag to disable the check. + + reported by Harry Sintonen + fix approach suggested by markus@; + has been in snaps for ~1wk courtesy deraadt@ + + OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda + +commit c2c18a39683db382a15b438632afab3f551d50ce +Author: djm@openbsd.org +Date: Sat Jan 26 22:35:01 2019 +0000 + + upstream: make ssh-keyscan return a non-zero exit status if it + + finds no keys. bz#2903 + + OpenBSD-Commit-ID: 89f1081fb81d950ebb48e6e73d21807b2723d488 + +commit 05b9a466700b44d49492edc2aa415fc2e8913dfe +Author: dtucker@openbsd.org +Date: Thu Jan 24 17:00:29 2019 +0000 + + upstream: Accept the host key fingerprint as a synonym for "yes" + + when accepting an unknown host key. This allows you to paste a fingerprint + obtained out of band into the yes/no prompt and have the client do the + comparison for you. ok markus@ djm@ + + OpenBSD-Commit-ID: 3c47d10b9f43d3d345e044fd9ec09709583a2767 + +commit bdc6c63c80b55bcbaa66b5fde31c1cb1d09a41eb +Author: dtucker@openbsd.org +Date: Thu Jan 24 16:52:17 2019 +0000 + + upstream: Have progressmeter force an update at the beginning and + + end of each transfer. Fixes the problem recently introduces where very quick + transfers do not display the progressmeter at all. Spotted by naddy@ + + OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a + +commit 258e6ca003e47f944688ad8b8de087b58a7d966c +Author: dtucker@openbsd.org +Date: Thu Jan 24 02:42:23 2019 +0000 + + upstream: Check for both EAGAIN and EWOULDBLOCK. This is a no-op + + in OpenBSD (they are the same value) but makes things easier in -portable + where they may be distinct values. "sigh ok" deraadt@ + + (ID sync only, portable already had this change). + + OpenBSD-Commit-ID: 91f2bc7c0ecec905915ed59fa37feb9cc90e17d7 + +commit 281ce042579b834cdc1e74314f1fb2eeb75d2612 +Author: dtucker@openbsd.org +Date: Thu Jan 24 02:34:52 2019 +0000 + + upstream: Always initialize 2nd arg to hpdelim2. It populates that + + *ONLY IF* there's a delimiter. If there's not (the common case) it checked + uninitialized memory, which usually passed, but if not would cause spurious + failures when the uninitialized memory happens to contain "/". ok deraadt. + + OpenBSD-Commit-ID: 4291611eaf2a53d4c92f4a57c7f267c9f944e0d3 + +commit d05ea255678d9402beda4416cd0360f3e5dfe938 +Author: dtucker@openbsd.org +Date: Wed Jan 23 21:50:56 2019 +0000 + + upstream: Remove support for obsolete host/port syntax. + + host/port was added in 2001 as an alternative to host:port syntax for + the benefit of IPv6 users. These days there are establised standards + for this like [::1]:22 and the slash syntax is easily mistaken for CIDR + notation, which OpenSSH now supports for some things. Remove the slash + notation from ListenAddress and PermitOpen. bz#2335, patch from jjelen + at redhat.com, ok markus@ + + OpenBSD-Commit-ID: fae5f4e23c51a368d6b2d98376069ac2b10ad4b7 + +commit 177d6c80c557a5e060cd343a0c116a2f1a7f43db +Author: dtucker@openbsd.org +Date: Wed Jan 23 20:48:52 2019 +0000 + + upstream: Remove duplicate word. bz#2958, patch from jjelen at + + redhat.com + + OpenBSD-Commit-ID: cca3965a8333f2b6aae48b79ec1d72f7a830dd2c + +commit be3e6cba95dffe5fcf190c713525b48c837e7875 +Author: dtucker@openbsd.org +Date: Wed Jan 23 09:49:00 2019 +0000 + + upstream: Remove 3 as a guess for possible generator during moduli + + generation. It's not mentioned in RFC4419 and it's not possible for + Sophie-Germain primes greater than 5. bz#2330, from Christian Wittenhorst , + ok djm@ tb@ + + OpenBSD-Commit-ID: 1467652e6802ad3333b0959282d8d49dfe22c8cd + +commit 8976f1c4b2721c26e878151f52bdf346dfe2d54c +Author: dtucker@openbsd.org +Date: Wed Jan 23 08:01:46 2019 +0000 + + upstream: Sanitize scp filenames via snmprintf. To do this we move + + the progressmeter formatting outside of signal handler context and have the *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 14 19:47:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D8C124011C; Fri, 14 Feb 2020 19:47:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K3nk2K4qz471v; Fri, 14 Feb 2020 19:47:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30D44D1B; Fri, 14 Feb 2020 19:47:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EJls6L036609; Fri, 14 Feb 2020 19:47:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EJlsIT036608; Fri, 14 Feb 2020 19:47:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002141947.01EJlsIT036608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 19:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357934 - vendor-crypto/openssh/8.0p1 X-SVN-Group: vendor-crypto X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: vendor-crypto/openssh/8.0p1 X-SVN-Commit-Revision: 357934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 19:47:54 -0000 Author: emaste Date: Fri Feb 14 19:47:53 2020 New Revision: 357934 URL: https://svnweb.freebsd.org/changeset/base/357934 Log: Tag OpenSSH 8.0p1. Added: vendor-crypto/openssh/8.0p1/ - copied from r357933, vendor-crypto/openssh/dist/ From owner-svn-src-all@freebsd.org Fri Feb 14 20:25:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4838F2413EA; Fri, 14 Feb 2020 20:25:05 +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) server-signature RSA-PSS (4096 bits) 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 48K4cc6m09z4CdJ; Fri, 14 Feb 2020 20:25:04 +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 DF11D14A0; Fri, 14 Feb 2020 20:25:04 +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 01EKP4vq064748; Fri, 14 Feb 2020 20:25:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EKP4nI064747; Fri, 14 Feb 2020 20:25:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002142025.01EKP4nI064747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 14 Feb 2020 20:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357935 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 357935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 20:25:05 -0000 Author: kevans Date: Fri Feb 14 20:25:04 2020 New Revision: 357935 URL: https://svnweb.freebsd.org/changeset/base/357935 Log: mips: fix kernel build after r357804 Drop the padding down the size of a single uintptr_t to account for pc_zpcpu_offset Modified: head/sys/mips/include/pcpu.h Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Fri Feb 14 19:47:53 2020 (r357934) +++ head/sys/mips/include/pcpu.h Fri Feb 14 20:25:04 2020 (r357935) @@ -57,7 +57,7 @@ vm_offset_t pc_cmap2_addr; /* KVA page for copy window 2 */ \ vm_offset_t pc_qmap_addr; /* KVA page for temporary mappings */ \ pt_entry_t *pc_qmap_ptep; /* PTE for temporary mapping KVA */ \ - char __pad[101] + char __pad[97] #endif #ifdef __mips_n64 From owner-svn-src-all@freebsd.org Fri Feb 14 21:05:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C1DF24274A; Fri, 14 Feb 2020 21:05:16 +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) server-signature RSA-PSS (4096 bits) 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 48K5W03C8wz4Fsv; Fri, 14 Feb 2020 21:05:16 +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 4F08E1C6A; Fri, 14 Feb 2020 21:05:16 +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 01EL5GOG088432; Fri, 14 Feb 2020 21:05:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EL5GpU088431; Fri, 14 Feb 2020 21:05:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002142105.01EL5GpU088431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 14 Feb 2020 21:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357936 - vendor/llvm-project/release-10.x/clang/utils X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/release-10.x/clang/utils X-SVN-Commit-Revision: 357936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 21:05:16 -0000 Author: dim Date: Fri Feb 14 21:05:15 2020 New Revision: 357936 URL: https://svnweb.freebsd.org/changeset/base/357936 Log: Remove unused utility script. Deleted: vendor/llvm-project/release-10.x/clang/utils/convert_arm_neon.py From owner-svn-src-all@freebsd.org Fri Feb 14 21:24:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB45124309C; Fri, 14 Feb 2020 21:24: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) server-signature RSA-PSS (4096 bits) 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 48K5wq6lX9z4HJ2; Fri, 14 Feb 2020 21:24: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 E23A42040; Fri, 14 Feb 2020 21:24: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 01ELOBYt000808; Fri, 14 Feb 2020 21:24:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ELO3OE000767; Fri, 14 Feb 2020 21:24:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002142124.01ELO3OE000767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 14 Feb 2020 21:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357937 - in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Basic clang/include/clang/Driver clang/include/clang/Lex clang/include/clang/Sema clang/lib/AS... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Basic clang/include/clang/Driver clang/include/clang/Lex clang/include/clang/Sema clang/lib/AST clang/lib/Basic clang/l... X-SVN-Commit-Revision: 357937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 21:24:12 -0000 Author: dim Date: Fri Feb 14 21:24:03 2020 New Revision: 357937 URL: https://svnweb.freebsd.org/changeset/base/357937 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-rc2-0-g90c78073f73. Added: vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedRocket32.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedRocket64.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedule.td Deleted: vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h vendor/llvm-project/release-10.x/clang/include/clang/Basic/Cuda.h vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td vendor/llvm-project/release-10.x/clang/include/clang/Driver/Job.h vendor/llvm-project/release-10.x/clang/include/clang/Lex/PreprocessorOptions.h vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp vendor/llvm-project/release-10.x/clang/lib/AST/CXXInheritance.cpp vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp vendor/llvm-project/release-10.x/clang/lib/Basic/Cuda.cpp vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/Job.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Cuda.cpp vendor/llvm-project/release-10.x/clang/lib/Frontend/CompilerInvocation.cpp vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_intrinsics.h vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_runtime_wrapper.h vendor/llvm-project/release-10.x/clang/lib/Headers/xmmintrin.h vendor/llvm-project/release-10.x/clang/lib/Lex/Lexer.cpp vendor/llvm-project/release-10.x/clang/lib/Lex/Pragma.cpp vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDeclCXX.cpp vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExprCXX.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaCast.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaConcept.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaDeclCXX.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaOverload.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiate.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp vendor/llvm-project/release-10.x/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp vendor/llvm-project/release-10.x/clang/tools/driver/cc1_main.cpp vendor/llvm-project/release-10.x/clang/tools/driver/cc1as_main.cpp vendor/llvm-project/release-10.x/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp vendor/llvm-project/release-10.x/libcxx/include/__config vendor/llvm-project/release-10.x/lld/ELF/Arch/ARM.cpp vendor/llvm-project/release-10.x/lld/ELF/Arch/PPC.cpp vendor/llvm-project/release-10.x/lld/ELF/InputSection.cpp vendor/llvm-project/release-10.x/lld/ELF/Relocations.cpp vendor/llvm-project/release-10.x/lld/ELF/SyntheticSections.cpp vendor/llvm-project/release-10.x/lld/ELF/SyntheticSections.h vendor/llvm-project/release-10.x/lld/ELF/Thunks.cpp vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst vendor/llvm-project/release-10.x/lldb/source/DataFormatters/FormatCache.cpp vendor/llvm-project/release-10.x/lldb/source/DataFormatters/LanguageCategory.cpp vendor/llvm-project/release-10.x/lldb/source/Interpreter/CommandAlias.cpp vendor/llvm-project/release-10.x/lldb/source/Interpreter/Options.cpp vendor/llvm-project/release-10.x/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp vendor/llvm-project/release-10.x/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h vendor/llvm-project/release-10.x/llvm/include/llvm/ADT/StringRef.h vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/AsmPrinter.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/Core.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/Layer.h vendor/llvm-project/release-10.x/llvm/include/llvm/ExecutionEngine/Orc/Speculation.h vendor/llvm-project/release-10.x/llvm/include/llvm/Support/CrashRecoveryContext.h vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Process.h vendor/llvm-project/release-10.x/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm-project/release-10.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm-project/release-10.x/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/GlobalMerge.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/StackColoring.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/TypePromotion.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/Core.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/Layer.cpp vendor/llvm-project/release-10.x/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp vendor/llvm-project/release-10.x/llvm/lib/IR/AsmWriter.cpp vendor/llvm-project/release-10.x/llvm/lib/Linker/IRMover.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/CRC.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/CrashRecoveryContext.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/ErrorHandling.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/Process.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Signals.inc vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/AMDGPU.h vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/CaymanInstructions.td vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/EvergreenInstructions.td vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/R600Instructions.td vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMInstrInfo.td vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMTargetTransformInfo.h vendor/llvm-project/release-10.x/llvm/lib/Target/BPF/BPFISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCV.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrFormats.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfo.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfoA.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfoC.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfoD.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfoF.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVInstrInfoM.td vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h vendor/llvm-project/release-10.x/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86MCInstLower.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h vendor/llvm-project/release-10.x/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm-project/release-10.x/llvm/tools/lli/lli.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h Fri Feb 14 21:24:03 2020 (r357937) @@ -29,14 +29,14 @@ class ConceptSpecializationExpr; class ConstraintSatisfaction : public llvm::FoldingSetNode { // The template-like entity that 'owns' the constraint checked here (can be a // constrained entity or a concept). - NamedDecl *ConstraintOwner = nullptr; + const NamedDecl *ConstraintOwner = nullptr; llvm::SmallVector TemplateArgs; public: ConstraintSatisfaction() = default; - ConstraintSatisfaction(NamedDecl *ConstraintOwner, + ConstraintSatisfaction(const NamedDecl *ConstraintOwner, ArrayRef TemplateArgs) : ConstraintOwner(ConstraintOwner), TemplateArgs(TemplateArgs.begin(), TemplateArgs.end()) { } @@ -57,7 +57,7 @@ class ConstraintSatisfaction : public llvm::FoldingSet } static void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &C, - NamedDecl *ConstraintOwner, + const NamedDecl *ConstraintOwner, ArrayRef TemplateArgs); }; Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h Fri Feb 14 21:24:03 2020 (r357937) @@ -63,6 +63,12 @@ class ConceptSpecializationExpr final : public Expr, p ArrayRef ConvertedArgs, const ConstraintSatisfaction *Satisfaction); + ConceptSpecializationExpr(const ASTContext &C, ConceptDecl *NamedConcept, + ArrayRef ConvertedArgs, + const ConstraintSatisfaction *Satisfaction, + bool Dependent, + bool ContainsUnexpandedParameterPack); + ConceptSpecializationExpr(EmptyShell Empty, unsigned NumTemplateArgs); public: @@ -74,6 +80,13 @@ class ConceptSpecializationExpr final : public Expr, p const ASTTemplateArgumentListInfo *ArgsAsWritten, ArrayRef ConvertedArgs, const ConstraintSatisfaction *Satisfaction); + + static ConceptSpecializationExpr * + Create(const ASTContext &C, ConceptDecl *NamedConcept, + ArrayRef ConvertedArgs, + const ConstraintSatisfaction *Satisfaction, + bool Dependent, + bool ContainsUnexpandedParameterPack); static ConceptSpecializationExpr * Create(ASTContext &C, EmptyShell Empty, unsigned NumTemplateArgs); Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/Cuda.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/Cuda.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/Cuda.h Fri Feb 14 21:24:03 2020 (r357937) @@ -11,6 +11,7 @@ namespace llvm { class StringRef; +class Twine; class VersionTuple; } // namespace llvm @@ -30,7 +31,7 @@ enum class CudaVersion { }; const char *CudaVersionToString(CudaVersion V); // Input is "Major.Minor" -CudaVersion CudaStringToVersion(llvm::StringRef S); +CudaVersion CudaStringToVersion(const llvm::Twine &S); enum class CudaArch { UNKNOWN, Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td Fri Feb 14 21:24:03 2020 (r357937) @@ -60,6 +60,9 @@ def err_drv_cuda_version_unsupported : Error< "but installation at %3 is %4. Use --cuda-path to specify a different CUDA " "install, pass a different GPU arch with --cuda-gpu-arch, or pass " "--no-cuda-version-check.">; +def warn_drv_unknown_cuda_version: Warning< + "Unknown CUDA version %0. Assuming the latest supported version %1">, + InGroup; def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compilation.">; def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">; def err_drv_invalid_thread_model_for_target : Error< Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td Fri Feb 14 21:24:03 2020 (r357937) @@ -384,7 +384,10 @@ def GNULabelsAsValue : DiagGroup<"gnu-label-as-value"> def LiteralRange : DiagGroup<"literal-range">; def LocalTypeTemplateArgs : DiagGroup<"local-type-template-args", [CXX98CompatLocalTypeTemplateArgs]>; -def RangeLoopAnalysis : DiagGroup<"range-loop-analysis">; +def RangeLoopConstruct : DiagGroup<"range-loop-construct">; +def RangeLoopBindReference : DiagGroup<"range-loop-bind-reference">; +def RangeLoopAnalysis : DiagGroup<"range-loop-analysis", + [RangeLoopConstruct, RangeLoopBindReference]>; def ForLoopAnalysis : DiagGroup<"for-loop-analysis">; def LoopAnalysis : DiagGroup<"loop-analysis", [ForLoopAnalysis, RangeLoopAnalysis]>; @@ -858,14 +861,15 @@ def Most : DiagGroup<"most", [ Comment, DeleteNonVirtualDtor, Format, + ForLoopAnalysis, Implicit, InfiniteRecursion, IntInBoolContext, - LoopAnalysis, MismatchedTags, MissingBraces, Move, MultiChar, + RangeLoopConstruct, Reorder, ReturnType, SelfAssignment, @@ -1112,6 +1116,9 @@ def SerializedDiagnostics : DiagGroup<"serialized-diag // A warning group for warnings about code that clang accepts when // compiling CUDA C/C++ but which is not compatible with the CUDA spec. def CudaCompat : DiagGroup<"cuda-compat">; + +// Warning about unknown CUDA SDK version. +def CudaUnknownVersion: DiagGroup<"unknown-cuda-version">; // A warning group for warnings about features supported by HIP but // ignored by CUDA. Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Feb 14 21:24:03 2020 (r357937) @@ -2378,17 +2378,17 @@ def warn_for_range_const_reference_copy : Warning< "loop variable %0 " "%diff{has type $ but is initialized with type $" "| is initialized with a value of a different type}1,2 resulting in a copy">, - InGroup, DefaultIgnore; + InGroup, DefaultIgnore; def note_use_type_or_non_reference : Note< "use non-reference type %0 to keep the copy or type %1 to prevent copying">; def warn_for_range_variable_always_copy : Warning< "loop variable %0 is always a copy because the range of type %1 does not " "return a reference">, - InGroup, DefaultIgnore; + InGroup, DefaultIgnore; def note_use_non_reference_type : Note<"use non-reference type %0">; def warn_for_range_copy : Warning< "loop variable %0 of type %1 creates a copy from type %2">, - InGroup, DefaultIgnore; + InGroup, DefaultIgnore; def note_use_reference_type : Note<"use reference type %0 to prevent copying">; def err_objc_for_range_init_stmt : Error< "initialization statement is not supported when iterating over Objective-C " @@ -4683,6 +4683,8 @@ def note_checking_constraints_for_var_spec_id_here : N def note_checking_constraints_for_class_spec_id_here : Note< "while checking constraint satisfaction for class template partial " "specialization '%0' required here">; +def note_checking_constraints_for_function_here : Note< + "while checking constraint satisfaction for function '%0' required here">; def note_constraint_substitution_here : Note< "while substituting template arguments into constraint expression here">; def note_constraint_normalization_here : Note< @@ -6746,6 +6748,10 @@ def err_bad_cxx_cast_scalar_to_vector_different_size : def err_bad_cxx_cast_vector_to_vector_different_size : Error< "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " "to vector %2 of different size">; +def warn_bad_cxx_cast_nested_pointer_addr_space : Warning< + "%select{reinterpret_cast|C-style cast}0 from %1 to %2 " + "changes address space of nested pointers">, + InGroup; def err_bad_lvalue_to_rvalue_cast : Error< "cannot cast from lvalue of type %1 to rvalue reference type %2; types are " "not compatible">; @@ -8390,6 +8396,12 @@ def note_defaulted_comparison_cannot_deduce : Note< "return type of defaulted 'operator<=>' cannot be deduced because " "return type %2 of three-way comparison for %select{|member|base class}0 %1 " "is not a standard comparison category type">; +def err_defaulted_comparison_cannot_deduce_undeduced_auto : Error< + "return type of defaulted 'operator<=>' cannot be deduced because " + "three-way comparison for %select{|member|base class}0 %1 " + "has a deduced return type and is not yet defined">; +def note_defaulted_comparison_cannot_deduce_undeduced_auto : Note< + "%select{|member|base class}0 %1 declared here">; def note_defaulted_comparison_cannot_deduce_callee : Note< "selected 'operator<=>' for %select{|member|base class}0 %1 declared here">; def err_incorrect_defaulted_comparison_constexpr : Error< Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td Fri Feb 14 21:24:03 2020 (r357937) @@ -859,6 +859,8 @@ def detailed_preprocessing_record : Flag<["-"], "detai HelpText<"include a detailed record of preprocessing actions">; def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">, HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">; +def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">, + HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">; //===----------------------------------------------------------------------===// // OpenCL Options Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Job.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Driver/Job.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Driver/Job.h Fri Feb 14 21:24:03 2020 (r357937) @@ -55,9 +55,6 @@ class Command { /// The list of program arguments which are inputs. llvm::opt::ArgStringList InputFilenames; - /// Whether to print the input filenames when executing. - bool PrintInputFilenames = false; - /// Response file name, if this command is set to use one, or nullptr /// otherwise const char *ResponseFile = nullptr; @@ -86,6 +83,12 @@ class Command { void writeResponseFile(raw_ostream &OS) const; public: + /// Whether to print the input filenames when executing. + bool PrintInputFilenames = false; + + /// Whether the command will be executed in this process or not. + bool InProcess = false; + Command(const Action &Source, const Tool &Creator, const char *Executable, const llvm::opt::ArgStringList &Arguments, ArrayRef Inputs); @@ -128,9 +131,6 @@ class Command { /// Print a command argument, and optionally quote it. static void printArg(llvm::raw_ostream &OS, StringRef Arg, bool Quote); - /// Set whether to print the input filenames when executing. - void setPrintInputFilenames(bool P) { PrintInputFilenames = P; } - protected: /// Optionally print the filenames to be compiled void PrintFileNames() const; @@ -139,7 +139,9 @@ class Command { /// Use the CC1 tool callback when available, to avoid creating a new process class CC1Command : public Command { public: - using Command::Command; + CC1Command(const Action &Source, const Tool &Creator, const char *Executable, + const llvm::opt::ArgStringList &Arguments, + ArrayRef Inputs); void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo = nullptr) const override; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Lex/PreprocessorOptions.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Lex/PreprocessorOptions.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Lex/PreprocessorOptions.h Fri Feb 14 21:24:03 2020 (r357937) @@ -189,6 +189,9 @@ class PreprocessorOptions { (public) /// Set up preprocessor for RunAnalysis action. bool SetUpStaticAnalyzer = false; + /// Prevents intended crashes when using #pragma clang __debug. For testing. + bool DisablePragmaDebugCrash = false; + public: PreprocessorOptions() : PrecompiledPreambleBytes(0, false) {} Modified: vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h Fri Feb 14 21:24:03 2020 (r357937) @@ -6275,7 +6275,7 @@ class Sema final { (public) /// \returns true if an error occurred and satisfaction could not be checked, /// false otherwise. bool CheckConstraintSatisfaction( - NamedDecl *Template, ArrayRef ConstraintExprs, + const NamedDecl *Template, ArrayRef ConstraintExprs, ArrayRef TemplateArgs, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction); @@ -6288,6 +6288,17 @@ class Sema final { (public) bool CheckConstraintSatisfaction(const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction); + /// Check whether the given function decl's trailing requires clause is + /// satisfied, if any. Returns false and updates Satisfaction with the + /// satisfaction verdict if successful, emits a diagnostic and returns true if + /// an error occured and satisfaction could not be determined. + /// + /// \returns true if an error occurred, false otherwise. + bool CheckFunctionConstraints(const FunctionDecl *FD, + ConstraintSatisfaction &Satisfaction, + SourceLocation UsageLoc = SourceLocation()); + + /// \brief Ensure that the given template arguments satisfy the constraints /// associated with the given template, emitting a diagnostic if they do not. /// @@ -6986,7 +6997,7 @@ class Sema final { (public) /// Get a template argument mapping the given template parameter to itself, /// e.g. for X in \c template, this would return an expression template /// argument referencing X. - TemplateArgumentLoc getIdentityTemplateArgumentLoc(Decl *Param, + TemplateArgumentLoc getIdentityTemplateArgumentLoc(NamedDecl *Param, SourceLocation Location); void translateTemplateArguments(const ASTTemplateArgsPtr &In, Modified: vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h Fri Feb 14 21:24:03 2020 (r357937) @@ -43,11 +43,15 @@ struct AtomicConstraint { if (ParameterMapping->size() != Other.ParameterMapping->size()) return false; - for (unsigned I = 0, S = ParameterMapping->size(); I < S; ++I) - if (!C.getCanonicalTemplateArgument((*ParameterMapping)[I].getArgument()) - .structurallyEquals(C.getCanonicalTemplateArgument( - (*Other.ParameterMapping)[I].getArgument()))) + for (unsigned I = 0, S = ParameterMapping->size(); I < S; ++I) { + llvm::FoldingSetNodeID IDA, IDB; + C.getCanonicalTemplateArgument((*ParameterMapping)[I].getArgument()) + .Profile(IDA, C); + C.getCanonicalTemplateArgument((*Other.ParameterMapping)[I].getArgument()) + .Profile(IDB, C); + if (IDA != IDB) return false; + } return true; } Modified: vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -59,8 +59,8 @@ ASTConstraintSatisfaction::Create(const ASTContext &C, } void ConstraintSatisfaction::Profile( - llvm::FoldingSetNodeID &ID, const ASTContext &C, NamedDecl *ConstraintOwner, - ArrayRef TemplateArgs) { + llvm::FoldingSetNodeID &ID, const ASTContext &C, + const NamedDecl *ConstraintOwner, ArrayRef TemplateArgs) { ID.AddPointer(ConstraintOwner); ID.AddInteger(TemplateArgs.size()); for (auto &Arg : TemplateArgs) Modified: vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -756,12 +756,8 @@ canonicalizeImmediatelyDeclaredConstraint(const ASTCon NewConverted.push_back(Arg); } Expr *NewIDC = ConceptSpecializationExpr::Create( - C, NestedNameSpecifierLoc(), /*TemplateKWLoc=*/SourceLocation(), - CSE->getConceptNameInfo(), /*FoundDecl=*/CSE->getNamedConcept(), - CSE->getNamedConcept(), - // Actually canonicalizing a TemplateArgumentLoc is difficult so we - // simply omit the ArgsAsWritten - /*ArgsAsWritten=*/nullptr, NewConverted, nullptr); + C, CSE->getNamedConcept(), NewConverted, nullptr, + CSE->isInstantiationDependent(), CSE->containsUnexpandedParameterPack()); if (auto *OrigFold = dyn_cast(IDC)) NewIDC = new (C) CXXFoldExpr(OrigFold->getType(), SourceLocation(), NewIDC, Modified: vendor/llvm-project/release-10.x/clang/lib/AST/CXXInheritance.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/CXXInheritance.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/CXXInheritance.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -758,6 +758,8 @@ CXXRecordDecl::getFinalOverriders(CXXFinalOverriderMap return false; }; + // FIXME: IsHidden reads from Overriding from the middle of a remove_if + // over the same sequence! Is this guaranteed to work? Overriding.erase( std::remove_if(Overriding.begin(), Overriding.end(), IsHidden), Overriding.end()); Modified: vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -2038,17 +2038,36 @@ CXXMethodDecl::getCorrespondingMethodInClass(const CXX if (auto *MD = getCorrespondingMethodDeclaredInClass(RD, MayBeBase)) return MD; + llvm::SmallVector FinalOverriders; + auto AddFinalOverrider = [&](CXXMethodDecl *D) { + // If this function is overridden by a candidate final overrider, it is not + // a final overrider. + for (CXXMethodDecl *OtherD : FinalOverriders) { + if (declaresSameEntity(D, OtherD) || recursivelyOverrides(OtherD, D)) + return; + } + + // Other candidate final overriders might be overridden by this function. + FinalOverriders.erase( + std::remove_if(FinalOverriders.begin(), FinalOverriders.end(), + [&](CXXMethodDecl *OtherD) { + return recursivelyOverrides(D, OtherD); + }), + FinalOverriders.end()); + + FinalOverriders.push_back(D); + }; + for (const auto &I : RD->bases()) { const RecordType *RT = I.getType()->getAs(); if (!RT) continue; const auto *Base = cast(RT->getDecl()); - CXXMethodDecl *T = this->getCorrespondingMethodInClass(Base); - if (T) - return T; + if (CXXMethodDecl *D = this->getCorrespondingMethodInClass(Base)) + AddFinalOverrider(D); } - return nullptr; + return FinalOverriders.size() == 1 ? FinalOverriders.front() : nullptr; } CXXMethodDecl *CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD, @@ -2104,6 +2123,11 @@ CXXMethodDecl *CXXMethodDecl::getDevirtualizedMethod(c // There may be a method corresponding to MD in a derived class. CXXMethodDecl *DevirtualizedMethod = getCorrespondingMethodInClass(BestDynamicDecl); + + // If there final overrider in the dynamic type is ambiguous, we can't + // devirtualize this call. + if (!DevirtualizedMethod) + return nullptr; // If that method is pure virtual, we can't devirtualize. If this code is // reached, the result would be UB, not a direct call to the derived class Modified: vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -1685,6 +1685,11 @@ MemberExpr *MemberExpr::Create( CXXRecordDecl *RD = dyn_cast_or_null(DC); if (RD && RD->isDependentContext() && RD->isCurrentInstantiation(DC)) E->setTypeDependent(T->isDependentType()); + + // Bitfield with value-dependent width is type-dependent. + FieldDecl *FD = dyn_cast(MemberDecl); + if (FD && FD->isBitField() && FD->getBitWidth()->isValueDependent()) + E->setTypeDependent(true); } if (HasQualOrFound) { Modified: vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -46,24 +46,12 @@ ConceptSpecializationExpr::ConceptSpecializationExpr(c ASTConstraintSatisfaction::Create(C, *Satisfaction) : nullptr) { setTemplateArguments(ConvertedArgs); -} - -ConceptSpecializationExpr::ConceptSpecializationExpr(EmptyShell Empty, - unsigned NumTemplateArgs) - : Expr(ConceptSpecializationExprClass, Empty), ConceptReference(), - NumTemplateArgs(NumTemplateArgs) { } - -void ConceptSpecializationExpr::setTemplateArguments( - ArrayRef Converted) { - assert(Converted.size() == NumTemplateArgs); - std::uninitialized_copy(Converted.begin(), Converted.end(), - getTrailingObjects()); bool IsInstantiationDependent = false; bool ContainsUnexpandedParameterPack = false; - for (const TemplateArgument& Arg : Converted) { - if (Arg.isInstantiationDependent()) + for (const TemplateArgumentLoc& ArgLoc : ArgsAsWritten->arguments()) { + if (ArgLoc.getArgument().isInstantiationDependent()) IsInstantiationDependent = true; - if (Arg.containsUnexpandedParameterPack()) + if (ArgLoc.getArgument().containsUnexpandedParameterPack()) ContainsUnexpandedParameterPack = true; if (ContainsUnexpandedParameterPack && IsInstantiationDependent) break; @@ -80,6 +68,18 @@ void ConceptSpecializationExpr::setTemplateArguments( "should not be value-dependent"); } +ConceptSpecializationExpr::ConceptSpecializationExpr(EmptyShell Empty, + unsigned NumTemplateArgs) + : Expr(ConceptSpecializationExprClass, Empty), ConceptReference(), + NumTemplateArgs(NumTemplateArgs) { } + +void ConceptSpecializationExpr::setTemplateArguments( + ArrayRef Converted) { + assert(Converted.size() == NumTemplateArgs); + std::uninitialized_copy(Converted.begin(), Converted.end(), + getTrailingObjects()); +} + ConceptSpecializationExpr * ConceptSpecializationExpr::Create(const ASTContext &C, NestedNameSpecifierLoc NNS, @@ -96,6 +96,39 @@ ConceptSpecializationExpr::Create(const ASTContext &C, ConceptNameInfo, FoundDecl, NamedConcept, ArgsAsWritten, ConvertedArgs, Satisfaction); +} + +ConceptSpecializationExpr::ConceptSpecializationExpr( + const ASTContext &C, ConceptDecl *NamedConcept, + ArrayRef ConvertedArgs, + const ConstraintSatisfaction *Satisfaction, bool Dependent, + bool ContainsUnexpandedParameterPack) + : Expr(ConceptSpecializationExprClass, C.BoolTy, VK_RValue, OK_Ordinary, + /*TypeDependent=*/false, + /*ValueDependent=*/!Satisfaction, Dependent, + ContainsUnexpandedParameterPack), + ConceptReference(NestedNameSpecifierLoc(), SourceLocation(), + DeclarationNameInfo(), NamedConcept, + NamedConcept, nullptr), + NumTemplateArgs(ConvertedArgs.size()), + Satisfaction(Satisfaction ? + ASTConstraintSatisfaction::Create(C, *Satisfaction) : + nullptr) { + setTemplateArguments(ConvertedArgs); +} + +ConceptSpecializationExpr * +ConceptSpecializationExpr::Create(const ASTContext &C, + ConceptDecl *NamedConcept, + ArrayRef ConvertedArgs, + const ConstraintSatisfaction *Satisfaction, + bool Dependent, + bool ContainsUnexpandedParameterPack) { + void *Buffer = C.Allocate(totalSizeToAlloc( + ConvertedArgs.size())); + return new (Buffer) ConceptSpecializationExpr( + C, NamedConcept, ConvertedArgs, Satisfaction, Dependent, + ContainsUnexpandedParameterPack); } ConceptSpecializationExpr * Modified: vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -1535,8 +1535,8 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOpe return Stmt::BinaryOperatorClass; case OO_Spaceship: - // FIXME: Update this once we support <=> expressions. - llvm_unreachable("<=> expressions not supported yet"); + BinaryOp = BO_Cmp; + return Stmt::BinaryOperatorClass; case OO_AmpAmp: BinaryOp = BO_LAnd; Modified: vendor/llvm-project/release-10.x/clang/lib/Basic/Cuda.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Basic/Cuda.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Basic/Cuda.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -2,6 +2,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/ADT/Twine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/VersionTuple.h" @@ -31,8 +32,8 @@ const char *CudaVersionToString(CudaVersion V) { llvm_unreachable("invalid enum"); } -CudaVersion CudaStringToVersion(llvm::StringRef S) { - return llvm::StringSwitch(S) +CudaVersion CudaStringToVersion(const llvm::Twine &S) { + return llvm::StringSwitch(S.str()) .Case("7.0", CudaVersion::CUDA_70) .Case("7.5", CudaVersion::CUDA_75) .Case("8.0", CudaVersion::CUDA_80) @@ -40,7 +41,8 @@ CudaVersion CudaStringToVersion(llvm::StringRef S) { .Case("9.1", CudaVersion::CUDA_91) .Case("9.2", CudaVersion::CUDA_92) .Case("10.0", CudaVersion::CUDA_100) - .Case("10.1", CudaVersion::CUDA_101); + .Case("10.1", CudaVersion::CUDA_101) + .Default(CudaVersion::UNKNOWN); } const char *CudaArchToString(CudaArch A) { Modified: vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -537,6 +537,13 @@ void CodeGenModule::Release() { getModule().addModuleFlag(llvm::Module::Error, "min_enum_size", EnumWidth); } + if (Arch == llvm::Triple::riscv32 || Arch == llvm::Triple::riscv64) { + StringRef ABIStr = Target.getABI(); + llvm::LLVMContext &Ctx = TheModule.getContext(); + getModule().addModuleFlag(llvm::Module::Error, "target-abi", + llvm::MDString::get(Ctx, ABIStr)); + } + if (CodeGenOpts.SanitizeCfiCrossDso) { // Indicate that we want cross-DSO control flow integrity checks. getModule().addModuleFlag(llvm::Module::Override, "Cross-DSO CFI", 1); Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -258,13 +258,22 @@ void Compilation::initCompilationForDiagnostics() { // Remove any user specified output. Claim any unclaimed arguments, so as // to avoid emitting warnings about unused args. - OptSpecifier OutputOpts[] = { options::OPT_o, options::OPT_MD, - options::OPT_MMD }; + OptSpecifier OutputOpts[] = { + options::OPT_o, options::OPT_MD, options::OPT_MMD, options::OPT_M, + options::OPT_MM, options::OPT_MF, options::OPT_MG, options::OPT_MJ, + options::OPT_MQ, options::OPT_MT, options::OPT_MV}; for (unsigned i = 0, e = llvm::array_lengthof(OutputOpts); i != e; ++i) { if (TranslatedArgs->hasArg(OutputOpts[i])) TranslatedArgs->eraseArg(OutputOpts[i]); } TranslatedArgs->ClaimAllArgs(); + + // Force re-creation of the toolchain Args, otherwise our modifications just + // above will have no effect. + for (auto Arg : TCArgs) + if (Arg.second != TranslatedArgs) + delete Arg.second; + TCArgs.clear(); // Redirect stdout/stderr to /dev/null. Redirects = {None, {""}, {""}}; Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -3757,6 +3757,11 @@ void Driver::BuildJobs(Compilation &C) const { /*TargetDeviceOffloadKind*/ Action::OFK_None); } + // If we have more than one job, then disable integrated-cc1 for now. + if (C.getJobs().size() > 1) + for (auto &J : C.getJobs()) + J.InProcess = false; + // If the user passed -Qunused-arguments or there were errors, don't warn // about any unused arguments. if (Diags.hasErrorOccurred() || Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/Job.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/Job.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/Job.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -371,14 +371,29 @@ int Command::Execute(ArrayRef Inputs) + : Command(Source, Creator, Executable, Arguments, Inputs) { + InProcess = true; +} + void CC1Command::Print(raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { - OS << " (in-process)\n"; + if (InProcess) + OS << " (in-process)\n"; Command::Print(OS, Terminator, Quote, CrashInfo); } -int CC1Command::Execute(ArrayRef> /*Redirects*/, +int CC1Command::Execute(ArrayRef> Redirects, std::string *ErrMsg, bool *ExecutionFailed) const { + // FIXME: Currently, if there're more than one job, we disable + // -fintegrate-cc1. If we're no longer a integrated-cc1 job, fallback to + // out-of-process execution. See discussion in https://reviews.llvm.org/D74447 + if (!InProcess) + return Command::Execute(Redirects, ErrMsg, ExecutionFailed); + PrintFileNames(); SmallVector Argv; Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -4679,6 +4679,11 @@ void Clang::ConstructJob(Compilation &C, const JobActi : "-"); } + // Give the gen diagnostics more chances to succeed, by avoiding intentional + // crashes. + if (D.CCGenDiagnostics) + CmdArgs.push_back("-disable-pragma-debug-crash"); + bool UseSeparateSections = isUseSeparateSections(Triple); if (Args.hasFlag(options::OPT_ffunction_sections, @@ -6048,7 +6053,7 @@ void Clang::ConstructJob(Compilation &C, const JobActi if (Output.getType() == types::TY_Object && Args.hasFlag(options::OPT__SLASH_showFilenames, options::OPT__SLASH_showFilenames_, false)) { - C.getJobs().getJobs().back()->setPrintInputFilenames(true); + C.getJobs().getJobs().back()->PrintInputFilenames = true; } if (Arg *A = Args.getLastArg(options::OPT_pg)) Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Cuda.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Cuda.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Cuda.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -32,37 +32,24 @@ using namespace llvm::opt; // Parses the contents of version.txt in an CUDA installation. It should // contain one line of the from e.g. "CUDA Version 7.5.2". -static CudaVersion ParseCudaVersionFile(llvm::StringRef V) { +static CudaVersion ParseCudaVersionFile(const Driver &D, llvm::StringRef V) { if (!V.startswith("CUDA Version ")) return CudaVersion::UNKNOWN; V = V.substr(strlen("CUDA Version ")); - int Major = -1, Minor = -1; - auto First = V.split('.'); - auto Second = First.second.split('.'); - if (First.first.getAsInteger(10, Major) || - Second.first.getAsInteger(10, Minor)) + SmallVector VersionParts; + V.split(VersionParts, '.'); + if (VersionParts.size() < 2) return CudaVersion::UNKNOWN; + std::string MajorMinor = join_items(".", VersionParts[0], VersionParts[1]); + CudaVersion Version = CudaStringToVersion(MajorMinor); + if (Version != CudaVersion::UNKNOWN) + return Version; - if (Major == 7 && Minor == 0) { - // This doesn't appear to ever happen -- version.txt doesn't exist in the - // CUDA 7 installs I've seen. But no harm in checking. - return CudaVersion::CUDA_70; - } - if (Major == 7 && Minor == 5) - return CudaVersion::CUDA_75; - if (Major == 8 && Minor == 0) - return CudaVersion::CUDA_80; - if (Major == 9 && Minor == 0) - return CudaVersion::CUDA_90; - if (Major == 9 && Minor == 1) - return CudaVersion::CUDA_91; - if (Major == 9 && Minor == 2) - return CudaVersion::CUDA_92; - if (Major == 10 && Minor == 0) - return CudaVersion::CUDA_100; - if (Major == 10 && Minor == 1) - return CudaVersion::CUDA_101; - return CudaVersion::UNKNOWN; + // Issue a warning and assume that the version we've found is compatible with + // the latest version we support. + D.Diag(diag::warn_drv_unknown_cuda_version) + << MajorMinor << CudaVersionToString(CudaVersion::LATEST); + return CudaVersion::LATEST; } CudaInstallationDetector::CudaInstallationDetector( @@ -160,7 +147,7 @@ CudaInstallationDetector::CudaInstallationDetector( // version.txt isn't present. Version = CudaVersion::CUDA_70; } else { - Version = ParseCudaVersionFile((*VersionFile)->getBuffer()); + Version = ParseCudaVersionFile(D, (*VersionFile)->getBuffer()); } if (Version >= CudaVersion::CUDA_90) { Modified: vendor/llvm-project/release-10.x/clang/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Frontend/CompilerInvocation.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Frontend/CompilerInvocation.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -3440,6 +3440,7 @@ static void ParsePreprocessorArgs(PreprocessorOptions Opts.LexEditorPlaceholders = false; Opts.SetUpStaticAnalyzer = Args.hasArg(OPT_setup_static_analyzer); + Opts.DisablePragmaDebugCrash = Args.hasArg(OPT_disable_pragma_debug_crash); } static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts, Modified: vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_intrinsics.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_intrinsics.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_intrinsics.h Fri Feb 14 21:24:03 2020 (r357937) @@ -45,7 +45,7 @@ _Static_assert(sizeof(__val) == sizeof(__Bits)); \ _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \ __Bits __tmp; \ - memcpy(&__val, &__tmp, sizeof(__val)); \ + memcpy(&__tmp, &__val, sizeof(__val)); \ __tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \ __tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \ long long __ret; \ @@ -129,7 +129,7 @@ __MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nv _Static_assert(sizeof(__val) == sizeof(__Bits)); \ _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \ __Bits __tmp; \ - memcpy(&__val, &__tmp, sizeof(__val)); \ + memcpy(&__tmp, &__val, sizeof(__val)); \ __tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \ __tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \ long long __ret; \ Modified: vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_runtime_wrapper.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_runtime_wrapper.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_runtime_wrapper.h Fri Feb 14 21:24:03 2020 (r357937) @@ -48,7 +48,7 @@ #include "cuda.h" #if !defined(CUDA_VERSION) #error "cuda.h did not define CUDA_VERSION" -#elif CUDA_VERSION < 7000 || CUDA_VERSION > 10010 +#elif CUDA_VERSION < 7000 #error "Unsupported CUDA version!" #endif Modified: vendor/llvm-project/release-10.x/clang/lib/Headers/xmmintrin.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Headers/xmmintrin.h Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Headers/xmmintrin.h Fri Feb 14 21:24:03 2020 (r357937) @@ -2181,7 +2181,7 @@ void _mm_sfence(void); /// 3: Bits [63:48] are copied to the destination. /// \returns A 16-bit integer containing the extracted 16 bits of packed data. #define _mm_extract_pi16(a, n) \ - (int)__builtin_ia32_vec_ext_v4hi((__m64)a, (int)n) + (int)__builtin_ia32_vec_ext_v4hi((__v4hi)a, (int)n) /// Copies data from the 64-bit vector of [4 x i16] to the destination, /// and inserts the lower 16-bits of an integer operand at the 16-bit offset @@ -2212,7 +2212,7 @@ void _mm_sfence(void); /// \returns A 64-bit integer vector containing the copied packed data from the /// operands. #define _mm_insert_pi16(a, d, n) \ - (__m64)__builtin_ia32_vec_set_v4hi((__m64)a, (int)d, (int)n) + (__m64)__builtin_ia32_vec_set_v4hi((__v4hi)a, (int)d, (int)n) /// Compares each of the corresponding packed 16-bit integer values of /// the 64-bit integer vectors, and writes the greater value to the Modified: vendor/llvm-project/release-10.x/clang/lib/Lex/Lexer.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Lex/Lexer.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Lex/Lexer.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -2552,8 +2552,8 @@ bool Lexer::SkipBlockComment(Token &Result, const char '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/', '/' }; - while (CurPtr+16 <= BufferEnd && - !vec_any_eq(*(const vector unsigned char*)CurPtr, Slashes)) + while (CurPtr + 16 <= BufferEnd && + !vec_any_eq(*(const __vector unsigned char *)CurPtr, Slashes)) CurPtr += 16; #else // Scan for '/' quickly. Many block comments are very large. Modified: vendor/llvm-project/release-10.x/clang/lib/Lex/Pragma.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Lex/Pragma.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Lex/Pragma.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -30,6 +30,7 @@ #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" #include "clang/Lex/PreprocessorLexer.h" +#include "clang/Lex/PreprocessorOptions.h" #include "clang/Lex/Token.h" #include "clang/Lex/TokenLexer.h" #include "llvm/ADT/ArrayRef.h" @@ -39,7 +40,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" #include @@ -1035,15 +1035,19 @@ struct PragmaDebugHandler : public PragmaHandler { IdentifierInfo *II = Tok.getIdentifierInfo(); if (II->isStr("assert")) { - llvm_unreachable("This is an assertion!"); + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) + llvm_unreachable("This is an assertion!"); } else if (II->isStr("crash")) { - LLVM_BUILTIN_TRAP; + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) + LLVM_BUILTIN_TRAP; } else if (II->isStr("parser_crash")) { - Token Crasher; - Crasher.startToken(); - Crasher.setKind(tok::annot_pragma_parser_crash); - Crasher.setAnnotationRange(SourceRange(Tok.getLocation())); - PP.EnterToken(Crasher, /*IsReinject*/false); + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) { + Token Crasher; + Crasher.startToken(); + Crasher.setKind(tok::annot_pragma_parser_crash); + Crasher.setAnnotationRange(SourceRange(Tok.getLocation())); + PP.EnterToken(Crasher, /*IsReinject*/ false); + } } else if (II->isStr("dump")) { Token Identifier; PP.LexUnexpandedToken(Identifier); @@ -1075,9 +1079,11 @@ struct PragmaDebugHandler : public PragmaHandler { << II->getName(); } } else if (II->isStr("llvm_fatal_error")) { - llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error"); + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) + llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error"); } else if (II->isStr("llvm_unreachable")) { - llvm_unreachable("#pragma clang __debug llvm_unreachable"); + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) + llvm_unreachable("#pragma clang __debug llvm_unreachable"); } else if (II->isStr("macro")) { Token MacroName; PP.LexUnexpandedToken(MacroName); @@ -1104,11 +1110,8 @@ struct PragmaDebugHandler : public PragmaHandler { } M->dump(); } else if (II->isStr("overflow_stack")) { - DebugOverflowStack(); - } else if (II->isStr("handle_crash")) { - llvm::CrashRecoveryContext *CRC =llvm::CrashRecoveryContext::GetCurrent(); - if (CRC) - CRC->HandleCrash(); + if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) + DebugOverflowStack(); } else if (II->isStr("captured")) { HandleCaptured(PP); } else { Modified: vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDecl.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDecl.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDecl.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -5060,6 +5060,8 @@ bool Parser::isDeclarationSpecifier(bool Disambiguatin // recurse to handle whatever we get. if (TryAnnotateTypeOrScopeToken()) return true; + if (TryAnnotateTypeConstraint()) + return true; if (Tok.is(tok::identifier)) return false; @@ -5192,11 +5194,14 @@ bool Parser::isDeclarationSpecifier(bool Disambiguatin // placeholder-type-specifier case tok::annot_template_id: { - TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok); - return TemplateId->Kind == TNK_Concept_template && + return isTypeConstraintAnnotation() && (NextToken().is(tok::kw_auto) || NextToken().is(tok::kw_decltype)); } - + case tok::annot_cxxscope: + if (NextToken().is(tok::identifier) && TryAnnotateTypeConstraint()) + return true; + return isTypeConstraintAnnotation() && + GetLookAheadToken(2).isOneOf(tok::kw_auto, tok::kw_decltype); case tok::kw___declspec: case tok::kw___cdecl: case tok::kw___stdcall: Modified: vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDeclCXX.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDeclCXX.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDeclCXX.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -2716,7 +2716,7 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier // C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq appertains // to a friend declaration, that declaration shall be a definition. if (DeclaratorInfo.isFunctionDeclarator() && - DefinitionKind != FDK_Definition && DS.isFriendSpecified()) { + DefinitionKind == FDK_Declaration && DS.isFriendSpecified()) { // Diagnose attributes that appear before decl specifier: // [[]] friend int foo(); ProhibitAttributes(FnAttrs); Modified: vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExprCXX.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExprCXX.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExprCXX.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -3374,25 +3374,6 @@ ExprResult Parser::ParseRequiresExpression() { Diag(Tok, diag::err_requires_expr_missing_arrow) << FixItHint::CreateInsertion(Tok.getLocation(), "->"); // Try to parse a 'type-constraint' - CXXScopeSpec SS; - if (ParseOptionalCXXScopeSpecifier(SS, ParsedType(), - /*EnteringContext=*/false, - /*MayBePseudoDestructor=*/nullptr, - // If this is not a type-constraint, - // then this scope-spec is part of - // the typename of a non-type - // template parameter - /*IsTypename=*/true, - /*LastII=*/nullptr, - // We won't find concepts in - // non-namespaces anyway, so might as - // well parse this correctly for - // possible type names. - /*OnlyNamespace=*/false, - /*SuppressDiagnostic=*/true)) { - SkipUntil(tok::semi, tok::r_brace, SkipUntilFlags::StopBeforeMatch); - break; - } if (TryAnnotateTypeConstraint()) { SkipUntil(tok::semi, tok::r_brace, SkipUntilFlags::StopBeforeMatch); break; @@ -3402,8 +3383,13 @@ ExprResult Parser::ParseRequiresExpression() { SkipUntil(tok::semi, tok::r_brace, SkipUntilFlags::StopBeforeMatch); break; } - if (Tok.is(tok::annot_cxxscope)) + CXXScopeSpec SS; + if (Tok.is(tok::annot_cxxscope)) { + Actions.RestoreNestedNameSpecifierAnnotation(Tok.getAnnotationValue(), + Tok.getAnnotationRange(), + SS); ConsumeAnnotationToken(); + } Req = Actions.ActOnCompoundRequirement( Expression.get(), NoexceptLoc, SS, takeTemplateIdAnnotation(Tok), @@ -3490,6 +3476,7 @@ ExprResult Parser::ParseRequiresExpression() { // We need to consume the typename to allow 'requires { typename a; }' SourceLocation TypenameKWLoc = ConsumeToken(); if (TryAnnotateCXXScopeToken()) { + TPA.Commit(); SkipUntil(tok::semi, tok::r_brace, SkipUntilFlags::StopBeforeMatch); break; } Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaCast.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaCast.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaCast.cpp Fri Feb 14 21:24:03 2020 (r357937) @@ -2311,6 +2311,24 @@ static TryCastResult TryReinterpretCast(Sema &Self, Ex return SuccessResult; } + // Diagnose address space conversion in nested pointers. + QualType DestPtee = DestType->getPointeeType().isNull() + ? DestType->getPointeeType() + : DestType->getPointeeType()->getPointeeType(); + QualType SrcPtee = SrcType->getPointeeType().isNull() + ? SrcType->getPointeeType() + : SrcType->getPointeeType()->getPointeeType(); + while (!DestPtee.isNull() && !SrcPtee.isNull()) { + if (DestPtee.getAddressSpace() != SrcPtee.getAddressSpace()) { + Self.Diag(OpRange.getBegin(), + diag::warn_bad_cxx_cast_nested_pointer_addr_space) + << CStyle << SrcType << DestType << SrcExpr.get()->getSourceRange(); + break; + } + DestPtee = DestPtee->getPointeeType(); + SrcPtee = SrcPtee->getPointeeType(); + } + // C++ 5.2.10p7: A pointer to an object can be explicitly converted to // a pointer to an object of different type. // Void pointers are not specified, but supported by every compiler out there. Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaConcept.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaConcept.cpp Fri Feb 14 21:05:15 2020 (r357936) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaConcept.cpp Fri Feb 14 21:24:03 2020 (r357937) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 14 21:24:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01F25243150; Fri, 14 Feb 2020 21:24:57 +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) server-signature RSA-PSS (4096 bits) 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 48K5xh6Kmdz4HQK; Fri, 14 Feb 2020 21:24:56 +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 BA62F2043; Fri, 14 Feb 2020 21:24:56 +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 01ELOuvf000888; Fri, 14 Feb 2020 21:24:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ELOu2T000887; Fri, 14 Feb 2020 21:24:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002142124.01ELOu2T000887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 14 Feb 2020 21:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r357938 - vendor/llvm-project/llvmorg-10.0.0-rc2-0-g90c78073f73 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-10.0.0-rc2-0-g90c78073f73 X-SVN-Commit-Revision: 357938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 21:24:57 -0000 Author: dim Date: Fri Feb 14 21:24:56 2020 New Revision: 357938 URL: https://svnweb.freebsd.org/changeset/base/357938 Log: Tag llvm-project branch release/10.x llvmorg-10.0.0-rc2-0-g90c78073f73. Added: vendor/llvm-project/llvmorg-10.0.0-rc2-0-g90c78073f73/ - copied from r357937, vendor/llvm-project/release-10.x/ From owner-svn-src-all@freebsd.org Fri Feb 14 22:32:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26C03244C56; Fri, 14 Feb 2020 22:32:34 +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) server-signature RSA-PSS (4096 bits) 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 48K7Rk071cz4MJg; Fri, 14 Feb 2020 22:32:34 +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 F3D122DD7; Fri, 14 Feb 2020 22:32:33 +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 01EMWXAN042815; Fri, 14 Feb 2020 22:32:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EMWXcc042814; Fri, 14 Feb 2020 22:32:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202002142232.01EMWXcc042814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 14 Feb 2020 22:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357939 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 357939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 22:32:34 -0000 Author: emaste Date: Fri Feb 14 22:32:33 2020 New Revision: 357939 URL: https://svnweb.freebsd.org/changeset/base/357939 Log: Update version in openssh FREEBSD-vendor metadata It appears that FREEBSD-vendor is an idea that never really took off and we should probably just remove it, but until then we might as well record the correct version. Modified: head/crypto/openssh/FREEBSD-vendor Modified: head/crypto/openssh/FREEBSD-vendor ============================================================================== --- head/crypto/openssh/FREEBSD-vendor Fri Feb 14 21:24:56 2020 (r357938) +++ head/crypto/openssh/FREEBSD-vendor Fri Feb 14 22:32:33 2020 (r357939) @@ -1,6 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.2p1 +Version: 7.9p1 License: BSD Maintainer: des From owner-svn-src-all@freebsd.org Fri Feb 14 23:15:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C0D8245D76; Fri, 14 Feb 2020 23:15:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8PV6SQtz4PhV; Fri, 14 Feb 2020 23:15:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D486A3717; Fri, 14 Feb 2020 23:15:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENFgOu067169; Fri, 14 Feb 2020 23:15:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENFfZ3067165; Fri, 14 Feb 2020 23:15:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142315.01ENFfZ3067165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357940 - in head/sys: amd64/amd64 sys x86/x86 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: amd64/amd64 sys x86/x86 X-SVN-Commit-Revision: 357940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:15:43 -0000 Author: mjg Date: Fri Feb 14 23:15:41 2020 New Revision: 357940 URL: https://svnweb.freebsd.org/changeset/base/357940 Log: Make atomic_load_ptr type-aware Returned value has type based on the argument, meaning consumers no longer have to cast in the commmon case. This commit keeps the kernel compilable without patching the rest. Modified: head/sys/amd64/amd64/pmap.c head/sys/sys/_cscan_atomic.h head/sys/sys/atomic_common.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Feb 14 22:32:33 2020 (r357939) +++ head/sys/amd64/amd64/pmap.c Fri Feb 14 23:15:41 2020 (r357940) @@ -796,7 +796,7 @@ again: PV_STAT(i = 0); for (p = &pmap_invl_gen_head;; p = prev.next) { PV_STAT(i++); - prevl = atomic_load_ptr(&p->next); + prevl = (uintptr_t)atomic_load_ptr(&p->next); if ((prevl & PMAP_INVL_GEN_NEXT_INVALID) != 0) { PV_STAT(atomic_add_long(&invl_start_restart, 1)); lock_delay(&lda); @@ -903,7 +903,7 @@ pmap_delayed_invl_finish_u(void) again: for (p = &pmap_invl_gen_head; p != NULL; p = (void *)prevl) { - prevl = atomic_load_ptr(&p->next); + prevl = (uintptr_t)atomic_load_ptr(&p->next); if ((prevl & PMAP_INVL_GEN_NEXT_INVALID) != 0) { PV_STAT(atomic_add_long(&invl_finish_restart, 1)); lock_delay(&lda); @@ -954,7 +954,7 @@ DB_SHOW_COMMAND(di_queue, pmap_di_queue) for (p = &pmap_invl_gen_head, first = true; p != NULL; p = pn, first = false) { - nextl = atomic_load_ptr(&p->next); + nextl = (uintptr_t)atomic_load_ptr(&p->next); pn = (void *)(nextl & ~PMAP_INVL_GEN_NEXT_INVALID); td = first ? NULL : __containerof(p, struct thread, td_md.md_invl_gen); Modified: head/sys/sys/_cscan_atomic.h ============================================================================== --- head/sys/sys/_cscan_atomic.h Fri Feb 14 22:32:33 2020 (r357939) +++ head/sys/sys/_cscan_atomic.h Fri Feb 14 23:15:41 2020 (r357940) @@ -170,7 +170,11 @@ void kcsan_atomic_thread_fence_seq_cst(void); #define atomic_fcmpset_acq_ptr kcsan_atomic_fcmpset_acq_ptr #define atomic_fcmpset_rel_ptr kcsan_atomic_fcmpset_rel_ptr #define atomic_fetchadd_ptr kcsan_atomic_fetchadd_ptr -#define atomic_load_ptr(x) kcsan_atomic_load_ptr((volatile uintptr_t *)(x)) +#define atomic_load_ptr(x) ({ \ + __typeof(*x) __retptr; \ + __retptr = (void *)kcsan_atomic_load_ptr((volatile uintptr_t *)(x)); \ + __retptr; \ +}) #define atomic_load_acq_ptr kcsan_atomic_load_acq_ptr #define atomic_readandclear_ptr kcsan_atomic_readandclear_ptr #define atomic_set_ptr kcsan_atomic_set_ptr Modified: head/sys/sys/atomic_common.h ============================================================================== --- head/sys/sys/atomic_common.h Fri Feb 14 22:32:33 2020 (r357939) +++ head/sys/sys/atomic_common.h Fri Feb 14 23:15:41 2020 (r357940) @@ -41,7 +41,7 @@ #define atomic_load_short(p) (*(volatile u_short *)(p)) #define atomic_load_int(p) (*(volatile u_int *)(p)) #define atomic_load_long(p) (*(volatile u_long *)(p)) -#define atomic_load_ptr(p) (*(volatile uintptr_t*)(p)) +#define atomic_load_ptr(p) (*(volatile __typeof(p))(p)) #define atomic_load_8(p) (*(volatile uint8_t *)(p)) #define atomic_load_16(p) (*(volatile uint16_t *)(p)) #define atomic_load_32(p) (*(volatile uint32_t *)(p)) Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Fri Feb 14 22:32:33 2020 (r357939) +++ head/sys/x86/x86/mp_x86.c Fri Feb 14 23:15:41 2020 (r357940) @@ -1106,7 +1106,7 @@ smp_after_idle_runnable(void *arg __unused) for (cpu = 1; cpu < mp_ncpus; cpu++) { pc = pcpu_find(cpu); - while (atomic_load_ptr(&pc->pc_curpcb) == (uintptr_t)NULL) + while (atomic_load_ptr(&pc->pc_curpcb) == NULL) cpu_spinwait(); kmem_free((vm_offset_t)bootstacks[cpu], kstack_pages * PAGE_SIZE); From owner-svn-src-all@freebsd.org Fri Feb 14 23:16:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B48F6245E1A; Fri, 14 Feb 2020 23:16:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8QQ4Nv9z4PqZ; Fri, 14 Feb 2020 23:16:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91C203719; Fri, 14 Feb 2020 23:16:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENGUNX067256; Fri, 14 Feb 2020 23:16:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENGUYm067254; Fri, 14 Feb 2020 23:16:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142316.01ENGUYm067254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357941 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:16:30 -0000 Author: mjg Date: Fri Feb 14 23:16:29 2020 New Revision: 357941 URL: https://svnweb.freebsd.org/changeset/base/357941 Log: vm: remove no longer needed atomic_load_ptr casts Modified: head/sys/vm/vm_mmap.c head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Fri Feb 14 23:15:41 2020 (r357940) +++ head/sys/vm/vm_mmap.c Fri Feb 14 23:16:29 2020 (r357941) @@ -895,8 +895,7 @@ retry: while (object == NULL || m->object != object) { if (object != NULL) VM_OBJECT_WUNLOCK(object); - object = (vm_object_t)atomic_load_ptr( - &m->object); + object = atomic_load_ptr(&m->object); if (object == NULL) goto retry; VM_OBJECT_WLOCK(object); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Feb 14 23:15:41 2020 (r357940) +++ head/sys/vm/vm_page.c Fri Feb 14 23:16:29 2020 (r357941) @@ -2500,8 +2500,7 @@ retry: pa); } #endif - else if ((object = - (vm_object_t)atomic_load_ptr(&m->object)) != NULL) { + else if ((object = atomic_load_ptr(&m->object)) != NULL) { /* * The page is considered eligible for relocation if * and only if it could be laundered or reclaimed by @@ -2643,8 +2642,7 @@ vm_page_reclaim_run(int req_class, int domain, u_long */ if (vm_page_wired(m)) error = EBUSY; - else if ((object = - (vm_object_t)atomic_load_ptr(&m->object)) != NULL) { + else if ((object = atomic_load_ptr(&m->object)) != NULL) { /* * The page is relocated if and only if it could be * laundered or reclaimed by the page daemon. @@ -4065,7 +4063,7 @@ vm_page_release(vm_page_t m, int flags) if ((flags & VPR_TRYFREE) != 0) { for (;;) { - object = (vm_object_t)atomic_load_ptr(&m->object); + object = atomic_load_ptr(&m->object); if (object == NULL) break; /* Depends on type-stability. */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Feb 14 23:15:41 2020 (r357940) +++ head/sys/vm/vm_pageout.c Fri Feb 14 23:16:29 2020 (r357941) @@ -767,7 +767,7 @@ scan: if (object == NULL || object != m->object) { if (object != NULL) VM_OBJECT_WUNLOCK(object); - object = (vm_object_t)atomic_load_ptr(&m->object); + object = atomic_load_ptr(&m->object); if (__predict_false(object == NULL)) /* The page is being freed by another thread. */ continue; @@ -1238,7 +1238,7 @@ act_scan: * A page's object pointer may be set to NULL before * the object lock is acquired. */ - object = (vm_object_t)atomic_load_ptr(&m->object); + object = atomic_load_ptr(&m->object); if (__predict_false(object == NULL)) /* * The page has been removed from its object. @@ -1481,7 +1481,7 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int sh if (object == NULL || object != m->object) { if (object != NULL) VM_OBJECT_WUNLOCK(object); - object = (vm_object_t)atomic_load_ptr(&m->object); + object = atomic_load_ptr(&m->object); if (__predict_false(object == NULL)) /* The page is being freed by another thread. */ continue; From owner-svn-src-all@freebsd.org Fri Feb 14 23:17:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3151C245E9E; Fri, 14 Feb 2020 23:17:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8R40WCwz4PyW; Fri, 14 Feb 2020 23:17:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CE8A371A; Fri, 14 Feb 2020 23:17:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENH3Xv067326; Fri, 14 Feb 2020 23:17:03 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENH38k067325; Fri, 14 Feb 2020 23:17:03 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142317.01ENH38k067325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357942 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 357942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:17:04 -0000 Author: mjg Date: Fri Feb 14 23:17:03 2020 New Revision: 357942 URL: https://svnweb.freebsd.org/changeset/base/357942 Log: amd64: remove no longer needed atomic_load_ptr casts Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Fri Feb 14 23:16:29 2020 (r357941) +++ head/sys/amd64/amd64/trap.c Fri Feb 14 23:17:03 2020 (r357942) @@ -932,7 +932,7 @@ trap_user_dtrace(struct trapframe *frame, int (**hookp { int (*hook)(struct trapframe *); - hook = (int (*)(struct trapframe *))atomic_load_ptr(hookp); + hook = atomic_load_ptr(hookp); enable_intr(); if (hook != NULL) return ((hook)(frame) == 0); @@ -1075,7 +1075,7 @@ amd64_syscall_ret_flush_l1d_check(int error) if (error != EEXIST && error != EAGAIN && error != EXDEV && error != ENOENT && error != ENOTCONN && error != EINPROGRESS) { - p = (void *)atomic_load_ptr(&syscall_ret_l1d_flush); + p = atomic_load_ptr(&syscall_ret_l1d_flush); if (p != NULL) p(); } From owner-svn-src-all@freebsd.org Fri Feb 14 23:17:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1AD36245EEC; Fri, 14 Feb 2020 23:17:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8RL6yvvz4Q5h; Fri, 14 Feb 2020 23:17:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA3A7371B; Fri, 14 Feb 2020 23:17:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENHIlr067382; Fri, 14 Feb 2020 23:17:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENHIbd067381; Fri, 14 Feb 2020 23:17:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142317.01ENHIbd067381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357943 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 357943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:17:19 -0000 Author: mjg Date: Fri Feb 14 23:17:18 2020 New Revision: 357943 URL: https://svnweb.freebsd.org/changeset/base/357943 Log: arm64: remove no longer needed atomic_load_ptr casts Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Fri Feb 14 23:17:03 2020 (r357942) +++ head/sys/arm64/arm64/gicv3_its.c Fri Feb 14 23:17:18 2020 (r357943) @@ -547,7 +547,7 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) { void *conf_table; - conf_table = (void *)atomic_load_ptr((uintptr_t *)&conf_base); + conf_table = atomic_load_ptr(&conf_base); if (conf_table == NULL) { conf_table = contigmalloc(LPI_CONFTAB_SIZE, M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR, @@ -556,8 +556,7 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) if (atomic_cmpset_ptr((uintptr_t *)&conf_base, (uintptr_t)NULL, (uintptr_t)conf_table) == 0) { contigfree(conf_table, LPI_CONFTAB_SIZE, M_GICV3_ITS); - conf_table = - (void *)atomic_load_ptr((uintptr_t *)&conf_base); + conf_table = atomic_load_ptr(&conf_base); } } sc->sc_conf_base = conf_table; From owner-svn-src-all@freebsd.org Fri Feb 14 23:17:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C259F245F5C; Fri, 14 Feb 2020 23:17:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8Rj4Y29z4QD9; Fri, 14 Feb 2020 23:17:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9737D371C; Fri, 14 Feb 2020 23:17:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENHbiK067442; Fri, 14 Feb 2020 23:17:37 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENHbHg067441; Fri, 14 Feb 2020 23:17:37 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142317.01ENHbHg067441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357944 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 357944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:17:37 -0000 Author: mjg Date: Fri Feb 14 23:17:37 2020 New Revision: 357944 URL: https://svnweb.freebsd.org/changeset/base/357944 Log: i386: remove no longer needed atomic_load_ptr casts Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Fri Feb 14 23:17:18 2020 (r357943) +++ head/sys/i386/i386/trap.c Fri Feb 14 23:17:37 2020 (r357944) @@ -976,7 +976,7 @@ trap_user_dtrace(struct trapframe *frame, int (**hookp { int (*hook)(struct trapframe *); - hook = (int (*)(struct trapframe *))atomic_load_ptr(hookp); + hook = atomic_load_ptr(hookp); enable_intr(); if (hook != NULL) return ((hook)(frame) == 0); From owner-svn-src-all@freebsd.org Fri Feb 14 23:18:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70DA6245FE2; Fri, 14 Feb 2020 23:18:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8SD2LzDz4QLg; Fri, 14 Feb 2020 23:18:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C03C371D; Fri, 14 Feb 2020 23:18:04 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENI4Vc067508; Fri, 14 Feb 2020 23:18:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENI4PW067507; Fri, 14 Feb 2020 23:18:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142318.01ENI4PW067507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357945 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:18:04 -0000 Author: mjg Date: Fri Feb 14 23:18:03 2020 New Revision: 357945 URL: https://svnweb.freebsd.org/changeset/base/357945 Log: kcov: remove no longer needed atomic_load_ptr casts Modified: head/sys/kern/subr_coverage.c Modified: head/sys/kern/subr_coverage.c ============================================================================== --- head/sys/kern/subr_coverage.c Fri Feb 14 23:17:37 2020 (r357944) +++ head/sys/kern/subr_coverage.c Fri Feb 14 23:18:03 2020 (r357945) @@ -95,7 +95,7 @@ __sanitizer_cov_trace_pc(void) { cov_trace_pc_t trace_pc; - trace_pc = (cov_trace_pc_t)atomic_load_ptr(&cov_trace_pc); + trace_pc = atomic_load_ptr(&cov_trace_pc); if (trace_pc != NULL) trace_pc((uint64_t)__builtin_return_address(0)); } @@ -110,7 +110,7 @@ __sanitizer_cov_trace_cmp1(uint8_t arg1, uint8_t arg2) { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(0), arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -121,7 +121,7 @@ __sanitizer_cov_trace_cmp2(uint16_t arg1, uint16_t arg { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(1), arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -132,7 +132,7 @@ __sanitizer_cov_trace_cmp4(uint32_t arg1, uint32_t arg { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(2), arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -143,7 +143,7 @@ __sanitizer_cov_trace_cmp8(uint64_t arg1, uint64_t arg { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(3), arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -154,7 +154,7 @@ __sanitizer_cov_trace_const_cmp1(uint8_t arg1, uint8_t { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(0) | COV_CMP_CONST, arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -165,7 +165,7 @@ __sanitizer_cov_trace_const_cmp2(uint16_t arg1, uint16 { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(1) | COV_CMP_CONST, arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -176,7 +176,7 @@ __sanitizer_cov_trace_const_cmp4(uint32_t arg1, uint32 { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(2) | COV_CMP_CONST, arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -187,7 +187,7 @@ __sanitizer_cov_trace_const_cmp8(uint64_t arg1, uint64 { cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp != NULL) trace_cmp(COV_CMP_SIZE(3) | COV_CMP_CONST, arg1, arg2, (uint64_t)__builtin_return_address(0)); @@ -205,7 +205,7 @@ __sanitizer_cov_trace_switch(uint64_t val, uint64_t *c uint64_t i, count, ret, type; cov_trace_cmp_t trace_cmp; - trace_cmp = (cov_trace_cmp_t)atomic_load_ptr(&cov_trace_cmp); + trace_cmp = atomic_load_ptr(&cov_trace_cmp); if (trace_cmp == NULL) return; From owner-svn-src-all@freebsd.org Fri Feb 14 23:18:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 947A7246045; Fri, 14 Feb 2020 23:18:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8Sb385Yz4QT5; Fri, 14 Feb 2020 23:18:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 672FB371E; Fri, 14 Feb 2020 23:18:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENINlY067567; Fri, 14 Feb 2020 23:18:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENINI7067566; Fri, 14 Feb 2020 23:18:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142318.01ENINI7067566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357946 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:18:23 -0000 Author: mjg Date: Fri Feb 14 23:18:22 2020 New Revision: 357946 URL: https://svnweb.freebsd.org/changeset/base/357946 Log: fd: remove no longer needed atomic_load_ptr casts Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Feb 14 23:18:03 2020 (r357945) +++ head/sys/kern/kern_descrip.c Fri Feb 14 23:18:22 2020 (r357946) @@ -847,7 +847,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ * and any vfs op on this vnode going forward will return an * error (meaning return value in this case is meaningless). */ - mp = (struct mount *)atomic_load_ptr(&vp->v_mount); + mp = atomic_load_ptr(&vp->v_mount); if (__predict_false(mp == NULL)) { fdrop(fp, td); error = EBADF; @@ -2741,7 +2741,7 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, cap_ri * table before this fd was closed, so it is possible * that there is a stale fp pointer in cached version. */ - fdt = (struct fdescenttbl *)atomic_load_ptr(&fdp->fd_files); + fdt = atomic_load_ptr(&fdp->fd_files); continue; } /* From owner-svn-src-all@freebsd.org Fri Feb 14 23:18:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B41324608C; Fri, 14 Feb 2020 23:18:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8Sn3FVTz4Qb8; Fri, 14 Feb 2020 23:18:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AAB2371F; Fri, 14 Feb 2020 23:18:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENIXOr067618; Fri, 14 Feb 2020 23:18:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENIX4X067617; Fri, 14 Feb 2020 23:18:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002142318.01ENIX4X067617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 23:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357947 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:18:33 -0000 Author: mjg Date: Fri Feb 14 23:18:32 2020 New Revision: 357947 URL: https://svnweb.freebsd.org/changeset/base/357947 Log: vfs: remove no longer needed atomic_load_ptr casts Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Feb 14 23:18:22 2020 (r357946) +++ head/sys/kern/vfs_subr.c Fri Feb 14 23:18:32 2020 (r357947) @@ -6139,7 +6139,7 @@ vfs_cache_root(struct mount *mp, int flags, struct vno if (!vfs_op_thread_enter(mp)) return (vfs_cache_root_fallback(mp, flags, vpp)); - vp = (struct vnode *)atomic_load_ptr(&mp->mnt_rootvnode); + vp = atomic_load_ptr(&mp->mnt_rootvnode); if (vp == NULL || VN_IS_DOOMED(vp)) { vfs_op_thread_exit(mp); return (vfs_cache_root_fallback(mp, flags, vpp)); From owner-svn-src-all@freebsd.org Fri Feb 14 23:27:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A01B0246608; Fri, 14 Feb 2020 23:27:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48K8gP3ch3z4RDw; Fri, 14 Feb 2020 23:27:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 775AA392F; Fri, 14 Feb 2020 23:27:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01ENRj2P073511; Fri, 14 Feb 2020 23:27:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01ENRjb4073510; Fri, 14 Feb 2020 23:27:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002142327.01ENRjb4073510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 14 Feb 2020 23:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357948 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2020 23:27:45 -0000 Author: kib Date: Fri Feb 14 23:27:45 2020 New Revision: 357948 URL: https://svnweb.freebsd.org/changeset/base/357948 Log: Consolidate read code for timecounters and fix possible overflow in bintime()/binuptime(). The algorithm to read the consistent snapshot of current timehand is repeated in each accessor, including the details proper rollup detection and synchronization with the writer. In fact there are only two different kind of readers: one for bintime()/binuptime() which has to do the in-place calculation, and another kind which fetches some member from struct timehand. Extract the logic into type-checked macros, GETTHBINTIME() for bintime calculation, and GETTHMEMBER() for safe read of a structure' member. This way, the synchronization is only written in bintime_off() and getthmember(). In bintime_off(), use overflow-safe calculation of th_scale * delta(timecounter). In tc_windup, pre-calculate the min delta value which overflows and require slow algorithm, into the new timehands th_large_delta member. This part with overflow fix was written by Bruce Evans. Reported by: Mark Millard (the overflow issue) Tested by: pho Discussed with: emaste Sponsored by: The FreeBSD Foundation (kib) MFC after: 3 weeks Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Fri Feb 14 23:18:32 2020 (r357947) +++ head/sys/kern/kern_tc.c Fri Feb 14 23:27:45 2020 (r357948) @@ -72,6 +72,7 @@ struct timehands { struct timecounter *th_counter; int64_t th_adjustment; uint64_t th_scale; + u_int th_large_delta; u_int th_offset_count; struct bintime th_offset; struct bintime th_bintime; @@ -87,6 +88,7 @@ static struct timehands ths[16] = { [0] = { .th_counter = &dummy_timecounter, .th_scale = (uint64_t)-1 / 1000000, + .th_large_delta = 1000000, .th_offset = { .sec = 1 }, .th_generation = 1, }, @@ -202,23 +204,75 @@ tc_delta(struct timehands *th) * the comment in for a description of these 12 functions. */ -#ifdef FFCLOCK -void -fbclock_binuptime(struct bintime *bt) +static __inline void +bintime_off(struct bintime *bt, u_int off) { struct timehands *th; - unsigned int gen; + struct bintime *btp; + uint64_t scale, x; + u_int delta, gen, large_delta; do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); + btp = (struct bintime *)((vm_offset_t)th + off); + *bt = *btp; + scale = th->th_scale; + delta = tc_delta(th); + large_delta = th->th_large_delta; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); + + if (__predict_false(delta >= large_delta)) { + /* Avoid overflow for scale * delta. */ + x = (scale >> 32) * delta; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + bintime_addx(bt, (scale & 0xffffffff) * delta); + } else { + bintime_addx(bt, scale * delta); + } } +#define GETTHBINTIME(dst, member) \ +do { \ + _Static_assert(_Generic(((struct timehands *)NULL)->member, \ + struct bintime: 1, default: 0) == 1, \ + "struct timehands member is not of struct bintime type"); \ + bintime_off(dst, __offsetof(struct timehands, member)); \ +} while (0) +static __inline void +getthmember(void *out, size_t out_size, u_int off) +{ + struct timehands *th; + u_int gen; + + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + memcpy(out, (char *)th + off, out_size); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); +} +#define GETTHMEMBER(dst, member) \ +do { \ + _Static_assert(_Generic(*dst, \ + __typeof(((struct timehands *)NULL)->member): 1, \ + default: 0) == 1, \ + "*dst and struct timehands member have different types"); \ + getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ + member)); \ +} while (0) + +#ifdef FFCLOCK void +fbclock_binuptime(struct bintime *bt) +{ + + GETTHBINTIME(bt, th_offset); +} + +void fbclock_nanouptime(struct timespec *tsp) { struct bintime bt; @@ -239,16 +293,8 @@ fbclock_microuptime(struct timeval *tvp) void fbclock_bintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -272,100 +318,55 @@ fbclock_microtime(struct timeval *tvp) void fbclock_getbinuptime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void fbclock_getnanouptime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void fbclock_getmicrouptime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void fbclock_getbintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void fbclock_getnanotime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void fbclock_getmicrotime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #else /* !FFCLOCK */ + void binuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_offset); } void @@ -389,16 +390,8 @@ microuptime(struct timeval *tvp) void bintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -422,85 +415,47 @@ microtime(struct timeval *tvp) void getbinuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void getnanouptime(struct timespec *tsp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void getmicrouptime(struct timeval *tvp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void getbintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void getmicrotime(struct timeval *tvp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #endif /* FFCLOCK */ @@ -516,15 +471,8 @@ getboottime(struct timeval *boottime) void getboottimebin(struct bintime *boottimebin) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *boottimebin = th->th_boottime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(boottimebin, th_boottime); } #ifdef FFCLOCK @@ -1040,15 +988,8 @@ getmicrotime(struct timeval *tvp) void dtrace_getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } /* @@ -1466,6 +1407,7 @@ tc_windup(struct bintime *new_boottimebin) scale += (th->th_adjustment / 1024) * 2199; scale /= th->th_counter->tc_frequency; th->th_scale = scale * 2; + th->th_large_delta = MIN(((uint64_t)1 << 63) / scale, UINT_MAX); /* * Now that the struct timehands is again consistent, set the new From owner-svn-src-all@freebsd.org Sat Feb 15 00:48:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58A932489AE; Sat, 15 Feb 2020 00:48:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KBSs1hhhz4WZs; Sat, 15 Feb 2020 00:48:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 355E648A5; Sat, 15 Feb 2020 00:48:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F0mjOo022091; Sat, 15 Feb 2020 00:48:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F0mjXF022090; Sat, 15 Feb 2020 00:48:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002150048.01F0mjXF022090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 15 Feb 2020 00:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357949 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 357949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 00:48:45 -0000 Author: kib Date: Sat Feb 15 00:48:44 2020 New Revision: 357949 URL: https://svnweb.freebsd.org/changeset/base/357949 Log: MFC r357813: Fix indent. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Fri Feb 14 23:27:45 2020 (r357948) +++ stable/12/libexec/rtld-elf/rtld.c Sat Feb 15 00:48:44 2020 (r357949) @@ -5580,26 +5580,30 @@ parse_args(char* argv[], int argc, bool *use_pathp, in print_usage(argv[0]); _exit(0); } else if (opt == 'f') { - /* - * -f XX can be used to specify a descriptor for the - * binary named at the command line (i.e., the later - * argument will specify the process name but the - * descriptor is what will actually be executed) - */ - if (j != arglen - 1) { - /* -f must be the last option in, e.g., -abcf */ - _rtld_error("Invalid options: %s", arg); - rtld_die(); - } - i++; - fd = parse_integer(argv[i]); - if (fd == -1) { - _rtld_error("Invalid file descriptor: '%s'", - argv[i]); - rtld_die(); - } - *fdp = fd; - break; + /* + * -f XX can be used to specify a + * descriptor for the binary named at + * the command line (i.e., the later + * argument will specify the process + * name but the descriptor is what + * will actually be executed). + * + * -f must be the last option in, e.g., -abcf. + */ + if (j != arglen - 1) { + _rtld_error("Invalid options: %s", arg); + rtld_die(); + } + i++; + fd = parse_integer(argv[i]); + if (fd == -1) { + _rtld_error( + "Invalid file descriptor: '%s'", + argv[i]); + rtld_die(); + } + *fdp = fd; + break; } else if (opt == 'p') { *use_pathp = true; } else { From owner-svn-src-all@freebsd.org Sat Feb 15 01:28:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF3DD249F4E; Sat, 15 Feb 2020 01:28:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCLG4WBVz4YRJ; Sat, 15 Feb 2020 01:28:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 960FC5044; Sat, 15 Feb 2020 01:28:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1S6ns045541; Sat, 15 Feb 2020 01:28:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1S6Px045540; Sat, 15 Feb 2020 01:28:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150128.01F1S6Px045540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357950 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 357950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:28:06 -0000 Author: mjg Date: Sat Feb 15 01:28:06 2020 New Revision: 357950 URL: https://svnweb.freebsd.org/changeset/base/357950 Log: capsicum: add cap_rights_init_zero, cap_rights_init_one, cap_rights_set_one ... which allow the compiler to generate relevant code in place without resorting to calling to a routine at runtime. Modified: head/sys/sys/capsicum.h Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Sat Feb 15 00:48:44 2020 (r357949) +++ head/sys/sys/capsicum.h Sat Feb 15 01:28:06 2020 (r357950) @@ -351,6 +351,27 @@ void __cap_rights_sysinit(void *arg); _Static_assert(CAP_RIGHTS_VERSION == CAP_RIGHTS_VERSION_00, "unsupported version of capsicum rights"); +#define cap_rights_init_zero(r) ({ \ + cap_rights_t *_r = (r); \ + CAP_NONE(_r); \ + _r; \ +}) + +#define cap_rights_init_one(r, right) ({ \ + CTASSERT(CAPRVER(right) == CAP_RIGHTS_VERSION); \ + cap_rights_t *_r = (r); \ + CAP_NONE(_r); \ + _r->cr_rights[CAPIDXBIT(right) - 1] |= right; \ + _r; \ +}) + +#define cap_rights_set_one(r, right) ({ \ + CTASSERT(CAPRVER(right) == CAP_RIGHTS_VERSION); \ + cap_rights_t *_r = (r); \ + _r->cr_rights[CAPIDXBIT(right) - 1] |= right; \ + _r; \ +}) + /* * Allow checking caps which are possibly getting modified at the same time. * The caller is expected to determine whether the result is legitimate via From owner-svn-src-all@freebsd.org Sat Feb 15 01:28:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE15E24A02F; Sat, 15 Feb 2020 01:28:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCLz57rvz4YZW; Sat, 15 Feb 2020 01:28:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABA665049; Sat, 15 Feb 2020 01:28:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1ShhL045612; Sat, 15 Feb 2020 01:28:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1SgRO045608; Sat, 15 Feb 2020 01:28:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150128.01F1SgRO045608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357951 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:28:43 -0000 Author: mjg Date: Sat Feb 15 01:28:42 2020 New Revision: 357951 URL: https://svnweb.freebsd.org/changeset/base/357951 Log: vfs: use new capsicum helpers Modified: head/sys/kern/vfs_acl.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_acl.c ============================================================================== --- head/sys/kern/vfs_acl.c Sat Feb 15 01:28:06 2020 (r357950) +++ head/sys/kern/vfs_acl.c Sat Feb 15 01:28:42 2020 (r357951) @@ -436,7 +436,7 @@ sys___acl_get_fd(struct thread *td, struct __acl_get_f AUDIT_ARG_FD(uap->filedes); error = getvnode(td, uap->filedes, - cap_rights_init(&rights, CAP_ACL_GET), &fp); + cap_rights_init_one(&rights, CAP_ACL_GET), &fp); if (error == 0) { error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); @@ -456,7 +456,7 @@ sys___acl_set_fd(struct thread *td, struct __acl_set_f AUDIT_ARG_FD(uap->filedes); error = getvnode(td, uap->filedes, - cap_rights_init(&rights, CAP_ACL_SET), &fp); + cap_rights_init_one(&rights, CAP_ACL_SET), &fp); if (error == 0) { error = vacl_set_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); @@ -512,7 +512,7 @@ sys___acl_delete_fd(struct thread *td, struct __acl_de AUDIT_ARG_FD(uap->filedes); error = getvnode(td, uap->filedes, - cap_rights_init(&rights, CAP_ACL_DELETE), &fp); + cap_rights_init_one(&rights, CAP_ACL_DELETE), &fp); if (error == 0) { error = vacl_delete(td, fp->f_vnode, uap->type); fdrop(fp, td); @@ -569,7 +569,7 @@ sys___acl_aclcheck_fd(struct thread *td, struct __acl_ AUDIT_ARG_FD(uap->filedes); error = getvnode(td, uap->filedes, - cap_rights_init(&rights, CAP_ACL_CHECK), &fp); + cap_rights_init_one(&rights, CAP_ACL_CHECK), &fp); if (error == 0) { error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Sat Feb 15 01:28:06 2020 (r357950) +++ head/sys/kern/vfs_extattr.c Sat Feb 15 01:28:42 2020 (r357951) @@ -243,7 +243,7 @@ sys_extattr_set_fd(struct thread *td, struct extattr_s AUDIT_ARG_TEXT(attrname); error = getvnode(td, uap->fd, - cap_rights_init(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); if (error) return (error); @@ -410,7 +410,7 @@ sys_extattr_get_fd(struct thread *td, struct extattr_g AUDIT_ARG_TEXT(attrname); error = getvnode(td, uap->fd, - cap_rights_init(&rights, CAP_EXTATTR_GET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_GET), &fp); if (error) return (error); @@ -545,7 +545,7 @@ sys_extattr_delete_fd(struct thread *td, struct extatt AUDIT_ARG_TEXT(attrname); error = getvnode(td, uap->fd, - cap_rights_init(&rights, CAP_EXTATTR_DELETE), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), &fp); if (error) return (error); @@ -691,7 +691,7 @@ sys_extattr_list_fd(struct thread *td, struct extattr_ AUDIT_ARG_FD(uap->fd); AUDIT_ARG_VALUE(uap->attrnamespace); error = getvnode(td, uap->fd, - cap_rights_init(&rights, CAP_EXTATTR_LIST), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_LIST), &fp); if (error) return (error); Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sat Feb 15 01:28:06 2020 (r357950) +++ head/sys/kern/vfs_lookup.c Sat Feb 15 01:28:42 2020 (r357951) @@ -440,7 +440,7 @@ namei(struct nameidata *ndp) } else { vrefact(ndp->ni_rootdir); rights = ndp->ni_rightsneeded; - cap_rights_set(&rights, CAP_LOOKUP); + cap_rights_set_one(&rights, CAP_LOOKUP); if (cnp->cn_flags & AUDITVNODE1) AUDIT_ARG_ATFD1(ndp->ni_dirfd); @@ -493,7 +493,7 @@ namei(struct nameidata *ndp) vrefact(ndp->ni_beneath_latch); } else { rights = ndp->ni_rightsneeded; - cap_rights_set(&rights, CAP_LOOKUP); + cap_rights_set_one(&rights, CAP_LOOKUP); error = fgetvp_rights(td, ndp->ni_dirfd, &rights, &dirfd_caps, &ndp->ni_beneath_latch); if (error == 0 && dp->v_type != VDIR) { @@ -1344,7 +1344,7 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long fl if (rightsp != NULL) ndp->ni_rightsneeded = *rightsp; else - cap_rights_init(&ndp->ni_rightsneeded); + cap_rights_init_zero(&ndp->ni_rightsneeded); } /* Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Feb 15 01:28:06 2020 (r357950) +++ head/sys/kern/vfs_syscalls.c Sat Feb 15 01:28:42 2020 (r357951) @@ -966,34 +966,34 @@ flags_to_rights(int flags, cap_rights_t *rightsp) { if (flags & O_EXEC) { - cap_rights_set(rightsp, CAP_FEXECVE); + cap_rights_set_one(rightsp, CAP_FEXECVE); } else { switch ((flags & O_ACCMODE)) { case O_RDONLY: - cap_rights_set(rightsp, CAP_READ); + cap_rights_set_one(rightsp, CAP_READ); break; case O_RDWR: - cap_rights_set(rightsp, CAP_READ); + cap_rights_set_one(rightsp, CAP_READ); /* FALLTHROUGH */ case O_WRONLY: - cap_rights_set(rightsp, CAP_WRITE); + cap_rights_set_one(rightsp, CAP_WRITE); if (!(flags & (O_APPEND | O_TRUNC))) - cap_rights_set(rightsp, CAP_SEEK); + cap_rights_set_one(rightsp, CAP_SEEK); break; } } if (flags & O_CREAT) - cap_rights_set(rightsp, CAP_CREATE); + cap_rights_set_one(rightsp, CAP_CREATE); if (flags & O_TRUNC) - cap_rights_set(rightsp, CAP_FTRUNCATE); + cap_rights_set_one(rightsp, CAP_FTRUNCATE); if (flags & (O_SYNC | O_FSYNC)) - cap_rights_set(rightsp, CAP_FSYNC); + cap_rights_set_one(rightsp, CAP_FSYNC); if (flags & (O_EXLOCK | O_SHLOCK)) - cap_rights_set(rightsp, CAP_FLOCK); + cap_rights_set_one(rightsp, CAP_FLOCK); } /* @@ -1048,7 +1048,7 @@ kern_openat(struct thread *td, int fd, const char *pat AUDIT_ARG_FFLAGS(flags); AUDIT_ARG_MODE(mode); - cap_rights_init(&rights, CAP_LOOKUP); + cap_rights_init_one(&rights, CAP_LOOKUP); flags_to_rights(flags, &rights); /* * Only one of the O_EXEC, O_RDONLY, O_WRONLY and O_RDWR flags @@ -3752,7 +3752,7 @@ kern_frmdirat(struct thread *td, int dfd, const char * fp = NULL; if (fd != FD_NONE) { - error = getvnode(td, fd, cap_rights_init(&rights, CAP_LOOKUP), + error = getvnode(td, fd, cap_rights_init_one(&rights, CAP_LOOKUP), &fp); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Sat Feb 15 01:28:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E47E24A090; Sat, 15 Feb 2020 01:28:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCMD35y8z4Yhw; Sat, 15 Feb 2020 01:28:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65B9E504B; Sat, 15 Feb 2020 01:28:56 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1Sul4045663; Sat, 15 Feb 2020 01:28:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1Su7F045662; Sat, 15 Feb 2020 01:28:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150128.01F1Su7F045662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357952 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:28:56 -0000 Author: mjg Date: Sat Feb 15 01:28:55 2020 New Revision: 357952 URL: https://svnweb.freebsd.org/changeset/base/357952 Log: fd: use new capsicum helpers Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Feb 15 01:28:42 2020 (r357951) +++ head/sys/kern/kern_descrip.c Sat Feb 15 01:28:55 2020 (r357952) @@ -3601,7 +3601,7 @@ export_file_to_kinfo(struct file *fp, int fd, cap_righ if (rightsp != NULL) kif->kf_cap_rights = *rightsp; else - cap_rights_init(&kif->kf_cap_rights); + cap_rights_init_zero(&kif->kf_cap_rights); kif->kf_fd = fd; kif->kf_ref_count = fp->f_count; kif->kf_offset = foffset_get(fp); @@ -3632,7 +3632,7 @@ export_vnode_to_kinfo(struct vnode *vp, int fd, int ff if (error == 0) kif->kf_status |= KF_ATTR_VALID; kif->kf_flags = xlate_fflags(fflags); - cap_rights_init(&kif->kf_cap_rights); + cap_rights_init_zero(&kif->kf_cap_rights); kif->kf_fd = fd; kif->kf_ref_count = -1; kif->kf_offset = -1; From owner-svn-src-all@freebsd.org Sat Feb 15 01:29:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3EF424A108; Sat, 15 Feb 2020 01:29:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCMR5KBPz4YqH; Sat, 15 Feb 2020 01:29:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1C30504D; Sat, 15 Feb 2020 01:29:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1T7bm045719; Sat, 15 Feb 2020 01:29:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1T7gU045718; Sat, 15 Feb 2020 01:29:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150129.01F1T7gU045718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357953 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 357953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:29:07 -0000 Author: mjg Date: Sat Feb 15 01:29:07 2020 New Revision: 357953 URL: https://svnweb.freebsd.org/changeset/base/357953 Log: vm: use new capsicum helpers Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 15 01:28:55 2020 (r357952) +++ head/sys/vm/vm_mmap.c Sat Feb 15 01:29:07 2020 (r357953) @@ -389,15 +389,15 @@ kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, * rights, but also return the maximum rights to be combined * with maxprot later. */ - cap_rights_init(&rights, CAP_MMAP); + cap_rights_init_one(&rights, CAP_MMAP); if (prot & PROT_READ) - cap_rights_set(&rights, CAP_MMAP_R); + cap_rights_set_one(&rights, CAP_MMAP_R); if ((flags & MAP_SHARED) != 0) { if (prot & PROT_WRITE) - cap_rights_set(&rights, CAP_MMAP_W); + cap_rights_set_one(&rights, CAP_MMAP_W); } if (prot & PROT_EXEC) - cap_rights_set(&rights, CAP_MMAP_X); + cap_rights_set_one(&rights, CAP_MMAP_X); error = fget_mmap(td, fd, &rights, &cap_maxprot, &fp); if (error != 0) goto done; From owner-svn-src-all@freebsd.org Sat Feb 15 01:29:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B26824A1FB; Sat, 15 Feb 2020 01:29:41 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCN528xhz4Yyq; Sat, 15 Feb 2020 01:29:41 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 455B85052; Sat, 15 Feb 2020 01:29:41 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1TfDY045784; Sat, 15 Feb 2020 01:29:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1Tfxs045783; Sat, 15 Feb 2020 01:29:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150129.01F1Tfxs045783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357954 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 357954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:29:41 -0000 Author: mjg Date: Sat Feb 15 01:29:40 2020 New Revision: 357954 URL: https://svnweb.freebsd.org/changeset/base/357954 Log: sctp: use new capsicum helpers Modified: head/sys/netinet/sctp_syscalls.c Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Sat Feb 15 01:29:07 2020 (r357953) +++ head/sys/netinet/sctp_syscalls.c Sat Feb 15 01:29:40 2020 (r357954) @@ -219,14 +219,14 @@ sys_sctp_generic_sendmsg (td, uap) u_sinfo = &sinfo; } - cap_rights_init(&rights, CAP_SEND); + cap_rights_init_one(&rights, CAP_SEND); if (uap->tolen != 0) { error = getsockaddr(&to, uap->to, uap->tolen); if (error != 0) { to = NULL; goto sctp_bad2; } - cap_rights_set(&rights, CAP_CONNECT); + cap_rights_set_one(&rights, CAP_CONNECT); } AUDIT_ARG_FD(uap->sd); @@ -332,14 +332,14 @@ sys_sctp_generic_sendmsg_iov(td, uap) return (error); u_sinfo = &sinfo; } - cap_rights_init(&rights, CAP_SEND); + cap_rights_init_one(&rights, CAP_SEND); if (uap->tolen != 0) { error = getsockaddr(&to, uap->to, uap->tolen); if (error != 0) { to = NULL; goto sctp_bad2; } - cap_rights_set(&rights, CAP_CONNECT); + cap_rights_set_one(&rights, CAP_CONNECT); } AUDIT_ARG_FD(uap->sd); From owner-svn-src-all@freebsd.org Sat Feb 15 01:29:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE03924A311; Sat, 15 Feb 2020 01:29:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCNQ5Grgz4Z7R; Sat, 15 Feb 2020 01:29:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B01285057; Sat, 15 Feb 2020 01:29:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1Tw4Y045844; Sat, 15 Feb 2020 01:29:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1TwX1045843; Sat, 15 Feb 2020 01:29:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150129.01F1TwX1045843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357955 - head/sys/compat/cloudabi X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/compat/cloudabi X-SVN-Commit-Revision: 357955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:29:58 -0000 Author: mjg Date: Sat Feb 15 01:29:58 2020 New Revision: 357955 URL: https://svnweb.freebsd.org/changeset/base/357955 Log: cloudabi: use new capsicum helpers Modified: head/sys/compat/cloudabi/cloudabi_file.c Modified: head/sys/compat/cloudabi/cloudabi_file.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_file.c Sat Feb 15 01:29:40 2020 (r357954) +++ head/sys/compat/cloudabi/cloudabi_file.c Sat Feb 15 01:29:58 2020 (r357955) @@ -214,7 +214,7 @@ cloudabi_sys_file_open(struct thread *td, fds.fs_rights_base | fds.fs_rights_inheriting, &rights); if (error != 0) return (error); - cap_rights_set(&rights, CAP_LOOKUP); + cap_rights_set_one(&rights, CAP_LOOKUP); /* Convert rights to corresponding access mode. */ read = (fds.fs_rights_base & (CLOUDABI_RIGHT_FD_READ | @@ -227,7 +227,7 @@ cloudabi_sys_file_open(struct thread *td, /* Convert open flags. */ if ((uap->oflags & CLOUDABI_O_CREAT) != 0) { fflags |= O_CREAT; - cap_rights_set(&rights, CAP_CREATE); + cap_rights_set_one(&rights, CAP_CREATE); } if ((uap->oflags & CLOUDABI_O_DIRECTORY) != 0) fflags |= O_DIRECTORY; @@ -235,7 +235,7 @@ cloudabi_sys_file_open(struct thread *td, fflags |= O_EXCL; if ((uap->oflags & CLOUDABI_O_TRUNC) != 0) { fflags |= O_TRUNC; - cap_rights_set(&rights, CAP_FTRUNCATE); + cap_rights_set_one(&rights, CAP_FTRUNCATE); } if ((fds.fs_flags & CLOUDABI_FDFLAG_APPEND) != 0) fflags |= O_APPEND; @@ -244,12 +244,12 @@ cloudabi_sys_file_open(struct thread *td, if ((fds.fs_flags & (CLOUDABI_FDFLAG_SYNC | CLOUDABI_FDFLAG_DSYNC | CLOUDABI_FDFLAG_RSYNC)) != 0) { fflags |= O_SYNC; - cap_rights_set(&rights, CAP_FSYNC); + cap_rights_set_one(&rights, CAP_FSYNC); } if ((uap->dirfd.flags & CLOUDABI_LOOKUP_SYMLINK_FOLLOW) == 0) fflags |= O_NOFOLLOW; if (write && (fflags & (O_APPEND | O_TRUNC)) == 0) - cap_rights_set(&rights, CAP_SEEK); + cap_rights_set_one(&rights, CAP_SEEK); /* Allocate new file descriptor. */ error = falloc_noinstall(td, &fp); From owner-svn-src-all@freebsd.org Sat Feb 15 01:30:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DACF24A381; Sat, 15 Feb 2020 01:30:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCNk2n67z4ZFs; Sat, 15 Feb 2020 01:30:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 595DC505B; Sat, 15 Feb 2020 01:30:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1UEPM045941; Sat, 15 Feb 2020 01:30:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1UEYb045940; Sat, 15 Feb 2020 01:30:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150130.01F1UEYb045940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357956 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:30:14 -0000 Author: mjg Date: Sat Feb 15 01:30:13 2020 New Revision: 357956 URL: https://svnweb.freebsd.org/changeset/base/357956 Log: kqueue: use new capsicum helpers Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sat Feb 15 01:29:58 2020 (r357955) +++ head/sys/kern/kern_event.c Sat Feb 15 01:30:13 2020 (r357956) @@ -1195,11 +1195,11 @@ kern_kevent(struct thread *td, int fd, int nchanges, i struct file *fp; int error; - cap_rights_init(&rights); + cap_rights_init_zero(&rights); if (nchanges > 0) - cap_rights_set(&rights, CAP_KQUEUE_CHANGE); + cap_rights_set_one(&rights, CAP_KQUEUE_CHANGE); if (nevents > 0) - cap_rights_set(&rights, CAP_KQUEUE_EVENT); + cap_rights_set_one(&rights, CAP_KQUEUE_EVENT); error = fget(td, fd, &rights, &fp); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Sat Feb 15 01:30:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A08524A3FE; Sat, 15 Feb 2020 01:30:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KCNz72HPz4ZNQ; Sat, 15 Feb 2020 01:30:27 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC8E4505D; Sat, 15 Feb 2020 01:30:27 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F1URcR045996; Sat, 15 Feb 2020 01:30:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F1URqG045994; Sat, 15 Feb 2020 01:30:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002150130.01F1URqG045994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 01:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357957 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 01:30:28 -0000 Author: mjg Date: Sat Feb 15 01:30:27 2020 New Revision: 357957 URL: https://svnweb.freebsd.org/changeset/base/357957 Log: capsicum: use new helpers Modified: head/sys/kern/subr_capability.c head/sys/kern/sys_capability.c Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Sat Feb 15 01:30:13 2020 (r357956) +++ head/sys/kern/subr_capability.c Sat Feb 15 01:30:27 2020 (r357957) @@ -103,50 +103,50 @@ __read_mostly cap_rights_t cap_no_rights; static void __cap_rights_sysinit1(void *arg) { - cap_rights_init(&cap_accept_rights, CAP_ACCEPT); - cap_rights_init(&cap_bind_rights, CAP_BIND); - cap_rights_init(&cap_connect_rights, CAP_CONNECT); - cap_rights_init(&cap_event_rights, CAP_EVENT); - cap_rights_init(&cap_fchdir_rights, CAP_FCHDIR); - cap_rights_init(&cap_fchflags_rights, CAP_FCHFLAGS); - cap_rights_init(&cap_fchmod_rights, CAP_FCHMOD); - cap_rights_init(&cap_fchown_rights, CAP_FCHOWN); - cap_rights_init(&cap_fcntl_rights, CAP_FCNTL); - cap_rights_init(&cap_fexecve_rights, CAP_FEXECVE); - cap_rights_init(&cap_flock_rights, CAP_FLOCK); - cap_rights_init(&cap_fpathconf_rights, CAP_FPATHCONF); - cap_rights_init(&cap_fstat_rights, CAP_FSTAT); - cap_rights_init(&cap_fstatfs_rights, CAP_FSTATFS); - cap_rights_init(&cap_fsync_rights, CAP_FSYNC); - cap_rights_init(&cap_ftruncate_rights, CAP_FTRUNCATE); - cap_rights_init(&cap_futimes_rights, CAP_FUTIMES); - cap_rights_init(&cap_getpeername_rights, CAP_GETPEERNAME); - cap_rights_init(&cap_getsockname_rights, CAP_GETSOCKNAME); - cap_rights_init(&cap_getsockopt_rights, CAP_GETSOCKOPT); - cap_rights_init(&cap_ioctl_rights, CAP_IOCTL); - cap_rights_init(&cap_linkat_source_rights, CAP_LINKAT_SOURCE); - cap_rights_init(&cap_linkat_target_rights, CAP_LINKAT_TARGET); - cap_rights_init(&cap_listen_rights, CAP_LISTEN); - cap_rights_init(&cap_mkdirat_rights, CAP_MKDIRAT); - cap_rights_init(&cap_mkfifoat_rights, CAP_MKFIFOAT); - cap_rights_init(&cap_mknodat_rights, CAP_MKNODAT); - cap_rights_init(&cap_mmap_rights, CAP_MMAP); - cap_rights_init(&cap_pdgetpid_rights, CAP_PDGETPID); - cap_rights_init(&cap_pdkill_rights, CAP_PDKILL); - cap_rights_init(&cap_pread_rights, CAP_PREAD); - cap_rights_init(&cap_pwrite_rights, CAP_PWRITE); - cap_rights_init(&cap_read_rights, CAP_READ); - cap_rights_init(&cap_recv_rights, CAP_RECV); - cap_rights_init(&cap_renameat_source_rights, CAP_RENAMEAT_SOURCE); - cap_rights_init(&cap_renameat_target_rights, CAP_RENAMEAT_TARGET); - cap_rights_init(&cap_seek_rights, CAP_SEEK); - cap_rights_init(&cap_send_rights, CAP_SEND); + cap_rights_init_one(&cap_accept_rights, CAP_ACCEPT); + cap_rights_init_one(&cap_bind_rights, CAP_BIND); + cap_rights_init_one(&cap_connect_rights, CAP_CONNECT); + cap_rights_init_one(&cap_event_rights, CAP_EVENT); + cap_rights_init_one(&cap_fchdir_rights, CAP_FCHDIR); + cap_rights_init_one(&cap_fchflags_rights, CAP_FCHFLAGS); + cap_rights_init_one(&cap_fchmod_rights, CAP_FCHMOD); + cap_rights_init_one(&cap_fchown_rights, CAP_FCHOWN); + cap_rights_init_one(&cap_fcntl_rights, CAP_FCNTL); + cap_rights_init_one(&cap_fexecve_rights, CAP_FEXECVE); + cap_rights_init_one(&cap_flock_rights, CAP_FLOCK); + cap_rights_init_one(&cap_fpathconf_rights, CAP_FPATHCONF); + cap_rights_init_one(&cap_fstat_rights, CAP_FSTAT); + cap_rights_init_one(&cap_fstatfs_rights, CAP_FSTATFS); + cap_rights_init_one(&cap_fsync_rights, CAP_FSYNC); + cap_rights_init_one(&cap_ftruncate_rights, CAP_FTRUNCATE); + cap_rights_init_one(&cap_futimes_rights, CAP_FUTIMES); + cap_rights_init_one(&cap_getpeername_rights, CAP_GETPEERNAME); + cap_rights_init_one(&cap_getsockname_rights, CAP_GETSOCKNAME); + cap_rights_init_one(&cap_getsockopt_rights, CAP_GETSOCKOPT); + cap_rights_init_one(&cap_ioctl_rights, CAP_IOCTL); + cap_rights_init_one(&cap_linkat_source_rights, CAP_LINKAT_SOURCE); + cap_rights_init_one(&cap_linkat_target_rights, CAP_LINKAT_TARGET); + cap_rights_init_one(&cap_listen_rights, CAP_LISTEN); + cap_rights_init_one(&cap_mkdirat_rights, CAP_MKDIRAT); + cap_rights_init_one(&cap_mkfifoat_rights, CAP_MKFIFOAT); + cap_rights_init_one(&cap_mknodat_rights, CAP_MKNODAT); + cap_rights_init_one(&cap_mmap_rights, CAP_MMAP); + cap_rights_init_one(&cap_pdgetpid_rights, CAP_PDGETPID); + cap_rights_init_one(&cap_pdkill_rights, CAP_PDKILL); + cap_rights_init_one(&cap_pread_rights, CAP_PREAD); + cap_rights_init_one(&cap_pwrite_rights, CAP_PWRITE); + cap_rights_init_one(&cap_read_rights, CAP_READ); + cap_rights_init_one(&cap_recv_rights, CAP_RECV); + cap_rights_init_one(&cap_renameat_source_rights, CAP_RENAMEAT_SOURCE); + cap_rights_init_one(&cap_renameat_target_rights, CAP_RENAMEAT_TARGET); + cap_rights_init_one(&cap_seek_rights, CAP_SEEK); + cap_rights_init_one(&cap_send_rights, CAP_SEND); cap_rights_init(&cap_send_connect_rights, CAP_SEND, CAP_CONNECT); - cap_rights_init(&cap_setsockopt_rights, CAP_SETSOCKOPT); - cap_rights_init(&cap_shutdown_rights, CAP_SHUTDOWN); - cap_rights_init(&cap_symlinkat_rights, CAP_SYMLINKAT); - cap_rights_init(&cap_unlinkat_rights, CAP_UNLINKAT); - cap_rights_init(&cap_write_rights, CAP_WRITE); + cap_rights_init_one(&cap_setsockopt_rights, CAP_SETSOCKOPT); + cap_rights_init_one(&cap_shutdown_rights, CAP_SHUTDOWN); + cap_rights_init_one(&cap_symlinkat_rights, CAP_SYMLINKAT); + cap_rights_init_one(&cap_unlinkat_rights, CAP_UNLINKAT); + cap_rights_init_one(&cap_write_rights, CAP_WRITE); cap_rights_init(&cap_no_rights); } SYSINIT(cap_rights1_sysinit, SI_SUB_COPYRIGHT, SI_ORDER_ANY, \ Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Sat Feb 15 01:30:13 2020 (r357956) +++ head/sys/kern/sys_capability.c Sat Feb 15 01:30:27 2020 (r357957) @@ -267,7 +267,7 @@ sys_cap_rights_limit(struct thread *td, struct cap_rig cap_rights_t rights; int error, version; - cap_rights_init(&rights); + cap_rights_init_zero(&rights); error = copyin(uap->rightsp, &rights, sizeof(rights.cr_rights[0])); if (error != 0) From owner-svn-src-all@freebsd.org Sat Feb 15 02:53:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE68A24C131; Sat, 15 Feb 2020 02:53:40 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KFF03w93z4dYW; Sat, 15 Feb 2020 02:53:40 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 818FE60FB; Sat, 15 Feb 2020 02:53:40 +0000 (UTC) (envelope-from jrm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01F2reGM098790; Sat, 15 Feb 2020 02:53:40 GMT (envelope-from jrm@FreeBSD.org) Received: (from jrm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F2remG098789; Sat, 15 Feb 2020 02:53:40 GMT (envelope-from jrm@FreeBSD.org) Message-Id: <202002150253.01F2remG098789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrm set sender to jrm@FreeBSD.org using -f From: Joseph Mingrone Date: Sat, 15 Feb 2020 02:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r357958 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: jrm X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 357958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 02:53:40 -0000 Author: jrm (ports committer) Date: Sat Feb 15 02:53:40 2020 New Revision: 357958 URL: https://svnweb.freebsd.org/changeset/base/357958 Log: Take in commit bit of Benno Rice (benno) for safe keeping Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Feb 15 01:30:27 2020 (r357957) +++ svnadmin/conf/access Sat Feb 15 02:53:40 2020 (r357958) @@ -39,7 +39,6 @@ bcran bde bdragon bdrewery -benno br brd brooks From owner-svn-src-all@freebsd.org Sat Feb 15 03:47:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE5DA24CD92; Sat, 15 Feb 2020 03:47:27 +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) server-signature RSA-PSS (4096 bits) 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 48KGR34r9Dz3CXH; Sat, 15 Feb 2020 03:47:27 +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 A06BD6AD5; Sat, 15 Feb 2020 03:47:27 +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 01F3lRPE030106; Sat, 15 Feb 2020 03:47:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01F3lPBZ030094; Sat, 15 Feb 2020 03:47:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202002150347.01F3lPBZ030094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 15 Feb 2020 03:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357959 - in head/sys/contrib/dev/acpica: . common compiler components/events components/hardware components/namespace components/tables components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/events components/hardware components/namespace components/tables components/utilities include X-SVN-Commit-Revision: 357959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 03:47:27 -0000 Author: jkim Date: Sat Feb 15 03:47:25 2020 New Revision: 357959 URL: https://svnweb.freebsd.org/changeset/base/357959 Log: MFV: r357927 Merge ACPICA 20200214. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslparseop.c head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/cvparser.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/include/acconvert.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actypes.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/changes.txt Sat Feb 15 03:47:25 2020 (r357959) @@ -1,4 +1,102 @@ ---------------------------------------- +14 February 2020. Summary of changes for version 20200214: + + +1) ACPICA kernel-resident subsystem: + +Enable sleep button on ACPI legacy wake: Hibernation (S4) is triggered +in a guest when it receives a sleep trigger from the hypervisor. When the +guest resumes from this power state, it does not see the SleepEnabled +bit. In other words, the sleepHibernation (S4) is triggered in a guest +when it receives a sleep trigger from the hypervisor. When the guest +resumes from this power state, it does not see the SleepEnabled bit. In +other words, the sleep button is not enabled on waking from an S4 state. +This causes subsequent invocation of sleep state to fail since the +guest.button is not enabled on waking from an S4 state. This causes +subsequent invocation of sleep state to fail in the guest. Fix this +problem by enabling the sleep button in ACPI legacy wake. From Anchal +Agarwal . + +Implemented a new external interface, AcpiAnyGpeStatusSet (). To be used +for checking the status bits of all enabled GPEs in one go. It is needed +to distinguish spurious SCIs from genuine ones when deciding whether or +not to wake up the system from suspend-to-idle. + +Generic Makefiles: replace HOST name with ACPI_HOST: Some machines may be +using HOST in their environment to represent the host name for their +machines. Avoid this problem by renaming this variable from HOST to +ACPI_HOST. + +MSVC 2017 project files: Enable multiprocessor generation to improve +build performance. + +Added a macro to get the byte width of a Generic Address structure. New +ACPI_ACCESS_BYTE_WIDTH is in addition to the existing +ACPI_ACCESS_BIT_WIDTH. From Mika Westerberg. + + +2) iASL Compiler/Disassembler and ACPICA tools: + +iASL: Implemented full support for the (optional, rarely used) ReturnType +and ParameterTypesList for the Method, Function, and External operators. +For Method declarations, the number of individual ParameterTypes must +match the declaration of the number of arguments (NumArgs). This also +Fixes a problem with the External operator where extra/extraneous bytes +were emitted in the AML code if the optional ReturnType/ParameterTypes +were specified for a MethodObj declaration. +New error message: +1) Method NumArgs count does not match length of ParameterTypes list + +iASL: Implemented detection of type mismatches between External +declarations and named object declarations. Also, detect type mismatches +between multiple External declarations of the same Name. +New error messages: +1) Type mismatch between external declaration and actual object +declaration detected +2) Type mismatch between multiple external declarations detected + +iASL: Implemented new error messages for External operators that specify +a ReturnType and/or ParameterTypesList for any object type other than +control methods (MethodObj). +New error messages: +1) Return type is only allowed for Externals declared as MethodObj +2) Parameter type is only allowed for Externals declared as MethodObj + +iASL: Implemented two new remark/warning messages for ASL code that +creates named objects from within a control method. This is very +inefficient since the named object must be created and deleted each time +the method is executed. +New messages: +1) Creation of named objects within a method is highly inefficient, use +globals or method local variables instead (remark) +2) Static OperationRegion should be declared outside control method +(warning) + +iASL: Improved illegal forward reference detection by adding support to +detect forward-reference method invocations. + +iASL: Detect and issue an error message for NameStrings that contain too +many individual NameSegs (>255). This is an AML limitation that is +defined in the ACPI specification. +New message: +1) NameString contains too many NameSegs (>255) + +acpidump: windows: use GetSystemFirmwareTable API for all tables except +SSDT. By using this API, acpidump is able to get all tables in the XSDT + +iASL: Removed unused parser file and updated msvc2017 project files. +Removed the obsolete AslCompiler.y from the repository. + +iASL: msvc2017: Fixed macros in the file dependency list to prevent +unnecessary rebuilds. Replace %(Directory) with %(RelativeDir). + +Disassembler: Prevent spilling error messages to the output file. All +errors are directed to the console instead. These error messages +prevented re-compilation of the resulting disassembled ASL output file +(.DSL). + + +---------------------------------------- 10 January 2020. Summary of changes for version 20200110: @@ -8845,8 +8943,8 @@ much larger code and data size. Fix build error under Bison-2.4. -Dissasembler: Enhanced FADT support. Added decoding of the Boot -Architecture +Disassembler: Enhanced FADT support. Added decoding of the Boot +Architecture flags. Now decode all flags, regardless of the FADT version. Flag output includes the FADT version which first defined each flag. Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/common/adisasm.c Sat Feb 15 03:47:25 2020 (r357959) @@ -156,6 +156,7 @@ #include #include #include +#include #define _COMPONENT ACPI_TOOLS @@ -379,8 +380,6 @@ AdAmlDisassemble ( Status = AE_ERROR; goto Cleanup; } - - AcpiOsRedirectOutput (File); } *OutFilename = DisasmFilename; @@ -467,6 +466,11 @@ AdDisassembleOneTable ( if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) { + if (File) + { + AcpiOsRedirectOutput (File); + } + AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE); /* This is a "Data Table" (non-AML table) */ @@ -489,6 +493,10 @@ AdDisassembleOneTable ( return (AE_OK); } + /* Initialize the converter output file */ + + ASL_CV_INIT_FILETREE(Table, File); + /* * This is an AML table (DSDT or SSDT). * Always parse the tables, only option is what to display @@ -499,6 +507,13 @@ AdDisassembleOneTable ( AcpiOsPrintf ("Could not parse ACPI tables, %s\n", AcpiFormatException (Status)); return (Status); + } + + /* Redirect output for code generation and debugging output */ + + if (File) + { + AcpiOsRedirectOutput (File); } /* Debug output, namespace and parse tree */ Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/common/dmtables.c Sat Feb 15 03:47:25 2020 (r357959) @@ -506,7 +506,6 @@ AdParseTable ( AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); - ASL_CV_INIT_FILETREE(Table, AmlStart, AmlLength); AcpiUtSetIntegerWidth (Table->Revision); Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Sat Feb 15 03:47:25 2020 (r357959) @@ -151,6 +151,7 @@ #include #include "aslcompiler.y.h" +#include #include @@ -421,6 +422,7 @@ AnCheckMethodReturnValue ( { ACPI_PARSE_OBJECT *OwningOp; ACPI_NAMESPACE_NODE *Node; + char *ExternalPath; Node = ArgOp->Asl.Node; @@ -435,18 +437,19 @@ AnCheckMethodReturnValue ( /* Examine the parent op of this method */ OwningOp = Node->Op; + ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE); + if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL) { /* Method NEVER returns a value */ - AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName); + AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, ExternalPath); } else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL) { /* Method SOMETIMES returns a value, SOMETIMES not */ - AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, - Op, Op->Asl.ExternalName); + AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, Op, ExternalPath); } else if (!(ThisNodeBtype & RequiredBtypes)) { @@ -469,6 +472,11 @@ AnCheckMethodReturnValue ( AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer); } + } + + if (ExternalPath) + { + ACPI_FREE (ExternalPath); } } Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Sat Feb 15 03:47:25 2020 (r357959) @@ -647,7 +647,7 @@ void AslCompilerFileHeader ( UINT32 FileId) { - struct tm *NewTime; + char *NewTime; time_t Aclock; char *Prefix = ""; @@ -691,13 +691,17 @@ AslCompilerFileHeader ( /* Compilation header with timestamp */ - (void) time (&Aclock); - NewTime = localtime (&Aclock); + Aclock = time (NULL); + NewTime = ctime (&Aclock); FlPrintFile (FileId, - "%sCompilation of \"%s\" - %s%s\n", - Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime), - Prefix); + "%sCompilation of \"%s\" -", + Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename); + + if (NewTime) + { + FlPrintFile (FileId, " %s%s\n", NewTime, Prefix); + } switch (FileId) { Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Sat Feb 15 03:47:25 2020 (r357959) @@ -373,7 +373,16 @@ MtMethodAnalysisWalkEnd ( UINT32 Level, void *Context); +UINT32 +MtProcessTypeOp ( + ACPI_PARSE_OBJECT *TypeOp); +UINT8 +MtProcessParameterTypeList ( + ACPI_PARSE_OBJECT *ParamTypeOp, + UINT32 *TypeList); + + /* * aslbtypes - bitfield data types */ @@ -1233,9 +1242,13 @@ UtDumpBasicOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level); -void * -UtGetParentMethod ( +ACPI_NAMESPACE_NODE * +UtGetParentMethodNode ( ACPI_NAMESPACE_NODE *Node); + +ACPI_PARSE_OBJECT * +UtGetParentMethodOp ( + ACPI_PARSE_OBJECT *Op); BOOLEAN UtNodeIsDescendantOf ( Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Feb 15 03:47:25 2020 (r357959) @@ -192,12 +192,54 @@ ExDoExternal ( ACPI_PARSE_OBJECT *Prev; ACPI_PARSE_OBJECT *Next; ACPI_PARSE_OBJECT *ArgCountOp; + ACPI_PARSE_OBJECT *TypeOp; + ACPI_PARSE_OBJECT *ExternTypeOp = Op->Asl.Child->Asl.Next; + UINT32 ExternType; + UINT8 ParamCount = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS; + UINT32 ParamTypes[ACPI_METHOD_NUM_ARGS]; + ExternType = AnMapObjTypeToBtype (ExternTypeOp); + + /* + * The parser allows optional parameter return types regardless of the + * type. Check object type keyword emit error if optional parameter/return + * types exist. + * + * Check the parameter return type + */ + TypeOp = ExternTypeOp->Asl.Next; + if (TypeOp->Asl.Child) + { + /* Ignore the return type for now. */ + + (void) MtProcessTypeOp (TypeOp->Asl.Child); + if (ExternType != ACPI_BTYPE_METHOD) + { + sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType)); + AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_RET_TYPE, TypeOp, + AslGbl_MsgBuffer); + } + } + + /* Check the parameter types */ + + TypeOp = TypeOp->Asl.Next; + if (TypeOp->Asl.Child) + { + ParamCount = MtProcessParameterTypeList (TypeOp->Asl.Child, ParamTypes); + if (ExternType != ACPI_BTYPE_METHOD) + { + sprintf (AslGbl_MsgBuffer, "Found type [%s]", AcpiUtGetTypeName(ExternType)); + AslError (ASL_ERROR, ASL_MSG_EXTERN_INVALID_PARAM_TYPE, TypeOp, + AslGbl_MsgBuffer); + } + } + ArgCountOp = Op->Asl.Child->Asl.Next->Asl.Next; ArgCountOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE; ArgCountOp->Asl.ParseOpcode = PARSEOP_BYTECONST; - ArgCountOp->Asl.Value.Integer = 0; + ArgCountOp->Asl.Value.Integer = ParamCount; UtSetParseOpName (ArgCountOp); /* Create new list node of arbitrary type */ Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Sat Feb 15 03:47:25 2020 (r357959) @@ -196,6 +196,15 @@ LdCheckSpecialNames ( ACPI_NAMESPACE_NODE *Node, ACPI_PARSE_OBJECT *Op); +static ACPI_STATUS +LdAnalyzeExternals ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op, + ACPI_OBJECT_TYPE ExternalOpType, + ACPI_OBJECT_TYPE ObjectType, + ACPI_WALK_STATE *WalkState); + + /******************************************************************************* * * FUNCTION: LdLoadNamespace @@ -575,7 +584,8 @@ LdNamespace1Begin ( /* Check for a possible illegal forward reference */ if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) || - (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING)) + (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) || + (Op->Asl.ParseOpcode == PARSEOP_METHODCALL)) { /* * Op->Asl.Namepath will be NULL for these opcodes. @@ -591,7 +601,8 @@ LdNamespace1Begin ( * We only want references to named objects: * Store (2, WXYZ) -> Attempt to resolve the name */ - if (OpInfo->Class == AML_CLASS_NAMED_OBJECT) + if ((Op->Asl.ParseOpcode != PARSEOP_METHODCALL) && + (OpInfo->Class == AML_CLASS_NAMED_OBJECT)) { return (AE_OK); } @@ -899,58 +910,26 @@ LdNamespace1Begin ( Node->Type = (UINT8) ObjectType; Status = AE_OK; } - else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)) + else if ((Node->Flags & ANOBJ_IS_EXTERNAL) || + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) { - /* - * Allow one create on an object or segment that was - * previously declared External - */ - Node->Flags &= ~ANOBJ_IS_EXTERNAL; - Node->Type = (UINT8) ObjectType; - - /* Just retyped a node, probably will need to open a scope */ - - if (AcpiNsOpensScope (ObjectType)) + Status = LdAnalyzeExternals (Node, Op, ActualObjectType, + ObjectType, WalkState); + if (ACPI_FAILURE (Status)) { - Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState); - if (ACPI_FAILURE (Status)) + if (Status == AE_ERROR) { - return_ACPI_STATUS (Status); + /* + * The use of AE_ERROR here indicates that there was a + * compiler error emitted in LdAnalyzeExternals which + * means that the caller should proceed to the next Op + * for analysis of subsequent parse objects. + */ + Status = AE_OK; } + return_ACPI_STATUS (Status); } - - Status = AE_OK; } - else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) - { - /* - * Allow externals in same scope as the definition of the - * actual object. Similar to C. Allows multiple definition - * blocks that refer to each other in the same file. - */ - Status = AE_OK; - } - else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && - (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - (ObjectType == ACPI_TYPE_ANY)) - { - /* Allow update of externals of unknown type. */ - - if (AcpiNsOpensScope (ActualObjectType)) - { - Node->Type = (UINT8) ActualObjectType; - Status = AE_OK; - } - else - { - sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName, - AcpiUtGetTypeName (Node->Type)); - AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer); - return_ACPI_STATUS (AE_OK); - } - } else { /* Valid error, object already exists */ @@ -1013,15 +992,17 @@ FinishNode: * Set the actual data type if appropriate (EXTERNAL term only) * As of 11/19/2019, ASL External() does not support parameter * counts. When an External method is loaded, the parameter count is - * unknown setting Node->Value to ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS - * indicates that the parameter count for this method is unknown. - * This information is used in ASL cross reference to help determine the - * parameter count through method calls. + * recorded in the external's arg count parameter. The parameter count may + * or may not be known in the declaration. If the value of this node turns + * out to be ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS, it indicates that + * we do not know the parameter count and that we must look at the usage of + * the External method call to get this information. */ if (ActualObjectType != ACPI_TYPE_ANY) { Node->Type = (UINT8) ActualObjectType; - Node->Value = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS; + Node->Value = (UINT32) + Op->Asl.Child->Asl.Next->Asl.Next->Asl.Value.Integer; } if (Op->Asl.ParseOpcode == PARSEOP_METHOD) @@ -1034,6 +1015,145 @@ FinishNode: } return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: LdAnalyzeExternals + * + * PARAMETERS: Node - Node that represents the named object + * Op - Named object declaring this named object + * ExternalOpType - Type of ExternalOp + * ObjectType - Type of Declared object + * WalkState - Current WalkState + * + * RETURN: Status + * + * DESCRIPTION: Node and Op represents an identically named object declaration + * that is either declared by the ASL external keyword or declared + * by operators that declare named objects (i.e. Name, Device, + * OperationRegion, and etc.). This function ensures that the + * declarations do not contradict each other. + * + ******************************************************************************/ + +static ACPI_STATUS +LdAnalyzeExternals ( + ACPI_NAMESPACE_NODE *Node, + ACPI_PARSE_OBJECT *Op, + ACPI_OBJECT_TYPE ExternalOpType, + ACPI_OBJECT_TYPE ObjectType, + ACPI_WALK_STATE *WalkState) +{ + ACPI_STATUS Status = AE_OK; + ACPI_OBJECT_TYPE ActualExternalOpType; + ACPI_OBJECT_TYPE ActualOpType; + ACPI_PARSE_OBJECT *ExternalOp; + ACPI_PARSE_OBJECT *ActualOp; + + + /* + * The declaration represented by Node and Op must have the same type. + * The type of the external Op is represented by ExternalOpType. However, + * the type of the pre-existing declaration depends on whether if Op + * is an external declaration or an actual declaration. + */ + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) + { + ActualExternalOpType = ExternalOpType; + ActualOpType = Node->Type; + } + else + { + ActualExternalOpType = Node->Type; + ActualOpType = ObjectType; + } + + if ((ActualOpType != ACPI_TYPE_ANY) && + (ActualExternalOpType != ACPI_TYPE_ANY) && + (ActualExternalOpType != ActualOpType)) + { + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL && + Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) + { + AslDualParseOpError (ASL_ERROR, + ASL_MSG_DUPLICATE_EXTERN_MISMATCH, Op, NULL, + ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, Node->Op, NULL); + } + else + { + if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL && + Node->Op->Asl.ParseOpcode != PARSEOP_EXTERNAL) + { + ExternalOp = Op; + ActualOp = Node->Op; + } + else + { + ExternalOp = Node->Op; + ActualOp = Op; + } + AslDualParseOpError (ASL_ERROR, + ASL_MSG_DECLARATION_TYPE_MISMATCH, ExternalOp, NULL, + ASL_MSG_TYPE_MISMATCH_FOUND_HERE, ActualOp, NULL); + } + } + + if ((Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL)) + { + /* + * Allow one create on an object or segment that was + * previously declared External + */ + Node->Flags &= ~ANOBJ_IS_EXTERNAL; + Node->Type = (UINT8) ObjectType; + + /* Just retyped a node, probably will need to open a scope */ + + if (AcpiNsOpensScope (ObjectType)) + { + Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + + Status = AE_OK; + } + else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) + { + /* + * Allow externals in same scope as the definition of the + * actual object. Similar to C. Allows multiple definition + * blocks that refer to each other in the same file. + */ + Status = AE_OK; + } + else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && + (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && + (ObjectType == ACPI_TYPE_ANY)) + { + /* Allow update of externals of unknown type. */ + + if (AcpiNsOpensScope (ExternalOpType)) + { + Node->Type = (UINT8) ExternalOpType; + Status = AE_OK; + } + else + { + sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName, + AcpiUtGetTypeName (Node->Type)); + AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer); + Status = AE_ERROR; + } + } + + return (Status); } Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Sat Feb 15 03:47:25 2020 (r357959) @@ -320,7 +320,7 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator", /* ASL_MSG_SEEK */ "Could not seek file", /* ASL_MSG_SERIALIZED */ "Control Method marked Serialized", -/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized", +/* ASL_MSG_SERIALIZED_REQUIRED */ "Control Method should be made Serialized due to creation of named objects within", /* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)", /* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value", /* ASL_MSG_STRING_LENGTH */ "String literal too long", @@ -370,7 +370,16 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_INVALID_PROCESSOR_UID */ "_UID inside processor declaration must be an integer", /* ASL_MSG_LEGACY_PROCESSOR_OP */ "Legacy Processor() keyword detected. Use Device() keyword instead.", /* ASL_MSG_NAMESTRING_LENGTH */ "NameString contains too many NameSegs (>255)", -/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:" +/* ASL_MSG_CASE_FOUND_HERE */ "Original Case value below:", +/* ASL_MSG_EXTERN_INVALID_RET_TYPE */ "Return type is only allowed for Externals declared as MethodObj", +/* ASL_MSG_EXTERN_INVALID_PARAM_TYPE */ "Parameter type is only allowed for Externals declared as MethodObj", +/* ASL_MSG_NAMED_OBJECT_CREATION */ "Creation of named objects within a method is highly inefficient, use globals or method local variables instead", +/* ASL_MSG_ARG_COUNT_MISMATCH */ "Method NumArgs count does not match length of ParameterTypes list", +/* ASL_MSG_STATIC_OPREGION_IN_METHOD */ "Static OperationRegion should be declared outside control method", +/* ASL_MSG_DECLARATION_TYPE_MISMATCH */ "Type mismatch between external declaration and actual object declaration detected", +/* ASL_MSG_TYPE_MISMATCH_FOUND_HERE */ "Actual object declaration:", +/* ASL_MSG_DUPLICATE_EXTERN_MISMATCH */ "Type mismatch between multiple external declarations detected", +/* ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE */"Duplicate external declaration:", }; /* Table compiler */ Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Sat Feb 15 03:47:25 2020 (r357959) @@ -373,6 +373,16 @@ typedef enum ASL_MSG_LEGACY_PROCESSOR_OP, ASL_MSG_NAMESTRING_LENGTH, ASL_MSG_CASE_FOUND_HERE, + ASL_MSG_EXTERN_INVALID_RET_TYPE, + ASL_MSG_EXTERN_INVALID_PARAM_TYPE, + ASL_MSG_NAMED_OBJECT_CREATION, + ASL_MSG_ARG_COUNT_MISMATCH, + ASL_MSG_STATIC_OPREGION_IN_METHOD, + ASL_MSG_DECLARATION_TYPE_MISMATCH, + ASL_MSG_TYPE_MISMATCH_FOUND_HERE, + ASL_MSG_DUPLICATE_EXTERN_MISMATCH, + ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, + /* These messages are used by the Data Table compiler only */ Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Feb 15 02:53:40 2020 (r357958) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Feb 15 03:47:25 2020 (r357959) @@ -151,6 +151,7 @@ #include #include "aslcompiler.y.h" +#include #include #include @@ -166,7 +167,11 @@ MtCheckNamedObjectInMethod ( ACPI_PARSE_OBJECT *Op, ASL_METHOD_INFO *MethodInfo); +static void +MtCheckStaticOperationRegionInMethod ( + ACPI_PARSE_OBJECT *Op); + /******************************************************************************* * * FUNCTION: MtMethodAnalysisWalkBegin @@ -197,7 +202,6 @@ MtMethodAnalysisWalkBegin ( char ArgName[] = "Arg0"; ACPI_PARSE_OBJECT *ArgNode; ACPI_PARSE_OBJECT *NextType; - ACPI_PARSE_OBJECT *NextParamType; UINT8 ActualArgs = 0; BOOLEAN HidExists; BOOLEAN AdrExists; @@ -282,50 +286,35 @@ MtMethodAnalysisWalkBegin ( Next = Next->Asl.Next; NextType = Next->Asl.Child; - while (NextType) - { - /* Get and map each of the ReturnTypes */ - MethodInfo->ValidReturnTypes |= AnMapObjTypeToBtype (NextType); - NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - NextType = NextType->Asl.Next; - } + MethodInfo->ValidReturnTypes = MtProcessTypeOp (NextType); /* Get the ParameterType node */ Next = Next->Asl.Next; NextType = Next->Asl.Child; - while (NextType) + if (!NextType) { - if (NextType->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) - { - NextParamType = NextType->Asl.Child; - while (NextParamType) - { - MethodInfo->ValidArgTypes[ActualArgs] |= - AnMapObjTypeToBtype (NextParamType); - - NextParamType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - NextParamType = NextParamType->Asl.Next; - } - } - else - { - MethodInfo->ValidArgTypes[ActualArgs] = - AnMapObjTypeToBtype (NextType); - - NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; - ActualArgs++; - } - - NextType = NextType->Asl.Next; + /* + * The optional parameter types list was omitted at the source + * level. Use the Argument count parameter instead. + */ + ActualArgs = MethodInfo->NumArguments; } + else + { + ActualArgs = MtProcessParameterTypeList (NextType, + MethodInfo->ValidArgTypes); + } if ((MethodInfo->NumArguments) && (MethodInfo->NumArguments != ActualArgs)) { - /* error: Param list did not match number of args */ + sprintf (AslGbl_MsgBuffer, + "Length = %u", ActualArgs); + AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_MISMATCH, + Op->Asl.Child->Asl.Next, AslGbl_MsgBuffer); } /* Allow numarguments == 0 for Function() */ @@ -576,6 +565,8 @@ MtMethodAnalysisWalkBegin ( AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName); } + + MtCheckStaticOperationRegionInMethod (Op); break; case PARSEOP_NAME: @@ -630,6 +621,71 @@ MtMethodAnalysisWalkBegin ( /******************************************************************************* * + * FUNCTION: MtProcessTypeOp + * + * PARAMETERS: Op - Op representing a btype + * + * RETURN: Btype represented by Op + * + * DESCRIPTION: Process a parse object that represents single parameter type or + * a return type in method, function, and external declarations. + * + ******************************************************************************/ + +UINT32 +MtProcessTypeOp ( + ACPI_PARSE_OBJECT *TypeOp) +{ + UINT32 Btype = ACPI_BTYPE_ANY; + + + while (TypeOp) + { + Btype |= AnMapObjTypeToBtype (TypeOp); + TypeOp->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + TypeOp = TypeOp->Asl.Next; + } + + return (Btype); +} + + +/******************************************************************************* + * + * FUNCTION: MtProcessParameterTypeList + * + * PARAMETERS: Op - Op representing a btype + * + * RETURN: Btype represented by Op + * + * DESCRIPTION: Process a parse object that represents a parameter type list in + * method, function, and external declarations. + * + ******************************************************************************/ + +UINT8 +MtProcessParameterTypeList ( + ACPI_PARSE_OBJECT *ParamTypeOp, + UINT32 *TypeList) +{ + UINT8 ParameterCount = 0; + + + while (ParamTypeOp) + { + TypeList[ParameterCount] = + MtProcessTypeOp (ParamTypeOp->Asl.Child); + + ParameterCount++; + ParamTypeOp = ParamTypeOp->Asl.Next; + } + + return (ParameterCount); +} + + +/******************************************************************************* + * * FUNCTION: MtCheckNamedObjectInMethod * * PARAMETERS: Op - Current parser op @@ -649,6 +705,7 @@ MtCheckNamedObjectInMethod ( ASL_METHOD_INFO *MethodInfo) { const ACPI_OPCODE_INFO *OpInfo; + char *ExternalPath; /* We don't care about actual method declarations or scopes */ @@ -672,29 +729,99 @@ MtCheckNamedObjectInMethod ( /* * 1) Mark the method as a method that creates named objects. * - * 2) If the method is non-serialized, emit a remark that the method + * 2) Issue a remark indicating the inefficiency of creating named + * objects within a method (Except for compiler-emitted temporary + * variables). + * + * 3) If the method is non-serialized, emit a remark that the method * should be serialized. * * Reason: If a thread blocks within the method for any reason, and * another thread enters the method, the method will fail because * an attempt will be made to create the same object twice. */ + ExternalPath = AcpiNsGetNormalizedPathname (MethodInfo->Op->Asl.Node, TRUE); + + /* No error for compiler temp variables (name starts with "_T_") */ + + if ((Op->Asl.NameSeg[0] != '_') && + (Op->Asl.NameSeg[1] != 'T') && + (Op->Asl.NameSeg[2] != '_')) + { + AslError (ASL_REMARK, ASL_MSG_NAMED_OBJECT_CREATION, Op, + ExternalPath); + } + MethodInfo->CreatesNamedObjects = TRUE; if (!MethodInfo->ShouldBeSerialized) { AslError (ASL_REMARK, ASL_MSG_SERIALIZED_REQUIRED, MethodInfo->Op, - "due to creation of named objects within"); + ExternalPath); /* Emit message only ONCE per method */ MethodInfo->ShouldBeSerialized = TRUE; } + + if (ExternalPath) + { + ACPI_FREE (ExternalPath); + } } } /******************************************************************************* * + * FUNCTION: MtCheckStaticOperationRegionInMethod + * + * PARAMETERS: Op - Current parser op + * + * RETURN: None + * + * DESCRIPTION: Warns if an Operation Region with static address or length + * is declared inside a control method + * + ******************************************************************************/ + +static void +MtCheckStaticOperationRegionInMethod( + ACPI_PARSE_OBJECT* Op) +{ + ACPI_PARSE_OBJECT* AddressOp; + ACPI_PARSE_OBJECT* LengthOp; + + + if (Op->Asl.ParseOpcode != PARSEOP_OPERATIONREGION) + { + return; + } + + /* + * OperationRegion should have 4 arguments defined. At this point, we + * assume that the parse tree is well-formed. + */ + AddressOp = Op->Asl.Child->Asl.Next->Asl.Next; + LengthOp = Op->Asl.Child->Asl.Next->Asl.Next->Asl.Next; + + if (UtGetParentMethodOp (Op) && + AddressOp->Asl.ParseOpcode == PARSEOP_INTEGER && + LengthOp->Asl.ParseOpcode == PARSEOP_INTEGER) + { + /* + * At this point, a static operation region declared inside of a + * control method has been found. Throw a warning because this is + * highly inefficient. + */ + AslError(ASL_WARNING, ASL_MSG_STATIC_OPREGION_IN_METHOD, Op, NULL); + } + + return; +} + + +/******************************************************************************* + * * FUNCTION: MtMethodAnalysisWalkEnd * * PARAMETERS: ASL_WALK_CALLBACK @@ -714,6 +841,7 @@ MtMethodAnalysisWalkEnd ( { ASL_ANALYSIS_WALK_INFO *WalkInfo = (ASL_ANALYSIS_WALK_INFO *) Context; ASL_METHOD_INFO *MethodInfo = WalkInfo->MethodStack; + char *ExternalPath; switch (Op->Asl.ParseOpcode) @@ -766,8 +894,15 @@ MtMethodAnalysisWalkEnd ( if (MethodInfo->NumReturnNoValue && MethodInfo->NumReturnWithValue) { + ExternalPath = AcpiNsGetNormalizedPathname (Op->Asl.Node, TRUE); + AslError (ASL_WARNING, ASL_MSG_RETURN_TYPES, Op, - Op->Asl.ExternalName); + ExternalPath); + + if (ExternalPath) + { + ACPI_FREE (ExternalPath); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 15 11:42:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 321AF257EB4; Sat, 15 Feb 2020 11:42:14 +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) server-signature RSA-PSS (4096 bits) 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 48KSyt0Bygz48fB; Sat, 15 Feb 2020 11:42:14 +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 01E36C4B4; Sat, 15 Feb 2020 11:42:14 +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 01FBgDID016982; Sat, 15 Feb 2020 11:42:13 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FBgDoX016980; Sat, 15 Feb 2020 11:42:13 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202002151142.01FBgDoX016980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sat, 15 Feb 2020 11:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357960 - in stable/12: share/man/man4 sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/netmap X-SVN-Commit-Revision: 357960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 11:42:14 -0000 Author: vmaffione Date: Sat Feb 15 11:42:13 2020 New Revision: 357960 URL: https://svnweb.freebsd.org/changeset/base/357960 Log: MFC r357663 netmap: improve netmap(4) and vale(4) man pages Clean up obsolete sysctl descriptions and add missing ones. PR: 243838 Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D23546 Modified: stable/12/share/man/man4/netmap.4 stable/12/share/man/man4/vale.4 stable/12/sys/dev/netmap/netmap_kern.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/netmap.4 ============================================================================== --- stable/12/share/man/man4/netmap.4 Sat Feb 15 03:47:25 2020 (r357959) +++ stable/12/share/man/man4/netmap.4 Sat Feb 15 11:42:13 2020 (r357960) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2019 +.Dd February 6, 2020 .Dt NETMAP 4 .Os .Sh NAME @@ -694,7 +694,7 @@ or are called with a write event (POLLOUT/wfdset) or a full ring. .Pp When registering a virtual interface that is dynamically created to a -.Xr vale 4 +.Nm VALE switch, we can specify the desired number of rings (1 by default, and currently up to 16) on it using nr_tx_rings and nr_rx_rings fields. .It Dv NIOCTXSYNC @@ -861,8 +861,10 @@ The sysctl variable .Va dev.netmap.admode globally controls how netmap mode is implemented. .Sh SYSCTL VARIABLES AND MODULE PARAMETERS -Some aspect of the operation of +Some aspects of the operation of .Nm +and +.Nm VALE are controlled through sysctl variables on .Fx .Em ( dev.netmap.* ) @@ -883,15 +885,14 @@ Number of rings used for emulated netmap mode Ring size used for emulated netmap mode .It Va dev.netmap.generic_mit: 100000 Controls interrupt moderation for emulated mode -.It Va dev.netmap.mmap_unreg: 0 .It Va dev.netmap.fwd: 0 Forces NS_FORWARD mode -.It Va dev.netmap.flags: 0 .It Va dev.netmap.txsync_retry: 2 +Number of txsync loops in the +.Nm VALE +flush function .It Va dev.netmap.no_pendintr: 1 Forces recovery of transmit buffers on system calls -.It Va dev.netmap.mitigate: 1 -Propagates interrupt mitigation to user processes .It Va dev.netmap.no_timestamp: 0 Disables the update of the timestamp in the netmap ring .It Va dev.netmap.verbose: 0 @@ -914,6 +915,18 @@ as it impacts the total amount of memory used by netma .It Va dev.netmap.if_curr_num: 0 .It Va dev.netmap.if_curr_size: 0 Actual values in use. +.It Va dev.netmap.priv_buf_num: 4098 +.It Va dev.netmap.priv_buf_size: 2048 +.It Va dev.netmap.priv_ring_num: 4 +.It Va dev.netmap.priv_ring_size: 20480 +.It Va dev.netmap.priv_if_num: 2 +.It Va dev.netmap.priv_if_size: 1024 +Sizes and number of objects (netmap_if, netmap_ring, buffers) +for private memory regions. +A separate memory region is used for each +.Nm VALE +port and each pair of +.Nm netmap pipes . .It Va dev.netmap.bridge_batch: 1024 Batch size used when moving packets across a .Nm VALE Modified: stable/12/share/man/man4/vale.4 ============================================================================== --- stable/12/share/man/man4/vale.4 Sat Feb 15 03:47:25 2020 (r357959) +++ stable/12/share/man/man4/vale.4 Sat Feb 15 11:42:13 2020 (r357960) @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" $Id: $ .\" -.Dd Jan 9, 2019 +.Dd February 6, 2020 .Dt VALE 4 .Os .Sh NAME @@ -77,21 +77,13 @@ See for details on the API. .Ss LIMITS .Nm -currently supports up to 4 switches, 16 ports per switch, with -1024 buffers per port. -These hard limits will be -changed to sysctl variables in future releases. +currently supports up to 8 switches, with 254 ports per switch. .Sh SYSCTL VARIABLES +See +.Xr netmap 4 +for a list of sysctl variables that affect .Nm -uses the following sysctl variables to control operation: -.Bl -tag -width dev.netmap.verbose -.It dev.netmap.bridge_batch -The maximum number of packets processed internally -in each iteration. -Defaults to 1024, use lower values to trade latency -with throughput. -.It dev.netmap.verbose -Set to non-zero values to enable in-kernel diagnostics. +bridges. .El .Sh EXAMPLES Create one switch, with a traffic generator connected to one Modified: stable/12/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/12/sys/dev/netmap/netmap_kern.h Sat Feb 15 03:47:25 2020 (r357959) +++ stable/12/sys/dev/netmap/netmap_kern.h Sat Feb 15 11:42:13 2020 (r357960) @@ -1591,7 +1591,6 @@ int netmap_adapter_put(struct netmap_adapter *na); #define NETMAP_BUF_BASE(_na) ((_na)->na_lut.lut[0].vaddr) #define NETMAP_BUF_SIZE(_na) ((_na)->na_lut.objsize) extern int netmap_no_pendintr; -extern int netmap_mitigate; extern int netmap_verbose; #ifdef CONFIG_NETMAP_DEBUG extern int netmap_debug; /* for debugging */ @@ -1613,7 +1612,6 @@ enum { /* debug flags }; extern int netmap_txsync_retry; -extern int netmap_flags; extern int netmap_generic_hwcsum; extern int netmap_generic_mit; extern int netmap_generic_ringsize; From owner-svn-src-all@freebsd.org Sat Feb 15 12:05:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3C62239164; Sat, 15 Feb 2020 12:05:12 +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) server-signature RSA-PSS (4096 bits) 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 48KTTN4NFFz4B4Z; Sat, 15 Feb 2020 12:05:12 +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 90FCFC89C; Sat, 15 Feb 2020 12:05:12 +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 01FC5CaT028911; Sat, 15 Feb 2020 12:05:12 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FC5C9H028908; Sat, 15 Feb 2020 12:05:12 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202002151205.01FC5C9H028908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sat, 15 Feb 2020 12:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357961 - in stable/11: share/man/man4 sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/netmap X-SVN-Commit-Revision: 357961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 12:05:12 -0000 Author: vmaffione Date: Sat Feb 15 12:05:11 2020 New Revision: 357961 URL: https://svnweb.freebsd.org/changeset/base/357961 Log: MFC r357663 netmap: improve netmap(4) and vale(4) man pages Clean up obsolete sysctl descriptions and add missing ones. PR: 243838 Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D23546 Modified: stable/11/share/man/man4/netmap.4 stable/11/share/man/man4/vale.4 stable/11/sys/dev/netmap/netmap_kern.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/netmap.4 ============================================================================== --- stable/11/share/man/man4/netmap.4 Sat Feb 15 11:42:13 2020 (r357960) +++ stable/11/share/man/man4/netmap.4 Sat Feb 15 12:05:11 2020 (r357961) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2018 +.Dd February 6, 2020 .Dt NETMAP 4 .Os .Sh NAME @@ -694,7 +694,7 @@ or are called with a write event (POLLOUT/wfdset) or a full ring. .Pp When registering a virtual interface that is dynamically created to a -.Xr vale 4 +.Nm VALE switch, we can specify the desired number of rings (1 by default, and currently up to 16) on it using nr_tx_rings and nr_rx_rings fields. .It Dv NIOCTXSYNC @@ -861,8 +861,10 @@ The sysctl variable .Va dev.netmap.admode globally controls how netmap mode is implemented. .Sh SYSCTL VARIABLES AND MODULE PARAMETERS -Some aspect of the operation of +Some aspects of the operation of .Nm +and +.Nm VALE are controlled through sysctl variables on .Fx .Em ( dev.netmap.* ) @@ -883,15 +885,14 @@ Number of rings used for emulated netmap mode Ring size used for emulated netmap mode .It Va dev.netmap.generic_mit: 100000 Controls interrupt moderation for emulated mode -.It Va dev.netmap.mmap_unreg: 0 .It Va dev.netmap.fwd: 0 Forces NS_FORWARD mode -.It Va dev.netmap.flags: 0 .It Va dev.netmap.txsync_retry: 2 +Number of txsync loops in the +.Nm VALE +flush function .It Va dev.netmap.no_pendintr: 1 Forces recovery of transmit buffers on system calls -.It Va dev.netmap.mitigate: 1 -Propagates interrupt mitigation to user processes .It Va dev.netmap.no_timestamp: 0 Disables the update of the timestamp in the netmap ring .It Va dev.netmap.verbose: 0 @@ -914,6 +915,18 @@ as it impacts the total amount of memory used by netma .It Va dev.netmap.if_curr_num: 0 .It Va dev.netmap.if_curr_size: 0 Actual values in use. +.It Va dev.netmap.priv_buf_num: 4098 +.It Va dev.netmap.priv_buf_size: 2048 +.It Va dev.netmap.priv_ring_num: 4 +.It Va dev.netmap.priv_ring_size: 20480 +.It Va dev.netmap.priv_if_num: 2 +.It Va dev.netmap.priv_if_size: 1024 +Sizes and number of objects (netmap_if, netmap_ring, buffers) +for private memory regions. +A separate memory region is used for each +.Nm VALE +port and each pair of +.Nm netmap pipes . .It Va dev.netmap.bridge_batch: 1024 Batch size used when moving packets across a .Nm VALE Modified: stable/11/share/man/man4/vale.4 ============================================================================== --- stable/11/share/man/man4/vale.4 Sat Feb 15 11:42:13 2020 (r357960) +++ stable/11/share/man/man4/vale.4 Sat Feb 15 12:05:11 2020 (r357961) @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" $Id: $ .\" -.Dd Jan 9, 2019 +.Dd February 6, 2020 .Dt VALE 4 .Os .Sh NAME @@ -77,21 +77,13 @@ See for details on the API. .Ss LIMITS .Nm -currently supports up to 4 switches, 16 ports per switch, with -1024 buffers per port. -These hard limits will be -changed to sysctl variables in future releases. +currently supports up to 8 switches, with 254 ports per switch. .Sh SYSCTL VARIABLES +See +.Xr netmap 4 +for a list of sysctl variables that affect .Nm -uses the following sysctl variables to control operation: -.Bl -tag -width dev.netmap.verbose -.It dev.netmap.bridge_batch -The maximum number of packets processed internally -in each iteration. -Defaults to 1024, use lower values to trade latency -with throughput. -.It dev.netmap.verbose -Set to non-zero values to enable in-kernel diagnostics. +bridges. .El .Sh EXAMPLES Create one switch, with a traffic generator connected to one Modified: stable/11/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_kern.h Sat Feb 15 11:42:13 2020 (r357960) +++ stable/11/sys/dev/netmap/netmap_kern.h Sat Feb 15 12:05:11 2020 (r357961) @@ -1611,7 +1611,6 @@ enum { /* debug flags }; extern int netmap_txsync_retry; -extern int netmap_flags; extern int netmap_generic_hwcsum; extern int netmap_generic_mit; extern int netmap_generic_ringsize; From owner-svn-src-all@freebsd.org Sat Feb 15 13:00:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C76B23A29B; Sat, 15 Feb 2020 13:00:40 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KVjM564wz4D2m; Sat, 15 Feb 2020 13:00:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7254D239; Sat, 15 Feb 2020 13:00:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01FD0dYP059585; Sat, 15 Feb 2020 13:00:39 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FD0dma059583; Sat, 15 Feb 2020 13:00:39 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002151300.01FD0dma059583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 13:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357962 - in head/sys: fs/tmpfs kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: fs/tmpfs kern X-SVN-Commit-Revision: 357962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 13:00:40 -0000 Author: mjg Date: Sat Feb 15 13:00:39 2020 New Revision: 357962 URL: https://svnweb.freebsd.org/changeset/base/357962 Log: vfs: make write suspension mandatory At the time opt-in was introduced adding yourself as a writer was esrializing across the mount point. Nowadays it is fully per-cpu, the only impact being a small single-threaded hit on top of what's there right now. Vast majority of the overhead stems from the call to VOP_GETWRITEMOUNT which has is done regardless. Should someone want to microoptimize this single-threaded they can coalesce looking the mount up with adding a write to it. Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/kern/vfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Feb 15 12:05:11 2020 (r357961) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Sat Feb 15 13:00:39 2020 (r357962) @@ -88,7 +88,6 @@ static int tmpfs_root(struct mount *, int flags, struc static int tmpfs_fhtovp(struct mount *, struct fid *, int, struct vnode **); static int tmpfs_statfs(struct mount *, struct statfs *); -static void tmpfs_susp_clean(struct mount *); static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", @@ -646,14 +645,6 @@ tmpfs_sync(struct mount *mp, int waitfor) return (0); } -/* - * The presence of a susp_clean method tells the VFS to track writes. - */ -static void -tmpfs_susp_clean(struct mount *mp __unused) -{ -} - static int tmpfs_init(struct vfsconf *conf) { @@ -679,7 +670,6 @@ struct vfsops tmpfs_vfsops = { .vfs_statfs = tmpfs_statfs, .vfs_fhtovp = tmpfs_fhtovp, .vfs_sync = tmpfs_sync, - .vfs_susp_clean = tmpfs_susp_clean, .vfs_init = tmpfs_init, .vfs_uninit = tmpfs_uninit, }; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Feb 15 12:05:11 2020 (r357961) +++ head/sys/kern/vfs_vnops.c Sat Feb 15 13:00:39 2020 (r357962) @@ -1643,13 +1643,6 @@ vn_closefile(struct file *fp, struct thread *td) return (error); } -static bool -vn_suspendable(struct mount *mp) -{ - - return (mp->mnt_op->vfs_susp_clean != NULL); -} - /* * Preparing to start a filesystem write operation. If the operation is * permitted, then we bump the count of operations in progress and @@ -1729,12 +1722,6 @@ vn_start_write(struct vnode *vp, struct mount **mpp, i if ((mp = *mpp) == NULL) return (0); - if (!vn_suspendable(mp)) { - if (vp != NULL || (flags & V_MNTREF) != 0) - vfs_rel(mp); - return (0); - } - /* * VOP_GETWRITEMOUNT() returns with the mp refcount held through * a vfs_ref(). @@ -1780,12 +1767,6 @@ vn_start_secondary_write(struct vnode *vp, struct moun if ((mp = *mpp) == NULL) return (0); - if (!vn_suspendable(mp)) { - if (vp != NULL || (flags & V_MNTREF) != 0) - vfs_rel(mp); - return (0); - } - /* * VOP_GETWRITEMOUNT() returns with the mp refcount held through * a vfs_ref(). @@ -1829,7 +1810,7 @@ vn_finished_write(struct mount *mp) { int c; - if (mp == NULL || !vn_suspendable(mp)) + if (mp == NULL) return; if (vfs_op_thread_enter(mp)) { @@ -1863,7 +1844,7 @@ vn_finished_write(struct mount *mp) void vn_finished_secondary_write(struct mount *mp) { - if (mp == NULL || !vn_suspendable(mp)) + if (mp == NULL) return; MNT_ILOCK(mp); MNT_REL(mp); @@ -1884,8 +1865,6 @@ vfs_write_suspend(struct mount *mp, int flags) { int error; - MPASS(vn_suspendable(mp)); - vfs_op_enter(mp); MNT_ILOCK(mp); @@ -1934,8 +1913,6 @@ void vfs_write_resume(struct mount *mp, int flags) { - MPASS(vn_suspendable(mp)); - MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) { KASSERT(mp->mnt_susp_owner == curthread, ("mnt_susp_owner")); @@ -1970,7 +1947,6 @@ vfs_write_suspend_umnt(struct mount *mp) { int error; - MPASS(vn_suspendable(mp)); KASSERT((curthread->td_pflags & TDP_IGNSUSP) == 0, ("vfs_write_suspend_umnt: recursed")); From owner-svn-src-all@freebsd.org Sat Feb 15 15:39:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E192B23ED24; Sat, 15 Feb 2020 15:39:53 +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) server-signature RSA-PSS (4096 bits) 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 48KZF55b8lz4NPy; Sat, 15 Feb 2020 15:39:53 +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 BA41FF0DD; Sat, 15 Feb 2020 15:39:53 +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 01FFdrSr054399; Sat, 15 Feb 2020 15:39:53 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FFdrH7054398; Sat, 15 Feb 2020 15:39:53 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202002151539.01FFdrH7054398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 15 Feb 2020 15:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357967 - head/sbin/ping6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sbin/ping6 X-SVN-Commit-Revision: 357967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 15:39:53 -0000 Author: melifaro Date: Sat Feb 15 15:39:53 2020 New Revision: 357967 URL: https://svnweb.freebsd.org/changeset/base/357967 Log: Make ping6(1) return code consistent with the man page. When every sendto() call originated by ping6(1) fails, current code always returns 2 ("transmission was successful but no responses were received") which is incorrect. Return EX_OSERR instead as in many cases it indicates some kernel-level problems. MFC after: 3 weeks Modified: head/sbin/ping6/ping6.c Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Sat Feb 15 15:05:25 2020 (r357966) +++ head/sbin/ping6/ping6.c Sat Feb 15 15:39:53 2020 (r357967) @@ -238,6 +238,7 @@ static long npackets; /* max packets to transmit */ static long nreceived; /* # of packets we got back */ static long nrepeats; /* number of duplicates */ static long ntransmitted; /* sequence # for outbound packets = #sent */ +static long ntransmitfailures; /* number of transmit failures */ static int interval = 1000; /* interval between packets in ms */ static int waittime = MAXWAIT; /* timeout for each packet */ static long nrcvtimeout = 0; /* # of packets we got back after waittime */ @@ -1256,7 +1257,12 @@ main(int argc, char *argv[]) if(packet != NULL) free(packet); - exit(nreceived == 0 ? 2 : 0); + if (nreceived > 0) + exit(0); + else if (ntransmitted > ntransmitfailures) + exit(2); + else + exit(EX_OSERR); } static void @@ -1423,8 +1429,10 @@ pinger(void) i = sendmsg(ssend, &smsghdr, 0); if (i < 0 || i != cc) { - if (i < 0) + if (i < 0) { + ntransmitfailures++; warn("sendmsg"); + } (void)printf("ping6: wrote %s %d chars, ret=%d\n", hostname, cc, i); } From owner-svn-src-all@freebsd.org Sat Feb 15 18:03:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 672DE24232F; Sat, 15 Feb 2020 18:03:17 +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) server-signature RSA-PSS (4096 bits) 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 48KdQY2tw6z4WVn; Sat, 15 Feb 2020 18:03:17 +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 5A2D618DEC; Sat, 15 Feb 2020 18:03:17 +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 01FI3HWx044179; Sat, 15 Feb 2020 18:03:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FI3GPB044177; Sat, 15 Feb 2020 18:03:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002151803.01FI3GPB044177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 15 Feb 2020 18:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357968 - head/lib/libfetch X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libfetch X-SVN-Commit-Revision: 357968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:03:17 -0000 Author: kevans Date: Sat Feb 15 18:03:16 2020 New Revision: 357968 URL: https://svnweb.freebsd.org/changeset/base/357968 Log: fetch(3): Add SOCKS5 support This change adds SOCKS5 support to the library fetch(3) and updates the man page. Details: Within the fetch_connect() function, fetch(3) checks if the SOCKS5_PROXY environment variable is set. If so, it connects to this host rather than the end-host. It then initializes the SOCKS5 connection in accordance with RFC 1928 and returns the resulting conn_t (file descriptor) for usage by the regular FTP/HTTP handlers. Design Decision: This change defaults all DNS resolutions through the proxy by sending all IPs as hostnames. Going forward, another feature might be to create another environmental variable to toggle resolutions through the proxy or not.. One may set the SOCKS5_PROXY environment variable in any of the formats: SOCKS5_PROXY=proxy.example.com SOCKS5_PROXY=proxy.example.com:1080 SOCKS5_PROXY=192.0.2.0 SOCKS5_PROXY=198.51.100.0:1080 SOCKS5_PROXY=[2001:db8::1] SOCKS5_PROXY=[2001:db8::2]:1080 Then perform a request with fetch(1). (note by kevans) I've since been informed that Void Linux/xbps has a fork of libfetch that also implements SOCKS5. I may compare/contrast the two in the mid-to-near future. Submitted by: Farhan Khan Differential Revision: https://reviews.freebsd.org/D18908 Modified: head/lib/libfetch/common.c head/lib/libfetch/common.h head/lib/libfetch/fetch.3 Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Sat Feb 15 15:39:53 2020 (r357967) +++ head/lib/libfetch/common.c Sat Feb 15 18:03:16 2020 (r357968) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -74,6 +75,64 @@ static struct fetcherr netdb_errlist[] = { { -1, FETCH_UNKNOWN, "Unknown resolver error" } }; +/* + * SOCKS5 error enumerations + */ +enum SOCKS5_ERR { +/* Protocol errors */ + SOCKS5_ERR_SELECTION, + SOCKS5_ERR_READ_METHOD, + SOCKS5_ERR_VER5_ONLY, + SOCKS5_ERR_NOMETHODS, + SOCKS5_ERR_NOTIMPLEMENTED, + SOCKS5_ERR_HOSTNAME_SIZE, + SOCKS5_ERR_REQUEST, + SOCKS5_ERR_REPLY, + SOCKS5_ERR_NON_VER5_RESP, + SOCKS5_ERR_GENERAL, + SOCKS5_ERR_NOT_ALLOWED, + SOCKS5_ERR_NET_UNREACHABLE, + SOCKS5_ERR_HOST_UNREACHABLE, + SOCKS5_ERR_CONN_REFUSED, + SOCKS5_ERR_TTL_EXPIRED, + SOCKS5_ERR_COM_UNSUPPORTED, + SOCKS5_ERR_ADDR_UNSUPPORTED, + SOCKS5_ERR_UNSPECIFIED, +/* Configuration errors */ + SOCKS5_ERR_BAD_HOST, + SOCKS5_ERR_BAD_PROXY_FORMAT, + SOCKS5_ERR_BAD_PORT +}; + +/* + * Error messages for SOCKS5 errors + */ +static struct fetcherr socks5_errlist[] = { +/* SOCKS5 protocol errors */ + { SOCKS5_ERR_SELECTION, FETCH_ABORT, "SOCKS5: Failed to send selection method" }, + { SOCKS5_ERR_READ_METHOD, FETCH_ABORT, "SOCKS5: Failed to read method" }, + { SOCKS5_ERR_VER5_ONLY, FETCH_PROTO, "SOCKS5: Only version 5 is implemented" }, + { SOCKS5_ERR_NOMETHODS, FETCH_PROTO, "SOCKS5: No acceptable methods" }, + { SOCKS5_ERR_NOTIMPLEMENTED, FETCH_PROTO, "SOCKS5: Method currently not implemented" }, + { SOCKS5_ERR_HOSTNAME_SIZE, FETCH_PROTO, "SOCKS5: Hostname size is above 256 bytes" }, + { SOCKS5_ERR_REQUEST, FETCH_PROTO, "SOCKS5: Failed to request" }, + { SOCKS5_ERR_REPLY, FETCH_PROTO, "SOCKS5: Failed to receive reply" }, + { SOCKS5_ERR_NON_VER5_RESP, FETCH_PROTO, "SOCKS5: Server responded with a non-version 5 response" }, + { SOCKS5_ERR_GENERAL, FETCH_ABORT, "SOCKS5: General server failure" }, + { SOCKS5_ERR_NOT_ALLOWED, FETCH_AUTH, "SOCKS5: Connection not allowed by ruleset" }, + { SOCKS5_ERR_NET_UNREACHABLE, FETCH_NETWORK, "SOCKS5: Network unreachable" }, + { SOCKS5_ERR_HOST_UNREACHABLE, FETCH_ABORT, "SOCKS5: Host unreachable" }, + { SOCKS5_ERR_CONN_REFUSED, FETCH_ABORT, "SOCKS5: Connection refused" }, + { SOCKS5_ERR_TTL_EXPIRED, FETCH_TIMEOUT, "SOCKS5: TTL expired" }, + { SOCKS5_ERR_COM_UNSUPPORTED, FETCH_PROTO, "SOCKS5: Command not supported" }, + { SOCKS5_ERR_ADDR_UNSUPPORTED, FETCH_ABORT, "SOCKS5: Address type not supported" }, + { SOCKS5_ERR_UNSPECIFIED, FETCH_UNKNOWN, "SOCKS5: Unspecified error" }, +/* Configuration error */ + { SOCKS5_ERR_BAD_HOST, FETCH_ABORT, "SOCKS5: Bad proxy host" }, + { SOCKS5_ERR_BAD_PROXY_FORMAT, FETCH_ABORT, "SOCKS5: Bad proxy format" }, + { SOCKS5_ERR_BAD_PORT, FETCH_ABORT, "SOCKS5: Bad port" } +}; + /* End-of-Line */ static const char ENDL[2] = "\r\n"; @@ -314,7 +373,6 @@ syserr: } - /* * Bind a socket to a specific local address */ @@ -337,6 +395,196 @@ fetch_bind(int sd, int af, const char *addr) /* + * SOCKS5 connection initiation, based on RFC 1928 + * Default DNS resolution over SOCKS5 + */ +int +fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) +{ + /* + * Size is based on largest packet prefix (4 bytes) + + * Largest FQDN (256) + one byte size (1) + + * Port (2) + */ + unsigned char buf[BUFF_SIZE]; + unsigned char *ptr; + int ret = 1; + + if (verbose) + fetch_info("Initializing SOCKS5 connection: %s:%d", host, port); + + /* Connection initialization */ + ptr = buf; + *ptr++ = SOCKS_VERSION_5; + *ptr++ = SOCKS_CONNECTION; + *ptr++ = SOCKS_RSV; + + if (fetch_write(conn, buf, 3) != 3) { + ret = SOCKS5_ERR_SELECTION; + goto fail; + } + + /* Verify response from SOCKS5 server */ + if (fetch_read(conn, buf, 2) != 2) { + ret = SOCKS5_ERR_READ_METHOD; + goto fail; + } + + ptr = buf; + if (ptr[0] != SOCKS_VERSION_5) { + ret = SOCKS5_ERR_VER5_ONLY; + goto fail; + } + if (ptr[1] == SOCKS_NOMETHODS) { + ret = SOCKS5_ERR_NOMETHODS; + goto fail; + } + else if (ptr[1] != SOCKS5_NOTIMPLEMENTED) { + ret = SOCKS5_ERR_NOTIMPLEMENTED; + goto fail; + } + + /* Send Request */ + *ptr++ = SOCKS_VERSION_5; + *ptr++ = SOCKS_CONNECTION; + *ptr++ = SOCKS_RSV; + /* Encode all targets as a hostname to avoid DNS leaks */ + *ptr++ = SOCKS_ATYP_DOMAINNAME; + if (strlen(host) > FQDN_SIZE) { + ret = SOCKS5_ERR_HOSTNAME_SIZE; + goto fail; + } + *ptr++ = strlen(host); + strncpy(ptr, host, strlen(host)); + ptr = ptr + strlen(host); + + port = htons(port); + *ptr++ = port & 0x00ff; + *ptr++ = (port & 0xff00) >> 8; + + if (fetch_write(conn, buf, ptr - buf) != ptr - buf) { + ret = SOCKS5_ERR_REQUEST; + goto fail; + } + + /* BND.ADDR is variable length, read the largest on non-blocking socket */ + if (!fetch_read(conn, buf, BUFF_SIZE)) { + ret = SOCKS5_ERR_REPLY; + goto fail; + } + + ptr = buf; + if (*ptr++ != SOCKS_VERSION_5) { + ret = SOCKS5_ERR_NON_VER5_RESP; + goto fail; + } + + switch(*ptr++) { + case SOCKS_SUCCESS: + break; + case SOCKS_GENERAL_FAILURE: + ret = SOCKS5_ERR_GENERAL; + goto fail; + case SOCKS_CONNECTION_NOT_ALLOWED: + ret = SOCKS5_ERR_NOT_ALLOWED; + goto fail; + case SOCKS_NETWORK_UNREACHABLE: + ret = SOCKS5_ERR_NET_UNREACHABLE; + goto fail; + case SOCKS_HOST_UNREACHABLE: + ret = SOCKS5_ERR_HOST_UNREACHABLE; + goto fail; + case SOCKS_CONNECTION_REFUSED: + ret = SOCKS5_ERR_CONN_REFUSED; + goto fail; + case SOCKS_TTL_EXPIRED: + ret = SOCKS5_ERR_TTL_EXPIRED; + goto fail; + case SOCKS_COMMAND_NOT_SUPPORTED: + ret = SOCKS5_ERR_COM_UNSUPPORTED; + goto fail; + case SOCKS_ADDRESS_NOT_SUPPORTED: + ret = SOCKS5_ERR_ADDR_UNSUPPORTED; + goto fail; + default: + ret = SOCKS5_ERR_UNSPECIFIED; + goto fail; + } + + return (ret); + +fail: + socks5_seterr(ret); + return (0); +} + +/* + * Perform SOCKS5 initialization + */ +int +fetch_socks5_getenv(char **host, int *port) +{ + char *socks5env, *endptr, *ext; + + if ((socks5env = getenv("SOCKS5_PROXY")) == NULL || *socks5env == '\0') { + *host = NULL; + *port = -1; + return (-1); + } + + /* IPv6 addresses begin and end in brackets */ + if (socks5env[0] == '[') { + if (socks5env[strlen(socks5env) - 1] == ']') { + *host = strndup(socks5env, strlen(socks5env)); + if (*host == NULL) + goto fail; + *port = 1080; /* Default port as defined in RFC1928 */ + } else { + ext = strstr(socks5env, "]:"); + if (ext == NULL) { + socks5_seterr(SOCKS5_ERR_BAD_PROXY_FORMAT); + return (0); + } + ext=ext+1; + *host = strndup(socks5env, ext - socks5env); + if (*host == NULL) + goto fail; + errno = 0; + *port = strtoimax(ext + 1, (char **)&endptr, 10); + if (*endptr != '\0' || errno != 0 || *port < 0 || + *port > 65535) { + socks5_seterr(SOCKS5_ERR_BAD_PORT); + return (0); + } + } + } else { + ext = strrchr(socks5env, ':'); + if (ext == NULL) { + *host = strdup(socks5env); + *port = 1080; + } else { + *host = strndup(socks5env, ext-socks5env); + if (*host == NULL) + goto fail; + errno = 0; + *port = strtoimax(ext + 1, (char **)&endptr, 10); + if (*endptr != '\0' || errno != 0 || *port < 0 || + *port > 65535) { + socks5_seterr(SOCKS5_ERR_BAD_PORT); + return (0); + } + } + } + + return (2); + +fail: + fprintf(stderr, "Failure to allocate memory, exiting.\n"); + return (-1); +} + + +/* * Establish a TCP connection to the specified port on the specified host. */ conn_t * @@ -346,22 +594,42 @@ fetch_connect(const char *host, int port, int af, int const char *bindaddr; conn_t *conn = NULL; int err = 0, sd = -1; + char *sockshost; + int socksport; DEBUGF("---> %s:%d\n", host, port); - /* resolve server address */ - if (verbose) - fetch_info("resolving server address: %s:%d", host, port); - if ((sais = fetch_resolve(host, port, af)) == NULL) + /* Check if SOCKS5_PROXY env variable is set */ + if (!fetch_socks5_getenv(&sockshost, &socksport)) goto fail; - /* resolve client address */ - bindaddr = getenv("FETCH_BIND_ADDRESS"); - if (bindaddr != NULL && *bindaddr != '\0') { + /* Not using SOCKS5 proxy */ + if (sockshost == NULL) { + /* resolve server address */ if (verbose) - fetch_info("resolving client address: %s", bindaddr); - if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) + fetch_info("resolving server address: %s:%d", host, + port); + if ((sais = fetch_resolve(host, port, af)) == NULL) goto fail; + + /* resolve client address */ + bindaddr = getenv("FETCH_BIND_ADDRESS"); + if (bindaddr != NULL && *bindaddr != '\0') { + if (verbose) + fetch_info("resolving client address: %s", + bindaddr); + if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) + goto fail; + } + } else { + /* resolve socks5 proxy address */ + if (verbose) + fetch_info("resolving SOCKS5 server address: %s:%d", + sockshost, socksport); + if ((sais = fetch_resolve(sockshost, socksport, af)) == NULL) { + socks5_seterr(SOCKS5_ERR_BAD_HOST); + goto fail; + } } /* try each server address in turn */ @@ -389,13 +657,26 @@ fetch_connect(const char *host, int port, int af, int sd = -1; } if (err != 0) { - if (verbose) + if (verbose && sockshost == NULL) { fetch_info("failed to connect to %s:%d", host, port); + goto syserr; + } else if (sockshost != NULL) { + if (verbose) + fetch_info( + "failed to connect to SOCKS5 server %s:%d", + sockshost, socksport); + socks5_seterr(SOCKS5_ERR_CONN_REFUSED); + goto syserr1; + } goto syserr; } if ((conn = fetch_reopen(sd)) == NULL) goto syserr; + + if (sockshost) + if (!fetch_socks5_init(conn, host, port, verbose)) + goto fail; if (cais != NULL) freeaddrinfo(cais); if (sais != NULL) @@ -403,6 +684,7 @@ fetch_connect(const char *host, int port, int af, int return (conn); syserr: fetch_syserr(); +syserr1: goto fail; fail: if (sd >= 0) Modified: head/lib/libfetch/common.h ============================================================================== --- head/lib/libfetch/common.h Sat Feb 15 15:39:53 2020 (r357967) +++ head/lib/libfetch/common.h Sat Feb 15 18:03:16 2020 (r357968) @@ -70,12 +70,47 @@ struct fetcherr { const char *string; }; +/* For SOCKS header size */ +#define HEAD_SIZE 4 +#define FQDN_SIZE 256 +#define PACK_SIZE 1 +#define PORT_SIZE 2 +#define BUFF_SIZE HEAD_SIZE + FQDN_SIZE + PACK_SIZE + PORT_SIZE + +/* SOCKS5 Request Header */ +#define SOCKS_VERSION_5 0x05 +/* SOCKS5 CMD */ +#define SOCKS_CONNECTION 0x01 +#define SOCKS_BIND 0x02 +#define SOCKS_UDP 0x03 +#define SOCKS_NOMETHODS 0xFF +#define SOCKS5_NOTIMPLEMENTED 0x00 +/* SOCKS5 Reserved */ +#define SOCKS_RSV 0x00 +/* SOCKS5 Address Type */ +#define SOCKS_ATYP_IPV4 0x01 +#define SOCKS_ATYP_DOMAINNAME 0x03 +#define SOCKS_ATYP_IPV6 0x04 +/* SOCKS5 Reply Field */ +#define SOCKS_SUCCESS 0x00 +#define SOCKS_GENERAL_FAILURE 0x01 +#define SOCKS_CONNECTION_NOT_ALLOWED 0x02 +#define SOCKS_NETWORK_UNREACHABLE 0x03 +#define SOCKS_HOST_UNREACHABLE 0x04 +#define SOCKS_CONNECTION_REFUSED 0x05 +#define SOCKS_TTL_EXPIRED 0x06 +#define SOCKS_COMMAND_NOT_SUPPORTED 0x07 +#define SOCKS_ADDRESS_NOT_SUPPORTED 0x08 + /* for fetch_writev */ struct iovec; void fetch_seterr(struct fetcherr *, int); void fetch_syserr(void); void fetch_info(const char *, ...) __printflike(1, 2); +int fetch_socks5_getenv(char **host, int *port); +int fetch_socks5_init(conn_t *conn, const char *host, + int port, int verbose); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); struct addrinfo *fetch_resolve(const char *, int, int); @@ -102,6 +137,7 @@ int fetch_no_proxy_match(const char *); #define http_seterr(n) fetch_seterr(http_errlist, n) #define netdb_seterr(n) fetch_seterr(netdb_errlist, n) #define url_seterr(n) fetch_seterr(url_errlist, n) +#define socks5_seterr(n) fetch_seterr(socks5_errlist, n) #ifndef NDEBUG #define DEBUGF(...) \ Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Sat Feb 15 15:39:53 2020 (r357967) +++ head/lib/libfetch/fetch.3 Sat Feb 15 18:03:16 2020 (r357968) @@ -668,6 +668,13 @@ which proxies should not be used. Same as .Ev NO_PROXY , for compatibility. +.It Ev SOCKS5_PROXY +Uses SOCKS version 5 to make connection. +The format must be the IP or hostname followed by a colon for the port. +IPv6 addresses must enclose the address in brackets. +If no port is specified, the default is 1080. +This setting will supercede a connection to an +.Ev HTTP_PROXY . .It Ev SSL_ALLOW_SSL3 Allow SSL version 3 when negotiating the connection (not recommended). .It Ev SSL_CA_CERT_FILE @@ -724,6 +731,21 @@ host, define as follows: .Bd -literal -offset indent NO_PROXY=localhost,127.0.0.1 +.Ed +.Pp +To use a SOCKS5 proxy, set the +.Ev SOCKS5_PROXY +environment variable to a +valid host or IP followed by an optional colon and the port. +IPv6 addresses must be enclosed in brackets. +The following are examples of valid settings: +.Bd -literal -offset indent +SOCKS5_PROXY=proxy.example.com +SOCKS5_PROXY=proxy.example.com:1080 +SOCKS5_PROXY=192.0.2.0 +SOCKS5_PROXY=198.51.100.0:1080 +SOCKS5_PROXY=[2001:db8::1] +SOCKS5_PROXY=[2001:db8::2]:1080 .Ed .Pp Access HTTPS website without any certificate verification whatsoever: From owner-svn-src-all@freebsd.org Sat Feb 15 18:14:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 979B5242D84; Sat, 15 Feb 2020 18:14: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) server-signature RSA-PSS (4096 bits) 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 48KdgN3SRnz4XXq; Sat, 15 Feb 2020 18:14: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 71D7E18FEE; Sat, 15 Feb 2020 18:14: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 01FIEOuF050588; Sat, 15 Feb 2020 18:14:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FIEOgY050587; Sat, 15 Feb 2020 18:14:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202002151814.01FIEOgY050587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 15 Feb 2020 18:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357969 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 357969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:14:24 -0000 Author: imp Date: Sat Feb 15 18:14:23 2020 New Revision: 357969 URL: https://svnweb.freebsd.org/changeset/base/357969 Log: The KASSERT is too strict: revert r357897 It's valid for a periph to be removed with outstanding transactions on the device. In CAM, multiple periphs attach to a single device. There's no interlock to prevent one of these going away while other periphs have outstanding CCBs and it's not an error either. Remove this overly agressive KASSERT to prevent false-positive panics when devices depart. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Sat Feb 15 18:03:16 2020 (r357968) +++ head/sys/cam/cam_periph.c Sat Feb 15 18:14:23 2020 (r357969) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include /* For KASSERTs only */ #include #include @@ -682,10 +681,6 @@ camperiphfree(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); KASSERT(periph->periph_allocating == 0, ("%s%d: freed while allocating", periph->periph_name, periph->unit_number)); - KASSERT(periph->path->device->ccbq.dev_active == 0, - ("%s%d: freed with %d active CCBs\n", - periph->periph_name, periph->unit_number, - periph->path->device->ccbq.dev_active)); for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) { if (strcmp((*p_drv)->driver_name, periph->periph_name) == 0) break; From owner-svn-src-all@freebsd.org Sat Feb 15 18:48:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAC5824404B; Sat, 15 Feb 2020 18:48:39 +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) server-signature RSA-PSS (4096 bits) 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 48KfQv4wnPz4ZsL; Sat, 15 Feb 2020 18:48:39 +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 9FFDF1956E; Sat, 15 Feb 2020 18:48:39 +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 01FImdm5069180; Sat, 15 Feb 2020 18:48:39 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FImcBH069176; Sat, 15 Feb 2020 18:48:38 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002151848.01FImcBH069176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sat, 15 Feb 2020 18:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357971 - in head/sys: dev/iscsi fs/autofs kern X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys: dev/iscsi fs/autofs kern X-SVN-Commit-Revision: 357971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:48:39 -0000 Author: kaktus Date: Sat Feb 15 18:48:38 2020 New Revision: 357971 URL: https://svnweb.freebsd.org/changeset/base/357971 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (1 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: kib, trasz Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23640 Modified: head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/iscsi.c head/sys/fs/autofs/autofs.c head/sys/kern/kern_rctl.c Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Sat Feb 15 18:37:26 2020 (r357970) +++ head/sys/dev/iscsi/icl.c Sat Feb 15 18:48:38 2020 (r357971) @@ -75,7 +75,8 @@ static int sysctl_kern_icl_offloads(SYSCTL_HANDLER_ARG static MALLOC_DEFINE(M_ICL, "icl", "iSCSI Common Layer"); static struct icl_softc *sc; -SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); +SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "iSCSI Common Layer"); int icl_debug = 1; SYSCTL_INT(_kern_icl, OID_AUTO, debug, CTLFLAG_RWTUN, &icl_debug, 0, "Enable debug messages"); Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sat Feb 15 18:37:26 2020 (r357970) +++ head/sys/dev/iscsi/iscsi.c Sat Feb 15 18:48:38 2020 (r357971) @@ -82,7 +82,8 @@ FEATURE(iscsi_kernel_proxy, "iSCSI initiator built wit */ static struct iscsi_softc *sc; -SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLFLAG_RD, 0, "iSCSI initiator"); +SYSCTL_NODE(_kern, OID_AUTO, iscsi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "iSCSI initiator"); static int debug = 1; SYSCTL_INT(_kern_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN, &debug, 0, "Enable debug messages"); Modified: head/sys/fs/autofs/autofs.c ============================================================================== --- head/sys/fs/autofs/autofs.c Sat Feb 15 18:37:26 2020 (r357970) +++ head/sys/fs/autofs/autofs.c Sat Feb 15 18:48:38 2020 (r357971) @@ -119,7 +119,8 @@ int autofs_sig_set[] = { struct autofs_softc *autofs_softc; -SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "Automounter filesystem"); int autofs_debug = 1; TUNABLE_INT("vfs.autofs.debug", &autofs_debug); SYSCTL_INT(_vfs_autofs, OID_AUTO, debug, CTLFLAG_RWTUN, Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Sat Feb 15 18:37:26 2020 (r357970) +++ head/sys/kern/kern_rctl.c Sat Feb 15 18:48:38 2020 (r357971) @@ -96,7 +96,8 @@ static int rctl_throttle_max_sysctl(SYSCTL_HANDLER_ARG static int rctl_throttle_pct_sysctl(SYSCTL_HANDLER_ARGS); static int rctl_throttle_pct2_sysctl(SYSCTL_HANDLER_ARGS); -SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits"); +SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "Resource Limits"); SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN, &rctl_maxbufsize, 0, "Maximum output buffer size"); SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit, CTLFLAG_RW, @@ -104,19 +105,23 @@ SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, log_rate_limit SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, devctl_rate_limit, CTLFLAG_RWTUN, &rctl_devctl_rate_limit, 0, "Maximum number of devctl messages per second"); SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_min, - CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_min_sysctl, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0, + &rctl_throttle_min_sysctl, "IU", "Shortest throttling duration, in hz"); TUNABLE_INT("kern.racct.rctl.throttle_min", &rctl_throttle_min); SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_max, - CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_max_sysctl, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0, + &rctl_throttle_max_sysctl, "IU", "Longest throttling duration, in hz"); TUNABLE_INT("kern.racct.rctl.throttle_max", &rctl_throttle_max); SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct, - CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct_sysctl, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0, + &rctl_throttle_pct_sysctl, "IU", "Throttling penalty for process consumption, in percent"); TUNABLE_INT("kern.racct.rctl.throttle_pct", &rctl_throttle_pct); SYSCTL_PROC(_kern_racct_rctl, OID_AUTO, throttle_pct2, - CTLTYPE_UINT | CTLFLAG_RWTUN, 0, 0, &rctl_throttle_pct2_sysctl, "IU", + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, 0, + &rctl_throttle_pct2_sysctl, "IU", "Throttling penalty for container consumption, in percent"); TUNABLE_INT("kern.racct.rctl.throttle_pct2", &rctl_throttle_pct2); From owner-svn-src-all@freebsd.org Sat Feb 15 18:52:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DCD324426A; Sat, 15 Feb 2020 18:52:29 +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) server-signature RSA-PSS (4096 bits) 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 48KfWK1gTGz4bDn; Sat, 15 Feb 2020 18:52:29 +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 341141972A; Sat, 15 Feb 2020 18:52:29 +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 01FIqTPs074650; Sat, 15 Feb 2020 18:52:29 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FIqDK3073923; Sat, 15 Feb 2020 18:52:13 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002151852.01FIqDK3073923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sat, 15 Feb 2020 18:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357972 - in head/sys/dev: sound/usb usb usb/controller usb/gadget usb/input usb/misc usb/net usb/serial usb/storage usb/template usb/video usb/wlan X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys/dev: sound/usb usb usb/controller usb/gadget usb/input usb/misc usb/net usb/serial usb/storage usb/template usb/video usb/wlan X-SVN-Commit-Revision: 357972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:52:29 -0000 Author: kaktus Date: Sat Feb 15 18:52:12 2020 New Revision: 357972 URL: https://svnweb.freebsd.org/changeset/base/357972 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: hselasky, kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23632 Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/saf1761_otg.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/gadget/g_audio.c head/sys/dev/usb/gadget/g_keyboard.c head/sys/dev/usb/gadget/g_modem.c head/sys/dev/usb/gadget/g_mouse.c head/sys/dev/usb/input/atp.c head/sys/dev/usb/input/uep.c head/sys/dev/usb/input/uhid.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c head/sys/dev/usb/input/wmt.c head/sys/dev/usb/input/wsp.c head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/misc/ugold.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axge.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdceem.c head/sys/dev/usb/net/if_cue.c head/sys/dev/usb/net/if_ipheth.c head/sys/dev/usb/net/if_kue.c head/sys/dev/usb/net/if_mos.c head/sys/dev/usb/net/if_muge.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_smsc.c head/sys/dev/usb/net/if_udav.c head/sys/dev/usb/net/if_ure.c head/sys/dev/usb/net/if_urndis.c head/sys/dev/usb/net/if_usie.c head/sys/dev/usb/net/uhso.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ulpt.c head/sys/dev/usb/serial/umcs.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c head/sys/dev/usb/storage/cfumass.c head/sys/dev/usb/storage/umass.c head/sys/dev/usb/storage/urio.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template_audio.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_cdceem.c head/sys/dev/usb/template/usb_template_kbd.c head/sys/dev/usb/template/usb_template_midi.c head/sys/dev/usb/template/usb_template_modem.c head/sys/dev/usb/template/usb_template_mouse.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c head/sys/dev/usb/template/usb_template_multi.c head/sys/dev/usb/template/usb_template_phone.c head/sys/dev/usb/template/usb_template_serialnet.c head/sys/dev/usb/usb_debug.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_generic.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_hub_acpi.c head/sys/dev/usb/usb_process.c head/sys/dev/usb/video/udl.c head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/sound/usb/uaudio.c Sat Feb 15 18:52:12 2020 (r357972) @@ -102,7 +102,8 @@ static int uaudio_buffer_ms = 8; #ifdef USB_DEBUG static int uaudio_debug; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uaudio"); SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RWTUN, &uaudio_debug, 0, "uaudio debug level"); @@ -133,8 +134,9 @@ uaudio_buffer_ms_sysctl(SYSCTL_HANDLER_ARGS) return (0); } -SYSCTL_PROC(_hw_usb_uaudio, OID_AUTO, buffer_ms, CTLTYPE_INT | CTLFLAG_RWTUN, - 0, sizeof(int), uaudio_buffer_ms_sysctl, "I", +SYSCTL_PROC(_hw_usb_uaudio, OID_AUTO, buffer_ms, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, sizeof(int), + uaudio_buffer_ms_sysctl, "I", "uaudio buffering delay from 2ms to 8ms"); #else #define uaudio_debug 0 @@ -2905,7 +2907,7 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, mixer_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "mixer", - CTLFLAG_RD, NULL, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); if (mixer_tree == NULL) return; @@ -2925,15 +2927,17 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, control_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(mixer_tree), OID_AUTO, buf, - CTLFLAG_RD, NULL, "Mixer control nodes"); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Mixer control nodes"); if (control_tree == NULL) continue; SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(control_tree), - OID_AUTO, "val", CTLTYPE_INT | CTLFLAG_RWTUN, sc, - pmc->wValue[chan], + OID_AUTO, "val", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + sc, pmc->wValue[chan], uaudio_mixer_sysctl_handler, "I", "Current value"); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/atmegadci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -88,7 +88,7 @@ #ifdef USB_DEBUG static int atmegadci_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW, 0, +static SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB ATMEGA DCI"); SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, debug, CTLFLAG_RWTUN, &atmegadci_debug, 0, "ATMEGA DCI debug level"); Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/avr32dci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -87,7 +87,9 @@ #ifdef USB_DEBUG static int avr32dci_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci, CTLFLAG_RW, 0, "USB AVR32 DCI"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB AVR32 DCI"); SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, debug, CTLFLAG_RWTUN, &avr32dci_debug, 0, "AVR32 DCI debug level"); #endif Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/dwc_otg.c Sat Feb 15 18:52:12 2020 (r357972) @@ -106,7 +106,8 @@ static int dwc_otg_phy_type = DWC_OTG_PHY_DEFAULT; -static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB DWC OTG"); SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, phy_type, CTLFLAG_RDTUN, &dwc_otg_phy_type, 0, "DWC OTG PHY TYPE - 0/1/2/3 - ULPI/HSIC/INTERNAL/UTMI+"); Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/ehci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -99,7 +99,8 @@ static int ehcinohighspeed = 0; static int ehciiaadbug = 0; static int ehcilostintrbug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ehci"); SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RWTUN, &ehcidebug, 0, "Debug level"); SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/musb_otg.c Sat Feb 15 18:52:12 2020 (r357972) @@ -91,7 +91,8 @@ #ifdef USB_DEBUG static int musbotgdebug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW, 0, "USB musbotg"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB musbotg"); SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, debug, CTLFLAG_RWTUN, &musbotgdebug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/ohci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -85,7 +85,8 @@ #ifdef USB_DEBUG static int ohcidebug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ohci"); SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RWTUN, &ohcidebug, 0, "ohci debug level"); Modified: head/sys/dev/usb/controller/saf1761_otg.c ============================================================================== --- head/sys/dev/usb/controller/saf1761_otg.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/saf1761_otg.c Sat Feb 15 18:52:12 2020 (r357972) @@ -97,7 +97,7 @@ static int saf1761_otg_debug = 0; static int saf1761_otg_forcefs = 0; static -SYSCTL_NODE(_hw_usb, OID_AUTO, saf1761_otg, CTLFLAG_RW, 0, +SYSCTL_NODE(_hw_usb, OID_AUTO, saf1761_otg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB SAF1761 DCI"); SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, debug, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/uhci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -90,7 +90,8 @@ static int uhcidebug = 0; static int uhcinoloop = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW, 0, "USB uhci"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uhci"); SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RWTUN, &uhcidebug, 0, "uhci debug level"); SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/usb_controller.c Sat Feb 15 18:52:12 2020 (r357972) @@ -86,7 +86,8 @@ static void usb_attach_sub(device_t, struct usb_bus *) #ifdef USB_DEBUG static int usb_ctrl_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW, 0, "USB controller"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB controller"); SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RWTUN, &usb_ctrl_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/uss820dci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -89,7 +89,7 @@ #ifdef USB_DEBUG static int uss820dcidebug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW, 0, +static SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB uss820dci"); SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, debug, CTLFLAG_RWTUN, &uss820dcidebug, 0, "uss820dci debug level"); Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/controller/xhci.c Sat Feb 15 18:52:12 2020 (r357972) @@ -89,7 +89,8 @@ ((struct xhci_softc *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((struct xhci_softc *)0)->sc_bus)))) -static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB XHCI"); static int xhcistreams; SYSCTL_INT(_hw_usb_xhci, OID_AUTO, streams, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/gadget/g_audio.c ============================================================================== --- head/sys/dev/usb/gadget/g_audio.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/gadget/g_audio.c Sat Feb 15 18:52:12 2020 (r357972) @@ -96,7 +96,8 @@ struct g_audio_softc { uint8_t sc_sample_rate[32]; }; -static SYSCTL_NODE(_hw_usb, OID_AUTO, g_audio, CTLFLAG_RW, 0, "USB audio gadget"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, g_audio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB audio gadget"); #ifdef USB_DEBUG static int g_audio_debug = 0; Modified: head/sys/dev/usb/gadget/g_keyboard.c ============================================================================== --- head/sys/dev/usb/gadget/g_keyboard.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/gadget/g_keyboard.c Sat Feb 15 18:52:12 2020 (r357972) @@ -61,7 +61,9 @@ __FBSDID("$FreeBSD$"); #include -static SYSCTL_NODE(_hw_usb, OID_AUTO, g_keyboard, CTLFLAG_RW, 0, "USB keyboard gadget"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, g_keyboard, + CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB keyboard gadget"); #ifdef USB_DEBUG static int g_keyboard_debug = 0; Modified: head/sys/dev/usb/gadget/g_modem.c ============================================================================== --- head/sys/dev/usb/gadget/g_modem.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/gadget/g_modem.c Sat Feb 15 18:52:12 2020 (r357972) @@ -92,7 +92,8 @@ struct g_modem_softc { uint8_t sc_abstract_state[32]; }; -static SYSCTL_NODE(_hw_usb, OID_AUTO, g_modem, CTLFLAG_RW, 0, "USB modem gadget"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, g_modem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB modem gadget"); #ifdef USB_DEBUG static int g_modem_debug = 0; Modified: head/sys/dev/usb/gadget/g_mouse.c ============================================================================== --- head/sys/dev/usb/gadget/g_mouse.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/gadget/g_mouse.c Sat Feb 15 18:52:12 2020 (r357972) @@ -61,7 +61,8 @@ __FBSDID("$FreeBSD$"); #include -static SYSCTL_NODE(_hw_usb, OID_AUTO, g_mouse, CTLFLAG_RW, 0, "USB mouse gadget"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, g_mouse, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB mouse gadget"); #ifdef USB_DEBUG static int g_mouse_debug = 0; Modified: head/sys/dev/usb/input/atp.c ============================================================================== --- head/sys/dev/usb/input/atp.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/atp.c Sat Feb 15 18:52:12 2020 (r357972) @@ -170,7 +170,8 @@ __FBSDID("$FreeBSD$"); /* end of driver specific options */ /* Tunables */ -static SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW, 0, "USB ATP"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ATP"); #ifdef USB_DEBUG enum atp_log_level { @@ -196,9 +197,11 @@ SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshol static u_int atp_mickeys_scale_factor = ATP_SCALE_FACTOR; static int atp_sysctl_scale_factor_handler(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor, CTLTYPE_UINT | CTLFLAG_RWTUN, +SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor, + CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &atp_mickeys_scale_factor, sizeof(atp_mickeys_scale_factor), - atp_sysctl_scale_factor_handler, "IU", "movement scale factor"); + atp_sysctl_scale_factor_handler, "IU", + "movement scale factor"); static u_int atp_small_movement_threshold = ATP_SMALL_MOVEMENT_THRESHOLD; SYSCTL_UINT(_hw_usb_atp, OID_AUTO, small_movement, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/input/uep.c ============================================================================== --- head/sys/dev/usb/input/uep.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/uep.c Sat Feb 15 18:52:12 2020 (r357972) @@ -65,7 +65,8 @@ #ifdef USB_DEBUG static int uep_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uep, CTLFLAG_RW, 0, "USB uep"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uep, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uep"); SYSCTL_INT(_hw_usb_uep, OID_AUTO, debug, CTLFLAG_RWTUN, &uep_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/uhid.c Sat Feb 15 18:52:12 2020 (r357972) @@ -80,7 +80,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int uhid_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uhid"); SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug, CTLFLAG_RWTUN, &uhid_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/ukbd.c Sat Feb 15 18:52:12 2020 (r357972) @@ -98,7 +98,8 @@ static int ukbd_debug = 0; static int ukbd_no_leds = 0; static int ukbd_pollrate = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB keyboard"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB keyboard"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RWTUN, &ukbd_debug, 0, "Debug level"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/ums.c Sat Feb 15 18:52:12 2020 (r357972) @@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ums_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ums"); SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RWTUN, &ums_debug, 0, "Debug level"); #endif @@ -750,9 +751,10 @@ ums_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, - sc, 0, ums_sysctl_handler_parseinfo, - "", "Dump of parsed HID report descriptor"); + OID_AUTO, "parseinfo", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + sc, 0, ums_sysctl_handler_parseinfo, "", + "Dump of parsed HID report descriptor"); return (0); Modified: head/sys/dev/usb/input/wmt.c ============================================================================== --- head/sys/dev/usb/input/wmt.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/wmt.c Sat Feb 15 18:52:12 2020 (r357972) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int wmt_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, wmt, CTLFLAG_RW, 0, +static SYSCTL_NODE(_hw_usb, OID_AUTO, wmt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB MSWindows 7/8/10 compatible Multi-touch Device"); SYSCTL_INT(_hw_usb_wmt, OID_AUTO, debug, CTLFLAG_RWTUN, &wmt_debug, 1, "Debug level"); Modified: head/sys/dev/usb/input/wsp.c ============================================================================== --- head/sys/dev/usb/input/wsp.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/input/wsp.c Sat Feb 15 18:52:12 2020 (r357972) @@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$"); } while (0) /* Tunables */ -static SYSCTL_NODE(_hw_usb, OID_AUTO, wsp, CTLFLAG_RW, 0, "USB wsp"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, wsp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB wsp"); #ifdef USB_DEBUG enum wsp_log_level { Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/misc/udbp.c Sat Feb 15 18:52:12 2020 (r357972) @@ -98,7 +98,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int udbp_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW, 0, "USB udbp"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB udbp"); SYSCTL_INT(_hw_usb_udbp, OID_AUTO, debug, CTLFLAG_RWTUN, &udbp_debug, 0, "udbp debug level"); #endif Modified: head/sys/dev/usb/misc/ugold.c ============================================================================== --- head/sys/dev/usb/misc/ugold.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/misc/ugold.c Sat Feb 15 18:52:12 2020 (r357972) @@ -239,7 +239,7 @@ ugold_attach(device_t dev) sensor_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensors", - CTLFLAG_RD, NULL, ""); + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); if (sensor_tree == NULL) { error = ENOMEM; Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_aue.c Sat Feb 15 18:52:12 2020 (r357972) @@ -114,7 +114,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int aue_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, aue, CTLFLAG_RW, 0, "USB aue"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, aue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB aue"); SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RWTUN, &aue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_axe.c Sat Feb 15 18:52:12 2020 (r357972) @@ -138,7 +138,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int axe_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW, 0, "USB axe"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB axe"); SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RWTUN, &axe_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_axge.c ============================================================================== --- head/sys/dev/usb/net/if_axge.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_axge.c Sat Feb 15 18:52:12 2020 (r357972) @@ -142,7 +142,8 @@ static void axge_csum_cfg(struct usb_ether *); #ifdef USB_DEBUG static int axge_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, axge, CTLFLAG_RW, 0, "USB axge"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, axge, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB axge"); SYSCTL_INT(_hw_usb_axge, OID_AUTO, debug, CTLFLAG_RWTUN, &axge_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_cdce.c Sat Feb 15 18:52:12 2020 (r357972) @@ -118,7 +118,8 @@ static uint32_t cdce_m_crc32(struct mbuf *, uint32_t, static int cdce_debug = 0; static int cdce_tx_interval = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW, 0, "USB CDC-Ethernet"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB CDC-Ethernet"); SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RWTUN, &cdce_debug, 0, "Debug level"); SYSCTL_INT(_hw_usb_cdce, OID_AUTO, interval, CTLFLAG_RWTUN, &cdce_tx_interval, 0, Modified: head/sys/dev/usb/net/if_cdceem.c ============================================================================== --- head/sys/dev/usb/net/if_cdceem.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_cdceem.c Sat Feb 15 18:52:12 2020 (r357972) @@ -101,7 +101,8 @@ struct cdceem_softc { #define CDCEEM_SC_FLAGS_ECHO_RESPONSE_PENDING 0x1 #define CDCEEM_SC_FLAGS_ECHO_PENDING 0x2 -static SYSCTL_NODE(_hw_usb, OID_AUTO, cdceem, CTLFLAG_RW, 0, "USB CDC EEM"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, cdceem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB CDC EEM"); static int cdceem_debug = 1; SYSCTL_INT(_hw_usb_cdceem, OID_AUTO, debug, CTLFLAG_RWTUN, &cdceem_debug, 0, "Debug level"); Modified: head/sys/dev/usb/net/if_cue.c ============================================================================== --- head/sys/dev/usb/net/if_cue.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_cue.c Sat Feb 15 18:52:12 2020 (r357972) @@ -130,7 +130,8 @@ static void cue_reset(struct cue_softc *); #ifdef USB_DEBUG static int cue_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, cue, CTLFLAG_RW, 0, "USB cue"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, cue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB cue"); SYSCTL_INT(_hw_usb_cue, OID_AUTO, debug, CTLFLAG_RWTUN, &cue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_ipheth.c ============================================================================== --- head/sys/dev/usb/net/if_ipheth.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_ipheth.c Sat Feb 15 18:52:12 2020 (r357972) @@ -87,7 +87,8 @@ static uether_fn_t ipheth_setpromisc; #ifdef USB_DEBUG static int ipheth_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ipheth, CTLFLAG_RW, 0, "USB iPhone ethernet"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ipheth, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB iPhone ethernet"); SYSCTL_INT(_hw_usb_ipheth, OID_AUTO, debug, CTLFLAG_RWTUN, &ipheth_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_kue.c ============================================================================== --- head/sys/dev/usb/net/if_kue.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_kue.c Sat Feb 15 18:52:12 2020 (r357972) @@ -171,7 +171,8 @@ static void kue_reset(struct kue_softc *); #ifdef USB_DEBUG static int kue_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, kue, CTLFLAG_RW, 0, "USB kue"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, kue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB kue"); SYSCTL_INT(_hw_usb_kue, OID_AUTO, debug, CTLFLAG_RWTUN, &kue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_mos.c ============================================================================== --- head/sys/dev/usb/net/if_mos.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_mos.c Sat Feb 15 18:52:12 2020 (r357972) @@ -144,7 +144,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int mos_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, mos, CTLFLAG_RW, 0, "USB mos"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, mos, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB mos"); SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RWTUN, &mos_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_muge.c Sat Feb 15 18:52:12 2020 (r357972) @@ -122,7 +122,7 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int muge_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, muge, CTLFLAG_RW, 0, +SYSCTL_NODE(_hw_usb, OID_AUTO, muge, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Microchip LAN78xx USB-GigE"); SYSCTL_INT(_hw_usb_muge, OID_AUTO, debug, CTLFLAG_RWTUN, &muge_debug, 0, "Debug level"); Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_rue.c Sat Feb 15 18:52:12 2020 (r357972) @@ -111,7 +111,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int rue_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW, 0, "USB rue"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB rue"); SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RWTUN, &rue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_smsc.c ============================================================================== --- head/sys/dev/usb/net/if_smsc.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_smsc.c Sat Feb 15 18:52:12 2020 (r357972) @@ -122,7 +122,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int smsc_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW, 0, "USB smsc"); +SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB smsc"); SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RWTUN, &smsc_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_udav.c Sat Feb 15 18:52:12 2020 (r357972) @@ -221,7 +221,8 @@ static const struct usb_ether_methods udav_ue_methods_ #ifdef USB_DEBUG static int udav_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, udav, CTLFLAG_RW, 0, "USB udav"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, udav, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB udav"); SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RWTUN, &udav_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_ure.c Sat Feb 15 18:52:12 2020 (r357972) @@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ure_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ure, CTLFLAG_RW, 0, "USB ure"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ure, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ure"); SYSCTL_INT(_hw_usb_ure, OID_AUTO, debug, CTLFLAG_RWTUN, &ure_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_urndis.c ============================================================================== --- head/sys/dev/usb/net/if_urndis.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_urndis.c Sat Feb 15 18:52:12 2020 (r357972) @@ -96,7 +96,8 @@ static uint32_t urndis_ctrl_halt(struct urndis_softc * #ifdef USB_DEBUG static int urndis_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, urndis, CTLFLAG_RW, 0, "USB RNDIS-Ethernet"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, urndis, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB RNDIS-Ethernet"); SYSCTL_INT(_hw_usb_urndis, OID_AUTO, debug, CTLFLAG_RWTUN, &urndis_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_usie.c ============================================================================== --- head/sys/dev/usb/net/if_usie.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/if_usie.c Sat Feb 15 18:52:12 2020 (r357972) @@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int usie_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, usie, CTLFLAG_RW, 0, "sierra USB modem"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, usie, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "sierra USB modem"); SYSCTL_INT(_hw_usb_usie, OID_AUTO, debug, CTLFLAG_RWTUN, &usie_debug, 0, "usie debug level"); #endif Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/uhso.c Sat Feb 15 18:52:12 2020 (r357972) @@ -288,7 +288,8 @@ static const STRUCT_USB_HOST_ID uhso_devs[] = { #undef UHSO_DEV }; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uhso"); static int uhso_autoswitch = 1; SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RWTUN, &uhso_autoswitch, 0, "Automatically switch to modem mode"); @@ -599,7 +600,8 @@ uhso_attach(device_t self) CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio", - CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, sc, 0, + uhso_radio_sysctl, "I", "Enable radio"); /* * The default interface description on most Option devices isn't @@ -619,7 +621,7 @@ uhso_attach(device_t self) CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports"); tree = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, - "port", CTLFLAG_RD, NULL, "Serial ports"); + "port", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Serial ports"); } /* @@ -638,7 +640,7 @@ uhso_attach(device_t self) desc = uhso_port_type_sysctl[port]; tty_node = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(tree), OID_AUTO, - desc, CTLFLAG_RD, NULL, ""); + desc, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); ht->ht_name[0] = 0; if (sc->sc_ttys == 1) Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/net/usb_ethernet.c Sat Feb 15 18:52:12 2020 (r357972) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include -static SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD, 0, +static SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "USB Ethernet parameters"); #define UE_LOCK(_ue) mtx_lock((_ue)->ue_mtx) @@ -274,10 +274,10 @@ ue_attach_post_task(struct usb_proc_msg *_task) snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, &SYSCTL_NODE_CHILDREN(_net, ue), - OID_AUTO, num, CTLFLAG_RD, NULL, ""); + OID_AUTO, num, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); SYSCTL_ADD_PROC(&ue->ue_sysctl_ctx, - SYSCTL_CHILDREN(ue->ue_sysctl_oid), OID_AUTO, - "%parent", CTLTYPE_STRING | CTLFLAG_RD, ue, 0, + SYSCTL_CHILDREN(ue->ue_sysctl_oid), OID_AUTO, "%parent", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, ue, 0, ue_sysctl_parent, "A", "parent device"); UE_LOCK(ue); Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/u3g.c Sat Feb 15 18:52:12 2020 (r357972) @@ -67,7 +67,8 @@ #ifdef USB_DEBUG static int u3g_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB 3g"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB 3g"); SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RWTUN, &u3g_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/ubsa.c Sat Feb 15 18:52:12 2020 (r357972) @@ -90,7 +90,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ubsa_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW, 0, "USB ubsa"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ubsa"); SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RWTUN, &ubsa_debug, 0, "ubsa debug level"); #endif Modified: head/sys/dev/usb/serial/ubser.c ============================================================================== --- head/sys/dev/usb/serial/ubser.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/ubser.c Sat Feb 15 18:52:12 2020 (r357972) @@ -111,7 +111,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ubser_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW, 0, "USB ubser"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ubser"); SYSCTL_INT(_hw_usb_ubser, OID_AUTO, debug, CTLFLAG_RWTUN, &ubser_debug, 0, "ubser debug level"); #endif Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uchcom.c Sat Feb 15 18:52:12 2020 (r357972) @@ -98,7 +98,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int uchcom_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uchcom, CTLFLAG_RW, 0, "USB uchcom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uchcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uchcom"); SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uchcom_debug, 0, "uchcom debug level"); #endif Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/ufoma.c Sat Feb 15 18:52:12 2020 (r357972) @@ -457,16 +457,16 @@ ufoma_attach(device_t dev) soid = device_get_sysctl_tree(dev); SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "supportmode", - CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_support, - "A", "Supporting port role"); + CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0, + ufoma_sysctl_support, "A", "Supporting port role"); SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "currentmode", - CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_current, - "A", "Current port role"); + CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0, + ufoma_sysctl_current, "A", "Current port role"); SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "openmode", - CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open, - "A", "Mode to transit when port is opened"); + CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0, + ufoma_sysctl_open, "A", "Mode to transit when port is opened"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "comunit", CTLFLAG_RD, &(sc->sc_super_ucom.sc_unit), 0, "Unit number as USB serial"); Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uftdi.c Sat Feb 15 18:52:12 2020 (r357972) @@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$"); #include #include -static SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uftdi"); #ifdef USB_DEBUG static int uftdi_debug = 0; Modified: head/sys/dev/usb/serial/ulpt.c ============================================================================== --- head/sys/dev/usb/serial/ulpt.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/ulpt.c Sat Feb 15 18:52:12 2020 (r357972) @@ -76,7 +76,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ulpt_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW, 0, "USB ulpt"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ulpt"); SYSCTL_INT(_hw_usb_ulpt, OID_AUTO, debug, CTLFLAG_RWTUN, &ulpt_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/umcs.c ============================================================================== --- head/sys/dev/usb/serial/umcs.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/umcs.c Sat Feb 15 18:52:12 2020 (r357972) @@ -81,7 +81,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int umcs_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, umcs, CTLFLAG_RW, 0, "USB umcs quadport serial adapter"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, umcs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB umcs quadport serial adapter"); SYSCTL_INT(_hw_usb_umcs, OID_AUTO, debug, CTLFLAG_RWTUN, &umcs_debug, 0, "Debug level"); #endif /* USB_DEBUG */ Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/umodem.c Sat Feb 15 18:52:12 2020 (r357972) @@ -113,7 +113,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int umodem_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB umodem"); SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RWTUN, &umodem_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/umoscom.c ============================================================================== --- head/sys/dev/usb/serial/umoscom.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/umoscom.c Sat Feb 15 18:52:12 2020 (r357972) @@ -50,7 +50,8 @@ #ifdef USB_DEBUG static int umoscom_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, umoscom, CTLFLAG_RW, 0, "USB umoscom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, umoscom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB umoscom"); SYSCTL_INT(_hw_usb_umoscom, OID_AUTO, debug, CTLFLAG_RWTUN, &umoscom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uplcom.c Sat Feb 15 18:52:12 2020 (r357972) @@ -113,7 +113,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int uplcom_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW, 0, "USB uplcom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uplcom"); SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uplcom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/usb_serial.c Sat Feb 15 18:52:12 2020 (r357972) @@ -97,7 +97,8 @@ __FBSDID("$FreeBSD$"); #include "opt_gdb.h" -static SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW, 0, "USB ucom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ucom"); static int ucom_pps_mode; Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uslcom.c Sat Feb 15 18:52:12 2020 (r357972) @@ -59,7 +59,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int uslcom_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uslcom, CTLFLAG_RW, 0, "USB uslcom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uslcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uslcom"); SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uslcom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uvisor.c ============================================================================== --- head/sys/dev/usb/serial/uvisor.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uvisor.c Sat Feb 15 18:52:12 2020 (r357972) @@ -82,7 +82,8 @@ #ifdef USB_DEBUG static int uvisor_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uvisor"); SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RWTUN, &uvisor_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uvscom.c ============================================================================== --- head/sys/dev/usb/serial/uvscom.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/serial/uvscom.c Sat Feb 15 18:52:12 2020 (r357972) @@ -72,7 +72,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int uvscom_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW, 0, "USB uvscom"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB uvscom"); SYSCTL_INT(_hw_usb_uvscom, OID_AUTO, debug, CTLFLAG_RWTUN, &uvscom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/storage/cfumass.c ============================================================================== --- head/sys/dev/usb/storage/cfumass.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/storage/cfumass.c Sat Feb 15 18:52:12 2020 (r357972) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include -SYSCTL_NODE(_hw_usb, OID_AUTO, cfumass, CTLFLAG_RW, 0, +SYSCTL_NODE(_hw_usb, OID_AUTO, cfumass, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "CAM Target Layer USB Mass Storage Frontend"); static int debug = 1; SYSCTL_INT(_hw_usb_cfumass, OID_AUTO, debug, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/storage/umass.c Sat Feb 15 18:52:12 2020 (r357972) @@ -168,7 +168,8 @@ __FBSDID("$FreeBSD$"); static int umass_debug; static int umass_throttle; -static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB umass"); SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RWTUN, &umass_debug, 0, "umass debug level"); SYSCTL_INT(_hw_usb_umass, OID_AUTO, throttle, CTLFLAG_RWTUN, Modified: head/sys/dev/usb/storage/urio.c ============================================================================== --- head/sys/dev/usb/storage/urio.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/storage/urio.c Sat Feb 15 18:52:12 2020 (r357972) @@ -82,7 +82,8 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int urio_debug = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW, 0, "USB urio"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB urio"); SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RWTUN, &urio_debug, 0, "urio debug level"); #endif Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/storage/ustorage_fs.c Sat Feb 15 18:52:12 2020 (r357972) @@ -72,7 +72,8 @@ #ifdef USB_DEBUG static int ustorage_fs_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, ustorage_fs, CTLFLAG_RW, 0, "USB ustorage_fs"); +SYSCTL_NODE(_hw_usb, OID_AUTO, ustorage_fs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "USB ustorage_fs"); SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RWTUN, &ustorage_fs_debug, 0, "ustorage_fs debug level"); #endif Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template.c Sat Feb 15 18:52:12 2020 (r357972) @@ -115,7 +115,7 @@ static usb_error_t usb_temp_setup_by_index(struct usb_ uint16_t index); static void usb_temp_init(void *); -SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0, +SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB device side templates"); SYSCTL_PROC(_hw_usb, OID_AUTO, template_power, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, Modified: head/sys/dev/usb/template/usb_template_audio.c ============================================================================== --- head/sys/dev/usb/template/usb_template_audio.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_audio.c Sat Feb 15 18:52:12 2020 (r357972) @@ -433,7 +433,7 @@ audio_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&audio_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Audio Interface device side template"); SYSCTL_ADD_U16(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, &usb_template_audio.idVendor, Modified: head/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdce.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_cdce.c Sat Feb 15 18:52:12 2020 (r357972) @@ -302,7 +302,7 @@ eth_init(void *arg __unused) parent = SYSCTL_ADD_NODE(ð_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB CDC Ethernet device side template"); SYSCTL_ADD_U16(ð_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_cdceem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdceem.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_cdceem.c Sat Feb 15 18:52:12 2020 (r357972) @@ -220,7 +220,7 @@ cdceem_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&cdceem_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB CDC EEM device side template"); SYSCTL_ADD_U16(&cdceem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- head/sys/dev/usb/template/usb_template_kbd.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_kbd.c Sat Feb 15 18:52:12 2020 (r357972) @@ -255,7 +255,7 @@ kbd_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&kbd_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Keyboard device side template"); SYSCTL_ADD_U16(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_midi.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_midi.c Sat Feb 15 18:52:12 2020 (r357972) @@ -275,7 +275,7 @@ midi_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&midi_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB MIDI device side template"); SYSCTL_ADD_U16(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- head/sys/dev/usb/template/usb_template_modem.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_modem.c Sat Feb 15 18:52:12 2020 (r357972) @@ -289,7 +289,7 @@ modem_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&modem_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Virtual serial port device side template"); SYSCTL_ADD_U16(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mouse.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_mouse.c Sat Feb 15 18:52:12 2020 (r357972) @@ -253,7 +253,7 @@ mouse_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&mouse_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Mouse device side template"); SYSCTL_ADD_U16(&mouse_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_msc.c ============================================================================== --- head/sys/dev/usb/template/usb_template_msc.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_msc.c Sat Feb 15 18:52:12 2020 (r357972) @@ -219,7 +219,7 @@ msc_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&msc_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Mass Storage device side template"); SYSCTL_ADD_U16(&msc_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_mtp.c Sat Feb 15 18:52:12 2020 (r357972) @@ -286,7 +286,7 @@ mtp_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&mtp_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Media Transfer Protocol device side template"); SYSCTL_ADD_U16(&mtp_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_multi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_multi.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_multi.c Sat Feb 15 18:52:12 2020 (r357972) @@ -458,7 +458,7 @@ multi_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&multi_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Multifunction device side template"); SYSCTL_ADD_U16(&multi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_phone.c ============================================================================== --- head/sys/dev/usb/template/usb_template_phone.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_phone.c Sat Feb 15 18:52:12 2020 (r357972) @@ -454,7 +454,7 @@ phone_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&phone_ctx_list, SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO, - parent_name, CTLFLAG_RW, + parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB Phone device side template"); SYSCTL_ADD_U16(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO, "vendor_id", CTLFLAG_RWTUN, Modified: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- head/sys/dev/usb/template/usb_template_serialnet.c Sat Feb 15 18:48:38 2020 (r357971) +++ head/sys/dev/usb/template/usb_template_serialnet.c Sat Feb 15 18:52:12 2020 (r357972) @@ -412,7 +412,7 @@ serialnet_init(void *arg __unused) parent = SYSCTL_ADD_NODE(&serialnet_ctx_list, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 15 18:54:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1BF824441F; Sat, 15 Feb 2020 18:54:59 +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) server-signature RSA-PSS (4096 bits) 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 48KfZC67Cpz4bT2; Sat, 15 Feb 2020 18:54:59 +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 CDA401973A; Sat, 15 Feb 2020 18:54:59 +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 01FIsxtI074807; Sat, 15 Feb 2020 18:54:59 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FIsxoh074806; Sat, 15 Feb 2020 18:54:59 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002151854.01FIsxoh074806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sat, 15 Feb 2020 18:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357973 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 357973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:55:00 -0000 Author: kaktus Date: Sat Feb 15 18:54:59 2020 New Revision: 357973 URL: https://svnweb.freebsd.org/changeset/base/357973 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: hselasky, kib, zeising Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23631 Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Feb 15 18:52:12 2020 (r357972) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Feb 15 18:54:59 2020 (r357973) @@ -91,7 +91,8 @@ __FBSDID("$FreeBSD$"); #include #endif -SYSCTL_NODE(_compat, OID_AUTO, linuxkpi, CTLFLAG_RW, 0, "LinuxKPI parameters"); +SYSCTL_NODE(_compat, OID_AUTO, linuxkpi, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "LinuxKPI parameters"); int linuxkpi_debug; SYSCTL_INT(_compat_linuxkpi, OID_AUTO, debug, CTLFLAG_RWTUN, @@ -2441,8 +2442,8 @@ linux_compat_init(void *arg) kobject_init(&linux_root_device.kobj, &linux_dev_ktype); kobject_set_name(&linux_root_device.kobj, "device"); linux_root_device.kobj.oidp = SYSCTL_ADD_NODE(NULL, - SYSCTL_CHILDREN(rootoid), OID_AUTO, "device", CTLFLAG_RD, NULL, - "device"); + SYSCTL_CHILDREN(rootoid), OID_AUTO, "device", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "device"); linux_root_device.bsddev = root_bus; linux_class_misc.name = "misc"; class_register(&linux_class_misc); From owner-svn-src-all@freebsd.org Sat Feb 15 18:57:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FB2D2446D8; Sat, 15 Feb 2020 18:57:52 +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) server-signature RSA-PSS (4096 bits) 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 48KfdX1gvQz4bqM; Sat, 15 Feb 2020 18:57:52 +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 34C4719754; Sat, 15 Feb 2020 18:57:52 +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 01FIvqVd075020; Sat, 15 Feb 2020 18:57:52 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FIvnvD075009; Sat, 15 Feb 2020 18:57:49 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202002151857.01FIvnvD075009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sat, 15 Feb 2020 18:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357974 - in head/sys/amd64/vmm: . amd intel io X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: in head/sys/amd64/vmm: . amd intel io X-SVN-Commit-Revision: 357974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 18:57:52 -0000 Author: kaktus Date: Sat Feb 15 18:57:49 2020 New Revision: 357974 URL: https://svnweb.freebsd.org/changeset/base/357974 Log: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (4 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23625 X-Generally looks fine: jhb Modified: head/sys/amd64/vmm/amd/amdvi_hw.c head/sys/amd64/vmm/amd/npt.c head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/ept.c head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/io/iommu.c head/sys/amd64/vmm/io/ppt.c head/sys/amd64/vmm/io/vrtc.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/amd/amdvi_hw.c ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_hw.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/amd/amdvi_hw.c Sat Feb 15 18:57:49 2020 (r357974) @@ -58,7 +58,8 @@ __FBSDID("$FreeBSD$"); #include "amdvi_priv.h" SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, amdvi, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, amdvi, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); #define MOD_INC(a, s, m) (((a) + (s)) % ((m) * (s))) #define MOD_DEC(a, s, m) (((a) - (s)) % ((m) * (s))) @@ -947,16 +948,16 @@ amdvi_add_sysctl(struct amdvi_softc *softc) SYSCTL_ADD_U16(ctx, child, OID_AUTO, "end_dev_rid", CTLFLAG_RD, &softc->end_dev_rid, 0, "End of device under this IOMMU"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "command_head", - CTLTYPE_UINT | CTLFLAG_RD, softc, 0, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 0, amdvi_handle_sysctl, "IU", "Command head"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "command_tail", - CTLTYPE_UINT | CTLFLAG_RD, softc, 1, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 1, amdvi_handle_sysctl, "IU", "Command tail"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "event_head", - CTLTYPE_UINT | CTLFLAG_RD, softc, 2, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 2, amdvi_handle_sysctl, "IU", "Command head"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "event_tail", - CTLTYPE_UINT | CTLFLAG_RD, softc, 3, + CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 3, amdvi_handle_sysctl, "IU", "Command tail"); } Modified: head/sys/amd64/vmm/amd/npt.c ============================================================================== --- head/sys/amd64/vmm/amd/npt.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/amd/npt.c Sat Feb 15 18:57:49 2020 (r357974) @@ -41,7 +41,8 @@ __FBSDID("$FreeBSD$"); #include "npt.h" SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, npt, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, npt, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); static int npt_flags; SYSCTL_INT(_hw_vmm_npt, OID_AUTO, pmap_flags, CTLFLAG_RD, Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/amd/svm.c Sat Feb 15 18:57:49 2020 (r357974) @@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$"); #include "npt.h" SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, svm, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, svm, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); /* * SVM CPUID function 0x8000_000A, edx bit decoding. Modified: head/sys/amd64/vmm/intel/ept.c ============================================================================== --- head/sys/amd64/vmm/intel/ept.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/intel/ept.c Sat Feb 15 18:57:49 2020 (r357974) @@ -68,7 +68,8 @@ __FBSDID("$FreeBSD$"); #define EPT_ENABLE_AD_BITS (1 << 6) SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, ept, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, ept, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); static int ept_enable_ad_bits; Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/intel/vmx.c Sat Feb 15 18:57:49 2020 (r357974) @@ -123,7 +123,8 @@ static MALLOC_DEFINE(M_VMX, "vmx", "vmx"); static MALLOC_DEFINE(M_VLAPIC, "vlapic", "vlapic"); SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, vmx, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, vmx, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); int vmxon_enabled[MAXCPU]; static char vmxon_region[MAXCPU][PAGE_SIZE] __aligned(PAGE_SIZE); @@ -150,7 +151,9 @@ SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, initialized, CTLFLAG /* * Optional capabilities */ -static SYSCTL_NODE(_hw_vmm_vmx, OID_AUTO, cap, CTLFLAG_RW, NULL, NULL); +static SYSCTL_NODE(_hw_vmm_vmx, OID_AUTO, cap, + CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); static int cap_halt_exit; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, halt_exit, CTLFLAG_RD, &cap_halt_exit, 0, Modified: head/sys/amd64/vmm/io/iommu.c ============================================================================== --- head/sys/amd64/vmm/io/iommu.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/io/iommu.c Sat Feb 15 18:57:49 2020 (r357974) @@ -48,7 +48,8 @@ __FBSDID("$FreeBSD$"); #include "iommu.h" SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, iommu, CTLFLAG_RW, 0, "bhyve iommu parameters"); +SYSCTL_NODE(_hw_vmm, OID_AUTO, iommu, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "bhyve iommu parameters"); static int iommu_avail; SYSCTL_INT(_hw_vmm_iommu, OID_AUTO, initialized, CTLFLAG_RD, &iommu_avail, Modified: head/sys/amd64/vmm/io/ppt.c ============================================================================== --- head/sys/amd64/vmm/io/ppt.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/io/ppt.c Sat Feb 15 18:57:49 2020 (r357974) @@ -112,7 +112,8 @@ struct pptdev { }; SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW, 0, "bhyve passthru devices"); +SYSCTL_NODE(_hw_vmm, OID_AUTO, ppt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "bhyve passthru devices"); static int num_pptdevs; SYSCTL_INT(_hw_vmm_ppt, OID_AUTO, devices, CTLFLAG_RD, &num_pptdevs, 0, Modified: head/sys/amd64/vmm/io/vrtc.c ============================================================================== --- head/sys/amd64/vmm/io/vrtc.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/io/vrtc.c Sat Feb 15 18:57:49 2020 (r357974) @@ -106,7 +106,8 @@ static void vrtc_set_reg_c(struct vrtc *vrtc, uint8_t static MALLOC_DEFINE(M_VRTC, "vrtc", "bhyve virtual rtc"); SYSCTL_DECL(_hw_vmm); -SYSCTL_NODE(_hw_vmm, OID_AUTO, vrtc, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw_vmm, OID_AUTO, vrtc, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); static int rtc_flag_broken_time = 1; SYSCTL_INT(_hw_vmm_vrtc, OID_AUTO, flag_broken_time, CTLFLAG_RDTUN, Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/vmm.c Sat Feb 15 18:57:49 2020 (r357974) @@ -215,7 +215,8 @@ static MALLOC_DEFINE(M_VM, "vm", "vm"); /* statistics */ static VMM_STAT(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); -SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW, NULL, NULL); +SYSCTL_NODE(_hw, OID_AUTO, vmm, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + NULL); /* * Halt the guest if all vcpus are executing a HLT instruction with Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/vmm_dev.c Sat Feb 15 18:57:49 2020 (r357974) @@ -962,8 +962,9 @@ out: return (error); } SYSCTL_PROC(_hw_vmm, OID_AUTO, destroy, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, - NULL, 0, sysctl_vmm_destroy, "A", NULL); + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + NULL, 0, sysctl_vmm_destroy, "A", + NULL); static struct cdevsw vmmdevsw = { .d_name = "vmmdev", @@ -1045,8 +1046,9 @@ out: return (error); } SYSCTL_PROC(_hw_vmm, OID_AUTO, create, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, - NULL, 0, sysctl_vmm_create, "A", NULL); + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, + NULL, 0, sysctl_vmm_create, "A", + NULL); void vmmdev_init(void) Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Sat Feb 15 18:54:59 2020 (r357973) +++ head/sys/amd64/vmm/x86.c Sat Feb 15 18:57:49 2020 (r357974) @@ -50,7 +50,8 @@ __FBSDID("$FreeBSD$"); #include "x86.h" SYSCTL_DECL(_hw_vmm); -static SYSCTL_NODE(_hw_vmm, OID_AUTO, topology, CTLFLAG_RD, 0, NULL); +static SYSCTL_NODE(_hw_vmm, OID_AUTO, topology, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + NULL); #define CPUID_VM_HIGH 0x40000000 From owner-svn-src-all@freebsd.org Sat Feb 15 19:13:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5BD0245345; Sat, 15 Feb 2020 19:13:38 +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) server-signature RSA-PSS (4096 bits) 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 48Kfzk4PgBz4dJC; Sat, 15 Feb 2020 19:13:38 +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 9253919B2E; Sat, 15 Feb 2020 19:13:38 +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 01FJDcN1086932; Sat, 15 Feb 2020 19:13:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FJDbgU086927; Sat, 15 Feb 2020 19:13:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202002151913.01FJDbgU086927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 15 Feb 2020 19:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357975 - head/usr.bin/random X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.bin/random X-SVN-Commit-Revision: 357975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 19:13:38 -0000 Author: cem Date: Sat Feb 15 19:13:37 2020 New Revision: 357975 URL: https://svnweb.freebsd.org/changeset/base/357975 Log: random(6): Re-add undocumented support for floating point denominators And document it in the manual page. PR: 244139 Submitted by: Keith White (earlier version) Modified: head/usr.bin/random/random.6 head/usr.bin/random/random.c head/usr.bin/random/randomize_fd.c head/usr.bin/random/randomize_fd.h Modified: head/usr.bin/random/random.6 ============================================================================== --- head/usr.bin/random/random.6 Sat Feb 15 18:57:49 2020 (r357974) +++ head/usr.bin/random/random.6 Sat Feb 15 19:13:37 2020 (r357975) @@ -28,7 +28,7 @@ .\" @(#)random.6 8.2 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd December 12, 2019 +.Dd February 15, 2020 .Dt RANDOM 6 .Os .Sh NAME @@ -42,27 +42,26 @@ .Sh DESCRIPTION .Nm Random has two distinct modes of operations. -The default is to read in lines -from the standard input and randomly write them out -to the standard output with a probability of -1 / +The default is to read lines from standard input and write them to standard +output with a probability of 1.0 / .Ar denominator . +.Ar ( denominator +is a real number greater than or equal to 1.0.) The default .Ar denominator -for this mode of operation is 2, giving each line a 50/50 chance of +for this mode of operation is 2.0, giving each line a 50% chance of being displayed. .Pp -The second mode of operation is to read in a file from -.Ar filename -and randomize the contents of the file and send it back out to +The second mode of operation, selected with the +.Fl f Ar filename +option, reads the specified file and outputs the randomized contents to standard output. -The contents can be randomized based off of newlines or based off of -space characters as determined by -.Xr isspace 3 . +The contents can be randomized in units of lines (split on newline characters) +or in units of words (split on space characters as determined by +.Xr isspace 3 . ) The default .Ar denominator -for this mode of operation is 1, which gives each line a chance to be -displayed, but in a random order. +for this mode of operation is 1.0, which displays every line. .Pp The options are as follows: .Bl -tag -width Ds @@ -75,6 +74,9 @@ does not read or write anything, and simply exits with exit value of 0 to .Ar denominator \&- 1, inclusive. +In this mode, +.Ar denominator +must be less than or equal to 256. .It Fl f Ar filename The .Fl f @@ -83,27 +85,18 @@ option is used to specify the to read from. Standard input is used if .Ar filename -is set to -.Sq Fl . +is +.Sq - . .It Fl l Randomize the input via newlines (the default). .It Fl r -The -.Fl r -option guarantees that the output is unbuffered. +Do not buffer output. .It Fl U -Tells -.Xr random 6 -that it is okay for it to reuse any given line or word when creating a -randomized output. +Reuse any given line or word when creating a randomized output. .It Fl u -Tells -.Xr random 6 -not to select the same line or word from a file more than once (the -default). +Do not select the same line or word from a file more than once (the default). This does not guarantee uniqueness if there are two of the -same tokens from the input, but it does prevent selecting the same -token more than once. +same tokens in the input. .It Fl w Randomize words separated by .Xr isspace 3 @@ -116,7 +109,12 @@ The functionality to randomizing lines and words was added in 2003 by .An Sean Chittenden Aq Mt seanc@FreeBSD.org . .Sh BUGS +This tool is a remnant of the "games" collection formerly part of +.Fx +base. +It probably should have been removed to ports with the rest of that collection. +It does not have a coherent purpose and the motivation for it to be a core base +utility is nonobvious. +.Pp No index is used when printing out tokens from the list which makes it rather slow for large files (10MB+). -For smaller -files, however, it should still be quite fast and efficient. Modified: head/usr.bin/random/random.c ============================================================================== --- head/usr.bin/random/random.c Sat Feb 15 18:57:49 2020 (r357974) +++ head/usr.bin/random/random.c Sat Feb 15 19:13:37 2020 (r357975) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -67,11 +68,12 @@ main(int argc, char *argv[]) { double denom; int ch, fd, random_exit, randomize_lines, random_type, ret, - selected, unique_output, unbuffer_output; + unique_output, unbuffer_output; + bool selected; char *ep; const char *filename; - denom = 0; + denom = 0.; filename = "/dev/fd/0"; random_type = RANDOM_TYPE_UNSET; random_exit = randomize_lines = unbuffer_output = 0; @@ -119,16 +121,16 @@ main(int argc, char *argv[]) switch (argc) { case 0: - denom = (randomize_lines ? 1 : 2); + denom = (randomize_lines ? 1. : 2.); break; case 1: errno = 0; denom = strtod(*argv, &ep); if (errno == ERANGE) err(1, "%s", *argv); - if (denom <= 0 || *ep != '\0') + if (denom < 1. || *ep != '\0') errx(1, "denominator is not valid."); - if (random_exit && denom > 256) + if (random_exit && denom > 256.) errx(1, "denominator must be <= 256 for random exit."); break; default: @@ -160,24 +162,25 @@ main(int argc, char *argv[]) return (arc4random_uniform(denom)); /* - * Select whether to print the first line. (Prime the pump.) - * We find a random number between 0 and denom - 1 and, if it's - * 0 (which has a 1 / denom chance of being true), we select the - * line. + * Filter stdin, selecting lines with probability 1/denom, one + * character at a time. */ - selected = (arc4random_uniform(denom) == 0); - while ((ch = getchar()) != EOF) { - if (selected) - (void)putchar(ch); - if (ch == '\n') { - /* End of that line. See if we got an error. */ - if (ferror(stdout)) - err(2, "stdout"); - - /* Now see if the next line is to be printed. */ - selected = (arc4random_uniform(denom) == 0); + do { + selected = random_uniform_denom(denom); + if (selected) { + while ((ch = getchar()) != EOF) { + putchar(ch); + if (ch == '\n') + break; + } + } else { + while ((ch = getchar()) != EOF) + if (ch == '\n') + break; } - } + if (ferror(stdout)) + err(2, "stdout"); + } while (ch != EOF); if (ferror(stdin)) err(2, "stdin"); exit (0); Modified: head/usr.bin/random/randomize_fd.c ============================================================================== --- head/usr.bin/random/randomize_fd.c Sat Feb 15 18:57:49 2020 (r357974) +++ head/usr.bin/random/randomize_fd.c Sat Feb 15 19:13:37 2020 (r357975) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -218,7 +219,7 @@ make_token: if (n->cp == NULL) break; - if (arc4random_uniform(denom) == 0) { + if (random_uniform_denom(denom)) { ret = printf("%.*s", (int)n->len - 1, n->cp); if (ret < 0) Modified: head/usr.bin/random/randomize_fd.h ============================================================================== --- head/usr.bin/random/randomize_fd.h Sat Feb 15 18:57:49 2020 (r357974) +++ head/usr.bin/random/randomize_fd.h Sat Feb 15 19:13:37 2020 (r357975) @@ -42,4 +42,40 @@ struct rand_node { int randomize_fd(int fd, int type, int unique, double denom); +/* + * Generates a random number uniformly in the range [0.0, 1.0). + */ +static inline double +random_unit_float(void) +{ + static const uint64_t denom = (1ull << 53); + static const uint64_t mask = denom - 1; + + uint64_t rand64; + + /* + * arc4random_buf(...) in this use generates integer outputs in [0, + * UINT64_MAX]. + * + * The double mantissa only has 53 bits, so we uniformly mask off the + * high 11 bits and then floating-point divide by 2^53 to achieve a + * result in [0, 1). + * + * We are not allowed to emit 1.0, so denom must be one greater than + * the possible range of the preceeding step. + */ + arc4random_buf(&rand64, sizeof(rand64)); + rand64 &= mask; + return ((double)rand64 / denom); +} + +/* + * Returns true with probability 1 / denom (a floating point number >= 1). + * Otherwise, returns false. + */ +static inline bool +random_uniform_denom(double denom) +{ + return ((uint64_t)(denom * random_unit_float()) == 0); +} #endif From owner-svn-src-all@freebsd.org Sat Feb 15 19:15:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AAB52455FD; Sat, 15 Feb 2020 19:15:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Kg1n19xWz4dcL; Sat, 15 Feb 2020 19:15:25 +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 23B1F19B3A; Sat, 15 Feb 2020 19:15:25 +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 01FJFPGS087102; Sat, 15 Feb 2020 19:15:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FJFPOx087101; Sat, 15 Feb 2020 19:15:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002151915.01FJFPOx087101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 15 Feb 2020 19:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357976 - head/sys/dev/hptmv X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/sys/dev/hptmv X-SVN-Commit-Revision: 357976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 19:15:25 -0000 Author: dim Date: Sat Feb 15 19:15:24 2020 New Revision: 357976 URL: https://svnweb.freebsd.org/changeset/base/357976 Log: Merge r357970 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in hptmv(4): sys/dev/hptmv/ioctl.c:240:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] _vbus_p=pArray->pVBus; ^ sys/dev/hptmv/ioctl.c:237:10: note: previous statement is here if(!mIsArray(pArray)) ^ This is because the return statement after the if statement was not indented. (Note that this file has been idented assuming 4-space tabs.) MFC after: 3 days Modified: head/sys/dev/hptmv/ioctl.c Directory Properties: head/ (props changed) Modified: head/sys/dev/hptmv/ioctl.c ============================================================================== --- head/sys/dev/hptmv/ioctl.c Sat Feb 15 19:13:37 2020 (r357975) +++ head/sys/dev/hptmv/ioctl.c Sat Feb 15 19:15:24 2020 (r357976) @@ -235,7 +235,7 @@ int Kernel_DeviceIoControl(_VBUS_ARG return -1; if(!mIsArray(pArray)) - return -1; + return -1; _vbus_p=pArray->pVBus; pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; From owner-svn-src-all@freebsd.org Sat Feb 15 19:31:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43FDD246443; Sat, 15 Feb 2020 19:31:41 +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) server-signature RSA-PSS (4096 bits) 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 48KgNY161jz3BpD; Sat, 15 Feb 2020 19:31:41 +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 0838D19E6C; Sat, 15 Feb 2020 19:31:41 +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 01FJVewT097131; Sat, 15 Feb 2020 19:31:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FJVebl097130; Sat, 15 Feb 2020 19:31:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002151931.01FJVebl097130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 15 Feb 2020 19:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357977 - head/lib/libfetch X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libfetch X-SVN-Commit-Revision: 357977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 19:31:41 -0000 Author: kevans Date: Sat Feb 15 19:31:40 2020 New Revision: 357977 URL: https://svnweb.freebsd.org/changeset/base/357977 Log: fetch(3): move bits of fetch_socks5_getenv around This commit separates out port parsing and validation from grabbing the host from the env var. The only related bit really is that we need to be more specific with the delimiter in the IPv6 case. Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Sat Feb 15 19:15:24 2020 (r357976) +++ head/lib/libfetch/common.c Sat Feb 15 19:31:40 2020 (r357977) @@ -525,54 +525,50 @@ int fetch_socks5_getenv(char **host, int *port) { char *socks5env, *endptr, *ext; + const char *portDelim; + size_t slen; + portDelim = ":"; if ((socks5env = getenv("SOCKS5_PROXY")) == NULL || *socks5env == '\0') { *host = NULL; *port = -1; return (-1); } - /* IPv6 addresses begin and end in brackets */ + /* + * IPv6 addresses begin and end in brackets. Set the port delimiter + * accordingly and search for it so we can do appropriate validation. + */ + if (socks5env[0] == '[') + portDelim = "]:"; + + slen = strlen(socks5env); + ext = strstr(socks5env, portDelim); if (socks5env[0] == '[') { - if (socks5env[strlen(socks5env) - 1] == ']') { - *host = strndup(socks5env, strlen(socks5env)); + if (socks5env[slen - 1] == ']') { + *host = strndup(socks5env, slen); if (*host == NULL) goto fail; - *port = 1080; /* Default port as defined in RFC1928 */ - } else { - ext = strstr(socks5env, "]:"); - if (ext == NULL) { - socks5_seterr(SOCKS5_ERR_BAD_PROXY_FORMAT); - return (0); - } - ext=ext+1; - *host = strndup(socks5env, ext - socks5env); - if (*host == NULL) - goto fail; - errno = 0; - *port = strtoimax(ext + 1, (char **)&endptr, 10); - if (*endptr != '\0' || errno != 0 || *port < 0 || - *port > 65535) { - socks5_seterr(SOCKS5_ERR_BAD_PORT); - return (0); - } + } else if (ext == NULL) { + socks5_seterr(SOCKS5_ERR_BAD_PROXY_FORMAT); + return (0); } } else { - ext = strrchr(socks5env, ':'); - if (ext == NULL) { - *host = strdup(socks5env); - *port = 1080; - } else { - *host = strndup(socks5env, ext-socks5env); - if (*host == NULL) - goto fail; - errno = 0; - *port = strtoimax(ext + 1, (char **)&endptr, 10); - if (*endptr != '\0' || errno != 0 || *port < 0 || - *port > 65535) { - socks5_seterr(SOCKS5_ERR_BAD_PORT); - return (0); - } + *host = strndup(socks5env, ext - socks5env); + if (*host == NULL) + goto fail; + } + + if (ext == NULL) { + *port = 1080; /* Default port as defined in RFC1928 */ + } else { + ext += strlen(portDelim); + errno = 0; + *port = strtoimax(ext, (char **)&endptr, 10); + if (*endptr != '\0' || errno != 0 || *port < 0 || + *port > 65535) { + socks5_seterr(SOCKS5_ERR_BAD_PORT); + return (0); } } From owner-svn-src-all@freebsd.org Sat Feb 15 19:39:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6564246819; Sat, 15 Feb 2020 19:39:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KgYy5fFGz3DGm; Sat, 15 Feb 2020 19:39:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8FE019EC8; Sat, 15 Feb 2020 19:39:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01FJdo6J099137; Sat, 15 Feb 2020 19:39:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FJdocO099136; Sat, 15 Feb 2020 19:39:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002151939.01FJdocO099136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 15 Feb 2020 19:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357978 - head/lib/libfetch X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libfetch X-SVN-Commit-Revision: 357978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 19:39:51 -0000 Author: kevans Date: Sat Feb 15 19:39:50 2020 New Revision: 357978 URL: https://svnweb.freebsd.org/changeset/base/357978 Log: fetch(3): fix regression in IPv6:port spec from r357977 In case the port was specified, we never actually populated *host. Do so now. Pointy hat: kevans Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Sat Feb 15 19:31:40 2020 (r357977) +++ head/lib/libfetch/common.c Sat Feb 15 19:39:50 2020 (r357978) @@ -547,18 +547,18 @@ fetch_socks5_getenv(char **host, int *port) if (socks5env[0] == '[') { if (socks5env[slen - 1] == ']') { *host = strndup(socks5env, slen); - if (*host == NULL) - goto fail; - } else if (ext == NULL) { + } else if (ext != NULL) { + *host = strndup(socks5env, ext - socks5env + 1); + } else { socks5_seterr(SOCKS5_ERR_BAD_PROXY_FORMAT); return (0); } } else { *host = strndup(socks5env, ext - socks5env); - if (*host == NULL) - goto fail; } + if (*host == NULL) + goto fail; if (ext == NULL) { *port = 1080; /* Default port as defined in RFC1928 */ } else { From owner-svn-src-all@freebsd.org Sat Feb 15 19:47:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E28A246AD7; Sat, 15 Feb 2020 19:47:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KglB1lWRz3FWZ; Sat, 15 Feb 2020 19:47:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 363C91A08B; Sat, 15 Feb 2020 19:47:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01FJloF2005198; Sat, 15 Feb 2020 19:47:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FJloGc005197; Sat, 15 Feb 2020 19:47:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002151947.01FJloGc005197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 15 Feb 2020 19:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357979 - head/lib/libfetch X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libfetch X-SVN-Commit-Revision: 357979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 19:47:50 -0000 Author: kevans Date: Sat Feb 15 19:47:49 2020 New Revision: 357979 URL: https://svnweb.freebsd.org/changeset/base/357979 Log: fetch(3): don't leak sockshost on failure fetch_socks5_getenv will allocate memory for the host (or set it to NULL) in all cases through the function; the caller is responsible for freeing it if we end up allocating. While I'm here, I've eliminated a label that just jumps to the next line... Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Sat Feb 15 19:39:50 2020 (r357978) +++ head/lib/libfetch/common.c Sat Feb 15 19:47:49 2020 (r357979) @@ -557,8 +557,10 @@ fetch_socks5_getenv(char **host, int *port) *host = strndup(socks5env, ext - socks5env); } - if (*host == NULL) - goto fail; + if (*host == NULL) { + fprintf(stderr, "Failure to allocate memory, exiting.\n"); + return (-1); + } if (ext == NULL) { *port = 1080; /* Default port as defined in RFC1928 */ } else { @@ -567,16 +569,14 @@ fetch_socks5_getenv(char **host, int *port) *port = strtoimax(ext, (char **)&endptr, 10); if (*endptr != '\0' || errno != 0 || *port < 0 || *port > 65535) { + free(*host); + *host = NULL; socks5_seterr(SOCKS5_ERR_BAD_PORT); return (0); } } return (2); - -fail: - fprintf(stderr, "Failure to allocate memory, exiting.\n"); - return (-1); } @@ -595,7 +595,11 @@ fetch_connect(const char *host, int port, int af, int DEBUGF("---> %s:%d\n", host, port); - /* Check if SOCKS5_PROXY env variable is set */ + /* + * Check if SOCKS5_PROXY env variable is set. fetch_socks5_getenv + * will either set sockshost = NULL or allocate memory in all cases. + */ + sockshost = NULL; if (!fetch_socks5_getenv(&sockshost, &socksport)) goto fail; @@ -662,7 +666,7 @@ fetch_connect(const char *host, int port, int af, int "failed to connect to SOCKS5 server %s:%d", sockshost, socksport); socks5_seterr(SOCKS5_ERR_CONN_REFUSED); - goto syserr1; + goto fail; } goto syserr; } @@ -680,9 +684,8 @@ fetch_connect(const char *host, int port, int af, int return (conn); syserr: fetch_syserr(); -syserr1: - goto fail; fail: + free(sockshost); if (sd >= 0) close(sd); if (cais != NULL) From owner-svn-src-all@freebsd.org Sat Feb 15 21:21:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F51D248FC0; Sat, 15 Feb 2020 21:21:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48Kjpy1y3gz4FKf; Sat, 15 Feb 2020 21:21:14 +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 3DB721B24C; Sat, 15 Feb 2020 21:21:14 +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 01FLLErM060870; Sat, 15 Feb 2020 21:21:14 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FLLEnY060869; Sat, 15 Feb 2020 21:21:14 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002152121.01FLLEnY060869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 15 Feb 2020 21:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357980 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 357980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 21:21:14 -0000 Author: kevans Date: Sat Feb 15 21:21:13 2020 New Revision: 357980 URL: https://svnweb.freebsd.org/changeset/base/357980 Log: committers-ports.dot: add myself as a ports committer Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Feb 15 19:47:49 2020 (r357979) +++ head/share/misc/committers-ports.dot Sat Feb 15 21:21:13 2020 (r357980) @@ -155,6 +155,7 @@ jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.or kai [label="Kai Knoblich\nkai@FreeBSD.org\n2019/02/01"] kami [label="Dominic Fandrey\nkami@FreeBSD.org\n2014/09/09"] kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2018/09/02"] +kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2020/02/14"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] kmoore [label="Kris Moore\nkmoore@FreeBSD.org\n2009/04/14"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] @@ -339,6 +340,7 @@ bapt -> ericbsd bapt -> grembo bapt -> jbeich bapt -> jlaffaye +bapt -> kevans bapt -> manu bapt -> marius bapt -> marino @@ -503,6 +505,7 @@ knu -> nork koobs -> brnrd koobs -> kami +koobs -> kevans koobs -> woodsb02 koobs -> xmj From owner-svn-src-all@freebsd.org Sat Feb 15 21:48:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB24024A015; Sat, 15 Feb 2020 21:48:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) 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 48KkQm52svz4T0r; Sat, 15 Feb 2020 21:48:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F81D1B684; Sat, 15 Feb 2020 21:48:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01FLmmhR077512; Sat, 15 Feb 2020 21:48:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FLmmrf077511; Sat, 15 Feb 2020 21:48:48 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002152148.01FLmmrf077511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 15 Feb 2020 21:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357981 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 357981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 21:48:48 -0000 Author: mjg Date: Sat Feb 15 21:48:48 2020 New Revision: 357981 URL: https://svnweb.freebsd.org/changeset/base/357981 Log: ufs: use faster lockgmr entry points in ffs_lock Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Sat Feb 15 21:21:13 2020 (r357980) +++ head/sys/ufs/ffs/ffs_vnops.c Sat Feb 15 21:48:48 2020 (r357981) @@ -444,9 +444,8 @@ ffs_lock(ap) VNPASS(vp->v_holdcnt != 0, vp); #endif lkp = vp->v_vnlock; - result = _lockmgr_args(lkp, flags, VI_MTX(vp), - LK_WMESG_DEFAULT, LK_PRIO_DEFAULT, LK_TIMO_DEFAULT, - ap->a_file, ap->a_line); + result = lockmgr_lock_flags(lkp, flags, + &VI_MTX(vp)->lock_object, ap->a_file, ap->a_line); if (lkp == vp->v_vnlock || result != 0) break; /* @@ -457,9 +456,7 @@ ffs_lock(ap) * right lock. Release it, and try to get the * new lock. */ - (void) _lockmgr_args(lkp, LK_RELEASE, NULL, - LK_WMESG_DEFAULT, LK_PRIO_DEFAULT, LK_TIMO_DEFAULT, - ap->a_file, ap->a_line); + lockmgr_unlock(lkp); if ((flags & (LK_INTERLOCK | LK_NOWAIT)) == (LK_INTERLOCK | LK_NOWAIT)) return (EBUSY); From owner-svn-src-all@freebsd.org Sat Feb 15 23:15:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFE7E24C0ED; Sat, 15 Feb 2020 23:15:43 +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) server-signature RSA-PSS (4096 bits) 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 48KmM34BLZz4M46; Sat, 15 Feb 2020 23:15:43 +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 ECAE01C730; Sat, 15 Feb 2020 23:15:42 +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 01FNFgZ5030769; Sat, 15 Feb 2020 23:15:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FNFg6J030768; Sat, 15 Feb 2020 23:15:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002152315.01FNFg6J030768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 15 Feb 2020 23:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357982 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 23:15:43 -0000 Author: kib Date: Sat Feb 15 23:15:42 2020 New Revision: 357982 URL: https://svnweb.freebsd.org/changeset/base/357982 Log: Use designated initializers for seminfo. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Modified: head/sys/kern/sysv_sem.c Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sat Feb 15 21:48:48 2020 (r357981) +++ head/sys/kern/sysv_sem.c Sat Feb 15 23:15:42 2020 (r357982) @@ -198,15 +198,15 @@ struct sem_undo { * semaphore info struct */ struct seminfo seminfo = { - SEMMNI, /* # of semaphore identifiers */ - SEMMNS, /* # of semaphores in system */ - SEMMNU, /* # of undo structures in system */ - SEMMSL, /* max # of semaphores per id */ - SEMOPM, /* max # of operations per semop call */ - SEMUME, /* max # of undo entries per process */ - SEMUSZ, /* size in bytes of undo structure */ - SEMVMX, /* semaphore maximum value */ - SEMAEM /* adjust on exit max value */ + .semmni = SEMMNI, /* # of semaphore identifiers */ + .semmns = SEMMNS, /* # of semaphores in system */ + .semmnu = SEMMNU, /* # of undo structures in system */ + .semmsl = SEMMSL, /* max # of semaphores per id */ + .semopm = SEMOPM, /* max # of operations per semop call */ + .semume = SEMUME, /* max # of undo entries per process */ + .semusz = SEMUSZ, /* size in bytes of undo structure */ + .semvmx = SEMVMX, /* semaphore maximum value */ + .semaem = SEMAEM, /* adjust on exit max value */ }; SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0, From owner-svn-src-all@freebsd.org Sat Feb 15 23:18:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C77E524C320; Sat, 15 Feb 2020 23:18:03 +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) server-signature RSA-PSS (4096 bits) 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 48KmPl4K5Qz4N25; Sat, 15 Feb 2020 23:18:03 +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 6E9511C735; Sat, 15 Feb 2020 23:18:03 +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 01FNI3GS030924; Sat, 15 Feb 2020 23:18:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FNI3MO030923; Sat, 15 Feb 2020 23:18:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002152318.01FNI3MO030923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 15 Feb 2020 23:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357983 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 23:18:03 -0000 Author: kib Date: Sat Feb 15 23:18:02 2020 New Revision: 357983 URL: https://svnweb.freebsd.org/changeset/base/357983 Log: sem_remove(): add some asserts. Assert that sema[idx] allocation from sem[] is sane. Also assert that sem_mtx is owned, it protects the SEM_ALLOC flag. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Modified: head/sys/kern/sysv_sem.c Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sat Feb 15 23:15:42 2020 (r357982) +++ head/sys/kern/sysv_sem.c Sat Feb 15 23:18:02 2020 (r357983) @@ -558,8 +558,14 @@ sem_remove(int semidx, struct ucred *cred) int i; KASSERT(semidx >= 0 && semidx < seminfo.semmni, - ("semidx out of bounds")); + ("semidx out of bounds")); + mtx_assert(&sem_mtx, MA_OWNED); semakptr = &sema[semidx]; + KASSERT(semakptr->u.__sem_base - sem + semakptr->u.sem_nsems <= semtot, + ("sem_remove: sema %d corrupted sem pointer %p %p %d %d", + semidx, semakptr->u.__sem_base, sem, semakptr->u.sem_nsems, + semtot)); + semakptr->u.sem_perm.cuid = cred ? cred->cr_uid : 0; semakptr->u.sem_perm.uid = cred ? cred->cr_uid : 0; semakptr->u.sem_perm.mode = 0; From owner-svn-src-all@freebsd.org Sat Feb 15 23:19:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62D8D24C3DE; Sat, 15 Feb 2020 23:19:24 +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) server-signature RSA-PSS (4096 bits) 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 48KmRJ1vqkz4Nby; Sat, 15 Feb 2020 23:19:24 +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 3CE121C736; Sat, 15 Feb 2020 23:19:24 +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 01FNJOtl031054; Sat, 15 Feb 2020 23:19:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FNJOZe031053; Sat, 15 Feb 2020 23:19:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002152319.01FNJOZe031053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 15 Feb 2020 23:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357984 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 357984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 23:19:24 -0000 Author: kib Date: Sat Feb 15 23:19:23 2020 New Revision: 357984 URL: https://svnweb.freebsd.org/changeset/base/357984 Log: sem_remove(): fix the loop that compacts sem array on semaphores removal. As written now, it copies random kernel memory from beyond the bounds of the array. Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23694 Modified: head/sys/kern/sysv_sem.c Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sat Feb 15 23:18:02 2020 (r357983) +++ head/sys/kern/sysv_sem.c Sat Feb 15 23:19:23 2020 (r357984) @@ -584,8 +584,9 @@ sem_remove(int semidx, struct ucred *cred) sema[i].u.__sem_base > semakptr->u.__sem_base) mtx_lock_flags(&sema_mtx[i], LOP_DUPOK); } - for (i = semakptr->u.__sem_base - sem; i < semtot; i++) - sem[i] = sem[i + semakptr->u.sem_nsems]; + for (i = semakptr->u.__sem_base - sem + semakptr->u.sem_nsems; + i < semtot; i++) + sem[i - semakptr->u.sem_nsems] = sem[i]; for (i = 0; i < seminfo.semmni; i++) { if ((sema[i].u.sem_perm.mode & SEM_ALLOC) && sema[i].u.__sem_base > semakptr->u.__sem_base) { From owner-svn-src-all@freebsd.org Sat Feb 15 23:25:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A22C424C62C; Sat, 15 Feb 2020 23:25: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) server-signature RSA-PSS (4096 bits) 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 48KmZX3q1sz4RJL; Sat, 15 Feb 2020 23:25: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 7A6051C8F8; Sat, 15 Feb 2020 23:25: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 01FNPe5Z037068; Sat, 15 Feb 2020 23:25:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01FNPdV5037062; Sat, 15 Feb 2020 23:25:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002152325.01FNPdV5037062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 15 Feb 2020 23:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357985 - in head: include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Commit-Revision: 357985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 23:25:40 -0000 Author: kib Date: Sat Feb 15 23:25:39 2020 New Revision: 357985 URL: https://svnweb.freebsd.org/changeset/base/357985 Log: Add pthread_peekjoin_np(3). The function allows to peek at the thread exit status and even see return value, without joining (and thus finally destroying) the target thread. Reviewed by: markj Sponsored by: The FreeBSD Foundation (kib) MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D23676 Modified: head/include/pthread_np.h head/lib/libthr/pthread.map head/lib/libthr/thread/thr_join.c head/share/man/man3/Makefile head/share/man/man3/pthread_join.3 Modified: head/include/pthread_np.h ============================================================================== --- head/include/pthread_np.h Sat Feb 15 23:19:23 2020 (r357984) +++ head/include/pthread_np.h Sat Feb 15 23:25:39 2020 (r357985) @@ -63,6 +63,7 @@ int pthread_mutex_setyieldloops_np(pthread_mutex_t *mu int pthread_mutex_isowned_np(pthread_mutex_t *mutex); void pthread_resume_all_np(void); int pthread_resume_np(pthread_t); +int pthread_peekjoin_np(pthread_t, void **); void pthread_set_name_np(pthread_t, const char *); int pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *); int pthread_single_np(void); Modified: head/lib/libthr/pthread.map ============================================================================== --- head/lib/libthr/pthread.map Sat Feb 15 23:19:23 2020 (r357984) +++ head/lib/libthr/pthread.map Sat Feb 15 23:25:39 2020 (r357985) @@ -326,3 +326,7 @@ FBSD_1.4 { FBSD_1.5 { pthread_get_name_np; }; + +FBSD_1.6 { + pthread_peekjoin_np; +}; Modified: head/lib/libthr/thread/thr_join.c ============================================================================== --- head/lib/libthr/thread/thr_join.c Sat Feb 15 23:19:23 2020 (r357984) +++ head/lib/libthr/thread/thr_join.c Sat Feb 15 23:25:39 2020 (r357985) @@ -36,13 +36,15 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" +int _pthread_peekjoin_np(pthread_t pthread, void **thread_return); int _pthread_timedjoin_np(pthread_t pthread, void **thread_return, - const struct timespec *abstime); -static int join_common(pthread_t, void **, const struct timespec *); + const struct timespec *abstime); +static int join_common(pthread_t, void **, const struct timespec *, bool peek); __weak_reference(_thr_join, pthread_join); __weak_reference(_thr_join, _pthread_join); __weak_reference(_pthread_timedjoin_np, pthread_timedjoin_np); +__weak_reference(_pthread_peekjoin_np, pthread_peekjoin_np); static void backout_join(void *arg) { @@ -57,7 +59,7 @@ static void backout_join(void *arg) int _thr_join(pthread_t pthread, void **thread_return) { - return (join_common(pthread, thread_return, NULL)); + return (join_common(pthread, thread_return, NULL, false)); } int @@ -68,22 +70,28 @@ _pthread_timedjoin_np(pthread_t pthread, void **thread abstime->tv_nsec >= 1000000000) return (EINVAL); - return (join_common(pthread, thread_return, abstime)); + return (join_common(pthread, thread_return, abstime, false)); } +int +_pthread_peekjoin_np(pthread_t pthread, void **thread_return) +{ + return (join_common(pthread, thread_return, NULL, true)); +} + /* * Cancellation behavior: * if the thread is canceled, joinee is not recycled. */ static int join_common(pthread_t pthread, void **thread_return, - const struct timespec *abstime) + const struct timespec *abstime, bool peek) { struct pthread *curthread = _get_curthread(); struct timespec ts, ts2, *tsp; void *tmp; long tid; - int ret = 0; + int ret; if (pthread == NULL) return (EINVAL); @@ -100,10 +108,21 @@ join_common(pthread_t pthread, void **thread_return, /* Multiple joiners are not supported. */ ret = ENOTSUP; } - if (ret) { + if (ret != 0) { THR_THREAD_UNLOCK(curthread, pthread); return (ret); } + + /* Only peek into status, do not gc the thread. */ + if (peek) { + if (pthread->tid != TID_TERMINATED) + ret = EBUSY; + else if (thread_return != NULL) + *thread_return = pthread->ret; + THR_THREAD_UNLOCK(curthread, pthread); + return (ret); + } + /* Set the running thread to be the joiner: */ pthread->joiner = curthread; Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Sat Feb 15 23:19:23 2020 (r357984) +++ head/share/man/man3/Makefile Sat Feb 15 23:25:39 2020 (r357985) @@ -500,7 +500,8 @@ PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destr PTHREAD_MLINKS+=pthread_switch_add_np.3 pthread_switch_delete_np.3 PTHREAD_MLINKS+=pthread_testcancel.3 pthread_setcancelstate.3 \ pthread_testcancel.3 pthread_setcanceltype.3 -PTHREAD_MLINKS+=pthread_join.3 pthread_timedjoin_np.3 +PTHREAD_MLINKS+=pthread_join.3 pthread_peekjoin_np.3 \ + pthread_join.3 pthread_timedjoin_np.3 .endif .include Modified: head/share/man/man3/pthread_join.3 ============================================================================== --- head/share/man/man3/pthread_join.3 Sat Feb 15 23:19:23 2020 (r357984) +++ head/share/man/man3/pthread_join.3 Sat Feb 15 23:25:39 2020 (r357985) @@ -30,13 +30,14 @@ .\" .\" $FreeBSD$ .\" -.Dd February 3, 2018 +.Dd February 13, 2019 .Dt PTHREAD_JOIN 3 .Os .Sh NAME .Nm pthread_join , +.Nm pthread_peekjoin_np , .Nm pthread_timedjoin_np -.Nd wait for thread termination +.Nd inspect thread termination state .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -45,7 +46,16 @@ .Fn pthread_join "pthread_t thread" "void **value_ptr" .In pthread_np.h .Ft int -.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" +.Fo pthread_peekjoin_np +.Fa "pthread_t thread" +.Fa "void **value_ptr" +.Fc +.Ft int +.Fo pthread_timedjoin_np +.Fa "pthread_t thread" +.Fa "void **value_ptr" +.Fa "const struct timespec *abstime" +.Fc .Sh DESCRIPTION The .Fn pthread_join @@ -82,19 +92,30 @@ function except it will return .Er ETIMEDOUT if target thread does not exit before specified absolute time passes. .Pp +The +.Fn pthread_peekjoin_np +only peeks into the exit status of the specified thread. +If the thread has not exited, the +.Er EBUSY +error is returned. +Otherwise, zero is returned and the thread exit value is optionally stored +into the location of +.Fa *value_ptr . +The target thread is left unjoined and can be used as an argument for +the +.Fn pthread_join +family of functions again. +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES -If successful, the -.Fn pthread_join -and -.Fn pthread_timedjoin_np -functions will return zero. -Otherwise an error number will be returned to -indicate the error. +If successful, the described functions return zero. +Otherwise an error number is returned to indicate the error or +special condition. .Sh ERRORS The -.Fn pthread_join +.Fn pthread_join , +.Fn pthread_peekjoin_np , and .Fn pthread_timedjoin_np functions will fail if: @@ -125,6 +146,14 @@ The specified absolute time passed while .Fn pthread_timedjoin_np waited for thread exit. .El +.Pp +The +.Fn pthread_peekjoin_np +function will also fail if: +.Bl -tag -width Er +.It Bq Er EBUSY +The specified thread has not yet exited. +.El .Sh SEE ALSO .Xr wait 2 , .Xr pthread_create 3 @@ -139,3 +168,7 @@ function is a .Fx extension which first appeared in .Fx 6.1 . +Another extension, the +.Fn pthread_peekjoin_np +function, first appearead in +.Fx 13.0 .