From owner-svn-src-head@freebsd.org Sun Mar 29 02:28:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2013026F27D; Sun, 29 Mar 2020 02:28:22 +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 48qfdw5z0nz3wvc; Sun, 29 Mar 2020 02:28: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 B41232004E; Sun, 29 Mar 2020 02:28:15 +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 02T2SF7c035921; Sun, 29 Mar 2020 02:28:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T2SFmk035920; Sun, 29 Mar 2020 02:28:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003290228.02T2SFmk035920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 02:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359414 - head/sbin/iscontrol X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/iscontrol X-SVN-Commit-Revision: 359414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:28:23 -0000 Author: kevans Date: Sun Mar 29 02:28:15 2020 New Revision: 359414 URL: https://svnweb.freebsd.org/changeset/base/359414 Log: iscontrol: move definition of vflag/iscsidev to iscontrol.c Mark the declaration extern as these are used elsewhere; this fixes the build with -fno-common. MFC after: 3 days Modified: head/sbin/iscontrol/iscontrol.c head/sbin/iscontrol/iscontrol.h Modified: head/sbin/iscontrol/iscontrol.c ============================================================================== --- head/sbin/iscontrol/iscontrol.c Sun Mar 29 02:26:58 2020 (r359413) +++ head/sbin/iscontrol/iscontrol.c Sun Mar 29 02:28:15 2020 (r359414) @@ -82,6 +82,9 @@ token_t DigestMethods[] = { {0, 0} }; +int vflag; +char *iscsidev; + u_char isid[6 + 6]; /* | Default values Modified: head/sbin/iscontrol/iscontrol.h ============================================================================== --- head/sbin/iscontrol/iscontrol.h Sun Mar 29 02:26:58 2020 (r359413) +++ head/sbin/iscontrol/iscontrol.h Sun Mar 29 02:28:15 2020 (r359414) @@ -149,8 +149,8 @@ int recvpdu(isess_t *sess, pdu_t *pp); int lookup(token_t *tbl, char *m); -int vflag; -char *iscsidev; +extern int vflag; +extern char *iscsidev; void parseArgs(int nargs, char **args, isc_opt_t *op); void parseConfig(FILE *fd, char *key, isc_opt_t *op); From owner-svn-src-head@freebsd.org Sun Mar 29 02:29:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 448A626F2DA; Sun, 29 Mar 2020 02:29: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 48qffx4zMMz3xDX; Sun, 29 Mar 2020 02:29: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 D6A7620059; Sun, 29 Mar 2020 02:29:06 +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 02T2T6bM036008; Sun, 29 Mar 2020 02:29:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T2T6Ss036007; Sun, 29 Mar 2020 02:29:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003290229.02T2T6Ss036007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 02:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359415 - head/stand/userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/userboot/userboot X-SVN-Commit-Revision: 359415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:29:15 -0000 Author: kevans Date: Sun Mar 29 02:29:06 2020 New Revision: 359415 URL: https://svnweb.freebsd.org/changeset/base/359415 Log: userboot: mark host_fsops as extern This is already defined elsewhere; mark this declaration extern to the fix the -fno-common build. MFC after: 3 days Modified: head/stand/userboot/userboot/libuserboot.h Modified: head/stand/userboot/userboot/libuserboot.h ============================================================================== --- head/stand/userboot/userboot/libuserboot.h Sun Mar 29 02:28:15 2020 (r359414) +++ head/stand/userboot/userboot/libuserboot.h Sun Mar 29 02:29:06 2020 (r359415) @@ -44,7 +44,7 @@ extern int userboot_disk_maxunit; extern struct devsw host_dev; /* access to host filesystem */ -struct fs_ops host_fsops; +extern struct fs_ops host_fsops; struct bootinfo; struct preloaded_file; From owner-svn-src-head@freebsd.org Sun Mar 29 02:30:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A90026F40C; Sun, 29 Mar 2020 02:30:31 +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 48qfhP6ptjz3xgW; Sun, 29 Mar 2020 02:30: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 E721D2005E; Sun, 29 Mar 2020 02:30: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 02T2UNY2036149; Sun, 29 Mar 2020 02:30:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T2UNGt036148; Sun, 29 Mar 2020 02:30:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003290230.02T2UNGt036148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 02:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359416 - head/usr.bin/systat X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/systat X-SVN-Commit-Revision: 359416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:30:31 -0000 Author: kevans Date: Sun Mar 29 02:30:23 2020 New Revision: 359416 URL: https://svnweb.freebsd.org/changeset/base/359416 Log: systat: remove redundant definition of kd kd is already properly declared in extern.h and defined in main.c, rendering this definition useless. This fixes the -fno-common build. MFC after: 3 days Modified: head/usr.bin/systat/swap.c Modified: head/usr.bin/systat/swap.c ============================================================================== --- head/usr.bin/systat/swap.c Sun Mar 29 02:29:06 2020 (r359415) +++ head/usr.bin/systat/swap.c Sun Mar 29 02:30:23 2020 (r359416) @@ -58,8 +58,6 @@ static const char sccsid[] = "@(#)swap.c 8.3 (Berkeley #include "extern.h" #include "devs.h" -kvm_t *kd; - static char *header; static long blocksize; static int dlen, odlen; From owner-svn-src-head@freebsd.org Sun Mar 29 02:35:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B639D26F7CB; Sun, 29 Mar 2020 02:35:36 +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 48qfpG0bDTz40W9; Sun, 29 Mar 2020 02:35:33 +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 4EB6420044; Sun, 29 Mar 2020 02:26:59 +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 02T2QxO9035821; Sun, 29 Mar 2020 02:26:59 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T2Qw8E035820; Sun, 29 Mar 2020 02:26:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003290226.02T2Qw8E035820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 02:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359413 - in head/contrib/ipfilter: . tools X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/contrib/ipfilter: . tools X-SVN-Commit-Revision: 359413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:35:37 -0000 Author: kevans Date: Sun Mar 29 02:26:58 2020 New Revision: 359413 URL: https://svnweb.freebsd.org/changeset/base/359413 Log: ipfilter: remove duplicate definition of 'thishost' thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Modified: head/contrib/ipfilter/ipf.h head/contrib/ipfilter/tools/ipnat.c Modified: head/contrib/ipfilter/ipf.h ============================================================================== --- head/contrib/ipfilter/ipf.h Sat Mar 28 22:44:08 2020 (r359412) +++ head/contrib/ipfilter/ipf.h Sun Mar 29 02:26:58 2020 (r359413) @@ -191,7 +191,7 @@ typedef int (* addfunc_t) __P((int, ioctlfunc_t, void typedef int (* copyfunc_t) __P((void *, void *, size_t)); -extern char thishost[]; +extern char thishost[MAXHOSTNAMELEN]; extern char flagset[]; extern u_char flags[]; extern struct ipopt_names ionames[]; Modified: head/contrib/ipfilter/tools/ipnat.c ============================================================================== --- head/contrib/ipfilter/tools/ipnat.c Sat Mar 28 22:44:08 2020 (r359412) +++ head/contrib/ipfilter/tools/ipnat.c Sun Mar 29 02:26:58 2020 (r359413) @@ -60,7 +60,6 @@ static const char rcsid[] = "@(#)$Id$"; #define bzero(a,b) memset(a,0,b) #endif int use_inet6 = 0; -char thishost[MAXHOSTNAMELEN]; extern char *optarg; From owner-svn-src-head@freebsd.org Sun Mar 29 02:37:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 504A726F959; Sun, 29 Mar 2020 02:37:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 48qfrQ5d6dz419T; Sun, 29 Mar 2020 02:37:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x62b.google.com with SMTP id x1so5209007plm.4; Sat, 28 Mar 2020 19:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=xSmNQwXo3TOraw4xjsnA7PTDcpTEK4fE/+dhLhFD8ek=; b=vNTQRLG5XQxYuTThypWKMsTSZ4GFoTee6o21jnwSY/7yzOOa3FRbqITZvBjqllMc5H gXhUJY8uSGyxdqo7B8WwCytsmHF5ZPe5kRjbMHdXxao4EuyxY4igLXuftnAyEAjdUg3/ 6kNd0ZMoCF7lWw0UnZjFSBYjeqvvdRoqj7OfZFF2SP2+R0ZP1zmmUazWLt+9P/9fo4VW 7lUPUx1l4R7hSF1O4HEQktt30kxqoZ5JWeMMCR78hIkYP8ZViKZ3q1BiGT1rH8h9pCiP eJImEIYPoyczrzz0lOl3Yf9RSOq5HPmUewe+/yOLsDq0VY9rdqQXFG8Uz2sSfqPlL3Cy OGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=xSmNQwXo3TOraw4xjsnA7PTDcpTEK4fE/+dhLhFD8ek=; b=SlanMEZm4WG/OnsqC1CRKw+1J99iuSxC2UrtMQiQ1qZG2HF1Sc33T6aic8u1hWb5Gi wFYGQIW/RC+1+T2Uh9dg+WWklRY/upQH/EcgFsfYb9NcsOGC07fMycM8KFXMi68Aj04+ Xowu4OhjgNpqImqiqvfJ1SvxK6VfgcflMBXumk0TQRaPB8Gkx02hfoDTUi0YMwVd/ScC SMIar2Xn0t4s04NJ6ql797j1/kRf5H33UUnqNJMIQ/fGK+xScR/fXukHbeVcYY6SMOQu 2AjzqffiWtndmDpC3tDvWEUaX38FAUOyhLi1dqTHWxLsSM5Q/9HkBrlRg+zsOLKJikLt s/+A== X-Gm-Message-State: ANhLgQ2cY+qWcM0pefD4Cq+BKXbcn0WQNyA03MNrUMP3ajBGJr9kx3My 4DC2Bh4pq7s21qwRmEfZzvlbnIod4MY= X-Google-Smtp-Source: ADFU+vsDyI9Op8ZRJlTPRJ3A24GWIZLMZsfEHSIDNDrSn7A/EXoGtRYGMzrKEdocboFnz2RuyNnVsA== X-Received: by 2002:a17:90a:32c1:: with SMTP id l59mr8176199pjb.36.1585449435600; Sat, 28 Mar 2020 19:37:15 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id f15sm7179861pfq.100.2020.03.28.19.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2020 19:37:14 -0700 (PDT) From: Enji Cooper Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r359385 - head/usr.bin/kyua Date: Sat, 28 Mar 2020 19:37:13 -0700 In-Reply-To: <20200328032209.GA40889@spindle.one-eyed-alien.net> Cc: Enji Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Brooks Davis References: <202003280108.02S18KWc062782@repo.freebsd.org> <20200328032209.GA40889@spindle.one-eyed-alien.net> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48qfrQ5d6dz419T 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)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:37:29 -0000 > On Mar 27, 2020, at 8:22 PM, Brooks Davis wrote: >=20 > On Sat, Mar 28, 2020 at 01:08:20AM +0000, Enji Cooper wrote: >> Author: ngie >> Date: Sat Mar 28 01:08:20 2020 >> New Revision: 359385 >> URL: https://svnweb.freebsd.org/changeset/base/359385 >>=20 >> Log: >> Check in the generated copies of the manpages >>=20 >> These manpages were meant to be templated once per `configure` run. >>=20 >> Given that we're not bound by as many constants, e.g., `--prefix` = isn't >> generally changing for kyua in the base system, having to generate = the >> manpages each build seems slightly less than optimal. >>=20 >> In the event that one's build environment doesn't define `$SH`, the = build >> will also fail until this change is introduced. >>=20 >> Instead of jumping through hoops dealing with shells or permissions, = let's >> just cut to the chase and check the generated copies into the = sourcebase >> under usr.bin/kyua . >=20 > This was the wrong fix. Committing generated manpaged was > 100% the wrong solution and will make extra work in the > future. The correct fix is almost certainly the one attached to > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245086 = . If = someone > doesn't beat me to it I will revert you wrong and broken commit along > with the followups and commit the correct one (this certainly won't be > until at least tomorrow). I=E2=80=99ll revert my changes. -Enji= From owner-svn-src-head@freebsd.org Sun Mar 29 02:40:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BE2A26FB9E; Sun, 29 Mar 2020 02:40:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48qfvc5BYhz424K; Sun, 29 Mar 2020 02:40:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E27B220248; Sun, 29 Mar 2020 02:40:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02T2e3Nh042048; Sun, 29 Mar 2020 02:40:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T2e36N042047; Sun, 29 Mar 2020 02:40:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202003290240.02T2e36N042047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Sun, 29 Mar 2020 02:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359417 - in head: contrib/kyua/doc usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: contrib/kyua/doc usr.bin/kyua X-SVN-Commit-Revision: 359417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:40:14 -0000 Author: ngie Date: Sun Mar 29 02:40:03 2020 New Revision: 359417 URL: https://svnweb.freebsd.org/changeset/base/359417 Log: Revert r359385-r359387 As noted by brooks/emaste, this is the wrong approach to take. Revert the changes so brooks can apply a more proper change. Requested by: brooks, emaste Deleted: head/contrib/kyua/doc/kyua-about.1 head/contrib/kyua/doc/kyua-config.1 head/contrib/kyua/doc/kyua-db-exec.1 head/contrib/kyua/doc/kyua-db-migrate.1 head/contrib/kyua/doc/kyua-debug.1 head/contrib/kyua/doc/kyua-help.1 head/contrib/kyua/doc/kyua-list.1 head/contrib/kyua/doc/kyua-report-html.1 head/contrib/kyua/doc/kyua-report-junit.1 head/contrib/kyua/doc/kyua-report.1 head/contrib/kyua/doc/kyua-test.1 head/contrib/kyua/doc/kyua.1 head/contrib/kyua/doc/kyua.conf.5 head/contrib/kyua/doc/kyuafile.5 Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Sun Mar 29 02:30:23 2020 (r359416) +++ head/usr.bin/kyua/Makefile Sun Mar 29 02:40:03 2020 (r359417) @@ -48,6 +48,20 @@ STORE= migrate_v1_v2.sql migrate_v2_v3.sql schema_v3. STOREDIR= ${KYUA_STOREDIR} .PATH: ${KYUA_SRCDIR}/store +CLEANFILES+= ${MAN} .PATH: ${KYUA_SRCDIR}/doc +.for man in ${MAN} +${man}: ${man}.in + ${SH} ${KYUA_SRCDIR}/doc/manbuild.sh \ + -v "CONFDIR=${KYUA_CONFDIR}" \ + -v "DOCDIR=${KYUA_DOCDIR}" \ + -v "EGDIR=${KYUA_EGDIR}" \ + -v "MISCDIR=${KYUA_MISCDIR}" \ + -v "PACKAGE=kyua" \ + -v "STOREDIR=${KYUA_STOREDIR}" \ + -v "TESTSDIR=${TESTSBASE}" \ + -v "VERSION=${KYUA_VERSION}" \ + ${.ALLSRC} ${.TARGET} +.endfor .include From owner-svn-src-head@freebsd.org Sun Mar 29 02:42:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93B6226FECE; Sun, 29 Mar 2020 02:42:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 48qfy04nnpz42vy; Sun, 29 Mar 2020 02:42:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x533.google.com with SMTP id b1so6848804pgm.8; Sat, 28 Mar 2020 19:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=BjMMGbdycH3RhRQaSyDwxH4l/cXM1VgN4pG+Ep5MjpQ=; b=q5FedAkaYZxEW5DtxkmEpPqaB4o2xUvdVAiv3nXCN+isK+CnZp2o3hVRZpEA46krjr twVTOBuQiilE1WfF5iOkDTkZ/8lbAWAg2Lbugh5/fZH2fVEI9Cz7zvNVX29QjlZwBgV3 zAIhaz0D5ubv74YSk7EZbJ6Ou55tmR5Pkoi4Zp+h62ff5pQnOebOfhsNWVzET3LpVUnX BgKlQrHf+9LBNJDoFPF9Y/+lZRKccfQAQImMD51m7MiGjrEV+GunCxN1XowxKSxdTPQF cy1CY5WQCcxewFW64Rr0/UEytv/CwT/7UJ7R9x0ragkzh2nXyN2dmXOEDtU0e1e3Vn3q vH/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=BjMMGbdycH3RhRQaSyDwxH4l/cXM1VgN4pG+Ep5MjpQ=; b=UedRa858Y9nVbQUua/JUm/8Z8U0HdOx6DuG0RAUH7O/f1WhooSJl3ApzaO1TPdre8J v6iska+g3hgimg3emZDGKo4u09SVyHjLdZASMSfv7kqPOz8h6UAOWU0MLU8SfCY1sOt7 WFQO5JwYlJEH9TPFKdphGBFFzOb4rRbCdofHLk+LBz7Xpmy9C+s+tbB7wAchIl2r2q7T CBv5ozvlqLB5QGSHKCY024GTeTrOhsBBP7vP3ihnDZNiEl6mXvJExXXRH4D1k4KKNnYc +gBNFKG0kauwAL7uHhXpz3rpU0ybhRMDEBgHjrb8p8vJ208YWP3phiuxDdZelw9Zyo41 pZWQ== X-Gm-Message-State: ANhLgQ2zzmeit7tYNbBiMMwmFI8g6rURXFqszbzcDb5eUYQ4T0Io5BKj 2ESlXgFtOHeiCqjLlJDzt1Bh9ut26K0= X-Google-Smtp-Source: ADFU+vveIuU4YBUJxoXAPVn2qeoxRnzvyv201ZrluHtpVrpU8SSuayuxW/rcb2MOCkCLMzmR2TF3Ww== X-Received: by 2002:aa7:91c1:: with SMTP id z1mr6894809pfa.100.1585449726143; Sat, 28 Mar 2020 19:42:06 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c11sm7296800pfc.216.2020.03.28.19.42.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2020 19:42:05 -0700 (PDT) From: Enji Cooper Message-Id: <2A7EAECB-C11A-458C-9495-BC975300D363@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r359385 - head/usr.bin/kyua Date: Sat, 28 Mar 2020 19:42:04 -0700 In-Reply-To: Cc: Enji Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Brooks Davis References: <202003280108.02S18KWc062782@repo.freebsd.org> <20200328032209.GA40889@spindle.one-eyed-alien.net> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48qfy04nnpz42vy X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=q5FedAka; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::533 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)[]; RCPT_COUNT_FIVE(0.00)[5]; 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:+,1:+,2:~]; 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)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.00)[ip: (-8.70), ipnet: 2607:f8b0::/32(-0.36), asn: 15169(-0.46), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.3.5.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]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 02:42:23 -0000 > On Mar 28, 2020, at 7:37 PM, Enji Cooper = wrote: >=20 >>=20 >> On Mar 27, 2020, at 8:22 PM, Brooks Davis > wrote: >>=20 >> On Sat, Mar 28, 2020 at 01:08:20AM +0000, Enji Cooper wrote: >>> Author: ngie >>> Date: Sat Mar 28 01:08:20 2020 >>> New Revision: 359385 >>> URL: https://svnweb.freebsd.org/changeset/base/359385 = >>>=20 >>> Log: >>> Check in the generated copies of the manpages >>>=20 >>> These manpages were meant to be templated once per `configure` run. >>>=20 >>> Given that we're not bound by as many constants, e.g., `--prefix` = isn't >>> generally changing for kyua in the base system, having to generate = the >>> manpages each build seems slightly less than optimal. >>>=20 >>> In the event that one's build environment doesn't define `$SH`, the = build >>> will also fail until this change is introduced. >>>=20 >>> Instead of jumping through hoops dealing with shells or = permissions, let's >>> just cut to the chase and check the generated copies into the = sourcebase >>> under usr.bin/kyua . >>=20 >> This was the wrong fix. Committing generated manpaged was >> 100% the wrong solution and will make extra work in the >> future. The correct fix is almost certainly the one attached to >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245086 = . If = someone >> doesn't beat me to it I will revert you wrong and broken commit along >> with the followups and commit the correct one (this certainly won't = be >> until at least tomorrow). >=20 > I=E2=80=99ll revert my changes. Done in r359417. Thank you, -Enji= From owner-svn-src-head@freebsd.org Sun Mar 29 04:15:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D4DC271CB3; Sun, 29 Mar 2020 04:15:06 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48qj153F3Wz4cD6; Sun, 29 Mar 2020 04:15:05 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFDC321890; Sun, 29 Mar 2020 04:14:57 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02T4EvJ8003075; Sun, 29 Mar 2020 04:14:57 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T4EvMk003074; Sun, 29 Mar 2020 04:14:57 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202003290414.02T4EvMk003074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Sun, 29 Mar 2020 04:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359418 - head/usr.bin/ncal X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/ncal X-SVN-Commit-Revision: 359418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 04:15:06 -0000 Author: grog Date: Sun Mar 29 04:14:57 2020 New Revision: 359418 URL: https://svnweb.freebsd.org/changeset/base/359418 Log: Add STANDARDS section PR: 239723 Submitted by: Gordon Bergling Reported by: Gordon Bergling Modified: head/usr.bin/ncal/ncal.1 Modified: head/usr.bin/ncal/ncal.1 ============================================================================== --- head/usr.bin/ncal/ncal.1 Sun Mar 29 02:40:03 2020 (r359417) +++ head/usr.bin/ncal/ncal.1 Sun Mar 29 04:14:57 2020 (r359418) @@ -179,6 +179,24 @@ Highlighting of dates is disabled if stdout is not a t .Sh SEE ALSO .Xr calendar 3 , .Xr strftime 3 +.Sh STANDARDS +The +.Nm +utility is compliant with the +X/Open System Interfaces option of the +.St -p1003.1-2008 +specification. +.Pp +The flags +.Op Fl 3hyJeopw , +as well as the ability to specify a month name as a single argument, +are extensions to that specification. +.Pp +The week number computed by +.Fl w +is compliant with the +.St -iso8601 +specification. .Sh HISTORY A .Nm From owner-svn-src-head@freebsd.org Sun Mar 29 04:18:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B32ED271E09; Sun, 29 Mar 2020 04:18:36 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48qj572CRyz4dJq; Sun, 29 Mar 2020 04:18:35 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DC862189A; Sun, 29 Mar 2020 04:18:28 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02T4IRVI003293; Sun, 29 Mar 2020 04:18:27 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T4IR46003292; Sun, 29 Mar 2020 04:18:27 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202003290418.02T4IR46003292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Sun, 29 Mar 2020 04:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359419 - head/usr.bin/ncal X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/ncal X-SVN-Commit-Revision: 359419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 04:18:36 -0000 Author: grog Date: Sun Mar 29 04:18:27 2020 New Revision: 359419 URL: https://svnweb.freebsd.org/changeset/base/359419 Log: Remove spurious transition from Julian to Gregorian for country "Latin". Arguably the entire -p option should be removed. It shows only a few countries, and it doesn't have any relationship with the rest of the program. PR: 244801 Submitted by: grog@ Reported by: Hamid Ali Modified: head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.c ============================================================================== --- head/usr.bin/ncal/ncal.c Sun Mar 29 04:14:57 2020 (r359418) +++ head/usr.bin/ncal/ncal.c Sun Mar 29 04:18:27 2020 (r359419) @@ -95,7 +95,6 @@ static struct djswitch { {"IT", "Italy", {1582, 10, 4}}, {"JP", "Japan", {1918, 12, 18}}, {"LI", "Lithuania", {1918, 2, 1}}, - {"LN", "Latin", {9999, 05, 31}}, {"LU", "Luxembourg", {1582, 12, 14}}, {"LV", "Latvia", {1918, 2, 1}}, {"NL", "Netherlands", {1582, 12, 14}}, @@ -580,7 +579,7 @@ printeaster(int y, int julian, int orthodox) (y)++; \ } #define M2Y(m) ((m) / 12) -#define M2M(m) (1 + (m) % 12) +#define M2M(m) (1 + (m) % 12) /* Print all months for the period in the range [ before .. y-m .. after ]. */ static void @@ -925,7 +924,7 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines for (i = 0; i != 6; i++) { l = 0; for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; - j++, k += dw) { + j++, k += dw) { if (j >= first) { if (jd_flag) dt.d = j - jan1 + 1; From owner-svn-src-head@freebsd.org Sun Mar 29 06:26:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2D2C2742F8; Sun, 29 Mar 2020 06:26:09 +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 48qlwJ4qNtz4Qkc; Sun, 29 Mar 2020 06:26:08 +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 6B75A232AD; Sun, 29 Mar 2020 06:25:59 +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 02T6Pxrx081544; Sun, 29 Mar 2020 06:25:59 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T6PvEj081538; Sun, 29 Mar 2020 06:25:57 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202003290625.02T6PvEj081538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 29 Mar 2020 06:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359420 - 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: 359420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 06:26:10 -0000 Author: melifaro Date: Sun Mar 29 06:25:57 2020 New Revision: 359420 URL: https://svnweb.freebsd.org/changeset/base/359420 Log: Switch rtsock tests to per-test jails and epair interfaces. Many rtsock tests verify the ordering of the kernel messages for the particular event. In order to avoid flaky tests due to the other tests running, switch all tests to use personal vnet-enabled jails. This removes all clashes on the IP addresses and brings back the ability to run these tests simultaneously. Reported by: olivier Reviewed by: olivier Differential Revision: https://reviews.freebsd.org/D24182 Added: head/tests/sys/net/routing/generic_cleanup.sh (contents, props changed) head/tests/sys/net/routing/params.h (contents, props changed) Modified: head/tests/sys/net/routing/Makefile head/tests/sys/net/routing/rtsock_common.h head/tests/sys/net/routing/rtsock_config.h head/tests/sys/net/routing/test_rtsock_l3.c head/tests/sys/net/routing/test_rtsock_lladdr.c Modified: head/tests/sys/net/routing/Makefile ============================================================================== --- head/tests/sys/net/routing/Makefile Sun Mar 29 04:18:27 2020 (r359419) +++ head/tests/sys/net/routing/Makefile Sun Mar 29 06:25:57 2020 (r359420) @@ -7,6 +7,9 @@ TESTSDIR= ${TESTSBASE}/sys/net/routing ATF_TESTS_C += test_rtsock_l3 ATF_TESTS_C += test_rtsock_lladdr +${PACKAGE}FILES+= generic_cleanup.sh +${PACKAGE}FILESMODE_generic_cleanup.sh=0555 + # Most of the tests operates on a common IPv4/IPv6 prefix, # so running them in parallel will lead to weird results. TEST_METADATA+= is_exclusive=true Added: head/tests/sys/net/routing/generic_cleanup.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/net/routing/generic_cleanup.sh Sun Mar 29 06:25:57 2020 (r359420) @@ -0,0 +1,36 @@ +#!/bin/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$ +# + + +srcdir=`dirname $0` +. ${srcdir}/../../common/vnet.subr + +vnet_cleanup + Added: head/tests/sys/net/routing/params.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/net/routing/params.h Sun Mar 29 06:25:57 2020 (r359420) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 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$ + */ + +#ifndef _NET_ROUTING_PARAMS_H_ +#define _NET_ROUTING_PARAMS_H_ + +/* files to store state */ +#define JAILS_FNAME "created_jails.lst" +#define IFACES_FNAME "created_interfaces.lst" + +#endif + Modified: head/tests/sys/net/routing/rtsock_common.h ============================================================================== --- head/tests/sys/net/routing/rtsock_common.h Sun Mar 29 04:18:27 2020 (r359419) +++ head/tests/sys/net/routing/rtsock_common.h Sun Mar 29 06:25:57 2020 (r359420) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,7 @@ #include #include "rtsock_print.h" +#include "params.h" void rtsock_update_rtm_len(struct rt_msghdr *rtm); void rtsock_validate_message(char *buffer, ssize_t len); @@ -316,6 +318,84 @@ iface_enable_ipv6(char *ifname) return (0); } + +void +file_append_line(char *fname, char *text) +{ + FILE *f; + + f = fopen(fname, "a"); + fputs(text, f); + fputs("\n", f); + fclose(f); +} + +static int +vnet_wait_interface(char *vnet_name, char *ifname) +{ + char buf[512], cmd[512], *line, *token; + FILE *fp; + int i; + + snprintf(cmd, sizeof(cmd), "/usr/sbin/jexec %s /sbin/ifconfig -l", vnet_name); + for (int i = 0; i < 50; i++) { + fp = popen(cmd, "r"); + line = fgets(buf, sizeof(buf), fp); + /* cut last\n */ + if (line[0]) + line[strlen(line)-1] = '\0'; + while ((token = strsep(&line, " ")) != NULL) { + if (strcmp(token, ifname) == 0) + return (1); + } + + /* sleep 100ms */ + usleep(1000 * 100); + } + + return (0); +} + +void +vnet_switch(char *vnet_name, char *ifname) +{ + char buf[512], cmd[512], *line; + FILE *fp; + int jid, ret; + + RLOG("switching to vnet %s with interface %s", vnet_name, ifname); + snprintf(cmd, sizeof(cmd), + "/usr/sbin/jail -i -c name=%s persist vnet vnet.interface=%s", + vnet_name, ifname); + RLOG("jail cmd: \"%s\"\n", cmd); + + fp = popen(cmd, "r"); + if (fp == NULL) + atf_tc_fail("jail creation failed"); + line = fgets(buf, sizeof(buf), fp); + if (line == NULL) + atf_tc_fail("empty output from jail(8)"); + jid = strtol(line, NULL, 10); + if (jid <= 0) { + atf_tc_fail("invalid jail output: %s", line); + } + + RLOG("created jail jid=%d", jid); + file_append_line(JAILS_FNAME, vnet_name); + + /* Wait while interface appearsh inside vnet */ + if (!vnet_wait_interface(vnet_name, ifname)) { + atf_tc_fail("unable to move interface %s to jail %s", ifname, vnet_name); + } + + if (jail_attach(jid) == -1) { + RLOG_ERRNO("jail %s attach failed: ret=%d", vnet_name, errno); + atf_tc_fail("jail attach failed"); + } + + RLOG("attached to the jail"); +} + #define SA_F_IGNORE_IFNAME 0x01 #define SA_F_IGNORE_IFTYPE 0x02 Modified: head/tests/sys/net/routing/rtsock_config.h ============================================================================== --- head/tests/sys/net/routing/rtsock_config.h Sun Mar 29 04:18:27 2020 (r359419) +++ head/tests/sys/net/routing/rtsock_config.h Sun Mar 29 06:25:57 2020 (r359420) @@ -30,6 +30,8 @@ #ifndef _NET_ROUTING_RTSOCK_CONFIG_H_ #define _NET_ROUTING_RTSOCK_CONFIG_H_ +#include "params.h" + struct rtsock_test_config { int ifindex; char net4_str[INET_ADDRSTRLEN]; @@ -121,8 +123,8 @@ config_setup(const atf_tc_t *tc) inet_ntop(AF_INET6, &c->net6.sin6_addr, c->net6_str, INET6_ADDRSTRLEN); inet_ntop(AF_INET6, &c->addr6.sin6_addr, c->addr6_str, INET6_ADDRSTRLEN); - c->ifname = strdup(atf_tc_get_config_var_wd(tc, "rtsock.ifname", "tap4242")); - c->autocreated_interface = atf_tc_get_config_var_as_bool_wd(tc, "rtsock.create_interface", true); + c->ifname = strdup("epair"); + c->autocreated_interface = true; if (c->autocreated_interface && (if_nametoindex(c->ifname) == 0)) { @@ -130,8 +132,15 @@ config_setup(const atf_tc_t *tc) char new_ifname[IFNAMSIZ]; strlcpy(new_ifname, c->ifname, sizeof(new_ifname)); int ret = iface_create_cloned(new_ifname); - ATF_REQUIRE_MSG(ret != 0, "tap interface creation failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(ret != 0, "%s interface creation failed: %s", new_ifname, + strerror(errno)); c->ifname = strdup(new_ifname); + file_append_line(IFACES_FNAME, new_ifname); + if (strstr(new_ifname, "epair") == new_ifname) { + /* call returned epairXXXa, need to add epairXXXb */ + new_ifname[strlen(new_ifname) - 1] = 'b'; + file_append_line(IFACES_FNAME, new_ifname); + } } c->ifindex = if_nametoindex(c->ifname); ATF_REQUIRE_MSG(c->ifindex != 0, "inteface %s not found", c->ifname); @@ -143,13 +152,18 @@ config_setup(const atf_tc_t *tc) } void -config_generic_cleanup(struct rtsock_test_config *c) +config_generic_cleanup(const atf_tc_t *tc) { - if (c->ifname != NULL && c->autocreated_interface) { - iface_destroy(c->ifname); - free(c->ifname); - c->ifname = NULL; - } + const char *srcdir = atf_tc_get_config_var(tc, "srcdir"); + char cmd[512]; + int ret; + + /* XXX: sleep 100ms to avoid epair qflush panic */ + usleep(1000 * 100); + snprintf(cmd, sizeof(cmd), "%s/generic_cleanup.sh", srcdir); + ret = system(cmd); + if (ret != 0) + RLOG("'%s' failed, error %d", cmd, ret); } void Modified: head/tests/sys/net/routing/test_rtsock_l3.c ============================================================================== --- head/tests/sys/net/routing/test_rtsock_l3.c Sun Mar 29 04:18:27 2020 (r359419) +++ head/tests/sys/net/routing/test_rtsock_l3.c Sun Mar 29 06:25:57 2020 (r359420) @@ -35,6 +35,20 @@ #include "net/bpf.h" +static void +jump_vnet(struct rtsock_test_config *c, const atf_tc_t *tc) +{ + char vnet_name[512]; + + snprintf(vnet_name, sizeof(vnet_name), "vt-%s", atf_tc_get_ident(tc)); + RLOG("jumping to %s", vnet_name); + + vnet_switch(vnet_name, c->ifname); + + /* Update ifindex cache */ + c->ifindex = if_nametoindex(c->ifname); +} + static inline struct rtsock_test_config * presetup_ipv6_iface(const atf_tc_t *tc) { @@ -43,6 +57,8 @@ presetup_ipv6_iface(const atf_tc_t *tc) c = config_setup(tc); + jump_vnet(c, tc); + ret = iface_turn_up(c->ifname); ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifname); @@ -75,15 +91,11 @@ presetup_ipv4_iface(const atf_tc_t *tc) c = config_setup(tc); + jump_vnet(c, tc); + ret = iface_turn_up(c->ifname); ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifname); - /* Actually open interface, so kernel writes won't fail */ - if (c->autocreated_interface) { - ret = iface_open(c->ifname); - ATF_REQUIRE_MSG(ret >= 0, "unable to open interface %s", c->ifname); - } - return (c); } @@ -235,7 +247,7 @@ verify_link_gateway(struct rt_msghdr *rtm, int ifindex \ #define DESCRIBE_ROOT_TEST(_msg) config_describe_root_test(tc, _msg) -#define CLEANUP_AFTER_TEST config_generic_cleanup(config_setup(tc)) +#define CLEANUP_AFTER_TEST config_generic_cleanup(tc) #define RTM_DECLARE_ROOT_TEST(_name, _descr) \ ATF_TC_WITH_CLEANUP(_name); \ Modified: head/tests/sys/net/routing/test_rtsock_lladdr.c ============================================================================== --- head/tests/sys/net/routing/test_rtsock_lladdr.c Sun Mar 29 04:18:27 2020 (r359419) +++ head/tests/sys/net/routing/test_rtsock_lladdr.c Sun Mar 29 06:25:57 2020 (r359420) @@ -30,6 +30,20 @@ #include "rtsock_common.h" #include "rtsock_config.h" +static void +jump_vnet(struct rtsock_test_config *c, const atf_tc_t *tc) +{ + char vnet_name[512]; + + snprintf(vnet_name, sizeof(vnet_name), "vt-%s", atf_tc_get_ident(tc)); + RLOG("jumping to %s", vnet_name); + + vnet_switch(vnet_name, c->ifname); + + /* Update ifindex cache */ + c->ifindex = if_nametoindex(c->ifname); +} + static inline struct rtsock_test_config * presetup_ipv6(const atf_tc_t *tc) { @@ -38,6 +52,8 @@ presetup_ipv6(const atf_tc_t *tc) c = config_setup(tc); + jump_vnet(c, tc); + ret = iface_turn_up(c->ifname); ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifname); ret = iface_enable_ipv6(c->ifname); @@ -56,16 +72,12 @@ presetup_ipv4(const atf_tc_t *tc) c = config_setup(tc); + jump_vnet(c, tc); + /* assumes ifconfig doing IFF_UP */ ret = iface_setup_addr(c->ifname, c->addr4_str, c->plen4); ATF_REQUIRE_MSG(ret == 0, "ifconfig failed"); - /* Actually open interface, so kernel writes won't fail */ - if (c->autocreated_interface) { - ret = iface_open(c->ifname); - ATF_REQUIRE_MSG(ret >= 0, "unable to open interface %s", c->ifname); - } - c->rtsock_fd = rtsock_setup_socket(); return (c); @@ -96,7 +108,7 @@ 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)) +#define CLEANUP_AFTER_TEST config_generic_cleanup(tc) #define RTM_DECLARE_ROOT_TEST(_name, _descr) \ ATF_TC_WITH_CLEANUP(_name); \ From owner-svn-src-head@freebsd.org Sun Mar 29 06:40:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89C9F2747E4; Sun, 29 Mar 2020 06:40:52 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) (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 48qmFD4LFtz4WQP; Sun, 29 Mar 2020 06:40:47 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-lf1-x144.google.com with SMTP id u15so2142525lfi.3; Sat, 28 Mar 2020 23:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7kwk+v1dPh7F8O8JghtrbxoLGEoRvd/3pRoRZoXae+E=; b=go8KTLr4Gg06j393IG71X1FfT8cVXbEVntEjo3qS038d1ZnX3whwikrm2A6cvXN//e k7MkQ37ttQJbMIQM7JA9Z/sVGcHnq4Vl0okivpnSZJ8gNzAk4YSMVEUZBc294Wq8AFxR mNvPl6nMHQJJRIGKrgPZ5OkbNN7lxQlAJOf0HeaNKd0KVGcwBtsUxurlBBUVM7Ol7MDL pTukUjGsErchLI4536QvbHX0+nPJnxkeBiEtFUaXjk5df04x0ZOEunAGVmnzqnmsCPe4 pgwRtD4BDjQ/+rkvWnEw6bFU75V96pWztoBD2eO6BZxDk3/UderYdGw7ptw/VL0OKOzT hj/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7kwk+v1dPh7F8O8JghtrbxoLGEoRvd/3pRoRZoXae+E=; b=llkubIHSJgL1sJ23QGF+1pNw5Ix3O1MsJCZPLDWeCLExOEZjoOb9898Y9MAP1NMb2i aFZ97RDRMqRUQBy/N5nAxpPb5yYtw8FapKTjqLnCYCpfduRnF/30PzutaaaRjGnzB6Oy drGGR59W9SM43EE5E0Bwe3xlhgMvxxW5yFsDRQ4bkdfQGHowBmaLGkrThu3VdM7IlACy Owr5ealbOoiuldoSTMsX7HBoH1eagOb0ifgn1AWUlEbOyuZ8SZ4kRgag9J6t/nswWYzn gArVL7pZ9YoEz9aNx+WsrCHGNuO5sF/1nu4JeQS7Z8F6o54DeziJqNhFdxSFrdeQHDVz SNHg== X-Gm-Message-State: AGi0Pub71xwK+gMaTlfRo8qhC2t6iRk/BpSlc/FCDv05wzuksAZp/j1p AdTrHJmpsSxQZ4xhC9aJasABqMugR4Q= X-Google-Smtp-Source: APiQypK7Tva8VkU4N4dQlqbHNQ8iH30x67NRWRSBATDxedmbmp+hdD59eJRMMuVP1AqHG+D/N0BGwg== X-Received: by 2002:a19:c388:: with SMTP id t130mr4619334lff.175.1585464039169; Sat, 28 Mar 2020 23:40:39 -0700 (PDT) Received: from [192.168.1.3] ([46.48.69.183]) by smtp.gmail.com with ESMTPSA id u30sm5622422lfn.2.2020.03.28.23.40.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Mar 2020 23:40:38 -0700 (PDT) Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 To: Toomas Soome Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003140636.02E6a3NS020671@repo.freebsd.org> <95805806-b577-d81a-c709-7244d3fea4eb@gmail.com> <35478B22-4EEE-4DE2-B441-7838F676ED68@me.com> From: Ruslan Garipov Message-ID: <1860c146-7f49-37a6-740f-ad0f33b1df79@gmail.com> Date: Sun, 29 Mar 2020 11:40:33 +0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <35478B22-4EEE-4DE2-B441-7838F676ED68@me.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48qmFD4LFtz4WQP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=go8KTLr4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::144 as permitted sender) smtp.mailfrom=ruslanngaripov@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.00)[ip: (2.60), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-0.46), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.4.1.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]; IP_SCORE_FREEMAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 06:40:53 -0000 On 3/27/2020 8:07 PM, Toomas Soome wrote: > > >> On 27. Mar 2020, at 16:39, Ruslan Garipov wrote: >> >> On 3/14/2020 11:36 AM, Toomas Soome wrote: >>> Author: tsoome >>> Date: Sat Mar 14 06:36:03 2020 >>> New Revision: 358989 >>> URL: https://svnweb.freebsd.org/changeset/base/358989 >>> >>> Log: >>> loader: add comconsole implementation on top of SIO protocol >>> >>> Provide comconsole on top of SIO for arm platforms (x86 does use bios version). >>> >>> Added: >>> head/stand/efi/loader/efiserialio.c (contents, props changed) >>> Modified: >>> head/stand/efi/libefi/efi_console.c >>> head/stand/efi/loader/arch/arm/Makefile.inc >>> head/stand/efi/loader/arch/arm64/Makefile.inc >>> head/stand/efi/loader/conf.c >>> head/stand/efi/loader/main.c >>> >>> Modified: head/stand/efi/libefi/efi_console.c >>> ============================================================================== >>> --- head/stand/efi/libefi/efi_console.c Sat Mar 14 05:57:22 2020 (r358988) >>> +++ head/stand/efi/libefi/efi_console.c Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -377,9 +377,22 @@ efi_cons_respond(void *s __unused, const void *buf __u >>> { >>> } >>> >>> +/* >>> + * Set up conin/conout/coninex to make sure we have input ready. >>> + */ >>> static void >>> efi_cons_probe(struct console *cp) >>> { >>> + EFI_STATUS status; >>> + >>> + conout = ST->ConOut; >>> + conin = ST->ConIn; >>> + >>> + status = BS->OpenProtocol(ST->ConsoleInHandle, &simple_input_ex_guid, >>> + (void **)&coninex, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); >>> + if (status != EFI_SUCCESS) >>> + coninex = NULL; >>> + >>> cp->c_flags |= C_PRESENTIN | C_PRESENTOUT; >>> } >>> >>> @@ -889,15 +902,7 @@ efi_cons_init(int arg) >>> if (conin != NULL) >>> return (0); >>> >>> - conout = ST->ConOut; >>> - conin = ST->ConIn; >>> - >>> conout->EnableCursor(conout, TRUE); >>> - status = BS->OpenProtocol(ST->ConsoleInHandle, &simple_input_ex_guid, >>> - (void **)&coninex, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); >>> - if (status != EFI_SUCCESS) >>> - coninex = NULL; >>> - >>> if (efi_cons_update_mode()) >>> return (0); >> Hello, Toomas! >> >> I have to return to this revision once again. >> >> Speaking in advance, the problem I'll describe isn't a fatal one. I >> want to find a solution/root cause by myself... well, I had tried to do >> that but failed, therefore, I need some tips from you, if you have free >> time for that. >> >> The loader started to ignore teken.fg_color after r358989. >> >> I like to have green text on black console. Therefore, I have this: >> >> teken.fg_color="green" > > > Oh cool, at least it is useful for someone:) > > I am sorry, yes this is my bug, I somehow missed the second probe and assumed we do probe only once.. And yes, your analysis is correct, the environment with callback should be treated carefully. > > What probe must do is to set up conin/coninex so the efiserial can use workaround for buggy SIO, the rest is not that important. > > >> >> in my /boot/loader.conf. Before r358989 everything worked just like I >> wanted: not only vt(4) had green text on black, but the loader menu >> also. After r358989 vt(4) still renders greeen text on black, but the >> loader doesn't. It use default white on black. The variable is >> assigned but doesn't affect the output: >> >> OK show teken.fg_color >> green >> >> That started to happen after the changes from above: when code from the >> efi_cons_init() was moved to the efi_cons_probe() >> (stand/efi/libefi/efi_console.c). Therefore, if I revert those only >> changes, the loader starts to draw green text on black. >> >> If I read the sources correctly, the cons_probe() function in >> stand/common/console.c calls both those functions. Moreover, the >> efi_cons_probe() is called twice: first time when the cons_probe() >> probes all available consoles, and then when it searches an "online" >> console. And then the cons_probe() calls the efi_cons_init(). I see >> nothing between those calls which may cause the loader to ignore >> teken.fg_color (or any other variable). >> >> I believe that the efi_set_colors() function from >> stand/efi/libefi/efi_console.c is not call being the hook function for >> the teken.fg_color variable. The efi_cons_update_mode() sets the >> efi_set_colors() as the callback for teken.fg_color, but it's never >> called. The only reason for that, according to code of the env_setenv() >> in stand/libsa/environment.c, is that teken.fg_color was already created >> (without the hook function, of course) when the efi_cons_update_mode() >> tries to assign the efi_set_colors() hook. Or, the >> efi_cons_update_mode() failed to allocate the buffer, and, therefore, >> didn't set teken.fg_color at all. And later teken.fg_color is read from >> /boot/loader.conf. >> >> One more evidence that efi_set_colors() is not called: setting >> teken.fg_color from the loader prompt to something incorrect: >> >> OK set teken.fg_color=foobar >> >> doesn't print error message "Allowed values are either ansi color name >> or number from range ..." >> >> Thoomas, is ignoring of teken.fg_color by the loader caused by failing >> to allocate the buffer within the efi_cons_update_mode()? > > That definitely can be the case. If you do not set any custom values, missing tem.* variables would confirm that. > > Now, there is still an question, why in your system that allocation does fail? Is there a way I can help you to figure that out? I'm afraid I will not have an access to my systems during the following week, but even so. > ou, I found I haven't pushed the workaround for buggy Mode information… > > rgds, > toomas > > >> >>> >>> >>> Modified: head/stand/efi/loader/arch/arm/Makefile.inc >>> ============================================================================== >>> --- head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 05:57:22 2020 (r358988) >>> +++ head/stand/efi/loader/arch/arm/Makefile.inc Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -1,6 +1,7 @@ >>> # $FreeBSD$ >>> >>> SRCS+= exec.c \ >>> + efiserialio.c \ >>> start.S >>> >>> HAVE_FDT=yes >>> >>> Modified: head/stand/efi/loader/arch/arm64/Makefile.inc >>> ============================================================================== >>> --- head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 05:57:22 2020 (r358988) >>> +++ head/stand/efi/loader/arch/arm64/Makefile.inc Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -3,6 +3,7 @@ >>> HAVE_FDT=yes >>> >>> SRCS+= exec.c \ >>> + efiserialio.c \ >>> start.S >>> >>> .PATH: ${BOOTSRC}/arm64/libarm64 >>> >>> Modified: head/stand/efi/loader/conf.c >>> ============================================================================== >>> --- head/stand/efi/loader/conf.c Sat Mar 14 05:57:22 2020 (r358988) >>> +++ head/stand/efi/loader/conf.c Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -73,16 +73,16 @@ struct netif_driver *netif_drivers[] = { >>> }; >>> >>> extern struct console efi_console; >>> -#if defined(__amd64__) || defined(__i386__) >>> extern struct console comconsole; >>> +#if defined(__amd64__) || defined(__i386__) >>> extern struct console nullconsole; >>> extern struct console spinconsole; >>> #endif >>> >>> struct console *consoles[] = { >>> &efi_console, >>> -#if defined(__amd64__) || defined(__i386__) >>> &comconsole, >>> +#if defined(__amd64__) || defined(__i386__) >>> &nullconsole, >>> &spinconsole, >>> #endif >>> >>> Added: head/stand/efi/loader/efiserialio.c >>> ============================================================================== >>> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>> +++ head/stand/efi/loader/efiserialio.c Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -0,0 +1,518 @@ >>> +/*- >>> + * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) >>> + * >>> + * 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 "loader_efi.h" >>> + >>> +static EFI_GUID serial = SERIAL_IO_PROTOCOL; >>> + >>> +#define COMC_TXWAIT 0x40000 /* transmit timeout */ >>> + >>> +#ifndef COMSPEED >>> +#define COMSPEED 9600 >>> +#endif >>> + >>> +#define PNP0501 0x501 /* 16550A-compatible COM port */ >>> + >>> +struct serial { >>> + uint64_t baudrate; >>> + uint8_t databits; >>> + EFI_PARITY_TYPE parity; >>> + EFI_STOP_BITS_TYPE stopbits; >>> + uint8_t ignore_cd; /* boolean */ >>> + uint8_t rtsdtr_off; /* boolean */ >>> + int ioaddr; /* index in handles array */ >>> + EFI_HANDLE currdev; /* current serial device */ >>> + EFI_HANDLE condev; /* EFI Console device */ >>> + SERIAL_IO_INTERFACE *sio; >>> +}; >>> + >>> +static void comc_probe(struct console *); >>> +static int comc_init(int); >>> +static void comc_putchar(int); >>> +static int comc_getchar(void); >>> +static int comc_ischar(void); >>> +static bool comc_setup(void); >>> +static int comc_parse_intval(const char *, unsigned *); >>> +static int comc_port_set(struct env_var *, int, const void *); >>> +static int comc_speed_set(struct env_var *, int, const void *); >>> + >>> +static struct serial *comc_port; >>> +extern struct console efi_console; >>> + >>> +struct console comconsole = { >>> + .c_name = "comconsole", >>> + .c_desc = "serial port", >>> + .c_flags = 0, >>> + .c_probe = comc_probe, >>> + .c_init = comc_init, >>> + .c_out = comc_putchar, >>> + .c_in = comc_getchar, >>> + .c_ready = comc_ischar, >>> +}; >>> + >>> +static EFI_STATUS >>> +efi_serial_init(EFI_HANDLE **handlep, int *nhandles) >>> +{ >>> + UINTN bufsz = 0; >>> + EFI_STATUS status; >>> + EFI_HANDLE *handles; >>> + >>> + /* >>> + * get buffer size >>> + */ >>> + *nhandles = 0; >>> + handles = NULL; >>> + status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); >>> + if (status != EFI_BUFFER_TOO_SMALL) >>> + return (status); >>> + >>> + if ((handles = malloc(bufsz)) == NULL) >>> + return (ENOMEM); >>> + >>> + *nhandles = (int)(bufsz / sizeof (EFI_HANDLE)); >>> + /* >>> + * get handle array >>> + */ >>> + status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles); >>> + if (EFI_ERROR(status)) { >>> + free(handles); >>> + *nhandles = 0; >>> + } else >>> + *handlep = handles; >>> + return (status); >>> +} >>> + >>> +/* >>> + * Find serial device number from device path. >>> + * Return -1 if not found. >>> + */ >>> +static int >>> +efi_serial_get_index(EFI_DEVICE_PATH *devpath, int idx) >>> +{ >>> + ACPI_HID_DEVICE_PATH *acpi; >>> + CHAR16 *text; >>> + >>> + while (!IsDevicePathEnd(devpath)) { >>> + if (DevicePathType(devpath) == MESSAGING_DEVICE_PATH && >>> + DevicePathSubType(devpath) == MSG_UART_DP) >>> + return (idx); >>> + >>> + if (DevicePathType(devpath) == ACPI_DEVICE_PATH && >>> + (DevicePathSubType(devpath) == ACPI_DP || >>> + DevicePathSubType(devpath) == ACPI_EXTENDED_DP)) { >>> + >>> + acpi = (ACPI_HID_DEVICE_PATH *)devpath; >>> + if (acpi->HID == EISA_PNP_ID(PNP0501)) { >>> + return (acpi->UID); >>> + } >>> + } >>> + >>> + devpath = NextDevicePathNode(devpath); >>> + } >>> + return (-1); >>> +} >>> + >>> +/* >>> + * The order of handles from LocateHandle() is not known, we need to >>> + * iterate handles, pick device path for handle, and check the device >>> + * number. >>> + */ >>> +static EFI_HANDLE >>> +efi_serial_get_handle(int port, EFI_HANDLE condev) >>> +{ >>> + EFI_STATUS status; >>> + EFI_HANDLE *handles, handle; >>> + EFI_DEVICE_PATH *devpath; >>> + int index, nhandles; >>> + >>> + if (port == -1) >>> + return (NULL); >>> + >>> + handles = NULL; >>> + nhandles = 0; >>> + status = efi_serial_init(&handles, &nhandles); >>> + if (EFI_ERROR(status)) >>> + return (NULL); >>> + >>> + /* >>> + * We have console handle, set ioaddr for it. >>> + */ >>> + if (condev != NULL) { >>> + for (index = 0; index < nhandles; index++) { >>> + if (condev == handles[index]) { >>> + devpath = efi_lookup_devpath(condev); >>> + comc_port->ioaddr = >>> + efi_serial_get_index(devpath, index); >>> + efi_close_devpath(condev); >>> + free(handles); >>> + return (condev); >>> + } >>> + } >>> + } >>> + >>> + handle = NULL; >>> + for (index = 0; handle == NULL && index < nhandles; index++) { >>> + devpath = efi_lookup_devpath(handles[index]); >>> + if (port == efi_serial_get_index(devpath, index)) >>> + handle = (handles[index]); >>> + efi_close_devpath(handles[index]); >>> + } >>> + >>> + /* >>> + * In case we did fail to identify the device by path, use port as >>> + * array index. Note, we did check port == -1 above. >>> + */ >>> + if (port < nhandles && handle == NULL) >>> + handle = handles[port]; >>> + >>> + free(handles); >>> + return (handle); >>> +} >>> + >>> +static EFI_HANDLE >>> +comc_get_con_serial_handle(const char *name) >>> +{ >>> + EFI_HANDLE handle; >>> + EFI_DEVICE_PATH *node; >>> + EFI_STATUS status; >>> + char *buf, *ep; >>> + size_t sz; >>> + >>> + buf = NULL; >>> + sz = 0; >>> + status = efi_global_getenv(name, buf, &sz); >>> + if (status == EFI_BUFFER_TOO_SMALL) { >>> + buf = malloc(sz); >>> + if (buf != NULL) >>> + status = efi_global_getenv(name, buf, &sz); >>> + } >>> + if (status != EFI_SUCCESS) { >>> + free(buf); >>> + return (NULL); >>> + } >>> + >>> + ep = buf + sz; >>> + node = (EFI_DEVICE_PATH *)buf; >>> + while ((char *)node < ep) { >>> + status = BS->LocateDevicePath(&serial, &node, &handle); >>> + if (status == EFI_SUCCESS) { >>> + free(buf); >>> + return (handle); >>> + } >>> + if (IsDevicePathEndType(node) && >>> + DevicePathSubType(node) == >>> + END_INSTANCE_DEVICE_PATH_SUBTYPE) { >>> + /* >>> + * Start of next device path in list. >>> + */ >>> + node = NextDevicePathNode(node); >>> + continue; >>> + } >>> + if (IsDevicePathEnd(node)) >>> + break; >>> + } >>> + free(buf); >>> + return (NULL); >>> +} >>> + >>> +static void >>> +comc_probe(struct console *sc) >>> +{ >>> + EFI_STATUS status; >>> + EFI_HANDLE handle; >>> + char name[20]; >>> + char value[20]; >>> + unsigned val; >>> + char *env, *buf, *ep; >>> + size_t sz; >>> + >>> + if (comc_port == NULL) { >>> + comc_port = malloc(sizeof (struct serial)); >>> + if (comc_port == NULL) >>> + return; >>> + } >>> + comc_port->baudrate = COMSPEED; >>> + comc_port->ioaddr = 0; /* default port */ >>> + comc_port->databits = 8; /* 8,n,1 */ >>> + comc_port->parity = NoParity; /* 8,n,1 */ >>> + comc_port->stopbits = OneStopBit; /* 8,n,1 */ >>> + comc_port->ignore_cd = 1; /* ignore cd */ >>> + comc_port->rtsdtr_off = 0; /* rts-dtr is on */ >>> + comc_port->sio = NULL; >>> + >>> + handle = NULL; >>> + env = getenv("efi_com_port"); >>> + if (comc_parse_intval(env, &val) == CMD_OK) { >>> + comc_port->ioaddr = val; >>> + } else { >>> + /* >>> + * efi_com_port is not set, we need to select default. >>> + * First, we consult ConOut variable to see if >>> + * we have serial port redirection. If not, we just >>> + * pick first device. >>> + */ >>> + handle = comc_get_con_serial_handle("ConOut"); >>> + comc_port->condev = handle; >>> + } >>> + >>> + handle = efi_serial_get_handle(comc_port->ioaddr, handle); >>> + if (handle != NULL) { >>> + comc_port->currdev = handle; >>> + status = BS->OpenProtocol(handle, &serial, >>> + (void**)&comc_port->sio, IH, NULL, >>> + EFI_OPEN_PROTOCOL_GET_PROTOCOL); >>> + >>> + if (EFI_ERROR(status)) >>> + comc_port->sio = NULL; >>> + } >>> + >>> + if (env != NULL) >>> + unsetenv("efi_com_port"); >>> + snprintf(value, sizeof (value), "%u", comc_port->ioaddr); >>> + env_setenv("efi_com_port", EV_VOLATILE, value, >>> + comc_port_set, env_nounset); >>> + >>> + env = getenv("efi_com_speed"); >>> + if (comc_parse_intval(env, &val) == CMD_OK) >>> + comc_port->baudrate = val; >>> + >>> + if (env != NULL) >>> + unsetenv("efi_com_speed"); >>> + snprintf(value, sizeof (value), "%ju", (uintmax_t)comc_port->baudrate); >>> + env_setenv("efi_com_speed", EV_VOLATILE, value, >>> + comc_speed_set, env_nounset); >>> + >>> + comconsole.c_flags = 0; >>> + if (comc_setup()) >>> + sc->c_flags = C_PRESENTIN | C_PRESENTOUT; >>> +} >>> + >>> +static int >>> +comc_init(int arg __unused) >>> +{ >>> + >>> + if (comc_setup()) >>> + return (CMD_OK); >>> + >>> + comconsole.c_flags = 0; >>> + return (CMD_ERROR); >>> +} >>> + >>> +static void >>> +comc_putchar(int c) >>> +{ >>> + int wait; >>> + EFI_STATUS status; >>> + UINTN bufsz = 1; >>> + char cb = c; >>> + >>> + if (comc_port->sio == NULL) >>> + return; >>> + >>> + for (wait = COMC_TXWAIT; wait > 0; wait--) { >>> + status = comc_port->sio->Write(comc_port->sio, &bufsz, &cb); >>> + if (status != EFI_TIMEOUT) >>> + break; >>> + } >>> +} >>> + >>> +static int >>> +comc_getchar(void) >>> +{ >>> + EFI_STATUS status; >>> + UINTN bufsz = 1; >>> + char c; >>> + >>> + >>> + /* >>> + * if this device is also used as ConIn, some firmwares >>> + * fail to return all input via SIO protocol. >>> + */ >>> + if (comc_port->currdev == comc_port->condev) { >>> + if ((efi_console.c_flags & C_ACTIVEIN) == 0) >>> + return (efi_console.c_in()); >>> + return (-1); >>> + } >>> + >>> + if (comc_port->sio == NULL) >>> + return (-1); >>> + >>> + status = comc_port->sio->Read(comc_port->sio, &bufsz, &c); >>> + if (EFI_ERROR(status) || bufsz == 0) >>> + return (-1); >>> + >>> + return (c); >>> +} >>> + >>> +static int >>> +comc_ischar(void) >>> +{ >>> + EFI_STATUS status; >>> + uint32_t control; >>> + >>> + /* >>> + * if this device is also used as ConIn, some firmwares >>> + * fail to return all input via SIO protocol. >>> + */ >>> + if (comc_port->currdev == comc_port->condev) { >>> + if ((efi_console.c_flags & C_ACTIVEIN) == 0) >>> + return (efi_console.c_ready()); >>> + return (0); >>> + } >>> + >>> + if (comc_port->sio == NULL) >>> + return (0); >>> + >>> + status = comc_port->sio->GetControl(comc_port->sio, &control); >>> + if (EFI_ERROR(status)) >>> + return (0); >>> + >>> + return (!(control & EFI_SERIAL_INPUT_BUFFER_EMPTY)); >>> +} >>> + >>> +static int >>> +comc_parse_intval(const char *value, unsigned *valp) >>> +{ >>> + unsigned n; >>> + char *ep; >>> + >>> + if (value == NULL || *value == '\0') >>> + return (CMD_ERROR); >>> + >>> + errno = 0; >>> + n = strtoul(value, &ep, 10); >>> + if (errno != 0 || *ep != '\0') >>> + return (CMD_ERROR); >>> + *valp = n; >>> + >>> + return (CMD_OK); >>> +} >>> + >>> +static int >>> +comc_port_set(struct env_var *ev, int flags, const void *value) >>> +{ >>> + unsigned port; >>> + SERIAL_IO_INTERFACE *sio; >>> + EFI_HANDLE handle; >>> + EFI_STATUS status; >>> + >>> + if (value == NULL) >>> + return (CMD_ERROR); >>> + >>> + if (comc_parse_intval(value, &port) != CMD_OK) >>> + return (CMD_ERROR); >>> + >>> + handle = efi_serial_get_handle(port, NULL); >>> + if (handle == NULL) { >>> + printf("no handle\n"); >>> + return (CMD_ERROR); >>> + } >>> + >>> + status = BS->OpenProtocol(handle, &serial, >>> + (void**)&sio, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); >>> + >>> + if (EFI_ERROR(status)) { >>> + printf("OpenProtocol: %lu\n", EFI_ERROR_CODE(status)); >>> + return (CMD_ERROR); >>> + } >>> + >>> + comc_port->currdev = handle; >>> + comc_port->ioaddr = port; >>> + comc_port->sio = sio; >>> + >>> + (void) comc_setup(); >>> + >>> + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); >>> + return (CMD_OK); >>> +} >>> + >>> +static int >>> +comc_speed_set(struct env_var *ev, int flags, const void *value) >>> +{ >>> + unsigned speed; >>> + >>> + if (value == NULL) >>> + return (CMD_ERROR); >>> + >>> + if (comc_parse_intval(value, &speed) != CMD_OK) >>> + return (CMD_ERROR); >>> + >>> + comc_port->baudrate = speed; >>> + (void) comc_setup(); >>> + >>> + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); >>> + >>> + return (CMD_OK); >>> +} >>> + >>> +/* >>> + * In case of error, we also reset ACTIVE flags, so the console >>> + * framefork will try alternate consoles. >>> + */ >>> +static bool >>> +comc_setup(void) >>> +{ >>> + EFI_STATUS status; >>> + UINT32 control; >>> + >>> + /* port is not usable */ >>> + if (comc_port->sio == NULL) >>> + return (false); >>> + >>> + status = comc_port->sio->Reset(comc_port->sio); >>> + if (EFI_ERROR(status)) >>> + return (false); >>> + >>> + status = comc_port->sio->SetAttributes(comc_port->sio, >>> + comc_port->baudrate, 0, 0, comc_port->parity, >>> + comc_port->databits, comc_port->stopbits); >>> + if (EFI_ERROR(status)) >>> + return (false); >>> + >>> + status = comc_port->sio->GetControl(comc_port->sio, &control); >>> + if (EFI_ERROR(status)) >>> + return (false); >>> + if (comc_port->rtsdtr_off) { >>> + control &= ~(EFI_SERIAL_REQUEST_TO_SEND | >>> + EFI_SERIAL_DATA_TERMINAL_READY); >>> + } else { >>> + control |= EFI_SERIAL_REQUEST_TO_SEND; >>> + } >>> + (void) comc_port->sio->SetControl(comc_port->sio, control); >>> + /* Mark this port usable. */ >>> + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); >>> + return (true); >>> +} >>> >>> Modified: head/stand/efi/loader/main.c >>> ============================================================================== >>> --- head/stand/efi/loader/main.c Sat Mar 14 05:57:22 2020 (r358988) >>> +++ head/stand/efi/loader/main.c Sat Mar 14 06:36:03 2020 (r358989) >>> @@ -722,7 +722,8 @@ parse_uefi_con_out(void) >>> while ((char *)node < ep) { >>> pci_pending = false; >>> if (DevicePathType(node) == ACPI_DEVICE_PATH && >>> - DevicePathSubType(node) == ACPI_DP) { >>> + (DevicePathSubType(node) == ACPI_DP || >>> + DevicePathSubType(node) == ACPI_EXTENDED_DP)) { >>> /* Check for Serial node */ >>> acpi = (void *)node; >>> if (EISA_ID_TO_NUM(acpi->HID) == 0x501) { >>> @@ -731,7 +732,7 @@ parse_uefi_con_out(void) >>> } >>> } else if (DevicePathType(node) == MESSAGING_DEVICE_PATH && >>> DevicePathSubType(node) == MSG_UART_DP) { >>> - >>> + com_seen = ++seen; >>> uart = (void *)node; >>> setenv_int("efi_com_speed", uart->BaudRate); >>> } else if (DevicePathType(node) == ACPI_DEVICE_PATH && >>> @@ -897,6 +898,11 @@ main(int argc, CHAR16 *argv[]) >>> * changes to take effect, regardless of where they come from. >>> */ >>> setenv("console", "efi", 1); >>> + uhowto = parse_uefi_con_out(); >>> +#if defined(__aarch64__) || defined(__arm__) >>> + if ((uhowto & RB_SERIAL) != 0) >>> + setenv("console", "comconsole", 1); >>> +#endif >>> cons_probe(); >>> >>> /* Init the time source */ >>> @@ -930,7 +936,6 @@ main(int argc, CHAR16 *argv[]) >>> if (!has_kbd && (howto & RB_PROBE)) >>> howto |= RB_SERIAL | RB_MULTIPLE; >>> howto &= ~RB_PROBE; >>> - uhowto = parse_uefi_con_out(); >>> >>> /* >>> * Read additional environment variables from the boot device's >>> _______________________________________________ >>> svn-src-head@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/svn-src-head >>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >>> > From owner-svn-src-head@freebsd.org Sun Mar 29 06:49:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBAA2274B35; Sun, 29 Mar 2020 06:49:09 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48qmQr0zCVz4Z3Z; Sun, 29 Mar 2020 06:49:08 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9FB08236C4; Sun, 29 Mar 2020 06:48:59 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02T6mxDV093776; Sun, 29 Mar 2020 06:48:59 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02T6mxex093775; Sun, 29 Mar 2020 06:48:59 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003290648.02T6mxex093775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 29 Mar 2020 06:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359421 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 359421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 06:49:10 -0000 Author: tsoome Date: Sun Mar 29 06:48:59 2020 New Revision: 359421 URL: https://svnweb.freebsd.org/changeset/base/359421 Log: loader: use #elif defined() in stand.h Small cleanup. Reported by: imp Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Sun Mar 29 06:25:57 2020 (r359420) +++ head/stand/libsa/stand.h Sun Mar 29 06:48:59 2020 (r359421) @@ -443,7 +443,7 @@ extern void *calloc(size_t, size_t); extern void free(void *); extern void *realloc(void *, size_t); extern void *reallocf(void *, size_t); -#elif DEBUG_MALLOC +#elif defined(DEBUG_MALLOC) #define malloc(x) Malloc(x, __FILE__, __LINE__) #define memalign(x, y) Memalign(x, y, __FILE__, __LINE__) #define calloc(x, y) Calloc(x, y, __FILE__, __LINE__) From owner-svn-src-head@freebsd.org Sun Mar 29 06:55:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 201C9274EE9 for ; Sun, 29 Mar 2020 06:55:41 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st43p00im-zteg10061901.me.com (st43p00im-zteg10061901.me.com [17.58.63.168]) (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 48qmZF0mBYz4c70 for ; Sun, 29 Mar 2020 06:55:32 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by st43p00im-zteg10061901.me.com (Postfix) with ESMTPSA id A70678604A1; Sun, 29 Mar 2020 06:49:15 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r358989 - in head/stand/efi: libefi loader loader/arch/arm loader/arch/arm64 From: Toomas Soome In-Reply-To: <1860c146-7f49-37a6-740f-ad0f33b1df79@gmail.com> Date: Sun, 29 Mar 2020 09:49:13 +0300 Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7DBEB044-7F51-4B78-9919-8FFC76B1C76F@me.com> References: <202003140636.02E6a3NS020671@repo.freebsd.org> <95805806-b577-d81a-c709-7244d3fea4eb@gmail.com> <35478B22-4EEE-4DE2-B441-7838F676ED68@me.com> <1860c146-7f49-37a6-740f-ad0f33b1df79@gmail.com> To: Ruslan Garipov X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-03-29_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=928 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2003290065 X-Rspamd-Queue-Id: 48qmZF0mBYz4c70 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[me.com]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[148.52.235.80.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; RCVD_IN_DNSWL_LOW(-0.10)[168.63.58.17.list.dnswl.org : 127.0.5.1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[me.com]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-4.08), ipnet: 17.58.63.0/24(-1.62), asn: 714(-2.42), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[me.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 06:55:41 -0000 > On 29. Mar 2020, at 09:40, Ruslan Garipov = wrote: >=20 >>>=20 >>=20 >> That definitely can be the case. If you do not set any custom values, = missing tem.* variables would confirm that. >>=20 >> Now, there is still an question, why in your system that allocation = does fail? > Is there a way I can help you to figure that out? I'm afraid I will = not > have an access to my systems during the following week, but even so. Hi! Please test latest current:) thanks, toomas From owner-svn-src-head@freebsd.org Sun Mar 29 11:20:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 992B127B513; Sun, 29 Mar 2020 11:20:21 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48qtRm3lLdz4JJr; Sun, 29 Mar 2020 11:20:19 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 02TB393g051397; Sun, 29 Mar 2020 04:03:09 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 02TB393j051396; Sun, 29 Mar 2020 04:03:09 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003291103.02TB393j051396@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359419 - head/usr.bin/ncal In-Reply-To: <202003290418.02T4IR46003292@repo.freebsd.org> To: Greg Lehey Date: Sun, 29 Mar 2020 04:03:09 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48qtRm3lLdz4JJr X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 11:20:21 -0000 > Author: grog > Date: Sun Mar 29 04:18:27 2020 > New Revision: 359419 > URL: https://svnweb.freebsd.org/changeset/base/359419 > > Log: > Remove spurious transition from Julian to Gregorian for country > "Latin". > > Arguably the entire -p option should be removed. It shows only a few > countries, and it doesn't have any relationship with the rest of the > program. This commit message and the diff below do not seem to match very well. Is this actually what you intended to commit? > > PR: 244801 > Submitted by: grog@ > Reported by: Hamid Ali > > Modified: > head/usr.bin/ncal/ncal.c > > Modified: head/usr.bin/ncal/ncal.c > ============================================================================== > --- head/usr.bin/ncal/ncal.c Sun Mar 29 04:14:57 2020 (r359418) > +++ head/usr.bin/ncal/ncal.c Sun Mar 29 04:18:27 2020 (r359419) > @@ -95,7 +95,6 @@ static struct djswitch { > {"IT", "Italy", {1582, 10, 4}}, > {"JP", "Japan", {1918, 12, 18}}, > {"LI", "Lithuania", {1918, 2, 1}}, > - {"LN", "Latin", {9999, 05, 31}}, > {"LU", "Luxembourg", {1582, 12, 14}}, > {"LV", "Latvia", {1918, 2, 1}}, > {"NL", "Netherlands", {1582, 12, 14}}, > @@ -580,7 +579,7 @@ printeaster(int y, int julian, int orthodox) > (y)++; \ > } > #define M2Y(m) ((m) / 12) > -#define M2M(m) (1 + (m) % 12) > +#define M2M(m) (1 + (m) % 12) > > /* Print all months for the period in the range [ before .. y-m .. after ]. */ > static void > @@ -925,7 +924,7 @@ mkmonthb(int y, int m, int jd_flag, struct monthlines > for (i = 0; i != 6; i++) { > l = 0; > for (j = firsts + 7 * i, k = 0; j < last && k != dw * 7; > - j++, k += dw) { > + j++, k += dw) { > if (j >= first) { > if (jd_flag) > dt.d = j - jan1 + 1; > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Mar 29 15:43:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0C9A2A2F42; Sun, 29 Mar 2020 15:43:09 +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 48r0H04vbmz3DQD; Sun, 29 Mar 2020 15:43:08 +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 AC7B02D32; Sun, 29 Mar 2020 15:43:00 +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 02TFh03C020971; Sun, 29 Mar 2020 15:43:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TFh0TH020970; Sun, 29 Mar 2020 15:43:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003291543.02TFh0TH020970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 29 Mar 2020 15:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359422 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 359422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 15:43:09 -0000 Author: tuexen Date: Sun Mar 29 15:43:00 2020 New Revision: 359422 URL: https://svnweb.freebsd.org/changeset/base/359422 Log: Be a bit more precisly in the description of the sysctl variable net.inet.tcp.pmtud_blackhole_detection. Also remove three entries, which are not sysctl variables but statistic counters for TCP. Thanks to 0mp@ for suggesting an improvement. Reviewed by: bcr@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D24216 Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Sun Mar 29 06:48:59 2020 (r359421) +++ head/share/man/man4/tcp.4 Sun Mar 29 15:43:00 2020 (r359422) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 2, 2019 +.Dd March 29, 2020 .Dt TCP 4 .Os .Sh NAME @@ -632,7 +632,12 @@ Turn on automatic path MTU blackhole detection. In case of retransmits OS will lower the MSS to check if it's MTU problem. If current MSS is greater than -configured value to try, it will be set to configured value, otherwise, +configured value to try +.Po Va net.inet.tcp.pmtud_blackhole_mss +and +.Va net.inet.tcp.v6pmtud_blackhole_mss +.Pc , +it will be set to this value, otherwise, MSS will be set to default values .Po Va net.inet.tcp.mssdflt and @@ -642,13 +647,6 @@ and MSS to try for IPv4 if PMTU blackhole detection is turned on. .It Va v6pmtud_blackhole_mss MSS to try for IPv6 if PMTU blackhole detection is turned on. -.It Va pmtud_blackhole_activated -Number of times configured values were used in an attempt to downshift. -.It Va pmtud_blackhole_activated_min_mss -Number of times default MSS was used in an attempt to downshift. -.It Va pmtud_blackhole_failed -Number of connections for which retransmits continued even after MSS -downshift. .It Va functions_available List of available TCP function blocks (TCP stacks). .It Va functions_default From owner-svn-src-head@freebsd.org Sun Mar 29 17:30:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83B5B2A52B9; Sun, 29 Mar 2020 17:30:19 +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 48r2fc6w2Yz4P3Z; Sun, 29 Mar 2020 17:30:16 +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 49A6F440B; Sun, 29 Mar 2020 17:30:09 +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 02THU9cx081754; Sun, 29 Mar 2020 17:30:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02THU9V3081753; Sun, 29 Mar 2020 17:30:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202003291730.02THU9V3081753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 29 Mar 2020 17:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359423 - 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: 359423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 17:30:20 -0000 Author: ian Date: Sun Mar 29 17:30:08 2020 New Revision: 359423 URL: https://svnweb.freebsd.org/changeset/base/359423 Log: Add a missing suffix that was causing a whole word to get loaded instead of the proper 8 or 16 bits when the macro was expanded for those sizes. Fixes a hang in the armv7 kernel. Submitted by: Thomas Skibo Pointy hat: ian@ Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Sun Mar 29 15:43:00 2020 (r359422) +++ head/sys/arm/include/atomic-v6.h Sun Mar 29 17:30:08 2020 (r359423) @@ -196,7 +196,7 @@ ATOMIC_ACQ_REL_LONG(clear) \ __asm __volatile( \ "1: ldrex" SUF " %[tmp], [%[ptr]] \n" \ - " ldr %[ret], [%[oldv]] \n" \ + " ldr" SUF " %[ret], [%[oldv]] \n" \ " teq %[tmp], %[ret] \n" \ " ittee ne \n" \ " str" SUF "ne %[tmp], [%[oldv]] \n" \ From owner-svn-src-head@freebsd.org Sun Mar 29 19:14:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32B062A7BB5; Sun, 29 Mar 2020 19:14:36 +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 48r4yz70rHz44PY; Sun, 29 Mar 2020 19:14: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 07ABF5A05; Sun, 29 Mar 2020 19:14:28 +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 02TJERoG048637; Sun, 29 Mar 2020 19:14:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TJERqr048636; Sun, 29 Mar 2020 19:14:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003291914.02TJERqr048636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 19:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359424 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 359424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 19:14:38 -0000 Author: kevans Date: Sun Mar 29 19:14:27 2020 New Revision: 359424 URL: https://svnweb.freebsd.org/changeset/base/359424 Log: openssh: -fno-common fix from upstream f47d72ddad This is currently staged in vendor/ as part of the 8.0p1 import, which isn't quite ready to land. Given that this is a simple one-line fix, apply it now as the fallout will be pretty minimal. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Modified: head/crypto/openssh/session.c Modified: head/crypto/openssh/session.c ============================================================================== --- head/crypto/openssh/session.c Sun Mar 29 17:30:08 2020 (r359423) +++ head/crypto/openssh/session.c Sun Mar 29 19:14:27 2020 (r359424) @@ -143,7 +143,7 @@ extern int startup_pipe; extern void destroy_sensitive_data(void); extern struct sshbuf *loginmsg; extern struct sshauthopt *auth_opts; -char *tun_fwd_ifnames; /* serverloop.c */ +extern char *tun_fwd_ifnames; /* serverloop.c */ /* original command from peer. */ const char *original_command = NULL; From owner-svn-src-head@freebsd.org Sun Mar 29 19:16:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8101F2A7C70; Sun, 29 Mar 2020 19:16: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 48r5132tD9z4517; Sun, 29 Mar 2020 19:16:22 +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 6917A5A08; Sun, 29 Mar 2020 19:16:15 +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 02TJGFVu048773; Sun, 29 Mar 2020 19:16:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TJGFTG048772; Sun, 29 Mar 2020 19:16:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003291916.02TJGFTG048772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 19:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359425 - head/usr.bin/locate/locate X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/locate/locate X-SVN-Commit-Revision: 359425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 19:16:29 -0000 Author: kevans Date: Sun Mar 29 19:16:14 2020 New Revision: 359425 URL: https://svnweb.freebsd.org/changeset/base/359425 Log: locate: fix -fno-common build Just a single variable declaration to extern and define elsewhere here, myctype. -fno-common will become a default in GCC10/LLVM11. MFC after: 3 days Modified: head/usr.bin/locate/locate/locate.c head/usr.bin/locate/locate/locate.h Modified: head/usr.bin/locate/locate/locate.c ============================================================================== --- head/usr.bin/locate/locate/locate.c Sun Mar 29 19:14:27 2020 (r359424) +++ head/usr.bin/locate/locate/locate.c Sun Mar 29 19:16:14 2020 (r359425) @@ -116,6 +116,7 @@ int f_limit; /* limit number of output line u_int counter; /* counter for matches [-c] */ char separator='\n'; /* line separator */ +u_char myctype[UCHAR_MAX + 1]; void usage(void); void statistic(FILE *, char *); Modified: head/usr.bin/locate/locate/locate.h ============================================================================== --- head/usr.bin/locate/locate/locate.h Sun Mar 29 19:14:27 2020 (r359424) +++ head/usr.bin/locate/locate/locate.h Sun Mar 29 19:16:14 2020 (r359425) @@ -65,7 +65,7 @@ define TOLOWER(ch) tolower(ch) #else -u_char myctype[UCHAR_MAX + 1]; +extern u_char myctype[UCHAR_MAX + 1]; #define TOLOWER(ch) (myctype[ch]) #endif From owner-svn-src-head@freebsd.org Sun Mar 29 19:46:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E0B4260A8E; Sun, 29 Mar 2020 19:46:27 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 48r5gY3KZ9z4Glv; Sun, 29 Mar 2020 19:46:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A06D03C0199; Sun, 29 Mar 2020 19:46:07 +0000 (UTC) Date: Sun, 29 Mar 2020 19:46:07 +0000 From: Brooks Davis To: Enji Cooper Cc: Enji Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359385 - head/usr.bin/kyua Message-ID: <20200329194607.GB40889@spindle.one-eyed-alien.net> References: <202003280108.02S18KWc062782@repo.freebsd.org> <20200328032209.GA40889@spindle.one-eyed-alien.net> <2A7EAECB-C11A-458C-9495-BC975300D363@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <2A7EAECB-C11A-458C-9495-BC975300D363@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48r5gY3KZ9z4Glv X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-6.53 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(-3.63)[ip: (-9.53), ipnet: 199.48.128.0/22(-4.75), asn: 36236(-3.82), country: US(-0.05)]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; SIGNED_PGP(-2.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 19:46:27 -0000 --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 28, 2020 at 07:42:04PM -0700, Enji Cooper wrote: >=20 > > On Mar 28, 2020, at 7:37 PM, Enji Cooper wrote: > >=20 > >>=20 > >> On Mar 27, 2020, at 8:22 PM, Brooks Davis > wrote: > >>=20 > >> On Sat, Mar 28, 2020 at 01:08:20AM +0000, Enji Cooper wrote: > >>> Author: ngie > >>> Date: Sat Mar 28 01:08:20 2020 > >>> New Revision: 359385 > >>> URL: https://svnweb.freebsd.org/changeset/base/359385 > >>>=20 > >>> Log: > >>> Check in the generated copies of the manpages > >>>=20 > >>> These manpages were meant to be templated once per `configure` run. > >>>=20 > >>> Given that we're not bound by as many constants, e.g., `--prefix` is= n't > >>> generally changing for kyua in the base system, having to generate t= he > >>> manpages each build seems slightly less than optimal. > >>>=20 > >>> In the event that one's build environment doesn't define `$SH`, the = build > >>> will also fail until this change is introduced. > >>>=20 > >>> Instead of jumping through hoops dealing with shells or permissions,= let's > >>> just cut to the chase and check the generated copies into the source= base > >>> under usr.bin/kyua . > >>=20 > >> This was the wrong fix. Committing generated manpaged was > >> 100% the wrong solution and will make extra work in the > >> future. The correct fix is almost certainly the one attached to > >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245086 . If someone > >> doesn't beat me to it I will revert you wrong and broken commit along > >> with the followups and commit the correct one (this certainly won't be > >> until at least tomorrow). > >=20 > > I???ll revert my changes. >=20 > Done in r359417. Thank you! -- Brooks --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJegPr+AAoJEKzQXbSebgfAcDoH/jHGMExVpniE2bbsITQR5MA3 FzFfcWJ/OPtEShcTNDhPiYePrcXXE+tcGP8bvcQKmzWRYw05qKeXKYn8MZZ/FNBc bPLF3zP8POpd6ph+N+0XTsLXn8lliw8pZ1UnlJ20rkFwKZWuEv67TwcZ9U1Ut9VV y2AyqpIC0OZOTY95DCc4/T6UzxWWMePuSJFliol4DUxO0fjLC5pAvvYi6Ep135fL YrPetjkofYm66iT3gvhvVSJ/9jM7y4u/ivEK8a1aMHoNZsbBEKi1IGv8l5bOfADz HTZp8v4dB6U41WbNy+38yZWsMffr046eNLQGZodQu9WvN7JvkZg2cS4c8zKMydg= =kV6m -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK-- From owner-svn-src-head@freebsd.org Sun Mar 29 19:48:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16797260C41; Sun, 29 Mar 2020 19:48:36 +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 48r5kC3JwXz4HWt; Sun, 29 Mar 2020 19:48:35 +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 3A5FE609F; Sun, 29 Mar 2020 19:48: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 02TJmT3q066950; Sun, 29 Mar 2020 19:48:29 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TJmTbX066949; Sun, 29 Mar 2020 19:48:29 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003291948.02TJmTbX066949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 29 Mar 2020 19:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359426 - head/usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/usr.bin/kyua X-SVN-Commit-Revision: 359426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 19:48:36 -0000 Author: brooks Date: Sun Mar 29 19:48:28 2020 New Revision: 359426 URL: https://svnweb.freebsd.org/changeset/base/359426 Log: Fix build with src on a noexec filesystem. ${SH} expands to nothing on src builds so this worked by accident. Use a bare "sh" instead. PR: 245086 Reported by: pkubaj Sponsored by: DARPA Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Sun Mar 29 19:16:14 2020 (r359425) +++ head/usr.bin/kyua/Makefile Sun Mar 29 19:48:28 2020 (r359426) @@ -52,7 +52,7 @@ CLEANFILES+= ${MAN} .PATH: ${KYUA_SRCDIR}/doc .for man in ${MAN} ${man}: ${man}.in - ${SH} ${KYUA_SRCDIR}/doc/manbuild.sh \ + sh ${KYUA_SRCDIR}/doc/manbuild.sh \ -v "CONFDIR=${KYUA_CONFDIR}" \ -v "DOCDIR=${KYUA_DOCDIR}" \ -v "EGDIR=${KYUA_EGDIR}" \ From owner-svn-src-head@freebsd.org Sun Mar 29 20:03:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D7AB261486; Sun, 29 Mar 2020 20:03:59 +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 48r63v6THVz4Nb8; Sun, 29 Mar 2020 20:03:55 +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 4C6D96498; Sun, 29 Mar 2020 20:03:48 +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 02TK3mUp079101; Sun, 29 Mar 2020 20:03:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TK3lxV079097; Sun, 29 Mar 2020 20:03:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003292003.02TK3lxV079097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 20:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359427 - in head/sbin: fsck_ffs fsdb X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sbin: fsck_ffs fsdb X-SVN-Commit-Revision: 359427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 20:03:59 -0000 Author: kevans Date: Sun Mar 29 20:03:46 2020 New Revision: 359427 URL: https://svnweb.freebsd.org/changeset/base/359427 Log: fsck_ffs/fsdb: fix -fno-common build This one is also a small list: - 3x duplicate definition (ufs2_zino, returntosingle, nflag) - 5x 'needs extern', 3/5 of which are referenced in fsdb -fno-common will become the default in GCC10/LLVM11. MFC after: 1 week Modified: head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/gjournal.c head/sbin/fsck_ffs/globs.c head/sbin/fsck_ffs/setup.c head/sbin/fsdb/fsdb.c Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Sun Mar 29 19:48:28 2020 (r359426) +++ head/sbin/fsck_ffs/fsck.h Sun Mar 29 20:03:46 2020 (r359427) @@ -127,7 +127,7 @@ struct inostat { * Inode state information is contained on per cylinder group lists * which are described by the following structure. */ -struct inostatlist { +extern struct inostatlist { long il_numalloced; /* number of inodes allocated in this cg */ struct inostat *il_stat;/* inostat info for this cylinder group */ } *inostathead; @@ -271,13 +271,13 @@ struct dups { struct dups *next; ufs2_daddr_t dup; }; -struct dups *duplist; /* head of dup list */ -struct dups *muldup; /* end of unique duplicate dup block numbers */ +extern struct dups *duplist; /* head of dup list */ +extern struct dups *muldup; /* end of unique duplicate dup block numbers */ /* * Inode cache data structures. */ -struct inoinfo { +extern struct inoinfo { struct inoinfo *i_nexthash; /* next entry in hash chain */ ino_t i_number; /* inode number of this entry */ ino_t i_parent; /* inode number of parent */ Modified: head/sbin/fsck_ffs/gjournal.c ============================================================================== --- head/sbin/fsck_ffs/gjournal.c Sun Mar 29 19:48:28 2020 (r359426) +++ head/sbin/fsck_ffs/gjournal.c Sun Mar 29 20:03:46 2020 (r359427) @@ -93,7 +93,6 @@ static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIAL static const char *devnam; static struct uufsd *diskp = NULL; static struct fs *fs = NULL; -struct ufs2_dinode ufs2_zino; static void putcgs(void); Modified: head/sbin/fsck_ffs/globs.c ============================================================================== --- head/sbin/fsck_ffs/globs.c Sun Mar 29 19:48:28 2020 (r359426) +++ head/sbin/fsck_ffs/globs.c Sun Mar 29 20:03:46 2020 (r359427) @@ -117,6 +117,10 @@ volatile sig_atomic_t got_sigalarm; /* received a SIGA struct ufs1_dinode ufs1_zino; struct ufs2_dinode ufs2_zino; +struct dups *duplist; +struct dups *muldup; +struct inostatlist *inostathead; + void fsckinit(void) { Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Sun Mar 29 19:48:28 2020 (r359426) +++ head/sbin/fsck_ffs/setup.c Sun Mar 29 20:03:46 2020 (r359427) @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include "fsck.h" +struct inoinfo **inphead, **inpsort; + struct uufsd disk; struct bufarea asblk; #define altsblock (*asblk.b_un.b_fs) Modified: head/sbin/fsdb/fsdb.c ============================================================================== --- head/sbin/fsdb/fsdb.c Sun Mar 29 19:48:28 2020 (r359426) +++ head/sbin/fsdb/fsdb.c Sun Mar 29 20:03:46 2020 (r359427) @@ -70,9 +70,6 @@ usage(void) exit(1); } -int returntosingle; -char nflag; - /* * We suck in lots of fsck code, and just pick & choose the stuff we want. * From owner-svn-src-head@freebsd.org Sun Mar 29 22:28:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E17F266520; Sun, 29 Mar 2020 22:28:17 +0000 (UTC) (envelope-from grog@lemis.com) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by mx1.freebsd.org (Postfix) with ESMTP id 48r9GS41S8z4KqJ; Sun, 29 Mar 2020 22:28:15 +0000 (UTC) (envelope-from grog@lemis.com) Received: from eureka.lemis.com (aussie-gw.lemis.com [167.179.139.35]) by lax.lemis.com (Postfix) with ESMTP id 8674527FF8; Sun, 29 Mar 2020 22:28:01 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id CE198263596; Mon, 30 Mar 2020 09:28:00 +1100 (AEDT) Date: Mon, 30 Mar 2020 09:28:00 +1100 From: Greg 'groggy' Lehey To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359419 - head/usr.bin/ncal Message-ID: <20200329222800.GE87815@eureka.lemis.com> References: <202003290418.02T4IR46003292@repo.freebsd.org> <202003291103.02TB393j051396@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oOB74oR0WcNeq9Zb" Content-Disposition: inline In-Reply-To: <202003291103.02TB393j051396@gndrsh.dnsmgr.net> Organization: The FreeBSD Project Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) X-Rspamd-Queue-Id: 48r9GS41S8z4KqJ 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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 22:28:18 -0000 --oOB74oR0WcNeq9Zb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sunday, 29 March 2020 at 4:03:09 -0700, Rodney W. Grimes wrote: >> Author: grog >> Date: Sun Mar 29 04:18:27 2020 >> New Revision: 359419 >> URL: https://svnweb.freebsd.org/changeset/base/359419 >> >> Log: >> Remove spurious transition from Julian to Gregorian for country >> "Latin". >> >> Arguably the entire -p option should be removed. It shows only a few >> countries, and it doesn't have any relationship with the rest of the >> program. > > This commit message and the diff below do not seem to match very well. > Is this actually what you intended to commit? The material difference, yes. Do you have an issue with that? It seems that some trailing blanks in unrelated text were removed as well. diff doesn't show these by default, so they crept through. I know it's bad style to mix style commits with functional commits, but ultimately they had to go too. Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA --oOB74oR0WcNeq9Zb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAl6BIPAACgkQIubykFB6QiP9QACdGzjB3i4mqbxr9Vy+o01E3DWL 04AAn03kd3D1HAplOUsSuFN49t9mF/5c =HewY -----END PGP SIGNATURE----- --oOB74oR0WcNeq9Zb-- From owner-svn-src-head@freebsd.org Sun Mar 29 23:00:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47B5426733E; Sun, 29 Mar 2020 23:00:53 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rB033F0Cz4XB9; Sun, 29 Mar 2020 23:00:51 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CB93897C; Sun, 29 Mar 2020 23:00:34 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02TN0Xje082751; Sun, 29 Mar 2020 23:00:33 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TN0XQp082750; Sun, 29 Mar 2020 23:00:33 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202003292300.02TN0XQp082750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 29 Mar 2020 23:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359428 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 359428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 23:00:53 -0000 Author: wulf Date: Sun Mar 29 23:00:33 2020 New Revision: 359428 URL: https://svnweb.freebsd.org/changeset/base/359428 Log: evdev: Add COMPAT_FREEBSD32 support for amd64 arch Incompatibility between i386 and amd64 evdev ABIs was caused by presence of 'struct timeval' in evdev protocol. Replace it with 'struct timeval32' for 32 bit binaries. Big-endian platforms may require additional work due to bitstr_t (array of unsigned longs) usage in ioctl interface. MFC after: 2 weeks Modified: head/sys/dev/evdev/cdev.c Modified: head/sys/dev/evdev/cdev.c ============================================================================== --- head/sys/dev/evdev/cdev.c Sun Mar 29 20:03:46 2020 (r359427) +++ head/sys/dev/evdev/cdev.c Sun Mar 29 23:00:33 2020 (r359428) @@ -47,6 +47,18 @@ #include #include +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +struct input_event32 { + struct timeval32 time; + uint16_t type; + uint16_t code; + int32_t value; +}; +#endif + #ifdef EVDEV_DEBUG #define debugf(client, fmt, args...) printf("evdev cdev: "fmt"\n", ##args) #else @@ -161,7 +173,14 @@ static int evdev_read(struct cdev *dev, struct uio *uio, int ioflag) { struct evdev_client *client; - struct input_event event; + union { + struct input_event t; +#ifdef COMPAT_FREEBSD32 + struct input_event32 t32; +#endif + } event; + struct input_event *head; + size_t evsize; int ret = 0; int remaining; @@ -175,11 +194,18 @@ evdev_read(struct cdev *dev, struct uio *uio, int iofl if (client->ec_revoked) return (ENODEV); +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + evsize = sizeof(struct input_event32); + else +#endif + evsize = sizeof(struct input_event); + /* Zero-sized reads are allowed for error checking */ - if (uio->uio_resid != 0 && uio->uio_resid < sizeof(struct input_event)) + if (uio->uio_resid != 0 && uio->uio_resid < evsize) return (EINVAL); - remaining = uio->uio_resid / sizeof(struct input_event); + remaining = uio->uio_resid / evsize; EVDEV_CLIENT_LOCKQ(client); @@ -196,14 +222,24 @@ evdev_read(struct cdev *dev, struct uio *uio, int iofl } while (ret == 0 && !EVDEV_CLIENT_EMPTYQ(client) && remaining > 0) { - memcpy(&event, &client->ec_buffer[client->ec_buffer_head], - sizeof(struct input_event)); + head = client->ec_buffer + client->ec_buffer_head; +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + bzero(&event.t32, sizeof(struct input_event32)); + TV_CP(*head, event.t32, time); + CP(*head, event.t32, type); + CP(*head, event.t32, code); + CP(*head, event.t32, value); + } else +#endif + bcopy(head, &event.t, evsize); + client->ec_buffer_head = (client->ec_buffer_head + 1) % client->ec_buffer_size; remaining--; EVDEV_CLIENT_UNLOCKQ(client); - ret = uiomove(&event, sizeof(struct input_event), uio); + ret = uiomove(&event, evsize, uio); EVDEV_CLIENT_LOCKQ(client); } @@ -217,7 +253,13 @@ evdev_write(struct cdev *dev, struct uio *uio, int iof { struct evdev_dev *evdev = dev->si_drv1; struct evdev_client *client; - struct input_event event; + union { + struct input_event t; +#ifdef COMPAT_FREEBSD32 + struct input_event32 t32; +#endif + } event; + size_t evsize; int ret = 0; ret = devfs_get_cdevpriv((void **)&client); @@ -230,16 +272,30 @@ evdev_write(struct cdev *dev, struct uio *uio, int iof if (client->ec_revoked || evdev == NULL) return (ENODEV); - if (uio->uio_resid % sizeof(struct input_event) != 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + evsize = sizeof(struct input_event32); + else +#endif + evsize = sizeof(struct input_event); + + if (uio->uio_resid % evsize != 0) { debugf(client, "write size not multiple of input_event size"); return (EINVAL); } while (uio->uio_resid > 0 && ret == 0) { - ret = uiomove(&event, sizeof(struct input_event), uio); - if (ret == 0) - ret = evdev_inject_event(evdev, event.type, event.code, - event.value); + ret = uiomove(&event, evsize, uio); + if (ret == 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + ret = evdev_inject_event(evdev, event.t32.type, + event.t32.code, event.t32.value); + else +#endif + ret = evdev_inject_event(evdev, event.t.type, + event.t.code, event.t.value); + } } return (ret); From owner-svn-src-head@freebsd.org Sun Mar 29 23:01:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1861C2673AF; Sun, 29 Mar 2020 23:01:45 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rB133x5Mz4XX7; Sun, 29 Mar 2020 23:01:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 313FE8B0E; Sun, 29 Mar 2020 23:01:37 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02TN1afo087423; Sun, 29 Mar 2020 23:01:36 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TN1aHG087422; Sun, 29 Mar 2020 23:01:36 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202003292301.02TN1aHG087422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 29 Mar 2020 23:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359429 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 359429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 23:01:45 -0000 Author: wulf Date: Sun Mar 29 23:01:36 2020 New Revision: 359429 URL: https://svnweb.freebsd.org/changeset/base/359429 Log: evdev: return error rather than zero-length data on blocked read() if blocked process has been woken up by evdev device destruction. MFC after: 2 weeks Modified: head/sys/dev/evdev/cdev.c Modified: head/sys/dev/evdev/cdev.c ============================================================================== --- head/sys/dev/evdev/cdev.c Sun Mar 29 23:00:33 2020 (r359428) +++ head/sys/dev/evdev/cdev.c Sun Mar 29 23:01:36 2020 (r359429) @@ -217,6 +217,8 @@ evdev_read(struct cdev *dev, struct uio *uio, int iofl client->ec_blocked = true; ret = mtx_sleep(client, &client->ec_buffer_mtx, PCATCH, "evread", 0); + if (ret == 0 && client->ec_revoked) + ret = ENODEV; } } } From owner-svn-src-head@freebsd.org Mon Mar 30 00:05:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4C7A268D6F; Mon, 30 Mar 2020 00:05: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 48rCQp2h9qz3xkv; Mon, 30 Mar 2020 00:05: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 3DF599671; Sun, 29 Mar 2020 23:59:15 +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 02TNxE6Y019388; Sun, 29 Mar 2020 23:59:14 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02TNxEvE019387; Sun, 29 Mar 2020 23:59:14 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003292359.02TNxEvE019387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 29 Mar 2020 23:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359432 - head/gnu/usr.bin/gdb X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/gnu/usr.bin/gdb X-SVN-Commit-Revision: 359432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 00:05:41 -0000 Author: kevans Date: Sun Mar 29 23:59:14 2020 New Revision: 359432 URL: https://svnweb.freebsd.org/changeset/base/359432 Log: gdb: compile with -fcommon explicitly As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work. MFC after: 3 days Modified: head/gnu/usr.bin/gdb/Makefile.inc Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Mar 29 23:38:55 2020 (r359431) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Mar 29 23:59:14 2020 (r359432) @@ -47,6 +47,11 @@ CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit +# Some bits here currently rely on some of the linker-merging magic that happens +# with -fcommon. While this is the default right now, explicitly set -fcommon +# so that it continues to build when the default flips. +CFLAGS+= -fcommon + GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER) From owner-svn-src-head@freebsd.org Mon Mar 30 00:07:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3E57268E18; Mon, 30 Mar 2020 00:07:06 +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 48rCST2hTWz3yD5; Mon, 30 Mar 2020 00:07: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 5419A9954; Mon, 30 Mar 2020 00:06:57 +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 02U06vQW025304; Mon, 30 Mar 2020 00:06:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02U06upf025302; Mon, 30 Mar 2020 00:06:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003300006.02U06upf025302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 30 Mar 2020 00:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359433 - head/contrib/bmake X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/bmake X-SVN-Commit-Revision: 359433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 00:07:06 -0000 Author: kevans Date: Mon Mar 30 00:06:56 2020 New Revision: 359433 URL: https://svnweb.freebsd.org/changeset/base/359433 Log: bmake: fix -fno-common build debug was declared extern, but debug_file was not; correct this and define debug_file in main.c (as debug is) to fix the -fno-common build. -fno-common will become the default with GCC10/LLVM11. MFC after: 3 days Modified: head/contrib/bmake/main.c head/contrib/bmake/make.h Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Sun Mar 29 23:59:14 2020 (r359432) +++ head/contrib/bmake/main.c Mon Mar 30 00:06:56 2020 (r359433) @@ -199,6 +199,8 @@ char *makeDependfile; pid_t myPid; int makelevel; +FILE *debug_file; + Boolean forceJobs = FALSE; /* Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Sun Mar 29 23:59:14 2020 (r359432) +++ head/contrib/bmake/make.h Mon Mar 30 00:06:56 2020 (r359433) @@ -464,7 +464,7 @@ extern pid_t myPid; * There is one bit per module. It is up to the module what debug * information to print. */ -FILE *debug_file; /* Output written here - default stdout */ +extern FILE *debug_file; /* Output written here - default stdout */ extern int debug; #define DEBUG_ARCH 0x00001 #define DEBUG_COND 0x00002 From owner-svn-src-head@freebsd.org Mon Mar 30 01:29:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A300C26AEE3; Mon, 30 Mar 2020 01:29:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48rFJ36RJ6z4TBP; Mon, 30 Mar 2020 01:29:55 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 02U1TewR053707; Sun, 29 Mar 2020 18:29:40 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 02U1TeCE053706; Sun, 29 Mar 2020 18:29:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003300129.02U1TeCE053706@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359419 - head/usr.bin/ncal In-Reply-To: <20200329222800.GE87815@eureka.lemis.com> To: "Greg 'groggy' Lehey" Date: Sun, 29 Mar 2020 18:29:40 -0700 (PDT) CC: rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48rFJ36RJ6z4TBP X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 01:29:57 -0000 > On Sunday, 29 March 2020 at 4:03:09 -0700, Rodney W. Grimes wrote: > >> Author: grog > >> Date: Sun Mar 29 04:18:27 2020 > >> New Revision: 359419 > >> URL: https://svnweb.freebsd.org/changeset/base/359419 > >> > >> Log: > >> Remove spurious transition from Julian to Gregorian for country > >> "Latin". > >> > >> Arguably the entire -p option should be removed. It shows only a few > >> countries, and it doesn't have any relationship with the rest of the > >> program. > > > > This commit message and the diff below do not seem to match very well. > > Is this actually what you intended to commit? > > The material difference, yes. Do you have an issue with that? No, just that it seemed that an error may of happened, but having you confirm this infact was the inteded change I am quiet fine with it. > > It seems that some trailing blanks in unrelated text were removed as > well. diff doesn't show these by default, so they crept through. I > know it's bad style to mix style commits with functional commits, but > ultimately they had to go too. Diff by default does show white space change, one has to invoke it with -b or -w or one of the --ignore space change options to cause it to not show them. > Greg -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Mar 30 01:51:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F69426B9A2; Mon, 30 Mar 2020 01:51:00 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48rFmJ292tz4bhJ; Mon, 30 Mar 2020 01:50:56 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 02U1Ofnj053694; Sun, 29 Mar 2020 18:24:41 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 02U1OfCx053693; Sun, 29 Mar 2020 18:24:41 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003300124.02U1OfCx053693@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359426 - head/usr.bin/kyua In-Reply-To: <202003291948.02TJmTbX066949@repo.freebsd.org> To: Brooks Davis Date: Sun, 29 Mar 2020 18:24:41 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48rFmJ292tz4bhJ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 01:51:00 -0000 > Author: brooks > Date: Sun Mar 29 19:48:28 2020 > New Revision: 359426 > URL: https://svnweb.freebsd.org/changeset/base/359426 > > Log: > Fix build with src on a noexec filesystem. > > ${SH} expands to nothing on src builds so this worked by accident. Use > a bare "sh" instead. Correct variable in BSD mk is ${SHELL} > > PR: 245086 > Reported by: pkubaj > Sponsored by: DARPA > > Modified: > head/usr.bin/kyua/Makefile > > Modified: head/usr.bin/kyua/Makefile > ============================================================================== > --- head/usr.bin/kyua/Makefile Sun Mar 29 19:16:14 2020 (r359425) > +++ head/usr.bin/kyua/Makefile Sun Mar 29 19:48:28 2020 (r359426) > @@ -52,7 +52,7 @@ CLEANFILES+= ${MAN} > .PATH: ${KYUA_SRCDIR}/doc > .for man in ${MAN} > ${man}: ${man}.in > - ${SH} ${KYUA_SRCDIR}/doc/manbuild.sh \ > + sh ${KYUA_SRCDIR}/doc/manbuild.sh \ > -v "CONFDIR=${KYUA_CONFDIR}" \ > -v "DOCDIR=${KYUA_DOCDIR}" \ > -v "EGDIR=${KYUA_EGDIR}" \ > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Mar 30 01:55:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F36B126BE68; Mon, 30 Mar 2020 01:55:50 +0000 (UTC) (envelope-from grog@lemis.com) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by mx1.freebsd.org (Postfix) with ESMTP id 48rFsw3YNqz4dPF; Mon, 30 Mar 2020 01:55:46 +0000 (UTC) (envelope-from grog@lemis.com) Received: from eureka.lemis.com (aussie-gw.lemis.com [167.179.139.35]) by lax.lemis.com (Postfix) with ESMTP id DFC5F28136; Mon, 30 Mar 2020 01:55:36 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id 39971263596; Mon, 30 Mar 2020 12:55:36 +1100 (AEDT) Date: Mon, 30 Mar 2020 12:55:36 +1100 From: Greg 'groggy' Lehey To: rgrimes@FreeBSD.org Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r359419 - head/usr.bin/ncal Message-ID: <20200330015536.GH87815@eureka.lemis.com> References: <20200329222800.GE87815@eureka.lemis.com> <202003300129.02U1TeCE053706@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="va4/JQ6j8/8uipEp" Content-Disposition: inline In-Reply-To: <202003300129.02U1TeCE053706@gndrsh.dnsmgr.net> Organization: The FreeBSD Project Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) X-Rspamd-Queue-Id: 48rFsw3YNqz4dPF 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)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 01:55:51 -0000 --va4/JQ6j8/8uipEp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sunday, 29 March 2020 at 18:29:40 -0700, Rodney W. Grimes wrote: >> On Sunday, 29 March 2020 at 4:03:09 -0700, Rodney W. Grimes wrote: >>>> Author: grog >>>> Date: Sun Mar 29 04:18:27 2020 >>>> New Revision: 359419 >>>> URL: https://svnweb.freebsd.org/changeset/base/359419 >>>> >>>> Log: >>>> Remove spurious transition from Julian to Gregorian for country >>>> "Latin". >>>> >>>> Arguably the entire -p option should be removed. It shows only a few >>>> countries, and it doesn't have any relationship with the rest of the >>>> program. >>> >>> This commit message and the diff below do not seem to match very well. >>> Is this actually what you intended to commit? >> >> The material difference, yes. Do you have an issue with that? > > No, just that it seemed that an error may of happened, > but having you confirm this infact was the inteded change > I am quiet fine with it. Thanks. Do you have any thoughts on removing the -p option? >> It seems that some trailing blanks in unrelated text were removed as >> well. diff doesn't show these by default, so they crept through. I >> know it's bad style to mix style commits with functional commits, but >> ultimately they had to go too. > > Diff by default does show white space change, > one has to invoke it with -b or -w or one of the --ignore space > change options to cause it to not show them. Right. Egg on my face, and you can be sure I'll run diff with the correct options next time. Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA --va4/JQ6j8/8uipEp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAl6BUZgACgkQIubykFB6QiOoeACfa8yGtzOi7y7hxHRvmBDfxsfE nl4AoKzLpYn/aOgyGisFZi2blbT1TdS5 =9vUp -----END PGP SIGNATURE----- --va4/JQ6j8/8uipEp-- From owner-svn-src-head@freebsd.org Mon Mar 30 02:20:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C6ED26D369; Mon, 30 Mar 2020 02:20:50 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48rGQl6f16z3K0j; Mon, 30 Mar 2020 02:20:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 02U2Fsmw053933; Sun, 29 Mar 2020 19:15:54 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 02U2Fsad053932; Sun, 29 Mar 2020 19:15:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003300215.02U2Fsad053932@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359419 - head/usr.bin/ncal In-Reply-To: <20200330015536.GH87815@eureka.lemis.com> To: "Greg 'groggy' Lehey" Date: Sun, 29 Mar 2020 19:15:54 -0700 (PDT) CC: rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48rGQl6f16z3K0j X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 02:20:50 -0000 -- Start of PGP signed section. > On Sunday, 29 March 2020 at 18:29:40 -0700, Rodney W. Grimes wrote: > >> On Sunday, 29 March 2020 at 4:03:09 -0700, Rodney W. Grimes wrote: > >>>> Author: grog > >>>> Date: Sun Mar 29 04:18:27 2020 > >>>> New Revision: 359419 > >>>> URL: https://svnweb.freebsd.org/changeset/base/359419 > >>>> > >>>> Log: > >>>> Remove spurious transition from Julian to Gregorian for country > >>>> "Latin". > >>>> > >>>> Arguably the entire -p option should be removed. It shows only a few > >>>> countries, and it doesn't have any relationship with the rest of the > >>>> program. > >>> > >>> This commit message and the diff below do not seem to match very well. > >>> Is this actually what you intended to commit? > >> > >> The material difference, yes. Do you have an issue with that? > > > > No, just that it seemed that an error may of happened, > > but having you confirm this infact was the inteded change > > I am quiet fine with it. > > Thanks. > > Do you have any thoughts on removing the -p option? It just prints a table right? Why does it need removed? The Latin one had a bogus year, and the table is sparse, but probably contains valid data for 90+% of the user base. Doesnt the data still have to be in the program to properly print calendars before the switch date? > >> It seems that some trailing blanks in unrelated text were removed as > >> well. diff doesn't show these by default, so they crept through. I > >> know it's bad style to mix style commits with functional commits, but > >> ultimately they had to go too. > > > > Diff by default does show white space change, > > one has to invoke it with -b or -w or one of the --ignore space > > change options to cause it to not show them. > > Right. Egg on my face, and you can be sure I'll run diff with the > correct options next time. > > Greg > -- > Sent from my desktop computer. > Finger grog@FreeBSD.org for PGP public key. > See complete headers for address and phone numbers. > This message is digitally signed. If your Microsoft mail program > reports problems, please read http://lemis.com/broken-MUA -- End of PGP section, PGP failed! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Mar 30 03:27:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74EE92701FD; Mon, 30 Mar 2020 03:27: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 48rHvB0NX4z4FW6; Mon, 30 Mar 2020 03:27: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 333F6C6E3; Mon, 30 Mar 2020 03:26:53 +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 02U3Qqvd046709; Mon, 30 Mar 2020 03:26:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02U3QqO9046706; Mon, 30 Mar 2020 03:26:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003300326.02U3QqO9046706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 30 Mar 2020 03:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359434 - in head/usr.sbin/cron: cron crontab lib X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.sbin/cron: cron crontab lib X-SVN-Commit-Revision: 359434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 03:27:02 -0000 Author: kevans Date: Mon Mar 30 03:26:52 2020 New Revision: 359434 URL: https://svnweb.freebsd.org/changeset/base/359434 Log: cron: respect PATH from login.conf As a followup to the use of login.conf environment vars (other than PATH) in cron, this patch adds PATH (and HOME) to the list of login.conf settings respected. The new logic is as follows: 1. SHELL is always _PATH_BSHELL unless explicitly overridden in the crontab file itself; no other settings are respected. This is unchanged. 2. PATH is taken from the first of: crontab file, login.conf, _PATH_DEFPATH 3. HOME is taken from the first of: crontab file, login.conf, passwd entry, unset 4. The current directory for invoking the command is taken from the crontab file's value of HOME (existing behavior), or the passwd entry, but not anywhere else (so it might not equal HOME if that was set in login.conf). Submitted by: Andrew Gierth Reviewed by: sigsys_gmail.com Differential Revision: https://reviews.freebsd.org/D23597 Modified: head/usr.sbin/cron/cron/do_command.c head/usr.sbin/cron/crontab/crontab.5 head/usr.sbin/cron/lib/entry.c Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Mon Mar 30 00:06:56 2020 (r359433) +++ head/usr.sbin/cron/cron/do_command.c Mon Mar 30 03:26:52 2020 (r359434) @@ -97,6 +97,7 @@ child_process(e, u) register FILE *mail; register int bytes = 1; int status = 0; + const char *homedir = NULL; # if defined(LOGIN_CAP) struct passwd *pwd; login_cap_t *lc; @@ -287,6 +288,14 @@ child_process(e, u) pwd = getpwuid(e->uid); lc = NULL; if (pwd != NULL) { + if (pwd->pw_dir != NULL + && pwd->pw_dir[0] != '\0') { + homedir = strdup(pwd->pw_dir); + if (homedir == NULL) { + warn("strdup"); + _exit(ERROR_EXIT); + } + } pwd->pw_gid = e->gid; if (e->class != NULL) lc = login_getclass(e->class); @@ -330,23 +339,63 @@ child_process(e, u) if (lc != NULL) login_close(lc); #endif - chdir(env_get("HOME", e->envp)); - /* exec the command. + /* For compatibility, we chdir to the value of HOME if it was + * specified explicitly in the crontab file, but not if it was + * set in the environment by some other mechanism. We chdir to + * the homedir given by the pw entry otherwise. + * + * If !LOGIN_CAP, then HOME is always set in e->envp. + * + * XXX: probably should also consult PAM. */ { + char *new_home = env_get("HOME", e->envp); + if (new_home != NULL && new_home[0] != '\0') + chdir(new_home); + else if (homedir != NULL) + chdir(homedir); + else + chdir("/"); + } + + /* exec the command. Note that SHELL is not respected from + * either login.conf or pw_shell, only an explicit setting + * in the crontab. (default of _PATH_BSHELL is supplied when + * setting up the entry) + */ + { char *shell = env_get("SHELL", e->envp); char **p; - /* Apply the environment from the entry, overriding existing - * values (this will always set PATH, LOGNAME, etc.) putenv - * should not fail unless malloc does. + /* Apply the environment from the entry, overriding + * existing values (this will always set LOGNAME and + * SHELL). putenv should not fail unless malloc does. */ for (p = e->envp; *p; ++p) { if (putenv(*p) != 0) { warn("putenv"); _exit(ERROR_EXIT); } + } + + /* HOME in login.conf overrides pw, and HOME in the + * crontab overrides both. So set pw's value only if + * nothing was already set (overwrite==0). + */ + if (homedir != NULL + && setenv("HOME", homedir, 0) < 0) { + warn("setenv(HOME)"); + _exit(ERROR_EXIT); + } + + /* PATH in login.conf is respected, but the crontab + * overrides; set a default value only if nothing + * already set. + */ + if (setenv("PATH", _PATH_DEFPATH, 0) < 0) { + warn("setenv(PATH)"); + _exit(ERROR_EXIT); } # if DEBUGGING Modified: head/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- head/usr.sbin/cron/crontab/crontab.5 Mon Mar 30 00:06:56 2020 (r359433) +++ head/usr.sbin/cron/crontab/crontab.5 Mon Mar 30 03:26:52 2020 (r359434) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 19, 2020 +.Dd March 29, 2020 .Dt CRONTAB 5 .Os .Sh NAME @@ -72,9 +72,6 @@ daemon. .Ev SHELL is set to .Pa /bin/sh , -.Ev PATH -is set to -.Pa /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin , and .Ev LOGNAME and @@ -83,12 +80,22 @@ are set from the .Pa /etc/passwd line of the crontab's owner. In addition, the environment variables of the -user's login class, with the exception of -.Ev PATH , -will be set from +user's login class will be set from .Pa /etc/login.conf.db and .Pa ~/.login_conf . +(A setting of +.Ev HOME +in the login class will override the value from +.Pa /etc/passwd , +but will not change the current directory when the command is +invoked, which can only be overridden with an explicit setting of +.Ev HOME +within the crontab file itself.) +If +.Ev PATH +is not set by any other means, it is defaulted to +.Pa /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin . .Ev HOME , .Ev PATH and @@ -109,17 +116,11 @@ On these systems, .Ev USER will be set also). .Pp -In addition to -.Ev LOGNAME , -.Ev HOME , -.Ev PATH , -and -.Ev SHELL , +If .Xr cron 8 -will look at -.Ev MAILTO -if it has any reason to send mail as a result of running -commands in ``this'' crontab. +has any reason to send mail as a result of running commands in +``this'' crontab, it will respect the following settings which may be +defined in the crontab (but which are not taken from the login class). If .Ev MAILTO is defined (and non-empty), mail is Modified: head/usr.sbin/cron/lib/entry.c ============================================================================== --- head/usr.sbin/cron/lib/entry.c Mon Mar 30 00:06:56 2020 (r359433) +++ head/usr.sbin/cron/lib/entry.c Mon Mar 30 03:26:52 2020 (r359434) @@ -369,7 +369,8 @@ load_entry(file, error_func, pw, envp) e->gid = pw->pw_gid; /* copy and fix up environment. some variables are just defaults and - * others are overrides. + * others are overrides; we process only the overrides here, defaults + * are handled in do_command after login.conf is processed. */ e->envp = env_copy(envp); if (e->envp == NULL) { @@ -388,6 +389,10 @@ load_entry(file, error_func, pw, envp) goto eof; } } + /* If LOGIN_CAP, this is deferred to do_command where the login class + * is processed. If !LOGIN_CAP, do it here. + */ +#ifndef LOGIN_CAP if (!env_get("HOME", e->envp)) { prev_env = e->envp; sprintf(envstr, "HOME=%s", pw->pw_dir); @@ -399,17 +404,7 @@ load_entry(file, error_func, pw, envp) goto eof; } } - if (!env_get("PATH", e->envp)) { - prev_env = e->envp; - sprintf(envstr, "PATH=%s", _PATH_DEFPATH); - e->envp = env_set(e->envp, envstr); - if (e->envp == NULL) { - warn("env_set(%s)", envstr); - env_free(prev_env); - ecode = e_mem; - goto eof; - } - } +#endif prev_env = e->envp; sprintf(envstr, "%s=%s", "LOGNAME", pw->pw_name); e->envp = env_set(e->envp, envstr); From owner-svn-src-head@freebsd.org Mon Mar 30 14:03:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F9E62A493B; Mon, 30 Mar 2020 14:03: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 48rZ1n4NsKz4M3T; Mon, 30 Mar 2020 14:03:40 +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 0D28A1D3A9; Mon, 30 Mar 2020 14:03:36 +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 02UE3Zxf048513; Mon, 30 Mar 2020 14:03:35 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UE3ZOO048512; Mon, 30 Mar 2020 14:03:35 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202003301403.02UE3ZOO048512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 30 Mar 2020 14:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359435 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 359435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 14:03:46 -0000 Author: asomers Date: Mon Mar 30 14:03:35 2020 New Revision: 359435 URL: https://svnweb.freebsd.org/changeset/base/359435 Log: fusefs: add a dtrace probe that fires after mounting is complete This probe is useful for showing the protocol options negotiated with a FUSE server. MFC after: 2 weeks Modified: head/sys/fs/fuse/fuse_internal.c Modified: head/sys/fs/fuse/fuse_internal.c ============================================================================== --- head/sys/fs/fuse/fuse_internal.c Mon Mar 30 03:26:52 2020 (r359434) +++ head/sys/fs/fuse/fuse_internal.c Mon Mar 30 14:03:35 2020 (r359435) @@ -959,6 +959,8 @@ fuse_internal_vnode_disappear(struct vnode *vp) /* fuse start/stop */ +SDT_PROBE_DEFINE2(fusefs, , internal, init_done, + "struct fuse_data*", "struct fuse_init_out*"); int fuse_internal_init_callback(struct fuse_ticket *tick, struct uio *uio) { @@ -1043,6 +1045,7 @@ out: } FUSE_LOCK(); data->dataflags |= FSESS_INITED; + SDT_PROBE2(fusefs, , internal, init_done, data, fiio); wakeup(&data->ticketer); FUSE_UNLOCK(); From owner-svn-src-head@freebsd.org Mon Mar 30 14:30:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51EF92A4F0A; Mon, 30 Mar 2020 14:30:42 +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 48rZcv64JNz4WP2; Mon, 30 Mar 2020 14:30:39 +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 8F1C31D88B; Mon, 30 Mar 2020 14:23:08 +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 02UEN8qC060046; Mon, 30 Mar 2020 14:23:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UEN8CH060045; Mon, 30 Mar 2020 14:23:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003301423.02UEN8CH060045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2020 14:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359437 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 359437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 14:30:42 -0000 Author: markj Date: Mon Mar 30 14:23:08 2020 New Revision: 359437 URL: https://svnweb.freebsd.org/changeset/base/359437 Log: Fix accounting of hwpmc's thread descriptor freelist. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:22:52 2020 (r359436) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:23:08 2020 (r359437) @@ -2428,12 +2428,13 @@ pmc_thread_descriptor_pool_free_task(void *arg __unuse int delta; LIST_INIT(&tmplist); + /* Determine what changes, if any, we need to make. */ mtx_lock_spin(&pmc_threadfreelist_mtx); delta = pmc_threadfreelist_entries - pmc_threadfreelist_max; - while (delta > 0 && - (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { + while (delta > 0 && (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { delta--; + pmc_threadfreelist_entries--; LIST_REMOVE(pt, pt_next); LIST_INSERT_HEAD(&tmplist, pt, pt_next); } From owner-svn-src-head@freebsd.org Mon Mar 30 14:31:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E825C2A5082; Mon, 30 Mar 2020 14:31: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 48rZdz6Lv4z4WnC; Mon, 30 Mar 2020 14:31:35 +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 4C2B31D8A7; Mon, 30 Mar 2020 14:24:05 +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 02UEO5KC060161; Mon, 30 Mar 2020 14:24:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UEO4OM060156; Mon, 30 Mar 2020 14:24:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003301424.02UEO4OM060156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2020 14:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359438 - in head/sys: dev/hwpmc kern netinet netinet6 sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: dev/hwpmc kern netinet netinet6 sys X-SVN-Commit-Revision: 359438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 14:31:37 -0000 Author: markj Date: Mon Mar 30 14:24:03 2020 New Revision: 359438 URL: https://svnweb.freebsd.org/changeset/base/359438 Log: Remove the "config" taskqgroup and its KPIs. Equivalent functionality is already provided by taskqueue(9), just use that instead. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hwpmc/hwpmc_mod.c head/sys/kern/subr_gtaskqueue.c head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c head/sys/sys/gtaskqueue.h Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:24:03 2020 (r359438) @@ -36,9 +36,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include #include #include #include @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include /* needs to be after */ @@ -187,7 +187,7 @@ static int pmc_threadfreelist_entries=0; /* * Task to free thread descriptors */ -static struct grouptask free_gtask; +static struct task free_task; /* * A map of row indices to classdep structures. @@ -2413,15 +2413,15 @@ pmc_thread_descriptor_pool_free(struct pmc_thread *pt) LIST_INSERT_HEAD(&pmc_threadfreelist, pt, pt_next); pmc_threadfreelist_entries++; if (pmc_threadfreelist_entries > pmc_threadfreelist_max) - GROUPTASK_ENQUEUE(&free_gtask); + taskqueue_enqueue(taskqueue_fast, &free_task); mtx_unlock_spin(&pmc_threadfreelist_mtx); } /* - * A callout to manage the free list. + * An asynchronous task to manage the free list. */ static void -pmc_thread_descriptor_pool_free_task(void *arg __unused) +pmc_thread_descriptor_pool_free_task(void *arg __unused, int pending __unused) { struct pmc_thread *pt; LIST_HEAD(, pmc_thread) tmplist; @@ -5717,11 +5717,8 @@ pmc_initialize(void) mtx_init(&pmc_threadfreelist_mtx, "pmc-threadfreelist", "pmc-leaf", MTX_SPIN); - /* - * Initialize the callout to monitor the thread free list. - * This callout will also handle the initial population of the list. - */ - taskqgroup_config_gtask_init(NULL, &free_gtask, pmc_thread_descriptor_pool_free_task, "thread descriptor pool free task"); + /* Initialize the task to prune the thread free list. */ + TASK_INIT(&free_task, 0, pmc_thread_descriptor_pool_free_task, NULL); /* register process {exit,fork,exec} handlers */ pmc_exit_tag = EVENTHANDLER_REGISTER(process_exit, @@ -5820,6 +5817,7 @@ pmc_cleanup(void) } /* reclaim allocated data structures */ + taskqueue_drain(taskqueue_fast, &free_task); mtx_destroy(&pmc_threadfreelist_mtx); pmc_thread_descriptor_pool_drain(); @@ -5827,7 +5825,6 @@ pmc_cleanup(void) mtx_pool_destroy(&pmc_mtxpool); mtx_destroy(&pmc_processhash_mtx); - taskqgroup_config_gtask_deinit(&free_gtask); if (pmc_processhash) { #ifdef HWPMC_DEBUG struct pmc_process *pp; Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:24:03 2020 (r359438) @@ -55,7 +55,6 @@ static int task_is_running(struct gtaskqueue *queue, s static void gtaskqueue_drain_locked(struct gtaskqueue *queue, struct gtask *gtask); TASKQGROUP_DEFINE(softirq, mp_ncpus, 1); -TASKQGROUP_DEFINE(config, 1, 1); struct gtaskqueue_busy { struct gtask *tb_running; @@ -817,21 +816,4 @@ taskqgroup_create(const char *name, int cnt, int strid void taskqgroup_destroy(struct taskqgroup *qgroup) { - -} - -void -taskqgroup_config_gtask_init(void *ctx, struct grouptask *gtask, gtask_fn_t *fn, - const char *name) -{ - - GROUPTASK_INIT(gtask, 0, fn, ctx); - taskqgroup_attach(qgroup_config, gtask, gtask, NULL, NULL, name); -} - -void -taskqgroup_config_gtask_deinit(struct grouptask *gtask) -{ - - taskqgroup_detach(qgroup_config, gtask); } Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/netinet/in_mcast.c Mon Mar 30 14:24:03 2020 (r359438) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -224,24 +223,17 @@ inm_is_ifp_detached(const struct in_multi *inm) } #endif -static struct grouptask free_gtask; -static struct in_multi_head inm_free_list; -static void inm_release_task(void *arg __unused); -static void inm_init(void) +static struct task free_task; +static struct in_multi_head inm_free_list = SLIST_HEAD_INITIALIZER(); +static void inm_release_task(void *arg __unused, int pending __unused); + +static void +inm_init(void) { - SLIST_INIT(&inm_free_list); - taskqgroup_config_gtask_init(NULL, &free_gtask, inm_release_task, "inm release task"); + TASK_INIT(&free_task, 0, inm_release_task, NULL); } +SYSINIT(inm_init, SI_SUB_TASKQ, SI_ORDER_ANY, inm_init, NULL); -#ifdef EARLY_AP_STARTUP -SYSINIT(inm_init, SI_SUB_SMP + 1, SI_ORDER_FIRST, - inm_init, NULL); -#else -SYSINIT(inm_init, SI_SUB_ROOT_CONF - 1, SI_ORDER_FIRST, - inm_init, NULL); -#endif - - void inm_release_list_deferred(struct in_multi_head *inmh) { @@ -251,7 +243,7 @@ inm_release_list_deferred(struct in_multi_head *inmh) mtx_lock(&in_multi_free_mtx); SLIST_CONCAT(&inm_free_list, inmh, in_multi, inm_nrele); mtx_unlock(&in_multi_free_mtx); - GROUPTASK_ENQUEUE(&free_gtask); + taskqueue_enqueue(taskqueue_thread, &free_task); } void @@ -304,7 +296,7 @@ inm_release_deferred(struct in_multi *inm) } static void -inm_release_task(void *arg __unused) +inm_release_task(void *arg __unused, int pending __unused) { struct in_multi_head inm_free_tmp; struct in_multi *inm, *tinm; Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/netinet6/in6_mcast.c Mon Mar 30 14:24:03 2020 (r359438) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include #include #include #include @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include #include @@ -511,24 +510,17 @@ in6m_release(struct in6_multi *inm) } } -static struct grouptask free_gtask; -static struct in6_multi_head in6m_free_list; -static void in6m_release_task(void *arg __unused); -static void in6m_init(void) +static struct task free_task; +static struct in6_multi_head in6m_free_list = SLIST_HEAD_INITIALIZER(); +static void in6m_release_task(void *arg __unused, int pending __unused); + +static void +in6m_init(void) { - SLIST_INIT(&in6m_free_list); - taskqgroup_config_gtask_init(NULL, &free_gtask, in6m_release_task, "in6m release task"); + TASK_INIT(&free_task, 0, in6m_release_task, NULL); } +SYSINIT(in6m_init, SI_SUB_TASKQ, SI_ORDER_ANY, in6m_init, NULL); -#ifdef EARLY_AP_STARTUP -SYSINIT(in6m_init, SI_SUB_SMP + 1, SI_ORDER_FIRST, - in6m_init, NULL); -#else -SYSINIT(in6m_init, SI_SUB_ROOT_CONF - 1, SI_ORDER_SECOND, - in6m_init, NULL); -#endif - - void in6m_release_list_deferred(struct in6_multi_head *inmh) { @@ -537,15 +529,13 @@ in6m_release_list_deferred(struct in6_multi_head *inmh mtx_lock(&in6_multi_free_mtx); SLIST_CONCAT(&in6m_free_list, inmh, in6_multi, in6m_nrele); mtx_unlock(&in6_multi_free_mtx); - GROUPTASK_ENQUEUE(&free_gtask); + taskqueue_enqueue(taskqueue_thread, &free_task); } void in6m_release_wait(void) { - - /* Wait for all jobs to complete. */ - gtaskqueue_drain_all(free_gtask.gt_taskqueue); + taskqueue_drain_all(taskqueue_thread); } void @@ -605,7 +595,7 @@ in6m_disconnect_locked(struct in6_multi_head *inmh, st } static void -in6m_release_task(void *arg __unused) +in6m_release_task(void *arg __unused, int pending __unused) { struct in6_multi_head in6m_free_tmp; struct in6_multi *inm, *tinm; Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/sys/gtaskqueue.h Mon Mar 30 14:24:03 2020 (r359438) @@ -80,9 +80,6 @@ void taskqgroup_detach(struct taskqgroup *qgroup, stru struct taskqgroup *taskqgroup_create(const char *name, int cnt, int stride); void taskqgroup_destroy(struct taskqgroup *qgroup); void taskqgroup_bind(struct taskqgroup *qgroup); -void taskqgroup_config_gtask_init(void *ctx, struct grouptask *gtask, - gtask_fn_t *fn, const char *name); -void taskqgroup_config_gtask_deinit(struct grouptask *gtask); #define GTASK_INIT(gtask, flags, priority, func, context) do { \ (gtask)->ta_flags = flags; \ From owner-svn-src-head@freebsd.org Mon Mar 30 14:31:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D33282A50F0; Mon, 30 Mar 2020 14:31:54 +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 48rZfL2wRPz4X1K; Mon, 30 Mar 2020 14:31:54 +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 ADBF91D87F; Mon, 30 Mar 2020 14:22:53 +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 02UEMrdO059981; Mon, 30 Mar 2020 14:22:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UEMrxL059978; Mon, 30 Mar 2020 14:22:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003301422.02UEMrxL059978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Mar 2020 14:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359436 - in head/sys: kern net sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern net sys X-SVN-Commit-Revision: 359436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 14:31:56 -0000 Author: markj Date: Mon Mar 30 14:22:52 2020 New Revision: 359436 URL: https://svnweb.freebsd.org/changeset/base/359436 Log: Simplify taskqgroup inititialization. taskqgroup initialization was broken into two steps: 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; 2. initialize taskqueues, start taskqueue threads, enqueue "binder" tasks to bind threads to specific CPUs, at SI_SUB_SMP. Step 2 tries to handle the case where tasks have already been attached to a queue, by migrating them to their intended queue. In particular, tasks can't be enqueued before step 2 has completed. This breaks NFS mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP is not defined, since mountroot happens before SI_SUB_SMP in this case. Simplify initialization: do all initialization except for CPU binding at SI_SUB_TASKQ. This means that until CPU binding is completed, group tasks may be executed on a CPU other than that to which they were bound, but this should not be a problem for existing users of the taskqgroup KPIs. Reported by: sbruno Tested by: bdragon, sbruno MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24188 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c head/sys/sys/gtaskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:03:35 2020 (r359435) +++ head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:22:52 2020 (r359436) @@ -170,7 +170,7 @@ gtaskqueue_terminate(struct thread **pp, struct gtaskq } } -static void +static void __unused gtaskqueue_free(struct gtaskqueue *queue) { @@ -591,18 +591,16 @@ gtaskqueue_create_fast(const char *name, int mflags, } struct taskqgroup_cpu { - LIST_HEAD(, grouptask) tgc_tasks; - struct gtaskqueue *tgc_taskq; - int tgc_cnt; - int tgc_cpu; + LIST_HEAD(, grouptask) tgc_tasks; + struct gtaskqueue *tgc_taskq; + int tgc_cnt; + int tgc_cpu; }; struct taskqgroup { struct taskqgroup_cpu tqg_queue[MAXCPU]; struct mtx tqg_lock; const char * tqg_name; - int tqg_adjusting; - int tqg_stride; int tqg_cnt; }; @@ -625,13 +623,6 @@ taskqgroup_cpu_create(struct taskqgroup *qgroup, int i qcpu->tgc_cpu = cpu; } -static void -taskqgroup_cpu_remove(struct taskqgroup *qgroup, int idx) -{ - - gtaskqueue_free(qgroup->tqg_queue[idx].tgc_taskq); -} - /* * Find the taskq with least # of tasks that doesn't currently have any * other queues from the uniq identifier. @@ -644,22 +635,22 @@ taskqgroup_find(struct taskqgroup *qgroup, void *uniq) int strict; mtx_assert(&qgroup->tqg_lock, MA_OWNED); - if (qgroup->tqg_cnt == 0) - return (0); - idx = -1; - mincnt = INT_MAX; + KASSERT(qgroup->tqg_cnt != 0, + ("qgroup %s has no queues", qgroup->tqg_name)); + /* - * Two passes; First scan for a queue with the least tasks that + * Two passes: first scan for a queue with the least tasks that * does not already service this uniq id. If that fails simply find - * the queue with the least total tasks; + * the queue with the least total tasks. */ - for (strict = 1; mincnt == INT_MAX; strict = 0) { + for (idx = -1, mincnt = INT_MAX, strict = 1; mincnt == INT_MAX; + strict = 0) { for (i = 0; i < qgroup->tqg_cnt; i++) { if (qgroup->tqg_queue[i].tgc_cnt > mincnt) continue; if (strict) { - LIST_FOREACH(n, - &qgroup->tqg_queue[i].tgc_tasks, gt_list) + LIST_FOREACH(n, &qgroup->tqg_queue[i].tgc_tasks, + gt_list) if (n->gt_uniq == uniq) break; if (n != NULL) @@ -675,37 +666,15 @@ taskqgroup_find(struct taskqgroup *qgroup, void *uniq) return (idx); } -/* - * smp_started is unusable since it is not set for UP kernels or even for - * SMP kernels when there is 1 CPU. This is usually handled by adding a - * (mp_ncpus == 1) test, but that would be broken here since we need to - * to synchronize with the SI_SUB_SMP ordering. Even in the pure SMP case - * smp_started only gives a fuzzy ordering relative to SI_SUB_SMP. - * - * So maintain our own flag. It must be set after all CPUs are started - * and before SI_SUB_SMP:SI_ORDER_ANY so that the SYSINIT for delayed - * adjustment is properly delayed. SI_ORDER_FOURTH is clearly before - * SI_ORDER_ANY and unclearly after the CPUs are started. It would be - * simpler for adjustment to pass a flag indicating if it is delayed. - */ - -static int tqg_smp_started; - -static void -tqg_record_smp_started(void *arg) -{ - tqg_smp_started = 1; -} - -SYSINIT(tqg_record_smp_started, SI_SUB_SMP, SI_ORDER_FOURTH, - tqg_record_smp_started, NULL); - void taskqgroup_attach(struct taskqgroup *qgroup, struct grouptask *gtask, void *uniq, device_t dev, struct resource *irq, const char *name) { int cpu, qid, error; + KASSERT(qgroup->tqg_cnt > 0, + ("qgroup %s has no queues", qgroup->tqg_name)); + gtask->gt_uniq = uniq; snprintf(gtask->gt_name, GROUPTASK_NAMELEN, "%s", name ? name : "grouptask"); gtask->gt_dev = dev; @@ -716,7 +685,7 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct gr qgroup->tqg_queue[qid].tgc_cnt++; LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; - if (dev != NULL && irq != NULL && tqg_smp_started) { + if (dev != NULL && irq != NULL) { cpu = qgroup->tqg_queue[qid].tgc_cpu; gtask->gt_cpu = cpu; mtx_unlock(&qgroup->tqg_lock); @@ -728,85 +697,19 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct gr mtx_unlock(&qgroup->tqg_lock); } -static void -taskqgroup_attach_deferred(struct taskqgroup *qgroup, struct grouptask *gtask) -{ - int qid, cpu, error; - - mtx_lock(&qgroup->tqg_lock); - qid = taskqgroup_find(qgroup, gtask->gt_uniq); - cpu = qgroup->tqg_queue[qid].tgc_cpu; - if (gtask->gt_dev != NULL && gtask->gt_irq != NULL) { - mtx_unlock(&qgroup->tqg_lock); - error = bus_bind_intr(gtask->gt_dev, gtask->gt_irq, cpu); - mtx_lock(&qgroup->tqg_lock); - if (error) - printf("%s: binding interrupt failed for %s: %d\n", - __func__, gtask->gt_name, error); - - } - qgroup->tqg_queue[qid].tgc_cnt++; - LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); - MPASS(qgroup->tqg_queue[qid].tgc_taskq != NULL); - gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; - mtx_unlock(&qgroup->tqg_lock); -} - int taskqgroup_attach_cpu(struct taskqgroup *qgroup, struct grouptask *gtask, void *uniq, int cpu, device_t dev, struct resource *irq, const char *name) { int i, qid, error; - qid = -1; gtask->gt_uniq = uniq; snprintf(gtask->gt_name, GROUPTASK_NAMELEN, "%s", name ? name : "grouptask"); gtask->gt_dev = dev; gtask->gt_irq = irq; gtask->gt_cpu = cpu; mtx_lock(&qgroup->tqg_lock); - if (tqg_smp_started) { - for (i = 0; i < qgroup->tqg_cnt; i++) - if (qgroup->tqg_queue[i].tgc_cpu == cpu) { - qid = i; - break; - } - if (qid == -1) { - mtx_unlock(&qgroup->tqg_lock); - printf("%s: qid not found for %s cpu=%d\n", __func__, gtask->gt_name, cpu); - return (EINVAL); - } - } else - qid = 0; - qgroup->tqg_queue[qid].tgc_cnt++; - LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); - gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; - cpu = qgroup->tqg_queue[qid].tgc_cpu; - mtx_unlock(&qgroup->tqg_lock); - - if (dev != NULL && irq != NULL && tqg_smp_started) { - error = bus_bind_intr(dev, irq, cpu); - if (error) - printf("%s: binding interrupt failed for %s: %d\n", - __func__, gtask->gt_name, error); - } - return (0); -} - -static int -taskqgroup_attach_cpu_deferred(struct taskqgroup *qgroup, struct grouptask *gtask) -{ - device_t dev; - struct resource *irq; - int cpu, error, i, qid; - - qid = -1; - dev = gtask->gt_dev; - irq = gtask->gt_irq; - cpu = gtask->gt_cpu; - MPASS(tqg_smp_started); - mtx_lock(&qgroup->tqg_lock); - for (i = 0; i < qgroup->tqg_cnt; i++) + for (i = 0, qid = -1; i < qgroup->tqg_cnt; i++) if (qgroup->tqg_queue[i].tgc_cpu == cpu) { qid = i; break; @@ -818,8 +721,8 @@ taskqgroup_attach_cpu_deferred(struct taskqgroup *qgro } qgroup->tqg_queue[qid].tgc_cnt++; LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list); - MPASS(qgroup->tqg_queue[qid].tgc_taskq != NULL); gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq; + cpu = qgroup->tqg_queue[qid].tgc_cpu; mtx_unlock(&qgroup->tqg_lock); if (dev != NULL && irq != NULL) { @@ -853,10 +756,11 @@ taskqgroup_detach(struct taskqgroup *qgroup, struct gr static void taskqgroup_binder(void *ctx) { - struct taskq_bind_task *gtask = (struct taskq_bind_task *)ctx; + struct taskq_bind_task *gtask; cpuset_t mask; int error; + gtask = ctx; CPU_ZERO(&mask); CPU_SET(gtask->bt_cpuid, &mask); error = cpuset_setthread(curthread->td_tid, &mask); @@ -869,7 +773,7 @@ taskqgroup_binder(void *ctx) free(gtask, M_DEVBUF); } -static void +void taskqgroup_bind(struct taskqgroup *qgroup) { struct taskq_bind_task *gtask; @@ -883,7 +787,7 @@ taskqgroup_bind(struct taskqgroup *qgroup) return; for (i = 0; i < qgroup->tqg_cnt; i++) { - gtask = malloc(sizeof (*gtask), M_DEVBUF, M_WAITOK); + gtask = malloc(sizeof(*gtask), M_DEVBUF, M_WAITOK); GTASK_INIT(>ask->bt_task, 0, 0, taskqgroup_binder, gtask); gtask->bt_cpuid = qgroup->tqg_queue[i].tgc_cpu; grouptaskqueue_enqueue(qgroup->tqg_queue[i].tgc_taskq, @@ -891,137 +795,22 @@ taskqgroup_bind(struct taskqgroup *qgroup) } } -static void -taskqgroup_config_init(void *arg) -{ - struct taskqgroup *qgroup = qgroup_config; - LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL); - - LIST_SWAP(>ask_head, &qgroup->tqg_queue[0].tgc_tasks, - grouptask, gt_list); - qgroup->tqg_queue[0].tgc_cnt = 0; - taskqgroup_cpu_create(qgroup, 0, 0); - - qgroup->tqg_cnt = 1; - qgroup->tqg_stride = 1; -} - -SYSINIT(taskqgroup_config_init, SI_SUB_TASKQ, SI_ORDER_SECOND, - taskqgroup_config_init, NULL); - -static int -_taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, int stride) -{ - LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL); - struct grouptask *gtask; - int i, k, old_cnt, old_cpu, cpu; - - mtx_assert(&qgroup->tqg_lock, MA_OWNED); - - if (cnt < 1 || cnt * stride > mp_ncpus || !tqg_smp_started) { - printf("%s: failed cnt: %d stride: %d " - "mp_ncpus: %d tqg_smp_started: %d\n", - __func__, cnt, stride, mp_ncpus, tqg_smp_started); - return (EINVAL); - } - if (qgroup->tqg_adjusting) { - printf("%s failed: adjusting\n", __func__); - return (EBUSY); - } - qgroup->tqg_adjusting = 1; - old_cnt = qgroup->tqg_cnt; - old_cpu = 0; - if (old_cnt < cnt) - old_cpu = qgroup->tqg_queue[old_cnt].tgc_cpu; - mtx_unlock(&qgroup->tqg_lock); - /* - * Set up queue for tasks added before boot. - */ - if (old_cnt == 0) { - LIST_SWAP(>ask_head, &qgroup->tqg_queue[0].tgc_tasks, - grouptask, gt_list); - qgroup->tqg_queue[0].tgc_cnt = 0; - } - - /* - * If new taskq threads have been added. - */ - cpu = old_cpu; - for (i = old_cnt; i < cnt; i++) { - taskqgroup_cpu_create(qgroup, i, cpu); - - for (k = 0; k < stride; k++) - cpu = CPU_NEXT(cpu); - } - mtx_lock(&qgroup->tqg_lock); - qgroup->tqg_cnt = cnt; - qgroup->tqg_stride = stride; - - /* - * Adjust drivers to use new taskqs. - */ - for (i = 0; i < old_cnt; i++) { - while ((gtask = LIST_FIRST(&qgroup->tqg_queue[i].tgc_tasks))) { - LIST_REMOVE(gtask, gt_list); - qgroup->tqg_queue[i].tgc_cnt--; - LIST_INSERT_HEAD(>ask_head, gtask, gt_list); - } - } - mtx_unlock(&qgroup->tqg_lock); - - while ((gtask = LIST_FIRST(>ask_head))) { - LIST_REMOVE(gtask, gt_list); - if (gtask->gt_cpu == -1) - taskqgroup_attach_deferred(qgroup, gtask); - else if (taskqgroup_attach_cpu_deferred(qgroup, gtask)) - taskqgroup_attach_deferred(qgroup, gtask); - } - -#ifdef INVARIANTS - mtx_lock(&qgroup->tqg_lock); - for (i = 0; i < qgroup->tqg_cnt; i++) { - MPASS(qgroup->tqg_queue[i].tgc_taskq != NULL); - LIST_FOREACH(gtask, &qgroup->tqg_queue[i].tgc_tasks, gt_list) - MPASS(gtask->gt_taskqueue != NULL); - } - mtx_unlock(&qgroup->tqg_lock); -#endif - /* - * If taskq thread count has been reduced. - */ - for (i = cnt; i < old_cnt; i++) - taskqgroup_cpu_remove(qgroup, i); - - taskqgroup_bind(qgroup); - - mtx_lock(&qgroup->tqg_lock); - qgroup->tqg_adjusting = 0; - - return (0); -} - -int -taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, int stride) -{ - int error; - - mtx_lock(&qgroup->tqg_lock); - error = _taskqgroup_adjust(qgroup, cnt, stride); - mtx_unlock(&qgroup->tqg_lock); - - return (error); -} - struct taskqgroup * -taskqgroup_create(const char *name) +taskqgroup_create(const char *name, int cnt, int stride) { struct taskqgroup *qgroup; + int cpu, i, j; qgroup = malloc(sizeof(*qgroup), M_GTASKQUEUE, M_WAITOK | M_ZERO); mtx_init(&qgroup->tqg_lock, "taskqgroup", NULL, MTX_DEF); qgroup->tqg_name = name; - LIST_INIT(&qgroup->tqg_queue[0].tgc_tasks); + qgroup->tqg_cnt = cnt; + for (cpu = i = 0; i < cnt; i++) { + taskqgroup_cpu_create(qgroup, i, cpu); + for (j = 0; j < stride; j++) + cpu = CPU_NEXT(cpu); + } return (qgroup); } Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Mar 30 14:03:35 2020 (r359435) +++ head/sys/net/iflib.c Mon Mar 30 14:22:52 2020 (r359436) @@ -1410,29 +1410,6 @@ iflib_dma_free_multi(iflib_dma_info_t *dmalist, int co iflib_dma_free(*dmaiter); } -#ifdef EARLY_AP_STARTUP -static const int iflib_started = 1; -#else -/* - * We used to abuse the smp_started flag to decide if the queues have been - * fully initialized (by late taskqgroup_adjust() calls in a SYSINIT()). - * That gave bad races, since the SYSINIT() runs strictly after smp_started - * is set. Run a SYSINIT() strictly after that to just set a usable - * completion flag. - */ - -static int iflib_started; - -static void -iflib_record_started(void *arg) -{ - iflib_started = 1; -} - -SYSINIT(iflib_record_started, SI_SUB_SMP + 1, SI_ORDER_FIRST, - iflib_record_started, NULL); -#endif - static int iflib_fast_intr(void *arg) { @@ -1440,9 +1417,6 @@ iflib_fast_intr(void *arg) struct grouptask *gtask = info->ifi_task; int result; - if (!iflib_started) - return (FILTER_STRAY); - DBG_COUNTER_INC(fast_intrs); if (info->ifi_filter != NULL) { result = info->ifi_filter(info->ifi_filter_arg); @@ -1467,9 +1441,6 @@ iflib_fast_intr_rxtx(void *arg) qidx_t txqid; bool intr_enable, intr_legacy; - if (!iflib_started) - return (FILTER_STRAY); - DBG_COUNTER_INC(fast_intrs); if (info->ifi_filter != NULL) { result = info->ifi_filter(info->ifi_filter_arg); @@ -1522,9 +1493,6 @@ iflib_fast_intr_ctx(void *arg) struct grouptask *gtask = info->ifi_task; int result; - if (!iflib_started) - return (FILTER_STRAY); - DBG_COUNTER_INC(fast_intrs); if (info->ifi_filter != NULL) { result = info->ifi_filter(info->ifi_filter_arg); @@ -4745,18 +4713,6 @@ iflib_device_register(device_t dev, void *sc, if_share * Now that we know how many queues there are, get the core offset. */ ctx->ifc_sysctl_core_offset = get_ctx_core_offset(ctx); - - /* - * Group taskqueues aren't properly set up until SMP is started, - * so we disable interrupts until we can handle them post - * SI_SUB_SMP. - * - * XXX: disabling interrupts doesn't actually work, at least for - * the non-MSI case. When they occur before SI_SUB_SMP completes, - * we do null handling and depend on this not causing too large an - * interrupt storm. - */ - IFDI_INTR_DISABLE(ctx); if (msix > 1) { /* Modified: head/sys/sys/gtaskqueue.h ============================================================================== --- head/sys/sys/gtaskqueue.h Mon Mar 30 14:03:35 2020 (r359435) +++ head/sys/sys/gtaskqueue.h Mon Mar 30 14:22:52 2020 (r359436) @@ -77,9 +77,9 @@ int taskqgroup_attach_cpu(struct taskqgroup *qgroup, struct grouptask *grptask, void *uniq, int cpu, device_t dev, struct resource *irq, const char *name); void taskqgroup_detach(struct taskqgroup *qgroup, struct grouptask *gtask); -struct taskqgroup *taskqgroup_create(const char *name); +struct taskqgroup *taskqgroup_create(const char *name, int cnt, int stride); void taskqgroup_destroy(struct taskqgroup *qgroup); -int taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, int stride); +void taskqgroup_bind(struct taskqgroup *qgroup); void taskqgroup_config_gtask_init(void *ctx, struct grouptask *gtask, gtask_fn_t *fn, const char *name); void taskqgroup_config_gtask_deinit(struct grouptask *gtask); @@ -107,22 +107,19 @@ struct taskqgroup *qgroup_##name; \ static void \ taskqgroup_define_##name(void *arg) \ { \ - qgroup_##name = taskqgroup_create(#name); \ + qgroup_##name = taskqgroup_create(#name, (cnt), (stride)); \ } \ - \ SYSINIT(taskqgroup_##name, SI_SUB_TASKQ, SI_ORDER_FIRST, \ - taskqgroup_define_##name, NULL); \ + taskqgroup_define_##name, NULL); \ \ static void \ -taskqgroup_adjust_##name(void *arg) \ +taskqgroup_bind_##name(void *arg) \ { \ - taskqgroup_adjust(qgroup_##name, (cnt), (stride)); \ + taskqgroup_bind(qgroup_##name); \ } \ - \ -SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \ - taskqgroup_adjust_##name, NULL) +SYSINIT(taskqgroup_bind_##name, SI_SUB_SMP, SI_ORDER_ANY, \ + taskqgroup_bind_##name, NULL) -TASKQGROUP_DECLARE(net); TASKQGROUP_DECLARE(softirq); #endif /* !_SYS_GTASKQUEUE_H_ */ From owner-svn-src-head@freebsd.org Mon Mar 30 15:29:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B76482A620B; Mon, 30 Mar 2020 15:29:44 +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 48rbx148XZz3Qf7; Mon, 30 Mar 2020 15:29:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD8AA1E579; Mon, 30 Mar 2020 15:29:39 +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 02UFTdRg098270; Mon, 30 Mar 2020 15:29:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UFTd1e098269; Mon, 30 Mar 2020 15:29:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003301529.02UFTd1e098269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Mar 2020 15:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359439 - 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: 359439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 15:29:44 -0000 Author: hselasky Date: Mon Mar 30 15:29:39 2020 New Revision: 359439 URL: https://svnweb.freebsd.org/changeset/base/359439 Log: Evaluate modifier keys before the regular keys, so that if a modifier key is pressed at the same time as a regular key, that means key with modifier is output. Some automated USB keyboards like Yubikeys need this. This fixes a regression issue after r357861. Reported by: Adam McDougall PR: 224592 PR: 233884 MFC after: 3 days 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 Mon Mar 30 14:24:03 2020 (r359438) +++ head/sys/dev/usb/input/ukbd.c Mon Mar 30 15:29:39 2020 (r359439) @@ -499,6 +499,21 @@ ukbd_interrupt(struct ukbd_softc *sc) UKBD_LOCK_ASSERT(); + /* Check for modifier key changes first */ + for (key = 0xe0; key != 0xe8; key++) { + const uint64_t mask = 1ULL << (key % 64); + const uint64_t delta = + sc->sc_odata.bitmap[key / 64] ^ + sc->sc_ndata.bitmap[key / 64]; + + if (delta & mask) { + if (sc->sc_odata.bitmap[key / 64] & mask) + ukbd_put_key(sc, key | KEY_RELEASE); + else + ukbd_put_key(sc, key | KEY_PRESS); + } + } + /* Check for key changes */ for (key = 0; key != UKBD_NKEYCODE; key++) { const uint64_t mask = 1ULL << (key % 64); @@ -509,6 +524,8 @@ ukbd_interrupt(struct ukbd_softc *sc) if (mask == 1 && delta == 0) { key += 63; continue; /* skip empty areas */ + } else if (ukbd_is_modifier_key(key)) { + continue; } else if (delta & mask) { if (sc->sc_odata.bitmap[key / 64] & mask) { ukbd_put_key(sc, key | KEY_RELEASE); @@ -518,9 +535,6 @@ ukbd_interrupt(struct ukbd_softc *sc) sc->sc_repeat_key = 0; } else { ukbd_put_key(sc, key | KEY_PRESS); - - if (ukbd_is_modifier_key(key)) - continue; sc->sc_co_basetime = sbinuptime(); sc->sc_delay = sc->sc_kbd.kb_delay1; From owner-svn-src-head@freebsd.org Mon Mar 30 16:04:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B21352A6EE6; Mon, 30 Mar 2020 16:04:40 +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 48rcjL5mrTz48gD; Mon, 30 Mar 2020 16:04:38 +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 A589C1EF2E; Mon, 30 Mar 2020 16:04:31 +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 02UG4Vhi022517; Mon, 30 Mar 2020 16:04:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UG4QHu022491; Mon, 30 Mar 2020 16:04:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003301604.02UG4QHu022491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 16:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359441 - in head/sys: arm/nvidia/drm2 dev/bnxt dev/bxe dev/etherswitch/mtkswitch dev/hptnr dev/nvme dev/ocs_fc dev/pms/RefTisa/discovery/dm dev/pms/RefTisa/sallsdk/spc dev/pms/RefTisa/... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: arm/nvidia/drm2 dev/bnxt dev/bxe dev/etherswitch/mtkswitch dev/hptnr dev/nvme dev/ocs_fc dev/pms/RefTisa/discovery/dm dev/pms/RefTisa/sallsdk/spc dev/pms/RefTisa/tisa/sassata/common dev/p... X-SVN-Commit-Revision: 359441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 16:04:42 -0000 Author: emaste Date: Mon Mar 30 16:04:25 2020 New Revision: 359441 URL: https://svnweb.freebsd.org/changeset/base/359441 Log: remove extraneous double ;s in sys/ Modified: head/sys/arm/nvidia/drm2/tegra_dc.c head/sys/arm/nvidia/drm2/tegra_hdmi.c head/sys/dev/bnxt/bnxt_hwrm.c head/sys/dev/bnxt/bnxt_sysctl.c head/sys/dev/bxe/bxe.c head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c head/sys/dev/hptnr/hptnr_os_bsd.c head/sys/dev/nvme/nvme_qpair.c head/sys/dev/ocs_fc/ocs_hw_queues.c head/sys/dev/ocs_fc/ocs_io.c head/sys/dev/ocs_fc/ocs_mgmt.c head/sys/dev/ocs_fc/ocs_node.c head/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c head/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c head/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c head/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/smartpqi/smartpqi_queue.c head/sys/dev/smartpqi/smartpqi_request.c head/sys/dev/vnic/thunder_bgx.c head/sys/net/if_me.c Modified: head/sys/arm/nvidia/drm2/tegra_dc.c ============================================================================== --- head/sys/arm/nvidia/drm2/tegra_dc.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/arm/nvidia/drm2/tegra_dc.c Mon Mar 30 16:04:25 2020 (r359441) @@ -384,7 +384,7 @@ dc_setup_window(struct dc_softc *sc, unsigned int inde v_size = win->src_w; } - h_offset = win->src_x * bpp;; + h_offset = win->src_x * bpp; v_offset = win->src_y; if (win->flip_x) { h_offset += win->src_w * bpp - 1; Modified: head/sys/arm/nvidia/drm2/tegra_hdmi.c ============================================================================== --- head/sys/arm/nvidia/drm2/tegra_hdmi.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/arm/nvidia/drm2/tegra_hdmi.c Mon Mar 30 16:04:25 2020 (r359441) @@ -341,7 +341,7 @@ static void avi_setup_infoframe(struct hdmi_softc *sc, struct drm_display_mode *mode) { struct hdmi_avi_infoframe frame; - uint8_t buf[17], *hdr, *pb;; + uint8_t buf[17], *hdr, *pb; ssize_t rv; rv = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); Modified: head/sys/dev/bnxt/bnxt_hwrm.c ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/bnxt/bnxt_hwrm.c Mon Mar 30 16:04:25 2020 (r359441) @@ -861,7 +861,7 @@ bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *softc, struct hwrm_cfa_l2_set_rx_mask_input req = {0}; struct bnxt_vlan_tag *tag; uint32_t *tags; - uint32_t num_vlan_tags = 0;; + uint32_t num_vlan_tags = 0; uint32_t i; uint32_t mask = vnic->rx_mask; int rc; Modified: head/sys/dev/bnxt/bnxt_sysctl.c ============================================================================== --- head/sys/dev/bnxt/bnxt_sysctl.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/bnxt/bnxt_sysctl.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1204,7 +1204,7 @@ bnxt_create_config_sysctls_pre(struct bnxt_softc *soft struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); struct sysctl_oid_list *children; - children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_key", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, @@ -1409,7 +1409,7 @@ bnxt_create_config_sysctls_post(struct bnxt_softc *sof struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); struct sysctl_oid_list *children; - children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_only", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/bxe/bxe.c Mon Mar 30 16:04:25 2020 (r359441) @@ -15939,7 +15939,7 @@ static void bxe_force_link_reset(struct bxe_softc *sc) static int bxe_sysctl_pauseparam(SYSCTL_HANDLER_ARGS) { - struct bxe_softc *sc = (struct bxe_softc *)arg1;; + struct bxe_softc *sc = (struct bxe_softc *)arg1; uint32_t cfg_idx = bxe_get_link_cfg_idx(sc); int rc = 0; int error; Modified: head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c ============================================================================== --- head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c Mon Mar 30 16:04:25 2020 (r359441) @@ -140,7 +140,7 @@ mtkswitch_reg_read32_mt7621(struct mtkswitch_softc *sc low = mtkswitch_phy_read_locked(sc, MTKSWITCH_GLOBAL_PHY, MTKSWITCH_REG_LO(reg)); hi = mtkswitch_phy_read_locked(sc, MTKSWITCH_GLOBAL_PHY, - MTKSWITCH_REG_HI(reg));; + MTKSWITCH_REG_HI(reg)); return (low | (hi << 16)); } Modified: head/sys/dev/hptnr/hptnr_os_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_os_bsd.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/hptnr/hptnr_os_bsd.c Mon Mar 30 16:04:25 2020 (r359441) @@ -90,7 +90,7 @@ BUS_ADDRESS get_dmapool_phy_addr(void *osext, void * d HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { - return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);; + return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4); }/* PCI space access */ void *os_map_pci_bar( Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/nvme/nvme_qpair.c Mon Mar 30 16:04:25 2020 (r359441) @@ -704,7 +704,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, cmdsz = roundup2(cmdsz, PAGE_SIZE); cplsz = qpair->num_entries * sizeof(struct nvme_completion); cplsz = roundup2(cplsz, PAGE_SIZE); - prpsz = sizeof(uint64_t) * NVME_MAX_PRP_LIST_ENTRIES;; + prpsz = sizeof(uint64_t) * NVME_MAX_PRP_LIST_ENTRIES; prpmemsz = qpair->num_trackers * prpsz; allocsz = cmdsz + cplsz + prpmemsz; Modified: head/sys/dev/ocs_fc/ocs_hw_queues.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_hw_queues.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/ocs_fc/ocs_hw_queues.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1625,7 +1625,7 @@ ocs_hw_qtop_parse(ocs_hw_t *hw, const char *qtop_strin /* Parse the tokens */ for (s = qtop_string; (tokarray.inuse_count < tokarray.alloc_count) && ((s = tokenize(s, &tokarray.tokens[tokarray.inuse_count]))) != NULL; ) { - tokarray.inuse_count++;; + tokarray.inuse_count++; } /* Allocate a queue topology structure */ Modified: head/sys/dev/ocs_fc/ocs_io.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_io.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/ocs_fc/ocs_io.c Mon Mar 30 16:04:25 2020 (r359441) @@ -110,7 +110,7 @@ ocs_io_pool_create(ocs_t *ocs, uint32_t num_io, uint32 io_pool = ocs_malloc(ocs, sizeof(*io_pool), OCS_M_ZERO | OCS_M_NOWAIT); if (io_pool == NULL) { ocs_log_err(ocs, "allocate of IO pool failed\n"); - return NULL;; + return NULL; } io_pool->ocs = ocs; Modified: head/sys/dev/ocs_fc/ocs_mgmt.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_mgmt.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/ocs_fc/ocs_mgmt.c Mon Mar 30 16:04:25 2020 (r359441) @@ -912,7 +912,7 @@ static int32_t ocs_mgmt_get_sfp(ocs_t *ocs, uint16_t page, void *buf, uint32_t buf_len) { int rc = 0; - ocs_mgmt_sfp_result_t *result = ocs_malloc(ocs, sizeof(ocs_mgmt_sfp_result_t), OCS_M_ZERO | OCS_M_NOWAIT);; + ocs_mgmt_sfp_result_t *result = ocs_malloc(ocs, sizeof(ocs_mgmt_sfp_result_t), OCS_M_ZERO | OCS_M_NOWAIT); ocs_sem_init(&(result->semaphore), 0, "get_sfp"); ocs_lock_init(ocs, &(result->cb_lock), "get_sfp"); Modified: head/sys/dev/ocs_fc/ocs_node.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_node.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/ocs_fc/ocs_node.c Mon Mar 30 16:04:25 2020 (r359441) @@ -205,7 +205,7 @@ ocs_node_find(ocs_sport_t *sport, uint32_t port_id) ocs_node_t * ocs_node_find_wwpn(ocs_sport_t *sport, uint64_t wwpn) { - ocs_node_t *node = NULL;; + ocs_node_t *node = NULL; ocs_assert(sport, NULL); Modified: head/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c ============================================================================== --- head/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c Mon Mar 30 16:04:25 2020 (r359441) @@ -505,11 +505,11 @@ dmDownStreamDiscovering( } else { - DMLIST_DEQUEUE_FROM_HEAD(&ExpanderList, &(onePortContext->discovery.discoveringExpanderList));; + DMLIST_DEQUEUE_FROM_HEAD(&ExpanderList, &(onePortContext->discovery.discoveringExpanderList)); NextExpander = DMLIST_OBJECT_BASE(dmExpander_t, linkNode, ExpanderList); if ( NextExpander != agNULL) { - DMLIST_ENQUEUE_AT_HEAD(&(NextExpander->linkNode), &(onePortContext->discovery.discoveringExpanderList));; + DMLIST_ENQUEUE_AT_HEAD(&(NextExpander->linkNode), &(onePortContext->discovery.discoveringExpanderList)); DM_DBG3(("dmDownStreamDiscovering tdsaSASDownStreamDiscovering: dequeue head\n")); DM_DBG3(("dmDownStreamDiscovering: expander id %d\n", NextExpander->id)); } Modified: head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c ============================================================================== --- head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1765,7 +1765,7 @@ GLOBAL bit32 siConfiguration( for( i = 0; i < queueConfig->numInboundQueues; i ++ ) { mpiConfig->inboundQueues[i].numElements = (bit16)queueConfig->inboundQueues[i].elementCount; - mpiConfig->inboundQueues[i].elementSize = (bit16)queueConfig->inboundQueues[i].elementSize;; + mpiConfig->inboundQueues[i].elementSize = (bit16)queueConfig->inboundQueues[i].elementSize; mpiConfig->inboundQueues[i].priority = queueConfig->inboundQueues[i].priority; SA_DBG2(("siConfiguration: IBQ%d:elementCount=%d elementSize=%d priority=%d Total Size 0x%X\n", Modified: head/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1757,7 +1757,7 @@ osGLOBAL void ossaHwCB( { TI_DBG1(("ossaHwCB: OSSA_HW_EVENT_PHY_STOP_STATUS, SUCCESS\n")); agContext = (agsaContext_t *)eventParm2; - onePortContext = (tdsaPortContext_t *)agContext->osData;; + onePortContext = (tdsaPortContext_t *)agContext->osData; if (onePortContext == agNULL) { TI_DBG1(("ossaHwCB: onePortContext is null, wrong!!!\n")); @@ -3716,7 +3716,7 @@ ossaIntCoalesceInitCB( tiIntCoalesceContext_t *tiIntCoalesceCxt; tdsaIntCoalesceContext_t *tdsaIntCoalCxt; tdsaIntCoalesceContext_t *tdsaIntCoalCxtHead - = (tdsaIntCoalesceContext_t *)tdsaAllShared->IntCoalesce;; + = (tdsaIntCoalesceContext_t *)tdsaAllShared->IntCoalesce; bit32 tiStatus; TI_DBG2(("ossaIntCoalesceInitCB: start\n")); Modified: head/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1599,7 +1599,7 @@ tiCOMPassthroughCmndStart( break; case tiConfigureRteInfo: - SMPFn = SMP_CONFIGURE_ROUTING_INFORMATION;; + SMPFn = SMP_CONFIGURE_ROUTING_INFORMATION; if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) { SMPFrameLen = sizeof(SmpReqConfigureRouteInformation_t); Modified: head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1790,9 +1790,9 @@ tdsaSASDownStreamDiscovering( } else { - TDLIST_DEQUEUE_FROM_HEAD(&ExpanderList, &(onePortContext->discovery.discoveringExpanderList));; + TDLIST_DEQUEUE_FROM_HEAD(&ExpanderList, &(onePortContext->discovery.discoveringExpanderList)); NextExpander = TDLIST_OBJECT_BASE(tdsaExpander_t, linkNode, ExpanderList); - TDLIST_ENQUEUE_AT_HEAD(&(NextExpander->linkNode), &(onePortContext->discovery.discoveringExpanderList));; + TDLIST_ENQUEUE_AT_HEAD(&(NextExpander->linkNode), &(onePortContext->discovery.discoveringExpanderList)); tdsaSingleThreadedLeave(tiRoot, TD_DISC_LOCK); TI_DBG3(("tdssSASDiscoveringExpander tdsaSASDownStreamDiscovering: dequeue head\n")); TI_DBG3(("tdsaSASDownStreamDiscovering: expander id %d\n", NextExpander->id)); Modified: head/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c ============================================================================== --- head/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c Mon Mar 30 16:04:25 2020 (r359441) @@ -19869,7 +19869,7 @@ bit32 satAddNComparebit32(bit8 *a, bit8 *b) } - return agFALSE;; + return agFALSE; } /*****************************************************************************/ Modified: head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c ============================================================================== --- head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c Mon Mar 30 16:04:25 2020 (r359441) @@ -3540,7 +3540,7 @@ static int agtiapi_PrepareSMPSGList( struct agtiapi_so "not supported\n" ); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); - return tiReject;; + return tiReject; } if (ccbh->flags & CAM_SCATTER_VALID) @@ -3556,7 +3556,7 @@ static int agtiapi_PrepareSMPSGList( struct agtiapi_so "not supported\n" ); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); - return tiReject;; + return tiReject; } if ( csmpio->smp_request_sglist_cnt != 0 ) { Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/qlxgbe/ql_hw.c Mon Mar 30 16:04:25 2020 (r359441) @@ -4317,7 +4317,7 @@ ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) offset = hdrlen + 4; if (mp->m_len >= offset) { - th = (struct tcphdr *)(mp->m_data + hdrlen);; + th = (struct tcphdr *)(mp->m_data + hdrlen); } else { m_copydata(mp, hdrlen, 4, buf); th = (struct tcphdr *)buf; @@ -4341,7 +4341,7 @@ ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) offset = hdrlen + 4; if (mp->m_len >= offset) { - th = (struct tcphdr *)(mp->m_data + hdrlen);; + th = (struct tcphdr *)(mp->m_data + hdrlen); } else { m_copydata(mp, hdrlen, 4, buf); th = (struct tcphdr *)buf; Modified: head/sys/dev/smartpqi/smartpqi_queue.c ============================================================================== --- head/sys/dev/smartpqi/smartpqi_queue.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/smartpqi/smartpqi_queue.c Mon Mar 30 16:04:25 2020 (r359441) @@ -282,7 +282,7 @@ void pqisrc_print_adminq_config(pqisrc_softstate_t *so */ int pqisrc_create_admin_queue(pqisrc_softstate_t *softs) { - int ret = PQI_STATUS_SUCCESS;; + int ret = PQI_STATUS_SUCCESS; uint32_t admin_q_param = 0; DBG_FUNC("IN\n"); @@ -527,7 +527,7 @@ int pqisrc_destroy_admin_queue(pqisrc_softstate_t *sof int pqisrc_change_op_ibq_queue_prop(pqisrc_softstate_t *softs, ib_queue_t *op_ib_q, uint32_t prop) { - int ret = PQI_STATUS_SUCCESS;; + int ret = PQI_STATUS_SUCCESS; gen_adm_req_iu_t admin_req; gen_adm_resp_iu_t admin_resp; @@ -552,7 +552,7 @@ int pqisrc_change_op_ibq_queue_prop(pqisrc_softstate_t int pqisrc_create_op_obq(pqisrc_softstate_t *softs, ob_queue_t *op_ob_q) { - int ret = PQI_STATUS_SUCCESS;; + int ret = PQI_STATUS_SUCCESS; gen_adm_req_iu_t admin_req; gen_adm_resp_iu_t admin_resp; @@ -596,7 +596,7 @@ int pqisrc_create_op_obq(pqisrc_softstate_t *softs, int pqisrc_create_op_ibq(pqisrc_softstate_t *softs, ib_queue_t *op_ib_q) { - int ret = PQI_STATUS_SUCCESS;; + int ret = PQI_STATUS_SUCCESS; gen_adm_req_iu_t admin_req; gen_adm_resp_iu_t admin_resp; @@ -656,7 +656,7 @@ int pqisrc_create_op_aio_ibq(pqisrc_softstate_t *softs int pqisrc_create_op_raid_ibq(pqisrc_softstate_t *softs, ib_queue_t *op_raid_ib_q) { - int ret = PQI_STATUS_SUCCESS;; + int ret = PQI_STATUS_SUCCESS; DBG_FUNC("IN\n"); Modified: head/sys/dev/smartpqi/smartpqi_request.c ============================================================================== --- head/sys/dev/smartpqi/smartpqi_request.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/smartpqi/smartpqi_request.c Mon Mar 30 16:04:25 2020 (r359441) @@ -548,7 +548,7 @@ int pqisrc_send_scsi_cmd_raidbypass(pqisrc_softstate_t return PQI_STATUS_FAILURE; /* Check for write to non-RAID-0. */ if (is_write && device->raid_level != SA_RAID_0) - return PQI_STATUS_FAILURE;; + return PQI_STATUS_FAILURE; if(blk_cnt == 0) return PQI_STATUS_FAILURE; Modified: head/sys/dev/vnic/thunder_bgx.c ============================================================================== --- head/sys/dev/vnic/thunder_bgx.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/vnic/thunder_bgx.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1052,7 +1052,7 @@ bgx_init_hw(struct bgx *bgx) static void bgx_get_qlm_mode(struct bgx *bgx) { - device_t dev = bgx->dev;; + device_t dev = bgx->dev; int lmac_type; int train_en; Modified: head/sys/net/if_me.c ============================================================================== --- head/sys/net/if_me.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/net/if_me.c Mon Mar 30 16:04:25 2020 (r359441) @@ -194,7 +194,7 @@ me_clone_create(struct if_clone *ifc, int unit, caddr_ ME2IFP(sc)->if_softc = sc; if_initname(ME2IFP(sc), mename, unit); - ME2IFP(sc)->if_mtu = MEMTU;; + ME2IFP(sc)->if_mtu = MEMTU; ME2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; ME2IFP(sc)->if_output = me_output; ME2IFP(sc)->if_ioctl = me_ioctl; From owner-svn-src-head@freebsd.org Mon Mar 30 16:15:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 274402A736E; Mon, 30 Mar 2020 16:15: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 48rcyK5P5Fz4DcP; Mon, 30 Mar 2020 16:15:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BB9D1E7A3; Mon, 30 Mar 2020 15:36:39 +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 02UFadAN004406; Mon, 30 Mar 2020 15:36:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UFacI8004404; Mon, 30 Mar 2020 15:36:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003301536.02UFacI8004404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Mar 2020 15:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359440 - head/sys/dev/sound/pcm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/pcm X-SVN-Commit-Revision: 359440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 16:15:57 -0000 Author: hselasky Date: Mon Mar 30 15:36:38 2020 New Revision: 359440 URL: https://svnweb.freebsd.org/changeset/base/359440 Log: Implement new mixer API to return the device pointer based on the mixer pointer. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/mixer.h Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:29:39 2020 (r359439) +++ head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:36:38 2020 (r359440) @@ -1032,6 +1032,14 @@ mix_get_type(struct snd_mixer *m) return (m->type); } +device_t +mix_get_dev(struct snd_mixer *m) +{ + KASSERT(m != NULL, ("NULL snd_mixer")); + + return (m->dev); +} + /* ----------------------------------------------------------------------- */ static int Modified: head/sys/dev/sound/pcm/mixer.h ============================================================================== --- head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:29:39 2020 (r359439) +++ head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:36:38 2020 (r359440) @@ -56,6 +56,7 @@ int mix_get(struct snd_mixer *m, u_int dev); int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); u_int32_t mix_getrecsrc(struct snd_mixer *m); int mix_get_type(struct snd_mixer *m); +device_t mix_get_dev(struct snd_mixer *m); void mix_setdevs(struct snd_mixer *m, u_int32_t v); void mix_setrecdevs(struct snd_mixer *m, u_int32_t v); From owner-svn-src-head@freebsd.org Mon Mar 30 16:22:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DB872A7745; Mon, 30 Mar 2020 16:22:26 +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 48rd5r4N38z4Gs0; Mon, 30 Mar 2020 16:22: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 CC23C1F32D; Mon, 30 Mar 2020 16:22:16 +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 02UGMGUW033656; Mon, 30 Mar 2020 16:22:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UGMGs5033654; Mon, 30 Mar 2020 16:22:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003301622.02UGMGs5033654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 30 Mar 2020 16:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359443 - head/contrib/bmake X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/bmake X-SVN-Commit-Revision: 359443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 16:22:26 -0000 Author: kevans Date: Mon Mar 30 16:22:16 2020 New Revision: 359443 URL: https://svnweb.freebsd.org/changeset/base/359443 Log: MFV r359442: bmake: import -fno-common fix build back from upstream sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports. Modified: head/contrib/bmake/main.c head/contrib/bmake/make.h Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Mon Mar 30 16:20:04 2020 (r359442) +++ head/contrib/bmake/main.c Mon Mar 30 16:22:16 2020 (r359443) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $ */ +/* $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -199,7 +199,7 @@ char *makeDependfile; pid_t myPid; int makelevel; -FILE *debug_file; +FILE *debug_file; Boolean forceJobs = FALSE; Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Mon Mar 30 16:20:04 2020 (r359442) +++ head/contrib/bmake/make.h Mon Mar 30 16:22:16 2020 (r359443) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.104 2018/02/12 21:38:09 sjg Exp $ */ +/* $NetBSD: make.h,v 1.105 2020/03/30 02:41:06 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 From owner-svn-src-head@freebsd.org Mon Mar 30 16:24:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEDAB2A77FE; Mon, 30 Mar 2020 16:24:12 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rd7v5HTYz4HT7; Mon, 30 Mar 2020 16:24:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 409511F34D; Mon, 30 Mar 2020 16:24:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UGO5Gp034728; Mon, 30 Mar 2020 16:24:05 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UGO5eg034727; Mon, 30 Mar 2020 16:24:05 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003301624.02UGO5eg034727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Mar 2020 16:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359444 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 359444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 16:24:13 -0000 Author: jhibbits Date: Mon Mar 30 16:24:05 2020 New Revision: 359444 URL: https://svnweb.freebsd.org/changeset/base/359444 Log: powerpc: --secure-plt only needs to pass to ld.bfd, not ld.lld ld.lld only supports secure-plt for powerpc, so no need to pass the argument in. Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Mon Mar 30 16:22:16 2020 (r359443) +++ head/share/mk/bsd.cpu.mk Mon Mar 30 16:24:05 2020 (r359444) @@ -340,7 +340,7 @@ CFLAGS += -mfloat-abi=softfp .endif .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" -LDFLAGS+= -Wl,--secure-plt +LDFLAGS.bfd+= -Wl,--secure-plt .endif .if ${MACHINE_ARCH} == "powerpcspe" From owner-svn-src-head@freebsd.org Mon Mar 30 16:33:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B308B2A7C31; Mon, 30 Mar 2020 16:33:08 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rdLB53sRz4LSD; Mon, 30 Mar 2020 16:33:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC3D21F61E; Mon, 30 Mar 2020 16:32:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UGWtwN040671; Mon, 30 Mar 2020 16:32:55 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UGWtMd040670; Mon, 30 Mar 2020 16:32:55 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003301632.02UGWtMd040670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Mar 2020 16:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359445 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 359445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 16:33:08 -0000 Author: jhibbits Date: Mon Mar 30 16:32:55 2020 New Revision: 359445 URL: https://svnweb.freebsd.org/changeset/base/359445 Log: powerpc/pmap: Replace a logical TAILQ_FOREACH_SAFE with the real thing No functional change, just cleanup. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Mon Mar 30 16:24:05 2020 (r359444) +++ head/sys/powerpc/booke/pmap.c Mon Mar 30 16:32:55 2020 (r359445) @@ -1597,9 +1597,7 @@ mmu_booke_remove_all(mmu_t mmu, vm_page_t m) uint8_t hold_flag; rw_wlock(&pvh_global_lock); - for (pv = TAILQ_FIRST(&m->md.pv_list); pv != NULL; pv = pvn) { - pvn = TAILQ_NEXT(pv, pv_link); - + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_link, pvn) { PMAP_LOCK(pv->pv_pmap); hold_flag = PTBL_HOLD_FLAG(pv->pv_pmap); pte_remove(mmu, pv->pv_pmap, pv->pv_va, hold_flag); From owner-svn-src-head@freebsd.org Mon Mar 30 17:01:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52167260582; Mon, 30 Mar 2020 17:01:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rdz822Xlz4WWM; Mon, 30 Mar 2020 17:01:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9290A1F864; Mon, 30 Mar 2020 16:50:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UGoXGn046851; Mon, 30 Mar 2020 16:50:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UGoX5Y046848; Mon, 30 Mar 2020 16:50:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003301650.02UGoX5Y046848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Mar 2020 16:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359446 - head/sys/dev/sound/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/usb X-SVN-Commit-Revision: 359446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 17:01:41 -0000 Author: hselasky Date: Mon Mar 30 16:50:32 2020 New Revision: 359446 URL: https://svnweb.freebsd.org/changeset/base/359446 Log: Add support for multiple playback and recording devices per physical USB audio device. This requires some structural refactoring inside the driver, mostly about converting existing audio channel structures into arrays. The main audio mixer is provided by the first PCM instance. The non-first audio instances may only have a software mixer for PCM playback. Tested by: Horse Ma MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudio.h head/sys/dev/sound/usb/uaudio_pcm.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Mon Mar 30 16:32:55 2020 (r359445) +++ head/sys/dev/sound/usb/uaudio.c Mon Mar 30 16:50:32 2020 (r359446) @@ -262,6 +262,8 @@ struct uaudio_chan { #define CHAN_OP_START 1 #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 + + uint8_t iface_index; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -347,37 +349,45 @@ struct uaudio_hid { #define UAUDIO_SPDIF_OUT_96K 0x04 /* Out sample rate = 96K */ #define UAUDIO_SPDIF_IN_MIX 0x10 /* Input mix enable */ +#define UAUDIO_MAX_CHILD 2 + +struct uaudio_softc_child { + device_t pcm_device; + struct mtx *mixer_lock; + struct snd_mixer *mixer_dev; + + uint32_t mix_info; + uint32_t recsrc_info; + + uint8_t pcm_registered:1; + uint8_t mixer_init:1; +}; + struct uaudio_softc { struct sbuf sc_sndstat; struct sndcard_func sc_sndcard_func; - struct uaudio_chan sc_rec_chan; - struct uaudio_chan sc_play_chan; + struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD]; + struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD]; struct umidi_chan sc_midi_chan; struct uaudio_hid sc_hid; struct uaudio_search_result sc_mixer_clocks; struct uaudio_mixer_node sc_mixer_node; struct uaudio_configure_msg sc_config_msg[2]; + struct uaudio_softc_child sc_child[UAUDIO_MAX_CHILD]; - struct mtx *sc_mixer_lock; - struct snd_mixer *sc_mixer_dev; struct usb_device *sc_udev; struct usb_xfer *sc_mixer_xfer[1]; struct uaudio_mixer_node *sc_mixer_root; struct uaudio_mixer_node *sc_mixer_curr; int (*sc_set_spdif_fn) (struct uaudio_softc *, int); - uint32_t sc_mix_info; - uint32_t sc_recsrc_info; - uint16_t sc_audio_rev; uint16_t sc_mixer_count; - uint8_t sc_sndstat_valid; uint8_t sc_mixer_iface_index; uint8_t sc_mixer_iface_no; uint8_t sc_mixer_chan; - uint8_t sc_pcm_registered:1; - uint8_t sc_mixer_init:1; + uint8_t sc_sndstat_valid:1; uint8_t sc_uq_audio_swap_lr:1; uint8_t sc_uq_au_inp_async:1; uint8_t sc_uq_au_no_xu:1; @@ -477,7 +487,7 @@ static usb_proc_callback_t uaudio_configure_msg; static int uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS); static void uaudio_mixer_ctl_free(struct uaudio_softc *); -static void uaudio_mixer_register_sysctl(struct uaudio_softc *, device_t); +static void uaudio_mixer_register_sysctl(struct uaudio_softc *, device_t, unsigned); static void uaudio_mixer_reload_all(struct uaudio_softc *); static void uaudio_mixer_controls_create_ftu(struct uaudio_softc *); @@ -537,7 +547,7 @@ static void uaudio_mixer_add_ctl(struct uaudio_softc * static void uaudio_mixer_fill_info(struct uaudio_softc *, struct usb_device *, void *); static int uaudio_mixer_signext(uint8_t, int); -static void uaudio_mixer_init(struct uaudio_softc *); +static void uaudio_mixer_init(struct uaudio_softc *, unsigned); static uint8_t umidi_convert_to_usb(struct umidi_sub_chan *, uint8_t, uint8_t); static struct umidi_sub_chan *umidi_sub_by_fifo(struct usb_fifo *); static void umidi_start_read(struct usb_fifo *); @@ -827,6 +837,33 @@ static const STRUCT_USB_HOST_ID __used uaudio_devs[] = USB_IFACE_SUBCLASS(UISUBCLASS_MIDISTREAM),}, }; +static unsigned +uaudio_get_child_index_by_dev(struct uaudio_softc *sc, device_t dev) +{ + unsigned i; + + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + if (dev == sc->sc_child[i].pcm_device) + return (i); + } + panic("uaudio_get_child_index_dev: Invalid device: %p\n", dev); + return (0); +} + +static unsigned +uaudio_get_child_index_by_chan(struct uaudio_softc *sc, struct uaudio_chan *ch) +{ + unsigned i; + + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + if ((sc->sc_play_chan + i) == ch || + (sc->sc_rec_chan + i) == ch) + return (i); + } + panic("uaudio_get_child_index_by_chan: Invalid chan: %p\n", ch); + return (0); +} + static int uaudio_probe(device_t dev) { @@ -915,10 +952,8 @@ uaudio_attach(device_t dev) struct uaudio_softc *sc = device_get_softc(dev); struct usb_interface_descriptor *id; usb_error_t err; - device_t child; + unsigned i; - sc->sc_play_chan.priv_sc = sc; - sc->sc_rec_chan.priv_sc = sc; sc->sc_udev = uaa->device; sc->sc_mixer_iface_index = uaa->info.bIfaceIndex; sc->sc_mixer_iface_no = uaa->info.bIfaceNum; @@ -976,57 +1011,63 @@ uaudio_attach(device_t dev) DPRINTF("%d mixer controls\n", sc->sc_mixer_count); - if (sc->sc_play_chan.num_alt > 0) { + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { uint8_t x; + if (sc->sc_play_chan[i].num_alt <= 0) + break; + /* * Need to set a default alternate interface, else * some USB audio devices might go into an infinte * re-enumeration loop: */ err = usbd_set_alt_interface_index(sc->sc_udev, - sc->sc_play_chan.usb_alt[0].iface_index, - sc->sc_play_chan.usb_alt[0].iface_alt_index); + sc->sc_play_chan[i].usb_alt[0].iface_index, + sc->sc_play_chan[i].usb_alt[0].iface_alt_index); if (err) { DPRINTF("setting of alternate index failed: %s!\n", usbd_errstr(err)); } - for (x = 0; x != sc->sc_play_chan.num_alt; x++) { - device_printf(dev, "Play: %d Hz, %d ch, %s format, " - "2x8ms buffer.\n", - sc->sc_play_chan.usb_alt[x].sample_rate, - sc->sc_play_chan.usb_alt[x].channels, - sc->sc_play_chan.usb_alt[x].p_fmt->description); + for (x = 0; x != sc->sc_play_chan[i].num_alt; x++) { + device_printf(dev, "Play[%u]: %d Hz, %d ch, %s format, " + "2x8ms buffer.\n", i, + sc->sc_play_chan[i].usb_alt[x].sample_rate, + sc->sc_play_chan[i].usb_alt[x].channels, + sc->sc_play_chan[i].usb_alt[x].p_fmt->description); } - } else { - device_printf(dev, "No playback.\n"); } + if (i == 0) + device_printf(dev, "No playback.\n"); - if (sc->sc_rec_chan.num_alt > 0) { + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { uint8_t x; + if (sc->sc_rec_chan[i].num_alt <= 0) + break; + /* * Need to set a default alternate interface, else * some USB audio devices might go into an infinte * re-enumeration loop: */ err = usbd_set_alt_interface_index(sc->sc_udev, - sc->sc_rec_chan.usb_alt[0].iface_index, - sc->sc_rec_chan.usb_alt[0].iface_alt_index); + sc->sc_rec_chan[i].usb_alt[0].iface_index, + sc->sc_rec_chan[i].usb_alt[0].iface_alt_index); if (err) { DPRINTF("setting of alternate index failed: %s!\n", usbd_errstr(err)); } - for (x = 0; x != sc->sc_rec_chan.num_alt; x++) { - device_printf(dev, "Record: %d Hz, %d ch, %s format, " - "2x8ms buffer.\n", - sc->sc_rec_chan.usb_alt[x].sample_rate, - sc->sc_rec_chan.usb_alt[x].channels, - sc->sc_rec_chan.usb_alt[x].p_fmt->description); + for (x = 0; x != sc->sc_rec_chan[i].num_alt; x++) { + device_printf(dev, "Record[%u]: %d Hz, %d ch, %s format, " + "2x8ms buffer.\n", i, + sc->sc_rec_chan[i].usb_alt[x].sample_rate, + sc->sc_rec_chan[i].usb_alt[x].channels, + sc->sc_rec_chan[i].usb_alt[x].p_fmt->description); } - } else { - device_printf(dev, "No recording.\n"); } + if (i == 0) + device_printf(dev, "No recording.\n"); if (sc->sc_midi_chan.valid == 0) { if (usbd_lookup_id_by_uaa(uaudio_vendor_midi, @@ -1058,16 +1099,20 @@ uaudio_attach(device_t dev) * Only attach a PCM device if we have a playback, recording * or mixer device present: */ - if (sc->sc_play_chan.num_alt > 0 || - sc->sc_rec_chan.num_alt > 0 || - sc->sc_mix_info) { - child = device_add_child(dev, "pcm", -1); + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + if (sc->sc_play_chan[i].num_alt <= 0 && + sc->sc_rec_chan[i].num_alt <= 0 && + sc->sc_child[i].mix_info == 0) + continue; + sc->sc_child[i].pcm_device = + device_add_child(dev, "pcm", -1); - if (child == NULL) { + if (sc->sc_child[i].pcm_device == NULL) { DPRINTF("out of memory\n"); goto detach; } - device_set_ivars(child, &sc->sc_sndcard_func); + device_set_ivars(sc->sc_child[i].pcm_device, + &sc->sc_sndcard_func); } if (bus_generic_attach(dev)) { @@ -1106,16 +1151,17 @@ int uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_class) { struct uaudio_softc *sc = device_get_softc(device_get_parent(dev)); + unsigned i = uaudio_get_child_index_by_dev(sc, dev); char status[SND_STATUSLEN]; - uaudio_mixer_init(sc); + uaudio_mixer_init(sc, i); if (sc->sc_uq_audio_swap_lr) { DPRINTF("hardware has swapped left and right\n"); /* uaudio_pcm_setflags(dev, SD_F_PSWAPLR); */ } - if (sc->sc_play_chan.num_alt > 0 && - (sc->sc_mix_info & SOUND_MASK_PCM) == 0) { + if (sc->sc_play_chan[i].num_alt > 0 && + (sc->sc_child[i].mix_info & SOUND_MASK_PCM) == 0) { DPRINTF("emulating master volume\n"); @@ -1131,34 +1177,39 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_cla } if (mixer_init(dev, mixer_class, sc)) goto detach; - sc->sc_mixer_init = 1; + sc->sc_child[i].mixer_init = 1; mixer_hwvol_init(dev); snprintf(status, sizeof(status), "at ? %s", PCM_KLDSTRING(snd_uaudio)); if (pcm_register(dev, sc, - (sc->sc_play_chan.num_alt > 0) ? 1 : 0, - (sc->sc_rec_chan.num_alt > 0) ? 1 : 0)) { + (sc->sc_play_chan[i].num_alt > 0) ? 1 : 0, + (sc->sc_rec_chan[i].num_alt > 0) ? 1 : 0)) { goto detach; } uaudio_pcm_setflags(dev, SD_F_MPSAFE); - sc->sc_pcm_registered = 1; + sc->sc_child[i].pcm_registered = 1; - if (sc->sc_play_chan.num_alt > 0) { - pcm_addchan(dev, PCMDIR_PLAY, chan_class, sc); + if (sc->sc_play_chan[i].num_alt > 0) { + sc->sc_play_chan[i].priv_sc = sc; + pcm_addchan(dev, PCMDIR_PLAY, chan_class, + &sc->sc_play_chan[i]); } - if (sc->sc_rec_chan.num_alt > 0) { - pcm_addchan(dev, PCMDIR_REC, chan_class, sc); + + if (sc->sc_rec_chan[i].num_alt > 0) { + sc->sc_rec_chan[i].priv_sc = sc; + pcm_addchan(dev, PCMDIR_REC, chan_class, + &sc->sc_rec_chan[i]); } pcm_setstatus(dev, status); - uaudio_mixer_register_sysctl(sc, dev); + uaudio_mixer_register_sysctl(sc, dev, i); SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan.feedback_rate, + "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan[i].feedback_rate, 0, "Feedback sample rate in Hz"); return (0); /* success */ @@ -1172,18 +1223,15 @@ int uaudio_detach_sub(device_t dev) { struct uaudio_softc *sc = device_get_softc(device_get_parent(dev)); + unsigned i = uaudio_get_child_index_by_dev(sc, dev); int error = 0; - /* disable S/PDIF output, if any */ - (void) sc->sc_set_spdif_fn(sc, 0); - repeat: - if (sc->sc_pcm_registered) { + if (sc->sc_child[i].pcm_registered) { error = pcm_unregister(dev); } else { - if (sc->sc_mixer_init) { + if (sc->sc_child[i].mixer_init) error = mixer_uninit(dev); - } } if (error) { @@ -1198,6 +1246,7 @@ static int uaudio_detach(device_t dev) { struct uaudio_softc *sc = device_get_softc(dev); + unsigned i; /* * Stop USB transfers early so that any audio applications @@ -1205,14 +1254,18 @@ uaudio_detach(device_t dev) * any. */ usb_proc_explore_lock(sc->sc_udev); - sc->sc_play_chan.operation = CHAN_OP_DRAIN; - sc->sc_rec_chan.operation = CHAN_OP_DRAIN; + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + sc->sc_play_chan[i].operation = CHAN_OP_DRAIN; + sc->sc_rec_chan[i].operation = CHAN_OP_DRAIN; + } usb_proc_explore_mwait(sc->sc_udev, &sc->sc_config_msg[0], &sc->sc_config_msg[1]); usb_proc_explore_unlock(sc->sc_udev); - usbd_transfer_unsetup(sc->sc_play_chan.xfer, UAUDIO_NCHANBUFS + 1); - usbd_transfer_unsetup(sc->sc_rec_chan.xfer, UAUDIO_NCHANBUFS + 1); + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + usbd_transfer_unsetup(sc->sc_play_chan[i].xfer, UAUDIO_NCHANBUFS + 1); + usbd_transfer_unsetup(sc->sc_rec_chan[i].xfer, UAUDIO_NCHANBUFS + 1); + } uaudio_hid_detach(sc); @@ -1228,6 +1281,9 @@ uaudio_detach(device_t dev) uaudio_mixer_ctl_free(sc); + /* disable S/PDIF output, if any */ + (void) sc->sc_set_spdif_fn(sc, 0); + return (0); } @@ -1418,10 +1474,13 @@ static void uaudio_configure_msg(struct usb_proc_msg *pm) { struct uaudio_softc *sc = ((struct uaudio_configure_msg *)pm)->sc; + unsigned i; usb_proc_explore_unlock(sc->sc_udev); - uaudio_configure_msg_sub(sc, &sc->sc_play_chan, PCMDIR_PLAY); - uaudio_configure_msg_sub(sc, &sc->sc_rec_chan, PCMDIR_REC); + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + uaudio_configure_msg_sub(sc, &sc->sc_play_chan[i], PCMDIR_PLAY); + uaudio_configure_msg_sub(sc, &sc->sc_rec_chan[i], PCMDIR_REC); + } usb_proc_explore_lock(sc->sc_udev); } @@ -1587,6 +1646,22 @@ uaudio20_check_rate(struct usb_device *udev, uint8_t i return (USB_ERR_INVAL); } +static struct uaudio_chan * +uaudio_get_chan(struct uaudio_softc *sc, struct uaudio_chan *chan, + uint8_t iface_index) +{ + unsigned i; + + for (i = 0; i != UAUDIO_MAX_CHILD; i++, chan++) { + if (chan->num_alt == 0) { + chan->iface_index = iface_index; + return (chan); + } else if (chan->iface_index == iface_index) + return (chan); + } + return (NULL); +} + static void uaudio_chan_fill_info_sub(struct uaudio_softc *sc, struct usb_device *udev, uint32_t rate, uint8_t channels, uint8_t bit_resolution) @@ -1894,8 +1969,12 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } - chan = (ep_dir == UE_DIR_IN) ? - &sc->sc_rec_chan : &sc->sc_play_chan; + chan = uaudio_get_chan(sc, (ep_dir == UE_DIR_OUT) ? &sc->sc_play_chan[0] : + &sc->sc_rec_chan[0], curidx); + if (chan == NULL) { + DPRINTF("More than %d sub devices. (skipped)\n", UAUDIO_MAX_CHILD); + goto next_ep; + } if (usbd_get_iface(udev, curidx) == NULL) { DPRINTF("Interface is not valid\n"); @@ -1914,8 +1993,8 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str uaudio_chan_dump_ep_desc(ed1); #endif DPRINTF("Sample rate = %dHz, channels = %d, " - "bits = %d, format = %s\n", rate, channels, - bit_resolution, p_fmt->description); + "bits = %d, format = %s, ep 0x%02x, chan %p\n", rate, channels, + bit_resolution, p_fmt->description, ed1->bEndpointAddress, chan); chan_alt->sample_rate = rate; chan_alt->p_asf1d = asf1d; @@ -2099,12 +2178,15 @@ uaudio_chan_play_sync_callback(struct usb_xfer *xfer, uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; + unsigned i; int len; int actlen; int nframes; usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + i = uaudio_get_child_index_by_chan(ch->priv_sc, ch); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: @@ -2155,7 +2237,7 @@ uaudio_chan_play_sync_callback(struct usb_xfer *xfer, * Use feedback value as fallback when there is no * recording channel: */ - if (ch->priv_sc->sc_rec_chan.num_alt == 0) { + if (ch->priv_sc->sc_rec_chan[i].num_alt == 0) { int32_t jitter_max = howmany(sample_rate, 16000); /* @@ -2181,7 +2263,7 @@ uaudio_chan_play_sync_callback(struct usb_xfer *xfer, * source of jitter information to save some * isochronous bandwidth: */ - if (ch->priv_sc->sc_rec_chan.num_alt != 0 && + if (ch->priv_sc->sc_rec_chan[i].num_alt != 0 && uaudio_debug == 0) break; usbd_xfer_set_frames(xfer, 1); @@ -2212,6 +2294,7 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_e uint32_t blockcount; uint32_t n; uint32_t offset; + unsigned i; int sample_size; int actlen; int sumlen; @@ -2221,10 +2304,12 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_e return; } - /* check if there is a record channel */ - if (ch->priv_sc->sc_rec_chan.num_alt > 0) - ch_rec = &ch->priv_sc->sc_rec_chan; - else + i = uaudio_get_child_index_by_chan(ch->priv_sc, ch); + + /* check if there is a valid record channel */ + ch_rec = ch->priv_sc->sc_rec_chan + i; + + if (ch_rec->num_alt == 0) ch_rec = NULL; usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); @@ -2488,11 +2573,9 @@ tr_setup: } void * -uaudio_chan_init(struct uaudio_softc *sc, struct snd_dbuf *b, +uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, struct pcm_channel *c, int dir) { - struct uaudio_chan *ch = ((dir == PCMDIR_PLAY) ? - &sc->sc_play_chan : &sc->sc_rec_chan); uint32_t buf_size; uint8_t x; @@ -2683,36 +2766,36 @@ uaudio_chan_start_sub(struct uaudio_chan *ch) } static int -uaudio_chan_need_both(struct uaudio_softc *sc) +uaudio_chan_need_both(struct uaudio_chan *pchan, struct uaudio_chan *rchan) { - return (sc->sc_play_chan.num_alt > 0 && - sc->sc_play_chan.running != 0 && - uaudio_chan_is_async(&sc->sc_play_chan, - sc->sc_play_chan.set_alt) != 0 && - sc->sc_rec_chan.num_alt > 0 && - sc->sc_rec_chan.running == 0); + return (pchan->num_alt > 0 && + pchan->running != 0 && + uaudio_chan_is_async(pchan, pchan->set_alt) != 0 && + rchan->num_alt > 0 && + rchan->running == 0); } static int -uaudio_chan_need_none(struct uaudio_softc *sc) +uaudio_chan_need_none(struct uaudio_chan *pchan, struct uaudio_chan *rchan) { - return (sc->sc_play_chan.num_alt > 0 && - sc->sc_play_chan.running == 0 && - sc->sc_rec_chan.num_alt > 0 && - sc->sc_rec_chan.running == 0); + return (pchan->num_alt > 0 && + pchan->running == 0 && + rchan->num_alt > 0 && + rchan->running == 0); } void uaudio_chan_start(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; + unsigned i = uaudio_get_child_index_by_chan(sc, ch); /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); /* check if not running */ if (ch->running == 0) { - uint32_t temp; + uint32_t temp; /* get current buffer size */ temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); @@ -2725,13 +2808,15 @@ uaudio_chan_start(struct uaudio_chan *ch) ch->end = ch->buf + temp; ch->cur = ch->buf; - if (uaudio_chan_need_both(sc)) { + if (uaudio_chan_need_both( + &sc->sc_play_chan[i], + &sc->sc_rec_chan[i])) { /* * Start both endpoints because of need for * jitter information: */ - uaudio_chan_start_sub(&sc->sc_rec_chan); - uaudio_chan_start_sub(&sc->sc_play_chan); + uaudio_chan_start_sub(&sc->sc_rec_chan[i]); + uaudio_chan_start_sub(&sc->sc_play_chan[i]); } else { uaudio_chan_start_sub(ch); } @@ -2769,6 +2854,7 @@ void uaudio_chan_stop(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; + unsigned i = uaudio_get_child_index_by_chan(sc, ch); /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); @@ -2778,18 +2864,22 @@ uaudio_chan_stop(struct uaudio_chan *ch) /* clear running flag */ ch->running = 0; - if (uaudio_chan_need_both(sc)) { + if (uaudio_chan_need_both( + &sc->sc_play_chan[i], + &sc->sc_rec_chan[i])) { /* * Leave the endpoints running because we need * information about jitter! */ - } else if (uaudio_chan_need_none(sc)) { + } else if (uaudio_chan_need_none( + &sc->sc_play_chan[i], + &sc->sc_rec_chan[i])) { /* * Stop both endpoints in case the one was used for * jitter information: */ - uaudio_chan_stop_sub(&sc->sc_rec_chan); - uaudio_chan_stop_sub(&sc->sc_play_chan); + uaudio_chan_stop_sub(&sc->sc_rec_chan[i]); + uaudio_chan_stop_sub(&sc->sc_play_chan[i]); } else { uaudio_chan_stop_sub(ch); } @@ -2816,12 +2906,12 @@ uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS) sc = (struct uaudio_softc *)oidp->oid_arg1; hint = oidp->oid_arg2; - if (sc->sc_mixer_lock == NULL) + if (sc->sc_child[0].mixer_lock == NULL) return (ENXIO); /* lookup mixer node */ - mtx_lock(sc->sc_mixer_lock); + mtx_lock(sc->sc_child[0].mixer_lock); for (pmc = sc->sc_mixer_root; pmc != NULL; pmc = pmc->next) { for (chan = 0; chan != (int)pmc->nchan; chan++) { if (pmc->wValue[chan] != -1 && @@ -2832,7 +2922,7 @@ uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS) } } found: - mtx_unlock(sc->sc_mixer_lock); + mtx_unlock(sc->sc_child[0].mixer_lock); error = sysctl_handle_int(oidp, &temp, 0, req); if (error != 0 || req->newptr == NULL) @@ -2840,7 +2930,7 @@ found: /* update mixer value */ - mtx_lock(sc->sc_mixer_lock); + mtx_lock(sc->sc_child[0].mixer_lock); if (pmc != NULL && temp >= pmc->minval && temp <= pmc->maxval) { @@ -2851,7 +2941,7 @@ found: /* start the transfer, if not already started */ usbd_transfer_start(sc->sc_mixer_xfer[0]); } - mtx_unlock(sc->sc_mixer_lock); + mtx_unlock(sc->sc_child[0].mixer_lock); return (0); } @@ -2868,7 +2958,8 @@ uaudio_mixer_ctl_free(struct uaudio_softc *sc) } static void -uaudio_mixer_register_sysctl(struct uaudio_softc *sc, device_t dev) +uaudio_mixer_register_sysctl(struct uaudio_softc *sc, device_t dev, + unsigned index) { struct uaudio_mixer_node *pmc; struct sysctl_oid *mixer_tree; @@ -2877,6 +2968,9 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, int chan; int n; + if (index != 0) + return; + mixer_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "mixer", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); @@ -3082,10 +3176,10 @@ uaudio_mixer_reload_all(struct uaudio_softc *sc) struct uaudio_mixer_node *pmc; int chan; - if (sc->sc_mixer_lock == NULL) + if (sc->sc_child[0].mixer_lock == NULL) return; - mtx_lock(sc->sc_mixer_lock); + mtx_lock(sc->sc_child[0].mixer_lock); for (pmc = sc->sc_mixer_root; pmc != NULL; pmc = pmc->next) { /* use reset defaults for non-oss controlled settings */ if (pmc->ctl == SOUND_MIXER_NRDEVICES) @@ -3097,7 +3191,7 @@ uaudio_mixer_reload_all(struct uaudio_softc *sc) /* start HID volume keys, if any */ usbd_transfer_start(sc->sc_hid.xfer[0]); - mtx_unlock(sc->sc_mixer_lock); + mtx_unlock(sc->sc_child[0].mixer_lock); } static void @@ -5291,11 +5385,13 @@ uaudio_mixer_ctl_set(struct uaudio_softc *sc, struct u } static void -uaudio_mixer_init(struct uaudio_softc *sc) +uaudio_mixer_init(struct uaudio_softc *sc, unsigned index) { struct uaudio_mixer_node *mc; int32_t i; + if (index != 0) + return; for (mc = sc->sc_mixer_root; mc; mc = mc->next) { if (mc->ctl != SOUND_MIXER_NRDEVICES) { @@ -5303,7 +5399,7 @@ uaudio_mixer_init(struct uaudio_softc *sc) * Set device mask bits. See * /usr/include/machine/soundcard.h */ - sc->sc_mix_info |= 1U << mc->ctl; + sc->sc_child[index].mix_info |= 1U << mc->ctl; } if ((mc->ctl == SOUND_MIXER_NRDEVICES) && (mc->type == MIX_SELECTOR)) { @@ -5311,7 +5407,7 @@ uaudio_mixer_init(struct uaudio_softc *sc) for (i = mc->minval; (i > 0) && (i <= mc->maxval); i++) { if (mc->slctrtype[i - 1] == SOUND_MIXER_NRDEVICES) continue; - sc->sc_recsrc_info |= 1U << mc->slctrtype[i - 1]; + sc->sc_child[index].recsrc_info |= 1U << mc->slctrtype[i - 1]; } } } @@ -5320,50 +5416,57 @@ uaudio_mixer_init(struct uaudio_softc *sc) int uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m) { - DPRINTF("\n"); + unsigned i = uaudio_get_child_index_by_dev(sc, mix_get_dev(m)); - sc->sc_mixer_lock = mixer_get_lock(m); - sc->sc_mixer_dev = m; + DPRINTF("child=%u\n", i); - if (usbd_transfer_setup(sc->sc_udev, &sc->sc_mixer_iface_index, + sc->sc_child[i].mixer_lock = mixer_get_lock(m); + sc->sc_child[i].mixer_dev = m; + + if (i == 0 && + usbd_transfer_setup(sc->sc_udev, &sc->sc_mixer_iface_index, sc->sc_mixer_xfer, uaudio_mixer_config, 1, sc, - sc->sc_mixer_lock)) { - DPRINTFN(0, "could not allocate USB " - "transfer for audio mixer!\n"); + sc->sc_child[i].mixer_lock)) { + DPRINTFN(0, "could not allocate USB transfer for mixer!\n"); return (ENOMEM); } - if (sc->sc_play_chan.num_alt > 0 && - (sc->sc_mix_info & SOUND_MASK_VOLUME) == 0) { + if (sc->sc_play_chan[i].num_alt > 0 && + (sc->sc_child[i].mix_info & SOUND_MASK_VOLUME) == 0) { mix_setparentchild(m, SOUND_MIXER_VOLUME, SOUND_MASK_PCM); mix_setrealdev(m, SOUND_MIXER_VOLUME, SOUND_MIXER_NONE); } - mix_setdevs(m, sc->sc_mix_info); - mix_setrecdevs(m, sc->sc_recsrc_info); + mix_setdevs(m, sc->sc_child[i].mix_info); + mix_setrecdevs(m, sc->sc_child[i].recsrc_info); return (0); } int -uaudio_mixer_uninit_sub(struct uaudio_softc *sc) +uaudio_mixer_uninit_sub(struct uaudio_softc *sc, struct snd_mixer *m) { - DPRINTF("\n"); + unsigned index = uaudio_get_child_index_by_dev(sc, mix_get_dev(m)); - usbd_transfer_unsetup(sc->sc_mixer_xfer, 1); + DPRINTF("child=%u\n", index); - sc->sc_mixer_lock = NULL; + if (index == 0) + usbd_transfer_unsetup(sc->sc_mixer_xfer, 1); + sc->sc_child[index].mixer_lock = NULL; + return (0); } void -uaudio_mixer_set(struct uaudio_softc *sc, unsigned type, - unsigned left, unsigned right) +uaudio_mixer_set(struct uaudio_softc *sc, struct snd_mixer *m, + unsigned type, unsigned left, unsigned right) { + unsigned index = uaudio_get_child_index_by_dev(sc, mix_get_dev(m)); struct uaudio_mixer_node *mc; int chan; + if (index != 0) + return; for (mc = sc->sc_mixer_root; mc != NULL; mc = mc->next) { - if (mc->ctl == type) { for (chan = 0; chan < mc->nchan; chan++) { uaudio_mixer_ctl_set(sc, mc, chan, @@ -5374,13 +5477,16 @@ uaudio_mixer_set(struct uaudio_softc *sc, unsigned typ } uint32_t -uaudio_mixer_setrecsrc(struct uaudio_softc *sc, uint32_t src) +uaudio_mixer_setrecsrc(struct uaudio_softc *sc, struct snd_mixer *m, uint32_t src) { + unsigned index = uaudio_get_child_index_by_dev(sc, mix_get_dev(m)); struct uaudio_mixer_node *mc; uint32_t mask; uint32_t temp; int32_t i; + if (index != 0) + return (0); for (mc = sc->sc_mixer_root; mc; mc = mc->next) { if ((mc->ctl == SOUND_MIXER_NRDEVICES) && @@ -6008,7 +6114,7 @@ uaudio_hid_rx_callback(struct usb_xfer *xfer, usb_erro id = 0; } - m = sc->sc_mixer_dev; + m = sc->sc_child[0].mixer_dev; if ((sc->sc_hid.flags & UAUDIO_HID_HAS_MUTE) && (sc->sc_hid.mute_id == id) && @@ -6073,7 +6179,7 @@ uaudio_hid_probe(struct uaudio_softc *sc, if (!(sc->sc_hid.flags & UAUDIO_HID_VALID)) return (-1); - if (sc->sc_mixer_lock == NULL) + if (sc->sc_child[0].mixer_lock == NULL) return (-1); /* Get HID descriptor */ @@ -6134,7 +6240,7 @@ uaudio_hid_probe(struct uaudio_softc *sc, /* allocate USB transfers */ error = usbd_transfer_setup(uaa->device, &sc->sc_hid.iface_index, sc->sc_hid.xfer, uaudio_hid_config, UAUDIO_HID_N_TRANSFER, - sc, sc->sc_mixer_lock); + sc, sc->sc_child[0].mixer_lock); if (error) { DPRINTF("error=%s\n", usbd_errstr(error)); return (-1); Modified: head/sys/dev/sound/usb/uaudio.h ============================================================================== --- head/sys/dev/sound/usb/uaudio.h Mon Mar 30 16:32:55 2020 (r359445) +++ head/sys/dev/sound/usb/uaudio.h Mon Mar 30 16:50:32 2020 (r359446) @@ -41,7 +41,7 @@ struct pcm_channel; extern int uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_class); extern int uaudio_detach_sub(device_t dev); -extern void *uaudio_chan_init(struct uaudio_softc *sc, struct snd_dbuf *b, +extern void *uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, struct pcm_channel *c, int dir); extern int uaudio_chan_free(struct uaudio_chan *ch); extern int uaudio_chan_set_param_blocksize(struct uaudio_chan *ch, @@ -58,12 +58,12 @@ extern int uaudio_chan_set_param_format(struct uaudio_ uint32_t format); extern void uaudio_chan_start(struct uaudio_chan *ch); extern void uaudio_chan_stop(struct uaudio_chan *ch); -extern int uaudio_mixer_init_sub(struct uaudio_softc *sc, - struct snd_mixer *m); -extern int uaudio_mixer_uninit_sub(struct uaudio_softc *sc); -extern void uaudio_mixer_set(struct uaudio_softc *sc, unsigned type, - unsigned left, unsigned right); -extern uint32_t uaudio_mixer_setrecsrc(struct uaudio_softc *sc, uint32_t src); +extern int uaudio_mixer_init_sub(struct uaudio_softc *, struct snd_mixer *); +extern int uaudio_mixer_uninit_sub(struct uaudio_softc *, struct snd_mixer *); +extern void uaudio_mixer_set(struct uaudio_softc *, struct snd_mixer *, + unsigned type, unsigned left, unsigned right); +extern uint32_t uaudio_mixer_setrecsrc(struct uaudio_softc *, struct snd_mixer *, + uint32_t src); int uaudio_get_vendor(device_t dev); int uaudio_get_product(device_t dev); Modified: head/sys/dev/sound/usb/uaudio_pcm.c ============================================================================== --- head/sys/dev/sound/usb/uaudio_pcm.c Mon Mar 30 16:32:55 2020 (r359445) +++ head/sys/dev/sound/usb/uaudio_pcm.c Mon Mar 30 16:50:32 2020 (r359446) @@ -146,7 +146,7 @@ ua_mixer_set(struct snd_mixer *m, unsigned type, unsig do_unlock = 1; mtx_lock(mtx); } - uaudio_mixer_set(mix_getdevinfo(m), type, left, right); + uaudio_mixer_set(mix_getdevinfo(m), m, type, left, right); if (do_unlock) { mtx_unlock(mtx); } @@ -166,7 +166,7 @@ ua_mixer_setrecsrc(struct snd_mixer *m, uint32_t src) do_unlock = 1; mtx_lock(mtx); } - retval = uaudio_mixer_setrecsrc(mix_getdevinfo(m), src); + retval = uaudio_mixer_setrecsrc(mix_getdevinfo(m), m, src); if (do_unlock) { mtx_unlock(mtx); } @@ -176,7 +176,7 @@ ua_mixer_setrecsrc(struct snd_mixer *m, uint32_t src) static int ua_mixer_uninit(struct snd_mixer *m) { - return (uaudio_mixer_uninit_sub(mix_getdevinfo(m))); + return (uaudio_mixer_uninit_sub(mix_getdevinfo(m), m)); } static kobj_method_t ua_mixer_methods[] = { From owner-svn-src-head@freebsd.org Mon Mar 30 17:45:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6855261AE2; Mon, 30 Mar 2020 17:45:48 +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 48rfy24rHrz3Kpm; Mon, 30 Mar 2020 17:45:46 +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 0DCA120426; Mon, 30 Mar 2020 17:38:14 +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 02UHcDBj076921; Mon, 30 Mar 2020 17:38:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UHcD0I076920; Mon, 30 Mar 2020 17:38:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003301738.02UHcD0I076920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 17:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359449 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 359449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 17:45:49 -0000 Author: emaste Date: Mon Mar 30 17:38:13 2020 New Revision: 359449 URL: https://svnweb.freebsd.org/changeset/base/359449 Log: correct 'disble' typo in hccontrol PR: 245125 Submitted by: Marc Veldman MFC after: 1 week Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Mon Mar 30 17:11:21 2020 (r359448) +++ head/usr.sbin/bluetooth/hccontrol/le.c Mon Mar 30 17:38:13 2020 (r359449) @@ -306,7 +306,7 @@ int le_enable(int s, int argc, char *argv[]) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT | NG_HCI_EVENT_MASK_LE); set_le_event_mask(s, NG_HCI_LE_EVENT_MASK_ALL); - } else if (strcasecmp(argv[0], "disble") == 0) + } else if (strcasecmp(argv[0], "disable") == 0) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT); else return USAGE; From owner-svn-src-head@freebsd.org Mon Mar 30 18:15:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EBA12626D5; Mon, 30 Mar 2020 18:15:44 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rgcb35tJz41fZ; Mon, 30 Mar 2020 18:15:43 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BF6020F9D; Mon, 30 Mar 2020 18:15:37 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UIFaJi001194; Mon, 30 Mar 2020 18:15:36 GMT (envelope-from csjp@FreeBSD.org) Received: (from csjp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UIFaS2001193; Mon, 30 Mar 2020 18:15:36 GMT (envelope-from csjp@FreeBSD.org) Message-Id: <202003301815.02UIFaS2001193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: csjp set sender to csjp@FreeBSD.org using -f From: "Christian S.J. Peron" Date: Mon, 30 Mar 2020 18:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359450 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: csjp X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 359450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 18:15:44 -0000 Author: csjp Date: Mon Mar 30 18:15:36 2020 New Revision: 359450 URL: https://svnweb.freebsd.org/changeset/base/359450 Log: Make sure we convert internal audit records for thr_new into BSM records. MFC after: 2 weeks Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Mon Mar 30 17:38:13 2020 (r359449) +++ head/sys/security/audit/audit_bsm.c Mon Mar 30 18:15:36 2020 (r359450) @@ -1746,6 +1746,9 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_CAP_GETMODE: break; + case AUE_THR_NEW: + break; + case AUE_NULL: default: printf("BSM conversion requested for unknown event %d\n", From owner-svn-src-head@freebsd.org Mon Mar 30 18:24:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78526262B76; Mon, 30 Mar 2020 18:24: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 48rgpR6nWnz44bG; Mon, 30 Mar 2020 18:24:15 +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 EDD722118F; Mon, 30 Mar 2020 18:24:07 +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 02UIO7g5007269; Mon, 30 Mar 2020 18:24:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UIO7q6007268; Mon, 30 Mar 2020 18:24:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003301824.02UIO7q6007268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 18:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359451 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 18:24:17 -0000 Author: emaste Date: Mon Mar 30 18:24:07 2020 New Revision: 359451 URL: https://svnweb.freebsd.org/changeset/base/359451 Log: capabilities.conf: provide information about capmode permitted syscalls Reviewed by: jhb (earlier) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24118 Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Mon Mar 30 18:15:36 2020 (r359450) +++ head/sys/kern/capabilities.conf Mon Mar 30 18:24:07 2020 (r359451) @@ -28,6 +28,11 @@ ## ## List of system calls enabled in capability mode, one name per line. ## +## System calls listed here operate either fully or partially in the absence +## of global namespaces or ambient authority. In capability mode system calls +## that operate only on global namespaces or require ambient authority have no +## utility and thus are not permitted. +## ## Notes: ## - sys_exit(2), abort2(2) and close(2) are very important. ## - Sorted alphabetically, please keep it that way. From owner-svn-src-head@freebsd.org Mon Mar 30 18:25:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AE1A262C64; Mon, 30 Mar 2020 18:25:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rgrG2ymNz458q; Mon, 30 Mar 2020 18:25:50 +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 8F92721198; Mon, 30 Mar 2020 18:25:43 +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 02UIPhBB007439; Mon, 30 Mar 2020 18:25:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UIPhOL007438; Mon, 30 Mar 2020 18:25:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003301825.02UIPhOL007438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Mar 2020 18:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359452 - head/sys/fs/cuse X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/fs/cuse X-SVN-Commit-Revision: 359452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 18:25:52 -0000 Author: hselasky Date: Mon Mar 30 18:25:43 2020 New Revision: 359452 URL: https://svnweb.freebsd.org/changeset/base/359452 Log: Fine grain locking inside the cuse(3) kernel module. Implement one mutex per cuse(3) server instance which also cover the clients belonging to the given server instance. This should significantly reduce the mutex congestion inside the cuse(3) kernel module when multiple servers are in use. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Mon Mar 30 18:24:07 2020 (r359451) +++ head/sys/fs/cuse/cuse.c Mon Mar 30 18:25:43 2020 (r359452) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2010-2017 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2010-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -114,6 +114,7 @@ struct cuse_server { TAILQ_HEAD(, cuse_server_dev) hdev; TAILQ_HEAD(, cuse_client) hcli; TAILQ_HEAD(, cuse_memory) hmem; + struct mtx mtx; struct cv cv; struct selinfo selinfo; pid_t pid; @@ -145,7 +146,7 @@ struct cuse_client { static MALLOC_DEFINE(M_CUSE, "cuse", "CUSE memory"); static TAILQ_HEAD(, cuse_server) cuse_server_head; -static struct mtx cuse_mtx; +static struct mtx cuse_global_mtx; static struct cdev *cuse_dev; static struct cuse_server *cuse_alloc_unit[CUSE_DEVICES_MAX]; static int cuse_alloc_unit_id[CUSE_DEVICES_MAX]; @@ -216,18 +217,30 @@ static void cuse_client_is_closing(struct cuse_client static int cuse_free_unit_by_id_locked(struct cuse_server *, int); static void -cuse_lock(void) +cuse_global_lock(void) { - mtx_lock(&cuse_mtx); + mtx_lock(&cuse_global_mtx); } static void -cuse_unlock(void) +cuse_global_unlock(void) { - mtx_unlock(&cuse_mtx); + mtx_unlock(&cuse_global_mtx); } static void +cuse_server_lock(struct cuse_server *pcs) +{ + mtx_lock(&pcs->mtx); +} + +static void +cuse_server_unlock(struct cuse_server *pcs) +{ + mtx_unlock(&pcs->mtx); +} + +static void cuse_cmd_lock(struct cuse_client_command *pccmd) { sx_xlock(&pccmd->sx); @@ -244,7 +257,7 @@ cuse_kern_init(void *arg) { TAILQ_INIT(&cuse_server_head); - mtx_init(&cuse_mtx, "cuse-mtx", NULL, MTX_DEF); + mtx_init(&cuse_global_mtx, "cuse-global-mtx", NULL, MTX_DEF); cuse_dev = make_dev(&cuse_server_devsw, 0, UID_ROOT, GID_OPERATOR, 0600, "cuse"); @@ -267,9 +280,9 @@ cuse_kern_uninit(void *arg) pause("DRAIN", 2 * hz); - cuse_lock(); + cuse_global_lock(); ptr = TAILQ_FIRST(&cuse_server_head); - cuse_unlock(); + cuse_global_unlock(); if (ptr == NULL) break; @@ -278,7 +291,7 @@ cuse_kern_uninit(void *arg) if (cuse_dev != NULL) destroy_dev(cuse_dev); - mtx_destroy(&cuse_mtx); + mtx_destroy(&cuse_global_mtx); } SYSUNINIT(cuse_kern_uninit, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_uninit, 0); @@ -293,14 +306,10 @@ cuse_server_get(struct cuse_server **ppcs) *ppcs = NULL; return (error); } - /* check if closing */ - cuse_lock(); if (pcs->is_closing) { - cuse_unlock(); *ppcs = NULL; return (EINVAL); } - cuse_unlock(); *ppcs = pcs; return (0); } @@ -426,14 +435,14 @@ cuse_server_alloc_memory(struct cuse_server *pcs, uint goto error_0; } - cuse_lock(); + cuse_server_lock(pcs); /* check if allocation number already exists */ TAILQ_FOREACH(temp, &pcs->hmem, entry) { if (temp->alloc_nr == alloc_nr) break; } if (temp != NULL) { - cuse_unlock(); + cuse_server_unlock(pcs); error = EBUSY; goto error_1; } @@ -441,7 +450,7 @@ cuse_server_alloc_memory(struct cuse_server *pcs, uint mem->page_count = page_count; mem->alloc_nr = alloc_nr; TAILQ_INSERT_TAIL(&pcs->hmem, mem, entry); - cuse_unlock(); + cuse_server_unlock(pcs); return (0); @@ -457,17 +466,17 @@ cuse_server_free_memory(struct cuse_server *pcs, uint3 { struct cuse_memory *mem; - cuse_lock(); + cuse_server_lock(pcs); TAILQ_FOREACH(mem, &pcs->hmem, entry) { if (mem->alloc_nr == alloc_nr) break; } if (mem == NULL) { - cuse_unlock(); + cuse_server_unlock(pcs); return (EINVAL); } TAILQ_REMOVE(&pcs->hmem, mem, entry); - cuse_unlock(); + cuse_server_unlock(pcs); cuse_vm_memory_free(mem); @@ -486,14 +495,10 @@ cuse_client_get(struct cuse_client **ppcc) *ppcc = NULL; return (error); } - /* check if closing */ - cuse_lock(); if (CUSE_CLIENT_CLOSING(pcc) || pcc->server->is_closing) { - cuse_unlock(); *ppcc = NULL; return (EINVAL); } - cuse_unlock(); *ppcc = pcc; return (0); } @@ -578,28 +583,28 @@ static int cuse_client_receive_command_locked(struct cuse_client_command *pccmd, uint8_t *arg_ptr, uint32_t arg_len) { + struct cuse_server *pcs; int error; + pcs = pccmd->client->server; error = 0; pccmd->proc_curr = curthread->td_proc; - if (CUSE_CLIENT_CLOSING(pccmd->client) || - pccmd->client->server->is_closing) { + if (CUSE_CLIENT_CLOSING(pccmd->client) || pcs->is_closing) { error = CUSE_ERR_OTHER; goto done; } while (pccmd->command == CUSE_CMD_NONE) { if (error != 0) { - cv_wait(&pccmd->cv, &cuse_mtx); + cv_wait(&pccmd->cv, &pcs->mtx); } else { - error = cv_wait_sig(&pccmd->cv, &cuse_mtx); + error = cv_wait_sig(&pccmd->cv, &pcs->mtx); if (error != 0) cuse_client_got_signal(pccmd); } - if (CUSE_CLIENT_CLOSING(pccmd->client) || - pccmd->client->server->is_closing) { + if (CUSE_CLIENT_CLOSING(pccmd->client) || pcs->is_closing) { error = CUSE_ERR_OTHER; goto done; } @@ -616,7 +621,7 @@ done: pccmd->proc_curr = NULL; while (pccmd->proc_refs != 0) - cv_wait(&pccmd->cv, &cuse_mtx); + cv_wait(&pccmd->cv, &pcs->mtx); return (error); } @@ -635,7 +640,7 @@ cuse_server_free_dev(struct cuse_server_dev *pcsd) pcs = pcsd->server; /* prevent creation of more devices */ - cuse_lock(); + cuse_server_lock(pcs); if (pcsd->kern_dev != NULL) pcsd->kern_dev->si_drv1 = NULL; @@ -643,7 +648,7 @@ cuse_server_free_dev(struct cuse_server_dev *pcsd) if (pcc->server_dev == pcsd) cuse_client_is_closing(pcc); } - cuse_unlock(); + cuse_server_unlock(pcs); /* destroy device, if any */ if (pcsd->kern_dev != NULL) { @@ -659,43 +664,46 @@ cuse_server_unref(struct cuse_server *pcs) struct cuse_server_dev *pcsd; struct cuse_memory *mem; - cuse_lock(); - pcs->refs--; - if (pcs->refs != 0) { - cuse_unlock(); + cuse_server_lock(pcs); + if (--(pcs->refs) != 0) { + cuse_server_unlock(pcs); return; } cuse_server_is_closing(pcs); /* final client wakeup, if any */ cuse_server_wakeup_all_client_locked(pcs); + cuse_global_lock(); TAILQ_REMOVE(&cuse_server_head, pcs, entry); + cuse_global_unlock(); while ((pcsd = TAILQ_FIRST(&pcs->hdev)) != NULL) { TAILQ_REMOVE(&pcs->hdev, pcsd, entry); - cuse_unlock(); + cuse_server_unlock(pcs); cuse_server_free_dev(pcsd); - cuse_lock(); + cuse_server_lock(pcs); } cuse_free_unit_by_id_locked(pcs, -1); while ((mem = TAILQ_FIRST(&pcs->hmem)) != NULL) { TAILQ_REMOVE(&pcs->hmem, mem, entry); - cuse_unlock(); + cuse_server_unlock(pcs); cuse_vm_memory_free(mem); - cuse_lock(); + cuse_server_lock(pcs); } knlist_clear(&pcs->selinfo.si_note, 1); knlist_destroy(&pcs->selinfo.si_note); - cuse_unlock(); + cuse_server_unlock(pcs); seldrain(&pcs->selinfo); cv_destroy(&pcs->cv); + mtx_destroy(&pcs->mtx); + free(pcs, M_CUSE); } @@ -704,7 +712,7 @@ cuse_server_do_close(struct cuse_server *pcs) { int retval; - cuse_lock(); + cuse_server_lock(pcs); cuse_server_is_closing(pcs); /* final client wakeup, if any */ cuse_server_wakeup_all_client_locked(pcs); @@ -712,7 +720,7 @@ cuse_server_do_close(struct cuse_server *pcs) knlist_clear(&pcs->selinfo.si_note, 1); retval = pcs->refs; - cuse_unlock(); + cuse_server_unlock(pcs); return (retval); } @@ -758,12 +766,14 @@ cuse_server_open(struct cdev *dev, int fflags, int dev cv_init(&pcs->cv, "cuse-server-cv"); - knlist_init_mtx(&pcs->selinfo.si_note, &cuse_mtx); + mtx_init(&pcs->mtx, "cuse-server-mtx", NULL, MTX_DEF); - cuse_lock(); + knlist_init_mtx(&pcs->selinfo.si_note, &pcs->mtx); + + cuse_global_lock(); pcs->refs++; TAILQ_INSERT_TAIL(&cuse_server_head, pcs, entry); - cuse_unlock(); + cuse_global_unlock(); return (0); } @@ -792,7 +802,8 @@ cuse_server_write(struct cdev *dev, struct uio *uio, i } static int -cuse_server_ioctl_copy_locked(struct cuse_client_command *pccmd, +cuse_server_ioctl_copy_locked(struct cuse_server *pcs, + struct cuse_client_command *pccmd, struct cuse_data_chunk *pchk, int isread) { struct proc *p_proc; @@ -819,7 +830,7 @@ cuse_server_ioctl_copy_locked(struct cuse_client_comma pccmd->proc_refs++; - cuse_unlock(); + cuse_server_unlock(pcs); if (isread == 0) { error = copyin( @@ -833,7 +844,7 @@ cuse_server_ioctl_copy_locked(struct cuse_client_comma pchk->length); } - cuse_lock(); + cuse_server_lock(pcs); pccmd->proc_refs--; @@ -898,7 +909,8 @@ cuse_proc2proc_copy(struct proc *proc_s, vm_offset_t d } static int -cuse_server_data_copy_locked(struct cuse_client_command *pccmd, +cuse_server_data_copy_locked(struct cuse_server *pcs, + struct cuse_client_command *pccmd, struct cuse_data_chunk *pchk, int isread) { struct proc *p_proc; @@ -913,7 +925,7 @@ cuse_server_data_copy_locked(struct cuse_client_comman pccmd->proc_refs++; - cuse_unlock(); + cuse_server_unlock(pcs); if (isread == 0) { error = cuse_proc2proc_copy( @@ -927,7 +939,7 @@ cuse_server_data_copy_locked(struct cuse_client_comman pchk->length); } - cuse_lock(); + cuse_server_lock(pcs); pccmd->proc_refs--; @@ -1031,16 +1043,16 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, case CUSE_IOCTL_GET_COMMAND: pcmd = (void *)data; - cuse_lock(); + cuse_server_lock(pcs); while ((pccmd = TAILQ_FIRST(&pcs->head)) == NULL) { - error = cv_wait_sig(&pcs->cv, &cuse_mtx); + error = cv_wait_sig(&pcs->cv, &pcs->mtx); if (pcs->is_closing) error = ENXIO; if (error) { - cuse_unlock(); + cuse_server_unlock(pcs); return (error); } } @@ -1052,13 +1064,13 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, *pcmd = pccmd->sub; - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_SYNC_COMMAND: - cuse_lock(); + cuse_server_lock(pcs); while ((pccmd = cuse_server_find_command(pcs, curthread)) != NULL) { /* send sync command */ @@ -1069,16 +1081,16 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, /* signal peer, if any */ cv_signal(&pccmd->cv); } - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_ALLOC_UNIT: - cuse_lock(); + cuse_server_lock(pcs); n = cuse_alloc_unit_by_id_locked(pcs, CUSE_ID_DEFAULT(0)); - cuse_unlock(); + cuse_server_unlock(pcs); if (n < 0) error = ENOMEM; @@ -1092,9 +1104,9 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, n = (n & CUSE_ID_MASK); - cuse_lock(); + cuse_server_lock(pcs); n = cuse_alloc_unit_by_id_locked(pcs, n); - cuse_unlock(); + cuse_server_unlock(pcs); if (n < 0) error = ENOMEM; @@ -1108,18 +1120,18 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, n = CUSE_ID_DEFAULT(n); - cuse_lock(); + cuse_server_lock(pcs); error = cuse_free_unit_by_id_locked(pcs, n); - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_FREE_UNIT_BY_ID: n = *(int *)data; - cuse_lock(); + cuse_server_lock(pcs); error = cuse_free_unit_by_id_locked(pcs, n); - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_ALLOC_MEMORY: @@ -1150,7 +1162,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, case CUSE_IOCTL_GET_SIG: - cuse_lock(); + cuse_server_lock(pcs); pccmd = cuse_server_find_command(pcs, curthread); if (pccmd != NULL) { @@ -1159,7 +1171,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, } else { n = 0; } - cuse_unlock(); + cuse_server_unlock(pcs); *(int *)data = n; @@ -1167,7 +1179,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, case CUSE_IOCTL_SET_PFH: - cuse_lock(); + cuse_server_lock(pcs); pccmd = cuse_server_find_command(pcs, curthread); if (pccmd != NULL) { @@ -1178,7 +1190,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, } else { error = ENXIO; } - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_CREATE_DEV: @@ -1224,9 +1236,9 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, } pcsd->kern_dev->si_drv1 = pcsd; - cuse_lock(); + cuse_server_lock(pcs); TAILQ_INSERT_TAIL(&pcs->hdev, pcsd, entry); - cuse_unlock(); + cuse_server_unlock(pcs); break; @@ -1236,7 +1248,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, if (error) break; - cuse_lock(); + cuse_server_lock(pcs); error = EINVAL; @@ -1244,9 +1256,9 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, while (pcsd != NULL) { if (pcsd->user_dev == *(struct cuse_dev **)data) { TAILQ_REMOVE(&pcs->hdev, pcsd, entry); - cuse_unlock(); + cuse_server_unlock(pcs); cuse_server_free_dev(pcsd); - cuse_lock(); + cuse_server_lock(pcs); error = 0; pcsd = TAILQ_FIRST(&pcs->hdev); } else { @@ -1254,13 +1266,13 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, } } - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_WRITE_DATA: case CUSE_IOCTL_READ_DATA: - cuse_lock(); + cuse_server_lock(pcs); pchk = (struct cuse_data_chunk *)data; pccmd = cuse_server_find_command(pcs, curthread); @@ -1270,23 +1282,23 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, } else if (pchk->peer_ptr < CUSE_BUF_MIN_PTR) { error = EFAULT; /* NULL pointer */ } else if (pchk->peer_ptr < CUSE_BUF_MAX_PTR) { - error = cuse_server_ioctl_copy_locked(pccmd, + error = cuse_server_ioctl_copy_locked(pcs, pccmd, pchk, cmd == CUSE_IOCTL_READ_DATA); } else { - error = cuse_server_data_copy_locked(pccmd, + error = cuse_server_data_copy_locked(pcs, pccmd, pchk, cmd == CUSE_IOCTL_READ_DATA); } - cuse_unlock(); + cuse_server_unlock(pcs); break; case CUSE_IOCTL_SELWAKEUP: - cuse_lock(); + cuse_server_lock(pcs); /* * We don't know which direction caused the event. * Wakeup both! */ cuse_server_wakeup_all_client_locked(pcs); - cuse_unlock(); + cuse_server_unlock(pcs); break; default: @@ -1317,31 +1329,31 @@ cuse_server_mmap_single(struct cdev *dev, vm_ooffset_t if (error != 0) return (error); - cuse_lock(); + cuse_server_lock(pcs); /* lookup memory structure */ TAILQ_FOREACH(mem, &pcs->hmem, entry) { if (mem->alloc_nr == alloc_nr) break; } if (mem == NULL) { - cuse_unlock(); + cuse_server_unlock(pcs); return (ENOMEM); } /* verify page offset */ page_nr %= CUSE_ALLOC_PAGES_MAX; if (page_nr >= mem->page_count) { - cuse_unlock(); + cuse_server_unlock(pcs); return (ENXIO); } /* verify mmap size */ if ((size % PAGE_SIZE) != 0 || (size < PAGE_SIZE) || (size > ((mem->page_count - page_nr) * PAGE_SIZE))) { - cuse_unlock(); + cuse_server_unlock(pcs); return (EINVAL); } vm_object_reference(mem->object); *object = mem->object; - cuse_unlock(); + cuse_server_unlock(pcs); /* set new VM object offset to use */ *offset = page_nr * PAGE_SIZE; @@ -1361,10 +1373,12 @@ cuse_client_free(void *arg) struct cuse_server *pcs; int n; - cuse_lock(); + pcs = pcc->server; + + cuse_server_lock(pcs); cuse_client_is_closing(pcc); - TAILQ_REMOVE(&pcc->server->hcli, pcc, entry); - cuse_unlock(); + TAILQ_REMOVE(&pcs->hcli, pcc, entry); + cuse_server_unlock(pcs); for (n = 0; n != CUSE_CMD_MAX; n++) { @@ -1374,8 +1388,6 @@ cuse_client_free(void *arg) cv_destroy(&pccmd->cv); } - pcs = pcc->server; - free(pcc, M_CUSE); /* drop reference on server */ @@ -1393,11 +1405,12 @@ cuse_client_open(struct cdev *dev, int fflags, int dev int error; int n; - cuse_lock(); pcsd = dev->si_drv1; if (pcsd != NULL) { pcs = pcsd->server; pcd = pcsd->user_dev; + + cuse_server_lock(pcs); /* * Check that the refcount didn't wrap and that the * same process is not both client and server. This @@ -1408,17 +1421,14 @@ cuse_client_open(struct cdev *dev, int fflags, int dev if (pcs->refs < 0 || pcs->pid == curproc->p_pid) { /* overflow or wrong PID */ pcs->refs--; - pcsd = NULL; + cuse_server_unlock(pcs); + return (EINVAL); } + cuse_server_unlock(pcs); } else { - pcs = NULL; - pcd = NULL; + return (EINVAL); } - cuse_unlock(); - if (pcsd == NULL) - return (EINVAL); - pcc = malloc(sizeof(*pcc), M_CUSE, M_WAITOK | M_ZERO); if (pcc == NULL) { /* drop reference on server */ @@ -1448,7 +1458,7 @@ cuse_client_open(struct cdev *dev, int fflags, int dev cv_init(&pccmd->cv, "cuse-client-cv"); } - cuse_lock(); + cuse_server_lock(pcs); /* cuse_client_free() assumes that the client is listed somewhere! */ /* always enqueue */ @@ -1461,7 +1471,7 @@ cuse_client_open(struct cdev *dev, int fflags, int dev } else { error = 0; } - cuse_unlock(); + cuse_server_unlock(pcs); if (error) { devfs_clear_cdevpriv(); /* XXX bugfix */ @@ -1471,11 +1481,11 @@ cuse_client_open(struct cdev *dev, int fflags, int dev cuse_cmd_lock(pccmd); - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, 0, 0, pcc->fflags, 0); error = cuse_client_receive_command_locked(pccmd, 0, 0); - cuse_unlock(); + cuse_server_unlock(pcs); if (error < 0) { error = cuse_convert_error(error); @@ -1496,6 +1506,7 @@ cuse_client_close(struct cdev *dev, int fflag, int dev { struct cuse_client_command *pccmd; struct cuse_client *pcc; + struct cuse_server *pcs; int error; error = cuse_client_get(&pcc); @@ -1503,20 +1514,18 @@ cuse_client_close(struct cdev *dev, int fflag, int dev return (0); pccmd = &pcc->cmds[CUSE_CMD_CLOSE]; + pcs = pcc->server; cuse_cmd_lock(pccmd); - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, 0, 0, pcc->fflags, 0); error = cuse_client_receive_command_locked(pccmd, 0, 0); - cuse_unlock(); - cuse_cmd_unlock(pccmd); - cuse_lock(); cuse_client_is_closing(pcc); - cuse_unlock(); + cuse_server_unlock(pcs); return (0); } @@ -1524,21 +1533,22 @@ cuse_client_close(struct cdev *dev, int fflag, int dev static void cuse_client_kqfilter_poll(struct cdev *dev, struct cuse_client *pcc) { + struct cuse_server *pcs = pcc->server; int temp; - cuse_lock(); + cuse_server_lock(pcs); temp = (pcc->cflags & (CUSE_CLI_KNOTE_HAS_READ | CUSE_CLI_KNOTE_HAS_WRITE)); pcc->cflags &= ~(CUSE_CLI_KNOTE_NEED_READ | CUSE_CLI_KNOTE_NEED_WRITE); - cuse_unlock(); + cuse_server_unlock(pcs); if (temp != 0) { /* get the latest polling state from the server */ temp = cuse_client_poll(dev, POLLIN | POLLOUT, NULL); if (temp & (POLLIN | POLLOUT)) { - cuse_lock(); + cuse_server_lock(pcs); if (temp & POLLIN) pcc->cflags |= CUSE_CLI_KNOTE_NEED_READ; if (temp & POLLOUT) @@ -1546,7 +1556,7 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* make sure the "knote" gets woken up */ cuse_server_wakeup_locked(pcc->server); - cuse_unlock(); + cuse_server_unlock(pcs); } } } @@ -1556,6 +1566,7 @@ cuse_client_read(struct cdev *dev, struct uio *uio, in { struct cuse_client_command *pccmd; struct cuse_client *pcc; + struct cuse_server *pcs; int error; int len; @@ -1564,6 +1575,7 @@ cuse_client_read(struct cdev *dev, struct uio *uio, in return (error); pccmd = &pcc->cmds[CUSE_CMD_READ]; + pcs = pcc->server; if (uio->uio_segflg != UIO_USERSPACE) { return (EINVAL); @@ -1580,13 +1592,13 @@ cuse_client_read(struct cdev *dev, struct uio *uio, in } len = uio->uio_iov->iov_len; - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, (uintptr_t)uio->uio_iov->iov_base, (unsigned long)(unsigned int)len, pcc->fflags, ioflag); error = cuse_client_receive_command_locked(pccmd, 0, 0); - cuse_unlock(); + cuse_server_unlock(pcs); if (error < 0) { error = cuse_convert_error(error); @@ -1615,6 +1627,7 @@ cuse_client_write(struct cdev *dev, struct uio *uio, i { struct cuse_client_command *pccmd; struct cuse_client *pcc; + struct cuse_server *pcs; int error; int len; @@ -1623,6 +1636,7 @@ cuse_client_write(struct cdev *dev, struct uio *uio, i return (error); pccmd = &pcc->cmds[CUSE_CMD_WRITE]; + pcs = pcc->server; if (uio->uio_segflg != UIO_USERSPACE) { return (EINVAL); @@ -1639,13 +1653,13 @@ cuse_client_write(struct cdev *dev, struct uio *uio, i } len = uio->uio_iov->iov_len; - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, (uintptr_t)uio->uio_iov->iov_base, (unsigned long)(unsigned int)len, pcc->fflags, ioflag); error = cuse_client_receive_command_locked(pccmd, 0, 0); - cuse_unlock(); + cuse_server_unlock(pcs); if (error < 0) { error = cuse_convert_error(error); @@ -1675,6 +1689,7 @@ cuse_client_ioctl(struct cdev *dev, unsigned long cmd, { struct cuse_client_command *pccmd; struct cuse_client *pcc; + struct cuse_server *pcs; int error; int len; @@ -1687,6 +1702,7 @@ cuse_client_ioctl(struct cdev *dev, unsigned long cmd, return (ENOMEM); pccmd = &pcc->cmds[CUSE_CMD_IOCTL]; + pcs = pcc->server; cuse_cmd_lock(pccmd); @@ -1699,14 +1715,14 @@ cuse_client_ioctl(struct cdev *dev, unsigned long cmd, * is forwarded to the driver. */ - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, (len == 0) ? *(long *)data : CUSE_BUF_MIN_PTR, (unsigned long)cmd, pcc->fflags, (fflag & O_NONBLOCK) ? IO_NDELAY : 0); error = cuse_client_receive_command_locked(pccmd, data, len); - cuse_unlock(); + cuse_server_unlock(pcs); if (error < 0) { error = cuse_convert_error(error); @@ -1730,6 +1746,7 @@ cuse_client_poll(struct cdev *dev, int events, struct { struct cuse_client_command *pccmd; struct cuse_client *pcc; + struct cuse_server *pcs; unsigned long temp; int error; int revents; @@ -1739,6 +1756,7 @@ cuse_client_poll(struct cdev *dev, int events, struct goto pollnval; temp = 0; + pcs = pcc->server; if (events & (POLLPRI | POLLIN | POLLRDNORM)) temp |= CUSE_POLL_READ; @@ -1755,14 +1773,14 @@ cuse_client_poll(struct cdev *dev, int events, struct /* Need to selrecord() first to not loose any events. */ if (temp != 0 && td != NULL) - selrecord(td, &pcc->server->selinfo); + selrecord(td, &pcs->selinfo); - cuse_lock(); + cuse_server_lock(pcs); cuse_client_send_command_locked(pccmd, 0, temp, pcc->fflags, IO_NDELAY); error = cuse_client_receive_command_locked(pccmd, 0, 0); - cuse_unlock(); + cuse_server_unlock(pcs); cuse_cmd_unlock(pccmd); @@ -1793,37 +1811,40 @@ cuse_client_mmap_single(struct cdev *dev, vm_ooffset_t uint32_t alloc_nr = page_nr / CUSE_ALLOC_PAGES_MAX; struct cuse_memory *mem; struct cuse_client *pcc; + struct cuse_server *pcs; int error; error = cuse_client_get(&pcc); if (error != 0) return (error); - cuse_lock(); + pcs = pcc->server; + + cuse_server_lock(pcs); /* lookup memory structure */ - TAILQ_FOREACH(mem, &pcc->server->hmem, entry) { + TAILQ_FOREACH(mem, &pcs->hmem, entry) { if (mem->alloc_nr == alloc_nr) break; } if (mem == NULL) { - cuse_unlock(); + cuse_server_unlock(pcs); return (ENOMEM); } /* verify page offset */ page_nr %= CUSE_ALLOC_PAGES_MAX; if (page_nr >= mem->page_count) { - cuse_unlock(); + cuse_server_unlock(pcs); return (ENXIO); } /* verify mmap size */ if ((size % PAGE_SIZE) != 0 || (size < PAGE_SIZE) || (size > ((mem->page_count - page_nr) * PAGE_SIZE))) { - cuse_unlock(); + cuse_server_unlock(pcs); return (EINVAL); } vm_object_reference(mem->object); *object = mem->object; - cuse_unlock(); + cuse_server_unlock(pcs); /* set new VM object offset to use */ *offset = page_nr * PAGE_SIZE; @@ -1836,22 +1857,28 @@ static void cuse_client_kqfilter_read_detach(struct knote *kn) { struct cuse_client *pcc; + struct cuse_server *pcs; - cuse_lock(); pcc = kn->kn_hook; - knlist_remove(&pcc->server->selinfo.si_note, kn, 1); - cuse_unlock(); + pcs = pcc->server; + + cuse_server_lock(pcs); + knlist_remove(&pcs->selinfo.si_note, kn, 1); + cuse_server_unlock(pcs); } static void cuse_client_kqfilter_write_detach(struct knote *kn) { struct cuse_client *pcc; + struct cuse_server *pcs; - cuse_lock(); pcc = kn->kn_hook; - knlist_remove(&pcc->server->selinfo.si_note, kn, 1); - cuse_unlock(); + pcs = pcc->server; + + cuse_server_lock(pcs); + knlist_remove(&pcs->selinfo.si_note, kn, 1); + cuse_server_unlock(pcs); } static int @@ -1859,9 +1886,10 @@ cuse_client_kqfilter_read_event(struct knote *kn, long { struct cuse_client *pcc; - mtx_assert(&cuse_mtx, MA_OWNED); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Mar 30 18:43:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BDC92636FF; Mon, 30 Mar 2020 18:43:15 +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 48rhDL1K7Zz4CLc; Mon, 30 Mar 2020 18:43: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 23658215DD; Mon, 30 Mar 2020 18:43:06 +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 02UIh5nw019313; Mon, 30 Mar 2020 18:43:05 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UIh5ak019312; Mon, 30 Mar 2020 18:43:05 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003301843.02UIh5ak019312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 30 Mar 2020 18:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359453 - head/libexec/flua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/flua X-SVN-Commit-Revision: 359453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 18:43:15 -0000 Author: kevans Date: Mon Mar 30 18:43:05 2020 New Revision: 359453 URL: https://svnweb.freebsd.org/changeset/base/359453 Log: flua: enable readline bits, courtesy of libedit This is a nicer experience when attempting to run ad-hoc lua bits in the flua REPL. PR: 245121 MFC after: 1 week Modified: head/libexec/flua/Makefile Modified: head/libexec/flua/Makefile ============================================================================== --- head/libexec/flua/Makefile Mon Mar 30 18:25:43 2020 (r359452) +++ head/libexec/flua/Makefile Mon Mar 30 18:43:05 2020 (r359453) @@ -24,4 +24,9 @@ SRCS+= lfs.c lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" +# readline bits +CFLAGS+= -DLUA_USE_READLINE +CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit +LIBADD+= edit + .include From owner-svn-src-head@freebsd.org Mon Mar 30 19:10:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF60E264443; Mon, 30 Mar 2020 19:10:21 +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 48rhqd0BfKz4NBS; Mon, 30 Mar 2020 19:10:20 +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 5530621A21; Mon, 30 Mar 2020 19:10:13 +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 02UJACQA032136; Mon, 30 Mar 2020 19:10:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UJACTh032135; Mon, 30 Mar 2020 19:10:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003301910.02UJACTh032135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 19:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359454 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 19:10:22 -0000 Author: emaste Date: Mon Mar 30 19:10:12 2020 New Revision: 359454 URL: https://svnweb.freebsd.org/changeset/base/359454 Log: elf.5: table markup fixes Suggested by 0mp in review D23982. Submitted by: 0mp Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Mon Mar 30 18:43:05 2020 (r359453) +++ head/share/man/man5/elf.5 Mon Mar 30 19:10:12 2020 (r359454) @@ -1277,24 +1277,24 @@ This member specifies a constant addend used to comput stored into the relocatable field. .El .Ss Note Section -ELF note sections consist of entries with the following format. -.Bl -column -offset indent "Field" "Size" "Description" -.It Sy Field Ta Sy Size Ta Sy Description -.It namesz Ta 32 bits Ta Size of "name" -.It descsz Ta 32 bits Ta Size of "desc" -.It type Ta 32 bits Ta OS-dependent note type -.It name Ta namesz Ta Null-terminated originator name -.It desc Ta descsz Ta OS-dependent note data +ELF note sections consist of entries with the following format: +.Bl -column -offset indent "namesz" "32 bits" "Null-terminated originator name" +.Sy Field Ta Sy Size Ta Sy Description +.It Va namesz Ta 32 bits Ta Size of "name" +.It Va descsz Ta 32 bits Ta Size of "desc" +.It Va type Ta 32 bits Ta OS-dependent note type +.It Va name Ta Va namesz Ta Null-terminated originator name +.It Va desc Ta Va descsz Ta OS-dependent note data .El .Pp The -.Sy name +.Va name and -.Sy desc +.Va desc fields are padded to ensure 4-byte alignemnt. -.Sy namesz +.Va namesz and -.Sy descsz +.Va descsz specify the unpadded length. .Sh SEE ALSO .Xr as 1 , From owner-svn-src-head@freebsd.org Mon Mar 30 20:07:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4DE1266178; Mon, 30 Mar 2020 20:07:34 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rk5c1f4rz3Gnf; Mon, 30 Mar 2020 20:07:31 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D8BC22968; Mon, 30 Mar 2020 20:07:25 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UK7Pnl070369; Mon, 30 Mar 2020 20:07:25 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UK7Puf070368; Mon, 30 Mar 2020 20:07:25 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003302007.02UK7Puf070368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 30 Mar 2020 20:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359458 - head/share/vt/fonts X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/share/vt/fonts X-SVN-Commit-Revision: 359458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 20:07:36 -0000 Author: tsoome Date: Mon Mar 30 20:07:25 2020 New Revision: 359458 URL: https://svnweb.freebsd.org/changeset/base/359458 Log: gallant: pound sign (0xa3) is a bit broken. Add extra glyphs. I did add some more glyphs to provide box drawing and set of additional glyphs to provide better support for some code pages. Still does not quite match terminus. Modified: head/share/vt/fonts/gallant.hex Modified: head/share/vt/fonts/gallant.hex ============================================================================== --- head/share/vt/fonts/gallant.hex Mon Mar 30 20:05:09 2020 (r359457) +++ head/share/vt/fonts/gallant.hex Mon Mar 30 20:07:25 2020 (r359458) @@ -131,7 +131,7 @@ 007f:aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550 00a1:0000000000000600060000000000060006000600060006000600060006000600060006000000000000000000 00a2:00000000000001000100030002001f003780258064006c006800788039801f00100030002000200000000000 -00a3:000006000c00100010003000300030003e007c0018001800180018003f203fe031c000000000000000000000 +00a3:0000000000000f801cc018c01800180018007e007e0018001800180018003e207fe061c00000000000000000 00a4:00000000000000000000602077403b8011c030c030c038801dc02ee040600000000000000000000000000000 00a5:000000000000f07060203040188018800d0006003fc006003fc00600060006000f0000000000000000000000 00a6:0000000006000600060006000600060006000600060000000000060006000600060006000600060006000600 @@ -224,3 +224,282 @@ 00fd:00000000000003800f001c000000f0f0602030403040188018800d000d000600060004000c00080078007000 00fe:00000000e00060006000600060006f8071c060e06060606060606060604070807f006000600060006000f000 00ff:0000000000001980198000000000f0f0602030403040188018800d000d000600060004000c00080078007000 +0100:1f801f800000060006000b000b0009001180118010803fc020c0204040604060e0f000000000000000000000 +0101:0000000000000fc00fc0000000000f8018c010c003c01cc030c030c030c039c01ee000000000000000000000 +0102:1b001b000e00060006000b000b0009001180118010803fc020c0204040604060e0f000000000000000000000 +0103:000000000d800d800700000000000f8018c010c003c01cc030c030c030c039c01ee000000000000000000000 +0104:000000000000060006000b000b0009001180118010803fc020c0204040604060e0f000c00180030001e00000 +0105:00000000000000000000000000000f8018c010c003c01cc030c030c030c039c01ee000c00180030001e00000 +0106:030006000c000fc01060202020006000600060006000600060002000302018400f8000000000000000000000 +0107:000000000000030006000c0000001f8031c020c06000600060006000704030c01f8000000000000000000000 +0108:07000d8000000fc01060202020006000600060006000600060002000302018400f8000000000000000000000 +0109:0000000004000e001b00318000001f8031c020c06000600060006000704030c01f8000000000000000000000 +010a:0600060000000fc01060202020006000600060006000600060002000302018400f8000000000000000000000 +010b:00000000000000000600060000001f8031c020c06000600060006000704030c01f8000000000000000000000 +010c:18c00d8007000fc01060202020006000600060006000600060002000302018400f8000000000000000000000 +010d:0000000031801b000e00040000001f8031c020c06000600060006000704030c01f8000000000000000000000 +010e:31801b000e00ff0061c060c06060606060606060606060606060606060406180fe0000000000000000000000 +010f:31801b000e6004e00060006000600f6031e020e0606060606060606070e039601e7000000000000000000000 +0110:000000000000ff0061c060c0606060606060fc60606060606060606060406180fe0000000000000000000000 +0111:00000000006000e0006007f000600f6031e020e0606060606060606070e039601e7000000000000000000000 +0112:1f801f8000007fc0304030403000300030803f803080300030003000302030207fe000000000000000000000 +0113:0000000000001f801f80000000000f0030c0606060607fe060006000300018600f8000000000000000000000 +0114:0d800d8007007fc0304030403000300030803f803080300030003000302030207fe000000000000000000000 +0115:000000000d800d800700000000000f0030c0606060607fe060006000300018600f8000000000000000000000 +0116:0600060000007fc0304030403000300030803f803080300030003000302030207fe000000000000000000000 +0117:00000000000000000600060000000f0030c0606060607fe060006000300018600f8000000000000000000000 +0118:0000000000007fc0304030403000300030803f803080300030003000302030207fe000c00180030001e00000 +0119:00000000000000000000000000000f0030c0606060607fe060006000300018600f8006000c0018000f000000 +011a:18c00d8007007fc0304030403000300030803f803080300030003000302030207fe000000000000000000000 +011b:0000000018c00d800700020000000f0030c0606060607fe060006000300018600f8000000000000000000000 +011c:07000d8000000fc0106020202000600060006000600061f060602060306018600f8000000000000000000000 +011d:00000000020007000d8018c000001f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +011e:0d800d8007000fc0106020202000600060006000600061f060602060306018600f8000000000000000000000 +011f:000000001b001b000e00000000001f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +0120:0300030000000fc0106020202000600060006000600061f060602060306018600f8000000000000000000000 +0121:00000000000000000600060000001f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +0122:0000000000000fc0106020202000600060006000600061f060602060306018600f800600030001800f000000 +0123:0000000006000c000e000e0000001f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +0124:07000d800000f0f0606060606060606060607fe0606060606060606060606060f0f000000000000000000000 +0125:0000038016c03000700030003000378039c030c030c030c030c030c030c030c079e000000000000000000000 +0126:000000000000f0f060606060fff0606060607fe0606060606060606060606060f0f000000000000000000000 +0127:000000001000300070007e003000378039c030c030c030c030c030c030c030c079e000000000000000000000 +0128:0e401fc0138000001f80060006000600060006000600060006000600060006001f8000000000000000000000 +0129:000000001c803f802700000000001e00060006000600060006000600060006001f8000000000000000000000 +012a:1f801f8000001f800600060006000600060006000600060006000600060006001f8000000000000000000000 +012b:0000000000001f801f80000000001e00060006000600060006000600060006001f8000000000000000000000 +012c:198019800f001f800600060006000600060006000600060006000600060006001f8000000000000000000000 +012d:000000001b001b000e00000000001e00060006000600060006000600060006001f8000000000000000000000 +012e:0000000000001f800600060006000600060006000600060006000600060006001f8006000c0018000f000000 +012f:00000000000006000600000000001e00060006000600060006000600060006001f8006000c0018000f000000 +0130:0600060000001f800600060006000600060006000600060006000600060006001f8000000000000000000000 +0131:00000000000000000000000000001e00060006000600060006000600060006001f8000000000000000000000 +0132:00000000000078f030603060306030603060306030603060306030603060336079c000000000000000000000 +0133:000000000000306030600000000070e030603060306030603060306030603060786000600c600e4007c00380 +0134:0e001b0000001f80060006000600060006000600060006000600060006000600060006000600040038003000 +0135:00000000020007000d8018c0000003c000c000c000c000c000c000c000c000c000c020c030c038801f000e00 +0136:000000000000f0e06180630066006c00780078007c006e006700638061c060e0f0700600030001800f000000 +0137:000000006000e00060006000600061c0630066007c0078007c006e0067006380f1e00600030001800f000000 +0138:0000000000000000000000006000e1c0630066007c0078007c006e0067006380f1e000000000000000000000 +0139:0c001800300078003000300030003000300030003000300030003000302030207fe000000000000000000000 +013a:030006000c0000001e00060006000600060006000600060006000600060006001f8000000000000000000000 +013b:00000000000078003000300030003000300030003000300030003000302030207fe00600030001800f000000 +013c:000000001e0006000600060006000600060006000600060006000600060006001f800600030001800f000000 +013d:0c6006c0038079003000300030003000300030003000300030003000302030207fe000000000000000000000 +013e:18c00d80070000001e00060006000600060006000600060006000600060006001f8000000000000000000000 +013f:00000000000078003000300030003000318031803000300030003000302030207fe000000000000000000000 +0140:000000001e0006000600060006000600066006600600060006000600060006001f8000000000000000000000 +0141:00000000000078003000300034003800300030007000b00030003000302030207fe000000000000000000000 +0142:000000001e000600060006800700060006000e001600060006000600060006001f8000000000000000000000 +0143:018003000600c07060207020782058204c2046204720432041a040e040e04060e03000000000000000000000 +0144:0000000000000180030006000000278079c030c030c030c030c030c030c030c079e000000000000000000000 +0145:000000000000c07060207020782058204c2046204720432041a040e040e04060e0300600030001800f000000 +0146:0000000000000000000000000000278079c030c030c030c030c030c030c030c079e00600030001800f000000 +0147:18c00d800700c27060207020782058204c2046204720432041a040e040e04060e03000000000000000000000 +0148:0000000018c00d80070002000000278079c030c030c030c030c030c030c030c079e000000000000000000000 +0149:0000e000e0006000600040008000278079c030c030c030c030c030c030c030c079e000000000000000000000 +014a:000000000000c07060207020782058204c2046204720432041a040e040e04060e06000600060004003800300 +014b:0000000000000000000000000000278079c030c030c030c030c030c030c030c078c000c000c0008007000600 +014c:1f801f8000000f0011c020c020606060606060606060606060602040304018800f0000000000000000000000 +014d:0000000000001f801f80000000000f8011c020e06060606060606060704038801f0000000000000000000000 +014e:0d800d8007000f0011c020c020606060606060606060606060602040304018800f0000000000000000000000 +014f:0000000000000d800d80070000000f8011c020e06060606060606060704038801f0000000000000000000000 +0150:036006c00d800f0011c020c020606060606060606060606060602040304018800f0000000000000000000000 +0151:00000000000006c00d801b0000000f8011c020e06060606060606060704038801f0000000000000000000000 +0152:0000000000001fe0262046204600c600c610c7f0c610c600c6004600661036101ff000000000000000000000 +0153:00000000000000000000000000001de022304230c230c3f0c200c200e20073303de000000000000000000000 +0154:018003000600ff00618060c060c060c060807f007c006e006700638061c060e0f07000000000000000000000 +0155:000000000000030006000c000000738034c038c0300030003000300030003000780000000000000000000000 +0156:000000000000ff00618060c060c060c060807f007c006e006700638061c060e0f0700600030001800f000000 +0157:0000000000000000000000000000738034c038c0300030003000300030003000780018000c0006003c000000 +0158:31801b000e00ff00618060c060c060c060807f007c006e006700638061c060e0f07000000000000000000000 +0159:0000000031801b000e0004000000738034c038c0300030003000300030003000780000000000000000000000 +015a:0180030006001fe030606020602070003c001e00078001c000e04060406060c07f8000000000000000000000 +015b:00000000000001800300060000001fc030c0304038001e00078001c020c030c03f8000000000000000000000 +015c:07000d8000001fe030606020602070003c001e00078001c000e04060406060c07f8000000000000000000000 +015d:00000000020007000d8018c000001fc030c0304038001e00078001c020c030c03f8000000000000000000000 +015e:0000000000001fe030606020602070003c001e00078001c000e04060406060c07f800600030001800f000000 +015f:00000000000000000000000000001fc030c0304038001e00078001c020c030c03f800600030001800f000000 +0160:18c00d8007001fe030606020602070003c001e00078001c000e04060406060c07f8000000000000000000000 +0161:0000000018c00d800700020000001fc030c0304038001e00078001c020c030c03f8000000000000000000000 +0162:0000000000007fe04620060006000600060006000600060006000600060006001f800600030001800f000000 +0163:0000000000000000040004000c007fc00c000c000c000c000c000c000c200e4007800600030001800f000000 +0164:18c00d8007007fe04620060006000600060006000600060006000600060006001f8000000000000000000000 +0165:31801b000e000000040004000c007fc00c000c000c000c000c000c000c200e40078000000000000000000000 +0166:0000000000007fe0462006000600060006003fc00600060006000600060006001f8000000000000000000000 +0167:0000000000000000040004000c007fc00c000c003f800c000c000c000c200e40078000000000000000000000 +0168:0e401fc01380f070602060206020602060206020602060206020602070403fc01f8000000000000000000000 +0169:0000000000000e401fc01380000079e030c030c030c030c030c030c030c039c01e6000000000000000000000 +016a:1f801f800000f070602060206020602060206020602060206020602070403fc01f8000000000000000000000 +016b:0000000000001f801f800000000079e030c030c030c030c030c030c030c039c01e6000000000000000000000 +016c:0d800d800700f070602060206020602060206020602060206020602070403fc01f8000000000000000000000 +016d:0000000000000d800d800700000079e030c030c030c030c030c030c030c039c01e6000000000000000000000 +016e:07000d800d80f770602060206020602060206020602060206020602070403fc01f8000000000000000000000 +016f:0000000007000d800d800700000079e030c030c030c030c030c030c030c039c01e6000000000000000000000 +0170:06c00d801b00f070602060206020602060206020602060206020602070403fc01f8000000000000000000000 +0171:00000000000006c00d801b00000079e030c030c030c030c030c030c030c039c01e6000000000000000000000 +0172:000000000000f070602060206020602060206020602060206020602070403fc01f8001800300060003c00000 +0173:000000000000000000000000000079e030c030c030c030c030c030c030c039c01e6000c00180030001e00000 +0174:07000d800000fef066206620662076207740334037403bc03b80198019801980198000000000000000000000 +0175:00000000020007000d8018c00000ff7066206620662037403b403b4019801980198000000000000000000000 +0176:07000d800000f07060203040188018800d0006000600060006000600060006000f0000000000000000000000 +0177:00000000020007000d8018c00000f0f0602030403040188018800d000d000600060004000c00080078007000 +0178:198019800000f07060203040188018800d0006000600060006000600060006000f0000000000000000000000 +0179:0180030006003fe020c000c00180018003000300060006000c000c00180018203fe000000000000000000000 +017a:000000000000030006000c0000007fe060e041c0038007000e001c00382070607fe000000000000000000000 +017b:0300030000003fe020c000c00180018003000300060006000c000c00180018203fe000000000000000000000 +017c:00000000000000000600060000007fe060e041c0038007000e001c00382070607fe000000000000000000000 +017d:18c00d8007003fe020c000c00180018003000300060006000c000c00180018203fe000000000000000000000 +017e:0000000018c00d800700020000007fe060e041c0038007000e001c00382070607fe000000000000000000000 +017f:00000000038004c004c00c000c000c000c003c000c000c000c000c000c000c001e0000000000000000000000 +0300:0c00060003000000000000000000000000000000000000000000000000000000000000000000000000000000 +0301:030006000c000000000000000000000000000000000000000000000000000000000000000000000000000000 +0302:04000e001b003180000000000000000000000000000000000000000000000000000000000000000000000000 +0303:1c803f8027000000000000000000000000000000000000000000000000000000000000000000000000000000 +0304:00001f801f800000000000000000000000000000000000000000000000000000000000000000000000000000 +0306:1b001b000e000000000000000000000000000000000000000000000000000000000000000000000000000000 +0308:1980198000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030a:0e001b001b000e00000000000000000000000000000000000000000000000000000000000000000000000000 +030c:31801b000e000400000000000000000000000000000000000000000000000000000000000000000000000000 +0327:000000000000000000000000000000000000000000000000000000000000000000000600030001800f000000 +0328:0000000000000000000000000000000000000000000000000000000000000000000006000c0018000f000000 +0332:00000000000000000000000000000000000000000000000000000000000000000000000000000000fff0fff0 +2010:00000000000000000000000000000000000000003fc03fc00000000000000000000000000000000000000000 +2011:00000000000000000000000000000000000000003fc03fc00000000000000000000000000000000000000000 +2012:00000000000000000000000000000000000000003fc03fc00000000000000000000000000000000000000000 +2013:00000000000000000000000000000000000000003fc03fc00000000000000000000000000000000000000000 +2014:00000000000000000000000000000000000000007fe07fe00000000000000000000000000000000000000000 +2015:00000000000000000000000000000000000000007fe07fe00000000000000000000000000000000000000000 +2016:0000000000001980198019801980198019801980198019801980198019801980198000000000000000000000 +2017:0000000000000000000000000000000000000000000000000000000000000000000000003fc0000000003fc0 +2018:00000100030006000c000c000f000f0006000000000000000000000000000000000000000000000000000000 +2019:000006000f000f000300030006000c0008000000000000000000000000000000000000000000000000000000 +201a:00000000000000000000000000000000000000000000000006000f000f000300030006000c00080000000000 +201b:000006000f000f000c000c000600030001000000000000000000000000000000000000000000000000000000 +201c:00000cc019801980198019801980198000000000000000000000000000000000000000000000000000000000 +201d:0000198019801980198019801980330000000000000000000000000000000000000000000000000000000000 +201e:0000000000000000000000000000000000000000000000001980198019801980198033000000000000000000 +201f:00001980198019801980198019800cc000000000000000000000000000000000000000000000000000000000 +2020:0000000000000600060006003fc03fc006000600060006000600060006000600060000000000000000000000 +2021:0000000000000600060006003fc03fc006000600060006003fc03fc006000600060000000000000000000000 +2022:0000000000000000000000000000000007000f800f800f800700000000000000000000000000000000000000 +2026:0000000000000000000000000000000000000000000000000000222077707770222000000000000000000000 +2030:000000000000318049804b003300060006000c000c001800180036c03920692066c000000000000000000000 +2032:0000060006000600060006000600000000000000000000000000000000000000000000000000000000000000 +2033:0000198019801980198019801980000000000000000000000000000000000000000000000000000000000000 +2039:000000000000000000000000000000000180030006000c0018000c0006000300018000000000000000000000 +203a:0000000000000000000000000000000018000c00060003000180030006000c00180000000000000000000000 +203c:0000000019801980198019801980198019801980198019801980000000001980198000000000000000000000 +203e:00003fc03fc00000000000000000000000000000000000000000000000000000000000000000000000000000 +20ac:0000000000000f801040202020006000ff8060006000ff0060002000300018400f8000000000000000000000 +2212:00000000000000000000000000000000000000003fc03fc00000000000000000000000000000000000000000 +23ba:fff0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000 +23bb:000000000000000000000000fff0fff000000000000000000000000000000000000000000000000000000000 +23bc:00000000000000000000000000000000000000000000000000000000fff0fff0000000000000000000000000 +23bd:00000000000000000000000000000000000000000000000000000000000000000000000000000000fff0fff0 +2500:0000000000000000000000000000000000000000fff0fff00000000000000000000000000000000000000000 +2501:000000000000000000000000000000000000fff0fff0fff0fff0000000000000000000000000000000000000 +2502:0600060006000600060006000600060006000600060006000600060006000600060006000600060006000600 +2503:0f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f00 +250c:000000000000000000000000000000000000000007f007f00600060006000600060006000600060006000600 +250d:00000000000000000000000000000000000007f007f007f007f0060006000600060006000600060006000600 +250e:00000000000000000000000000000000000000000ff00ff00f000f000f000f000f000f000f000f000f000f00 +250f:0000000000000000000000000000000000000ff00ff00ff00ff00f000f000f000f000f000f000f000f000f00 +2510:0000000000000000000000000000000000000000fe00fe000600060006000600060006000600060006000600 +2511:000000000000000000000000000000000000fe00fe00fe00fe00060006000600060006000600060006000600 +2512:0000000000000000000000000000000000000000ff00ff000f000f000f000f000f000f000f000f000f000f00 +2513:000000000000000000000000000000000000ff00ff00ff00ff000f000f000f000f000f000f000f000f000f00 +2514:060006000600060006000600060006000600060007f007f00000000000000000000000000000000000000000 +2515:06000600060006000600060006000600060007f007f007f007f0000000000000000000000000000000000000 +2516:0f000f000f000f000f000f000f000f000f000f000ff00ff00000000000000000000000000000000000000000 +2517:0f000f000f000f000f000f000f000f000f000ff00ff00ff00ff0000000000000000000000000000000000000 +2518:0600060006000600060006000600060006000600fe00fe000000000000000000000000000000000000000000 +2519:060006000600060006000600060006000600fe00fe00fe00fe00000000000000000000000000000000000000 +251a:0f000f000f000f000f000f000f000f000f000f00ff00ff000000000000000000000000000000000000000000 +251b:0f000f000f000f000f000f000f000f000f00ff00ff00ff00ff00000000000000000000000000000000000000 +251c:060006000600060006000600060006000600060007f007f00600060006000600060006000600060006000600 +251d:06000600060006000600060006000600060007f007f007f007f0060006000600060006000600060006000600 +251e:0f000f000f000f000f000f000f000f000f000f000ff00ff00600060006000600060006000600060006000600 +251f:06000600060006000600060006000600060006000ff00ff00f000f000f000f000f000f000f000f000f000f00 +2520:0f000f000f000f000f000f000f000f000f000f000ff00ff00f000f000f000f000f000f000f000f000f000f00 +2521:0f000f000f000f000f000f000f000f000f000ff00ff00ff00ff0060006000600060006000600060006000600 +2522:0600060006000600060006000600060006000ff00ff00ff00ff00f000f000f000f000f000f000f000f000f00 +2523:0f000f000f000f000f000f000f000f000f000ff00ff00ff00ff00f000f000f000f000f000f000f000f000f00 +2524:0600060006000600060006000600060006000600fe00fe000600060006000600060006000600060006000600 +2525:060006000600060006000600060006000600fe00fe00fe00fe00060006000600060006000600060006000600 +2526:0f000f000f000f000f000f000f000f000f000f00ff00ff000600060006000600060006000600060006000600 +2527:0600060006000600060006000600060006000600ff00ff000f000f000f000f000f000f000f000f000f000f00 +2528:0f000f000f000f000f000f000f000f000f000f00ff00ff000f000f000f000f000f000f000f000f000f000f00 +2529:0f000f000f000f000f000f000f000f000f00ff00ff00ff00ff00060006000600060006000600060006000600 +252a:060006000600060006000600060006000600ff00ff00ff00ff000f000f000f000f000f000f000f000f000f00 +252b:0f000f000f000f000f000f000f000f000f00ff00ff00ff00ff000f000f000f000f000f000f000f000f000f00 +252c:0000000000000000000000000000000000000000fff0fff00600060006000600060006000600060006000600 +252d:000000000000000000000000000000000000fe00fff0fff0fe00060006000600060006000600060006000600 +252e:00000000000000000000000000000000000007f0fff0fff007f0060006000600060006000600060006000600 +252f:000000000000000000000000000000000000fff0fff0fff0fff0060006000600060006000600060006000600 +2530:0000000000000000000000000000000000000000fff0fff00f000f000f000f000f000f000f000f000f000f00 +2531:000000000000000000000000000000000000ff00fff0fff0ff000f000f000f000f000f000f000f000f000f00 +2532:0000000000000000000000000000000000000ff0fff0fff00ff00f000f000f000f000f000f000f000f000f00 +2533:000000000000000000000000000000000000fff0fff0fff0fff00f000f000f000f000f000f000f000f000f00 +2534:0600060006000600060006000600060006000600fff0fff00000000000000000000000000000000000000000 +2535:060006000600060006000600060006000600fe00fff0fff0fe00000000000000000000000000000000000000 +2536:06000600060006000600060006000600060007f0fff0fff007f0000000000000000000000000000000000000 +2537:060006000600060006000600060006000600fff0fff0fff0fff0000000000000000000000000000000000000 +2538:0f000f000f000f000f000f000f000f000f000f00fff0fff00000000000000000000000000000000000000000 +2539:0f000f000f000f000f000f000f000f000f00ff00fff0fff0ff00000000000000000000000000000000000000 +253a:0f000f000f000f000f000f000f000f000f000ff0fff0fff00ff0000000000000000000000000000000000000 +253b:0f000f000f000f000f000f000f000f000f00fff0fff0fff0fff0000000000000000000000000000000000000 +253c:0600060006000600060006000600060006000600fff0fff00600060006000600060006000600060006000600 +253d:060006000600060006000600060006000600fe00fff0fff0fe00060006000600060006000600060006000600 +253e:06000600060006000600060006000600060007f0fff0fff007f0060006000600060006000600060006000600 +253f:060006000600060006000600060006000600fff0fff0fff0fff0060006000600060006000600060006000600 +2540:0f000f000f000f000f000f000f000f000f000f00fff0fff00600060006000600060006000600060006000600 +2541:0600060006000600060006000600060006000600fff0fff00f000f000f000f000f000f000f000f000f000f00 +2542:0f000f000f000f000f000f000f000f000f000f00fff0fff00f000f000f000f000f000f000f000f000f000f00 +2543:0f000f000f000f000f000f000f000f000f00ff00fff0fff0fe00060006000600060006000600060006000600 +2544:0f000f000f000f000f000f000f000f000f000ff0fff0fff007f0060006000600060006000600060006000600 +2545:060006000600060006000600060006000600fe00fff0fff0ff000f000f000f000f000f000f000f000f000f00 +2546:06000600060006000600060006000600060007f0fff0fff00ff00f000f000f000f000f000f000f000f000f00 +2547:0f000f000f000f000f000f000f000f000f00fff0fff0fff0fff0060006000600060006000600060006000600 +2548:060006000600060006000600060006000600fff0fff0fff0fff00f000f000f000f000f000f000f000f000f00 +2549:0f000f000f000f000f000f000f000f000f00ff00fff0fff0ff000f000f000f000f000f000f000f000f000f00 +254a:0f000f000f000f000f000f000f000f000f000ff0fff0fff00ff00f000f000f000f000f000f000f000f000f00 +254b:0f000f000f000f000f000f000f000f000f00fff0fff0fff0fff00f000f000f000f000f000f000f000f000f00 +2550:000000000000000000000000000000000000fff000000000fff0000000000000000000000000000000000000 +2551:0900090009000900090009000900090009000900090009000900090009000900090009000900090009000900 +2552:00000000000000000000000000000000000007f00600060007f0060006000600060006000600060006000600 +2553:00000000000000000000000000000000000000000ff00ff00900090009000900090009000900090009000900 +2554:0000000000000000000000000000000000000ff00800080009f0090009000900090009000900090009000900 +2555:000000000000000000000000000000000000fe0006000600fe00060006000600060006000600060006000600 +2556:0000000000000000000000000000000000000000ff00ff000900090009000900090009000900090009000900 +2557:000000000000000000000000000000000000ff0001000100f900090009000900090009000900090009000900 +2558:06000600060006000600060006000600060007f00600060007f0000000000000000000000000000000000000 +2559:09000900090009000900090009000900090009000ff00ff00000000000000000000000000000000000000000 +255a:09000900090009000900090009000900090009f0080008000ff0000000000000000000000000000000000000 +255b:060006000600060006000600060006000600fe0006000600fe00000000000000000000000000000000000000 +255c:0900090009000900090009000900090009000900ff00ff000000000000000000000000000000000000000000 +255d:090009000900090009000900090009000900f90001000100ff00000000000000000000000000000000000000 +255e:06000600060006000600060006000600060007f00600060007f0060006000600060006000600060006000600 +255f:09000900090009000900090009000900090009000ff00ff00900090009000900090009000900090009000900 +2560:09000900090009000900090009000900090009f00800080009f0090009000900090009000900090009000900 +2561:060006000600060006000600060006000600fe0006000600fe00060006000600060006000600060006000600 +2562:0900090009000900090009000900090009000900ff00ff000900090009000900090009000900090009000900 +2563:090009000900090009000900090009000900f90001000100f900090009000900090009000900090009000900 +2564:000000000000000000000000000000000000fff000000000fff0060006000600060006000600060006000600 +2565:0000000000000000000000000000000000000000fff0fff00900090009000900090009000900090009000900 +2566:000000000000000000000000000000000000fff000000000f9f0090009000900090009000900090009000900 +2567:060006000600060006000600060006000600fff000000000fff0000000000000000000000000000000000000 +2568:0900090009000900090009000900090009000900fff0fff00000000000000000000000000000000000000000 +2569:090009000900090009000900090009000900f9f000000000fff0000000000000000000000000000000000000 +256a:060006000600060006000600060006000600fff006000600fff0060006000600060006000600060006000600 +256b:0900090009000900090009000900090009000900fff0fff00900090009000900090009000900090009000900 +256c:090009000900090009000900090009000900f9f000000000f9f0090009000900090009000900090009000900 +256d:0000000000000000000000000000000000000000007001f00380030006000600060006000600060006000600 +256e:0000000000000000000000000000000000000000e000f8001c000c0006000600060006000600060006000600 +256f:060006000600060006000600060006000c001c00f800e0000000000000000000000000000000000000000000 +2570:060006000600060006000600060006000300038001f000700000000000000000000000000000000000000000 +2591:aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000aaa00000 +2592:3330ccc03330ccc03330ccc03330ccc03330ccc03330ccc03330ccc03330ccc03330ccc03330ccc03330ccc0 +2593:fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0fff0aaa0 +25c6:0000000000000000000006000f001f803fc07fe0fff0fff07fe03fc01f800f00060000000000000000000000 +fffd:000000007fe07fe0606060606060606060606060606060606060606060607fe07fe000000000000000000000 From owner-svn-src-head@freebsd.org Mon Mar 30 20:08:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1EBE2661B7; Mon, 30 Mar 2020 20:08:36 +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 48rk6r2RMBz3HBN; Mon, 30 Mar 2020 20:08:36 +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 377382296A; Mon, 30 Mar 2020 20:08: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 02UK8R99070489; Mon, 30 Mar 2020 20:08:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UK8R4b070488; Mon, 30 Mar 2020 20:08:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003302008.02UK8R4b070488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 20:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359459 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 20:08:36 -0000 Author: emaste Date: Mon Mar 30 20:08:26 2020 New Revision: 359459 URL: https://svnweb.freebsd.org/changeset/base/359459 Log: regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 ... and a number of other changes since the last regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Mar 30 20:07:25 2020 (r359458) +++ head/share/man/man5/src.conf.5 Mon Mar 30 20:08:26 2020 (r359459) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 9, 2020 +.Dd March 30, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -177,8 +177,7 @@ flag set to indicate that the run-time loader should p processing at process startup rather than on demand. .It Va WITHOUT_BINUTILS Do not build or install GNU -.Xr as 1 , -.Xr ld.bfd 1 , and +.Xr as 1 and .Xr objdump 1 as part of the normal system build. @@ -189,25 +188,24 @@ arm64/aarch64, riscv/riscv64 and riscv/riscv64sf. Build and install GNU .Xr as 1 on i386 and amd64, -.Xr objdump 1 , and -.Xr ld.bfd 1 -on powerpc as part of the normal system build. +.Xr objdump 1 +as part of the normal system build. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP Do not build GNU binutils as part of the bootstrap process. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_BINUTILS_BOOTSTRAP Build GNU binutils as part of the bootstrap process. .Pp This is a default setting on -amd64/amd64, i386/i386, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64 and i386/i386. .It Va WITHOUT_BLACKLIST Set this if you do not want to build .Xr blacklistd 8 @@ -356,14 +354,6 @@ Set to not build the Clang C/C++ compiler during the b the build. To be able to build the system, either gcc or clang bootstrap must be enabled unless an alternate compiler is provided via XCC. -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. -.It Va WITH_CLANG_BOOTSTRAP -Set to build the Clang C/C++ compiler during the bootstrap phase of the build. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint and clang-format. @@ -376,18 +366,6 @@ Do not install links to the Clang C/C++ compiler as .Pa /usr/bin/c++ and .Pa /usr/bin/cpp . -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. -.It Va WITH_CLANG_IS_CC -Install links to the Clang C/C++ compiler as -.Pa /usr/bin/cc , -.Pa /usr/bin/c++ -and -.Pa /usr/bin/cpp . -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_CPP Set to not build .Xr cpp 1 . @@ -458,7 +436,7 @@ Set to not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CXGBETOOL Set to build .Xr cxgbetool 8 @@ -619,7 +597,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_EFI Set to build .Xr efivar 3 @@ -698,12 +676,7 @@ Set to build .Xr gdb 1 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpc64. -.It Va WITHOUT_GDB_LIBEXEC -Set to install -.Xr gdb 1 -into -.Pa /usr/bin . +amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_GNU_DIFF Set to not build GNU .Xr diff 1 @@ -723,7 +696,7 @@ Set to neither build nor install and dependent tests. .Pp This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. +mips/mips and mips/mips64. .It Va WITH_GOOGLETEST Set to build and install .Lb libgmock , @@ -750,7 +723,7 @@ Set to not build HTML docs. Set to not build or install HyperV utilities. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_HYPERV Set to build or install HyperV utilities. .Pp @@ -904,7 +877,7 @@ On 64-bit platforms, set to not build 32-bit library s runtime linker. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, mips/mipselhf, mips/mipshf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LIBCPLUSPLUS Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD @@ -932,7 +905,7 @@ Set to not build LLVM's lld linker. Set to not build the LLDB debugger. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LLDB Set to build the LLDB debugger. .Pp @@ -943,25 +916,8 @@ Set to not build the LLD linker during the bootstrap p the build. To be able to build the system, either Binutils or LLD bootstrap must be enabled unless an alternate linker is provided via XLD. -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and powerpc/powerpc. -.It Va WITH_LLD_BOOTSTRAP -Set to build the LLD linker during the bootstrap phase of the build, -and use it during buildworld and buildkernel. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LLD_IS_LD Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf and powerpc/powerpc. -.It Va WITH_LLD_IS_LD -Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LLVM_COV Set to not build the .Xr llvm-cov 1 @@ -1023,11 +979,6 @@ Set to not build LLVM target support for RISC-V. The .Va LLVM_TARGET_ALL option should be used rather than this in most cases. -.It Va WITH_LLVM_TARGET_SPARC -Set to build LLVM target support for SPARC. -The -.Va LLVM_TARGET_ALL -option should be used rather than this in most cases. .It Va WITHOUT_LLVM_TARGET_X86 Set to not build LLVM target support for X86. The @@ -1053,7 +1004,7 @@ powerpc/powerpc and powerpc/powerpc64. Set to build GELI bootloader support. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_LUA Set to not build LUA bindings for the boot loader. .Pp @@ -1063,12 +1014,12 @@ powerpc/powerpc and powerpc/powerpc64. Set to build LUA bindings for the boot loader. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, mips/mips64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_LOADER_OFW Set to build openfirmware bootloader components. .Pp @@ -1083,7 +1034,7 @@ amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64 a Set to build ubldr. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpc64. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_LOADER_VERBOSE Set to build with extra verbose debugging in the loader. May explode already nearly too large loader over the limit. @@ -1247,7 +1198,7 @@ Set to not build .Xr mlx5tool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_MLX5TOOL Set to build .Xr mlx5tool 8 @@ -1318,7 +1269,7 @@ and related programs. Set to not build nvme related tools and kernel modules. .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_NVME Set to build nvme related tools and kernel modules. @@ -1339,7 +1290,7 @@ Enable building openldap support for kerberos. Set to not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_OPENMP Set to build LLVM's OpenMP runtime. .Pp @@ -1432,13 +1383,13 @@ Set to not build profiled libraries for use with .Xr gprof 8 . .Pp This is a default setting on -mips/mips64el, mips/mips64, mips/mips64elhf and mips/mips64hf. +mips/mips64. .It Va WITH_PROFILE Set to build profiled libraries for use with .Xr gprof 8 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mipsn32, mips/mipselhf, mips/mipshf, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_QUOTAS Set to not build .Xr quota 1 @@ -1523,7 +1474,7 @@ Set to not build kernel modules that include sourceles Set to not build world with propolice stack smashing protection. .Pp This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. +mips/mips and mips/mips64. .It Va WITH_SSP Set to build world with propolice stack smashing protection. .Pp From owner-svn-src-head@freebsd.org Mon Mar 30 20:14:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48D762663AB; Mon, 30 Mar 2020 20:14:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (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 48rkFM6FXRz3K3s; Mon, 30 Mar 2020 20:14:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f50.google.com with SMTP id b12so3038057ion.8; Mon, 30 Mar 2020 13:14:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Gz0KXnG8JZSYlSo7imbcxTdmO5U6PeMtzXTGPU/QdIs=; b=JtQzn5KrrVLA9C6BVSslWmoIgvfCFbB9kPN4VU+uGYhaeKSfoI7HAJAIfR7IWC5wOx EzhZ4n1YKylhagogCyYiZ0O790dZOh8jS53iWx+oIXLzZn8rKEm2I+EYrKp5U4CiDLmq m2uVwh6HaldnJlvoLaWjJ6Q+pghWpmX/iBLysjpRVDr8WDjhvE4xTN75ePESAXc0AjMK 8D+jGF0IoU5mMSYd4htJoAsBe83xRmPaHdehDkpZXLjL0i8/cBHGJyGpCNv2c97+fpY6 GBSjCA1Ste4yvqDa5QOAPaqblFSF12q7xpPtK9EFkGCaFU1AqL3qljKg4W9c1MkoT5JR vrcg== X-Gm-Message-State: ANhLgQ1+4MTqU9WfcBtEhCkcUC9nBJLUzNxao5un0WRcKoN0T/EmM47U eKW2zSajb3L7ChITCKIBkF1lyYmEsK2v7F4rUhpvwQ== X-Google-Smtp-Source: ADFU+vt6jGKgjh7YYypypQTdryLIKE28r0CSrwpIExyNxMNiKnI2umkxhqhqUskGmS62Iqzogm82+Gw0uciFqWHv+pQ= X-Received: by 2002:a02:ccb8:: with SMTP id t24mr931719jap.8.1585599245747; Mon, 30 Mar 2020 13:14:05 -0700 (PDT) MIME-Version: 1.0 References: <202003302008.02UK8R4b070488@repo.freebsd.org> In-Reply-To: <202003302008.02UK8R4b070488@repo.freebsd.org> From: Ed Maste Date: Mon, 30 Mar 2020 16:13:53 -0400 Message-ID: Subject: Re: svn commit: r359459 - head/share/man/man5 To: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48rkFM6FXRz3K3s 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.50 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.18 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.18)[ip: (-4.68), ipnet: 209.85.128.0/17(-0.71), asn: 15169(-0.45), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[50.166.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[50.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-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 20:14:27 -0000 On Mon, 30 Mar 2020 at 16:09, Ed Maste wrote: > > Author: emaste > Date: Mon Mar 30 20:08:26 2020 > New Revision: 359459 > URL: https://svnweb.freebsd.org/changeset/base/359459 > > Log: > regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 Oops, copied the wrong revision number, it should be r359457. I don't think it's worth reverting and recommitting a generated file to correct this though. From owner-svn-src-head@freebsd.org Mon Mar 30 20:20:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70E872665C3; Mon, 30 Mar 2020 20:20:24 +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 48rkNS0q16z3M14; Mon, 30 Mar 2020 20:20:24 +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 73BAF22DA2; Mon, 30 Mar 2020 20:20: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 02UKKGPS076841; Mon, 30 Mar 2020 20:20:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UKKGs3076840; Mon, 30 Mar 2020 20:20:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003302020.02UKKGs3076840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 20:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359461 - in head: . tools/build X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . tools/build X-SVN-Commit-Revision: 359461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 20:20:25 -0000 Author: emaste Date: Mon Mar 30 20:20:15 2020 New Revision: 359461 URL: https://svnweb.freebsd.org/changeset/base/359461 Log: add shell script for stale dependency hack It's rather awkward to debug issues with the dependency cleanup hacks when implemented via make. Add a cleanup shell script and move the libomp hack there as an initial example. Reviewed by: brooks MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24228 Added: head/tools/build/depend-cleanup.sh (contents, props changed) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Mar 30 20:15:19 2020 (r359460) +++ head/Makefile.inc1 Mon Mar 30 20:20:15 2020 (r359461) @@ -924,17 +924,8 @@ _sanity_check: .PHONY .MAKE # replacing generated files. Handle these cases here in an ad-hoc fashion. _cleanobj_fast_depend_hack: .PHONY @echo ">>> Deleting stale dependencies..."; + sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} # Date SVN Rev Syscalls/Changes -# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp -.for f in ittnotify_static - @if [ -e "${OBJTOP}/lib/libomp/.depend.${f}.pico" ] && \ - egrep -qw '${f}\.c' ${OBJTOP}/lib/libomp/.depend.${f}.pico; then \ - echo "Removing stale dependencies for ${f}"; \ - rm -f ${OBJTOP}/lib/libomp/.depend.${f}.* \ - ${OBJTOP}/obj-lib32/lib/libomp/.depend.${f}.* \ - ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libomp/.depend.${f}.*}; \ - fi -.endfor # Syscall stubs rewritten in C and obsolete MD assembly implementations # 20191009 r353340 removal of opensolaris_atomic.S (also r353381) .if ${MACHINE} != i386 Added: head/tools/build/depend-cleanup.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/depend-cleanup.sh Mon Mar 30 20:20:15 2020 (r359461) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Our current make(1)-based approach to dependency tracking cannot cope with +# certain source tree changes, including: +# - removing source files +# - replacing generated files with files committed to the tree +# - changing file extensions (e.g. a C source file rewritten in C++) +# +# We handle those cases here in an ad-hoc fashion by looking for the known- +# bad case in the main .depend file, and if found deleting all of the related +# .depend files (including for example the lib32 version). + +OBJTOP=$1 +if [ ! -d "$OBJTOP" ]; then + echo "usage: $(basename $0) objtop" >&2 + exit 1 +fi + +# $1 directory +# $2 source filename w/o extension +# $3 source extension +clean_dep() +{ + if [ -e "$OBJTOP"/$1/.depend.$2.pico ] && \ + egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.pico; then \ + echo "Removing stale dependencies for $2.$3"; \ + rm -f "$OBJTOP"/$1/.depend.$2.* \ + "$OBJTOP"/obj-lib32/$1/.depend.$2.* + fi +} + +# Date Rev Description +# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp +clean_dep lib/libomp ittnotify_static c From owner-svn-src-head@freebsd.org Mon Mar 30 20:54:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 657D72670BA; Mon, 30 Mar 2020 20:54:09 +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 48rl7L6zbPz443L; Mon, 30 Mar 2020 20:54: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 7CD1222D78; Mon, 30 Mar 2020 20:15:20 +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 02UKFKUY076384; Mon, 30 Mar 2020 20:15:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UKFJrs076381; Mon, 30 Mar 2020 20:15:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003302015.02UKFJrs076381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 20:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359460 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 20:54:09 -0000 Author: emaste Date: Mon Mar 30 20:15:19 2020 New Revision: 359460 URL: https://svnweb.freebsd.org/changeset/base/359460 Log: nlist: retire long-obsolete aout support Reviewed by: brooks, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24229 Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/nlist.3 head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Mon Mar 30 20:08:26 2020 (r359459) +++ head/lib/libc/gen/Symbol.map Mon Mar 30 20:15:19 2020 (r359460) @@ -510,7 +510,6 @@ FBSDprivate_1.0 { /* __pw_match_entry; */ /* __pw_parse_entry; */ __fdnlist; /* used by libkvm */ - /* __aout_fdnlist; */ /* __elf_is_okay__; */ /* __elf_fdnlist; */ __opendir2; Modified: head/lib/libc/gen/nlist.3 ============================================================================== --- head/lib/libc/gen/nlist.3 Mon Mar 30 20:08:26 2020 (r359459) +++ head/lib/libc/gen/nlist.3 Mon Mar 30 20:15:19 2020 (r359460) @@ -69,7 +69,6 @@ if the file .Fa filename does not exist or is not executable, the returned value is \-1. .Sh SEE ALSO -.Xr a.out 5 , .Xr elf 5 .Sh HISTORY A Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Mon Mar 30 20:08:26 2020 (r359459) +++ head/lib/libc/gen/nlist.c Mon Mar 30 20:15:19 2020 (r359460) @@ -47,10 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -/* i386 is the only current FreeBSD architecture that used a.out format. */ -#ifdef __i386__ -#define _NLIST_DO_AOUT -#endif #define _NLIST_DO_ELF #ifdef _NLIST_DO_ELF @@ -59,7 +55,6 @@ __FBSDID("$FreeBSD$"); #endif int __fdnlist(int, struct nlist *); -int __aout_fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); int __elf_is_okay__(Elf_Ehdr *); @@ -79,9 +74,6 @@ nlist(const char *name, struct nlist *list) static struct nlist_handlers { int (*fn)(int fd, struct nlist *list); } nlist_fn[] = { -#ifdef _NLIST_DO_AOUT - { __aout_fdnlist }, -#endif #ifdef _NLIST_DO_ELF { __elf_fdnlist }, #endif @@ -102,100 +94,6 @@ __fdnlist(int fd, struct nlist *list) } #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) - -#ifdef _NLIST_DO_AOUT -int -__aout_fdnlist(int fd, struct nlist *list) -{ - struct nlist *p, *symtab; - caddr_t strtab, a_out_mmap; - off_t stroff, symoff; - u_long symsize; - int nent; - struct exec * exec; - struct stat st; - - /* check that file is at least as large as struct exec! */ - if ((_fstat(fd, &st) < 0) || (st.st_size < sizeof(struct exec))) - return (-1); - - /* Check for files too large to mmap. */ - if (st.st_size > SIZE_T_MAX) { - errno = EFBIG; - return (-1); - } - - /* - * Map the whole a.out file into our address space. - * We then find the string table withing this area. - * We do not just mmap the string table, as it probably - * does not start at a page boundary - we save ourselves a - * lot of nastiness by mmapping the whole file. - * - * This gives us an easy way to randomly access all the strings, - * without making the memory allocation permanent as with - * malloc/free (i.e., munmap will return it to the system). - */ - a_out_mmap = mmap(NULL, (size_t)st.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0); - if (a_out_mmap == MAP_FAILED) - return (-1); - - exec = (struct exec *)a_out_mmap; - if (N_BADMAG(*exec)) { - munmap(a_out_mmap, (size_t)st.st_size); - return (-1); - } - - symoff = N_SYMOFF(*exec); - symsize = exec->a_syms; - stroff = symoff + symsize; - - /* find the string table in our mmapped area */ - strtab = a_out_mmap + stroff; - symtab = (struct nlist *)(a_out_mmap + symoff); - - /* - * clean out any left-over information for all valid entries. - * Type and value defined to be 0 if not found; historical - * versions cleared other and desc as well. Also figure out - * the largest string length so don't read any more of the - * string table than we have to. - * - * XXX clearing anything other than n_type and n_value violates - * the semantics given in the man page. - */ - nent = 0; - for (p = list; !ISLAST(p); ++p) { - p->n_type = 0; - p->n_other = 0; - p->n_desc = 0; - p->n_value = 0; - ++nent; - } - - while (symsize > 0) { - int soff; - - symsize-= sizeof(struct nlist); - soff = symtab->n_un.n_strx; - - - if (soff != 0 && (symtab->n_type & N_STAB) == 0) - for (p = list; !ISLAST(p); p++) - if (!strcmp(&strtab[soff], p->n_un.n_name)) { - p->n_value = symtab->n_value; - p->n_type = symtab->n_type; - p->n_desc = symtab->n_desc; - p->n_other = symtab->n_other; - if (--nent <= 0) - break; - } - symtab++; - } - munmap(a_out_mmap, (size_t)st.st_size); - return (nent); -} -#endif #ifdef _NLIST_DO_ELF static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); From owner-svn-src-head@freebsd.org Mon Mar 30 21:32:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3158D267C7A; Mon, 30 Mar 2020 21:32: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 48rlzW1kJWz4Jn2; Mon, 30 Mar 2020 21:32:23 +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 4FF3424812; Mon, 30 Mar 2020 21:25: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 02ULP0gi019540; Mon, 30 Mar 2020 21:25:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULP0wu019539; Mon, 30 Mar 2020 21:25:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003302125.02ULP0wu019539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 21:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359462 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 359462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 21:32:27 -0000 Author: emaste Date: Mon Mar 30 21:25:00 2020 New Revision: 359462 URL: https://svnweb.freebsd.org/changeset/base/359462 Log: libc: unconditionalize _NLIST_DO_ELF Suggested by: brooks, imp Modified: head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Mon Mar 30 20:20:15 2020 (r359461) +++ head/lib/libc/gen/nlist.c Mon Mar 30 21:25:00 2020 (r359462) @@ -47,12 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -#define _NLIST_DO_ELF - -#ifdef _NLIST_DO_ELF #include #include -#endif int __fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); @@ -74,9 +70,7 @@ nlist(const char *name, struct nlist *list) static struct nlist_handlers { int (*fn)(int fd, struct nlist *list); } nlist_fn[] = { -#ifdef _NLIST_DO_ELF { __elf_fdnlist }, -#endif }; int @@ -95,7 +89,6 @@ __fdnlist(int fd, struct nlist *list) #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) -#ifdef _NLIST_DO_ELF static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); /* @@ -299,4 +292,3 @@ elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shd ELF_ST_BIND(s->st_info) == STB_WEAK) nl->n_type |= N_EXT; } -#endif /* _NLIST_DO_ELF */ From owner-svn-src-head@freebsd.org Mon Mar 30 21:55:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E58DE2682EC; Mon, 30 Mar 2020 21:55:50 +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 48rmVY4pwjz4S5b; Mon, 30 Mar 2020 21:55:49 +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 10E8924D5B; Mon, 30 Mar 2020 21:48:48 +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 02ULml3d031956; Mon, 30 Mar 2020 21:48:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULmlRD031954; Mon, 30 Mar 2020 21:48:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003302148.02ULmlRD031954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Mar 2020 21:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359467 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 359467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 21:55:51 -0000 Author: jhb Date: Mon Mar 30 21:48:47 2020 New Revision: 359467 URL: https://svnweb.freebsd.org/changeset/base/359467 Log: Trim some duplicate EIO descriptions. While here, drop an extra conjunction from the list of error conditions for the remaining EIO description in symlink(2). Discussed with: mckusick (trimming duplicates) MFC after: 2 weeks Modified: head/lib/libc/sys/mkfifo.2 head/lib/libc/sys/symlink.2 Modified: head/lib/libc/sys/mkfifo.2 ============================================================================== --- head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:44:30 2020 (r359466) +++ head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:48:47 2020 (r359467) @@ -130,10 +130,6 @@ which the fifo is being created has been exhausted. An .Tn I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EIO -An -.Tn I/O -error occurred while reading from or writing to the file system. .It Bq Er EINTEGRITY Corrupted data was detected while reading from the file system. .It Bq Er EFAULT Modified: head/lib/libc/sys/symlink.2 ============================================================================== --- head/lib/libc/sys/symlink.2 Mon Mar 30 21:44:30 2020 (r359466) +++ head/lib/libc/sys/symlink.2 Mon Mar 30 21:48:47 2020 (r359467) @@ -118,7 +118,7 @@ manual page for more information. .It Bq Er EIO An I/O error occurred while making the directory entry for .Fa name2 , -or allocating the inode for +allocating the inode for .Fa name2 , or writing out the link contents of .Fa name2 . @@ -149,8 +149,6 @@ contain the symbolic link has been exhausted. .It Bq Er EDQUOT The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. -.It Bq Er EIO -An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EINTEGRITY Corrupted data was detected while reading from the file system. .It Bq Er EFAULT From owner-svn-src-head@freebsd.org Mon Mar 30 21:57:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36F2D26837C; Mon, 30 Mar 2020 21:57: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 48rmXc6Tsjz4SlC; Mon, 30 Mar 2020 21:57:36 +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 F1775250EE; Mon, 30 Mar 2020 21:57: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 02ULvSg8038069; Mon, 30 Mar 2020 21:57:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULvS5J038068; Mon, 30 Mar 2020 21:57:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302157.02ULvS5J038068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 21:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359469 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 21:57:38 -0000 Author: kib Date: Mon Mar 30 21:57:28 2020 New Revision: 359469 URL: https://svnweb.freebsd.org/changeset/base/359469 Log: kern_sendfile.c: wait for all in-flight ios completion before unwiring pages. Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:50:51 2020 (r359468) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:57:28 2020 (r359469) @@ -256,6 +256,17 @@ fixspace(int old, int new, off_t off, int *space) } /* + * Wait for all in-flight ios to complete, we must not unwire pages + * under them. + */ +static void +sendfile_iowait(struct sf_io *sfio, const char *wmesg) +{ + while (atomic_load_int(&sfio->nios) != 1) + pause(wmesg, 1); +} + +/* * I/O completion callback. */ static void @@ -437,6 +448,8 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i + count == npages ? &rhpages : NULL, &sendfile_iodone, sfio); if (__predict_false(rv != VM_PAGER_OK)) { + sendfile_iowait(sfio, "sferrio"); + /* * Perform full pages recovery before returning EIO. * Pages from 0 to npages are wired. @@ -967,6 +980,7 @@ retry_space: m != NULL ? SFB_NOWAIT : SFB_CATCH); if (sf == NULL) { SFSTAT_INC(sf_allocfail); + sendfile_iowait(sfio, "sfnosf"); for (int j = i; j < npages; j++) vm_page_unwire(pa[j], PQ_INACTIVE); if (m == NULL) From owner-svn-src-head@freebsd.org Mon Mar 30 22:01:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F01426848A; Mon, 30 Mar 2020 22:01:33 +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 48rmd84nMpz4V7c; Mon, 30 Mar 2020 22:01:32 +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 1E4D024E95; Mon, 30 Mar 2020 21:50: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 02ULopnv032128; Mon, 30 Mar 2020 21:50:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULopHp032127; Mon, 30 Mar 2020 21:50:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302150.02ULopHp032127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 21:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359468 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:01:33 -0000 Author: kib Date: Mon Mar 30 21:50:51 2020 New Revision: 359468 URL: https://svnweb.freebsd.org/changeset/base/359468 Log: kern_sendfile.c: add specific malloc type. Now sfio leaks are more easily seen in the malloc statistics than e.g. just wired or busy pages leak. Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:48:47 2020 (r359467) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:50:51 2020 (r359468) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +static MALLOC_DEFINE(M_SENDFILE, "sendfile", "sendfile dynamic memory"); + #define EXT_FLAG_SYNC EXT_FLAG_VENDOR1 #define EXT_FLAG_NOCACHE EXT_FLAG_VENDOR2 #define EXT_FLAG_CACHE_LAST EXT_FLAG_VENDOR3 @@ -283,7 +285,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i * to the socket yet. */ MPASS((curthread->td_pflags & TDP_KTHREAD) == 0); - free(sfio, M_TEMP); + free(sfio, M_SENDFILE); return; } @@ -338,7 +340,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i out_with_ref: #endif CURVNET_RESTORE(); - free(sfio, M_TEMP); + free(sfio, M_SENDFILE); } /* @@ -640,7 +642,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *h SFSTAT_ADD(sf_rhpages_requested, SF_READAHEAD(flags)); if (flags & SF_SYNC) { - sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); + sfs = malloc(sizeof(*sfs), M_SENDFILE, M_WAITOK | M_ZERO); mtx_init(&sfs->mtx, "sendfile", NULL, MTX_DEF); cv_init(&sfs->cv, "sendfile"); } @@ -826,7 +828,7 @@ retry_space: npages, rhpages); sfio = malloc(sizeof(struct sf_io) + - npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); + npages * sizeof(vm_page_t), M_SENDFILE, M_WAITOK); refcount_init(&sfio->nios, 1); sfio->obj = obj; sfio->error = 0; @@ -1135,7 +1137,7 @@ out: KASSERT(sfs->count == 0, ("sendfile sync still busy")); cv_destroy(&sfs->cv); mtx_destroy(&sfs->mtx); - free(sfs, M_TEMP); + free(sfs, M_SENDFILE); } #ifdef KERN_TLS if (tls != NULL) From owner-svn-src-head@freebsd.org Mon Mar 30 22:01:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5D312684C0; Mon, 30 Mar 2020 22:01: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 48rmdP0BTYz4VCP; Mon, 30 Mar 2020 22:01: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 161FB24D0D; Mon, 30 Mar 2020 21:42:47 +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 02ULgknU031456; Mon, 30 Mar 2020 21:42:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULgkmq031455; Mon, 30 Mar 2020 21:42:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302142.02ULgkmq031455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 21:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359464 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:01:46 -0000 Author: kib Date: Mon Mar 30 21:42:46 2020 New Revision: 359464 URL: https://svnweb.freebsd.org/changeset/base/359464 Log: buffer pager: skip bogus pages. We cannot validate bogus page by reading a buffer. PR: 244713 Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Mar 30 21:40:35 2020 (r359463) +++ head/sys/kern/vfs_bio.c Mon Mar 30 21:42:46 2020 (r359464) @@ -5154,12 +5154,16 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int br_flags = (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) ? GB_UNMAPPED : 0; again: - for (i = 0; i < count; i++) - vm_page_busy_downgrade(ma[i]); + for (i = 0; i < count; i++) { + if (ma[i] != bogus_page) + vm_page_busy_downgrade(ma[i]); + } lbnp = -1; for (i = 0; i < count; i++) { m = ma[i]; + if (m == bogus_page) + continue; /* * Pages are shared busy and the object lock is not @@ -5228,6 +5232,8 @@ end_pages: redo = false; for (i = 0; i < count; i++) { + if (ma[i] == bogus_page) + continue; if (vm_page_busy_tryupgrade(ma[i]) == 0) { vm_page_sunbusy(ma[i]); ma[i] = vm_page_grab_unlocked(object, ma[i]->pindex, From owner-svn-src-head@freebsd.org Mon Mar 30 22:02:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB9B1268714; Mon, 30 Mar 2020 22:02:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rmfP6q0Jz4Vdb; Mon, 30 Mar 2020 22:02:37 +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 A860124D11; Mon, 30 Mar 2020 21:44:10 +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 02ULiAUP031646; Mon, 30 Mar 2020 21:44:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULi1vL031598; Mon, 30 Mar 2020 21:44:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003302144.02ULi1vL031598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Mar 2020 21:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359465 - in head: lib/libc/sys share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: lib/libc/sys share/man/man9 X-SVN-Commit-Revision: 359465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:02:39 -0000 Author: jhb Date: Mon Mar 30 21:44:00 2020 New Revision: 359465 URL: https://svnweb.freebsd.org/changeset/base/359465 Log: Document EINTEGRITY errors for many system calls. EINTEGRITY was previously documented as a UFS-specific error for mount(2). This documents EINTEGRITY as a filesystem-independent error that may be reported by the backing store of a filesystem. While here, document EIO as a filesystem-independent error for both mount(2) and posix_fadvise(2). EIO was previously only documented for UFS for mount(2). Reviewed by: mckusick Suggested by: mckusick MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24168 Modified: head/lib/libc/sys/access.2 head/lib/libc/sys/acct.2 head/lib/libc/sys/bind.2 head/lib/libc/sys/chdir.2 head/lib/libc/sys/chflags.2 head/lib/libc/sys/chmod.2 head/lib/libc/sys/chown.2 head/lib/libc/sys/chroot.2 head/lib/libc/sys/copy_file_range.2 head/lib/libc/sys/execve.2 head/lib/libc/sys/fhlink.2 head/lib/libc/sys/fhreadlink.2 head/lib/libc/sys/fsync.2 head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/getfh.2 head/lib/libc/sys/getfsstat.2 head/lib/libc/sys/ktrace.2 head/lib/libc/sys/link.2 head/lib/libc/sys/mkdir.2 head/lib/libc/sys/mkfifo.2 head/lib/libc/sys/mknod.2 head/lib/libc/sys/mount.2 head/lib/libc/sys/open.2 head/lib/libc/sys/pathconf.2 head/lib/libc/sys/posix_fadvise.2 head/lib/libc/sys/posix_fallocate.2 head/lib/libc/sys/quotactl.2 head/lib/libc/sys/read.2 head/lib/libc/sys/readlink.2 head/lib/libc/sys/rename.2 head/lib/libc/sys/rmdir.2 head/lib/libc/sys/sendfile.2 head/lib/libc/sys/stat.2 head/lib/libc/sys/statfs.2 head/lib/libc/sys/swapon.2 head/lib/libc/sys/symlink.2 head/lib/libc/sys/truncate.2 head/lib/libc/sys/undelete.2 head/lib/libc/sys/unlink.2 head/lib/libc/sys/utimensat.2 head/lib/libc/sys/utimes.2 head/lib/libc/sys/write.2 head/share/man/man9/VOP_COPY_FILE_RANGE.9 head/share/man/man9/VOP_READDIR.9 head/share/man/man9/VOP_READLINK.9 head/share/man/man9/g_data.9 Modified: head/lib/libc/sys/access.2 ============================================================================== --- head/lib/libc/sys/access.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/access.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt ACCESS 2 .Os .Sh NAME @@ -175,6 +175,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp Also, the Modified: head/lib/libc/sys/acct.2 ============================================================================== --- head/lib/libc/sys/acct.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/acct.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)acct.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 17, 2004 +.Dd March 30, 2020 .Dt ACCT 2 .Os .Sh NAME @@ -119,6 +119,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr acct 5 , Modified: head/lib/libc/sys/bind.2 ============================================================================== --- head/lib/libc/sys/bind.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/bind.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)bind.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd March 30, 2020 .Dt BIND 2 .Os .Sh NAME @@ -122,6 +122,8 @@ A prefix component of the path name does not exist. Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name would reside on a read-only file system. .It Bq Er EISDIR Modified: head/lib/libc/sys/chdir.2 ============================================================================== --- head/lib/libc/sys/chdir.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/chdir.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)chdir.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt CHDIR 2 .Os .Sh NAME @@ -96,6 +96,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The Modified: head/lib/libc/sys/chflags.2 ============================================================================== --- head/lib/libc/sys/chflags.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/chflags.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt CHFLAGS 2 .Os .Sh NAME @@ -264,6 +264,8 @@ points outside the process's allocated address space. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in @@ -306,6 +308,8 @@ The file resides on a read-only file system. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in Modified: head/lib/libc/sys/chmod.2 ============================================================================== --- head/lib/libc/sys/chmod.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/chmod.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt CHMOD 2 .Os .Sh NAME @@ -244,6 +244,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFTYPE The effective user ID is not the super-user, the mode includes the sticky bit .Dv ( S_ISVTX ) , @@ -265,6 +267,8 @@ refers to a socket, not to a file. The file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the Modified: head/lib/libc/sys/chown.2 ============================================================================== --- head/lib/libc/sys/chown.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/chown.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt CHOWN 2 .Os .Sh NAME @@ -183,6 +183,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -205,6 +207,8 @@ The effective user ID is not the super-user. The named file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the errors specified for Modified: head/lib/libc/sys/chroot.2 ============================================================================== --- head/lib/libc/sys/chroot.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/chroot.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)chroot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 3, 2012 +.Dd March 30, 2020 .Dt CHROOT 2 .Os .Sh NAME @@ -121,6 +121,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr chdir 2 , Modified: head/lib/libc/sys/copy_file_range.2 ============================================================================== --- head/lib/libc/sys/copy_file_range.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/copy_file_range.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2019 +.Dd March 30, 2020 .Dt COPY_FILE_RANGE 2 .Os .Sh NAME @@ -180,6 +180,8 @@ flags is not zero. .It Bq Er EIO An I/O error occurred while reading/writing the files. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from a file system. .It Bq Er EISDIR If either .Fa infd Modified: head/lib/libc/sys/execve.2 ============================================================================== --- head/lib/libc/sys/execve.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/execve.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)execve.2 8.5 (Berkeley) 6/1/94 .\" $FreeBSD$ .\" -.Dd September 21, 2010 +.Dd March 30, 2020 .Dt EXECVE 2 .Os .Sh NAME @@ -304,6 +304,8 @@ point to an illegal address. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition, the Modified: head/lib/libc/sys/fhlink.2 ============================================================================== --- head/lib/libc/sys/fhlink.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/fhlink.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2018 +.Dd March 30, 2020 .Dt FHLINK 2 .Os .Sh NAME @@ -219,6 +219,8 @@ containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Modified: head/lib/libc/sys/fhreadlink.2 ============================================================================== --- head/lib/libc/sys/fhreadlink.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/fhreadlink.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2018 +.Dd March 30, 2020 .Dt FHREADLINK 2 .Os .Sh NAME @@ -76,6 +76,8 @@ Too many symbolic links were encountered in translatin The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf Modified: head/lib/libc/sys/fsync.2 ============================================================================== --- head/lib/libc/sys/fsync.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/fsync.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 6, 2018 +.Dd March 30, 2020 .Dt FSYNC 2 .Os .Sh NAME @@ -107,6 +107,8 @@ argument refers to a socket, not to a file. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fsync 1 , Modified: head/lib/libc/sys/getdirentries.2 ============================================================================== --- head/lib/libc/sys/getdirentries.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/getdirentries.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd Nov 14, 2018 +.Dd March 30, 2020 .Dt GETDIRENTRIES 2 .Os .Sh NAME @@ -189,6 +189,8 @@ or the current position pointer is invalid. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , Modified: head/lib/libc/sys/getfh.2 ============================================================================== --- head/lib/libc/sys/getfh.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/getfh.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -29,7 +29,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 11, 2018 +.Dd March 30, 2020 .Dt GETFH 2 .Os .Sh NAME @@ -192,6 +192,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ESTALE The file handle .Fa fhp Modified: head/lib/libc/sys/getfsstat.2 ============================================================================== --- head/lib/libc/sys/getfsstat.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/getfsstat.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)getfsstat.2 8.3 (Berkeley) 5/25/95 .\" $FreeBSD$ .\" -.Dd December 27, 2016 +.Dd March 30, 2020 .Dt GETFSSTAT 2 .Os .Sh NAME @@ -118,6 +118,8 @@ or An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr statfs 2 , Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/ktrace.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 31, 2016 +.Dd March 30, 2020 .Dt KTRACE 2 .Os .Sh NAME @@ -177,6 +177,8 @@ Search permission is denied for a component of the pat Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSYS The kernel was not compiled with .Nm Modified: head/lib/libc/sys/link.2 ============================================================================== --- head/lib/libc/sys/link.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/link.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt LINK 2 .Os .Sh NAME @@ -222,6 +222,8 @@ containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Modified: head/lib/libc/sys/mkdir.2 ============================================================================== --- head/lib/libc/sys/mkdir.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/mkdir.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)mkdir.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 26, 2008 +.Dd March 30, 2020 .Dt MKDIR 2 .Os .Sh NAME @@ -126,6 +126,8 @@ which the directory is being created has been exhauste An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Modified: head/lib/libc/sys/mkfifo.2 ============================================================================== --- head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)mkfifo.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt MKFIFO 2 .Os .Sh NAME @@ -134,6 +134,8 @@ error occurred while making the directory entry or all An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Modified: head/lib/libc/sys/mknod.2 ============================================================================== --- head/lib/libc/sys/mknod.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/mknod.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)mknod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt MKNOD 2 .Os .Sh NAME @@ -108,6 +108,8 @@ Too many symbolic links were encountered in translatin The process's effective user ID is not super-user. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSPC The directory in which the entry for the new node is being placed cannot be extended because there is no space left on the file Modified: head/lib/libc/sys/mount.2 ============================================================================== --- head/lib/libc/sys/mount.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/mount.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)mount.2 8.3 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd August 28, 2019 +.Dd March 30, 2020 .Dt MOUNT 2 .Os .Sh NAME @@ -274,6 +274,13 @@ The .Fa dir argument points outside the process's allocated address space. +.It Bq Er EIO +An I/O error occurred while reading data from +.Fa special . +.It Bq Er EINTEGRITY +The backing store for +.Fa special +detected corrupted data while reading. .El .Pp The following errors can occur for a Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/open.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd January 31, 2020 +.Dd March 30, 2020 .Dt OPEN 2 .Os .Sh NAME @@ -510,6 +510,8 @@ which the file is being created has been exhausted. An I/O error occurred while making the directory entry or allocating the inode for .Dv O_CREAT . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ETXTBSY The file is a pure procedure (shared text) file that is being executed and the Modified: head/lib/libc/sys/pathconf.2 ============================================================================== --- head/lib/libc/sys/pathconf.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/pathconf.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)pathconf.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 7, 2009 +.Dd March 30, 2020 .Dt PATHCONF 2 .Os .Sh NAME @@ -230,6 +230,8 @@ Search permission is denied for a component of the pat Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -244,6 +246,8 @@ argument is not a valid open file descriptor. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , Modified: head/lib/libc/sys/posix_fadvise.2 ============================================================================== --- head/lib/libc/sys/posix_fadvise.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/posix_fadvise.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 3, 2015 +.Dd March 30, 2020 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -124,6 +124,10 @@ argument does not refer to a regular file. The .Fa fd argument is associated with a pipe or FIFO. +.It Bq Er EIO +An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr madvise 2 Modified: head/lib/libc/sys/posix_fallocate.2 ============================================================================== --- head/lib/libc/sys/posix_fallocate.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/posix_fallocate.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd January 5, 2020 +.Dd March 30, 2020 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -112,6 +112,8 @@ argument was less than zero, or the operation is not supported by the file system. .It Bq Er EIO An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENODEV The .Fa fd Modified: head/lib/libc/sys/quotactl.2 ============================================================================== --- head/lib/libc/sys/quotactl.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/quotactl.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -31,7 +31,7 @@ .\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95 .\" $FreeBSD$ .\" -.Dd March 5, 1999 +.Dd March 30, 2020 .Dt QUOTACTL 2 .Os .Sh NAME @@ -228,6 +228,8 @@ An .Tn I/O error occurred while reading from or writing to a file containing quotas. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT An invalid .Fa addr Modified: head/lib/libc/sys/read.2 ============================================================================== --- head/lib/libc/sys/read.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/read.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" $FreeBSD$ .\" -.Dd July 6, 2019 +.Dd March 30, 2020 .Dt READ 2 .Os .Sh NAME @@ -182,6 +182,8 @@ argument points outside the allocated address space. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EBUSY Failed to read from a file, e.g. /proc//regs while is not stopped .It Bq Er EINTR Modified: head/lib/libc/sys/readlink.2 ============================================================================== --- head/lib/libc/sys/readlink.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/readlink.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)readlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt READLINK 2 .Os .Sh NAME @@ -108,6 +108,8 @@ Too many symbolic links were encountered in translatin The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf Modified: head/lib/libc/sys/rename.2 ============================================================================== --- head/lib/libc/sys/rename.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/rename.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)rename.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 21, 2018 +.Dd March 30, 2020 .Dt RENAME 2 .Os .Sh NAME @@ -240,6 +240,8 @@ user's quota of disk blocks on the file system containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while making or updating a directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Modified: head/lib/libc/sys/rmdir.2 ============================================================================== --- head/lib/libc/sys/rmdir.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/rmdir.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)rmdir.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 9, 2006 +.Dd March 30, 2020 .Dt RMDIR 2 .Os .Sh NAME @@ -100,6 +100,8 @@ for a mounted file system. .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The directory entry to be removed resides on a read-only file system. .It Bq Er EFAULT Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/sendfile.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2019 +.Dd March 30, 2020 .Dt SENDFILE 2 .Os .Sh NAME @@ -350,6 +350,9 @@ argument is negative. .It Bq Er EIO An error occurred while reading from +.Fa fd . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from .Fa fd . .It Bq Er ENOTCAPABLE The Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/stat.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd December 5, 2018 +.Dd March 30, 2020 .Dt STAT 2 .Os .Sh NAME @@ -379,6 +379,8 @@ argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG @@ -410,6 +412,8 @@ argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOVERFLOW The file size in bytes cannot be represented correctly in the structure pointed to by Modified: head/lib/libc/sys/statfs.2 ============================================================================== --- head/lib/libc/sys/statfs.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/statfs.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)statfs.2 8.5 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd February 13, 2017 +.Dd March 30, 2020 .Dt STATFS 2 .Os .Sh NAME @@ -204,6 +204,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -225,6 +227,8 @@ points to an invalid address. An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fhstatfs 2 , Modified: head/lib/libc/sys/swapon.2 ============================================================================== --- head/lib/libc/sys/swapon.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/swapon.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)swapon.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 4, 2013 +.Dd March 30, 2020 .Dt SWAPON 2 .Os .Sh NAME @@ -115,6 +115,9 @@ is out of range (this indicates no device driver exist for the associated hardware). .It Bq Er EIO An I/O error occurred while opening the swap device. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system to open the +swap device. .El .Pp Lastly, Modified: head/lib/libc/sys/symlink.2 ============================================================================== --- head/lib/libc/sys/symlink.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/symlink.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)symlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd March 30, 2020 .Dt SYMLINK 2 .Os .Sh NAME @@ -151,6 +151,8 @@ The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa name1 Modified: head/lib/libc/sys/truncate.2 ============================================================================== --- head/lib/libc/sys/truncate.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/truncate.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 24, 2020 +.Dd March 30, 2020 .Dt TRUNCATE 2 .Os .Sh NAME @@ -117,6 +117,8 @@ The argument was less than 0. .It Bq Er EIO An I/O error occurred updating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Modified: head/lib/libc/sys/undelete.2 ============================================================================== --- head/lib/libc/sys/undelete.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/undelete.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -29,7 +29,7 @@ .\" @(#)undelete.2 8.4 (Berkeley) 10/18/94 .\" $FreeBSD$ .\" -.Dd January 22, 2006 +.Dd March 30, 2020 .Dt UNDELETE 2 .Os .Sh NAME @@ -87,6 +87,8 @@ The last component of the path is .Ql .. . .It Bq Er EIO An I/O error occurred while updating the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name resides on a read-only file system. .It Bq Er EFAULT Modified: head/lib/libc/sys/unlink.2 ============================================================================== --- head/lib/libc/sys/unlink.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/unlink.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 6, 2019 +.Dd March 30, 2020 .Dt UNLINK 2 .Os .Sh NAME @@ -175,6 +175,8 @@ are owned by the effective user ID. .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT Modified: head/lib/libc/sys/utimensat.2 ============================================================================== --- head/lib/libc/sys/utimensat.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/utimensat.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -31,7 +31,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt UTIMENSAT 2 .Os .Sh NAME @@ -200,6 +200,8 @@ or .Dv UTIME_OMIT . .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EPERM The .Fa times Modified: head/lib/libc/sys/utimes.2 ============================================================================== --- head/lib/libc/sys/utimes.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/utimes.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -30,7 +30,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 9, 2016 +.Dd March 30, 2020 .Dt UTIMES 2 .Os .Sh NAME @@ -165,6 +165,8 @@ component of at least one of the values specified by t argument has a value less than 0 or greater than 999999. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG Modified: head/lib/libc/sys/write.2 ============================================================================== --- head/lib/libc/sys/write.2 Mon Mar 30 21:42:46 2020 (r359464) +++ head/lib/libc/sys/write.2 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt WRITE 2 .Os .Sh NAME @@ -205,6 +205,12 @@ is greater than if the sysctl .Va debug.iosize_max_clamp is non-zero). +.It Bq Er EINTEGRITY +The backing store for +.Fa fd +detected corrupted data while reading. +(For example, writing a partial filesystem block may require first reading +the existing block which may trigger this error.) .El .Pp In addition, Modified: head/share/man/man9/VOP_COPY_FILE_RANGE.9 ============================================================================== --- head/share/man/man9/VOP_COPY_FILE_RANGE.9 Mon Mar 30 21:42:46 2020 (r359464) +++ head/share/man/man9/VOP_COPY_FILE_RANGE.9 Mon Mar 30 21:44:00 2020 (r359465) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2019 +.Dd March 30, 2020 .Dt VOP_COPY_FILE_RANGE 9 .Os .Sh NAME @@ -133,6 +133,8 @@ reside on. A signal interrupted the VOP call before it could be completed. .It Bq Er EIO An I/O error occurred while reading/writing the files. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading/writing the files. .It Bq Er ENOSPC The file system is full. .El Modified: head/share/man/man9/VOP_READDIR.9 ============================================================================== --- head/share/man/man9/VOP_READDIR.9 Mon Mar 30 21:42:46 2020 (r359464) +++ head/share/man/man9/VOP_READDIR.9 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd March 30, 2020 .Dt VOP_READDIR 9 .Os .Sh NAME @@ -100,6 +100,8 @@ Memory for the cookies should be allocated using: An attempt was made to read from an illegal offset in the directory. .It Bq Er EIO A read error occurred while reading the directory. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading the directory. .El .Sh SEE ALSO .Xr vnode 9 Modified: head/share/man/man9/VOP_READLINK.9 ============================================================================== --- head/share/man/man9/VOP_READLINK.9 Mon Mar 30 21:42:46 2020 (r359464) +++ head/share/man/man9/VOP_READLINK.9 Mon Mar 30 21:44:00 2020 (r359465) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd March 30, 2020 .Dt VOP_READLINK 9 .Os .Sh NAME @@ -58,6 +58,8 @@ Zero is returned on success, otherwise an error code i .Bl -tag -width Er .It Bq Er EIO A read error occurred while reading the contents of the symlink. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading the contents of the symlink. .El .Sh SEE ALSO .Xr uiomove 9 , Modified: head/share/man/man9/g_data.9 ============================================================================== --- head/share/man/man9/g_data.9 Mon Mar 30 21:42:46 2020 (r359464) +++ head/share/man/man9/g_data.9 Mon Mar 30 21:44:00 2020 (r359465) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2004 +.Dd March 30, 2020 .Dt G_DATA 9 .Os .Sh NAME @@ -103,6 +103,8 @@ Possible errors: .Bl -tag -width Er .It Bq Er EIO An I/O error occurred while reading from or writing to the consumer. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the consumer. .El .Sh SEE ALSO .Xr geom 4 , From owner-svn-src-head@freebsd.org Mon Mar 30 22:02:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1934526876E; Mon, 30 Mar 2020 22:02:58 +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 48rmfj38w5z4VkN; Mon, 30 Mar 2020 22:02:53 +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 E3FC024D31; Mon, 30 Mar 2020 21:44:31 +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 02ULiVAt031709; Mon, 30 Mar 2020 21:44:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULiVm9031706; Mon, 30 Mar 2020 21:44:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302144.02ULiVm9031706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 21:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359466 - in head/sys: kern ufs/ffs vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern ufs/ffs vm X-SVN-Commit-Revision: 359466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:02:58 -0000 Author: kib Date: Mon Mar 30 21:44:30 2020 New Revision: 359466 URL: https://svnweb.freebsd.org/changeset/base/359466 Log: VOP_GETPAGES_ASYNC(): consistently call iodone() callback in case of error. Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/vfs_default.c head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/vnode_pager.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Mon Mar 30 21:44:00 2020 (r359465) +++ head/sys/kern/vfs_default.c Mon Mar 30 21:44:30 2020 (r359466) @@ -765,7 +765,8 @@ vop_stdgetpages_async(struct vop_getpages_async_args * error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, ap->a_rbehind, ap->a_rahead); - ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + if (ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); return (error); } Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Mon Mar 30 21:44:00 2020 (r359465) +++ head/sys/ufs/ffs/ffs_vnops.c Mon Mar 30 21:44:30 2020 (r359466) @@ -1780,18 +1780,25 @@ ffs_getpages_async(struct vop_getpages_async_args *ap) { struct vnode *vp; struct ufsmount *um; + bool do_iodone; int error; vp = ap->a_vp; um = VFSTOUFS(vp->v_mount); + do_iodone = true; - if (um->um_devvp->v_bufobj.bo_bsize <= PAGE_SIZE) - return (vnode_pager_generic_getpages(vp, ap->a_m, ap->a_count, - ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg)); - - error = vfs_bio_getpages(vp, ap->a_m, ap->a_count, ap->a_rbehind, - ap->a_rahead, ffs_gbp_getblkno, ffs_gbp_getblksz); - ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + if (um->um_devvp->v_bufobj.bo_bsize <= PAGE_SIZE) { + error = vnode_pager_generic_getpages(vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg); + if (error == 0) + do_iodone = false; + } else { + error = vfs_bio_getpages(vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ffs_gbp_getblkno, + ffs_gbp_getblksz); + } + if (do_iodone && ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); return (error); } Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon Mar 30 21:44:00 2020 (r359465) +++ head/sys/vm/vnode_pager.c Mon Mar 30 21:44:30 2020 (r359466) @@ -776,9 +776,13 @@ vnode_pager_local_getpages(struct vop_getpages_args *a int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap) { + int error; - return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, - ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg)); + error = vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg); + if (error != 0 && ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + return (error); } /* From owner-svn-src-head@freebsd.org Mon Mar 30 22:04:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6623726884E; Mon, 30 Mar 2020 22:04: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 48rmh146hxz4WJc; Mon, 30 Mar 2020 22:04: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 941FE2517E; Mon, 30 Mar 2020 22:01:36 +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 02UM1aPa039770; Mon, 30 Mar 2020 22:01:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UM1aYp039769; Mon, 30 Mar 2020 22:01:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302201.02UM1aYp039769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 22:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359470 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:04:03 -0000 Author: kib Date: Mon Mar 30 22:01:36 2020 New Revision: 359470 URL: https://svnweb.freebsd.org/changeset/base/359470 Log: kern_sendfile.c: do not release sfio reference on error. It is already done by sendfile_iodone(), now consistently for all errors. This de-facto reverts r358597, after r359466. Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:57:28 2020 (r359469) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 22:01:36 2020 (r359470) @@ -469,7 +469,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i __func__, pa, j)); vm_page_unwire(pa[j], PQ_INACTIVE); } - refcount_release(&sfio->nios); return (EIO); } From owner-svn-src-head@freebsd.org Mon Mar 30 22:22:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 727FC2691B8; Mon, 30 Mar 2020 22:22:37 +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 48rn5T00vDz4dSp; Mon, 30 Mar 2020 22:22:36 +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 97A3A2566C; Mon, 30 Mar 2020 22:13:32 +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 02UMDWR9050115; Mon, 30 Mar 2020 22:13:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UMDWWD050114; Mon, 30 Mar 2020 22:13:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302213.02UMDWWD050114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 22:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359473 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:22:37 -0000 Author: kib Date: Mon Mar 30 22:13:32 2020 New Revision: 359473 URL: https://svnweb.freebsd.org/changeset/base/359473 Log: kern_sendfile.c: fix bugs with handling of busy page states. - Do not call into a vnode pager while leaving some pages from the same block as the current run, xbusy. This immediately deadlocks if pager needs to instantiate the buffer. - Only relookup bogus pages after io finished, otherwise we might obliterate the valid pages by out of date disk content. While there, expand the comment explaining this pecularity. - Do not double-unbusy on error. Split unbusy for error case, which is left in the sendfile_swapin(), from the more properly coded normal case in sendfile_iodone(). - Add an XXXKIB comment explaining the serious bug in the validation algorithm, not fixed by this patch series. PR: 244713 Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Mar 30 22:07:11 2020 (r359472) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 22:13:32 2020 (r359473) @@ -92,6 +92,7 @@ struct sf_io { struct socket *so; struct mbuf *m; vm_object_t obj; + vm_pindex_t pindex0; #ifdef KERN_TLS struct ktls_session *tls; #endif @@ -270,17 +271,42 @@ sendfile_iowait(struct sf_io *sfio, const char *wmesg) * I/O completion callback. */ static void -sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) +sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) { struct sf_io *sfio = arg; struct socket *so; + int i; - for (int i = 0; i < count; i++) - if (pg[i] != bogus_page) - vm_page_xunbusy_unchecked(pg[i]); - - if (error) + if (error != 0) { sfio->error = error; + /* + * Restore of the pg[] elements is done by + * sendfile_swapin(). + */ + } else { + /* + * Restore the valid page pointers. They are already + * unbusied, but still wired. For error != 0 case, + * sendfile_swapin() handles unbusy. + * + * XXXKIB since pages are only wired, and we do not + * own the object lock, other users might have + * invalidated them in meantime. Similarly, after we + * unbusied the swapped-in pages, they can become + * invalid under us. + */ + for (i = 0; i < count; i++) { + if (pa[i] == bogus_page) { + pa[i] = vm_page_relookup(sfio->obj, + sfio->pindex0 + i + (sfio->pa - pa)); + KASSERT(pa[i] != NULL, + ("%s: page %p[%d] disappeared", + __func__, pa, i)); + } else { + vm_page_xunbusy_unchecked(pa[i]); + } + } + } if (!refcount_release(&sfio->nios)) return; @@ -361,11 +387,13 @@ static int sendfile_swapin(vm_object_t obj, struct sf_io *sfio, int *nios, off_t off, off_t len, int npages, int rhpages, int flags) { - vm_page_t *pa = sfio->pa; - int grabbed; + vm_page_t *pa; + int a, count, count1, grabbed, i, j, rv; + pa = sfio->pa; *nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; + sfio->pindex0 = OFF_TO_IDX(off); /* * First grab all the pages and wire them. Note that we grab @@ -380,9 +408,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i rhpages = 0; } - for (int i = 0; i < npages;) { - int j, a, count, rv; - + for (i = 0; i < npages;) { /* Skip valid pages. */ if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, xfsize(i, npages, off, len))) { @@ -422,19 +448,41 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i count = min(a + 1, npages - i); /* - * We should not pagein into a valid page, thus we first trim - * any valid pages off the end of request, and substitute - * to bogus_page those, that are in the middle. + * We should not pagein into a valid page because + * there might be still unfinished write tracked by + * e.g. a buffer, thus we substitute any valid pages + * with the bogus one. + * + * We must not leave around xbusy pages which are not + * part of the run passed to vm_pager_getpages(), + * otherwise pager might deadlock waiting for the busy + * status of the page, e.g. if it constitues the + * buffer needed to validate other page. + * + * First trim the end of the run consisting of the + * valid pages, then replace the rest of the valid + * with bogus. */ + count1 = count; for (j = i + count - 1; j > i; j--) { if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, xfsize(j, npages, off, len))) { + vm_page_xunbusy(pa[j]); + SFSTAT_INC(sf_pages_valid); count--; - rhpages = 0; - } else + } else { break; + } } - for (j = i + 1; j < i + count - 1; j++) + + /* + * The last page in the run pa[i + count - 1] is + * guaranteed to be invalid by the trim above, so it + * is not replaced with bogus, thus -1 in the loop end + * condition. + */ + MPASS(pa[i + count - 1]->valid != VM_PAGE_BITS_ALL); + for (j = i + 1; j < i + count - 1; j++) { if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, xfsize(j, npages, off, len))) { vm_page_xunbusy(pa[j]); @@ -442,6 +490,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i SFSTAT_INC(sf_pages_bogus); pa[j] = bogus_page; } + } refcount_acquire(&sfio->nios); rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, @@ -453,12 +502,16 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i /* * Perform full pages recovery before returning EIO. * Pages from 0 to npages are wired. - * Pages from i to npages are also busied. * Pages from (i + 1) to (i + count - 1) may be * substituted to bogus page, and not busied. + * Pages from (i + count) to (i + count1 - 1) are + * not busied. + * Rest of the pages from i to npages are busied. */ for (j = 0; j < npages; j++) { - if (j > i && j < i + count - 1 && + if (j >= i + count && j < i + count1) + ; + else if (j > i && j < i + count - 1 && pa[j] == bogus_page) pa[j] = vm_page_relookup(obj, OFF_TO_IDX(vmoff(j, off))); @@ -477,19 +530,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i if (i + count == npages) SFSTAT_ADD(sf_rhpages_read, rhpages); - /* - * Restore the valid page pointers. They are already - * unbusied, but still wired. - */ - for (j = i + 1; j < i + count - 1; j++) - if (pa[j] == bogus_page) { - pa[j] = vm_page_relookup(obj, - OFF_TO_IDX(vmoff(j, off))); - KASSERT(pa[j], ("%s: page %p[%d] disappeared", - __func__, pa, j)); - - } - i += count; + i += count1; (*nios)++; } From owner-svn-src-head@freebsd.org Mon Mar 30 22:25:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B316269281; Mon, 30 Mar 2020 22:25:59 +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 48rn9K4r6tz4fdY; Mon, 30 Mar 2020 22:25:57 +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 A7CB724B3A; Mon, 30 Mar 2020 21:40:35 +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 02ULeZNf026036; Mon, 30 Mar 2020 21:40:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02ULeZSX026035; Mon, 30 Mar 2020 21:40:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003302140.02ULeZSX026035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Mar 2020 21:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359463 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 22:25:59 -0000 Author: kib Date: Mon Mar 30 21:40:35 2020 New Revision: 359463 URL: https://svnweb.freebsd.org/changeset/base/359463 Log: kern_sendfile.c style: order headers alphabetically. Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:25:00 2020 (r359462) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:40:35 2020 (r359463) @@ -36,16 +36,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include -#include #include #include #include +#include #include #include #include @@ -53,9 +51,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include From owner-svn-src-head@freebsd.org Mon Mar 30 23:03:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 613DA269DD1; Mon, 30 Mar 2020 23:03:03 +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 48rp063ss5z4tPy; Mon, 30 Mar 2020 23:03:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-8.local (unknown [IPv6:2601:648:8881:1e90:1861:dd73:b48f:64cc]) (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 AAA94AE52; Mon, 30 Mar 2020 22:57:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r359459 - head/share/man/man5 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003302008.02UK8R4b070488@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: <0e2d4a81-1536-2d47-bf30-0de5cf19dfbd@FreeBSD.org> Date: Mon, 30 Mar 2020 15:57:50 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003302008.02UK8R4b070488@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:03:05 -0000 On 3/30/20 1:08 PM, Ed Maste wrote: > Author: emaste > Date: Mon Mar 30 20:08:26 2020 > New Revision: 359459 > URL: https://svnweb.freebsd.org/changeset/base/359459 > > Log: > regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 > > ... and a number of other changes since the last regen. Hmm, 359454 was a markup fix to elf.5 and I haven't seen the commit to actually remove GDB_LIBEXEC yet? -- John Baldwin From owner-svn-src-head@freebsd.org Mon Mar 30 23:30:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7661226A6DA; Mon, 30 Mar 2020 23:30:03 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rpbD4w7pz3KvZ; Mon, 30 Mar 2020 23:30:00 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A8F0266BB; Mon, 30 Mar 2020 23:29:54 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02UNTrY3092546; Mon, 30 Mar 2020 23:29:53 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UNTrWa092545; Mon, 30 Mar 2020 23:29:53 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <202003302329.02UNTrWa092545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 30 Mar 2020 23:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359474 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:30:03 -0000 Author: gallatin Date: Mon Mar 30 23:29:53 2020 New Revision: 359474 URL: https://svnweb.freebsd.org/changeset/base/359474 Log: KTLS: Coalesce adjacent TLS trailers & headers to improve PCIe bus efficiency KTLS uses the embedded header and trailer fields of unmapped mbufs. This can lead to "silly" buffer lengths, where we have an mbuf chain that will create a scatter/gather lists with a regular pattern of 13 bytes followed by 16 bytes between each adjacent TLS record. For software ktls we typically wind up with a pattern where we have several TLS records encrypted, and made ready at once. When these records are made ready, we can coalesce these silly buffers in sbready_compress by copying 13b TLS header of the next record into the 16b TLS trailer of the current record. After doing so, we now have a small 29 byte chunk between each TLS record. This marginally increases PCIe bus efficiency. We've seen an almost 1Gb/s increase in peak throughput on Broadwell based Xeons running a 100% software TLS workload with Mellanox ConnectX-4 NICs. Note that this change is ifdef'ed for KTLS, as KTLS is currently the only user of the hdr/trailer feature of unmapped mbufs, and peeking into them is expensive, since the ext_pgs struct lives in separately allocated memory, and may be cold in cache. This optimization is not applicable to HW ("NIC") TLS, as that depends on having the entire TLS record described by a single unmapped mbuf, so we cannot shift parts of the record between mbufs for HW TLS. Reviewed by: jhb, hselasky, scottl Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D24204 Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Mon Mar 30 22:13:32 2020 (r359473) +++ head/sys/kern/uipc_sockbuf.c Mon Mar 30 23:29:53 2020 (r359474) @@ -112,7 +112,42 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, for (m = m0; m != end; m = m->m_next) { MPASS((m->m_flags & M_NOTREADY) == 0); + /* + * NB: In sbcompress(), 'n' is the last mbuf in the + * socket buffer and 'm' is the new mbuf being copied + * into the trailing space of 'n'. Here, the roles + * are reversed and 'n' is the next mbuf after 'm' + * that is being copied into the trailing space of + * 'm'. + */ + n = m->m_next; +#ifdef KERN_TLS + /* Try to coalesce adjacent ktls mbuf hdr/trailers. */ + if ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && + (m->m_flags & M_NOMAP) && + (n->m_flags & M_NOMAP) && + !mbuf_has_tls_session(m) && + !mbuf_has_tls_session(n)) { + struct mbuf_ext_pgs *mpgs, *npgs; + int hdr_len, trail_len; + mpgs = m->m_ext.ext_pgs; + npgs = n->m_ext.ext_pgs; + hdr_len = npgs->hdr_len; + trail_len = mpgs->trail_len; + if (trail_len != 0 && hdr_len != 0 && + trail_len + hdr_len <= MBUF_PEXT_TRAIL_LEN) { + /* copy n's header to m's trailer */ + memcpy(&mpgs->trail[trail_len], npgs->hdr, + hdr_len); + mpgs->trail_len += hdr_len; + m->m_len += hdr_len; + npgs->hdr_len = 0; + n->m_len -= hdr_len; + } + } +#endif + /* Compress small unmapped mbufs into plain mbufs. */ if ((m->m_flags & M_NOMAP) && m->m_len <= MLEN && !mbuf_has_tls_session(m)) { @@ -124,15 +159,6 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, } } - /* - * NB: In sbcompress(), 'n' is the last mbuf in the - * socket buffer and 'm' is the new mbuf being copied - * into the trailing space of 'n'. Here, the roles - * are reversed and 'n' is the next mbuf after 'm' - * that is being copied into the trailing space of - * 'm'. - */ - n = m->m_next; while ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && M_WRITABLE(m) && (m->m_flags & M_NOMAP) == 0 && From owner-svn-src-head@freebsd.org Mon Mar 30 23:40:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0511126AB24; Mon, 30 Mar 2020 23:40:55 +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 48rpqp5n7gz3PMg; Mon, 30 Mar 2020 23:40: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 8E06E22921; Mon, 30 Mar 2020 20:05: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 02UK5AcS070213; Mon, 30 Mar 2020 20:05:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UK59xU070208; Mon, 30 Mar 2020 20:05:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003302005.02UK59xU070208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 30 Mar 2020 20:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359457 - in head: . gnu/usr.bin/gdb share/mk tools/build/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . gnu/usr.bin/gdb share/mk tools/build/mk tools/build/options X-SVN-Commit-Revision: 359457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:40:55 -0000 Author: emaste Date: Mon Mar 30 20:05:09 2020 New Revision: 359457 URL: https://svnweb.freebsd.org/changeset/base/359457 Log: drop GDB_LIBEXEC option (now always true) In-tree gdb is essentially obsolete. We kept it for sparc64 (because gdb in ports lacked sparc64 support) and as a fallback for crashinfo. gdb was installed to /libexec on all archs other than sparc64, where the WITHOUT_GDB_LIBEXEC option was default, with gdb installed to /usr/bin. With sparc64's retirement WITH_GDB_LIBEXEC became the default for all architectures, but it was still possible to set it off and install gdb into /usr/bin. As the next step in gdb's retirement, remove the option and install gdb only into /libexec as the crashinfo fallback. We expect users to install the gdb port or package for debugging. The in-tree gdb lacks support for a number of supported architectures and does not support contemporary DWARF debug info. Reviewed by: jhb (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24227 Deleted: head/tools/build/options/WITHOUT_GDB_LIBEXEC head/tools/build/options/WITH_GDB_LIBEXEC Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/gdb/Makefile head/gnu/usr.bin/gdb/Makefile.inc head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 30 20:04:55 2020 (r359456) +++ head/ObsoleteFiles.inc Mon Mar 30 20:05:09 2020 (r359457) @@ -36,6 +36,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20200330: GDB_LIBEXEC option retired (always true) +OLD_FILES+=usr/bin/gdb +OLD_FILES+=usr/bin/gdbserver +OLD_FILES+=usr/bin/kgdb +OLD_FILES+=usr/share/man/man1/gdb.1.gz +OLD_FILES+=usr/share/man/man1/gdbserver.1.gz +OLD_FILES+=usr/share/man/man1/kgdb.1.gz + # 20200327: OCF refactoring OLD_FILES+=usr/share/man/man9/crypto_find_driver.9 OLD_FILES+=usr/share/man/man9/crypto_register.9 Modified: head/gnu/usr.bin/gdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/Makefile Mon Mar 30 20:04:55 2020 (r359456) +++ head/gnu/usr.bin/gdb/Makefile Mon Mar 30 20:05:09 2020 (r359457) @@ -4,10 +4,4 @@ SUBDIR= libgdb gdb kgdb -.if ${MK_GDB_LIBEXEC} == "no" -.if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) -SUBDIR+=gdbserver -.endif -.endif - .include Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Mon Mar 30 20:04:55 2020 (r359456) +++ head/gnu/usr.bin/gdb/Makefile.inc Mon Mar 30 20:05:09 2020 (r359457) @@ -58,7 +58,7 @@ GENSRCS+= nm.h tm.h CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= -.elif ${MK_GDB_LIBEXEC} != "no" +.else BINDIR?= /usr/libexec MAN= .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Mar 30 20:04:55 2020 (r359456) +++ head/share/mk/src.opts.mk Mon Mar 30 20:05:09 2020 (r359457) @@ -106,7 +106,6 @@ __DEFAULT_YES_OPTIONS = \ FTP \ GAMES \ GDB \ - GDB_LIBEXEC \ GNU_DIFF \ GNU_GREP \ GOOGLETEST \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 20:04:55 2020 (r359456) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 20:05:09 2020 (r359457) @@ -2282,16 +2282,7 @@ OLD_FILES+=usr/bin/llvm-profdata OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz .endif -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == yes -OLD_FILES+=usr/bin/gdb -OLD_FILES+=usr/bin/gdbserver -OLD_FILES+=usr/bin/kgdb -OLD_FILES+=usr/share/man/man1/gdb.1.gz -OLD_FILES+=usr/share/man/man1/gdbserver.1.gz -OLD_FILES+=usr/share/man/man1/kgdb.1.gz -.endif - -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == no +.if ${MK_GDB} == no OLD_FILES+=usr/libexec/gdb OLD_FILES+=usr/libexec/kgdb .endif From owner-svn-src-head@freebsd.org Mon Mar 30 23:41:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 169D526AB66; Mon, 30 Mar 2020 23:41:18 +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 48rprF2nxSz3PTq; Mon, 30 Mar 2020 23:41: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 2CC9F22762; Mon, 30 Mar 2020 20:01:45 +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 02UK1jXd069837; Mon, 30 Mar 2020 20:01:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UK1iEW069836; Mon, 30 Mar 2020 20:01:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003302001.02UK1iEW069836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 30 Mar 2020 20:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359455 - head/libexec/flua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/flua X-SVN-Commit-Revision: 359455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:41:18 -0000 Author: kevans Date: Mon Mar 30 20:01:44 2020 New Revision: 359455 URL: https://svnweb.freebsd.org/changeset/base/359455 Log: flua: follow-up to r359453, don't bother with libedit in bootstrap The bootstrap flua should not be used for REPL-like activities; exclude it to save the dependency on libedit and not waste time with it. X-MFC-With: r359453 Modified: head/libexec/flua/Makefile Modified: head/libexec/flua/Makefile ============================================================================== --- head/libexec/flua/Makefile Mon Mar 30 19:10:12 2020 (r359454) +++ head/libexec/flua/Makefile Mon Mar 30 20:01:44 2020 (r359455) @@ -24,9 +24,12 @@ SRCS+= lfs.c lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" -# readline bits +# readline bits; these aren't needed if we're building a bootstrap flua, as we +# don't expect that one to see any REPL usage. +.if !defined(BOOTSTRAPPING) CFLAGS+= -DLUA_USE_READLINE CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit LIBADD+= edit +.endif .include From owner-svn-src-head@freebsd.org Mon Mar 30 23:42:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62E0526AC41; Mon, 30 Mar 2020 23:42:26 +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 48rpsW2Ygrz3Q5g; Mon, 30 Mar 2020 23:42:22 +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 B3D502291F; Mon, 30 Mar 2020 20:04:56 +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 02UK4ub5070140; Mon, 30 Mar 2020 20:04:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02UK4uAJ070139; Mon, 30 Mar 2020 20:04:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003302004.02UK4uAJ070139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 30 Mar 2020 20:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359456 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:42:26 -0000 Author: brooks Date: Mon Mar 30 20:04:55 2020 New Revision: 359456 URL: https://svnweb.freebsd.org/changeset/base/359456 Log: Relax existence check of ${LOCALBASE}/bin/kyua After the base kyua import the testsuite can utilize the in-base kyua just fine. Submitted by: Dries Michiels Differential Revision: https://reviews.freebsd.org/D24230 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Mar 30 20:01:44 2020 (r359455) +++ head/Makefile.inc1 Mon Mar 30 20:04:55 2020 (r359456) @@ -1988,7 +1988,7 @@ sign-packages: _pkgbootstrap .PHONY # Run test suite on installed world. # checkworld: .PHONY - @if [ ! -x "${LOCALBASE}/bin/kyua" ]; then \ + @if [ ! -x "${LOCALBASE}/bin/kyua" ] && [ ! -x "/usr/bin/kyua" ]; then \ echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ exit 1; \ fi From owner-svn-src-head@freebsd.org Tue Mar 31 00:11:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D493426BF76; Tue, 31 Mar 2020 00:10:59 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) 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 48rqVT0TXYz45Jt; Tue, 31 Mar 2020 00:10:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-qt1-x836.google.com with SMTP id x16so16881312qts.11; Mon, 30 Mar 2020 17:10:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GdU3a88V81Q/n2+nDxktv0GPS6u4g9yhq3byE998R2s=; b=oKwVrF3Gk4cTmgpSESohDnMqG4ROuNtt38o75mwsMHHTQoKpQXg+0ptHcqPBRnQ8Vw 3YciHe5AgHP4wgdOmy+s+VpR229avDMkktRwARwEjsR7QpeFLezI5fB9UX1gh0l+s7Pf 4L+pE3+UpK2TMXileCH8E1/n6/LzVpXzCH8EkK6qmJT5XUwQZQjhcRPu0ZaHGbNByf0m Y4F9U3JMMHatJncyVjpnzUht7niBK2QUlQVBZHCrbDHYSirw3G6wSoQUpaifscNq2zx2 crpNJ7t9pVQXreITgpqJtcjcFcRXKdvrbnzGQwE0gChKURog71FOiQJb5W6ztCXmwzsX uY7g== X-Gm-Message-State: ANhLgQ1OV2NJND1bMHnBE6ga7btvxWq6dqwgiiQ4a51VVkOPMPVUfjFl QsvppLinWQQbh3rBwkz7Ffe2yevPugEwnJx6q872+37s X-Google-Smtp-Source: ADFU+vvC2vZknOpzw/cadXHirjg8/xSg/6gsydZ6G7vgENvXnvb95/umdASaElLWKBW2ddK3dZ+CMqtfufVALrBs5IA= X-Received: by 2002:a02:ccb8:: with SMTP id t24mr1665991jap.8.1585611592001; Mon, 30 Mar 2020 16:39:52 -0700 (PDT) MIME-Version: 1.0 References: <202003302008.02UK8R4b070488@repo.freebsd.org> <0e2d4a81-1536-2d47-bf30-0de5cf19dfbd@FreeBSD.org> In-Reply-To: <0e2d4a81-1536-2d47-bf30-0de5cf19dfbd@FreeBSD.org> From: Ed Maste Date: Mon, 30 Mar 2020 19:39:39 -0400 Message-ID: Subject: Re: svn commit: r359459 - head/share/man/man5 To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48rqVT0TXYz45Jt X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 00:11:00 -0000 On Mon, 30 Mar 2020 at 19:03, John Baldwin wrote: > > and I haven't seen the commit to > actually remove GDB_LIBEXEC yet? I haven't seen the commit mail for r359457 yet either, but the change is committed. From owner-svn-src-head@freebsd.org Tue Mar 31 01:13:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25C3F26E4C4; Tue, 31 Mar 2020 01:13:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rrt53nCHz4TdY; Tue, 31 Mar 2020 01:13:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E2D627D6A; Tue, 31 Mar 2020 01:12:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02V1Cr8q059881; Tue, 31 Mar 2020 01:12:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02V1Cr0M059880; Tue, 31 Mar 2020 01:12:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202003310112.02V1Cr0M059880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 31 Mar 2020 01:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359475 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 359475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 01:13:04 -0000 Author: bdrewery Date: Tue Mar 31 01:12:53 2020 New Revision: 359475 URL: https://svnweb.freebsd.org/changeset/base/359475 Log: Remove dead code leftover from r331018. Sponsored by: Dell EMC Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Mar 30 23:29:53 2020 (r359474) +++ head/sys/vm/vm_page.c Tue Mar 31 01:12:53 2020 (r359475) @@ -2048,8 +2048,6 @@ again: if (vm_object_reserv(object) && (m = vm_reserv_alloc_page(object, pindex, domain, req, mpred)) != NULL) { - domain = vm_phys_domain(m); - vmd = VM_DOMAIN(domain); goto found; } #endif @@ -2248,8 +2246,6 @@ again: if (vm_object_reserv(object) && (m_ret = vm_reserv_alloc_contig(object, pindex, domain, req, mpred, npages, low, high, alignment, boundary)) != NULL) { - domain = vm_phys_domain(m_ret); - vmd = VM_DOMAIN(domain); goto found; } #endif From owner-svn-src-head@freebsd.org Tue Mar 31 01:48:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C22142704D3; Tue, 31 Mar 2020 01:48:09 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f196.google.com (mail-yb1-f196.google.com [209.85.219.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 48rsfb0PcNz3DSp; Tue, 31 Mar 2020 01:48:06 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f196.google.com with SMTP id o70so10222479ybg.10; Mon, 30 Mar 2020 18:48:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NOlsgGvdj8P1l/z5OHlw1qtGp4ydZ8ah/zO13iXPIpw=; b=teWhZcEp3c0CQht72bLkp7G7L/HufcP7xhy3DE70esaHMQudaIwxYVeyFC7l7hqpU8 Y9q7GWvordAMRdfKD/4pTRxdqbnk4ifebbGgOzzBXzcrXA/Jke5XRZA8frZi/7e8txWf 4ppl2YnFjKqQSoGkfACj9JRgzOv+RZrU34T+jfZJ7gmuf6qLUhaoNIi1ypVvMS/nPAX8 zhlDP3LYwJmleQbjciZbfbihomaDkbLTU357Z5mckaBlKFoRzGrTxYqeJhgwfXVxlZYp ZsUbWs2VdbO52ImkQOxv6JJLowJS/wZrpEcZQKBQvKOOfV9vcZaOCrXhviWzC9XBVbRc 5IHQ== X-Gm-Message-State: ANhLgQ0vsOLLYI8HRPzZoIGZHVIYh5yZ0Q+1yzGJhGX1CBcGkvs0NiW3 ODavpIFwfwqe9Q/McWUv2IWy2wG+R8EdFZXOkXg5UdZ1 X-Google-Smtp-Source: ADFU+vsk2ugFuPDUC6oiifflC0YGhvImLdFSXF9AQLJa/dK9z3tBu2yp+4GfYJl62uwywHFl1dtr7SZYrEO73YnxWi4= X-Received: by 2002:a25:ccce:: with SMTP id l197mr2896832ybf.127.1585618863423; Mon, 30 Mar 2020 18:41:03 -0700 (PDT) MIME-Version: 1.0 References: <202003301422.02UEMrxL059978@repo.freebsd.org> In-Reply-To: <202003301422.02UEMrxL059978@repo.freebsd.org> From: Li-Wen Hsu Date: Tue, 31 Mar 2020 09:40:51 +0800 Message-ID: Subject: Re: svn commit: r359436 - in head/sys: kern net sys To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48rsfb0PcNz3DSp X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 01:48:11 -0000 On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > Author: markj > Date: Mon Mar 30 14:22:52 2020 > New Revision: 359436 > URL: https://svnweb.freebsd.org/changeset/base/359436 > > Log: > Simplify taskqgroup inititialization. > > taskqgroup initialization was broken into two steps: > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > Step 2 tries to handle the case where tasks have already been attached > to a queue, by migrating them to their intended queue. In particular, > tasks can't be enqueued before step 2 has completed. This breaks NFS > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > Simplify initialization: do all initialization except for CPU binding at > SI_SUB_TASKQ. This means that until CPU binding is completed, group > tasks may be executed on a CPU other than that to which they were bound, > but this should not be a problem for existing users of the taskqgroup > KPIs. > > Reported by: sbruno > Tested by: bdragon, sbruno > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D24188 > > Modified: > head/sys/kern/subr_gtaskqueue.c > head/sys/net/iflib.c > head/sys/sys/gtaskqueue.h Hi Mark, I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in the CI after this commit: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull It seems could be triggered by sys.netinet6.frag6.* sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots of test cases timed out. Can you help check these? Thanks, Li-Wen From owner-svn-src-head@freebsd.org Tue Mar 31 01:59:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EA062711BA; Tue, 31 Mar 2020 01:59:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (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 48rsvS4gMsz3J9f; Tue, 31 Mar 2020 01:59:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x841.google.com with SMTP id f20so17079729qtq.6; Mon, 30 Mar 2020 18:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=eLfmAWn2RrR1dw4ptDdqATaLwrpZKzx+N6UXgCk++Fw=; b=OgH3DElSyubHs8e5Lzy1+rig/h7xzmG9ITd1F4pR1CO0lV5+tGP0ONl/HoRAiynGRd O2dJ+QvQwkzwkFJPodTRsDf6KXYMQv4CqEhd7OtETdUXF88JpGtoII6z09c1id0BZUZj 8HXrVcHg8AhXrndA3cetboP3vBjCjuCWBxeVULIbgszxShkYbiJTQM4vOJsQTnFwW+fD 72iA87LkFtyQaJ0VZU3Y+QDHm8vNjxADXPRM+fI1qAwnP0z/YXOYbNBFaYsddaS7Kbvv B6AcGvHoImxKkEnPzQAV3h6nm9AquEjot5mPeZNhm4rVDWfvoMya3yEoYQqfWv527DeZ Xc5w== 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=eLfmAWn2RrR1dw4ptDdqATaLwrpZKzx+N6UXgCk++Fw=; b=jqwIB5UIDQf2fjlXZlZq69m4WwIM8tLDHolCQmAv/Zo6uXjvUpcMc4ZciUxTDoIRfV /ArlnWvbY30oBrmU0cfEAtM5KBOYjsGLQtaUCSBADh8MsfKxcTjJZ4S5QacSZDI3Rmhe uHz0ROTqt9mWpfZC+AS0Ur6BCNQZzy2y5UyDAYvnasH7FmuM5/8Elxz9qm3T0/UU+qdt 4NpVQMlBB3NViMYbbczc1sfJBpPCqx0KPcDhOuujgWSXgjggAVD/2ELkXN6yr9guHYp/ ehHxramG7zNeCgC8LNxEAd7STQ3lphhGr2J2xeEoALXE1rAb8eZwBB4r5vWt5s8+9DGI ai3A== X-Gm-Message-State: ANhLgQ1DhA+J8c+C8VUyQRIy5EPKRlWHWcqZMWm5gQc2b1H2YSl6Z0QO zHUlANUYGIMy3zDW4qTzLnaJjCyt X-Google-Smtp-Source: ADFU+vuYVgNq8ZAVzHwJ8I7xaHqxzt11Y4V2T5Kz7vyfOZuSh4baRkk/Uv9uJNsZbLAeQTDVjri5AQ== X-Received: by 2002:aed:3244:: with SMTP id y62mr3005654qtd.242.1585619948266; Mon, 30 Mar 2020 18:59:08 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id u25sm11558260qkj.71.2020.03.30.18.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 18:59:07 -0700 (PDT) Sender: Mark Johnston Date: Mon, 30 Mar 2020 21:59:05 -0400 From: Mark Johnston To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Message-ID: <20200331015905.GC65028@raichu> References: <202003301422.02UEMrxL059978@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48rsvS4gMsz3J9f 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]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 01:59:19 -0000 On Tue, Mar 31, 2020 at 09:40:51AM +0800, Li-Wen Hsu wrote: > On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > > > Author: markj > > Date: Mon Mar 30 14:22:52 2020 > > New Revision: 359436 > > URL: https://svnweb.freebsd.org/changeset/base/359436 > > > > Log: > > Simplify taskqgroup inititialization. > > > > taskqgroup initialization was broken into two steps: > > > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > > > Step 2 tries to handle the case where tasks have already been attached > > to a queue, by migrating them to their intended queue. In particular, > > tasks can't be enqueued before step 2 has completed. This breaks NFS > > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > > > Simplify initialization: do all initialization except for CPU binding at > > SI_SUB_TASKQ. This means that until CPU binding is completed, group > > tasks may be executed on a CPU other than that to which they were bound, > > but this should not be a problem for existing users of the taskqgroup > > KPIs. > > > > Reported by: sbruno > > Tested by: bdragon, sbruno > > MFC after: 1 month > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D24188 > > > > Modified: > > head/sys/kern/subr_gtaskqueue.c > > head/sys/net/iflib.c > > head/sys/sys/gtaskqueue.h > > Hi Mark, > > I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in > the CI after this commit: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull > > It seems could be triggered by sys.netinet6.frag6.* > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > of test cases timed out. > > Can you help check these? I see, it is actually caused by r359438. I'm looking at it now. From owner-svn-src-head@freebsd.org Tue Mar 31 02:26:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2883227278B; Tue, 31 Mar 2020 02:26:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rtVL4nghz3xls; Tue, 31 Mar 2020 02:26:02 +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 561FBDB0; Tue, 31 Mar 2020 02:25:54 +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 02V2PstZ002634; Tue, 31 Mar 2020 02:25:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02V2PsAC002633; Tue, 31 Mar 2020 02:25:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003310225.02V2PsAC002633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 31 Mar 2020 02:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359477 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 359477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 02:26:06 -0000 Author: markj Date: Tue Mar 31 02:25:53 2020 New Revision: 359477 URL: https://svnweb.freebsd.org/changeset/base/359477 Log: Use a dedicated taskqueue thread for in6m_release_task(). Interfaces may be detached from a taskqueue_thread task, for example by prison_complete(), so after r359438, when draining the queue we may end up deadlocking. Reported by: Jenkins via lwhsu MFC with: r359438 Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Tue Mar 31 01:18:00 2020 (r359476) +++ head/sys/netinet6/in6_mcast.c Tue Mar 31 02:25:53 2020 (r359477) @@ -510,14 +510,19 @@ in6m_release(struct in6_multi *inm) } } -static struct task free_task; +/* + * Interface detach can happen in a taskqueue thread context, so we must use a + * dedicated thread to avoid deadlocks when draining in6m_release tasks. + */ +TASKQUEUE_DEFINE_THREAD(in6m_free); +static struct task in6m_free_task; static struct in6_multi_head in6m_free_list = SLIST_HEAD_INITIALIZER(); static void in6m_release_task(void *arg __unused, int pending __unused); static void in6m_init(void) { - TASK_INIT(&free_task, 0, in6m_release_task, NULL); + TASK_INIT(&in6m_free_task, 0, in6m_release_task, NULL); } SYSINIT(in6m_init, SI_SUB_TASKQ, SI_ORDER_ANY, in6m_init, NULL); @@ -529,13 +534,13 @@ in6m_release_list_deferred(struct in6_multi_head *inmh mtx_lock(&in6_multi_free_mtx); SLIST_CONCAT(&in6m_free_list, inmh, in6_multi, in6m_nrele); mtx_unlock(&in6_multi_free_mtx); - taskqueue_enqueue(taskqueue_thread, &free_task); + taskqueue_enqueue(taskqueue_in6m_free, &in6m_free_task); } void in6m_release_wait(void) { - taskqueue_drain_all(taskqueue_thread); + taskqueue_drain_all(taskqueue_in6m_free); } void From owner-svn-src-head@freebsd.org Tue Mar 31 02:36:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 555A2273046; Tue, 31 Mar 2020 02:36:50 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rtkn1k4mz4294; Tue, 31 Mar 2020 02:36:49 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8ED210C4; Tue, 31 Mar 2020 02:36:40 +0000 (UTC) (envelope-from bcran@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02V2aecX009084; Tue, 31 Mar 2020 02:36:40 GMT (envelope-from bcran@FreeBSD.org) Received: (from bcran@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02V2aeEN009083; Tue, 31 Mar 2020 02:36:40 GMT (envelope-from bcran@FreeBSD.org) Message-Id: <202003310236.02V2aeEN009083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcran set sender to bcran@FreeBSD.org using -f From: Rebecca Cran Date: Tue, 31 Mar 2020 02:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359478 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: bcran X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 359478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 02:36:50 -0000 Author: bcran Date: Tue Mar 31 02:36:39 2020 New Revision: 359478 URL: https://svnweb.freebsd.org/changeset/base/359478 Log: Bhyve: fix SMBIOS Type 17 table generation According to the SMBIOS specification (revision 2.7 or newer), the extended module size field should only be used for sizes that can't fit in the older size field. Reviewed by: rgrimes, grehan, jhb Differential Revision: https://reviews.freebsd.org/D24107 Modified: head/usr.sbin/bhyve/smbiostbl.c Modified: head/usr.sbin/bhyve/smbiostbl.c ============================================================================== --- head/usr.sbin/bhyve/smbiostbl.c Tue Mar 31 02:25:53 2020 (r359477) +++ head/usr.sbin/bhyve/smbiostbl.c Tue Mar 31 02:36:39 2020 (r359478) @@ -255,7 +255,7 @@ struct smbios_table_type17 { uint16_t errhand; /* handle of mem error data */ uint16_t twidth; /* total width in bits */ uint16_t dwidth; /* data width in bits */ - uint16_t size; /* size in bytes */ + uint16_t size; /* size in kb or mb */ uint8_t form; /* form factor */ uint8_t set; /* set */ uint8_t dloc; /* device locator string */ @@ -268,7 +268,7 @@ struct smbios_table_type17 { uint8_t asset; /* asset tag string */ uint8_t part; /* part number string */ uint8_t attributes; /* attributes */ - uint32_t xsize; /* extended size in mbs */ + uint32_t xsize; /* extended size in mb */ uint16_t curspeed; /* current speed in mhz */ uint16_t minvoltage; /* minimum voltage */ uint16_t maxvoltage; /* maximum voltage */ @@ -444,7 +444,7 @@ struct smbios_table_type17 smbios_type17_template = { -1, /* handle of memory error data */ 64, /* total width in bits including ecc */ 64, /* data width in bits */ - 0x7fff, /* size in bytes (0x7fff=use extended)*/ + 0, /* size in kb or mb (0x7fff=use extended)*/ SMBIOS_MDFF_UNKNOWN, 0, /* set (0x00=none, 0xff=unknown) */ 1, /* device locator string */ @@ -695,20 +695,39 @@ smbios_type17_initializer(struct smbios_structure *tem uint16_t *n, uint16_t *size) { struct smbios_table_type17 *type17; + uint64_t memsize, size_KB, size_MB; smbios_generic_initializer(template_entry, template_strings, curaddr, endaddr, n, size); type17 = (struct smbios_table_type17 *)curaddr; type17->arrayhand = type16_handle; - type17->xsize = guest_lomem; - if (guest_himem > 0) { - curaddr = *endaddr; - smbios_generic_initializer(template_entry, template_strings, - curaddr, endaddr, n, size); - type17 = (struct smbios_table_type17 *)curaddr; - type17->arrayhand = type16_handle; - type17->xsize = guest_himem; + memsize = guest_lomem + guest_himem; + size_KB = memsize / 1024; + size_MB = memsize / MB; + + /* A single Type 17 entry can't represent more than ~2PB RAM */ + if (size_MB > 0x7FFFFFFF) { + printf("Warning: guest memory too big for SMBIOS Type 17 table: " + "%luMB greater than max supported 2147483647MB\n", size_MB); + + size_MB = 0x7FFFFFFF; + } + + /* See SMBIOS 2.7.0 section 7.18 - Memory Device (Type 17) */ + if (size_KB <= 0x7FFF) { + /* Can represent up to 32767KB with the top bit set */ + type17->size = size_KB | (1 << 15); + } else if (size_MB < 0x7FFF) { + /* Can represent up to 32766MB with the top bit unset */ + type17->size = size_MB & 0x7FFF; + } else { + type17->size = 0x7FFF; + /* + * Can represent up to 2147483647MB (~2PB) + * The top bit is reserved + */ + type17->xsize = size_MB & 0x7FFFFFFF; } return (0); From owner-svn-src-head@freebsd.org Tue Mar 31 02:55:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAF55273D06; Tue, 31 Mar 2020 02:55:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 48rv7l22Vdz48JH; Tue, 31 Mar 2020 02:54:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd35.google.com with SMTP id b12so3956389ion.8; Mon, 30 Mar 2020 19:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RIBTpf3eCZ5OB7cP9Rcxkkw7xjAbDYrW49M/oMRmTwo=; b=e4uRO5lL2gkqVmT7ptuV3uU68kI0/yZqXKbT0ro4U918GMoiRefvFgCex2Ls/u4iAj aa0R8V3uAa/yBZChhBT4io6meCaeGHI06i8bShBmP8qMci37J9H+o1SK/qMcNkPsnUVi Gg3/3MxC8lDSHphIP9UmTIzkiMLOnp6s4zaozwsSz25qodCA1RwnXhYqV6IB5FpXxIP2 H6DPwUlQGhCMfCDWu5gs+vIC99eGhrX8JD+r1dvbhYWKJ90Ag0IJl7H2zxEHA/Usge8V XwY0TiYtGQRW4QENpFaCi+h9pOf/XxykBZ21SMXQNJmY3D6cJBoXaVz2z6qW8H0y35VK 3dZw== 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=RIBTpf3eCZ5OB7cP9Rcxkkw7xjAbDYrW49M/oMRmTwo=; b=nmOwLGXR+8LIbVBMSBhUfT2eiUy+h6a2Opc1CBOBl6EkMYsGs3Gq6haiNslDmCzW4x k/d66Abr3IYs9tfqCj5z/sdkw4F78WdPhiGNsmt+v62ebjRpjRKAadbJAc5NYBGPbIhm qxdPxVjlwnawPG1pVc79HopheiBu3H11Hem3bP5zu45Rdm16O5IUH44acPiA07j4IV+3 5Na9+agxmENhHawvBlnhsm15Qs3uG2nVthHz2+KYXSNMi4LEqtOeAFAlLrz/6FMXmGSu XBCfLowH5Jafl9ENxmcmdav+yNTJzj8uBZvia+r3+Hz92TQ4i3CSRtGEQYAemeIu8kEC 018Q== X-Gm-Message-State: ANhLgQ2OXacQPz3JntbMQnh0TEVYCBQeWXW15YlMF2CQj16IyTezHlst JXOtMduN2XueGUw0jmynJcuHF52L X-Google-Smtp-Source: ADFU+vsybWqg6UYXBMdefKqtw6z52tlpmBH34eIIC8V6hagRbdZa09WAbXEggS/qIGWJGvp/WxGWDA== X-Received: by 2002:ac8:1b2f:: with SMTP id y44mr3066299qtj.25.1585621892734; Mon, 30 Mar 2020 19:31:32 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id d2sm11766605qkl.98.2020.03.30.19.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 19:31:32 -0700 (PDT) Sender: Mark Johnston Date: Mon, 30 Mar 2020 22:31:27 -0400 From: Mark Johnston To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Message-ID: <20200331023127.GA97238@raichu> References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331015905.GC65028@raichu> X-Rspamd-Queue-Id: 48rv7l22Vdz48JH X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=e4uRO5lL; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-3.16 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.46)[ip: (-6.46), ipnet: 2607:f8b0::/32(-0.35), asn: 15169(-0.45), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.d.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]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; 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]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 02:55:22 -0000 On Mon, Mar 30, 2020 at 09:59:05PM -0400, Mark Johnston wrote: > On Tue, Mar 31, 2020 at 09:40:51AM +0800, Li-Wen Hsu wrote: > > On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > > > > > Author: markj > > > Date: Mon Mar 30 14:22:52 2020 > > > New Revision: 359436 > > > URL: https://svnweb.freebsd.org/changeset/base/359436 > > > > > > Log: > > > Simplify taskqgroup inititialization. > > > > > > taskqgroup initialization was broken into two steps: > > > > > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > > > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > > > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > > > > > Step 2 tries to handle the case where tasks have already been attached > > > to a queue, by migrating them to their intended queue. In particular, > > > tasks can't be enqueued before step 2 has completed. This breaks NFS > > > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > > > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > > > > > Simplify initialization: do all initialization except for CPU binding at > > > SI_SUB_TASKQ. This means that until CPU binding is completed, group > > > tasks may be executed on a CPU other than that to which they were bound, > > > but this should not be a problem for existing users of the taskqgroup > > > KPIs. > > > > > > Reported by: sbruno > > > Tested by: bdragon, sbruno > > > MFC after: 1 month > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision: https://reviews.freebsd.org/D24188 > > > > > > Modified: > > > head/sys/kern/subr_gtaskqueue.c > > > head/sys/net/iflib.c > > > head/sys/sys/gtaskqueue.h > > > > Hi Mark, > > > > I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in > > the CI after this commit: > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull > > > > It seems could be triggered by sys.netinet6.frag6.* > > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > > of test cases timed out. > > > > Can you help check these? > > I see, it is actually caused by r359438. I'm looking at it now. I verified that the netpfil and netinet6 tests pass with r359477. From owner-svn-src-head@freebsd.org Tue Mar 31 05:56:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9129A278B1F; Tue, 31 Mar 2020 05:56:41 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (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 48rz9L6780z4HDj; Tue, 31 Mar 2020 05:56:38 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f170.google.com with SMTP id c13so7247549ybp.9; Mon, 30 Mar 2020 22:56:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FZ+X4tTI5d7SPq5xyrm9v6eN8WnBI+WqIVTJKRGij5M=; b=j2EXyaQeKXr1yLaXR8D2geW8WyyWDoy1MTosroaIqT96rlAtJvFhIzlr+fwCuFWCFo em/Kg4sgzM0TbluM2dgHb0KyDTVOd9urmXCPjhJc1PMifmGD4k5VWBfsISqqaSoycGJA 6tPwc50rH4nqatmL0WFTf6tndu+ERZ7d1JWnCp0zvsKQO8G6Hl0nyu82f5S1lP3lDP0J vvppohSNoSDr8X//4dTYb4s/wdc4WeGKXito9RF0krf2/Oo02llY1IG1HvZuYAjSDsSV Re+RqOq/jhHmxml90hQkMaQUqKZCCJKrRm/z4HVTXqAjbJsAUy3TXR4SMkxW1+z79WRL G76g== X-Gm-Message-State: ANhLgQ0JIZrk7Q2Pew8K8j7GxCiMMDBNZlsawATRLV1xIgNGZ2wJ8pk+ CKDaHzq55iiCd4nxOybnA6zALJ15tMDMwt8reLmUSwnt X-Google-Smtp-Source: ADFU+vtZlEKB5GUzR5meegquCsChCjr2O6dK9N+QKIGbDmbMi5RBvjV46huuXHmwB5EamBcc099UtYRHUkN/phcEJMI= X-Received: by 2002:a25:10d4:: with SMTP id 203mr26737113ybq.176.1585634190118; Mon, 30 Mar 2020 22:56:30 -0700 (PDT) MIME-Version: 1.0 References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> In-Reply-To: <20200331023127.GA97238@raichu> From: Li-Wen Hsu Date: Tue, 31 Mar 2020 13:56:17 +0800 Message-ID: Subject: Re: svn commit: r359436 - in head/sys: kern net sys To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48rz9L6780z4HDj X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 05:56:41 -0000 On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston wrote: > > > It seems could be triggered by sys.netinet6.frag6.* > > > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > > > of test cases timed out. > > > > > > Can you help check these? > > > > I see, it is actually caused by r359438. I'm looking at it now. > > I verified that the netpfil and netinet6 tests pass with r359477. Thanks for the fixing, the latest test panics at epair_qflush: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull while executing sys.netpfil.pf.* tests. I'm not sure if this is related or because of previous commits (I suspect the later). I'll look into this. Best, Li-Wen From owner-svn-src-head@freebsd.org Tue Mar 31 06:25:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AE35279230; Tue, 31 Mar 2020 06:25:53 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rzq446qMz4SDj; Tue, 31 Mar 2020 06:25:52 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92C184638; Tue, 31 Mar 2020 06:25:44 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02V6Pi8A048606; Tue, 31 Mar 2020 06:25:44 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02V6Phi6048600; Tue, 31 Mar 2020 06:25:43 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202003310625.02V6Phi6048600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Tue, 31 Mar 2020 06:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359479 - in head: share/man/man4 sys/dev/intel sys/modules sys/modules/pchtherm X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/intel sys/modules sys/modules/pchtherm X-SVN-Commit-Revision: 359479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 06:25:53 -0000 Author: takawata Date: Tue Mar 31 06:25:43 2020 New Revision: 359479 URL: https://svnweb.freebsd.org/changeset/base/359479 Log: Add Platform Controller Hub built-in thermal management device driver. Differential Revision: https://reviews.freebsd.org/D24077 Added: head/share/man/man4/pchtherm.4 (contents, props changed) head/sys/dev/intel/pchtherm.c (contents, props changed) head/sys/modules/pchtherm/ head/sys/modules/pchtherm/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Mar 31 02:36:39 2020 (r359478) +++ head/share/man/man4/Makefile Tue Mar 31 06:25:43 2020 (r359479) @@ -404,6 +404,7 @@ MAN= aac.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ + ${_pchtherm.4} \ pci.4 \ pcib.4 \ pcic.4 \ @@ -815,6 +816,7 @@ _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 _padlock.4= padlock.4 +_pchtherm.4= pchtherm.4 _rr232x.4= rr232x.4 _speaker.4= speaker.4 _spkr.4= spkr.4 Added: head/share/man/man4/pchtherm.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/pchtherm.4 Tue Mar 31 06:25:43 2020 (r359479) @@ -0,0 +1,117 @@ +.\" +.\" Copyright (c) 2020 Takanori Watanabe +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 15, 2020 +.Dt pchtherm 4 +.Os +.Sh NAME +.Nm pchtherm +.Nd Intel PCH thermal subsystem +.Sh SYNOPSIS +.Cd "device pci" +.Cd "device pchtherm" +.Sh DESCRIPTION +The +.Nm +driver provides access to sensor data and configuration +installed in Intel PCH chipset. +.Nm +configuration register. +.Pp +The access to +.Nm +data is made via the +.Xr sysctl 8 +interface: +.Bd -literal +dev.pchtherm.0.ctt: 115.0C +dev.pchtherm.0.temperature: 28.5C +dev.pchtherm.0.t2temp: 91.0C +dev.pchtherm.0.t1temp: 86.0C +dev.pchtherm.0.t0temp: 81.0C +dev.pchtherm.0.tahv: 83.0C +dev.pchtherm.0.talv: 30.0C +dev.pchtherm.0.pmtime: 32 +dev.pchtherm.0.pmtemp: 50.0C +dev.pchtherm.0.%parent: pci0 +dev.pchtherm.0.%pnpinfo: vendor=0x8086 device=0x9d31 subvendor=0x17aa subdevice=0x2256 class=0x118000 +dev.pchtherm.0.%location: slot=20 function=2 dbsf=pci0:0:20:2 +dev.pchtherm.0.%driver: pchtherm +dev.pchtherm.0.%desc: Skylake PCH Thermal Subsystem +dev.pchtherm.%parent: +.Ed +.Bl -tag -width ".Va dev.pchtherm.%d.pch_hot_level" +.It Va dev.pchtherm.%d.temperature +Is the read-only value of the current temperature read by the sensor. +.It Va dev.pchtherm.%d.ctt +When the system reaches this temperature, it will shut down. +This will not appear when this feature is disabled and locked down. +.It Va dev.pchtherm.%d.t0temp +When temperature is under this value, system will be in T0 state. +.It Va dev.pchtherm.%d.t1temp +When temperature is over +.Va t0temp +and under this value, system will be in T1 state. +.It Va dev.pchtherm.%d.t2temp +When temperature is over +.Va t1temp +and under this value, system will be in T2 state. +Over this value, system will be in T3 state. +.It Va dev.pchtherm.%d.talv +Lower alart value. +This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). +.It Va dev.pchtherm.%d.tahv +High alart value. +This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). +.It Va dev.pchtherm.%d.pmtemp +Sensor Power management temperature. +Under this temperature, sensor will idle during +.Va pmtime +second. +.It Va dev.pchtherm.%d.pmtime +Sensor idle duration when low temperature. +.It Va dev.pchtherm.%d.pch_hot_level +When temperature is higher than this value, PCHHOT# pin will assert. +This value is not appear when this feature is disabled and locked down. +.El +.Pp +Please check the PCH datasheets for more details. +.Pp +.Sh CAVEAT +All values are read-only. +And it do not support event interrupt for now. +.Sh SEE ALSO +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 13.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Takanori Watanabe Aq Mt takawata@FreeBSD.org . Added: head/sys/dev/intel/pchtherm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/intel/pchtherm.c Tue Mar 31 06:25:43 2020 (r359479) @@ -0,0 +1,316 @@ +/* + * Copyright (c) 2020 Takanori Watanabe + * + * 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 + +#define PCHTHERM_REG_TEMP 0 +#define PCHTHERM_REG_TSC 4 +#define PCHTHERM_REG_TSS 6 +#define PCHTHERM_REG_TSEL 8 +#define PCHTHERM_REG_TSREL 0xa +#define PCHTHERM_REG_TSMIC 0xc +#define PCHTHERM_REG_CTT 0x10 +#define PCHTHERM_REG_TAHV 0x14 +#define PCHTHERM_REG_TALV 0x18 +#define PCHTHERM_REG_TSPM 0x1c +#define PCHTHERM_REG_TL 0x40 +#define PCHTHERM_REG_TL2 0x50 +#define PCHTHERM_REG_PHL 0x60 +#define PCHTHERM_REG_PHLC 0x62 +#define PCHTHERM_REG_TAS 0x80 +#define PCHTHERM_REG_TSPIEN 0x82 +#define PCHTHERM_REG_TSGPEN 0x84 +#define PCHTHERM_REG_TCFD 0xf0 +#define PCHTHERM_GEN_LOCKDOWN 0x80 +#define PCHTHERM_GEN_ENABLE 1 +#define PCHTHERM_TEMP_FACTOR 5 +#define PCHTHERM_TEMP_ZERO 2231 +#define PCHTHERM_TEMP_MASK 0x1ff +#define PCHTHERM_TL_T0 0 +#define PCHTHERM_TL_T1 10 +#define PCHTHERM_TL_T2 20 +#define PCHTHERM_TEMP_TO_IK(val) (((val) & PCHTHERM_TEMP_MASK) * \ + PCHTHERM_TEMP_FACTOR + \ + PCHTHERM_TEMP_ZERO) + +struct pchtherm_softc +{ + int tbarrid; + struct resource *tbar; + int enable; + int ctten; + int pmtemp; + unsigned int pmtime; +}; + +static const struct pci_device_table pchtherm_devices[] = +{ + { PCI_DEV(0x8086, 0x9c24), + PCI_DESCR("Haswell Thermal Subsystem")}, + { PCI_DEV(0x8086, 0x8c24), + PCI_DESCR("Haswell Thermal Subsystem")}, + { PCI_DEV(0x8086, 0x9ca4), + PCI_DESCR("Wildcat Point Thermal Subsystem")}, + { PCI_DEV(0x8086, 0x9d31), + PCI_DESCR("Skylake PCH Thermal Subsystem")}, + { PCI_DEV(0x8086, 0xa131), + PCI_DESCR("Skylake PCH 100 Thermal Subsystem")}, +}; + +static int pchtherm_probe(device_t dev) +{ + const struct pci_device_table *tbl; + + tbl = PCI_MATCH(dev, pchtherm_devices); + if (tbl == NULL) + return (ENXIO); + device_set_desc(dev, tbl->descr); + + return (BUS_PROBE_DEFAULT); + +} +static int pchtherm_tltemp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct pchtherm_softc *sc = oidp->oid_arg1; + int regshift = oidp->oid_arg2; + int temp; + + temp = bus_read_4(sc->tbar, PCHTHERM_REG_TL); + temp >>= regshift; + temp = PCHTHERM_TEMP_TO_IK(temp); + + return sysctl_handle_int(oidp, &temp, 0, req); +} +static int pchtherm_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct pchtherm_softc *sc = oidp->oid_arg1; + int regoff = oidp->oid_arg2; + int temp; + + temp = bus_read_2(sc->tbar, regoff); + temp = PCHTHERM_TEMP_TO_IK(temp); + + return sysctl_handle_int(oidp, &temp, 0, req); +} + +#define FLAG_PRINT(dev, str, val) device_printf \ + (dev, str " %s %sable\n", \ + ((val) & 0x80)? "Locked" : "", \ + ((val) & 0x1)? "En" : "Dis") + +static int pchtherm_attach(device_t dev) +{ + struct pchtherm_softc *sc = device_get_softc(dev); + unsigned int val; + int flag; + int temp; + + sc->tbarrid = PCIR_BAR(0); + sc->tbar = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->tbarrid, RF_ACTIVE|RF_SHAREABLE); + if (sc->tbar == NULL) { + return (ENOMEM); + } + sc->enable = bus_read_1(sc->tbar, PCHTHERM_REG_TSEL); + if (!(sc->enable & PCHTHERM_GEN_ENABLE )) { + if (sc->enable & PCHTHERM_GEN_LOCKDOWN) { + device_printf(dev, "Sensor not available\n"); + return 0; + } else { + device_printf(dev, "Enabling Sensor\n"); + bus_write_1(sc->tbar, PCHTHERM_REG_TSEL, + PCHTHERM_GEN_ENABLE); + sc->enable = bus_read_1(sc->tbar, PCHTHERM_REG_TSEL); + if (!(sc->enable & PCHTHERM_REG_TSEL)){ + device_printf(dev, "Sensor enable failed\n"); + return 0; + } + } + } + + sc->ctten = bus_read_1(sc->tbar, PCHTHERM_REG_TSC); + if (bootverbose) { + FLAG_PRINT(dev, "Catastrophic Power Down", sc->ctten); + } + val = bus_read_1(sc->tbar, PCHTHERM_REG_TSREL); + if (bootverbose) { + FLAG_PRINT(dev, "SMBus report", val); + } + val = bus_read_1(sc->tbar, PCHTHERM_REG_TSC); + if (bootverbose) { + FLAG_PRINT(dev, "SMI on alert", val); + } + val = bus_read_2(sc->tbar, PCHTHERM_REG_TSPM); + flag = val >> 13; + if (bootverbose) { + device_printf(dev, "TSPM: %b\n", + flag, "\20\3Lock\2DTSS0EN\1DSSOC0"); + device_printf(dev, "MAX Thermal Sensor Shutdown Time %ds\n", + 1<<((val>>9)&7)); + } + + temp = val & PCHTHERM_TEMP_MASK; + sc->pmtemp = PCHTHERM_TEMP_TO_IK(temp); + sc->pmtime = 1<<((val>>9)&7); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "pmtemp", CTLTYPE_INT|CTLFLAG_RD, + sc, PCHTHERM_REG_TSPM, pchtherm_temp_sysctl, + "IK", "Thermal sensor idle temperature"); + SYSCTL_ADD_U32(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "pmtime", CTLFLAG_RD, + &sc->pmtime, 0,"Thermal sensor idle duration"); + + val = bus_read_4(sc->tbar, PCHTHERM_REG_TL); + flag = val>>29; + + if (bootverbose) { + device_printf(dev, "Throttling %b\n", + flag, "\20\3Lock\2TT13EN\1TTEN"); + } + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "t0temp", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_TL_T0, pchtherm_tltemp_sysctl, + "IK", "T0 temperature"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "t1temp", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_TL_T1, pchtherm_tltemp_sysctl, + "IK", "T1 temperature"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "t2temp", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_TL_T2, pchtherm_tltemp_sysctl, + "IK", "T2 temperature"); + + val = bus_read_2(sc->tbar, PCHTHERM_REG_TL2); + if (bootverbose) { + flag = val >>14; + device_printf(dev, "TL2 flag %b\n", + flag, "\20\1PMCTEN\2Lock"); + } + + /* If PHL is disable and lockdown, don't export it.*/ + val = bus_read_2(sc->tbar, PCHTHERM_REG_PHLC); + val <<= 16; + val |= bus_read_2(sc->tbar, PCHTHERM_REG_PHL); + if ((val & 0x10000) != 0x10000) { + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "pch_hot_level", + CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_REG_PHL, + pchtherm_temp_sysctl, "IK", + "PCH Hot level Temperature"); + } + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "temperature", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_REG_TEMP, + pchtherm_temp_sysctl, "IK", "Current temperature"); + /* + * If sensor enable bit is locked down, there is no way to change + * alart values effectively. + */ + if (!(sc->enable & PCHTHERM_GEN_LOCKDOWN) || + bus_read_2(sc->tbar, PCHTHERM_REG_TAHV) != 0) { + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tahv", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_REG_TAHV, + pchtherm_temp_sysctl, "IK", + "Alart High temperature"); + } + + if (!(sc->enable & PCHTHERM_GEN_LOCKDOWN) || + bus_read_2(sc->tbar, PCHTHERM_REG_TALV) != 0) { + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "talv", CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_REG_TALV, + pchtherm_temp_sysctl, "IK", + "Alart Low temperature"); + } + if (!(sc->ctten& PCHTHERM_GEN_LOCKDOWN) || + sc->ctten& PCHTHERM_GEN_ENABLE) { + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "ctt", + CTLTYPE_INT |CTLFLAG_RD, + sc, PCHTHERM_REG_CTT, + pchtherm_temp_sysctl, "IK", + "Catastrophic Trip Point"); + } + + return 0; +} +static int pchtherm_detach(device_t dev) +{ + struct pchtherm_softc *sc = device_get_softc(dev); + bus_release_resource(dev, SYS_RES_MEMORY, sc->tbarrid, sc->tbar); + + return 0; +} +static device_method_t pchtherm_methods[] = +{ + DEVMETHOD(device_probe, pchtherm_probe), + DEVMETHOD(device_attach, pchtherm_attach), + DEVMETHOD(device_detach, pchtherm_detach), + + DEVMETHOD_END +}; +static driver_t pchtherm_driver = { + "pchtherm", + pchtherm_methods, + sizeof(struct pchtherm_softc) +}; + +static devclass_t pchtherm_devclass; +DRIVER_MODULE(pchtherm, pci, pchtherm_driver, pchtherm_devclass, 0, 0); +PCI_PNP_INFO(pchtherm_devices); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Mar 31 02:36:39 2020 (r359478) +++ head/sys/modules/Makefile Tue Mar 31 06:25:43 2020 (r359479) @@ -278,6 +278,7 @@ SUBDIR= \ ${_padlock} \ ${_padlock_rng} \ ${_pccard} \ + ${_pchtherm} \ ${_pcfclock} \ ${_pf} \ ${_pflog} \ @@ -676,6 +677,7 @@ _padlock= padlock _padlock_rng= padlock_rng _rdrand_rng= rdrand_rng .endif +_pchtherm = pchtherm _s3= s3 _sdhci_acpi= sdhci_acpi _superio= superio Added: head/sys/modules/pchtherm/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/pchtherm/Makefile Tue Mar 31 06:25:43 2020 (r359479) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/intel +KMOD= pchtherm +SRCS= pchtherm.c +SRCS+= device_if.h bus_if.h pci_if.h opt_platform.h + +.include From owner-svn-src-head@freebsd.org Tue Mar 31 06:59:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 489C9279F47; Tue, 31 Mar 2020 06:59:03 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48s0YJ2bhQz4ff8; Tue, 31 Mar 2020 06:59:00 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2174C59D7; Tue, 31 Mar 2020 06:58:55 +0000 (UTC) Date: Tue, 31 Mar 2020 06:58:55 +0000 From: Alexey Dokuchaev To: Ed Maste Cc: John Baldwin , svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r359459 - head/share/man/man5 Message-ID: <20200331065855.GA74649@FreeBSD.org> References: <202003302008.02UK8R4b070488@repo.freebsd.org> <0e2d4a81-1536-2d47-bf30-0de5cf19dfbd@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 06:59:04 -0000 On Mon, Mar 30, 2020 at 07:39:39PM -0400, Ed Maste wrote: > On Mon, 30 Mar 2020 at 19:03, John Baldwin wrote: > > > > and I haven't seen the commit to > > actually remove GDB_LIBEXEC yet? > > I haven't seen the commit mail for r359457 yet either, but the change > is committed. As of recently, commit mail gets significantly delayed for some reason, per what I've also observed. ./danfe From owner-svn-src-head@freebsd.org Tue Mar 31 07:00:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36ECB279FD9; Tue, 31 Mar 2020 07:00:18 +0000 (UTC) (envelope-from kp@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 48s0Zn0cjQz4g3l; Tue, 31 Mar 2020 07:00:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id E2749E968; Tue, 31 Mar 2020 07:00:08 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 59E431B340; Tue, 31 Mar 2020 09:00:05 +0200 (CEST) From: "Kristof Provost" To: "Li-Wen Hsu" Cc: "Mark Johnston" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Date: Tue, 31 Mar 2020 09:00:04 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: In-Reply-To: References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; markup=markdown Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 07:00:18 -0000 On 31 Mar 2020, at 7:56, Li-Wen Hsu wrote: > On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston wrote: >>>> It seems could be triggered by sys.netinet6.frag6.* >>>> sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots >>>> of test cases timed out. >>>> >>>> Can you help check these? >>> >>> I see, it is actually caused by r359438. I'm looking at it now. >> >> I verified that the netpfil and netinet6 tests pass with r359477. > > Thanks for the fixing, the latest test panics at epair_qflush: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull > > while executing sys.netpfil.pf.* tests. I'm not sure if this is > related or because of previous commits (I suspect the later). I'll > look into this. > That’s a know issue with epair (since EPOCH, I believe). A number of the pf tests are disabled due to this. See 238870. Best regards, Kristof From owner-svn-src-head@freebsd.org Tue Mar 31 07:51:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A95327B250; Tue, 31 Mar 2020 07:51:49 +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 48s1kD3Vdyz41Tk; Tue, 31 Mar 2020 07:51:48 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f171.google.com with SMTP id p196so10630109ybc.0; Tue, 31 Mar 2020 00:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=r0sNZ3bYwwMbz+ojbTZVItJ/DhUGRpBLQp7b50UrAC8=; b=N/LO9H1jqWm2yGeU56rzapW9jgGmYjdKXs06EE2ofq6ENUXxVbff9OorrtqhOT6eVW 8VO6wK89Npl9eXnDMUYsr+UKETiDneCtOUp0Wp/PWoG2WWSGUs46O8zNsdIxq3BDLAqZ FA8nY72NcF+WmXguc/SuBOoYe6rVUcy5lTnfsJlsHFmRSWfX1mnyyQeFoPUuMKioH0xR /LlsZuFYa5s88ONluQnv9azOZHeL8bjSpGf/6PG17p69NxBjy1Wg51tADczQr7gwFAv8 EgACAdqNMS7s0TOwpRLR5dMAIFOQkKu6gdThvWoO6FbYEd/JmUGeQDWyyU9tZr5s2r3y kNRw== X-Gm-Message-State: ANhLgQ0tLuFAoFA+2fDQS8j/CcGEDEltd9kqN6OAdSJSIDSv6BKIhOoX YcF80151hcJPdlFbsUeXlL5ubT3XcoNArdmWdZ9isg== X-Google-Smtp-Source: ADFU+vsk2fjKYIc5+6Uv8/kjs5WpnFt0Fi8d/jBuM9bwLqDxXcejR2i4I2XT/9gv2BT0LgQNDhrfjqHbmeS3OmvERkw= X-Received: by 2002:a5b:541:: with SMTP id r1mr5474695ybp.110.1585641099900; Tue, 31 Mar 2020 00:51:39 -0700 (PDT) MIME-Version: 1.0 References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> In-Reply-To: From: Li-Wen Hsu Date: Tue, 31 Mar 2020 15:51:27 +0800 Message-ID: Subject: Re: svn commit: r359436 - in head/sys: kern net sys To: Kristof Provost Cc: Mark Johnston , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48s1kD3Vdyz41Tk 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]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 07:51:49 -0000 On Tue, Mar 31, 2020 at 3:00 PM Kristof Provost wrote: > > On 31 Mar 2020, at 7:56, Li-Wen Hsu wrote: > > On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston wrot= e: > >>>> It seems could be triggered by sys.netinet6.frag6.* > >>>> sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lo= ts > >>>> of test cases timed out. > >>>> > >>>> Can you help check these? > >>> > >>> I see, it is actually caused by r359438. I'm looking at it now. > >> > >> I verified that the netpfil and netinet6 tests pass with r359477. > > > > Thanks for the fixing, the latest test panics at epair_qflush: > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull > > > > while executing sys.netpfil.pf.* tests. I'm not sure if this is > > related or because of previous commits (I suspect the later). I'll > > look into this. > > > That=E2=80=99s a know issue with epair (since EPOCH, I believe). > A number of the pf tests are disabled due to this. See 238870. I also think so, btw, currently every test run panics so I am afraid that the recent commits might make status worse (or say, make the issue easier to reproduce?) Best, Li-Wen From owner-svn-src-head@freebsd.org Tue Mar 31 13:43:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEDEB2A6567; Tue, 31 Mar 2020 13:43:21 +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 48s9Wr2NLCz4GVM; Tue, 31 Mar 2020 13:43:20 +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 541E9A69F; Tue, 31 Mar 2020 13:43:10 +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 02VDhA7Y014708; Tue, 31 Mar 2020 13:43:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VDh9wb014706; Tue, 31 Mar 2020 13:43:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202003311343.02VDh9wb014706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Mar 2020 13:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359480 - head/usr.sbin/ctld X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/ctld X-SVN-Commit-Revision: 359480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 13:43:22 -0000 Author: trasz Date: Tue Mar 31 13:43:09 2020 New Revision: 359480 URL: https://svnweb.freebsd.org/changeset/base/359480 Log: Add 'ctld -t', to test configuration file validity. Reviewed by: mav, allanjude, bcr (man pages) MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D23792 Modified: head/usr.sbin/ctld/ctld.8 head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.8 ============================================================================== --- head/usr.sbin/ctld/ctld.8 Tue Mar 31 06:25:43 2020 (r359479) +++ head/usr.sbin/ctld/ctld.8 Tue Mar 31 13:43:09 2020 (r359480) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 23, 2018 +.Dd March 31, 2020 .Dt CTLD 8 .Os .Sh NAME @@ -38,6 +38,10 @@ .Op Fl d .Op Fl f Ar config-file .Op Fl u +.Nm +.Fl t +.Op Fl f Ar config-file +.Op Fl u .Sh DESCRIPTION The .Nm @@ -90,6 +94,8 @@ The daemon sends verbose debug output to standard erro put itself in the background. The daemon will also not fork and will exit after processing one connection. This option is only intended for debugging the target. +.It Fl t +Test the configuration file for validity and exit. .It Fl u Use UCL configuration file format instead of the traditional non-UCL format. .El Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Mar 31 06:25:43 2020 (r359479) +++ head/usr.sbin/ctld/ctld.c Tue Mar 31 13:43:09 2020 (r359480) @@ -69,6 +69,7 @@ usage(void) { fprintf(stderr, "usage: ctld [-d][-u][-f config-file]\n"); + fprintf(stderr, " ctld -t [-u][-f config-file]\n"); exit(1); } @@ -2663,14 +2664,18 @@ main(int argc, char **argv) const char *config_path = DEFAULT_CONFIG_PATH; int debug = 0, ch, error; bool dont_daemonize = false; + bool test_config = false; bool use_ucl = false; - while ((ch = getopt(argc, argv, "duf:R")) != -1) { + while ((ch = getopt(argc, argv, "dtuf:R")) != -1) { switch (ch) { case 'd': dont_daemonize = true; debug++; break; + case 't': + test_config = true; + break; case 'u': use_ucl = true; break; @@ -2701,6 +2706,10 @@ main(int argc, char **argv) if (newconf == NULL) log_errx(1, "configuration error; exiting"); + + if (test_config) + return (0); + if (debug > 0) { oldconf->conf_debug = debug; newconf->conf_debug = debug; From owner-svn-src-head@freebsd.org Tue Mar 31 13:48:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA59A2A6850; Tue, 31 Mar 2020 13:48: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 48s9dV5y6qz4J5d; Tue, 31 Mar 2020 13:48: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 CB849A6DC; Tue, 31 Mar 2020 13:48:06 +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 02VDm6qR015005; Tue, 31 Mar 2020 13:48:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VDm63g015004; Tue, 31 Mar 2020 13:48:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202003311348.02VDm63g015004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Mar 2020 13:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359481 - head/contrib/jemalloc/include/jemalloc X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/contrib/jemalloc/include/jemalloc X-SVN-Commit-Revision: 359481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 13:48:16 -0000 Author: trasz Date: Tue Mar 31 13:48:06 2020 New Revision: 359481 URL: https://svnweb.freebsd.org/changeset/base/359481 Log: Make jemalloc(3) default to retain:true on 64-bit platforms, like it already does on Linux and OSX. This results in significantly fewer calls to mmap(2). This should result in a small reduction in system CPU time and improved superpage usage. Reviewed by: markj Tested by: markj MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23874 Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Mar 31 13:43:09 2020 (r359480) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Mar 31 13:48:06 2020 (r359481) @@ -72,6 +72,10 @@ # define LG_SIZEOF_PTR 3 #endif +#if LG_VADDR > 32 +# define JEMALLOC_RETAIN +#endif + #ifndef JEMALLOC_TLS_MODEL # define JEMALLOC_TLS_MODEL /* Default. */ #endif From owner-svn-src-head@freebsd.org Tue Mar 31 15:22:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F29CB260B53; Tue, 31 Mar 2020 15:22:48 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 48sCkb3Vmgz3QGQ; Tue, 31 Mar 2020 15:22:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x831.google.com with SMTP id a5so18603456qtw.10; Tue, 31 Mar 2020 08:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mItH9N/PEjyXlUVDUnSfBvMwBqL/zIoX9Rfj0HeO9uA=; b=ZzAugq+Z+Ws4okczr8KoxgHPGMZcNpnEf0U9FDWMYc1stgqp66zs5Pur5CCJJ7TBz8 FdVA72G5tC+ne/DJyXcwYNSVHfp5fyxrW7ZQfzn7/6P+O2Jszk1tmUXft6s+Bi4FkaiE rl8VZOnkht2isPX3qh62WeBJDf+Rf6hYxIASzSMq5PD0q8cs38btpUv2FdwUsX4RkK7M D5Nja/wQYmx0VVwXukMN1sNC/wg8h+90GUV/dR+es+HPkbdgC46RD4+ADWG1NfqZVLR1 fdTOFOMVbHXrO3TJiF7nY7FDg60fkrw1emvbkby0tyFYHFC+9zVs+WO3I0a57+dc5pIv Hx4w== 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 :content-transfer-encoding:in-reply-to; bh=mItH9N/PEjyXlUVDUnSfBvMwBqL/zIoX9Rfj0HeO9uA=; b=TdJZYGo37T6Hnu9OSYOnaiReYTHvlJYpueOWeHJbQmkZCZYtZipX119TCL8japDWnW hOgFX7ZpdBiApo5H5COLxoXsMqqqIY9OBqstkba2XqEbb8uJ9U8RzLPvvgKXYyWzmNa5 uI3u6S4u5fuZ+z7Lc0AV0K54O8piz9IYmcXQooPI0KzLxV7BmF1gEqYL0yCoPnx0SZ7l 1yuqiljC2imOVSa8og4fHkifgQqbYtFVVaf5iHUgSgCMqu6K6EgGBfWmLFmMlteIro5C kuWpygVPWAn6Pbfe+krfBZKY+8jgLy1WFJ/K+5WBj6G6quu2C92NIyOEypk7Q5KSY9xQ C05Q== X-Gm-Message-State: ANhLgQ0iZ+sdr5LO2HGxmgBNvslAynpATE2sixhG+Hf9Ro2cZ1Y+KN2g zikJIQdH5Kz3Uluqp+/zNyXbdRfH X-Google-Smtp-Source: ADFU+vtySy83BjJsTbL00JyYXdtsPPF2TecZqEfec9PQO8uehYXSL/ZNh3l7Eh5W8uXxDIa01Ba8Jg== X-Received: by 2002:a37:b2c5:: with SMTP id b188mr4395921qkf.98.1585667824272; Tue, 31 Mar 2020 08:17:04 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id l60sm13634583qtd.35.2020.03.31.08.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 08:17:02 -0700 (PDT) Sender: Mark Johnston Date: Tue, 31 Mar 2020 11:17:00 -0400 From: Mark Johnston To: Li-Wen Hsu Cc: Kristof Provost , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Message-ID: <20200331151700.GC97238@raichu> References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 48sCkb3Vmgz3QGQ 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)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:22:49 -0000 On Tue, Mar 31, 2020 at 03:51:27PM +0800, Li-Wen Hsu wrote: > On Tue, Mar 31, 2020 at 3:00 PM Kristof Provost wrote: > > > > On 31 Mar 2020, at 7:56, Li-Wen Hsu wrote: > > > On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston wrote: > > >>>> It seems could be triggered by sys.netinet6.frag6.* > > >>>> sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > > >>>> of test cases timed out. > > >>>> > > >>>> Can you help check these? > > >>> > > >>> I see, it is actually caused by r359438. I'm looking at it now. > > >> > > >> I verified that the netpfil and netinet6 tests pass with r359477. > > > > > > Thanks for the fixing, the latest test panics at epair_qflush: > > > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull > > > > > > while executing sys.netpfil.pf.* tests. I'm not sure if this is > > > related or because of previous commits (I suspect the later). I'll > > > look into this. > > > > > That’s a know issue with epair (since EPOCH, I believe). > > A number of the pf tests are disabled due to this. See 238870. > > I also think so, btw, currently every test run panics so I am afraid > that the recent commits might make status worse (or say, make the > issue easier to reproduce?) I haven't been able to reproduce any panics or test failures so far. From owner-svn-src-head@freebsd.org Tue Mar 31 15:28:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F8B8260D55; Tue, 31 Mar 2020 15:28:42 +0000 (UTC) (envelope-from kp@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 48sCsH23Brz3xQR; Tue, 31 Mar 2020 15:28:34 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 44E1F12859; Tue, 31 Mar 2020 15:28:27 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id AB9D11BDAE; Tue, 31 Mar 2020 17:28:24 +0200 (CEST) From: "Kristof Provost" To: "Mark Johnston" Cc: "Li-Wen Hsu" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Date: Tue, 31 Mar 2020 17:28:21 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <9A4C20AA-8E13-47C8-B162-F2304F8C79B7@FreeBSD.org> In-Reply-To: <20200331151700.GC97238@raichu> References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> <20200331151700.GC97238@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:28:42 -0000 On 31 Mar 2020, at 17:17, Mark Johnston wrote: > On Tue, Mar 31, 2020 at 03:51:27PM +0800, Li-Wen Hsu wrote: >> On Tue, Mar 31, 2020 at 3:00 PM Kristof Provost >> wrote: >>> >>> On 31 Mar 2020, at 7:56, Li-Wen Hsu wrote: >>>> On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston >>>> wrote: >>>>>>> It seems could be triggered by sys.netinet6.frag6.* >>>>>>> sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there >>>>>>> are lots >>>>>>> of test cases timed out. >>>>>>> >>>>>>> Can you help check these? >>>>>> >>>>>> I see, it is actually caused by r359438. I'm looking at it now. >>>>> >>>>> I verified that the netpfil and netinet6 tests pass with r359477. >>>> >>>> Thanks for the fixing, the latest test panics at epair_qflush: >>>> >>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull >>>> >>>> while executing sys.netpfil.pf.* tests. I'm not sure if this is >>>> related or because of previous commits (I suspect the later). I'll >>>> look into this. >>>> >>> That’s a know issue with epair (since EPOCH, I believe). >>> A number of the pf tests are disabled due to this. See 238870. >> >> I also think so, btw, currently every test run panics so I am afraid >> that the recent commits might make status worse (or say, make the >> issue easier to reproduce?) > > I haven't been able to reproduce any panics or test failures so far. Once you disable the ‘atf_skip’ lines in the pf tests a simple `sudo kldload pfsync && cd /usr/tests/sys/netpfil/pf && sudo kyua test` is likely sufficient. There’s a complex race around tearing down epair interfaces and moving them back to their home vnet that’s proven very tricky to resolve. Best regards, Kristof From owner-svn-src-head@freebsd.org Tue Mar 31 15:48:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCDFF261592; Tue, 31 Mar 2020 15:48:11 +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 48sDHs3CfYz44xY; Tue, 31 Mar 2020 15:48:09 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B790C459; Tue, 31 Mar 2020 15:48:00 +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 02VFm0Vw089147; Tue, 31 Mar 2020 15:48:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VFluHF089120; Tue, 31 Mar 2020 15:47:56 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202003311547.02VFluHF089120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 31 Mar 2020 15:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359486 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/bn crypto/openssl/crypto/conf crypto/openssl/crypto/err crypto/openssl/crypto/pkcs12 cr... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/bn crypto/openssl/crypto/conf crypto/openssl/crypto/err crypto/openssl/crypto/pkcs12 crypto/openssl/crypto/ts cr... X-SVN-Commit-Revision: 359486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:48:12 -0000 Author: jkim Date: Tue Mar 31 15:47:55 2020 New Revision: 359486 URL: https://svnweb.freebsd.org/changeset/base/359486 Log: Merge OpenSSL 1.1.1f. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/rehash.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/crypto/bn/bn_local.h head/crypto/openssl/crypto/bn/bn_prime.c head/crypto/openssl/crypto/conf/conf_lib.c head/crypto/openssl/crypto/err/openssl.txt head/crypto/openssl/crypto/ex_data.c head/crypto/openssl/crypto/pkcs12/p12_crt.c head/crypto/openssl/crypto/ts/ts_rsp_sign.c head/crypto/openssl/crypto/ts/ts_rsp_verify.c head/crypto/openssl/crypto/x509/x509_cmp.c head/crypto/openssl/crypto/x509/x509_trs.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x_all.c head/crypto/openssl/crypto/x509/x_crl.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/doc/man3/BN_generate_prime.pod head/crypto/openssl/doc/man3/SSL_get_error.pod head/crypto/openssl/doc/man3/X509_get_extension_flags.pod head/crypto/openssl/include/openssl/opensslv.h head/crypto/openssl/include/openssl/sslerr.h head/crypto/openssl/ssl/record/rec_layer_s3.c head/crypto/openssl/ssl/ssl_err.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 head/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 head/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 head/secure/lib/libcrypto/man/man3/BF_encrypt.3 head/secure/lib/libcrypto/man/man3/BIO_ADDR.3 head/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 head/secure/lib/libcrypto/man/man3/BIO_connect.3 head/secure/lib/libcrypto/man/man3/BIO_ctrl.3 head/secure/lib/libcrypto/man/man3/BIO_f_base64.3 head/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 head/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 head/secure/lib/libcrypto/man/man3/BIO_f_md.3 head/secure/lib/libcrypto/man/man3/BIO_f_null.3 head/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 head/secure/lib/libcrypto/man/man3/BIO_find_type.3 head/secure/lib/libcrypto/man/man3/BIO_get_data.3 head/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/BIO_meth_new.3 head/secure/lib/libcrypto/man/man3/BIO_new.3 head/secure/lib/libcrypto/man/man3/BIO_new_CMS.3 head/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 head/secure/lib/libcrypto/man/man3/BIO_printf.3 head/secure/lib/libcrypto/man/man3/BIO_push.3 head/secure/lib/libcrypto/man/man3/BIO_read.3 head/secure/lib/libcrypto/man/man3/BIO_s_accept.3 head/secure/lib/libcrypto/man/man3/BIO_s_bio.3 head/secure/lib/libcrypto/man/man3/BIO_s_connect.3 head/secure/lib/libcrypto/man/man3/BIO_s_fd.3 head/secure/lib/libcrypto/man/man3/BIO_s_file.3 head/secure/lib/libcrypto/man/man3/BIO_s_mem.3 head/secure/lib/libcrypto/man/man3/BIO_s_null.3 head/secure/lib/libcrypto/man/man3/BIO_s_socket.3 head/secure/lib/libcrypto/man/man3/BIO_set_callback.3 head/secure/lib/libcrypto/man/man3/BIO_should_retry.3 head/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_start.3 head/secure/lib/libcrypto/man/man3/BN_add.3 head/secure/lib/libcrypto/man/man3/BN_add_word.3 head/secure/lib/libcrypto/man/man3/BN_bn2bin.3 head/secure/lib/libcrypto/man/man3/BN_cmp.3 head/secure/lib/libcrypto/man/man3/BN_copy.3 head/secure/lib/libcrypto/man/man3/BN_generate_prime.3 head/secure/lib/libcrypto/man/man3/BN_mod_inverse.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/man3/BN_new.3 head/secure/lib/libcrypto/man/man3/BN_num_bytes.3 head/secure/lib/libcrypto/man/man3/BN_rand.3 head/secure/lib/libcrypto/man/man3/BN_security_bits.3 head/secure/lib/libcrypto/man/man3/BN_set_bit.3 head/secure/lib/libcrypto/man/man3/BN_swap.3 head/secure/lib/libcrypto/man/man3/BN_zero.3 head/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 head/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 head/secure/lib/libcrypto/man/man3/CMS_compress.3 head/secure/lib/libcrypto/man/man3/CMS_decrypt.3 head/secure/lib/libcrypto/man/man3/CMS_encrypt.3 head/secure/lib/libcrypto/man/man3/CMS_final.3 head/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_type.3 head/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/man3/CMS_sign.3 head/secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/man3/CMS_uncompress.3 head/secure/lib/libcrypto/man/man3/CMS_verify.3 head/secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/man3/CONF_modules_free.3 head/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 head/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_get0_log_by_id.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 head/secure/lib/libcrypto/man/man3/CTLOG_new.3 head/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 head/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 head/secure/lib/libcrypto/man/man3/DES_random_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 head/secure/lib/libcrypto/man/man3/DH_meth_new.3 head/secure/lib/libcrypto/man/man3/DH_new.3 head/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 head/secure/lib/libcrypto/man/man3/DH_set_method.3 head/secure/lib/libcrypto/man/man3/DH_size.3 head/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/DSA_do_sign.3 head/secure/lib/libcrypto/man/man3/DSA_dup_DH.3 head/secure/lib/libcrypto/man/man3/DSA_generate_key.3 head/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DSA_meth_new.3 head/secure/lib/libcrypto/man/man3/DSA_new.3 head/secure/lib/libcrypto/man/man3/DSA_set_method.3 head/secure/lib/libcrypto/man/man3/DSA_sign.3 head/secure/lib/libcrypto/man/man3/DSA_size.3 head/secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 head/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 head/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 head/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 head/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 head/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 head/secure/lib/libcrypto/man/man3/EC_KEY_new.3 head/secure/lib/libcrypto/man/man3/EC_POINT_add.3 head/secure/lib/libcrypto/man/man3/EC_POINT_new.3 head/secure/lib/libcrypto/man/man3/ENGINE_add.3 head/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/man3/ERR_clear_error.3 head/secure/lib/libcrypto/man/man3/ERR_error_string.3 head/secure/lib/libcrypto/man/man3/ERR_get_error.3 head/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/man3/ERR_load_strings.3 head/secure/lib/libcrypto/man/man3/ERR_print_errors.3 head/secure/lib/libcrypto/man/man3/ERR_put_error.3 head/secure/lib/libcrypto/man/man3/ERR_remove_state.3 head/secure/lib/libcrypto/man/man3/ERR_set_mark.3 head/secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_get_default_digest_nid.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/man3/EVP_SealInit.3 head/secure/lib/libcrypto/man/man3/EVP_SignInit.3 head/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_aes.3 head/secure/lib/libcrypto/man/man3/EVP_aria.3 head/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 head/secure/lib/libcrypto/man/man3/EVP_camellia.3 head/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_chacha20.3 head/secure/lib/libcrypto/man/man3/EVP_des.3 head/secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_md2.3 head/secure/lib/libcrypto/man/man3/EVP_md4.3 head/secure/lib/libcrypto/man/man3/EVP_md5.3 head/secure/lib/libcrypto/man/man3/EVP_mdc2.3 head/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_rc4.3 head/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_ripemd160.3 head/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_sha1.3 head/secure/lib/libcrypto/man/man3/EVP_sha224.3 head/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 head/secure/lib/libcrypto/man/man3/EVP_sm3.3 head/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_whirlpool.3 head/secure/lib/libcrypto/man/man3/HMAC.3 head/secure/lib/libcrypto/man/man3/MD5.3 head/secure/lib/libcrypto/man/man3/MDC2_Init.3 head/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 head/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 head/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 head/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 head/secure/lib/libcrypto/man/man3/OCSP_response_status.3 head/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 head/secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 head/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/man3/OPENSSL_config.3 head/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 head/secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 head/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 head/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 head/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 head/secure/lib/libcrypto/man/man3/PEM_read.3 head/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/man3/PKCS12_create.3 head/secure/lib/libcrypto/man/man3/PKCS12_newpass.3 head/secure/lib/libcrypto/man/man3/PKCS12_parse.3 head/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 head/secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/man3/PKCS7_verify.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 head/secure/lib/libcrypto/man/man3/RAND_add.3 head/secure/lib/libcrypto/man/man3/RAND_bytes.3 head/secure/lib/libcrypto/man/man3/RAND_cleanup.3 head/secure/lib/libcrypto/man/man3/RAND_egd.3 head/secure/lib/libcrypto/man/man3/RAND_load_file.3 head/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/man3/RC4_set_key.3 head/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 head/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 head/secure/lib/libcrypto/man/man3/RSA_check_key.3 head/secure/lib/libcrypto/man/man3/RSA_generate_key.3 head/secure/lib/libcrypto/man/man3/RSA_get0_key.3 head/secure/lib/libcrypto/man/man3/RSA_meth_new.3 head/secure/lib/libcrypto/man/man3/RSA_new.3 head/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/man3/RSA_print.3 head/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_set_method.3 head/secure/lib/libcrypto/man/man3/RSA_sign.3 head/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/man3/RSA_size.3 head/secure/lib/libcrypto/man/man3/SCT_new.3 head/secure/lib/libcrypto/man/man3/SCT_print.3 head/secure/lib/libcrypto/man/man3/SCT_validate.3 head/secure/lib/libcrypto/man/man3/SHA256_Init.3 head/secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 head/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_flush_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_free.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_has_client_custom_ext.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_compress_id.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_is_resumable.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 head/secure/lib/libcrypto/man/man3/SSL_accept.3 head/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 head/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 head/secure/lib/libcrypto/man/man3/SSL_check_chain.3 head/secure/lib/libcrypto/man/man3/SSL_clear.3 head/secure/lib/libcrypto/man/man3/SSL_connect.3 head/secure/lib/libcrypto/man/man3/SSL_do_handshake.3 head/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 head/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 head/secure/lib/libcrypto/man/man3/SSL_free.3 head/secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 head/secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 head/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 head/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 head/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 head/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_get_default_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_get_error.3 head/secure/lib/libcrypto/man/man3/SSL_get_extms_support.3 head/secure/lib/libcrypto/man/man3/SSL_get_fd.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 head/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 head/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 head/secure/lib/libcrypto/man/man3/SSL_get_session.3 head/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_get_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_get_version.3 head/secure/lib/libcrypto/man/man3/SSL_in_init.3 head/secure/lib/libcrypto/man/man3/SSL_key_update.3 head/secure/lib/libcrypto/man/man3/SSL_library_init.3 head/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 head/secure/lib/libcrypto/man/man3/SSL_new.3 head/secure/lib/libcrypto/man/man3/SSL_pending.3 head/secure/lib/libcrypto/man/man3/SSL_read.3 head/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 head/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 head/secure/lib/libcrypto/man/man3/SSL_session_reused.3 head/secure/lib/libcrypto/man/man3/SSL_set1_host.3 head/secure/lib/libcrypto/man/man3/SSL_set_bio.3 head/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 head/secure/lib/libcrypto/man/man3/SSL_set_fd.3 head/secure/lib/libcrypto/man/man3/SSL_set_session.3 head/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_set_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_state_string.3 head/secure/lib/libcrypto/man/man3/SSL_want.3 head/secure/lib/libcrypto/man/man3/SSL_write.3 head/secure/lib/libcrypto/man/man3/UI_STRING.3 head/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 head/secure/lib/libcrypto/man/man3/UI_create_method.3 head/secure/lib/libcrypto/man/man3/UI_new.3 head/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 head/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 head/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 head/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 head/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 head/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 head/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 head/secure/lib/libcrypto/man/man3/X509_STORE_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/man3/X509_check_ca.3 head/secure/lib/libcrypto/man/man3/X509_check_host.3 head/secure/lib/libcrypto/man/man3/X509_check_issued.3 head/secure/lib/libcrypto/man/man3/X509_check_private_key.3 head/secure/lib/libcrypto/man/man3/X509_cmp.3 head/secure/lib/libcrypto/man/man3/X509_cmp_time.3 head/secure/lib/libcrypto/man/man3/X509_digest.3 head/secure/lib/libcrypto/man/man3/X509_dup.3 head/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 head/secure/lib/libcrypto/man/man3/X509_get0_signature.3 head/secure/lib/libcrypto/man/man3/X509_get0_uids.3 head/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 head/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 head/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 head/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 head/secure/lib/libcrypto/man/man3/X509_get_version.3 head/secure/lib/libcrypto/man/man3/X509_new.3 head/secure/lib/libcrypto/man/man3/X509_sign.3 head/secure/lib/libcrypto/man/man3/X509_verify_cert.3 head/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 head/secure/lib/libcrypto/man/man3/d2i_DHparams.3 head/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 head/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 head/secure/lib/libcrypto/man/man3/d2i_X509.3 head/secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 head/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 head/secure/lib/libcrypto/man/man5/x509v3_config.5 head/secure/lib/libcrypto/man/man7/Ed25519.7 head/secure/lib/libcrypto/man/man7/RAND.7 head/secure/lib/libcrypto/man/man7/RAND_DRBG.7 head/secure/lib/libcrypto/man/man7/RSA-PSS.7 head/secure/lib/libcrypto/man/man7/SM2.7 head/secure/lib/libcrypto/man/man7/X25519.7 head/secure/lib/libcrypto/man/man7/bio.7 head/secure/lib/libcrypto/man/man7/ct.7 head/secure/lib/libcrypto/man/man7/des_modes.7 head/secure/lib/libcrypto/man/man7/evp.7 head/secure/lib/libcrypto/man/man7/ossl_store-file.7 head/secure/lib/libcrypto/man/man7/ossl_store.7 head/secure/lib/libcrypto/man/man7/passphrase-encoding.7 head/secure/lib/libcrypto/man/man7/proxy-certificates.7 head/secure/lib/libcrypto/man/man7/scrypt.7 head/secure/lib/libcrypto/man/man7/ssl.7 head/secure/lib/libcrypto/man/man7/x509.7 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/engine.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/list.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/prime.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/srp.1 head/secure/usr.bin/openssl/man/storeutl.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/CHANGES Tue Mar 31 15:47:55 2020 (r359486) @@ -7,6 +7,24 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1e and 1.1.1f [31 Mar 2020] + + *) Revert the change of EOF detection while reading in libssl to avoid + regressions in applications depending on the current way of reporting + the EOF. As the existing method is not fully accurate the change to + reporting the EOF via SSL_ERROR_SSL is kept on the current development + branch and will be present in the 3.0 release. + [Tomas Mraz] + + *) Revised BN_generate_prime_ex to not avoid factors 3..17863 in p-1 + when primes for RSA keys are computed. + Since we previously always generated primes == 2 (mod 3) for RSA keys, + the 2-prime and 3-prime RSA modules were easy to distinguish, since + N = p*q = 1 (mod 3), but N = p*q*r = 2 (mod 3). Therefore fingerprinting + 2-prime vs. 3-prime RSA keys was possible by computing N mod 3. + This avoids possible fingerprinting of newly generated RSA modules. + [Bernd Edlinger] + Changes between 1.1.1d and 1.1.1e [17 Mar 2020] *) Properly detect EOF while reading in libssl. Previously if we hit an EOF while reading in libssl then we would report an error back to the Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/NEWS Tue Mar 31 15:47:55 2020 (r359486) @@ -5,10 +5,16 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020] + + o Revert the unexpected EOF reporting via SSL_ERROR_SSL + Major changes between OpenSSL 1.1.1d and OpenSSL 1.1.1e [17 Mar 2020] o Fixed an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli (CVE-2019-1551) + o Properly detect unexpected EOF while reading in libssl and report + it via SSL_ERROR_SSL Major changes between OpenSSL 1.1.1c and OpenSSL 1.1.1d [10 Sep 2019] Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/README Tue Mar 31 15:47:55 2020 (r359486) @@ -1,7 +1,7 @@ - OpenSSL 1.1.1e 17 Mar 2020 + OpenSSL 1.1.1f 31 Mar 2020 - Copyright (c) 1998-2019 The OpenSSL Project + Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: head/crypto/openssl/apps/rehash.c ============================================================================== --- head/crypto/openssl/apps/rehash.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/apps/rehash.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 2015-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2013-2014 Timo Teräs * * Licensed under the OpenSSL license (the "License"). You may not use @@ -274,11 +274,19 @@ static int do_file(const char *filename, const char *f if (x->x509 != NULL) { type = TYPE_CERT; name = X509_get_subject_name(x->x509); - X509_digest(x->x509, evpmd, digest, NULL); + if (!X509_digest(x->x509, evpmd, digest, NULL)) { + BIO_printf(bio_err, "out of memory\n"); + ++errs; + goto end; + } } else if (x->crl != NULL) { type = TYPE_CRL; name = X509_CRL_get_issuer(x->crl); - X509_CRL_digest(x->crl, evpmd, digest, NULL); + if (!X509_CRL_digest(x->crl, evpmd, digest, NULL)) { + BIO_printf(bio_err, "out of memory\n"); + ++errs; + goto end; + } } else { ++errs; goto end; Modified: head/crypto/openssl/apps/s_server.c ============================================================================== --- head/crypto/openssl/apps/s_server.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/apps/s_server.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -1904,7 +1904,7 @@ int s_server_main(int argc, char *argv[]) BIO_printf(bio_s_out, "Setting secondary ctx parameters\n"); if (sdebug) - ssl_ctx_security_debug(ctx, sdebug); + ssl_ctx_security_debug(ctx2, sdebug); if (session_id_prefix) { if (strlen(session_id_prefix) >= 32) Modified: head/crypto/openssl/crypto/bn/bn_local.h ============================================================================== --- head/crypto/openssl/crypto/bn/bn_local.h Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/bn/bn_local.h Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -653,9 +653,6 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, cons BIGNUM *int_bn_mod_inverse(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx, int *noinv); - -int bn_probable_prime_dh(BIGNUM *rnd, int bits, - const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx); static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits) { Modified: head/crypto/openssl/crypto/bn/bn_prime.c ============================================================================== --- head/crypto/openssl/crypto/bn/bn_prime.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/bn/bn_prime.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -22,11 +22,13 @@ static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1, const BIGNUM *a1_odd, int k, BN_CTX *ctx, BN_MONT_CTX *mont); -static int probable_prime(BIGNUM *rnd, int bits, prime_t *mods); -static int probable_prime_dh_safe(BIGNUM *rnd, int bits, - const BIGNUM *add, const BIGNUM *rem, - BN_CTX *ctx); +static int probable_prime(BIGNUM *rnd, int bits, int safe, prime_t *mods); +static int probable_prime_dh(BIGNUM *rnd, int bits, int safe, prime_t *mods, + const BIGNUM *add, const BIGNUM *rem, + BN_CTX *ctx); +#define square(x) ((BN_ULONG)(x) * (BN_ULONG)(x)) + int BN_GENCB_call(BN_GENCB *cb, int a, int b) { /* No callback means continue */ @@ -87,16 +89,11 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int sa loop: /* make a random number and set the top and bottom bits */ if (add == NULL) { - if (!probable_prime(ret, bits, mods)) + if (!probable_prime(ret, bits, safe, mods)) goto err; } else { - if (safe) { - if (!probable_prime_dh_safe(ret, bits, add, rem, ctx)) - goto err; - } else { - if (!bn_probable_prime_dh(ret, bits, add, rem, ctx)) - goto err; - } + if (!probable_prime_dh(ret, bits, safe, mods, add, rem, ctx)) + goto err; } if (!BN_GENCB_call(cb, 0, c1++)) @@ -272,17 +269,18 @@ static int witness(BIGNUM *w, const BIGNUM *a, const B return 1; } -static int probable_prime(BIGNUM *rnd, int bits, prime_t *mods) +static int probable_prime(BIGNUM *rnd, int bits, int safe, prime_t *mods) { int i; BN_ULONG delta; BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1]; - char is_single_word = bits <= BN_BITS2; again: /* TODO: Not all primes are private */ if (!BN_priv_rand(rnd, bits, BN_RAND_TOP_TWO, BN_RAND_BOTTOM_ODD)) return 0; + if (safe && !BN_set_bit(rnd, 1)) + return 0; /* we now have a random number 'rnd' to test. */ for (i = 1; i < NUMPRIMES; i++) { BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); @@ -290,62 +288,26 @@ static int probable_prime(BIGNUM *rnd, int bits, prime return 0; mods[i] = (prime_t) mod; } - /* - * If bits is so small that it fits into a single word then we - * additionally don't want to exceed that many bits. - */ - if (is_single_word) { - BN_ULONG size_limit; - - if (bits == BN_BITS2) { - /* - * Shifting by this much has undefined behaviour so we do it a - * different way - */ - size_limit = ~((BN_ULONG)0) - BN_get_word(rnd); - } else { - size_limit = (((BN_ULONG)1) << bits) - BN_get_word(rnd) - 1; - } - if (size_limit < maxdelta) - maxdelta = size_limit; - } delta = 0; loop: - if (is_single_word) { - BN_ULONG rnd_word = BN_get_word(rnd); - - /*- - * In the case that the candidate prime is a single word then - * we check that: - * 1) It's greater than primes[i] because we shouldn't reject - * 3 as being a prime number because it's a multiple of - * three. - * 2) That it's not a multiple of a known prime. We don't - * check that rnd-1 is also coprime to all the known - * primes because there aren't many small primes where - * that's true. + for (i = 1; i < NUMPRIMES; i++) { + /* + * check that rnd is a prime and also that + * gcd(rnd-1,primes) == 1 (except for 2) + * do the second check only if we are interested in safe primes + * in the case that the candidate prime is a single word then + * we check only the primes up to sqrt(rnd) */ - for (i = 1; i < NUMPRIMES && primes[i] < rnd_word; i++) { - if ((mods[i] + delta) % primes[i] == 0) { - delta += 2; - if (delta > maxdelta) - goto again; - goto loop; - } + if (bits <= 31 && delta <= 0x7fffffff + && square(primes[i]) > BN_get_word(rnd) + delta) + break; + if (safe ? (mods[i] + delta) % primes[i] <= 1 + : (mods[i] + delta) % primes[i] == 0) { + delta += safe ? 4 : 2; + if (delta > maxdelta) + goto again; + goto loop; } - } else { - for (i = 1; i < NUMPRIMES; i++) { - /* - * check that rnd is not a prime and also that gcd(rnd-1,primes) - * == 1 (except for 2) - */ - if (((mods[i] + delta) % primes[i]) <= 1) { - delta += 2; - if (delta > maxdelta) - goto again; - goto loop; - } - } } if (!BN_add_word(rnd, delta)) return 0; @@ -355,16 +317,23 @@ static int probable_prime(BIGNUM *rnd, int bits, prime return 1; } -int bn_probable_prime_dh(BIGNUM *rnd, int bits, - const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx) +static int probable_prime_dh(BIGNUM *rnd, int bits, int safe, prime_t *mods, + const BIGNUM *add, const BIGNUM *rem, + BN_CTX *ctx) { int i, ret = 0; BIGNUM *t1; + BN_ULONG delta; + BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1]; BN_CTX_start(ctx); if ((t1 = BN_CTX_get(ctx)) == NULL) goto err; + if (maxdelta > BN_MASK2 - BN_get_word(add)) + maxdelta = BN_MASK2 - BN_get_word(add); + + again: if (!BN_rand(rnd, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) goto err; @@ -375,98 +344,48 @@ int bn_probable_prime_dh(BIGNUM *rnd, int bits, if (!BN_sub(rnd, rnd, t1)) goto err; if (rem == NULL) { - if (!BN_add_word(rnd, 1)) + if (!BN_add_word(rnd, safe ? 3u : 1u)) goto err; } else { if (!BN_add(rnd, rnd, rem)) goto err; } - /* we now have a random number 'rand' to test. */ + if (BN_num_bits(rnd) < bits + || BN_get_word(rnd) < (safe ? 5u : 3u)) { + if (!BN_add(rnd, rnd, add)) + goto err; + } - loop: + /* we now have a random number 'rnd' to test. */ for (i = 1; i < NUMPRIMES; i++) { - /* check that rnd is a prime */ BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); if (mod == (BN_ULONG)-1) goto err; - if (mod <= 1) { - if (!BN_add(rnd, rnd, add)) - goto err; - goto loop; - } + mods[i] = (prime_t) mod; } - ret = 1; - - err: - BN_CTX_end(ctx); - bn_check_top(rnd); - return ret; -} - -static int probable_prime_dh_safe(BIGNUM *p, int bits, const BIGNUM *padd, - const BIGNUM *rem, BN_CTX *ctx) -{ - int i, ret = 0; - BIGNUM *t1, *qadd, *q; - - bits--; - BN_CTX_start(ctx); - t1 = BN_CTX_get(ctx); - q = BN_CTX_get(ctx); - qadd = BN_CTX_get(ctx); - if (qadd == NULL) - goto err; - - if (!BN_rshift1(qadd, padd)) - goto err; - - if (!BN_rand(q, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD)) - goto err; - - /* we need ((rnd-rem) % add) == 0 */ - if (!BN_mod(t1, q, qadd, ctx)) - goto err; - if (!BN_sub(q, q, t1)) - goto err; - if (rem == NULL) { - if (!BN_add_word(q, 1)) - goto err; - } else { - if (!BN_rshift1(t1, rem)) - goto err; - if (!BN_add(q, q, t1)) - goto err; - } - - /* we now have a random number 'rand' to test. */ - if (!BN_lshift1(p, q)) - goto err; - if (!BN_add_word(p, 1)) - goto err; - + delta = 0; loop: for (i = 1; i < NUMPRIMES; i++) { - /* check that p and q are prime */ - /* - * check that for p and q gcd(p-1,primes) == 1 (except for 2) - */ - BN_ULONG pmod = BN_mod_word(p, (BN_ULONG)primes[i]); - BN_ULONG qmod = BN_mod_word(q, (BN_ULONG)primes[i]); - if (pmod == (BN_ULONG)-1 || qmod == (BN_ULONG)-1) - goto err; - if (pmod == 0 || qmod == 0) { - if (!BN_add(p, p, padd)) - goto err; - if (!BN_add(q, q, qadd)) - goto err; + /* check that rnd is a prime */ + if (bits <= 31 && delta <= 0x7fffffff + && square(primes[i]) > BN_get_word(rnd) + delta) + break; + /* rnd mod p == 1 implies q = (rnd-1)/2 is divisible by p */ + if (safe ? (mods[i] + delta) % primes[i] <= 1 + : (mods[i] + delta) % primes[i] == 0) { + delta += BN_get_word(add); + if (delta > maxdelta) + goto again; goto loop; } } + if (!BN_add_word(rnd, delta)) + goto err; ret = 1; err: BN_CTX_end(ctx); - bn_check_top(p); + bn_check_top(rnd); return ret; } Modified: head/crypto/openssl/crypto/conf/conf_lib.c ============================================================================== --- head/crypto/openssl/crypto/conf/conf_lib.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/conf/conf_lib.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -356,8 +356,10 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void) { OPENSSL_INIT_SETTINGS *ret = malloc(sizeof(*ret)); - if (ret != NULL) - memset(ret, 0, sizeof(*ret)); + if (ret == NULL) + return NULL; + + memset(ret, 0, sizeof(*ret)); ret->flags = DEFAULT_CONF_MFLAGS; return ret; Modified: head/crypto/openssl/crypto/err/openssl.txt ============================================================================== --- head/crypto/openssl/crypto/err/openssl.txt Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/err/openssl.txt Tue Mar 31 15:47:55 2020 (r359486) @@ -2852,7 +2852,6 @@ SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES:242:unable to l SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES:243:unable to load ssl3 sha1 routines SSL_R_UNEXPECTED_CCS_MESSAGE:262:unexpected ccs message SSL_R_UNEXPECTED_END_OF_EARLY_DATA:178:unexpected end of early data -SSL_R_UNEXPECTED_EOF_WHILE_READING:294:unexpected eof while reading SSL_R_UNEXPECTED_MESSAGE:244:unexpected message SSL_R_UNEXPECTED_RECORD:245:unexpected record SSL_R_UNINITIALIZED:276:uninitialized Modified: head/crypto/openssl/crypto/ex_data.c ============================================================================== --- head/crypto/openssl/crypto/ex_data.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/ex_data.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -235,7 +235,7 @@ int CRYPTO_new_ex_data(int class_index, void *obj, CRY return 0; } for (i = 0; i < mx; i++) { - if (storage[i] && storage[i]->new_func) { + if (storage[i] != NULL && storage[i]->new_func != NULL) { ptr = CRYPTO_get_ex_data(ad, i); storage[i]->new_func(obj, ptr, ad, i, storage[i]->argl, storage[i]->argp); @@ -299,7 +299,7 @@ int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA for (i = 0; i < mx; i++) { ptr = CRYPTO_get_ex_data(from, i); - if (storage[i] && storage[i]->dup_func) + if (storage[i] != NULL && storage[i]->dup_func != NULL) if (!storage[i]->dup_func(to, from, &ptr, i, storage[i]->argl, storage[i]->argp)) goto err; Modified: head/crypto/openssl/crypto/pkcs12/p12_crt.c ============================================================================== --- head/crypto/openssl/crypto/pkcs12/p12_crt.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/pkcs12/p12_crt.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -62,7 +62,8 @@ PKCS12 *PKCS12_create(const char *pass, const char *na if (pkey && cert) { if (!X509_check_private_key(cert, pkey)) return NULL; - X509_digest(cert, EVP_sha1(), keyid, &keyidlen); + if (!X509_digest(cert, EVP_sha1(), keyid, &keyidlen)) + return NULL; } if (cert) { Modified: head/crypto/openssl/crypto/ts/ts_rsp_sign.c ============================================================================== --- head/crypto/openssl/crypto/ts/ts_rsp_sign.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/ts/ts_rsp_sign.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -771,7 +771,8 @@ static ESS_CERT_ID *ess_CERT_ID_new_init(X509 *cert, i X509_check_purpose(cert, -1, 0); if ((cid = ESS_CERT_ID_new()) == NULL) goto err; - X509_digest(cert, EVP_sha1(), cert_sha1, NULL); + if (!X509_digest(cert, EVP_sha1(), cert_sha1, NULL)) + goto err; if (!ASN1_OCTET_STRING_set(cid->hash, cert_sha1, SHA_DIGEST_LENGTH)) goto err; Modified: head/crypto/openssl/crypto/ts/ts_rsp_verify.c ============================================================================== --- head/crypto/openssl/crypto/ts/ts_rsp_verify.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/ts/ts_rsp_verify.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -289,11 +289,12 @@ static int ts_find_cert(STACK_OF(ESS_CERT_ID) *cert_id if (!cert_ids || !cert) return -1; - X509_digest(cert, EVP_sha1(), cert_sha1, NULL); - /* Recompute SHA1 hash of certificate if necessary (side effect). */ X509_check_purpose(cert, -1, 0); + if (!X509_digest(cert, EVP_sha1(), cert_sha1, NULL)) + return -1; + /* Look for cert in the cert_ids vector. */ for (i = 0; i < sk_ESS_CERT_ID_num(cert_ids); ++i) { ESS_CERT_ID *cid = sk_ESS_CERT_ID_value(cert_ids, i); @@ -326,7 +327,8 @@ static int ts_find_cert_v2(STACK_OF(ESS_CERT_ID_V2) *c else md = EVP_sha256(); - X509_digest(cert, md, cert_digest, &len); + if (!X509_digest(cert, md, cert_digest, &len)) + return -1; if (cid->hash->length != (int)len) return -1; Modified: head/crypto/openssl/crypto/x509/x509_cmp.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_cmp.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509/x509_cmp.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -134,9 +134,12 @@ unsigned long X509_subject_name_hash_old(X509 *x) int X509_cmp(const X509 *a, const X509 *b) { int rv; + /* ensure hash is valid */ - X509_check_purpose((X509 *)a, -1, 0); - X509_check_purpose((X509 *)b, -1, 0); + if (X509_check_purpose((X509 *)a, -1, 0) != 1) + return -2; + if (X509_check_purpose((X509 *)b, -1, 0) != 1) + return -2; rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH); if (rv) Modified: head/crypto/openssl/crypto/x509/x509_trs.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_trs.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509/x509_trs.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -240,8 +240,9 @@ static int trust_1oid(X509_TRUST *trust, X509 *x, int static int trust_compat(X509_TRUST *trust, X509 *x, int flags) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, 0); - if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && x->ex_flags & EXFLAG_SS) + if (X509_check_purpose(x, -1, 0) != 1) + return X509_TRUST_UNTRUSTED; + if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS)) return X509_TRUST_TRUSTED; else return X509_TRUST_UNTRUSTED; Modified: head/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_vfy.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509/x509_vfy.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -107,12 +107,8 @@ static int null_callback(int ok, X509_STORE_CTX *e) /* Return 1 is a certificate is self signed */ static int cert_self_signed(X509 *x) { - /* - * FIXME: x509v3_cache_extensions() needs to detect more failures and not - * set EXFLAG_SET when that happens. Especially, if the failures are - * parse errors, rather than memory pressure! - */ - X509_check_purpose(x, -1, 0); + if (X509_check_purpose(x, -1, 0) != 1) + return 0; if (x->ex_flags & EXFLAG_SS) return 1; else Modified: head/crypto/openssl/crypto/x509/x_all.c ============================================================================== --- head/crypto/openssl/crypto/x509/x_all.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509/x_all.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -362,7 +362,8 @@ int X509_pubkey_digest(const X509 *data, const EVP_MD int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { - if (type == EVP_sha1() && (data->ex_flags & EXFLAG_SET) != 0) { + if (type == EVP_sha1() && (data->ex_flags & EXFLAG_SET) != 0 + && (data->ex_flags & EXFLAG_INVALID) == 0) { /* Asking for SHA1 and we already computed it. */ if (len != NULL) *len = sizeof(data->sha1_hash); @@ -376,7 +377,8 @@ int X509_digest(const X509 *data, const EVP_MD *type, int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { - if (type == EVP_sha1() && (data->flags & EXFLAG_SET) != 0) { + if (type == EVP_sha1() && (data->flags & EXFLAG_SET) != 0 + && (data->flags & EXFLAG_INVALID) == 0) { /* Asking for SHA1; always computed in CRL d2i. */ if (len != NULL) *len = sizeof(data->sha1_hash); Modified: head/crypto/openssl/crypto/x509/x_crl.c ============================================================================== --- head/crypto/openssl/crypto/x509/x_crl.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509/x_crl.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -17,7 +17,7 @@ static int X509_REVOKED_cmp(const X509_REVOKED *const *a, const X509_REVOKED *const *b); -static void setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); +static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); ASN1_SEQUENCE(X509_REVOKED) = { ASN1_EMBED(X509_REVOKED,serialNumber, ASN1_INTEGER), @@ -155,7 +155,7 @@ static int crl_cb(int operation, ASN1_VALUE **pval, co X509_CRL *crl = (X509_CRL *)*pval; STACK_OF(X509_EXTENSION) *exts; X509_EXTENSION *ext; - int idx; + int idx, i; switch (operation) { case ASN1_OP_D2I_PRE: @@ -184,23 +184,35 @@ static int crl_cb(int operation, ASN1_VALUE **pval, co break; case ASN1_OP_D2I_POST: - X509_CRL_digest(crl, EVP_sha1(), crl->sha1_hash, NULL); + if (!X509_CRL_digest(crl, EVP_sha1(), crl->sha1_hash, NULL)) + crl->flags |= EXFLAG_INVALID; crl->idp = X509_CRL_get_ext_d2i(crl, - NID_issuing_distribution_point, NULL, + NID_issuing_distribution_point, &i, NULL); - if (crl->idp) - setup_idp(crl, crl->idp); + if (crl->idp != NULL) { + if (!setup_idp(crl, crl->idp)) + crl->flags |= EXFLAG_INVALID; + } + else if (i != -1) { + crl->flags |= EXFLAG_INVALID; + } crl->akid = X509_CRL_get_ext_d2i(crl, - NID_authority_key_identifier, NULL, + NID_authority_key_identifier, &i, NULL); + if (crl->akid == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; crl->crl_number = X509_CRL_get_ext_d2i(crl, - NID_crl_number, NULL, NULL); + NID_crl_number, &i, NULL); + if (crl->crl_number == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; crl->base_crl_number = X509_CRL_get_ext_d2i(crl, - NID_delta_crl, NULL, + NID_delta_crl, &i, NULL); + if (crl->base_crl_number == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; /* Delta CRLs must have CRL number */ if (crl->base_crl_number && !crl->crl_number) crl->flags |= EXFLAG_INVALID; @@ -259,9 +271,10 @@ static int crl_cb(int operation, ASN1_VALUE **pval, co /* Convert IDP into a more convenient form */ -static void setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) +static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) { int idp_only = 0; + /* Set various flags according to IDP */ crl->idp_flags |= IDP_PRESENT; if (idp->onlyuser > 0) { @@ -292,7 +305,7 @@ static void setup_idp(X509_CRL *crl, ISSUING_DIST_POIN crl->idp_reasons &= CRLDP_ALL_REASONS; } - DIST_POINT_set_dpname(idp->distpoint, X509_CRL_get_issuer(crl)); + return DIST_POINT_set_dpname(idp->distpoint, X509_CRL_get_issuer(crl)); } ASN1_SEQUENCE_ref(X509_CRL, crl_cb) = { Modified: head/crypto/openssl/crypto/x509v3/v3_purp.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_purp.c Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/crypto/x509v3/v3_purp.c Tue Mar 31 15:47:55 2020 (r359486) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -81,6 +81,8 @@ int X509_check_purpose(X509 *x, int id, int ca) const X509_PURPOSE *pt; x509v3_cache_extensions(x); + if (x->ex_flags & EXFLAG_INVALID) + return -1; /* Return if side-effect only call */ if (id == -1) @@ -300,10 +302,11 @@ int X509_supported_extension(X509_EXTENSION *ex) return 0; } -static void setup_dp(X509 *x, DIST_POINT *dp) +static int setup_dp(X509 *x, DIST_POINT *dp) { X509_NAME *iname = NULL; int i; + if (dp->reasons) { if (dp->reasons->length > 0) dp->dp_reasons = dp->reasons->data[0]; @@ -313,7 +316,7 @@ static void setup_dp(X509 *x, DIST_POINT *dp) } else dp->dp_reasons = CRLDP_ALL_REASONS; if (!dp->distpoint || (dp->distpoint->type != 1)) - return; + return 1; for (i = 0; i < sk_GENERAL_NAME_num(dp->CRLissuer); i++) { GENERAL_NAME *gen = sk_GENERAL_NAME_value(dp->CRLissuer, i); if (gen->type == GEN_DIRNAME) { @@ -324,16 +327,21 @@ static void setup_dp(X509 *x, DIST_POINT *dp) if (!iname) iname = X509_get_issuer_name(x); - DIST_POINT_set_dpname(dp->distpoint, iname); - + return DIST_POINT_set_dpname(dp->distpoint, iname); } -static void setup_crldp(X509 *x) +static int setup_crldp(X509 *x) { int i; - x->crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, NULL, NULL); - for (i = 0; i < sk_DIST_POINT_num(x->crldp); i++) - setup_dp(x, sk_DIST_POINT_value(x->crldp, i)); + + x->crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL); + if (x->crldp == NULL && i != -1) + return 0; + for (i = 0; i < sk_DIST_POINT_num(x->crldp); i++) { + if (!setup_dp(x, sk_DIST_POINT_value(x->crldp, i))) + return 0; + } + return 1; } #define V1_ROOT (EXFLAG_V1|EXFLAG_SS) @@ -366,12 +374,13 @@ static void x509v3_cache_extensions(X509 *x) return; } - X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); + if (!X509_digest(x, EVP_sha1(), x->sha1_hash, NULL)) + x->ex_flags |= EXFLAG_INVALID; /* V1 should mean no extensions ... */ if (!X509_get_version(x)) x->ex_flags |= EXFLAG_V1; /* Handle basic constraints */ - if ((bs = X509_get_ext_d2i(x, NID_basic_constraints, NULL, NULL))) { + if ((bs = X509_get_ext_d2i(x, NID_basic_constraints, &i, NULL))) { if (bs->ca) x->ex_flags |= EXFLAG_CA; if (bs->pathlen) { @@ -385,9 +394,11 @@ static void x509v3_cache_extensions(X509 *x) x->ex_pathlen = -1; BASIC_CONSTRAINTS_free(bs); x->ex_flags |= EXFLAG_BCONS; + } else if (i != -1) { + x->ex_flags |= EXFLAG_INVALID; } /* Handle proxy certificates */ - if ((pci = X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) { + if ((pci = X509_get_ext_d2i(x, NID_proxyCertInfo, &i, NULL))) { if (x->ex_flags & EXFLAG_CA || X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0 || X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) { @@ -399,9 +410,11 @@ static void x509v3_cache_extensions(X509 *x) x->ex_pcpathlen = -1; PROXY_CERT_INFO_EXTENSION_free(pci); x->ex_flags |= EXFLAG_PROXY; + } else if (i != -1) { + x->ex_flags |= EXFLAG_INVALID; } /* Handle key usage */ - if ((usage = X509_get_ext_d2i(x, NID_key_usage, NULL, NULL))) { + if ((usage = X509_get_ext_d2i(x, NID_key_usage, &i, NULL))) { if (usage->length > 0) { x->ex_kusage = usage->data[0]; if (usage->length > 1) @@ -410,9 +423,11 @@ static void x509v3_cache_extensions(X509 *x) x->ex_kusage = 0; x->ex_flags |= EXFLAG_KUSAGE; ASN1_BIT_STRING_free(usage); + } else if (i != -1) { + x->ex_flags |= EXFLAG_INVALID; } x->ex_xkusage = 0; - if ((extusage = X509_get_ext_d2i(x, NID_ext_key_usage, NULL, NULL))) { + if ((extusage = X509_get_ext_d2i(x, NID_ext_key_usage, &i, NULL))) { x->ex_flags |= EXFLAG_XKUSAGE; for (i = 0; i < sk_ASN1_OBJECT_num(extusage); i++) { switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) { @@ -455,18 +470,26 @@ static void x509v3_cache_extensions(X509 *x) } } sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free); + } else if (i != -1) { + x->ex_flags |= EXFLAG_INVALID; } - if ((ns = X509_get_ext_d2i(x, NID_netscape_cert_type, NULL, NULL))) { + if ((ns = X509_get_ext_d2i(x, NID_netscape_cert_type, &i, NULL))) { if (ns->length > 0) x->ex_nscert = ns->data[0]; else x->ex_nscert = 0; x->ex_flags |= EXFLAG_NSCERT; ASN1_BIT_STRING_free(ns); + } else if (i != -1) { + x->ex_flags |= EXFLAG_INVALID; } - x->skid = X509_get_ext_d2i(x, NID_subject_key_identifier, NULL, NULL); - x->akid = X509_get_ext_d2i(x, NID_authority_key_identifier, NULL, NULL); + x->skid = X509_get_ext_d2i(x, NID_subject_key_identifier, &i, NULL); + if (x->skid == NULL && i != -1) + x->ex_flags |= EXFLAG_INVALID; + x->akid = X509_get_ext_d2i(x, NID_authority_key_identifier, &i, NULL); + if (x->akid == NULL && i != -1) + x->ex_flags |= EXFLAG_INVALID; /* Does subject name match issuer ? */ if (!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) { x->ex_flags |= EXFLAG_SI; @@ -475,16 +498,22 @@ static void x509v3_cache_extensions(X509 *x) !ku_reject(x, KU_KEY_CERT_SIGN)) x->ex_flags |= EXFLAG_SS; } - x->altname = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); + x->altname = X509_get_ext_d2i(x, NID_subject_alt_name, &i, NULL); + if (x->altname == NULL && i != -1) + x->ex_flags |= EXFLAG_INVALID; x->nc = X509_get_ext_d2i(x, NID_name_constraints, &i, NULL); - if (!x->nc && (i != -1)) + if (x->nc == NULL && i != -1) x->ex_flags |= EXFLAG_INVALID; - setup_crldp(x); + if (!setup_crldp(x)) + x->ex_flags |= EXFLAG_INVALID; #ifndef OPENSSL_NO_RFC3779 - x->rfc3779_addr = X509_get_ext_d2i(x, NID_sbgp_ipAddrBlock, NULL, NULL); - x->rfc3779_asid = X509_get_ext_d2i(x, NID_sbgp_autonomousSysNum, - NULL, NULL); + x->rfc3779_addr = X509_get_ext_d2i(x, NID_sbgp_ipAddrBlock, &i, NULL); + if (x->rfc3779_addr == NULL && i != -1) + x->ex_flags |= EXFLAG_INVALID; + x->rfc3779_asid = X509_get_ext_d2i(x, NID_sbgp_autonomousSysNum, &i, NULL); + if (x->rfc3779_asid == NULL && i != -1) + x->ex_flags |= EXFLAG_INVALID; #endif for (i = 0; i < X509_get_ext_count(x); i++) { ex = X509_get_ext(x, i); @@ -777,7 +806,11 @@ int X509_check_issued(X509 *issuer, X509 *subject) return X509_V_ERR_SUBJECT_ISSUER_MISMATCH; x509v3_cache_extensions(issuer); + if (issuer->ex_flags & EXFLAG_INVALID) + return X509_V_ERR_UNSPECIFIED; x509v3_cache_extensions(subject); + if (subject->ex_flags & EXFLAG_INVALID) + return X509_V_ERR_UNSPECIFIED; if (subject->akid) { int ret = X509_check_akid(issuer, subject->akid); @@ -842,7 +875,8 @@ uint32_t X509_get_extension_flags(X509 *x) uint32_t X509_get_key_usage(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return 0; if (x->ex_flags & EXFLAG_KUSAGE) return x->ex_kusage; return UINT32_MAX; @@ -851,7 +885,8 @@ uint32_t X509_get_key_usage(X509 *x) uint32_t X509_get_extended_key_usage(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return 0; if (x->ex_flags & EXFLAG_XKUSAGE) return x->ex_xkusage; return UINT32_MAX; @@ -860,28 +895,32 @@ uint32_t X509_get_extended_key_usage(X509 *x) const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return NULL; return x->skid; } const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return NULL; return (x->akid != NULL ? x->akid->keyid : NULL); } const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return NULL; return (x->akid != NULL ? x->akid->issuer : NULL); } const ASN1_INTEGER *X509_get0_authority_serial(X509 *x) { /* Call for side-effect of computing hash and caching extensions */ - X509_check_purpose(x, -1, -1); + if (X509_check_purpose(x, -1, -1) != 1) + return NULL; return (x->akid != NULL ? x->akid->serial : NULL); } Modified: head/crypto/openssl/doc/man3/BN_generate_prime.pod ============================================================================== --- head/crypto/openssl/doc/man3/BN_generate_prime.pod Tue Mar 31 15:28:31 2020 (r359485) +++ head/crypto/openssl/doc/man3/BN_generate_prime.pod Tue Mar 31 15:47:55 2020 (r359486) @@ -52,7 +52,9 @@ Deprecated: BN_generate_prime_ex() generates a pseudo-random prime number of at least bit length B. The returned number is probably prime -with a negligible error. +with a negligible error. If B is B the returned prime +number will have exact bit length B with the top most two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 31 15:57:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B74B2618E9; Tue, 31 Mar 2020 15:57:52 +0000 (UTC) (envelope-from kp@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 48sDW13YKDz48Ns; Tue, 31 Mar 2020 15:57:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id B60F512C24; Tue, 31 Mar 2020 15:57:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id F3AF91BF3D; Tue, 31 Mar 2020 17:57:40 +0200 (CEST) From: "Kristof Provost" To: "Mark Johnston" Cc: "Li-Wen Hsu" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359436 - in head/sys: kern net sys Date: Tue, 31 Mar 2020 17:57:40 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <49973196-5F08-4DCE-BA5F-F9B359703A08@FreeBSD.org> In-Reply-To: <9A4C20AA-8E13-47C8-B162-F2304F8C79B7@FreeBSD.org> References: <202003301422.02UEMrxL059978@repo.freebsd.org> <20200331015905.GC65028@raichu> <20200331023127.GA97238@raichu> <20200331151700.GC97238@raichu> <9A4C20AA-8E13-47C8-B162-F2304F8C79B7@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:57:52 -0000 On 31 Mar 2020, at 17:28, Kristof Provost wrote: > On 31 Mar 2020, at 17:17, Mark Johnston wrote: >> On Tue, Mar 31, 2020 at 03:51:27PM +0800, Li-Wen Hsu wrote: >>> On Tue, Mar 31, 2020 at 3:00 PM Kristof Provost >>> wrote: >>>> >>>> On 31 Mar 2020, at 7:56, Li-Wen Hsu wrote: >>>>> On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston >>>>> wrote: >>>>>>>> It seems could be triggered by sys.netinet6.frag6.* >>>>>>>> sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there >>>>>>>> are lots >>>>>>>> of test cases timed out. >>>>>>>> >>>>>>>> Can you help check these? >>>>>>> >>>>>>> I see, it is actually caused by r359438. I'm looking at it now. >>>>>> >>>>>> I verified that the netpfil and netinet6 tests pass with r359477. >>>>> >>>>> Thanks for the fixing, the latest test panics at epair_qflush: >>>>> >>>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull >>>>> >>>>> while executing sys.netpfil.pf.* tests. I'm not sure if this is >>>>> related or because of previous commits (I suspect the later). I'll >>>>> look into this. >>>>> >>>> That’s a know issue with epair (since EPOCH, I believe). >>>> A number of the pf tests are disabled due to this. See 238870. >>> >>> I also think so, btw, currently every test run panics so I am afraid >>> that the recent commits might make status worse (or say, make the >>> issue easier to reproduce?) >> >> I haven't been able to reproduce any panics or test failures so far. > > Once you disable the ‘atf_skip’ lines in the pf tests a simple > `sudo kldload pfsync && cd /usr/tests/sys/netpfil/pf && sudo kyua > test` is likely sufficient. > The names:names test is a great candidate for this. Remove the `atf_skip …` line in /usr/tests/sys/netpfil/pf/names and run that a few times. It’s not 100% reliable, but the test is very fast and will likely panic every other run or more. Example backtrace: panic: epair_qflush: ifp=0xfffff800079c9000, epair_softc gone? sc=0 cpuid = 1 time = 1585666518 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001bd7e790 vpanic() at vpanic+0x182/frame 0xfffffe001bd7e7e0 panic() at panic+0x43/frame 0xfffffe001bd7e840 epair_qflush() at epair_qflush+0x1a8/frame 0xfffffe001bd7e890 if_down() at if_down+0x12d/frame 0xfffffe001bd7e8c0 if_detach_internal() at if_detach_internal+0x2ee/frame 0xfffffe001bd7e920 if_vmove() at if_vmove+0x3c/frame 0xfffffe001bd7e970 vnet_if_return() at vnet_if_return+0x50/frame 0xfffffe001bd7e990 vnet_destroy() at vnet_destroy+0x130/frame 0xfffffe001bd7e9c0 prison_deref() at prison_deref+0x29d/frame 0xfffffe001bd7ea00 taskqueue_run_locked() at taskqueue_run_locked+0xaa/frame 0xfffffe001bd7ea80 taskqueue_thread_loop() at taskqueue_thread_loop+0x94/frame 0xfffffe001bd7eab0 fork_exit() at fork_exit+0x80/frame 0xfffffe001bd7eaf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe001bd7eaf0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- KDB: enter: panic [ thread pid 0 tid 100014 ] Stopped at kdb_enter+0x37: movq $0,0x10927a6(%rip) db> You might see different panics too. The epair teardown flow is complex, and broken. Best regards, Kristof From owner-svn-src-head@freebsd.org Tue Mar 31 15:59:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BDBE261934; Tue, 31 Mar 2020 15:59:40 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sDY65VLsz490B; Tue, 31 Mar 2020 15:59:38 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D69A8C6F4; Tue, 31 Mar 2020 15:59:29 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02VFxTkY095319; Tue, 31 Mar 2020 15:59:29 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VFxTKv095318; Tue, 31 Mar 2020 15:59:29 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202003311559.02VFxTKv095318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 31 Mar 2020 15:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359488 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 359488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:59:40 -0000 Author: sjg Date: Tue Mar 31 15:59:29 2020 New Revision: 359488 URL: https://svnweb.freebsd.org/changeset/base/359488 Log: Include ${.CURDIR}/local.init.mk if it exists This is handy for making local hacks to an app (eg to build it as tool for non-BSD host) without making a mess of the code base. Reviewed by: bdrewery MFC after: 1 week Differential Revision: https://reviews.freebsd.org//D24101 Modified: head/share/mk/local.init.mk Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Tue Mar 31 15:54:54 2020 (r359487) +++ head/share/mk/local.init.mk Tue Mar 31 15:59:29 2020 (r359488) @@ -1,5 +1,8 @@ # $FreeBSD$ +.if !target(__${_this}__) +__${_this}__: + .if ${.MAKE.MODE:Mmeta*} != "" .if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == "" .if ${.MAKE.MODE:Mleaf*} != "" @@ -33,3 +36,5 @@ CFLAGS+= ${HOST_CFLAGS} .endif .-include "src.init.mk" +.-include "${.CURDIR}/local.init.mk" +.endif From owner-svn-src-head@freebsd.org Tue Mar 31 16:00:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 006792619D5; Tue, 31 Mar 2020 16:00:56 +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 48sDZb3Cxzz49RZ; Tue, 31 Mar 2020 16:00:55 +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 1A10AC69A; Tue, 31 Mar 2020 15:54:56 +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 02VFstMK095033; Tue, 31 Mar 2020 15:54:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VFstLC095029; Tue, 31 Mar 2020 15:54:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003311554.02VFstLC095029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 31 Mar 2020 15:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359487 - in head: share/man/man4 sys/netinet sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head: share/man/man4 sys/netinet sys/netinet/tcp_stacks X-SVN-Commit-Revision: 359487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 16:00:56 -0000 Author: tuexen Date: Tue Mar 31 15:54:54 2020 New Revision: 359487 URL: https://svnweb.freebsd.org/changeset/base/359487 Log: Allow the TCP backhole detection to be disabled at all, enabled only for IPv4, enabled only for IPv6, and enabled for IPv4 and IPv6. The current blackhole detection might classify a temporary outage as an MTU issue and reduces permanently the MSS. Since the consequences of such a reduction due to a misclassification are much more drastically for IPv4 than for IPv6, allow the administrator to enable it for IPv6 only. Reviewed by: bcr@ (man page), Richard Scheffenegger Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D24219 Modified: head/share/man/man4/tcp.4 head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_timer.c Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Tue Mar 31 15:47:55 2020 (r359486) +++ head/share/man/man4/tcp.4 Tue Mar 31 15:54:54 2020 (r359487) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd March 29, 2020 +.Dd March 31, 2020 .Dt TCP 4 .Os .Sh NAME @@ -628,21 +628,31 @@ specific connection. This is needed to help with connection establishment when a broken firewall is in the network path. .It Va pmtud_blackhole_detection -Turn on automatic path MTU blackhole detection. -In case of retransmits OS will -lower the MSS to check if it's MTU problem. -If current MSS is greater than -configured value to try +Enable automatic path MTU blackhole detection. +In case of retransmits of MSS sized segments, +the OS will lower the MSS to check if it's an MTU problem. +If the current MSS is greater than the configured value to try .Po Va net.inet.tcp.pmtud_blackhole_mss and .Va net.inet.tcp.v6pmtud_blackhole_mss .Pc , it will be set to this value, otherwise, -MSS will be set to default values +the MSS will be set to the default values .Po Va net.inet.tcp.mssdflt and .Va net.inet.tcp.v6mssdflt .Pc . +Settings: +.Bl -tag -compact +.It 0 +Disable path MTU blackhole detection. +.It 1 +Enable path MTU blackhole detection for IPv4 and IPv6. +.It 2 +Enable path MTU blackhole detection only for IPv4. +.It 3 +Enable path MTU blackhole detection only for IPv6. +.El .It Va pmtud_blackhole_mss MSS to try for IPv4 if PMTU blackhole detection is turned on. .It Va v6pmtud_blackhole_mss Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Tue Mar 31 15:47:55 2020 (r359486) +++ head/sys/netinet/tcp_stacks/bbr.c Tue Mar 31 15:54:54 2020 (r359487) @@ -5041,6 +5041,7 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, { int32_t rexmt; int32_t retval = 0; + bool isipv6; bbr->r_ctl.rc_hpts_flags &= ~PACE_TMR_RXT; if (bbr->rc_all_timers_stopped) { @@ -5127,11 +5128,16 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, * of packets and process straight to FIN. In that case we won't * catch ESTABLISHED state. */ - if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED)) - || (tp->t_state == TCPS_FIN_WAIT_1))) { #ifdef INET6 - int32_t isipv6; + isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? true : false; +#else + isipv6 = false; #endif + if (((V_tcp_pmtud_blackhole_detect == 1) || + (V_tcp_pmtud_blackhole_detect == 2 && !isipv6) || + (V_tcp_pmtud_blackhole_detect == 3 && isipv6)) && + ((tp->t_state == TCPS_ESTABLISHED) || + (tp->t_state == TCPS_FIN_WAIT_1))) { /* * Idea here is that at each stage of mtu probe (usually, Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Mar 31 15:47:55 2020 (r359486) +++ head/sys/netinet/tcp_stacks/rack.c Tue Mar 31 15:54:54 2020 (r359487) @@ -3123,6 +3123,7 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra int32_t rexmt; struct inpcb *inp; int32_t retval = 0; + bool isipv6; inp = tp->t_inpcb; if (tp->t_timers->tt_flags & TT_STOPPED) { @@ -3209,11 +3210,16 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra * of packets and process straight to FIN. In that case we won't * catch ESTABLISHED state. */ - if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED)) - || (tp->t_state == TCPS_FIN_WAIT_1))) { #ifdef INET6 - int32_t isipv6; + isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? true : false; +#else + isipv6 = false; #endif + if (((V_tcp_pmtud_blackhole_detect == 1) || + (V_tcp_pmtud_blackhole_detect == 2 && !isipv6) || + (V_tcp_pmtud_blackhole_detect == 3 && isipv6)) && + ((tp->t_state == TCPS_ESTABLISHED) || + (tp->t_state == TCPS_FIN_WAIT_1))) { /* * Idea here is that at each stage of mtu probe (usually, @@ -3243,7 +3249,6 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra * default in an attempt to retransmit. */ #ifdef INET6 - isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? 1 : 0; if (isipv6 && tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss) { /* Use the sysctl tuneable blackhole MSS. */ Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Tue Mar 31 15:47:55 2020 (r359486) +++ head/sys/netinet/tcp_timer.c Tue Mar 31 15:54:54 2020 (r359487) @@ -614,6 +614,7 @@ tcp_timer_rexmt(void * xtp) int rexmt; struct inpcb *inp; struct epoch_tracker et; + bool isipv6; #ifdef TCPDEBUG int ostate; @@ -712,12 +713,16 @@ tcp_timer_rexmt(void * xtp) * packets and process straight to FIN. In that case we won't catch * ESTABLISHED state. */ - if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED)) - || (tp->t_state == TCPS_FIN_WAIT_1))) { #ifdef INET6 - int isipv6; + isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? true : false; +#else + isipv6 = false; #endif - + if (((V_tcp_pmtud_blackhole_detect == 1) || + (V_tcp_pmtud_blackhole_detect == 2 && !isipv6) || + (V_tcp_pmtud_blackhole_detect == 3 && isipv6)) && + ((tp->t_state == TCPS_ESTABLISHED) || + (tp->t_state == TCPS_FIN_WAIT_1))) { /* * Idea here is that at each stage of mtu probe (usually, 1448 * -> 1188 -> 524) should be given 2 chances to recover before @@ -746,7 +751,6 @@ tcp_timer_rexmt(void * xtp) * in an attempt to retransmit. */ #ifdef INET6 - isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? 1 : 0; if (isipv6 && tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss) { /* Use the sysctl tuneable blackhole MSS. */ From owner-svn-src-head@freebsd.org Tue Mar 31 16:47:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC4422630FD; Tue, 31 Mar 2020 16:47:26 +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 48sFcF0CjYz4Sjx; Tue, 31 Mar 2020 16:47:24 +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 587FBD14F; Tue, 31 Mar 2020 16:47:16 +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 02VGlGMs027074; Tue, 31 Mar 2020 16:47:16 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VGlGc3027073; Tue, 31 Mar 2020 16:47:16 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202003311647.02VGlGc3027073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 31 Mar 2020 16:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359489 - head/usr.sbin/valectl X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/usr.sbin/valectl X-SVN-Commit-Revision: 359489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 16:47:27 -0000 Author: vmaffione Date: Tue Mar 31 16:47:15 2020 New Revision: 359489 URL: https://svnweb.freebsd.org/changeset/base/359489 Log: valectl: fix typo in man page Submitted by: Jose Luis Duran MFC after: 3 days Modified: head/usr.sbin/valectl/valectl.8 Modified: head/usr.sbin/valectl/valectl.8 ============================================================================== --- head/usr.sbin/valectl/valectl.8 Tue Mar 31 15:59:29 2020 (r359488) +++ head/usr.sbin/valectl/valectl.8 Tue Mar 31 16:47:15 2020 (r359489) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2019 +.Dd March 31, 2020 .Dt VALECTL 8 .Os .Sh NAME @@ -95,7 +95,7 @@ Create a new persistent VALE port with name .Ar interface . The name must be different from any other network interface already present in the system. -.It Fl d Ar interface +.It Fl r Ar interface Destroy the persistent VALE port with name .Ar inteface . .It Fl l Ar valeSSS:PPP From owner-svn-src-head@freebsd.org Tue Mar 31 20:15:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E99E426A7DC; Tue, 31 Mar 2020 20:15:42 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sLDZ0ws1z3Lwf; Tue, 31 Mar 2020 20:15:42 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94CD5FD65; Tue, 31 Mar 2020 20:09:20 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02VK9Kt0051093; Tue, 31 Mar 2020 20:09:20 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VK9KNJ051092; Tue, 31 Mar 2020 20:09:20 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <202003312009.02VK9KNJ051092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Tue, 31 Mar 2020 20:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359493 - head/sys/mips/nlm/dev/net X-SVN-Group: head X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: head/sys/mips/nlm/dev/net X-SVN-Commit-Revision: 359493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 20:15:43 -0000 Author: rpokala Date: Tue Mar 31 20:09:20 2020 New Revision: 359493 URL: https://svnweb.freebsd.org/changeset/base/359493 Log: Fix build for mips.XLP64 kernel, by re-ordering headers The log for the failure contained errors like this: | In file included from ${SRCTOP}/sys/mips/nlm/dev/net/xlpge.c:34: | In file included from ${SRCTOP}/sys/sys/systm.h:44: | In file included from ./machine/atomic.h:849: | ${SRCTOP}/sys/sys/_atomic_subword.h:222:37: error: unknown type name 'u_long'; did you mean 'long'? | atomic_testandset_acq_long(volatile u_long *p, u_int v) | ^~~~~~ | long And similar "unknown type name" errors for u_int, not recognizing bool as a type, etc. This was caused by including too far down; move it up where it belongs. While here, add a blank line after '__FBSDID()', in keeping with convention. Reviewed by: emaste Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D24242 Modified: head/sys/mips/nlm/dev/net/xlpge.c Modified: head/sys/mips/nlm/dev/net/xlpge.c ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.c Tue Mar 31 17:57:11 2020 (r359492) +++ head/sys/mips/nlm/dev/net/xlpge.c Tue Mar 31 20:09:20 2020 (r359493) @@ -30,10 +30,11 @@ #include __FBSDID("$FreeBSD$"); + +#include #include #include #include -#include #include #include #include From owner-svn-src-head@freebsd.org Tue Mar 31 22:41:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFF8D26ED63; Tue, 31 Mar 2020 22:41:52 +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 48sPTC1pWhz3Jrh; Tue, 31 Mar 2020 22:41:51 +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 D216119F75; Tue, 31 Mar 2020 22:41:44 +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 02VMfieC048178; Tue, 31 Mar 2020 22:41:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VMfiP9048177; Tue, 31 Mar 2020 22:41:44 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003312241.02VMfiP9048177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 31 Mar 2020 22:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359494 - in head: . share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/man/man7 X-SVN-Commit-Revision: 359494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 22:41:52 -0000 Author: imp Date: Tue Mar 31 22:41:43 2020 New Revision: 359494 URL: https://svnweb.freebsd.org/changeset/base/359494 Log: Make universe configuration more consistent with rest of system Add 'WITHOUT_WORLDS' and 'WITHOUT_KERNELS' as aliases for the inconsistently named MAKE_JUST_KERNELS and MAKE_JUST_WORLDS respectively. I always forget the MAKE_ part (or is it BUILD_), and it's inconsistent with everything else. Document the new things, but leave speculation of any eventual MAKE_JUST_* deprecation out of the manuals and comments. Reviewed by: brooks, bdrewery, emaste (LGTM) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D24212 Modified: head/Makefile head/share/man/man7/build.7 Modified: head/Makefile ============================================================================== --- head/Makefile Tue Mar 31 20:09:20 2020 (r359493) +++ head/Makefile Tue Mar 31 22:41:43 2020 (r359494) @@ -5,10 +5,12 @@ # # universe - *Really* build *everything* (buildworld and # all kernels on all architectures). Define -# MAKE_JUST_KERNELS to only build kernels, -# MAKE_JUST_WORLDS to only build userland. +# MAKE_JUST_KERNELS or WITHOUT_WORLDS to only build kernels, +# MAKE_JUST_WORLDS or WITHOUT_KERNELS to only build userland. # tinderbox - Same as universe, but presents a list of failed build # targets and exits with an error if there were any. +# worlds - Same as universe, except just makes the worlds. +# kernels - Same as universe, except just makes the kernels. # buildworld - Rebuild *everything*, including glue to help do # upgrades. # installworld - Install everything built by "buildworld". @@ -104,6 +106,15 @@ # For more information, see the build(7) manual page. # +.if defined(UNIVERSE_TARGET) || defined(MAKE_JUST_WORLDS) || defined(WITHOUT_KERNELS) +__DO_KERNELS=no +.endif +.if defined(MAKE_JUST_KERNELS) || defined(WITHOUT_WORLDS) +__DO_WORLDS=no +.endif +__DO_WORLDS?=yes +__DO_KERNELS?=yes + # This is included so CC is set to ccache for -V, and COMPILER_TYPE/VERSION # can be cached for sub-makes. We can't do this while still running on the # old fmake from FreeBSD 9.x or older, so avoid including it then to avoid @@ -521,11 +532,7 @@ universe_${toolchain}_skip: universe_prologue .PHONY .endif .endfor -.if defined(UNIVERSE_TARGET) -MAKE_JUST_WORLDS= YES -.else UNIVERSE_TARGET?= buildworld -.endif KERNSRCDIR?= ${.CURDIR}/sys targets: .PHONY @@ -634,7 +641,7 @@ MAKE_PARAMS_${target}+= \ .endfor .endif # !make(targets) -.if !defined(MAKE_JUST_KERNELS) +.if ${__DO_WORLDS} == "yes" universe_${target}_done: universe_${target}_worlds .PHONY .for target_arch in ${TARGET_ARCHES_${target}} universe_${target}_worlds: universe_${target}_${target_arch} .PHONY @@ -658,9 +665,9 @@ universe_${target}_${target_arch}: universe_${target}_ ${MAKEFAIL})) @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" .endfor -.endif # !MAKE_JUST_KERNELS +.endif # ${__DO_WORLDS} == "yes" -.if !defined(MAKE_JUST_WORLDS) +.if ${__DO_KERNELS} == "yes" universe_${target}_done: universe_${target}_kernels .PHONY universe_${target}_kernels: universe_${target}_worlds .PHONY universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY @@ -673,7 +680,7 @@ universe_${target}_kernels: universe_${target}_prologu fi @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels -.endif # !MAKE_JUST_WORLDS +.endif # ${__DO_KERNELS} == "yes" # Tell the user the worlds and kernels have completed universe_${target}: universe_${target}_done Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue Mar 31 20:09:20 2020 (r359493) +++ head/share/man/man7/build.7 Tue Mar 31 22:41:43 2020 (r359494) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2018 +.Dd March 29, 2020 .Dt BUILD 7 .Os .Sh NAME @@ -775,11 +775,17 @@ while still building each architecture serially. Only build kernels for each supported architecture. .It Va MAKE_JUST_WORLDS Only build worlds for each supported architecture. +.It Va WITHOUT_WORLDS +Only build kernels for each supported architecture. +.It Va WITHOUT_KERNELS +Only build worlds for each supported architecture. .It Va UNIVERSE_TARGET Execute the specified .Xr make 1 target for each supported architecture instead of the default action of building a world and one or more kernels. +This variable implies +.Va WITHOUT_KERNELS . .El .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact From owner-svn-src-head@freebsd.org Tue Mar 31 22:41:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3D2826ED91; Tue, 31 Mar 2020 22:41:57 +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 48sPTJ551Zz3JtC; Tue, 31 Mar 2020 22:41:56 +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 2CA5819F7E; Tue, 31 Mar 2020 22:41:49 +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 02VMfm9f048231; Tue, 31 Mar 2020 22:41:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VMfmpg048230; Tue, 31 Mar 2020 22:41:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003312241.02VMfmpg048230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 31 Mar 2020 22:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359495 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 22:41:57 -0000 Author: imp Date: Tue Mar 31 22:41:48 2020 New Revision: 359495 URL: https://svnweb.freebsd.org/changeset/base/359495 Log: Fix make kernels to match original commit message make kernels was originally documented (in commit r295099) as the same as make universe -DJUST_BUILD_KERNELS. However, it used the UNIVERSE_TARGET=buildkernel which is subtly different in that it also builds the toolchains and doesn't build the LINT modules unless they happened to already exist in the tree. This unbreaks POLA and just builds the kernels, including LINT, now rather than all that other stuff as well. When the commit originally happened, the two just differed by the LINT bug. r335711 introduced the universe dependency on the toolchain that wasn't present before, which diverged the two further. This restores the original intent of r295099. Reviewed by: brooks, bdrewery, emaste (LGTM) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D24212 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Mar 31 22:41:43 2020 (r359494) +++ head/Makefile Tue Mar 31 22:41:48 2020 (r359495) @@ -479,7 +479,7 @@ kernel-toolchains: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe kernels: .PHONY - @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildkernel universe + @cd ${.CURDIR}; ${SUB_MAKE} universe -DWITHOUT_WORLDS worlds: .PHONY @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe From owner-svn-src-head@freebsd.org Tue Mar 31 22:42:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE91A26EDD4; Tue, 31 Mar 2020 22:42: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 48sPTP6h4Rz3Jvb; Tue, 31 Mar 2020 22:42:01 +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 C3A7119F89; Tue, 31 Mar 2020 22:41:53 +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 02VMfr4A048283; Tue, 31 Mar 2020 22:41:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VMfr5O048282; Tue, 31 Mar 2020 22:41:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003312241.02VMfr5O048282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 31 Mar 2020 22:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359496 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 359496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 22:42:03 -0000 Author: imp Date: Tue Mar 31 22:41:53 2020 New Revision: 359496 URL: https://svnweb.freebsd.org/changeset/base/359496 Log: Document universe better Document the kernels and worlds targets. Document the TARGETS and EXTRA_TARGETS variables. Reviewed by: brooks, bdrewery, emaste (LGTM) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D24212 Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue Mar 31 22:41:48 2020 (r359495) +++ head/share/man/man7/build.7 Tue Mar 31 22:41:53 2020 (r359496) @@ -289,6 +289,18 @@ for all kernels for that architecture, including .Pa LINT . This command takes a long time. +.It Cm kernels +Like +.Cm universe +with +.Va WITHOUT_WORLDS +defined so only the kernels for each architecture are built. +.It Cm worlds +Like +.Cm universe +with +.Va WITHOUT_KERNELS +defined so only the worlds for each architecture are built. .It Cm update Get updated sources as configured in .Xr make.conf 5 . @@ -761,7 +773,7 @@ The default action is to build documentation for all l .Pp Builds using the .Cm universe -target are influenced by the following +and related targets are influenced by the following .Xr make 1 variables: .Bl -tag -width ".Va MAKE_JUST_KERNELS" @@ -786,6 +798,15 @@ target for each supported architecture instead of the building a world and one or more kernels. This variable implies .Va WITHOUT_KERNELS . +.It Va TARGETS +Only build the listed targets instead of each supported architecture. +.It Va EXTRA_TARGETS +In addition to the supported architectures, build the semi-supported +architectures. +A semi-supported architecture has build support in the +.Fx +tree, but receives significantly less testing and is generally for +fringe uses that do not have a wide appeal. .El .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact From owner-svn-src-head@freebsd.org Tue Mar 31 22:50:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBF3226F2C5; Tue, 31 Mar 2020 22:50:58 +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 48sPgj0nqCz3Mwr; Tue, 31 Mar 2020 22:50:57 +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 D6C6A19F91; Tue, 31 Mar 2020 22:41:57 +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 02VMfv9S048339; Tue, 31 Mar 2020 22:41:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02VMfv3N048338; Tue, 31 Mar 2020 22:41:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003312241.02VMfv3N048338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 31 Mar 2020 22:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359497 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 22:50:59 -0000 Author: imp Date: Tue Mar 31 22:41:57 2020 New Revision: 359497 URL: https://svnweb.freebsd.org/changeset/base/359497 Log: Add powerpcspe to the EXTRA_TARGETS Currently, powerpcspe is broken with clang. Add it to the EXTRA_TARGETS until that's fixed. Reviewed by: brooks, bdrewery, emaste (LGTM) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D24212 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Mar 31 22:41:53 2020 (r359496) +++ head/Makefile Tue Mar 31 22:41:57 2020 (r359497) @@ -494,19 +494,20 @@ worlds: .PHONY .if make(universe) || make(universe_kernels) || make(tinderbox) || \ make(targets) || make(universe-toolchain) # -# Don't build rarely used architectures unless requested. +# Don't build rarely used, semi-supported architectures unless requested. # .if defined(EXTRA_TARGETS) EXTRA_ARCHES_mips= mipsel mipshf mipselhf mips64el mips64hf mips64elhf EXTRA_ARCHES_mips+= mipsn32 +# powerpcspe excluded from main list until clang fixed +EXTRA_ARCHES_powerpc= powerpcspe .endif TARGETS?=amd64 arm arm64 i386 mips powerpc riscv _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mips mips64 ${EXTRA_ARCHES_mips} -# powerpcspe excluded until clang fixed -TARGET_ARCHES_powerpc?= powerpc powerpc64 +TARGET_ARCHES_powerpc?= powerpc powerpc64 ${EXTRA_ARCHES_powerpc} TARGET_ARCHES_riscv?= riscv64 riscv64sf .for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} From owner-svn-src-head@freebsd.org Wed Apr 1 02:13:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08CF92774FF; Wed, 1 Apr 2020 02:13:25 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sV9G38X7z4JGN; Wed, 1 Apr 2020 02:13:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A2B61CC9E; Wed, 1 Apr 2020 02:13:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0312D2w3096794; Wed, 1 Apr 2020 02:13:02 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0312D2iO096793; Wed, 1 Apr 2020 02:13:02 GMT (envelope-from ae@FreeBSD.org) Message-Id: <202004010213.0312D2iO096793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 1 Apr 2020 02:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359498 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 359498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 02:13:25 -0000 Author: ae Date: Wed Apr 1 02:13:01 2020 New Revision: 359498 URL: https://svnweb.freebsd.org/changeset/base/359498 Log: Ignore ND6 neighbor advertisement received for static link-layer entries. Previously such NA could override manually created LLE. Reported by: Martin Beran Reviewed by: melifaro MFC after: 10 days Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Tue Mar 31 22:41:57 2020 (r359497) +++ head/sys/netinet6/nd6_nbr.c Wed Apr 1 02:13:01 2020 (r359498) @@ -754,6 +754,12 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) goto freeit; } + /* + * Do not try to override static entry. + */ + if (ln->la_flags & LLE_STATIC) + goto freeit; + if (ln->ln_state == ND6_LLINFO_INCOMPLETE) { /* * If the link-layer has address, and no lladdr option came, From owner-svn-src-head@freebsd.org Wed Apr 1 03:19:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F16E6278B20; Wed, 1 Apr 2020 03:19:53 +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 48sWdy50Bfz3Dcy; Wed, 1 Apr 2020 03:19:50 +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 725391DBAD; Wed, 1 Apr 2020 03:19:43 +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 0313JhYP034882; Wed, 1 Apr 2020 03:19:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0313JhlU034881; Wed, 1 Apr 2020 03:19:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004010319.0313JhlU034881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 1 Apr 2020 03:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359499 - 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: 359499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 03:19:54 -0000 Author: mav Date: Wed Apr 1 03:19:42 2020 New Revision: 359499 URL: https://svnweb.freebsd.org/changeset/base/359499 Log: Add ID for JMicron JMB582/JMB585 AHCI controller. JMB582 has 2 6Gbps SATA ports and PCIe 3.0 x1. JMB585 has 5 6Gbps SATA ports and PCIe 3.0 x2. Both chips support AHCI v1.31, Port Multiplier with FBS and 8 MSI vectors. MFC after: 2 weeks Modified: head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Wed Apr 1 02:13:01 2020 (r359498) +++ head/sys/dev/ahci/ahci_pci.c Wed Apr 1 03:19:42 2020 (r359499) @@ -247,6 +247,7 @@ static const struct { {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, + {0x0585197b, 0x00, "JMicron JMB58x", 0}, {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | AHCI_Q_1CH | AHCI_Q_EDGEIS}, {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | @@ -399,6 +400,7 @@ ahci_probe(device_t dev) !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { /* Do not attach JMicrons with single PCI function. */ if (pci_get_vendor(dev) == 0x197b && + (ahci_ids[i].quirks & AHCI_Q_NOFORCE) && (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) return (ENXIO); snprintf(buf, sizeof(buf), "%s AHCI SATA controller", From owner-svn-src-head@freebsd.org Wed Apr 1 03:35:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34F6E278F71; Wed, 1 Apr 2020 03:35:40 +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 48sX0C3D73z3Krg; Wed, 1 Apr 2020 03:35:39 +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 D86521DDA0; Wed, 1 Apr 2020 03:27:48 +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 0313Rmu9041181; Wed, 1 Apr 2020 03:27:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0313RmiH041179; Wed, 1 Apr 2020 03:27:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004010327.0313RmiH041179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 1 Apr 2020 03:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359500 - 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: 359500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 03:35:40 -0000 Author: mav Date: Wed Apr 1 03:27:47 2020 New Revision: 359500 URL: https://svnweb.freebsd.org/changeset/base/359500 Log: Add support for AHCI BIOS/OS Handoff. This allows clean handoff from BIOS implementing some asynchronous I/O to the OS AHCI driver. During attach driver declares OS ownership request and waits from 25ms to 2s for BIOS to complete operation and release the hardware. MFC after: 2 weeks Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Apr 1 03:19:42 2020 (r359499) +++ head/sys/dev/ahci/ahci.c Wed Apr 1 03:27:47 2020 (r359500) @@ -141,7 +141,27 @@ int ahci_ctlr_reset(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); + uint32_t v; int timeout; + + /* BIOS/OS Handoff */ + if ((ATA_INL(ctlr->r_mem, AHCI_VS) >= 0x00010200) && + (ATA_INL(ctlr->r_mem, AHCI_CAP2) & AHCI_CAP2_BOH) && + ((v = ATA_INL(ctlr->r_mem, AHCI_BOHC)) & AHCI_BOHC_OOS) == 0) { + + /* Request OS ownership. */ + ATA_OUTL(ctlr->r_mem, AHCI_BOHC, v | AHCI_BOHC_OOS); + + /* Wait up to 2s for BIOS ownership release. */ + for (timeout = 0; timeout < 80; timeout++) { + DELAY(25000); + v = ATA_INL(ctlr->r_mem, AHCI_BOHC); + if ((v & AHCI_BOHC_BOS) == 0) + break; + if ((v & AHCI_BOHC_BB) == 0) + break; + } + } /* Enable AHCI mode */ ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Wed Apr 1 03:19:42 2020 (r359499) +++ head/sys/dev/ahci/ahci.h Wed Apr 1 03:27:47 2020 (r359500) @@ -214,6 +214,13 @@ #define AHCI_CAP2_SADM 0x00000010 #define AHCI_CAP2_DESO 0x00000020 +#define AHCI_BOHC 0x28 +#define AHCI_BOHC_BOS 0x00000001 +#define AHCI_BOHC_OOS 0x00000002 +#define AHCI_BOHC_SOOE 0x00000004 +#define AHCI_BOHC_OOC 0x00000008 +#define AHCI_BOHC_BB 0x00000010 + #define AHCI_VSCAP 0xa4 #define AHCI_OFFSET 0x100 #define AHCI_STEP 0x80 From owner-svn-src-head@freebsd.org Wed Apr 1 04:29:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7C62279F26; Wed, 1 Apr 2020 04:29:06 +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 48sY9r55svz49BS; Wed, 1 Apr 2020 04:29:04 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (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 CD7821A52C; Wed, 1 Apr 2020 04:28:56 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.35.20030802 Date: Tue, 31 Mar 2020 21:28:50 -0700 Subject: Re: svn commit: r359499 - head/sys/dev/ahci From: Ravi Pokala To: Alexander Motin , , , Message-ID: <5598FCD0-22B8-4F18-87C1-C1506E32A757@panasas.com> Thread-Topic: svn commit: r359499 - head/sys/dev/ahci References: <202004010319.0313JhlU034881@repo.freebsd.org> In-Reply-To: <202004010319.0313JhlU034881@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 04:29:07 -0000 -----Original Message----- From: on behalf of Alexander Motin Date: 2020-03-31, Tuesday at 20:19 To: , , Subject: svn commit: r359499 - head/sys/dev/ahci Author: mav Date: Wed Apr 1 03:19:42 2020 New Revision: 359499 URL: https://svnweb.freebsd.org/changeset/base/359499 Log: Add ID for JMicron JMB582/JMB585 AHCI controller. JMB582 has 2 6Gbps SATA ports and PCIe 3.0 x1. JMB585 has 5 6Gbps SATA ports and PCIe 3.0 x2. Both chips support AHCI v1.31, Port Multiplier with FBS and 8 MSI vectors. Hi Alexander, The second line of diff seems unrelated...? Thanks, Ravi (rpokala@) MFC after: 2 weeks Modified: head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Wed Apr 1 02:13:01 2020 (r359498) +++ head/sys/dev/ahci/ahci_pci.c Wed Apr 1 03:19:42 2020 (r359499) @@ -247,6 +247,7 @@ static const struct { {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, + {0x0585197b, 0x00, "JMicron JMB58x", 0}, {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | AHCI_Q_1CH | AHCI_Q_EDGEIS}, {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | @@ -399,6 +400,7 @@ ahci_probe(device_t dev) !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { /* Do not attach JMicrons with single PCI function. */ if (pci_get_vendor(dev) == 0x197b && + (ahci_ids[i].quirks & AHCI_Q_NOFORCE) && (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) return (ENXIO); snprintf(buf, sizeof(buf), "%s AHCI SATA controller", From owner-svn-src-head@freebsd.org Wed Apr 1 04:51:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0B4327A61E; Wed, 1 Apr 2020 04:51:48 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sYh235ktz4JM3; Wed, 1 Apr 2020 04:51:46 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CAFB1EE7D; Wed, 1 Apr 2020 04:51:40 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0314peWS091879; Wed, 1 Apr 2020 04:51:40 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0314pe6o091878; Wed, 1 Apr 2020 04:51:40 GMT (envelope-from jah@FreeBSD.org) Message-Id: <202004010451.0314pe6o091878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 1 Apr 2020 04:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359501 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 04:51:49 -0000 Author: jah Date: Wed Apr 1 04:51:39 2020 New Revision: 359501 URL: https://svnweb.freebsd.org/changeset/base/359501 Log: deadlkres: include thread name in panic messages Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24235 Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Wed Apr 1 03:27:47 2020 (r359500) +++ head/sys/kern/kern_clock.c Wed Apr 1 04:51:39 2020 (r359501) @@ -205,8 +205,9 @@ deadlres_td_on_lock(struct proc *p, struct thread *td, * Accordingly with provided thresholds, this thread is stuck * for too long on a turnstile. */ - panic("%s: possible deadlock detected for %p, " - "blocked for %d ticks\n", __func__, td, tticks); + panic("%s: possible deadlock detected for %p (%s), " + "blocked for %d ticks\n", __func__, + td, sched_tdname(td), tticks); } static void @@ -239,8 +240,9 @@ deadlres_td_sleep_q(struct proc *p, struct thread *td, if (!strcmp(blessed[i], td->td_wmesg)) return; - panic("%s: possible deadlock detected for %p, " - "blocked for %d ticks\n", __func__, td, tticks); + panic("%s: possible deadlock detected for %p (%s), " + "blocked for %d ticks\n", __func__, + td, sched_tdname(td), tticks); } } From owner-svn-src-head@freebsd.org Wed Apr 1 05:45:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC1032B0DB1; Wed, 1 Apr 2020 05:45:21 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sZsr6Zjfz4dSD; Wed, 1 Apr 2020 05:45:20 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADF011FDBF; Wed, 1 Apr 2020 05:45:13 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0315jDLg027325; Wed, 1 Apr 2020 05:45:13 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0315jD6N027324; Wed, 1 Apr 2020 05:45:13 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202004010545.0315jD6N027324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 1 Apr 2020 05:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359502 - in head: lib/libveriexec share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head: lib/libveriexec share/mk X-SVN-Commit-Revision: 359502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 05:45:22 -0000 Author: sjg Date: Wed Apr 1 05:45:12 2020 New Revision: 359502 URL: https://svnweb.freebsd.org/changeset/base/359502 Log: Do not claim libbearssl et al are INTERNALLIB If INTERNALLIB is defined we need PIE and bsd.incs.mk is not included. PR: 245189 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org//D24233 Modified: head/lib/libveriexec/Makefile head/share/mk/src.libnames.mk Modified: head/lib/libveriexec/Makefile ============================================================================== --- head/lib/libveriexec/Makefile Wed Apr 1 04:51:39 2020 (r359501) +++ head/lib/libveriexec/Makefile Wed Apr 1 05:45:12 2020 (r359502) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include LIB= veriexec MAN= veriexec.3 Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Apr 1 04:51:39 2020 (r359501) +++ head/share/mk/src.libnames.mk Wed Apr 1 05:45:12 2020 (r359502) @@ -222,18 +222,18 @@ _LIBRARIES+= \ .endif .if ${MK_BEARSSL} == "yes" -_INTERNALLIBS+= \ +_LIBRARIES+= \ bearssl \ secureboot \ -LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl${PIE_SUFFIX}.a -LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot${PIE_SUFFIX}.a +LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl.a +LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot.a .endif .if ${MK_VERIEXEC} == "yes" -_INTERNALLIBS+= veriexec +_LIBRARIES+= veriexec -LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec${PIE_SUFFIX}.a +LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec.a .endif # Each library's LIBADD needs to be duplicated here for static linkage of From owner-svn-src-head@freebsd.org Wed Apr 1 05:53:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 340512B11AE; Wed, 1 Apr 2020 05:53:25 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sb376h59z3CxL; Wed, 1 Apr 2020 05:53:23 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 3A48A9228; Wed, 1 Apr 2020 05:53:17 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Wed, 1 Apr 2020 05:53:14 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359503 - in head Message-ID: <20200401055314.GN9584@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 05:53:25 -0000 Author: gjb Date: Wed Apr 1 05:51:46 UTC 2020 New Revision: 359503 URL: https://svnweb.freebsd.org/changeset/base/359503 Log: Update head to 14.0-CURRENT in order to prevent having a 13.0-RELEASE. Modified: Makefile.inc1 UPDATING lib/clang/freebsd_cc_version.h lib/clang/llvm.build.mk sys/conf/newvers.sh sys/sys/param.h Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 359501) +++ Makefile.inc1 (working copy) @@ -130,9 +130,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.0 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd14.0 TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.0 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd14.0 KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ armv6/arm \ @@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} .endif # flua is required to regenerate syscall files. It first appeared during the -# 13.0-CURRENT cycle, thus needs to be built on -older releases and stable +# 14.0-CURRENT cycle, thus needs to be built on -older releases and stable # branches. .if ${BOOTSTRAPPING} < 1300059 ${_bt}-libexec/flua: ${_bt}-lib/liblua Index: UPDATING =================================================================== --- UPDATING (revision 359501) +++ UPDATING (working copy) @@ -11,8 +11,8 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. -NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: - FreeBSD 13.x has many debugging features turned on, in both the kernel +NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: + FreeBSD 14.x has many debugging features turned on, in both the kernel and userland. These features attempt to detect incorrect use of system primitives, and encourage loud failure through extra sanity checking and fail stop semantics. They also substantially impact Index: lib/clang/freebsd_cc_version.h =================================================================== --- lib/clang/freebsd_cc_version.h (revision 359501) +++ lib/clang/freebsd_cc_version.h (working copy) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1300007 +#define FREEBSD_CC_VERSION 1400007 Index: lib/clang/llvm.build.mk =================================================================== --- lib/clang/llvm.build.mk (revision 359501) +++ lib/clang/llvm.build.mk (working copy) @@ -38,7 +38,7 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd13.0 +OS_VERSION= freebsd14.0 LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} Index: sys/conf/newvers.sh =================================================================== --- sys/conf/newvers.sh (revision 359501) +++ sys/conf/newvers.sh (working copy) @@ -53,7 +53,7 @@ # TYPE="FreeBSD" -REVISION="13.0" +REVISION="14.0" BRANCH=${BRANCH_OVERRIDE:-CURRENT} RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" Index: sys/sys/param.h =================================================================== --- sys/sys/param.h (revision 359501) +++ sys/sys/param.h (working copy) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300087 /* Master, propagated to newvers */ +#define __FreeBSD_version 1400087 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Wed Apr 1 06:11:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FD192B166D; Wed, 1 Apr 2020 06:11:28 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (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 48sbRw4RbCz3L0D; Wed, 1 Apr 2020 06:11:24 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f177.google.com with SMTP id p196so12598383ybc.0; Tue, 31 Mar 2020 23:11:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=taZXi9nG/YUSWF4yYHQCHUGE+Lb+Gog48PxGY/udc3U=; b=L3t8qLNNizdFAkD2Nr3ybNvj64tDrHn8hHNn7TE8icPXrZRXHsK+gILzFgC4AdplS6 DwGmkrnnJ312z3owpB6iZvQ5D7GRSBiUkE8SKnwFMVLmQSDoORDRRtlwSFffWcAOZu0z JzMy+HREI9WC7qdLw3EfYYALftZcl+DcomKef4tW+vNQDXkwSD+7j1TsXhJAYOOayDBQ PktQaOXD6MQtvUs8C83kmjUkyVjREE4DpJGHLFyHuyjNCZefBIPmD2dKl3OjjqRYeJs1 AXfHonqfGaY8rlinSKd4wI+o086e0cmXem/Q5m2cN/UMuhGAIclFNneztQNnUfXa+hcl s4/A== X-Gm-Message-State: ANhLgQ3K/jE2+KXoAXHmzYCdvRPBppvKo6FIwAYAQr7s+TroyfSIV0hn 3xjC8iUKqpHgtQjT11UkRAOO9605Xy3SpUIlYlx0f2sY X-Google-Smtp-Source: ADFU+vsjIQ4m/JR8ejAsHd+gZ0UZEo8lb8Um+9UTONn3T5+nQjlVgVmBsy1o4KiPI15fddOJm1+HQM/XGnl8bFeLPpA= X-Received: by 2002:a25:6e0b:: with SMTP id j11mr14848679ybc.497.1585721474593; Tue, 31 Mar 2020 23:11:14 -0700 (PDT) MIME-Version: 1.0 References: <20200401055314.GN9584@FreeBSD.org> In-Reply-To: <20200401055314.GN9584@FreeBSD.org> From: Li-Wen Hsu Date: Wed, 1 Apr 2020 14:11:02 +0800 Message-ID: Subject: Re: svn commit: r359503 - in head To: Glen Barber Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48sbRw4RbCz3L0D X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 06:11:28 -0000 On Wed, Apr 1, 2020 at 1:53 PM Glen Barber wrote: > > Author: gjb > Date: Wed Apr 1 05:51:46 UTC 2020 > New Revision: 359503 > URL: https://svnweb.freebsd.org/changeset/base/359503 > > Log: > Update head to 14.0-CURRENT in order to prevent having > a 13.0-RELEASE. ... > Index: sys/sys/param.h > =================================================================== > --- sys/sys/param.h (revision 359501) > +++ sys/sys/param.h (working copy) > @@ -60,7 +60,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1300087 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1400087 /* Master, propagated to newvers */ I think we want 1400000 here :-) From owner-svn-src-head@freebsd.org Wed Apr 1 06:20:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D6462B1A7F; Wed, 1 Apr 2020 06:20:58 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sbfw4BpXz3P24; Wed, 1 Apr 2020 06:20:56 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 7D6B110ECF; Wed, 1 Apr 2020 06:20:49 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Wed, 1 Apr 2020 06:20:47 +0000 From: Glen Barber To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359503 - in head Message-ID: <20200401062047.GO9584@FreeBSD.org> References: <20200401055314.GN9584@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sb1UKzOIICwVtWxk" Content-Disposition: inline In-Reply-To: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 06:20:58 -0000 --sb1UKzOIICwVtWxk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 01, 2020 at 02:11:02PM +0800, Li-Wen Hsu wrote: > On Wed, Apr 1, 2020 at 1:53 PM Glen Barber wrote: > > > > Author: gjb > > Date: Wed Apr 1 05:51:46 UTC 2020 > > New Revision: 359503 > > URL: https://svnweb.freebsd.org/changeset/base/359503 > > > > Log: > > Update head to 14.0-CURRENT in order to prevent having > > a 13.0-RELEASE. > ... > > Index: sys/sys/param.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 > > --- sys/sys/param.h (revision 359501) > > +++ sys/sys/param.h (working copy) > > @@ -60,7 +60,7 @@ > > * in the range 5 to 9. > > */ > > #undef __FreeBSD_version > > -#define __FreeBSD_version 1300087 /* Master, propagated to newver= s */ > > +#define __FreeBSD_version 1400087 /* Master, propagated to newver= s */ >=20 > I think we want 1400000 here :-) >=20 You are correct. I will fix it after dealing with the influx of complaints about this commit. Glen --sb1UKzOIICwVtWxk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl6EMrkACgkQAxRYpUeP 4pNfQRAAoNgFgXH67bLnJDf4/rzXg1nfNtY0s/u1icd2GFReYkrq6n6FFw23lt9S UEka74xtvLD2pZ0J4yoSi1FeVA3Bh2IioC3Ciqu68wMD+KTcn6zKQ+Hu+oSQUGwU Nj0nZLmyOap5RhwjcyAllorGq6uq7nxHY3B4eln3NHxEsEZOOdHAyCtfDqqmeifE T/B2DkCFaBk4XETEQqjtsFXM5atfSY2BrsydpMTDJpGAxjQVdXO350apZnc8MqbJ YaVmmAUIxIGfJ6QYwLSa3errmn8JeSxXgWZcKbB+VK5yZ+qWVqovbPLplHjy7gpW qTYIbB7CrLogb9tLuYanFzDN7Y1ZIjYHaSgnj3YQg5T7sQsRiZYr1YGKzasNVFkx 1N5n4mrR1wfdIOJgsB5YNqcXVdOlIlGABrgk7sdi7fbaTkYT1dJhExbuDeXqWSka p5UVUbTKS2RC1GvymNnqtTH0Rnf05Cn+IvFR0ue4NKt0xVZRDinVTwNBFlvFIAbh saPGsMgxRX3KIibLDqoj64lYpxxNo3gQXja9sxUDwMImEKaFKfslvoFggMlouxTZ kopatjPYHyc0lByhM0WKZT9qy0O8Tp6L1pIkY7SyOn3yzmKUa7dowor+oBhIK3yL enrMtMChukFrn8QQSV252mEMpW8nHPljYqSgDo6aX8APNyntsKU= =xlOQ -----END PGP SIGNATURE----- --sb1UKzOIICwVtWxk-- From owner-svn-src-head@freebsd.org Wed Apr 1 09:01:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E7412B5904; Wed, 1 Apr 2020 09:01:43 +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 48sgDQ3xWFz4vqd; Wed, 1 Apr 2020 09:01:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 611F8225C5; Wed, 1 Apr 2020 09:01:36 +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 03191atL046276; Wed, 1 Apr 2020 09:01:36 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03191aBV046275; Wed, 1 Apr 2020 09:01:36 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004010901.03191aBV046275@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, 1 Apr 2020 09:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359504 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 359504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 09:01:43 -0000 Author: 0mp (doc,ports committer) Date: Wed Apr 1 09:01:35 2020 New Revision: 359504 URL: https://svnweb.freebsd.org/changeset/base/359504 Log: Use proper mdoc(7) macros for literal text and do not use Tn Tn is deprecated and upsets linters. MFC after: 3 days Modified: head/lib/libc/locale/big5.5 Modified: head/lib/libc/locale/big5.5 ============================================================================== --- head/lib/libc/locale/big5.5 Wed Apr 1 07:28:31 2020 (r359503) +++ head/lib/libc/locale/big5.5 Wed Apr 1 09:01:35 2020 (r359504) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2019 +.Dd April 1, 2020 .Dt BIG5 5 .Os .Sh NAME @@ -39,9 +39,8 @@ encoding for Traditional Chinese text .Dq Big Five is a standard for encoding Traditional Chinese text. Each character is represented by either one or two bytes. -Characters from the -.Tn ASCII -character set are represented as single bytes in the range 0x00 - 0x7F. +Characters from the ASCII character set are represented as +single bytes in the range 0x00 - 0x7F. Traditional Chinese characters are represented by two bytes: the first in the range 0xA1 - 0xFE, the second in the range 0x40 - 0xFE. @@ -51,7 +50,11 @@ the first in the range 0xA1 - 0xFE, the second in the .Xr utf8 5 .Sh BUGS The range of the second byte overlaps some ASCII characters, including -0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or +0x5C +.Pq Ql \e +and 0x7C +.Pq Ql | +which may cause problems in program execution or display. Big5 is considered a legacy standard and only preserved for backward compatibility reason. From owner-svn-src-head@freebsd.org Wed Apr 1 09:51:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDD332B69D6; Wed, 1 Apr 2020 09:51:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48shL05KHzz41Dk; Wed, 1 Apr 2020 09:51:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FDF023096; Wed, 1 Apr 2020 09:51:30 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0319pTww075539; Wed, 1 Apr 2020 09:51:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0319pT5J075538; Wed, 1 Apr 2020 09:51:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202004010951.0319pT5J075538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Apr 2020 09:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359505 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 359505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 09:51:37 -0000 Author: andrew Date: Wed Apr 1 09:51:29 2020 New Revision: 359505 URL: https://svnweb.freebsd.org/changeset/base/359505 Log: Use memmove to copy within a buffer jail(8) would try to use strcpy to remove the interface from the start of an IP address. This is undefined, and on arm64 will result in unexpected IPv6 addresses. Fix this by using memmove top move the string. PR: 245102 Reported by: sbruno MFC after: 2 weeks Sponsored by: Innovate UK Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Wed Apr 1 09:01:35 2020 (r359504) +++ head/usr.sbin/jail/config.c Wed Apr 1 09:51:29 2020 (r359505) @@ -596,8 +596,8 @@ check_intparams(struct cfjail *j) if (cs || defif) add_param(j, NULL, IP__IP4_IFADDR, s->s); if (cs) { - strcpy(s->s, cs + 1); s->len -= cs + 1 - s->s; + memmove(s->s, cs + 1, s->len + 1); } if ((cs = strchr(s->s, '/')) != NULL) { *cs = '\0'; @@ -617,8 +617,8 @@ check_intparams(struct cfjail *j) if (cs || defif) add_param(j, NULL, IP__IP6_IFADDR, s->s); if (cs) { - strcpy(s->s, cs + 1); s->len -= cs + 1 - s->s; + memmove(s->s, cs + 1, s->len + 1); } if ((cs = strchr(s->s, '/')) != NULL) { *cs = '\0'; From owner-svn-src-head@freebsd.org Wed Apr 1 12:06:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 062452B9C7C; Wed, 1 Apr 2020 12:06:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 48slKX67YNz3NlG; Wed, 1 Apr 2020 12:06:24 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Jc8JjIF8vng7KJc8KjsMbo; Wed, 01 Apr 2020 06:06:13 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=cl8xLZFz6L8A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=zWU2_WmDB4wVgp9lAwYA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from [192.168.1.105] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id ACE67275; Wed, 1 Apr 2020 05:06:09 -0700 (PDT) Date: Wed, 01 Apr 2020 05:06:06 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20200401055314.GN9584@FreeBSD.org> References: <20200401055314.GN9584@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r359503 - in head To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfIK7GM6K5qHrKow9s8a0NYmynJA+5rwGOzcXQCYq8aXCy7KND0BWFKNfPwKVMMcp10T4mZgrqP1iCRaYEnXVuYfuLXWJn6Wl0kcF/rfDiMmzqDNbOduu ZeZJmJd5DFP4nDRGqWiQFCQ9iw77AqaLR0nuT6DXPvOA4fxg9EQkzyWP+YYfUy7jA1jfAb6euH6tOnwANf+ItAmW75bfnimwhVKz1dX71XMFcNBzL0FEE7+k vPYBRSGWre1scsSx/nuvIK5Kxtt+LCsvyyWm/sUWuUAl1EsEVcDDdShGy0XEPxAI X-Rspamd-Queue-Id: 48slKX67YNz3NlG 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)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 12:06:26 -0000 On March 31, 2020 10:53:14 PM PDT, Glen Barber wrote: >Author: gjb >Date: Wed Apr 1 05:51:46 UTC 2020 >New Revision: 359503 >URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/359503 > >Log: > Update head to 14=2E0-CURRENT in order to prevent having > a 13=2E0-RELEASE=2E > >Modified: > Makefile=2Einc1 > UPDATING > lib/clang/freebsd_cc_version=2Eh > lib/clang/llvm=2Ebuild=2Emk > sys/conf/newvers=2Esh > sys/sys/param=2Eh > >Index: Makefile=2Einc1 >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- Makefile=2Einc1 (revision 359501) >+++ Makefile=2Einc1 (working copy) >@@ -130,9 +130,9 @@ TARGET_ABI=3D gnueabi > =2Eendif > =2Eendif > MACHINE_ABI?=3D unknown >-MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mi= ps64/}-${MACHINE_ABI}-freebsd13=2E0 >+MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mi= ps64/}-${MACHINE_ABI}-freebsd14=2E0 > TARGET_ABI?=3D unknown >-TARGET_TRIPLE?=3D ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mip= s64/}-${TARGET_ABI}-freebsd13=2E0 >+TARGET_TRIPLE?=3D ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mip= s64/}-${TARGET_ABI}-freebsd14=2E0 > KNOWN_ARCHES?=3D aarch64/arm64 \ > amd64 \ > armv6/arm \ >@@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} > =2Eendif >=20 ># flua is required to regenerate syscall files=2E It first appeared >during the >-# 13=2E0-CURRENT cycle, thus needs to be built on -older releases and >stable >+# 14=2E0-CURRENT cycle, thus needs to be built on -older releases and >stable > # branches=2E > =2Eif ${BOOTSTRAPPING} < 1300059 > ${_bt}-libexec/flua: ${_bt}-lib/liblua >Index: UPDATING >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- UPDATING (revision 359501) >+++ UPDATING (working copy) >@@ -11,8 +11,8 @@ handbook: > Items affecting the ports and packages system can be found in >/usr/ports/UPDATING=2E Please read that file before running portupgrade= =2E >=20 >-NOTE TO PEOPLE WHO THINK THAT FreeBSD 13=2Ex IS SLOW: >- FreeBSD 13=2Ex has many debugging features turned on, in both the >kernel >+NOTE TO PEOPLE WHO THINK THAT FreeBSD 14=2Ex IS SLOW: >+ FreeBSD 14=2Ex has many debugging features turned on, in both the >kernel > and userland=2E These features attempt to detect incorrect use of > system primitives, and encourage loud failure through extra sanity > checking and fail stop semantics=2E They also substantially impact >Index: lib/clang/freebsd_cc_version=2Eh >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- lib/clang/freebsd_cc_version=2Eh (revision 359501) >+++ lib/clang/freebsd_cc_version=2Eh (working copy) >@@ -1,3 +1,3 @@ > /* $FreeBSD$ */ >=20 >-#define FREEBSD_CC_VERSION 1300007 >+#define FREEBSD_CC_VERSION 1400007 >Index: lib/clang/llvm=2Ebuild=2Emk >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- lib/clang/llvm=2Ebuild=2Emk (revision 359501) >+++ lib/clang/llvm=2Ebuild=2Emk (working copy) >@@ -38,7 +38,7 @@ TARGET_ABI=3D -gnueabi > TARGET_ABI=3D > =2Eendif > VENDOR=3D unknown >-OS_VERSION=3D freebsd13=2E0 >+OS_VERSION=3D freebsd14=2E0 >=20 >LLVM_TARGET_TRIPLE?=3D ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32= /mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} >LLVM_BUILD_TRIPLE?=3D ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/m= ips64/}-${VENDOR}-${OS_VERSION} >Index: sys/conf/newvers=2Esh >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- sys/conf/newvers=2Esh (revision 359501) >+++ sys/conf/newvers=2Esh (working copy) >@@ -53,7 +53,7 @@ > # >=20 > TYPE=3D"FreeBSD" >-REVISION=3D"13=2E0" >+REVISION=3D"14=2E0" > BRANCH=3D${BRANCH_OVERRIDE:-CURRENT} > RELEASE=3D"${REVISION}-${BRANCH}" > VERSION=3D"${TYPE} ${RELEASE}" >Index: sys/sys/param=2Eh >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >--- sys/sys/param=2Eh (revision 359501) >+++ sys/sys/param=2Eh (working copy) >@@ -60,7 +60,7 @@ > * in the range 5 to 9=2E > */ > #undef __FreeBSD_version >-#define __FreeBSD_version 1300087 /* Master, propagated to newvers */ >+#define __FreeBSD_version 1400087 /* Master, propagated to newvers */ >=20 > /* >* __FreeBSD_kernel__ indicates that this system uses the kernel of >FreeBSD, This was discussed at length just before 12 was released=2E Are you now th= e one to decide naming, disregarding the discussion? Should we not have also skipped 4? --=20 Pardon the typos and autocorrect, small keyboard in use=2E=20 Cy Schubert FreeBSD UNIX: Web: https://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From owner-svn-src-head@freebsd.org Wed Apr 1 12:35:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D77002BA7BA; Wed, 1 Apr 2020 12:35:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 48slz81DlBz44h2; Wed, 1 Apr 2020 12:35:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id JcaXjINADng7KJcaZjsPtY; Wed, 01 Apr 2020 06:35:23 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=cl8xLZFz6L8A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=TG1Nc_P-_snnQd4qs7EA:9 a=QEXdDO2ut3YA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [192.168.1.105] (S0106002401cb186f.gv.shawcable.net [70.67.125.17]) by spqr.komquats.com (Postfix) with ESMTPSA id D1068393; Wed, 1 Apr 2020 05:35:20 -0700 (PDT) Date: Wed, 01 Apr 2020 05:35:18 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20200401055314.GN9584@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r359503 - in head To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfA0mcmqIy0gk08SYqHKjhrVh+loPWMd5ufPtGrH+x+cy2Ig9D7cLG4D3qRVS73BD0XgpgzbQ8sXt83FJ2pghkvLQYOfmyfIDtAMwIlVWs09ybwjcT6zx o1owgXJSKIrnrik34me5Ab/wh50wQs7lvis0Ca8v94M52oxefTOGYuvC0pQpDrWZC33oHOmPZP9nw8HlpA/6LfQDiQh3h4LrjotayAh8LTDVK981+I99LHsj vMwFNfwwfFaLL5Oux/wPjUfTLrkIAgeVtEGSiEJcEocYa5rEXtOBjRPvCEpzYpKH X-Rspamd-Queue-Id: 48slz81DlBz44h2 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.134.12) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.73 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[12.134.59.64.rep.mailspike.net : 127.0.0.18]; TO_DN_SOME(0.00)[]; RBL_VIRUSFREE_UNKNOWN_FAIL(0.00)[12.134.59.64.bip.virusfree.cz:query timed out]; RCVD_COUNT_THREE(0.00)[3]; RECEIVED_BLOCKLISTDE_FAIL(0.00)[17.125.67.70.bl.blocklist.de:query timed out]; RCVD_IN_DNSWL_LOW(-0.10)[12.134.59.64.list.dnswl.org : 127.0.5.1]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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(-2.53)[ip: (-6.76), ipnet: 64.59.128.0/20(-3.25), asn: 6327(-2.54), country: CA(-0.09)]; RBL_SEM_FAIL(0.00)[12.134.59.64.bl.spameatingmonkey.net:query timed out]; RBL_BLOCKLISTDE_FAIL(0.00)[12.134.59.64.bl.blocklist.de:query timed out]; R_SPF_NA(0.00)[]; RBL_SPAMHAUS_FAIL(0.00)[12.134.59.64.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net:query timed out]; RBL_NIXSPAM_FAIL(0.00)[12.134.59.64.ix.dnsbl.manitu.net:query timed out]; RECEIVED_SPAMHAUS_FAIL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net:query timed out] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 12:35:45 -0000 On April 1, 2020 5:06:06 AM PDT, Cy Schubert wrote: >On March 31, 2020 10:53:14 PM PDT, Glen Barber wrote: >>Author: gjb >>Date: Wed Apr 1 05:51:46 UTC 2020 >>New Revision: 359503 >>URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/359503 >> >>Log: >> Update head to 14=2E0-CURRENT in order to prevent having >> a 13=2E0-RELEASE=2E >> >>Modified: >> Makefile=2Einc1 >> UPDATING >> lib/clang/freebsd_cc_version=2Eh >> lib/clang/llvm=2Ebuild=2Emk >> sys/conf/newvers=2Esh >> sys/sys/param=2Eh >> >>Index: Makefile=2Einc1 >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- Makefile=2Einc1 (revision 359501) >>+++ Makefile=2Einc1 (working copy) >>@@ -130,9 +130,9 @@ TARGET_ABI=3D gnueabi >> =2Eendif >> =2Eendif >> MACHINE_ABI?=3D unknown >>-MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/m= ips64/}-${MACHINE_ABI}-freebsd13=2E0 >>+MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/m= ips64/}-${MACHINE_ABI}-freebsd14=2E0 >> TARGET_ABI?=3D unknown >>-TARGET_TRIPLE?=3D ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mi= ps64/}-${TARGET_ABI}-freebsd13=2E0 >>+TARGET_TRIPLE?=3D ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mi= ps64/}-${TARGET_ABI}-freebsd14=2E0 >> KNOWN_ARCHES?=3D aarch64/arm64 \ >> amd64 \ >> armv6/arm \ >>@@ -2123,7 +2123,7 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} >> =2Eendif >>=20 >># flua is required to regenerate syscall files=2E It first appeared >>during the >>-# 13=2E0-CURRENT cycle, thus needs to be built on -older releases and >>stable >>+# 14=2E0-CURRENT cycle, thus needs to be built on -older releases and >>stable >> # branches=2E >> =2Eif ${BOOTSTRAPPING} < 1300059 >> ${_bt}-libexec/flua: ${_bt}-lib/liblua >>Index: UPDATING >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- UPDATING (revision 359501) >>+++ UPDATING (working copy) >>@@ -11,8 +11,8 @@ handbook: >> Items affecting the ports and packages system can be found in >>/usr/ports/UPDATING=2E Please read that file before running >portupgrade=2E >>=20 >>-NOTE TO PEOPLE WHO THINK THAT FreeBSD 13=2Ex IS SLOW: >>- FreeBSD 13=2Ex has many debugging features turned on, in both the >>kernel >>+NOTE TO PEOPLE WHO THINK THAT FreeBSD 14=2Ex IS SLOW: >>+ FreeBSD 14=2Ex has many debugging features turned on, in both the >>kernel >> and userland=2E These features attempt to detect incorrect use of >> system primitives, and encourage loud failure through extra sanity >> checking and fail stop semantics=2E They also substantially impact >>Index: lib/clang/freebsd_cc_version=2Eh >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- lib/clang/freebsd_cc_version=2Eh (revision 359501) >>+++ lib/clang/freebsd_cc_version=2Eh (working copy) >>@@ -1,3 +1,3 @@ >> /* $FreeBSD$ */ >>=20 >>-#define FREEBSD_CC_VERSION 1300007 >>+#define FREEBSD_CC_VERSION 1400007 >>Index: lib/clang/llvm=2Ebuild=2Emk >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- lib/clang/llvm=2Ebuild=2Emk (revision 359501) >>+++ lib/clang/llvm=2Ebuild=2Emk (working copy) >>@@ -38,7 +38,7 @@ TARGET_ABI=3D -gnueabi >> TARGET_ABI=3D >> =2Eendif >> VENDOR=3D unknown >>-OS_VERSION=3D freebsd13=2E0 >>+OS_VERSION=3D freebsd14=2E0 >>=20 >>LLVM_TARGET_TRIPLE?=3D ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn3= 2/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} >>LLVM_BUILD_TRIPLE?=3D ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/= mips64/}-${VENDOR}-${OS_VERSION} >>Index: sys/conf/newvers=2Esh >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- sys/conf/newvers=2Esh (revision 359501) >>+++ sys/conf/newvers=2Esh (working copy) >>@@ -53,7 +53,7 @@ >> # >>=20 >> TYPE=3D"FreeBSD" >>-REVISION=3D"13=2E0" >>+REVISION=3D"14=2E0" >> BRANCH=3D${BRANCH_OVERRIDE:-CURRENT} >> RELEASE=3D"${REVISION}-${BRANCH}" >> VERSION=3D"${TYPE} ${RELEASE}" >>Index: sys/sys/param=2Eh >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>--- sys/sys/param=2Eh (revision 359501) >>+++ sys/sys/param=2Eh (working copy) >>@@ -60,7 +60,7 @@ >> * in the range 5 to 9=2E >> */ >> #undef __FreeBSD_version >>-#define __FreeBSD_version 1300087 /* Master, propagated to newvers */ >>+#define __FreeBSD_version 1400087 /* Master, propagated to newvers */ >>=20 >> /* >>* __FreeBSD_kernel__ indicates that this system uses the kernel of >>FreeBSD, > >This was discussed at length just before 12 was released=2E Are you now >the one to decide naming, disregarding the discussion? > >Should we not have also skipped 4? Ok=2E I've been had=2E Woke up at 4 am and half asleep and exceptionally g= rumpy, as I have been first thing in the morning the last few months=2E I d= idn't clue into which day it was=2E Yet=2E I'm awake now ready to tackle to= day's insanity=2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E=20 Cy Schubert FreeBSD UNIX: Web: https://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From owner-svn-src-head@freebsd.org Wed Apr 1 13:25:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD11D2BBCCE; Wed, 1 Apr 2020 13:25:44 +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 48sn535Py1z4PQN; Wed, 1 Apr 2020 13:25:43 +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 578BA25B89; Wed, 1 Apr 2020 13:18:02 +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 031DI2VW000636; Wed, 1 Apr 2020 13:18:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031DI2nW000635; Wed, 1 Apr 2020 13:18:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004011318.031DI2nW000635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 13:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359506 - head/contrib/llvm-project X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm-project X-SVN-Commit-Revision: 359506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 13:25:45 -0000 Author: emaste Date: Wed Apr 1 13:18:01 2020 New Revision: 359506 URL: https://svnweb.freebsd.org/changeset/base/359506 Log: lldb: stop excluding bindings/ subdir With liblua in the tree we should be able to enable lldb's lua scripting. We'll need the files in bindings/, so start by allowing them to come in with the next import. Approved by: dim Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm-project/FREEBSD-Xlist Modified: head/contrib/llvm-project/FREEBSD-Xlist ============================================================================== --- head/contrib/llvm-project/FREEBSD-Xlist Wed Apr 1 09:51:29 2020 (r359505) +++ head/contrib/llvm-project/FREEBSD-Xlist Wed Apr 1 13:18:01 2020 (r359506) @@ -264,7 +264,6 @@ lldb/.clang-format lldb/.gitignore lldb/CMakeLists.txt lldb/CODE_OWNERS.txt -lldb/bindings/ lldb/cmake/ lldb/docs/.htaccess lldb/docs/CMakeLists.txt From owner-svn-src-head@freebsd.org Wed Apr 1 14:44:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC4462BDB58; Wed, 1 Apr 2020 14:44:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 48spqx5cm7z3QkG; Wed, 1 Apr 2020 14:44:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-ot1-x335.google.com with SMTP id m2so11411290otr.1; Wed, 01 Apr 2020 07:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=o8WDk9/svReysUKaweg2qbk7iAg2fnMAitz8kjKTP2A=; b=R0sYGnXqlCzmZRgpYhSqxnk8U3Kv7zdX2qExjjpLOwNa1GDvC007czk8GUnDEUHRtI Sqze2eT6N++5K48eQ3UWBXNi16G7BDc1VIWM0mb80WntiYRJ+ohoiBNH4TZHLEN+7E6+ 2yYvtjuhgPL8OQETBCLgJgp0NlDvwhGhPQPp7z/syFssIqMYPSD9Dqrel42gobDa+udl YtqTheLNOpt+JozbqyX3unreamwPpC7rkApXrroxhrx5+M27/AlVIWnPHw9EK1tkSy3/ qgOs3TQEcB3/RCCKg77LQkfY9VDsl7NTEGQcHqfnT2vfPxb0CYKQWfNjxAIn1GfCZRdY pE/g== 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:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=o8WDk9/svReysUKaweg2qbk7iAg2fnMAitz8kjKTP2A=; b=AsiGS3ZmN6WIWQUr2USMNhFZslmLvVIJ14iEFCNLfw6sKphskLPCfXnYWXqT134mn1 FQ4o12voYpOVSpDggNpxVZb5GTsfg2Q63bc6iW0C4mIKjd4lclpqkdAMHavqnLdluG2u 7/JNu+7kQ42L3iq+wOznn9mLpK68XHB8kNnsE/zxRhIt7L5cDUhXdc5gF6oefRLiJGZN tq0b4EppvekkPfaUarmlG5QYw7Xlv84L3f92SEULwienp3bSi/E87R75xjYGnMGnQJY5 t7yldB0utEuVtYwqg0txvDIyZ9DpJpd4lx+UbK21mxJFhfZXDzgeM4c7u9UC/qupvM4G R+Og== X-Gm-Message-State: ANhLgQ3d0Y2WEiF42mEVJQvu+gAc6B6Tnm88rHacZGCUHzn4Era8mCDx 1eRzC2EnlCX1KX466qj+1BiDr/zQ X-Google-Smtp-Source: ADFU+vt1Y/BhKTDg/wVamnDSvUnT/Vcq7QgVi2we147hAhurtE9bL4fGTzS5cne/kNDNh0TGDYYsXA== X-Received: by 2002:a9d:837:: with SMTP id 52mr16089865oty.354.1585750699871; Wed, 01 Apr 2020 07:18:19 -0700 (PDT) Received: from spectre.mavhome.dp.ua ([2600:1700:3580:3560:228:f8ff:fe04:d12]) by smtp.gmail.com with ESMTPSA id d25sm480663ooh.34.2020.04.01.07.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Apr 2020 07:18:18 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r359499 - head/sys/dev/ahci To: Ravi Pokala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004010319.0313JhlU034881@repo.freebsd.org> <5598FCD0-22B8-4F18-87C1-C1506E32A757@panasas.com> From: Alexander Motin Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAG0IUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raS5AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczM AAoJEIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLq A6xe6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHu uC5vgPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15Gc sS9YcQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9 TevwGsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCg lz65AQ0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6ZAXgD tmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8FlvmI/c 40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt3ytU 8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZR1Ed EIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm59R8A EQEAAYkBPAQYAQoAJgIbDBYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMLYBQkNMczMAAoJ EIMYw5VbqyJ/TqgH/RQHClkvecE0262lwKoP/m0Mh4I5TLRgoJJn8S7G1BnqohYJkiLqA6xe 6urGD7OqdNAl12UbrjWbdJV+zvea3vJoM4MZuYiYrGaXWxzFXqWJcPwMU9sAh8MRghHuuC5v gPb45Tnftw9/+n0i8GfVhQhOqepUGdQg4NPcXviSkoAvig6pp9Lcxisn0groUQKt15GcsS9Y cQWg3j9Hnipc6Mu416HX98Fb113NHJqc2geTHLkRyuBFOoyIqB6N9GKjzOAIzxxsVdl9Tevw Gsrp4M4/RFzWbSgsbOnbE7454lmuVZGfReEjnUm8RHp9Q2UWKXlp3exlZjvOp/uVEpCglz4= Message-ID: <45e89302-9325-a3cd-484f-b9019c0a809c@FreeBSD.org> Date: Wed, 1 Apr 2020 10:18:17 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <5598FCD0-22B8-4F18-87C1-C1506E32A757@panasas.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48spqx5cm7z3QkG X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=R0sYGnXq; dmarc=none; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::335 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-3.84 / 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]; 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_COUNT_THREE(0.00)[3]; IP_SCORE(-1.64)[ip: (-7.34), ipnet: 2607:f8b0::/32(-0.35), asn: 15169(-0.45), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.3.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]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FORGED_SENDER(0.30)[mav@FreeBSD.org,mavbsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[mav@FreeBSD.org,mavbsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 14:44:37 -0000 Hi. On 01.04.2020 00:28, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Alexander Motin > Date: 2020-03-31, Tuesday at 20:19 > To: , , > Subject: svn commit: r359499 - head/sys/dev/ahci > > Author: mav > Date: Wed Apr 1 03:19:42 2020 > New Revision: 359499 > URL: https://svnweb.freebsd.org/changeset/base/359499 > > Log: > Add ID for JMicron JMB582/JMB585 AHCI controller. > > JMB582 has 2 6Gbps SATA ports and PCIe 3.0 x1. > JMB585 has 5 6Gbps SATA ports and PCIe 3.0 x2. > > Both chips support AHCI v1.31, Port Multiplier with FBS and 8 MSI vectors. > > Hi Alexander, > > The second line of diff seems unrelated...? It is related, because the check for shared PCI function for SATA and PATA is no longer applicable to the new generation of HBAs, implementing only AHCI. And without adding more strict check the driver does not attach when it should. > > MFC after: 2 weeks > > Modified: > head/sys/dev/ahci/ahci_pci.c > > Modified: head/sys/dev/ahci/ahci_pci.c > ============================================================================== > --- head/sys/dev/ahci/ahci_pci.c Wed Apr 1 02:13:01 2020 (r359498) > +++ head/sys/dev/ahci/ahci_pci.c Wed Apr 1 03:19:42 2020 (r359499) > @@ -247,6 +247,7 @@ static const struct { > {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, > {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, > {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, > + {0x0585197b, 0x00, "JMicron JMB58x", 0}, > {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | > AHCI_Q_1CH | AHCI_Q_EDGEIS}, > {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | > @@ -399,6 +400,7 @@ ahci_probe(device_t dev) > !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { > /* Do not attach JMicrons with single PCI function. */ > if (pci_get_vendor(dev) == 0x197b && > + (ahci_ids[i].quirks & AHCI_Q_NOFORCE) && > (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) > return (ENXIO); > snprintf(buf, sizeof(buf), "%s AHCI SATA controller", > > > -- Alexander Motin From owner-svn-src-head@freebsd.org Wed Apr 1 15:12:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 497F82BE623; Wed, 1 Apr 2020 15:12:59 +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 48sqSn50lsz46Sv; Wed, 1 Apr 2020 15:12:57 +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 D28FA274A4; Wed, 1 Apr 2020 15:12:51 +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 031FCpUv073592; Wed, 1 Apr 2020 15:12:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031FCpDS073591; Wed, 1 Apr 2020 15:12:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004011512.031FCpDS073591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Apr 2020 15:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359511 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 359511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 15:12:59 -0000 Author: trasz Date: Wed Apr 1 15:12:51 2020 New Revision: 359511 URL: https://svnweb.freebsd.org/changeset/base/359511 Log: Bump WARNS for sh(1). Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24181 Modified: head/bin/sh/Makefile Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Wed Apr 1 15:10:26 2020 (r359510) +++ head/bin/sh/Makefile Wed Apr 1 15:12:51 2020 (r359511) @@ -30,8 +30,6 @@ LIBADD= edit CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline -WARNS?= 2 -WFORMAT=0 .PATH: ${.CURDIR}/bltin \ ${.CURDIR:H}/kill \ From owner-svn-src-head@freebsd.org Wed Apr 1 15:40:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9343B2BF011; Wed, 1 Apr 2020 15:40:56 +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 48sr5269nZz4Hcj; Wed, 1 Apr 2020 15:40: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 5F282278E4; Wed, 1 Apr 2020 15:34: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 031FYB4E086144; Wed, 1 Apr 2020 15:34:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031FYBT1086143; Wed, 1 Apr 2020 15:34:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004011534.031FYBT1086143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 15:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359513 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 15:40:56 -0000 Author: emaste Date: Wed Apr 1 15:34:10 2020 New Revision: 359513 URL: https://svnweb.freebsd.org/changeset/base/359513 Log: elf.5: add definitions of FreeBSD notes I hope to extend this with some more detail in the future but it gives a good starting point. Thanks to 0mp for assistance with markup. Reviewed by: jkoshy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23982 Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Wed Apr 1 15:25:16 2020 (r359512) +++ head/share/man/man5/elf.5 Wed Apr 1 15:34:10 2020 (r359513) @@ -1296,6 +1296,32 @@ fields are padded to ensure 4-byte alignemnt. and .Va descsz specify the unpadded length. +.Pp +.Fx +defines the following ELF note types +.Po with corresponding interpretation of +.Va desc Pc : +.Bl -tag -width 4n +.It Dv NT_FREEBSD_ABI_TAG Pq Value: 1 +Indicates the OS ABI version in a form of a 32-bit integer containing expected +ABI version +.Po i.e., +.Dv __FreeBSD_version Pc . +.It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 +Indicates that crt does not call init. +.Va desc +is ignored. +.It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 +.It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 +Contains a bitmask of mitigations and features to enable: +.Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" +.Sy Name Ta Sy Value Ta Sy Description +.It NT_FREEBSD_FCTL_ASLR_DISABLE Ta 0x01 Ta Disable ASLR +.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Ta 0x02 Ta Disable implicit PROT_MAX +.It NT_FREEBSD_FCTL_STKGAP_DISABLE Ta 0x04 Ta Disable stack gap +.It NT_FREEBSD_FCTL_WXNEEDED Ta 0x08 Ta Binary makes W+X mappings +.El +.El .Sh SEE ALSO .Xr as 1 , .Xr gdb 1 , From owner-svn-src-head@freebsd.org Wed Apr 1 15:41:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF7612BF064; Wed, 1 Apr 2020 15:41:16 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sr5S4Kk6z4Hsb; Wed, 1 Apr 2020 15:41:16 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D54276B0; Wed, 1 Apr 2020 15:25:18 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 031FPILE079725; Wed, 1 Apr 2020 15:25:18 GMT (envelope-from harti@FreeBSD.org) Received: (from harti@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031FPGKm079714; Wed, 1 Apr 2020 15:25:16 GMT (envelope-from harti@FreeBSD.org) Message-Id: <202004011525.031FPGKm079714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: harti set sender to harti@FreeBSD.org using -f From: Hartmut Brandt Date: Wed, 1 Apr 2020 15:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359512 - in head: contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm contrib/bsnmp/snmpd contrib/bsnmp/tests lib/libbsnmp/libbsnmp X-SVN-Group: head X-SVN-Commit-Author: harti X-SVN-Commit-Paths: in head: contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm contrib/bsnmp/snmpd contrib/bsnmp/tests lib/libbsnmp/libbsnmp X-SVN-Commit-Revision: 359512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 15:41:17 -0000 Author: harti Date: Wed Apr 1 15:25:16 2020 New Revision: 359512 URL: https://svnweb.freebsd.org/changeset/base/359512 Log: Merge release 1.14 of bsnmp. Added: head/contrib/bsnmp/tests/ - copied from r359490, vendor/bsnmp/dist/tests/ Replaced: head/contrib/bsnmp/snmpd/trans_inet.c - copied unchanged from r359490, vendor/bsnmp/dist/snmpd/trans_inet.c head/contrib/bsnmp/snmpd/trans_inet.h - copied unchanged from r359490, vendor/bsnmp/dist/snmpd/trans_inet.h Modified: head/contrib/bsnmp/lib/asn1.c head/contrib/bsnmp/lib/bsnmpclient.3 head/contrib/bsnmp/lib/snmpclient.c head/contrib/bsnmp/lib/snmpcrypto.c head/contrib/bsnmp/snmp_mibII/mibII.c head/contrib/bsnmp/snmp_mibII/mibII.h head/contrib/bsnmp/snmp_usm/usm_snmp.c head/contrib/bsnmp/snmp_vacm/vacm_snmp.c head/contrib/bsnmp/snmpd/snmpd.config head/lib/libbsnmp/libbsnmp/Makefile Directory Properties: head/contrib/bsnmp/ (props changed) Modified: head/contrib/bsnmp/lib/asn1.c ============================================================================== --- head/contrib/bsnmp/lib/asn1.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/lib/asn1.c Wed Apr 1 15:25:16 2020 (r359512) @@ -65,8 +65,8 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_le return (ASN_ERR_EOBUF); } *type = *b->asn_cptr; - if ((*type & ASN_TYPE_MASK) > 0x30) { - asn_error(b, "types > 0x30 not supported (%u)", + if ((*type & ASN_TYPE_MASK) > 0x1e) { + asn_error(b, "tags > 0x1e not supported (%#x)", *type & ASN_TYPE_MASK); return (ASN_ERR_FAILED); } @@ -100,11 +100,19 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_le *len = *b->asn_cptr++; b->asn_len--; } + +#ifdef BOGUS_CVE_2019_5610_FIX + /* + * This is the fix from CVE-2019-5610. + * + * This is the wrong place. Each of the asn functions should check + * that it has enough info for its own work. + */ if (*len > b->asn_len) { - asn_error(b, "len %u exceeding asn_len %u", *len, b->asn_len); + asn_error(b, "lenen %u exceeding asn_len %u", *len, b->asn_len); return (ASN_ERR_EOBUF); } - +#endif return (ASN_ERR_OK); } @@ -147,7 +155,7 @@ asn_put_len(u_char *ptr, asn_len_t len) /* * Write a header (tag and length fields). - * Tags are restricted to one byte tags (value <= 0x30) and the + * Tags are restricted to one byte tags (value <= 0x1e) and the * lenght field to 16-bit. All errors stop the encoding. */ enum asn_err @@ -156,8 +164,8 @@ asn_put_header(struct asn_buf *b, u_char type, asn_len u_int lenlen; /* tag field */ - if ((type & ASN_TYPE_MASK) > 0x30) { - asn_error(NULL, "types > 0x30 not supported (%u)", + if ((type & ASN_TYPE_MASK) > 0x1e) { + asn_error(NULL, "types > 0x1e not supported (%#x)", type & ASN_TYPE_MASK); return (ASN_ERR_FAILED); } @@ -251,9 +259,10 @@ asn_get_real_integer(struct asn_buf *b, asn_len_t len, return (ASN_ERR_BADLEN); } err = ASN_ERR_OK; - if (len > 8) + if (len > 8) { + asn_error(b, "integer too long"); err = ASN_ERR_RANGE; - else if (len > 1 && + } else if (len > 1 && ((*b->asn_cptr == 0x00 && (b->asn_cptr[1] & 0x80) == 0) || (*b->asn_cptr == 0xff && (b->asn_cptr[1] & 0x80) == 0x80))) { asn_error(b, "non-minimal integer"); @@ -331,27 +340,35 @@ asn_put_real_integer(struct asn_buf *b, u_char type, i static enum asn_err asn_get_real_unsigned(struct asn_buf *b, asn_len_t len, uint64_t *vp) { - enum asn_err err; - + *vp = 0; if (b->asn_len < len) { asn_error(b, "truncated integer"); return (ASN_ERR_EOBUF); } if (len == 0) { + /* X.690: 8.3.1 */ asn_error(b, "zero-length integer"); - *vp = 0; return (ASN_ERR_BADLEN); } - err = ASN_ERR_OK; - *vp = 0; - if ((*b->asn_cptr & 0x80) || (len == 9 && *b->asn_cptr != 0)) { + if (len > 1 && *b->asn_cptr == 0x00 && (b->asn_cptr[1] & 0x80) == 0) { + /* X.690: 8.3.2 */ + asn_error(b, "non-minimal unsigned"); + b->asn_cptr += len; + b->asn_len -= len; + return (ASN_ERR_BADLEN); + + } + + enum asn_err err = ASN_ERR_OK; + + if ((*b->asn_cptr & 0x80) || len > 9 || + (len == 9 && *b->asn_cptr != 0)) { /* negative integer or too larger */ *vp = 0xffffffffffffffffULL; - err = ASN_ERR_RANGE; - } else if (len > 1 && - *b->asn_cptr == 0x00 && (b->asn_cptr[1] & 0x80) == 0) { - asn_error(b, "non-minimal unsigned"); - err = ASN_ERR_BADLEN; + asn_error(b, "unsigned too large or negative"); + b->asn_cptr += len; + b->asn_len -= len; + return (ASN_ERR_RANGE); } while (len--) { @@ -405,11 +422,14 @@ asn_get_integer_raw(struct asn_buf *b, asn_len_t len, enum asn_err ret; if ((ret = asn_get_real_integer(b, len, &val)) == ASN_ERR_OK) { - if (len > 4) + if (len > 4) { + asn_error(b, "integer too long"); ret = ASN_ERR_BADLEN; - else if (val > INT32_MAX || val < INT32_MIN) + } else if (val > INT32_MAX || val < INT32_MIN) { /* may not happen */ + asn_error(b, "integer out of range"); ret = ASN_ERR_RANGE; + } *vp = (int32_t)val; } return (ret); @@ -589,7 +609,7 @@ asn_get_objid_raw(struct asn_buf *b, asn_len_t len, st return (ASN_ERR_EOBUF); } if (subid > (ASN_MAXID >> 7)) { - asn_error(b, "OBID subid too larger"); + asn_error(b, "OID subid too larger"); err = ASN_ERR_RANGE; } subid = (subid << 7) | (*b->asn_cptr & 0x7f); @@ -645,7 +665,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid oidlen = 2; } else if (oid->len == 1) { /* illegal */ - asn_error(b, "short oid"); + asn_error(NULL, "short oid"); if (oid->subs[0] > 2) asn_error(NULL, "oid[0] too large (%u)", oid->subs[0]); err = ASN_ERR_RANGE; @@ -657,7 +677,8 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid err = ASN_ERR_RANGE; } if (oid->subs[0] > 2 || - (oid->subs[0] < 2 && oid->subs[1] >= 40)) { + (oid->subs[0] < 2 && oid->subs[1] >= 40) || + (oid->subs[0] == 2 && oid->subs[1] > ASN_MAXID - 2 * 40)) { asn_error(NULL, "oid out of range (%u,%u)", oid->subs[0], oid->subs[1]); err = ASN_ERR_RANGE; @@ -814,10 +835,7 @@ asn_get_uint32_raw(struct asn_buf *b, asn_len_t len, u enum asn_err err; if ((err = asn_get_real_unsigned(b, len, &v)) == ASN_ERR_OK) { - if (len > 5) { - asn_error(b, "uint32 too long %u", len); - err = ASN_ERR_BADLEN; - } else if (v > UINT32_MAX) { + if (v > UINT32_MAX) { asn_error(b, "uint32 too large %llu", v); err = ASN_ERR_RANGE; } Modified: head/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- head/contrib/bsnmp/lib/bsnmpclient.3 Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/lib/bsnmpclient.3 Wed Apr 1 15:25:16 2020 (r359512) @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.12 2005/10/04 08:46:50 brandt_h Exp $ .\" -.Dd December 31, 2016 +.Dd March 31, 2020 .Dt BSNMPCLIENT 3 .Os .Sh NAME @@ -177,7 +177,9 @@ If it is a local stream socket is used. For .Dv SNMP_TRANS_UDP -a UDP socket is created. +a UDPv4 socket and for +.Dv SNMP_TRANS_UDP6 +a UDPv6 socket is created. It uses the .Va chost field as the path to the server's socket for local sockets. @@ -675,7 +677,12 @@ The syntax of a server specification is .Pp where .Va trans -is the transport name (one of udp, stream or dgram), +is the transport name (one of +.Qq udp , +.Qq udp6 , +.Qq stream +or +.Qq dgram ) , .Va community is the string to be used for both the read and the write community, .Va server @@ -685,13 +692,51 @@ of a local socket, and is the port in case of UDP transport. The function returns 0 in the case of success and return -1 and sets the error string in case of an error. +.Pp +The function +.Fn snmp_parse_serverr +fills the transport, the port number and the community strings with +reasonable default values when they are not specified. +The default transport +is +.Dv SNMP_TRANS_UDP . +If the host name contains a slash the default is modified to +.Dv SNMP_TRANS_LOC_DGRAM . +If the host name looks like a numeric IPv6 address the default is +.Dv SNMP_TRANS_UDP6 . +For numeric IPv6 addresses the transport name udp is automatically +translated as +.Dv SNMP_TRANS_UDP6 . +The default port number (for +.Dv udp +or +.Dv udp6 ) +is +.Qq snmp . +The default read community is +.Qq public +and the default write community +.Qq private . +.Pp +.Fn snmp_parse_server +recognizes path names, host names and numerical IPv4 and IPv6 addresses. +A string consisting of digits and periods is assumed to be an IPv4 address +and must be parseable by +.Fn inet_aton 3 . +An IPv6 address is any string enclosed in square brackets. +It must be parseable with +.Fn gethostinfo 3 . +.Pp +The port number for +.Fn snmp_parse_server +can be specified numerically or symbolically. +It is ignored for local sockets. .Sh DIAGNOSTICS -If an error occurs in any of the function an error indication as described +If an error occurs in any of the functions an error indication as described above is returned. -Additionally the function sets a printable error string -in the +Additionally the function sets a printable error string in the .Va error -filed of +field of .Va snmp_client . .Sh SEE ALSO .Xr gensnmptree 1 , Modified: head/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- head/contrib/bsnmp/lib/snmpclient.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/lib/snmpclient.c Wed Apr 1 15:25:16 2020 (r359512) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2005,2018 + * Copyright (c) 2004-2005,2018-2019 * Hartmut Brandt. * All rights reserved. * Copyright (c) 2001-2003 @@ -930,7 +930,7 @@ open_client_udp(const char *host, const char *port) /* open connection */ memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; - hints.ai_family = snmp_client.trans == SNMP_TRANS_UDP ? AF_INET: + hints.ai_family = snmp_client.trans == SNMP_TRANS_UDP ? AF_INET : AF_INET6; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = 0; @@ -1884,7 +1884,8 @@ static const char *const trans_list[] = { /** * Try to get a transport identifier which is a leading alphanumeric string * terminated by a double colon. The string may not be empty. The transport - * identifier is optional. + * identifier is optional. Unknown transport identifiers are reject. + * Be careful: a double colon can also occur in a numeric IPv6 address. * * \param sc client struct to set errors * \param strp possible start of transport; updated to point to @@ -1899,8 +1900,6 @@ get_transp(struct snmp_client *sc, const char **strp) size_t i; for (i = 0; i < nitems(trans_list); i++) { - if (trans_list[i] == NULL || *trans_list[i] == '\0') - continue; p = strstr(*strp, trans_list[i]); if (p == *strp) { *strp += strlen(trans_list[i]); @@ -1908,13 +1907,23 @@ get_transp(struct snmp_client *sc, const char **strp) } } - p = *strp; - if (p[0] == ':' && p[1] == ':') { + p = strstr(*strp, "::"); + if (p == *strp) { seterr(sc, "empty transport specifier"); return (-1); } - /* by default assume UDP */ - return (SNMP_TRANS_UDP); + if (p == NULL) + /* by default assume UDP */ + return (SNMP_TRANS_UDP); + + /* ignore :: after [ */ + const char *ob = strchr(*strp, '['); + if (ob != NULL && p > ob) + /* by default assume UDP */ + return (SNMP_TRANS_UDP); + + seterr(sc, "unknown transport specifier '%.*s'", p - *strp, *strp); + return (-1); } /** @@ -2153,12 +2162,14 @@ int snmp_parse_server(struct snmp_client *sc, const char *str) { const char *const orig = str; + /* parse input */ - int i, trans = get_transp(sc, &str); + int def_trans = 0, trans = get_transp(sc, &str); if (trans < 0) return (-1); /* choose automatically */ - i = orig == str ? -1: trans; + if (orig == str) + def_trans = 1; const char *const comm[2] = { str, @@ -2204,7 +2215,7 @@ snmp_parse_server(struct snmp_client *sc, const char * } #if DEBUG_PARSE - printf("transp: %u\n", trans); + printf("transp: %d (def=%d)\n", trans, def_trans); printf("comm: %zu %zu\n", comm[0] - orig, comm[1] - orig); printf("ipv6: %zu %zu\n", ipv6[0] - orig, ipv6[1] - orig); printf("ipv4: %zu %zu\n", ipv4[0] - orig, ipv4[1] - orig); @@ -2218,18 +2229,19 @@ snmp_parse_server(struct snmp_client *sc, const char * if (ipv6[0] != ipv6[1]) { if ((chost = save_str(sc, ipv6)) == NULL) return (-1); - if (i == -1 || trans == SNMP_TRANS_UDP) + if (def_trans || trans == SNMP_TRANS_UDP) + /* assume the user meant udp6:: */ trans = SNMP_TRANS_UDP6; } else if (ipv4[0] != ipv4[1]) { if ((chost = save_str(sc, ipv4)) == NULL) return (-1); - if (i == -1) + if (def_trans) trans = SNMP_TRANS_UDP; } else { if ((chost = save_str(sc, host)) == NULL) return (-1); - if (i == -1) { + if (def_trans) { /* * Default transport is UDP unless the host contains * a slash in which case we default to DGRAM. @@ -2258,6 +2270,7 @@ snmp_parse_server(struct snmp_client *sc, const char * /* commit */ sc->trans = trans; + /* * If community string was specified and it is empty, overwrite it. * If it was not specified, use default. @@ -2276,7 +2289,7 @@ snmp_parse_server(struct snmp_client *sc, const char * #if DEBUG_PARSE printf("Committed values:\n"); - printf("trans: %u\n", sc->trans); + printf("trans: %d\n", sc->trans); printf("comm: '%s'/'%s'\n", sc->read_community, sc->write_community); printf("host: '%s'\n", sc->chost); printf("port: '%s'\n", sc->cport); Modified: head/contrib/bsnmp/lib/snmpcrypto.c ============================================================================== --- head/contrib/bsnmp/lib/snmpcrypto.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/lib/snmpcrypto.c Wed Apr 1 15:25:16 2020 (r359512) @@ -57,10 +57,10 @@ #define SNMP_AUTH_KEY_LOOPCNT 1048576 #define SNMP_AUTH_BUF_SIZE 72 +#ifdef HAVE_LIBCRYPTO + static const uint8_t ipad = 0x36; static const uint8_t opad = 0x5c; - -#ifdef HAVE_LIBCRYPTO static int32_t snmp_digest_init(const struct snmp_user *user, EVP_MD_CTX *ctx, Modified: head/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/snmp_mibII/mibII.c Wed Apr 1 15:25:16 2020 (r359512) @@ -447,7 +447,7 @@ mib_fetch_ifmib(struct mibif *ifp) void *newmib; struct ifmibdata oldmib = ifp->mib; struct ifreq irr; - unsigned int alias_maxlen = MIBIF_ALIAS_SIZE_MAX; + u_int alias_maxlen = MIBIF_ALIAS_SIZE_MAX; if (fetch_generic_mib(ifp, &oldmib) == -1) return (-1); @@ -519,7 +519,6 @@ mib_fetch_ifmib(struct mibif *ifp) } out: - /* * Find sysctl mib for net.ifdescr_maxlen (one time). * kmib[0] == -1 at first call to mib_fetch_ifmib(). @@ -581,7 +580,7 @@ mib_fetch_ifmib(struct mibif *ifp) ifp->alias = realloc(ifp->alias, ifp->alias_size); } -fin: + fin: ifp->mibtick = get_ticks(); return (0); } Modified: head/contrib/bsnmp/snmp_mibII/mibII.h ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII.h Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/snmp_mibII/mibII.h Wed Apr 1 15:25:16 2020 (r359512) @@ -57,7 +57,7 @@ #include "snmp_mibII.h" #include "mibII_tree.h" -/* maximum size of the interface alias unless overridden with net.ifdescr_maxlen */ +/* maximum size of interface alias unless overridden with net.ifdescr_maxlen */ #define MIBIF_ALIAS_SIZE (64 + 1) #define MIBIF_ALIAS_SIZE_MAX 1024 @@ -81,7 +81,6 @@ struct mibif_private { uint64_t hc_opackets; uint64_t hc_imcasts; uint64_t hc_ipackets; - }; #define MIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private)) Modified: head/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- head/contrib/bsnmp/snmp_usm/usm_snmp.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/snmp_usm/usm_snmp.c Wed Apr 1 15:25:16 2020 (r359512) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 The FreeBSD Foundation + * Copyright (c) 2010,2018 The FreeBSD Foundation * All rights reserved. * * This software was developed by Shteryana Sotirova Shopova under @@ -605,7 +605,7 @@ usm_dump(void) privstr[uuser->suser.priv_proto]); } -static const char usm_comment[] = \ +static const char usm_comment[] = "This module implements SNMP User-based Security Model defined in RFC 3414."; extern const struct snmp_module config; Modified: head/contrib/bsnmp/snmp_vacm/vacm_snmp.c ============================================================================== --- head/contrib/bsnmp/snmp_vacm/vacm_snmp.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/snmp_vacm/vacm_snmp.c Wed Apr 1 15:25:16 2020 (r359512) @@ -1013,7 +1013,7 @@ vacm_dump(void) "excluded":"included"); } -static const char vacm_comment[] = \ +static const char vacm_comment[] = "This module implements SNMP View-based Access Control Model defined in RFC 3415."; extern const struct snmp_module config; Modified: head/contrib/bsnmp/snmpd/snmpd.config ============================================================================== --- head/contrib/bsnmp/snmpd/snmpd.config Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/snmpd/snmpd.config Wed Apr 1 15:25:16 2020 (r359512) @@ -28,7 +28,7 @@ # # $Begemot: bsnmp/snmpd/snmpd.config,v 1.16 2006/02/14 09:04:20 brandt_h Exp $ # -# Example configuration file. +# Example configuration file for testing. # # @@ -38,56 +38,80 @@ host := foo.bar.com location := "Room 200" contact := "sysmeister@bar.com" system := 1 # FreeBSD -traphost := noc.bar.com +traphost := localhost trapport := 162 read := "public" -# Uncomment the line below that sets the community string -# to enable write access. -write := "geheim" +write := "geheim" # take care - this allows writing trap := "mytrap" +securityModelSNMPv1 := 1 +securityModelSNMPv2c := 2 + +noAuthNoPriv := 1 + # # Configuration # %snmpd begemotSnmpdDebugDumpPdus = 2 begemotSnmpdDebugSyslogPri = 7 +begemotSnmpdDebugSnmpTrace = 0 # -# Set the read and write communities. +# Set community strings. # -# The default value of the community strings is NULL (note, that this is -# different from the empty string). This disables both read and write access. -# To enable read access only the read community string must be set. Setting -# the write community string enables both read and write access with that -# string. +# Each community string has a permission attached to it - 1 for read only +# and 2 for read/write. Default is 1. Community strings must be unique. # # Be sure to understand the security implications of SNMPv2 - the community # strings are readable on the wire! # begemotSnmpdCommunityString.0.1 = $(read) -# begemotSnmpdCommunityString.0.2 = $(write) -# begemotSnmpdCommunityString.0.3 = "otherPublic" +begemotSnmpdCommunityPermission.0.1 = 1 +#begemotSnmpdCommunityString.0.2 = $(write) +#begemotSnmpdCommunityPermission.0.2 = 2 +#begemotSnmpdCommunityString.0.3 = "otherPublic" begemotSnmpdCommunityDisable = 1 # open standard SNMP ports -# begemotSnmpdPortStatus.[$(host)].161 = 1 -# begemotSnmpdPortStatus.127.0.0.1.161 = 1 +# 0.0.0.0:161 +begemotSnmpdTransInetStatus.1.4.0.0.0.0.161.1 = 4 -# UDP over IPv4: 127.0.0.1:161 -begemotSnmpdTransInetStatus.1.4.127.0.0.1.161.1 = 4 +# test the port table; IPv4 address +# 127.0.0.1:10161 +begemotSnmpdTransInetStatus.1.4.127.0.0.1.10161.1 = 4 -# UDP over IPv6: ::1:161 -begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.161.1 = 4 +# test the port table; IPv6 address +# ::1:10162 +begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.10162.1 = 4 +# :::10163 +begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.10163.1 = 4 +# fe80::1%1:10164 - requires inet fe80::1%em0/64 +begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.1.10164.1 = 4 +# fe80::1%2:10164 - requires inet fe80::1%em1/64 +begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.2.10164.1 = 4 +# fe80::1:10170 - should fail (no scope index) +# begemotSnmpdTransInetStatus.2.16.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.10170.1 = 4 +# fe80::1%0:10170 - should fail (default scope index for link local address) +# begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.10170.1 = 4 -# Use domain name and IPv6 link-local address with scope zone id as address -# begemotSnmpdTransInetStatus.16."localhost".161.1 = 4 -# begemotSnmpdTransInetStatus.16."fe80::1%em0".161.1 = 4 +# test the port table; DNS address +# :10165 UDPv4 and UDPv6 +begemotSnmpdTransInetStatus.16.0.10165.1 = 4 +# 127.0.0.1:10166 +# ::1:10166 +begemotSnmpdTransInetStatus.16."localhost".10166.1 = 4 +# ::1:10167 +begemotSnmpdTransInetStatus.16."localhost6".10167.1 = 4 +# fe80::1%em0:10168 - requires inet fe80::$em0/64 +begemotSnmpdTransInetStatus.16."fe80::1%em0".10168.1 = 4 +# fe80::1%em1:10169 - requires inet fe80::$em1/64 +begemotSnmpdTransInetStatus.16."fe80::1%em1".10169.1 = 4 # open a unix domain socket -begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 -begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 +# begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 +# begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 # send traps to the traphost begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 @@ -103,12 +127,57 @@ snmpEnableAuthenTraps = 2 # # Load MIB-2 module # +#begemotSnmpdModulePath."mibII" = "../snmp_mibII/.libs/snmp_mibII.so" begemotSnmpdModulePath."mibII" = "/usr/local/lib/snmp_mibII.so" # +# SNMPv3 notification targets +# +#begemotSnmpdModulePath."target" = "../snmp_target/.libs/snmp_target.so" +begemotSnmpdModulePath."target" = "/usr/local/lib/snmp_target.so" + +# +# SNMPv3 user-based security module +# +#begemotSnmpdModulePath."usm" = "../snmp_usm/.libs/snmp_usm.so" +begemotSnmpdModulePath."usm" = "/usr/local/lib/snmp_usm.so" + +# +# SNMPv3 view-based access control module +# +#begemotSnmpdModulePath."vacm" = "../snmp_vacm/.libs/snmp_vacm.so" +begemotSnmpdModulePath."vacm" = "/usr/local/lib/snmp_vacm.so" + +# # Netgraph module # -begemotSnmpdModulePath."netgraph" = "/usr/local/lib/snmp_netgraph.so" +# begemotSnmpdModulePath."netgraph" = "/usr/local/lib/snmp_netgraph.so" +# %netgraph +# begemotNgControlNodeName = "snmpd" -%netgraph -begemotNgControlNodeName = "snmpd" +%vacm + +internetoid := 1.3.6.1 +internetoidlen := 4 + +vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4 +vacmGroupName.$(securityModelSNMPv1).$(read) = $(read) + +vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(read) = 4 +vacmGroupName.$(securityModelSNMPv2c).$(read) = $(read) + +vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4 +vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write) + +vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4 + +vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4 +vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet" + +vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 +vacmAccessStatus.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 +vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" +vacmAccessReadViewName.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" +vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" +vacmAccessWriteViewName.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" + Copied: head/contrib/bsnmp/snmpd/trans_inet.c (from r359490, vendor/bsnmp/dist/snmpd/trans_inet.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bsnmp/snmpd/trans_inet.c Wed Apr 1 15:25:16 2020 (r359512, copy of r359490, vendor/bsnmp/dist/snmpd/trans_inet.c) @@ -0,0 +1,1341 @@ +/* + * Copyright (c) 2018 + * Hartmut Brandt. + * All rights reserved. + * + * Author: Harti Brandt + * + * 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 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 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. + * + * $Begemot: bsnmp/snmpd/trans_udp.c,v 1.5 2005/10/04 08:46:56 brandt_h Exp $ + * + * Internet transport + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "asn1.h" +#include "snmp.h" +#include "snmpmod.h" + +#include "snmpd.h" + +#define SNMPTREE_TYPES +#define SNMPENUM_FUNCS +#include "tree.h" +#include "oid.h" + +extern const struct transport_def inet_trans; + +struct inet_port; +struct inet_port_params; +struct port_sock; + +typedef int create_func(struct inet_port *, struct inet_port_params *); +typedef void input_func(int, void *); +typedef int activate_func(struct inet_port *); +typedef void deactivate_func(struct inet_port *); +typedef void parse_ctrl_func(struct port_sock *, const struct msghdr *); +typedef void setsrc_func(struct port_sock *, struct msghdr *); + +static create_func ipv4_create; +static input_func ipv4_input; +static activate_func ipv4_activate; +static deactivate_func ipv4_deactivate; +static parse_ctrl_func ipv4_parse_ctrl; +static setsrc_func ipv4_setsrc; + +static create_func ipv6_create; +static input_func ipv6_input; +static activate_func ipv6_activate; +static deactivate_func ipv6_deactivate; +static parse_ctrl_func ipv6_parse_ctrl; +static setsrc_func ipv6_setsrc; + +static create_func ipv6z_create; + +static create_func dns_create; +static activate_func dns_activate; +static deactivate_func dns_deactivate; + +struct port_sock { + /* common input stuff; must be first */ + struct port_input input; + + /** link field */ + TAILQ_ENTRY(port_sock) link; + + /** pointer to parent */ + struct inet_port *port; + + /** bind address */ + struct sockaddr_storage bind_addr; + + /** reply destination */ + struct sockaddr_storage ret_dest; + + /** need to set source address in reply; set for INADDR_ANY */ + bool set_ret_source; + + /** address of the receive interface */ + union { + /** IPv4 case */ + struct in_addr a4; + + /** IPv6 case */ + struct in6_pktinfo a6; + } ret_source; + + /** parse control message */ + parse_ctrl_func *parse_ctrl; + + /** set source address for a send() */ + setsrc_func *setsrc; +}; +static_assert(offsetof(struct port_sock, input) == 0, + "input not first in port_sock"); + +/** + * Table row for the inet ports. + * + * When actived each row can have one or several open sockets. For ipv6, + * ipv4 and ipv6z addresses it is always one, for dns addresses more than + * one socket can be open. + */ +struct inet_port { + /** common i/o port stuff (must be first) */ + struct tport tport; + + /** transport protocol */ + enum BegemotSnmpdTransportProto proto; + + /** row status */ + enum RowStatus row_status; + + /** socket list */ + TAILQ_HEAD(, port_sock) socks; + + /** value for InetAddressType::dns */ + char *dns_addr; + + /** port number in dns case; network byte order */ + uint16_t dns_port; + + /** create a port */ + create_func *create; + + /** activate a port */ + activate_func *activate; + + /** deactivate port */ + deactivate_func *deactivate; +}; +static_assert(offsetof(struct inet_port, tport) == 0, + "tport not first in inet_port"); + +/** to be used in bind_addr field */ +#define AF_DNS AF_VENDOR00 + +/** registered transport */ +static struct transport *my_trans; + +/** set operation */ +enum { + SET_CREATED, + SET_ACTIVATED, + SET_DEACTIVATE, + SET_DESTROY, +}; + +/** length of the control data buffer */ +static const size_t RECV_CBUF_SIZE = + MAX(CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + + CMSG_SPACE(sizeof(struct in_addr)), + CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + + CMSG_SPACE(sizeof(struct in6_pktinfo))); + +/** length of the control data buffer */ +static const size_t XMIT_CBUF_SIZE = + MAX(CMSG_SPACE(sizeof(struct in_addr)), + CMSG_SPACE(sizeof(struct in6_pktinfo))); + +/** + * Start the transport. This registers the transport with the + * transport table. + * + * \return SNMP error code + */ +static int +inet_start(void) +{ + return (trans_register(&inet_trans, &my_trans)); +} + +/** + * Stop the transport. This tries to unregister the transport which + * in turn fails if the list of ports is not empty. + * + * \return SNMP error code + */ +static int +inet_stop(int force __unused) +{ + if (my_trans != NULL) + if (trans_unregister(my_trans) != 0) + return (SNMP_ERR_GENERR); + return (SNMP_ERR_NOERROR); +} + +/** + * Deactivate SNMP port. + * + * \param tp port to close + */ +static void +deactivate_port(struct inet_port *p) +{ + p->deactivate(p); +} + +/* + * This function activates a port. For ports opened via the config files + * this is called just before entering the event loop. For ports create + * during runtime this is called when the RowStatus is set to Active or + * as second step for CreateAndGo. + * + * \param tp transport port + * + * \return SNMP error code + */ +static int +inet_activate(struct tport *tp) +{ + struct inet_port *port = (struct inet_port *)tp; + + return (port->activate(port)); +} + +/* + * Close the SNMP port if it is open and destroy it. + * + * \param tp port to close + */ +static void +inet_destroy_port(struct tport *tp) +{ + struct inet_port *port = (struct inet_port *)tp; + + deactivate_port(port); + + trans_remove_port(tp); + + free(port->dns_addr); + free(port); +} + +/** + * If the input struct has no buffer allocated yet, do it now. If allocation + * fails, read the data into a local buffer and drop it. + * + * \param pi input struct + * + * \return -1 if allocation fails, 0 otherwise + */ +static int +inet_alloc_buf(struct port_input *pi) +{ + char drop_buf[2000]; + + if (pi->buf == NULL) { + if ((pi->buf = buf_alloc(0)) == NULL) { + (void)recvfrom(pi->fd, drop_buf, sizeof(drop_buf), + 0, NULL, NULL); + return (-1); + } + pi->buflen = buf_size(0); + } + return (0); +} + +/** + * Read message into input buffer. Get also the source address and any + * control data that is available. If the message is truncated, increment + * corresponding statistics. + * + * \param pi input object + * \param msg message object to fill + * \param cbuf control data buffer + * + * \return -1 when something goes wrong, 0 othersise + */ +static int +inet_read_msg(struct port_input *pi, struct msghdr *msg, char *cbuf) +{ + struct iovec iov[1]; + + iov[0].iov_base = pi->buf; + iov[0].iov_len = pi->buflen; + + msg->msg_name = pi->peer; + msg->msg_namelen = pi->peerlen; + msg->msg_iov = iov; + msg->msg_iovlen = 1; + msg->msg_control = cbuf; + msg->msg_controllen = RECV_CBUF_SIZE; + msg->msg_flags = 0; + + memset(cbuf, 0, RECV_CBUF_SIZE); + + const ssize_t len = recvmsg(pi->fd, msg, 0); + + if (len == -1 || len == 0) + /* receive error */ + return (-1); + + if (msg->msg_flags & MSG_TRUNC) { + /* truncated - drop */ + snmpd_stats.silentDrops++; + snmpd_stats.inTooLong++; + return (-1); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Apr 1 15:55:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 992902BF5D1; Wed, 1 Apr 2020 15:55:47 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48srQB4Lpwz4Nmr; Wed, 1 Apr 2020 15:55:46 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4973278FD; Wed, 1 Apr 2020 15:39:02 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 031Fd24u086401; Wed, 1 Apr 2020 15:39:02 GMT (envelope-from harti@FreeBSD.org) Received: (from harti@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031Fd2DJ086400; Wed, 1 Apr 2020 15:39:02 GMT (envelope-from harti@FreeBSD.org) Message-Id: <202004011539.031Fd2DJ086400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: harti set sender to harti@FreeBSD.org using -f From: Hartmut Brandt Date: Wed, 1 Apr 2020 15:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359514 - head/tools/test/bsnmp X-SVN-Group: head X-SVN-Commit-Author: harti X-SVN-Commit-Paths: head/tools/test/bsnmp X-SVN-Commit-Revision: 359514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 15:55:47 -0000 Author: harti Date: Wed Apr 1 15:39:02 2020 New Revision: 359514 URL: https://svnweb.freebsd.org/changeset/base/359514 Log: Add a makefile to build and run the tests for the bsnmp library. This is not automatically built or run but must explicitly be built with 'make' and run with 'make run'. Added: head/tools/test/bsnmp/ head/tools/test/bsnmp/Makefile (contents, props changed) Added: head/tools/test/bsnmp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/bsnmp/Makefile Wed Apr 1 15:39:02 2020 (r359514) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +CONTRIB=${SRCTOP}/contrib/bsnmp +.PATH: ${CONTRIB}/tests + +PROG_CXX=ctest +SRCS= main.cc asn1.cc snmp_parse_server.cc +CFLAGS += -I/${CONTRIB}/lib +CXXFLAGS+= -std=c++2a +LIBADD= bsnmp + +CFLAGS += -DBOGUS_CVE_2019_5610_FIX +MK_MAN= no + +.include + + +run: + ${.OBJDIR}/ctest From owner-svn-src-head@freebsd.org Wed Apr 1 16:03:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3F2B2BFAED; Wed, 1 Apr 2020 16:03:14 +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 48srZn0hsLz4RTh; Wed, 1 Apr 2020 16:03:13 +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 BA2DC27F22; Wed, 1 Apr 2020 16:03: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 031G36eQ004576; Wed, 1 Apr 2020 16:03:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031G36vV004575; Wed, 1 Apr 2020 16:03:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004011603.031G36vV004575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 16:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359519 - head/release/scripts X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/release/scripts X-SVN-Commit-Revision: 359519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 16:03:14 -0000 Author: emaste Date: Wed Apr 1 16:03:06 2020 New Revision: 359519 URL: https://svnweb.freebsd.org/changeset/base/359519 Log: pkgbase: remove more profile package leftovers As of r356797 we don't produce profile packages. r358549 removed one remnant of profile package support; clean up another now. Modified: head/release/scripts/mtree-to-plist.awk Modified: head/release/scripts/mtree-to-plist.awk ============================================================================== --- head/release/scripts/mtree-to-plist.awk Wed Apr 1 16:02:42 2020 (r359518) +++ head/release/scripts/mtree-to-plist.awk Wed Apr 1 16:03:06 2020 (r359519) @@ -41,7 +41,7 @@ gsub(/package=/, "", pkgname) } else if (a[i] == "config") { type="config" - } else if (a[i] == "development" || a[i] == "profile" || a[i] == "debug" || a[i] == "docs") { + } else if (a[i] == "development" || a[i] == "debug" || a[i] == "docs") { pkgend=a[i] } else { if (ext != "") From owner-svn-src-head@freebsd.org Wed Apr 1 16:04:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C52F2BFB29; Wed, 1 Apr 2020 16:04:32 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48srcD6ft7z4Ry4; Wed, 1 Apr 2020 16:04:28 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 031G4E4W065797; Wed, 1 Apr 2020 09:04:14 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 031G4ED6065796; Wed, 1 Apr 2020 09:04:14 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202004011604.031G4ED6065796@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359504 - head/lib/libc/locale In-Reply-To: <202004010901.03191aBV046275@repo.freebsd.org> To: Mateusz Piotrowski <0mp@freebsd.org> Date: Wed, 1 Apr 2020 09:04:14 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48srcD6ft7z4Ry4 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.998,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 16:04:32 -0000 > Author: 0mp (doc,ports committer) > Date: Wed Apr 1 09:01:35 2020 > New Revision: 359504 > URL: https://svnweb.freebsd.org/changeset/base/359504 > > Log: > Use proper mdoc(7) macros for literal text and do not use Tn > > Tn is deprecated and upsets linters. > I know I am way late to the game on this, but those of us who have actually produced phototype output using groff of the man pages in the past value the .Tn macro. I can not phantom what would of been so hard to implement that this had to be depricated by mdoc simply render the argument as standard characters as groff did in the past when the output device was of type ascii. > MFC after: 3 days > > Modified: > head/lib/libc/locale/big5.5 > > Modified: head/lib/libc/locale/big5.5 > ============================================================================== > --- head/lib/libc/locale/big5.5 Wed Apr 1 07:28:31 2020 (r359503) > +++ head/lib/libc/locale/big5.5 Wed Apr 1 09:01:35 2020 (r359504) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 12, 2019 > +.Dd April 1, 2020 > .Dt BIG5 5 > .Os > .Sh NAME > @@ -39,9 +39,8 @@ encoding for Traditional Chinese text > .Dq Big Five > is a standard for encoding Traditional Chinese text. > Each character is represented by either one or two bytes. > -Characters from the > -.Tn ASCII > -character set are represented as single bytes in the range 0x00 - 0x7F. > +Characters from the ASCII character set are represented as > +single bytes in the range 0x00 - 0x7F. > Traditional Chinese characters are represented by two bytes: > the first in the range 0xA1 - 0xFE, the second in the range > 0x40 - 0xFE. > @@ -51,7 +50,11 @@ the first in the range 0xA1 - 0xFE, the second in the > .Xr utf8 5 > .Sh BUGS > The range of the second byte overlaps some ASCII characters, including > -0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or > +0x5C > +.Pq Ql \e > +and 0x7C > +.Pq Ql | > +which may cause problems in program execution or > display. > Big5 is considered a legacy standard and only preserved for backward > compatibility reason. > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Apr 1 16:42:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62630278E84; Wed, 1 Apr 2020 16:42: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 48ssSV1jNFz3D6N; Wed, 1 Apr 2020 16:42: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 765C824C; Wed, 1 Apr 2020 16:21: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 031GLCbo012353; Wed, 1 Apr 2020 16:21:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031GLC6K012352; Wed, 1 Apr 2020 16:21:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004011621.031GLC6K012352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 1 Apr 2020 16:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359520 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 359520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 16:42:51 -0000 Author: kib Date: Wed Apr 1 16:21:11 2020 New Revision: 359520 URL: https://svnweb.freebsd.org/changeset/base/359520 Log: x86 tsc: fall back to CPUID if calibration results looks unbelievable. Teested and reviewed by: scottl Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D24247 Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Wed Apr 1 16:03:06 2020 (r359519) +++ head/sys/x86/x86/tsc.c Wed Apr 1 16:21:11 2020 (r359520) @@ -143,7 +143,7 @@ tsc_freq_vmware(void) * tsc_freq_intel(), when available. */ static bool -tsc_freq_cpuid(void) +tsc_freq_cpuid(uint64_t *res) { u_int regs[4]; @@ -151,7 +151,7 @@ tsc_freq_cpuid(void) return (false); do_cpuid(0x15, regs); if (regs[0] != 0 && regs[1] != 0 && regs[2] != 0) { - tsc_freq = (uint64_t)regs[2] * regs[1] / regs[0]; + *res = (uint64_t)regs[2] * regs[1] / regs[0]; return (true); } @@ -159,7 +159,7 @@ tsc_freq_cpuid(void) return (false); do_cpuid(0x16, regs); if (regs[0] != 0) { - tsc_freq = (uint64_t)regs[0] * 1000000; + *res = (uint64_t)regs[0] * 1000000; return (true); } @@ -228,7 +228,8 @@ tsc_freq_intel(void) static void probe_tsc_freq(void) { - uint64_t tsc1, tsc2; + uint64_t tmp_freq, tsc1, tsc2; + int no_cpuid_override; uint16_t bootflags; if (cpu_power_ecx & CPUID_PERF_STAT) { @@ -299,15 +300,15 @@ probe_tsc_freq(void) */ if (acpi_get_fadt_bootflags(&bootflags) && (bootflags & ACPI_FADT_LEGACY_DEVICES) == 0 && - tsc_freq_cpuid()) { + tsc_freq_cpuid(&tmp_freq)) { printf("Skipping TSC calibration since no legacy " "devices reported by FADT and CPUID works\n"); tsc_skip_calibration = 1; } } if (tsc_skip_calibration) { - if (tsc_freq_cpuid()) - ; + if (tsc_freq_cpuid(&tmp_freq)) + tsc_freq = tmp_freq; else if (cpu_vendor_id == CPU_VENDOR_INTEL) tsc_freq_intel(); } else { @@ -317,6 +318,32 @@ probe_tsc_freq(void) DELAY(1000000); tsc2 = rdtsc(); tsc_freq = tsc2 - tsc1; + + /* + * If the difference between calibrated frequency and + * the frequency reported by CPUID 0x15/0x16 leafs + * differ significantly, this probably means that + * calibration is bogus. It happens on machines + * without 8254 timer and with BIOS not properly + * reporting it in FADT boot flags. + */ + if (tsc_freq_cpuid(&tmp_freq) && qabs(tsc_freq - tmp_freq) > + uqmin(tsc_freq, tmp_freq)) { + no_cpuid_override = 0; + TUNABLE_INT_FETCH("machdep.disable_tsc_cpuid_override", + &no_cpuid_override); + if (!no_cpuid_override) { + if (bootverbose) { + printf( + "TSC clock: calibration freq %ju Hz, CPUID freq %ju Hz%s\n", + (uintmax_t)tsc_freq, + (uintmax_t)tmp_freq, + no_cpuid_override ? "" : + ", doing CPUID override"); + } + tsc_freq = tmp_freq; + } + } } if (bootverbose) printf("TSC clock: %ju Hz\n", (intmax_t)tsc_freq); From owner-svn-src-head@freebsd.org Wed Apr 1 16:42:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73142278EAF; Wed, 1 Apr 2020 16:42:58 +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 48ssSd2gNDz3D8V; Wed, 1 Apr 2020 16:42:56 +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 709BF482; Wed, 1 Apr 2020 16:22: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 031GMWwc016564; Wed, 1 Apr 2020 16:22:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031GMVQv016563; Wed, 1 Apr 2020 16:22:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202004011622.031GMVQv016563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 1 Apr 2020 16:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359521 - in head: share/man/man4 sys/dev/usb/misc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/usb/misc X-SVN-Commit-Revision: 359521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 16:42:58 -0000 Author: imp Date: Wed Apr 1 16:22:31 2020 New Revision: 359521 URL: https://svnweb.freebsd.org/changeset/base/359521 Log: Start the retirement process for ufm This driver hasn't been relevant in almost 15 years. It was for a product on the shelves for about 6 months in 2003/2004. I've not updated the driver since then, and have had nobody talk to me about it since maybe 2006 or 2007. It doesn't implement a standard interface, and can be better done with libusb. All the action has moved to webcamd for newer, more fully featured hardware. It makes no appearances in the nycbug dmesg archive. Relnotes: yes MFC After: 3 days Modified: head/share/man/man4/ufm.4 head/sys/dev/usb/misc/ufm.c Modified: head/share/man/man4/ufm.4 ============================================================================== --- head/share/man/man4/ufm.4 Wed Apr 1 16:21:11 2020 (r359520) +++ head/share/man/man4/ufm.4 Wed Apr 1 16:22:31 2020 (r359521) @@ -43,6 +43,12 @@ module at boot time, place the following line in .Bd -literal -offset indent ufm_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/usb/misc/ufm.c ============================================================================== --- head/sys/dev/usb/misc/ufm.c Wed Apr 1 16:21:11 2020 (r359520) +++ head/sys/dev/usb/misc/ufm.c Wed Apr 1 16:22:31 2020 (r359521) @@ -164,6 +164,7 @@ ufm_attach(device_t dev) if (error) { goto detach; } + gone_in_dev(dev, 13, "Driver no longer relevant"); return (0); /* success */ detach: From owner-svn-src-head@freebsd.org Wed Apr 1 16:46:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A54F627917D; Wed, 1 Apr 2020 16:46: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 48ssXF2RxKz3FM3; Wed, 1 Apr 2020 16:46:04 +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 B34F4846; Wed, 1 Apr 2020 16:38:45 +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 031GcjDd022825; Wed, 1 Apr 2020 16:38:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031GcjTX022824; Wed, 1 Apr 2020 16:38:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004011638.031GcjTX022824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 16:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359522 - head/include X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 359522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 16:46:07 -0000 Author: emaste Date: Wed Apr 1 16:38:45 2020 New Revision: 359522 URL: https://svnweb.freebsd.org/changeset/base/359522 Log: Remove redundant development tag from include Makefile Headers are placed in the -development package via install args in rules in share/mk/bsd.incs.mk; there is no need to explicitly modify TAGS in include/Makefile. (Mentioned in review D24139.) Discussed with: manu Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Apr 1 16:22:31 2020 (r359521) +++ head/include/Makefile Wed Apr 1 16:38:45 2020 (r359522) @@ -6,7 +6,6 @@ .include PACKAGE=runtime -TAGS+= development CLEANFILES= osreldate.h version SUBDIR= arpa protocols rpcsvc rpc xlocale SUBDIR_PARALLEL= From owner-svn-src-head@freebsd.org Wed Apr 1 17:03:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27D702799C7; Wed, 1 Apr 2020 17:03:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 48sswX1rkZz3McS; Wed, 1 Apr 2020 17:03:35 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pj1-x1030.google.com with SMTP id np9so250939pjb.4; Wed, 01 Apr 2020 10:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=ypco2wcsno6sAGwdub1rnhtajP7BrE1kOUAokvyYjPk=; b=YNL8Yye04M9E2j9HW60GVzfIkcjENoV8gF17VnDjHVhHjC5VDqU311hYGwBDjGtkMJ PwgSPzxXOgbSXCb9AGa+OJD+LgDwMm3Yfm6hN1q22E318obD73opIOBQAtIaOXGtZLy9 6/VsAN7KvVDzg25lSS2kbwsX5owsRSBd9GbU6od6Qzm9J8QE/uYDfmhYzfHYBusU9u8c 31OlKuHZMtmRrhnORA5VDYfTHwhoRS4BifQBbULiRcqBPkeDKtZJdAxXZJhMW6w3APd9 QnrI/kFREOUz5VdfPtjuS0u32El4GGEmqJf0T1z02uxWVcVMJ4ZcsFYZSau+sNzJ/eSW vg1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=ypco2wcsno6sAGwdub1rnhtajP7BrE1kOUAokvyYjPk=; b=DjkS0bol3TvoPSfcoCmCSlXTM64pAmOLmt3UnWU2hlb8h9Ygl3KfYrE3CxAalcOA8v iUjOv9FI9wJsjI8cA9mapMu0m4hKzw2+RtYXS26xenjdRignZjY0YgKaH2VSJMQ674RV ZNj9C368nk+I1WjkLtQbegPYqkzG9SmtsVILzQdVrTXs5LixoQZESJZzJgwq7KsL1+1r /Wl+M6JFgG/lFK+3H4udZbQ9/dC4zbr0abu2y45XQ3ofPReBgrOCRdnrkzy47AnxnGCP W4dxWhFpuR7s4M4/OoO1QrXD3UfZAwRMopre2BRjtBOhs1XTaP8/mt5PHF3qwFghAzzj PszA== X-Gm-Message-State: AGi0Publ3/HYkBg21EPy/tMeEQ+ZfX1X9lwpxgp2TZaaIQBAzLH8JCsj tuHKxNa16FzyLqeVxW67yXCBZ3Rat7M= X-Google-Smtp-Source: APiQypIDFw0Z3s2WBZikqirxWWKbVfG0hRESrirwESkMg6w5gF6bgRMDPgaQOAbp38NgKzc/FW3YhA== X-Received: by 2002:a17:902:bd01:: with SMTP id p1mr13062028pls.98.1585760610294; Wed, 01 Apr 2020 10:03:30 -0700 (PDT) Received: from [192.168.21.6] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a71sm1987689pfa.162.2020.04.01.10.03.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Apr 2020 10:03:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Enji Cooper Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r359514 - head/tools/test/bsnmp Date: Wed, 1 Apr 2020 10:03:26 -0700 Message-Id: References: <202004011539.031Fd2DJ086400@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <202004011539.031Fd2DJ086400@repo.freebsd.org> To: Hartmut Brandt X-Mailer: iPhone Mail (17D50) X-Rspamd-Queue-Id: 48sswX1rkZz3McS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=YNL8Yye0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::1030 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]; 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]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.00)[ipnet: 2607:f8b0::/32(-0.35), asn: 15169(-0.45), country: US(-0.05)]; RECEIVED_SPAMHAUS_PBL(0.00)[228.52.19.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; 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_FREEMAIL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 17:03:53 -0000 > On Apr 1, 2020, at 08:56, Hartmut Brandt wrote: >=20 > =EF=BB=BFAuthor: harti > Date: Wed Apr 1 15:39:02 2020 > New Revision: 359514 > URL: https://svnweb.freebsd.org/changeset/base/359514 >=20 > Log: > Add a makefile to build and run the tests for the bsnmp library. > This is not automatically built or run but must explicitly be built > with 'make' and run with 'make run'. Why was this integrated this way? -Enji= From owner-svn-src-head@freebsd.org Wed Apr 1 17:15:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9B2F27A195; Wed, 1 Apr 2020 17:15:44 +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 48stBR1zDDz3x5J; Wed, 1 Apr 2020 17:15:42 +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 F04CCEC9; Wed, 1 Apr 2020 17:09:21 +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 031H9LxA041912; Wed, 1 Apr 2020 17:09:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031H9LjL041911; Wed, 1 Apr 2020 17:09:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004011709.031H9LjL041911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2020 17:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359524 - head/sys/kgssapi/krb5 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kgssapi/krb5 X-SVN-Commit-Revision: 359524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 17:15:45 -0000 Author: jhb Date: Wed Apr 1 17:09:21 2020 New Revision: 359524 URL: https://svnweb.freebsd.org/changeset/base/359524 Log: Set crp_ilen for crypto requests. Assertions in crypto_dispatch() depend on this value being set to verify that payload and AAD regions are in bounds. Also, requests that use a single kernel buffer rely on this to know how long the buffer is for bus_dma, etc. Reported by: kp Modified: head/sys/kgssapi/krb5/kcrypto_aes.c Modified: head/sys/kgssapi/krb5/kcrypto_aes.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr 1 17:08:55 2020 (r359523) +++ head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr 1 17:09:21 2020 (r359524) @@ -158,6 +158,7 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buf crp->crp_buf_type = buftype; crp->crp_buf = buf; + crp->crp_ilen = skip + len; crp->crp_opaque = as; crp->crp_callback = aes_crypto_cb; @@ -329,6 +330,7 @@ aes_checksum(const struct krb5_key_state *ks, int usag crp->crp_flags = CRYPTO_F_CBIFSYNC; crp->crp_buf_type = CRYPTO_BUF_MBUF; crp->crp_mbuf = inout; + crp->crp_ilen = skip + inlen + 12; crp->crp_opaque = as; crp->crp_callback = aes_crypto_cb; From owner-svn-src-head@freebsd.org Wed Apr 1 17:35:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A85627ADFA; Wed, 1 Apr 2020 17:35:52 +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 48stdg2fB1z455w; Wed, 1 Apr 2020 17:35:51 +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 1EE6D272AC; Wed, 1 Apr 2020 15:08: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 031F8DAw067897; Wed, 1 Apr 2020 15:08:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031F8DlB067896; Wed, 1 Apr 2020 15:08:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004011508.031F8DlB067896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Apr 2020 15:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359507 - head/usr.sbin/autofs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/autofs X-SVN-Commit-Revision: 359507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 17:35:52 -0000 Author: trasz Date: Wed Apr 1 15:08:13 2020 New Revision: 359507 URL: https://svnweb.freebsd.org/changeset/base/359507 Log: Stop hardcoding WARNS in automount(8) et al. MFC after: 2 weeks Sponsored by: DARPA Modified: head/usr.sbin/autofs/Makefile Modified: head/usr.sbin/autofs/Makefile ============================================================================== --- head/usr.sbin/autofs/Makefile Wed Apr 1 13:18:01 2020 (r359506) +++ head/usr.sbin/autofs/Makefile Wed Apr 1 15:08:13 2020 (r359507) @@ -24,8 +24,6 @@ LIBADD= util MOUNT= ${SRCTOP}/sbin/mount CFLAGS+=-I${MOUNT} -WARNS= 6 - LINKS= ${BINDIR}/automountd ${BINDIR}/automount LINKS+= ${BINDIR}/automountd ${BINDIR}/autounmountd From owner-svn-src-head@freebsd.org Wed Apr 1 17:36:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF10127AE39; Wed, 1 Apr 2020 17:36:00 +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 48stdr0JdSz4585; Wed, 1 Apr 2020 17:36:00 +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 0930A272B2; Wed, 1 Apr 2020 15:08:53 +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 031F8ruX067974; Wed, 1 Apr 2020 15:08:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031F8rmZ067973; Wed, 1 Apr 2020 15:08:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004011508.031F8rmZ067973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Apr 2020 15:08:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359508 - head/usr.bin/iscsictl X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.bin/iscsictl X-SVN-Commit-Revision: 359508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 17:36:01 -0000 Author: trasz Date: Wed Apr 1 15:08:53 2020 New Revision: 359508 URL: https://svnweb.freebsd.org/changeset/base/359508 Log: Stop hardcoding WARNS in iscsictl(8). MFC after: 2 weeks Sponsored by: DARPA Modified: head/usr.bin/iscsictl/Makefile Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Wed Apr 1 15:08:13 2020 (r359507) +++ head/usr.bin/iscsictl/Makefile Wed Apr 1 15:08:53 2020 (r359508) @@ -13,7 +13,6 @@ YFLAGS+= -v LFLAGS+= -i CLEANFILES= y.tab.c y.tab.h y.output -WARNS= 6 NO_WMISSING_VARIABLE_DECLARATIONS= .include From owner-svn-src-head@freebsd.org Wed Apr 1 17:52:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 330D527B6E8; Wed, 1 Apr 2020 17:52:39 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailin.dlr.de (mailin.dlr.de [194.94.201.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailin.dlr.de", Issuer "DFN-Verein Global Issuing CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sv0n3XlLz4C86; Wed, 1 Apr 2020 17:52:24 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) IronPort-SDR: RCgKKxgj4WV1mmUVRJCpW6fzO78v5ll8x6HsGWl/6t6S3ckg7pm9+trmsUGJGU1+9Y8oO4R5Xw sKd/GuzPCrEQ== IronPort-PHdr: =?us-ascii?q?9a23=3AA0poEBEO3h2avVilU7Z2NJ1GYnF86YWxBRYc79?= =?us-ascii?q?8ds5kLTJ76p8u+bnLW6fgltlLVR4KTs6sC17OL9fi6EjVZvd7B6ClELMUQEU?= =?us-ascii?q?ddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4Ex?= =?us-ascii?q?T7MhdpdKyuQtaBx8u42Pqv9JLNfg5GmCSyYa9oLBWxsA7dqtQajZFtJ6osyh?= =?us-ascii?q?bFuGdEd/pZyW91OF6ekAv36sOs8JJ+6ShdtO8t+sFaXanmY6g0SKFTASg7PW?= =?us-ascii?q?wy+MDkuh7PQBeV6HABSGsWiB1IAwbE7BH+QJj8tzbxu/R+1ieHI8D4VKg4Vj?= =?us-ascii?q?u+4ahlTh/okzoHOCUi8G7LkMxwjblUrwynqhdi3oPbeoCVNP55fqPAYdMXQH?= =?us-ascii?q?dKU8hNWyBdBI63co0CBPcDM+lFtYnwv1sAowWjCwmwCu3hyTFIiX333aIm3O?= =?us-ascii?q?ouHhrL3BA7ENIMrHjYsMn5OaUUXOuozKfI1zLDb/ZO1Dr66obHaAohoe2JXb?= =?us-ascii?q?Jtbcrd01QiFxnfgVWWtIPlIyiY2fkJs2iB9eZvSPyghnchpgpsrDavwcIshZ?= =?us-ascii?q?PIhoIT0l3E+z95z5grKtKjU050fMSoEJxKtyGVMYZ9X8AsQ3lwtSon1rEKo4?= =?us-ascii?q?O3cSsFxZg92hLSZf+Kf5KW7h79TOqdPCt0iGh4dL+8iBu+61Wsx+P/W8Wuzl?= =?us-ascii?q?pHriVInsHCtn8T1BHf9s2KR/5+80i9wzmAzAXe5vxELE00lKfWLpAszqAsmZ?= =?us-ascii?q?cdtEnMADT5lFvwgaSLbEsr4PKo5P7iYrj+o5+cMJJ7hR/mP6Q1n8y/Hfw4Mg?= =?us-ascii?q?8TX2iH4ei81KPs/Un+QLhSgPM4lKfXvp/aK8oboaC3AAhb3Jw95xqhADmp0c?= =?us-ascii?q?oVkWMGLFJDZBKHlZLmN0vTL/D8F/ezmUmjnylzy/DHOL3uHInNI2DenLv9Z7?= =?us-ascii?q?px9k1RxQUpwdxC6Z9ZCasNLOztVkPpsdzXFB45Mwi6w+b9D9V905sTV2CVDa?= =?us-ascii?q?+DLKPStEKI5v41L+SRfo8aojD9JOU55/P1kHA5nUUdcbO00pQJcHy4BOhpI1?= =?us-ascii?q?2FYXrwhdcMCWcLsRA4TOP0lV2CSyRcaG2sUKM8/D42E42mDYLZSYCshLyNxj?= =?us-ascii?q?u0HppTZmpeEFCDDW/od5mYW/cLcC+SOdVhnSAdWbe9TI8h0BSutA7my7p7MO?= =?us-ascii?q?XU4DYYuInt1Nhv+eLciwo99SdpAMiH1GGNVW50lHsSRzAqxKB/vVB9ylCb3K?= =?us-ascii?q?hjnfxYE8Vf5+hTUggmLJLT1eh6C9TpVwLPZNeGVkipTc69AT4sVN4xxMUOY0?= =?us-ascii?q?llEdW4kh/DxzaqA6MSl7GTH5w07KTc02HqJ8Zn13nKzakhgEc8TcRSLmCmiL?= =?us-ascii?q?R/+BbNCIHSiEWWirymdaMG3C7Cpy+/yj/arUheXRNqWK/ITHk3aU7frNC/7U?= =?us-ascii?q?THGeyAE7MiZ19hwNSeL7ZWLPfzhFNKWN/vPM6Yb2/nyDT4PgqB2r7ZNNmiQG?= =?us-ascii?q?4axiiIUEU=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EcAACf04Re/xaKuApmGgEBAQEBAQE?= =?us-ascii?q?BAQMBAQEBEQEBAQICAQEBAYFqAgEBAQELAYMBE4ExCoQQkRaJbJFaCgEBAQE?= =?us-ascii?q?BAQEBAQcBIwwEAQEChEICF4JGNwYOAgMBDAEBBgEBAQEBBQQBAQKGPwyCOyJ?= =?us-ascii?q?2fgEBAQEBAQEBAQEBAQEBAQEBAQEWAg1UaAEBAQECASMRRQUHBAIBCBEDAQE?= =?us-ascii?q?BAQICIwMCAgIfERQBCAgCBA4FCIMfgksDDi+uJHWBMoQ1AQsBg20NghoGgQ4?= =?us-ascii?q?qAY5KhCU+gQ6BEIJHNoJFgl4EkQCfOkYHgUmIX4p6hDYljyyMRoRVkz4xgjq?= =?us-ascii?q?QNwIEAgQFAhWBaIF8cYM7UBgNlySFQXSOJYEQAQE?= X-IronPort-AV: E=Sophos;i="5.72,332,1580770800"; d="scan'208";a="34527239" From: To: CC: , , Subject: RE: svn commit: r359514 - head/tools/test/bsnmp Thread-Topic: svn commit: r359514 - head/tools/test/bsnmp Thread-Index: AQHWCD4QjRtr/94lhUupV0/VLVvSv6hkXOcAgAAt5rA= Date: Wed, 1 Apr 2020 17:50:59 +0000 Deferred-Delivery: Wed, 1 Apr 2020 17:50:00 +0000 Message-ID: References: <202004011539.031Fd2DJ086400@repo.freebsd.org> In-Reply-To: Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tm-snts-smtp: 7CF2D9E5AF9E9DDC3567E54D2E9F242D20C0A9F00C68E1383B4A3036100FB0632000:8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Rspamd-Queue-Id: 48sv0n3XlLz4C86 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of Hartmut.Brandt@dlr.de designates 194.94.201.12 as permitted sender) smtp.mailfrom=Hartmut.Brandt@dlr.de X-Spamd-Result: default: False [-4.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dlr.de]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[12.201.94.194.list.dnswl.org : 127.0.8.2]; MIME_BASE64_TEXT(0.10)[]; FROM_NO_DN(0.00)[]; IP_SCORE(-2.14)[ip: (-8.98), ipnet: 194.94.0.0/15(-1.77), asn: 680(0.06), country: DE(-0.02)]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:194.94.0.0/15, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 17:52:39 -0000 VGhlIG90aGVyIHRvb2xzIGluIHRvb2xzL3Rlc3QgYWxzbyBzZWVtIHRvIGJlIGJ1aWx0IGluIGFk LWhvYyB3YXlzLg0KDQpoYXJ0aQ0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTog RW5qaSBDb29wZXIgW21haWx0bzp5YW5ldXJhYmV5YUBnbWFpbC5jb21dIA0KU2VudDogV2VkbmVz ZGF5LCBBcHJpbCAxLCAyMDIwIDc6MDMgUE0NClRvOiBIYXJ0bXV0IEJyYW5kdA0KQ2M6IHNyYy1j b21taXR0ZXJzQGZyZWVic2Qub3JnOyBzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZzsgc3ZuLXNyYy1o ZWFkQGZyZWVic2Qub3JnDQpTdWJqZWN0OiBSZTogc3ZuIGNvbW1pdDogcjM1OTUxNCAtIGhlYWQv dG9vbHMvdGVzdC9ic25tcA0KDQoNCj4gT24gQXByIDEsIDIwMjAsIGF0IDA4OjU2LCBIYXJ0bXV0 IEJyYW5kdCA8aGFydGlAZnJlZWJzZC5vcmc+IHdyb3RlOg0KPiANCj4g77u/QXV0aG9yOiBoYXJ0 aQ0KPiBEYXRlOiBXZWQgQXByICAxIDE1OjM5OjAyIDIwMjANCj4gTmV3IFJldmlzaW9uOiAzNTk1 MTQNCj4gVVJMOiBodHRwczovL3N2bndlYi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zNTk1 MTQNCj4gDQo+IExvZzoNCj4gIEFkZCBhIG1ha2VmaWxlIHRvIGJ1aWxkIGFuZCBydW4gdGhlIHRl c3RzIGZvciB0aGUgYnNubXAgbGlicmFyeS4NCj4gIFRoaXMgaXMgbm90IGF1dG9tYXRpY2FsbHkg YnVpbHQgb3IgcnVuIGJ1dCBtdXN0IGV4cGxpY2l0bHkgYmUgYnVpbHQNCj4gIHdpdGggJ21ha2Un IGFuZCBydW4gd2l0aCAnbWFrZSBydW4nLg0KDQpXaHkgd2FzIHRoaXMgaW50ZWdyYXRlZCB0aGlz IHdheT8NCi1FbmppDQo= From owner-svn-src-head@freebsd.org Wed Apr 1 19:22:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18F9427E7F2; Wed, 1 Apr 2020 19:22:26 +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 48sx0b61Snz3JBC; Wed, 1 Apr 2020 19:22:23 +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 9A3702CEB; Wed, 1 Apr 2020 19:22:15 +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 031JMFq0023270; Wed, 1 Apr 2020 19:22:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031JM9MW023237; Wed, 1 Apr 2020 19:22:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004011922.031JM9MW023237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Apr 2020 19:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359530 - in head: . lib/libsysdecode sys/amd64/amd64 sys/amd64/ia32 sys/arm/arm sys/arm64/arm64 sys/compat/ia32 sys/conf sys/fs/procfs sys/i386/i386 sys/kern sys/mips/mips sys/modules/... X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: . lib/libsysdecode sys/amd64/amd64 sys/amd64/ia32 sys/arm/arm sys/arm64/arm64 sys/compat/ia32 sys/conf sys/fs/procfs sys/i386/i386 sys/kern sys/mips/mips sys/modules/procfs sys/powerpc/powerp... X-SVN-Commit-Revision: 359530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 19:22:26 -0000 Author: jhb Date: Wed Apr 1 19:22:09 2020 New Revision: 359530 URL: https://svnweb.freebsd.org/changeset/base/359530 Log: Retire procfs-based process debugging. Modern debuggers and process tracers use ptrace() rather than procfs for debugging. ptrace() has a supserset of functionality available via procfs and new debugging features are only added to ptrace(). While the two debugging services share some fields in struct proc, they each use dedicated fields and separate code. This results in extra complexity to support a feature that hasn't been enabled in the default install for several years. PR: 244939 (exp-run) Reviewed by: kib, mjg (earlier version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23837 Deleted: head/sys/fs/procfs/procfs_ioctl.c head/sys/sys/pioctl.h Modified: head/ObsoleteFiles.inc head/lib/libsysdecode/Makefile head/sys/amd64/amd64/trap.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/ia32/ia32_reg.c head/sys/amd64/ia32/ia32_signal.c head/sys/amd64/ia32/ia32_syscall.c head/sys/arm/arm/syscall.c head/sys/arm64/arm64/trap.c head/sys/compat/ia32/ia32_sysvec.c head/sys/conf/files head/sys/fs/procfs/procfs.c head/sys/fs/procfs/procfs.h head/sys/i386/i386/trap.c head/sys/i386/i386/vm_machdep.c head/sys/kern/imgact_elf.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_prot.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/sys_process.c head/sys/mips/mips/trap.c head/sys/modules/procfs/Makefile head/sys/powerpc/powerpc/trap.c head/sys/riscv/riscv/trap.c head/sys/sys/param.h head/sys/sys/proc.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Apr 1 19:09:47 2020 (r359529) +++ head/ObsoleteFiles.inc Wed Apr 1 19:22:09 2020 (r359530) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20200401: Remove procfs-based process debugging +OLD_FILES+=usr/include/sys/pioctl.h + # 20200330: GDB_LIBEXEC option retired (always true) OLD_FILES+=usr/bin/gdb OLD_FILES+=usr/bin/gdbserver Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Wed Apr 1 19:09:47 2020 (r359529) +++ head/lib/libsysdecode/Makefile Wed Apr 1 19:22:09 2020 (r359530) @@ -119,11 +119,6 @@ CFLAGS+=-DPF # Workaround duplicate declarations in CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls -# Ignore deprecation warning in -CFLAGS.clang.ioctl.c+= -Wno-\#warnings -CFLAGS.gcc.ioctl.c+= -Wno-cpp - -CFLAGS.clang+= ${CFLAGS.clang.${.IMPSRC}} CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/amd64/amd64/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/amd64/amd64/vm_machdep.c Wed Apr 1 19:22:09 2020 (r359530) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -198,15 +197,11 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t td2->td_frame->tf_rdx = 1; /* - * If the parent process has the trap bit set (i.e. a debugger had - * single stepped the process to the system call), we need to clear - * the trap flag from the new frame unless the debugger had set PF_FORK - * on the parent. Otherwise, the child will receive a (likely - * unexpected) SIGTRAP when it executes the first instruction after - * returning to userland. + * If the parent process has the trap bit set (i.e. a debugger + * had single stepped the process to the system call), we need + * to clear the trap flag from the new frame. */ - if ((p1->p_pfsflags & PF_FORK) == 0) - td2->td_frame->tf_rflags &= ~PSL_T; + td2->td_frame->tf_rflags &= ~PSL_T; /* * Set registers for trampoline to user mode. Leave space for the Modified: head/sys/amd64/ia32/ia32_reg.c ============================================================================== --- head/sys/amd64/ia32/ia32_reg.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/amd64/ia32/ia32_reg.c Wed Apr 1 19:22:09 2020 (r359530) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/amd64/ia32/ia32_signal.c Wed Apr 1 19:22:09 2020 (r359530) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- head/sys/amd64/ia32/ia32_syscall.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/amd64/ia32/ia32_syscall.c Wed Apr 1 19:22:09 2020 (r359530) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/arm/syscall.c ============================================================================== --- head/sys/arm/arm/syscall.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/arm/arm/syscall.c Wed Apr 1 19:22:09 2020 (r359530) @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/arm64/arm64/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- head/sys/compat/ia32/ia32_sysvec.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/compat/ia32/ia32_sysvec.c Wed Apr 1 19:22:09 2020 (r359530) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/conf/files Wed Apr 1 19:22:09 2020 (r359530) @@ -3517,7 +3517,6 @@ fs/nullfs/null_vnops.c optional nullfs fs/procfs/procfs.c optional procfs fs/procfs/procfs_dbregs.c optional procfs fs/procfs/procfs_fpregs.c optional procfs -fs/procfs/procfs_ioctl.c optional procfs fs/procfs/procfs_map.c optional procfs fs/procfs/procfs_mem.c optional procfs fs/procfs/procfs_note.c optional procfs Modified: head/sys/fs/procfs/procfs.c ============================================================================== --- head/sys/fs/procfs/procfs.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/fs/procfs/procfs.c Wed Apr 1 19:22:09 2020 (r359530) @@ -163,7 +163,6 @@ procfs_init(PFS_INIT_ARGS) { struct pfs_node *root; struct pfs_node *dir; - struct pfs_node *node; root = pi->pi_root; @@ -182,10 +181,8 @@ procfs_init(PFS_INIT_ARGS) procfs_attr_rw, procfs_candebug, NULL, PFS_RDWR | PFS_RAW); pfs_create_file(dir, "map", procfs_doprocmap, NULL, procfs_notsystem, NULL, PFS_RD); - node = pfs_create_file(dir, "mem", procfs_doprocmem, + pfs_create_file(dir, "mem", procfs_doprocmem, procfs_attr_rw, procfs_candebug, NULL, PFS_RDWR | PFS_RAW); - node->pn_ioctl = procfs_ioctl; - node->pn_close = procfs_close; pfs_create_file(dir, "note", procfs_doprocnote, procfs_attr_w, procfs_candebug, NULL, PFS_WR); pfs_create_file(dir, "notepg", procfs_doprocnote, Modified: head/sys/fs/procfs/procfs.h ============================================================================== --- head/sys/fs/procfs/procfs.h Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/fs/procfs/procfs.h Wed Apr 1 19:22:09 2020 (r359530) @@ -53,8 +53,6 @@ int procfs_doprocregs(PFS_FILL_ARGS); int procfs_doprocrlimit(PFS_FILL_ARGS); int procfs_doprocstatus(PFS_FILL_ARGS); int procfs_doproctype(PFS_FILL_ARGS); -int procfs_ioctl(PFS_IOCTL_ARGS); -int procfs_close(PFS_CLOSE_ARGS); /* Attributes */ int procfs_attr_w(PFS_ATTR_ARGS); Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/i386/i386/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/i386/i386/vm_machdep.c Wed Apr 1 19:22:09 2020 (r359530) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -208,15 +207,11 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t td2->td_frame->tf_edx = 1; /* - * If the parent process has the trap bit set (i.e. a debugger had - * single stepped the process to the system call), we need to clear - * the trap flag from the new frame unless the debugger had set PF_FORK - * on the parent. Otherwise, the child will receive a (likely - * unexpected) SIGTRAP when it executes the first instruction after - * returning to userland. + * If the parent process has the trap bit set (i.e. a debugger + * had single stepped the process to the system call), we need + * to clear the trap flag from the new frame. */ - if ((p1->p_pfsflags & PF_FORK) == 0) - td2->td_frame->tf_eflags &= ~PSL_T; + td2->td_frame->tf_eflags &= ~PSL_T; /* * Set registers for trampoline to user mode. Leave space for the Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/imgact_elf.c Wed Apr 1 19:22:09 2020 (r359530) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_exec.c Wed Apr 1 19:22:09 2020 (r359530) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -912,12 +911,6 @@ exec_fail_dealloc: td->td_dbgflags |= TDB_EXEC; PROC_UNLOCK(p); } - - /* - * Stop the process here if its stop event mask has - * the S_EXEC bit set. - */ - STOPEVENT(p, S_EXEC, 0); } else { exec_fail: /* we're done here, clear P_INEXEC */ Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_exit.c Wed Apr 1 19:22:09 2020 (r359530) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -281,15 +280,6 @@ exit1(struct thread *td, int rval, int signo) p->p_xsig = signo; /* - * Wakeup anyone in procfs' PIOCWAIT. They should have a hold - * on our vmspace, so we should block below until they have - * released their reference to us. Note that if they have - * requested S_EXIT stops we will block here until they ack - * via PIOCCONT. - */ - _STOPEVENT(p, S_EXIT, 0); - - /* * Ignore any pending request to stop due to a stop signal. * Once P_WEXIT is set, future requests will be ignored as * well. @@ -297,13 +287,8 @@ exit1(struct thread *td, int rval, int signo) p->p_flag &= ~P_STOPPED_SIG; KASSERT(!P_SHOULDSTOP(p), ("exiting process is stopped")); - /* - * Note that we are exiting and do another wakeup of anyone in - * PIOCWAIT in case they aren't listening for S_EXIT stops or - * decided to wait again after we told them we are exiting. - */ + /* Note that we are exiting. */ p->p_flag |= P_WEXIT; - wakeup(&p->p_stype); /* * Wait for any processes that have a hold on our vmspace to Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_fork.c Wed Apr 1 19:22:09 2020 (r359530) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -583,15 +582,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0); /* - * If PF_FORK is set, the child process inherits the - * procfs ioctl flags from its parent. - */ - if (p1->p_pfsflags & PF_FORK) { - p2->p_stops = p1->p_stops; - p2->p_pfsflags = p1->p_pfsflags; - } - - /* * This begins the section where we must prevent the parent * from being swapped. */ @@ -1111,7 +1101,6 @@ fork_return(struct thread *td, struct trapframe *frame */ PROC_LOCK(p); td->td_dbgflags |= TDB_SCX; - _STOPEVENT(p, S_SCX, td->td_sa.code); if ((p->p_ptevents & PTRACE_SCX) != 0 || (td->td_dbgflags & TDB_BORN) != 0) ptracestop(td, SIGTRAP, NULL); Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_prot.c Wed Apr 1 19:22:09 2020 (r359530) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -2192,8 +2191,6 @@ setsugid(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_SUGID; - if (!(p->p_pfsflags & PF_ISUGID)) - p->p_stops = 0; } /*- Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_sig.c Wed Apr 1 19:22:09 2020 (r359530) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -2256,14 +2255,6 @@ tdsendsignal(struct proc *p, struct thread *td, int si !((prop & SIGPROP_CONT) && (p->p_flag & P_STOPPED_SIG))) return (ret); - /* SIGKILL: Remove procfs STOPEVENTs. */ - if (sig == SIGKILL) { - /* from procfs_ioctl.c: PIOCBIC */ - p->p_stops = 0; - /* from procfs_ioctl.c: PIOCCONT */ - p->p_step = 0; - wakeup(&p->p_step); - } wakeup_swapper = 0; /* @@ -2853,15 +2844,13 @@ issignal(struct thread *td) struct sigqueue *queue; sigset_t sigpending; ksiginfo_t ksi; - int prop, sig, traced; + int prop, sig; p = td->td_proc; ps = p->p_sigacts; mtx_assert(&ps->ps_mtx, MA_OWNED); PROC_LOCK_ASSERT(p, MA_OWNED); for (;;) { - traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG); - sigpending = td->td_sigqueue.sq_signals; SIGSETOR(sigpending, p->p_sigqueue.sq_signals); SIGSETNAND(sigpending, td->td_sigmask); @@ -2904,17 +2893,12 @@ issignal(struct thread *td) sig = sig_ffs(&sigpending); } - if (p->p_stops & S_SIG) { - mtx_unlock(&ps->ps_mtx); - stopevent(p, S_SIG, sig); - mtx_lock(&ps->ps_mtx); - } - /* * We should see pending but ignored signals * only if P_TRACED was on when they were posted. */ - if (SIGISMEMBER(ps->ps_sigignore, sig) && (traced == 0)) { + if (SIGISMEMBER(ps->ps_sigignore, sig) && + (p->p_flag & P_TRACED) == 0) { sigqueue_delete(&td->td_sigqueue, sig); sigqueue_delete(&p->p_sigqueue, sig); continue; @@ -3114,11 +3098,6 @@ postsig(int sig) ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ? &td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code); #endif - if ((p->p_stops & S_SIG) != 0) { - mtx_unlock(&ps->ps_mtx); - stopevent(p, S_SIG, sig); - mtx_lock(&ps->ps_mtx); - } if (action == SIG_DFL) { /* @@ -3665,7 +3644,6 @@ coredump(struct thread *td) PROC_LOCK_ASSERT(p, MA_OWNED); MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); - _STOPEVENT(p, S_CORE, 0); if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0) || (p->p_flag2 & P2_NOTRACE) != 0) { Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/kern_thread.c Wed Apr 1 19:22:09 2020 (r359530) @@ -90,11 +90,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0xb0, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x3c8, +_Static_assert(offsetof(struct proc, p_filemon) == 0x3c0, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3d8, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -110,11 +110,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0x68, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x278, +_Static_assert(offsetof(struct proc, p_filemon) == 0x26c, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x28c, +_Static_assert(offsetof(struct proc, p_comm) == 0x280, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x318, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, "struct proc KBI p_emuldata"); #endif Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/subr_syscall.c Wed Apr 1 19:22:09 2020 (r359530) @@ -90,7 +90,6 @@ syscallenter(struct thread *td) goto retval; } - STOPEVENT(p, S_SCE, sa->narg); if (__predict_false((p->p_flag & P_TRACED) != 0)) { PROC_LOCK(p); if (p->p_ptevents & PTRACE_SCE) @@ -223,12 +222,6 @@ syscallret(struct thread *td) td->td_dbgflags |= TDB_SCX; PROC_UNLOCK(p); } - /* - * 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 (__predict_false(traced || (td->td_dbgflags & (TDB_EXEC | TDB_FORK)) != 0)) { PROC_LOCK(p); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/subr_trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/kern/sys_process.c Wed Apr 1 19:22:09 2020 (r359530) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1524,26 +1523,3 @@ fail: } #undef PROC_READ #undef PROC_WRITE - -/* - * Stop a process because of a debugging event; - * stay stopped until p->p_step is cleared - * (cleared by PIOCCONT in procfs). - */ -void -stopevent(struct proc *p, unsigned int event, unsigned int val) -{ - - PROC_LOCK_ASSERT(p, MA_OWNED); - p->p_step = 1; - CTR3(KTR_PTRACE, "stopevent: pid %d event %u val %u", p->p_pid, event, - val); - do { - if (event != S_EXIT) - p->p_xsig = val; - p->p_xthread = NULL; - p->p_stype = event; /* Which event caused the stop? */ - wakeup(&p->p_stype); /* Wake up any PIOCWAIT'ing procs */ - msleep(&p->p_step, &p->p_mtx, PWAIT, "stopevent", 0); - } while (p->p_step); -} Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/mips/mips/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/modules/procfs/Makefile ============================================================================== --- head/sys/modules/procfs/Makefile Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/modules/procfs/Makefile Wed Apr 1 19:22:09 2020 (r359530) @@ -7,7 +7,6 @@ SRCS= SRCS+= vnode_if.h SRCS+= procfs_dbregs.c SRCS+= procfs_fpregs.c -SRCS+= procfs_ioctl.c SRCS+= procfs_map.c SRCS+= procfs_mem.c SRCS+= procfs_note.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/powerpc/powerpc/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/riscv/riscv/trap.c Wed Apr 1 19:22:09 2020 (r359530) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/sys/param.h Wed Apr 1 19:22:09 2020 (r359530) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300087 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300088 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Apr 1 19:09:47 2020 (r359529) +++ head/sys/sys/proc.h Wed Apr 1 19:22:09 2020 (r359530) @@ -644,10 +644,6 @@ struct proc { struct sigiolst p_sigiolst; /* (c) List of sigio sources. */ int p_sigparent; /* (c) Signal to parent on exit. */ int p_sig; /* (n) For core dump/debugger XXX. */ - u_int p_stops; /* (c) Stop event bitmask. */ - u_int p_stype; /* (c) Stop event type. */ - char p_step; /* (c) Process is stopped. */ - u_char p_pfsflags; /* (c) Procfs flags. */ u_int p_ptevents; /* (c + e) ptrace() event mask. */ struct nlminfo *p_nlminfo; /* (?) Only used by/for lockd. */ struct kaioinfo *p_aioinfo; /* (y) ASYNC I/O info. */ @@ -863,23 +859,6 @@ extern pid_t pid_max; #define SESS_LEADER(p) ((p)->p_session->s_leader == (p)) - -#define STOPEVENT(p, e, v) do { \ - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, \ - "checking stopevent %d", (e)); \ - if ((p)->p_stops & (e)) { \ - PROC_LOCK(p); \ - stopevent((p), (e), (v)); \ - PROC_UNLOCK(p); \ - } \ -} while (0) -#define _STOPEVENT(p, e, v) do { \ - PROC_LOCK_ASSERT(p, MA_OWNED); \ - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, \ - "checking stopevent %d", (e)); \ - if ((p)->p_stops & (e)) \ - stopevent((p), (e), (v)); \ -} while (0) /* Lock and unlock a process. */ #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) From owner-svn-src-head@freebsd.org Wed Apr 1 19:55:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B8A527FD1D; Wed, 1 Apr 2020 19:55:53 +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 48sxlD3JHcz41Sf; Wed, 1 Apr 2020 19:55:52 +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 91C75272B4; Wed, 1 Apr 2020 15:09:53 +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 031F9rT3068066; Wed, 1 Apr 2020 15:09:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031F9rEv068065; Wed, 1 Apr 2020 15:09:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004011509.031F9rEv068065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Apr 2020 15:09:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359509 - head/usr.sbin/iscsid X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/iscsid X-SVN-Commit-Revision: 359509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 19:55:53 -0000 Author: trasz Date: Wed Apr 1 15:09:52 2020 New Revision: 359509 URL: https://svnweb.freebsd.org/changeset/base/359509 Log: Stop hardcoding WARNS in iscsid(8). MFC after: 2 weeks Sponsored by: DARPA Modified: head/usr.sbin/iscsid/Makefile Modified: head/usr.sbin/iscsid/Makefile ============================================================================== --- head/usr.sbin/iscsid/Makefile Wed Apr 1 15:08:53 2020 (r359508) +++ head/usr.sbin/iscsid/Makefile Wed Apr 1 15:09:52 2020 (r359509) @@ -11,6 +11,4 @@ MAN= iscsid.8 LIBADD= md util -WARNS= 6 - .include From owner-svn-src-head@freebsd.org Wed Apr 1 19:55:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBC7427FD2F; Wed, 1 Apr 2020 19:55:54 +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 48sxlD6HRgz41Sr; Wed, 1 Apr 2020 19:55:52 +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 EA1E9272B9; Wed, 1 Apr 2020 15:10:26 +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 031FAQkE068172; Wed, 1 Apr 2020 15:10:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031FAQuP068171; Wed, 1 Apr 2020 15:10:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004011510.031FAQuP068171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Apr 2020 15:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359510 - head/usr.sbin/uefisign X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/uefisign X-SVN-Commit-Revision: 359510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 19:55:55 -0000 Author: trasz Date: Wed Apr 1 15:10:26 2020 New Revision: 359510 URL: https://svnweb.freebsd.org/changeset/base/359510 Log: Stop hardcoding WARNS in uefisign(8). MFC after: 2 weeks Sponsored by: DARPA Modified: head/usr.sbin/uefisign/Makefile Modified: head/usr.sbin/uefisign/Makefile ============================================================================== --- head/usr.sbin/uefisign/Makefile Wed Apr 1 15:09:52 2020 (r359509) +++ head/usr.sbin/uefisign/Makefile Wed Apr 1 15:10:26 2020 (r359510) @@ -6,6 +6,4 @@ MAN= uefisign.8 LIBADD= crypto -WARNS= 6 - .include From owner-svn-src-head@freebsd.org Wed Apr 1 22:51:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B7C52A6082; Wed, 1 Apr 2020 22:51:19 +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 48t1df0nxPz49xF; Wed, 1 Apr 2020 22:51:18 +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 B53435BA7; Wed, 1 Apr 2020 22:50:42 +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 031MogO0051826; Wed, 1 Apr 2020 22:50:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031MofrV051820; Wed, 1 Apr 2020 22:50:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202004012250.031MofrV051820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 1 Apr 2020 22:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359547 - in head/lib: libc/stdio libc/stdlib msun/man X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/lib: libc/stdio libc/stdlib msun/man X-SVN-Commit-Revision: 359547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 22:51:19 -0000 Author: imp Date: Wed Apr 1 22:50:41 2020 New Revision: 359547 URL: https://svnweb.freebsd.org/changeset/base/359547 Log: Note some functions that appeared in First Edition Unix These functions first appeared in the First Edition of Unix (or earlier in the pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too fragmented at this point to extend history that far back. Modified: head/lib/libc/stdio/getwc.3 head/lib/libc/stdlib/atof.3 head/lib/libc/stdlib/atoi.3 head/lib/msun/man/cos.3 head/lib/msun/man/exp.3 head/lib/msun/man/sin.3 Modified: head/lib/libc/stdio/getwc.3 ============================================================================== --- head/lib/libc/stdio/getwc.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/libc/stdio/getwc.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -112,3 +112,10 @@ and functions conform to .St -isoC-99 . +.Sh HISTORY +A version of the +.Fn getc +and +.Fn getw +functions appeared in +.At v1 . Modified: head/lib/libc/stdlib/atof.3 ============================================================================== --- head/lib/libc/stdlib/atof.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/libc/stdlib/atof.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -32,7 +32,7 @@ .\" @(#)atof.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd April 1, 2020 .Dt ATOF 3 .Os .Sh NAME @@ -93,3 +93,8 @@ function conforms to .St -isoC , and .St -isoC-99 . +.Sh HISTORY +The +.Fn atof +function appeared in +.At v1 . Modified: head/lib/libc/stdlib/atoi.3 ============================================================================== --- head/lib/libc/stdlib/atoi.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/libc/stdlib/atoi.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -32,7 +32,7 @@ .\" @(#)atoi.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 13, 2018 +.Dd April 1, 2020 .Dt ATOI 3 .Os .Sh NAME @@ -85,3 +85,8 @@ function conforms to .St -isoC , and .St -isoC-99 . +.Sh HISTORY +The +.Fn atoi +function appeared in +.At v1 . Modified: head/lib/msun/man/cos.3 ============================================================================== --- head/lib/msun/man/cos.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/msun/man/cos.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -28,7 +28,7 @@ .\" from: @(#)cos.3 5.1 (Berkeley) 5/2/91 .\" $FreeBSD$ .\" -.Dd January 24, 2008 +.Dd April 1, 2020 .Dt COS 3 .Os .Sh NAME @@ -81,3 +81,8 @@ functions return the cosine value. .Sh STANDARDS These functions conform to .St -isoC-99 . +.Sh HISTORY +The +.Fn sin +function first appeared in +.At v1 . Modified: head/lib/msun/man/exp.3 ============================================================================== --- head/lib/msun/man/exp.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/msun/man/exp.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -28,7 +28,7 @@ .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD$ .\" -.Dd December 8, 2017 +.Dd April 1, 2020 .Dt EXP 3 .Os .Sh NAME @@ -190,3 +190,8 @@ and infinite x, i.e., independently of x. .Sh STANDARDS These functions conform to .St -isoC-99 . +.Sh HISTORY +The +.Fn exp +function appeared in +.At v1 . Modified: head/lib/msun/man/sin.3 ============================================================================== --- head/lib/msun/man/sin.3 Wed Apr 1 22:49:47 2020 (r359546) +++ head/lib/msun/man/sin.3 Wed Apr 1 22:50:41 2020 (r359547) @@ -29,7 +29,7 @@ .\" from: @(#)sin.3 6.7 (Berkeley) 4/19/91 .\" $FreeBSD$ .\" -.Dd January 24, 2008 +.Dd April 1, 2020 .Dt SIN 3 .Os .Sh NAME @@ -80,3 +80,8 @@ functions return the sine value. .Sh STANDARDS These functions conform to .St -isoC-99 . +.Sh HISTORY +The +.Fn sin +function first appeared in +.At v1 . From owner-svn-src-head@freebsd.org Wed Apr 1 23:36:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 673962A771D; Wed, 1 Apr 2020 23:36:26 +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 48t2dj2V2Jz4Sk5; Wed, 1 Apr 2020 23:36:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A18A656D; Wed, 1 Apr 2020 23:36:17 +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 031NaGbu081471; Wed, 1 Apr 2020 23:36:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 031NaGuF081470; Wed, 1 Apr 2020 23:36:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004012336.031NaGuF081470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Apr 2020 23:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359550 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 23:36:26 -0000 Author: emaste Date: Wed Apr 1 23:36:16 2020 New Revision: 359550 URL: https://svnweb.freebsd.org/changeset/base/359550 Log: elf.5: minor update to FreeBSD ELF note descriptions Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Wed Apr 1 22:51:30 2020 (r359549) +++ head/share/man/man5/elf.5 Wed Apr 1 23:36:16 2020 (r359550) @@ -1308,10 +1308,11 @@ ABI version .Po i.e., .Dv __FreeBSD_version Pc . .It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 -Indicates that crt does not call init. +Indicates that the C Runtime (crt) does not call init. .Va desc is ignored. .It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 +Contains the MACHINE_ARCH that the executable was built for. .It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 Contains a bitmask of mitigations and features to enable: .Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" From owner-svn-src-head@freebsd.org Thu Apr 2 00:41:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 189FC2AA3D4; Thu, 2 Apr 2020 00:41:26 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48t44h3Mc1z3PJB; Thu, 2 Apr 2020 00:41:24 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6607B720C; Thu, 2 Apr 2020 00:33:16 +0000 (UTC) (envelope-from nick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0320XGGd017740; Thu, 2 Apr 2020 00:33:16 GMT (envelope-from nick@FreeBSD.org) Received: (from nick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0320XFsk017738; Thu, 2 Apr 2020 00:33:15 GMT (envelope-from nick@FreeBSD.org) Message-Id: <202004020033.0320XFsk017738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nick set sender to nick@FreeBSD.org using -f From: "Nick O'Brien" Date: Thu, 2 Apr 2020 00:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359555 - head/sys/riscv/sifive X-SVN-Group: head X-SVN-Commit-Author: nick X-SVN-Commit-Paths: head/sys/riscv/sifive X-SVN-Commit-Revision: 359555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 00:41:26 -0000 Author: nick Date: Thu Apr 2 00:33:15 2020 New Revision: 359555 URL: https://svnweb.freebsd.org/changeset/base/359555 Log: riscv/sifive: add FE310 Always-on driver This driver supports SiFive's FE310 Always-on (AON) peripheral's Real-time clock (RTC) and Watchdog timer (WDT). AON has other functionality that this driver could support such as the power management unit (PMU) but that functionality hasn't been implemented. Reviewed by: philip (mentor), kp (mentor) Approved by: philip (mentor) Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D24170 Added: head/sys/riscv/sifive/fe310_aon.c (contents, props changed) Modified: head/sys/riscv/sifive/files.sifive Added: head/sys/riscv/sifive/fe310_aon.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/riscv/sifive/fe310_aon.c Thu Apr 2 00:33:15 2020 (r359555) @@ -0,0 +1,318 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Axiado Corporation + * All rights reserved. + * + * This software was developed in part by Nick O'Brien and Rishul Naik + * for Axiado Corporation. + * + * 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 + +#include "clock_if.h" + +#define FEAON_AON_WDT_BASE 0x0 +#define FEAON_AON_RTC_BASE 0x40 +#define FEAON_AON_CLKCFG_BASE 0x70 +#define FEAON_AON_BACKUP_BASE 0x80 +#define FEAON_AON_PMU_BASE 0x100 + +/* Watchdog specific */ +#define FEAON_WDT_CFG 0x0 +#define FEAON_WDT_COUNT 0x8 +#define FEAON_WDT_DOGS 0x10 +#define FEAON_WDT_FEED 0x18 +#define FEAON_WDT_KEY 0x1C +#define FEAON_WDT_CMP 0x20 + +#define FEAON_WDT_CFG_SCALE_MASK 0xF +#define FEAON_WDT_CFG_RST_EN (1 << 8) +#define FEAON_WDT_CFG_ZERO_CMP (1 << 9) +#define FEAON_WDT_CFG_EN_ALWAYS (1 << 12) +#define FEAON_WDT_CFG_EN_CORE_AWAKE (1 << 13) +#define FEAON_WDT_CFG_IP (1 << 28) + +#define FEAON_WDT_CMP_MASK 0xFFFF + +#define FEAON_WDT_FEED_FOOD 0xD09F00D + +#define FEAON_WDT_KEY_UNLOCK 0x51F15E + +#define FEAON_WDT_TIMEBASE_FREQ 31250 +#define FEAON_WDT_TIMEBASE_RATIO (NANOSECOND / FEAON_WDT_TIMEBASE_FREQ) + +/* Real-time clock specific */ +#define FEAON_RTC_CFG 0x40 +#define FEAON_RTC_LO 0x48 +#define FEAON_RTC_HI 0x4C +#define FEAON_RTC_CMP 0x60 + +#define FEAON_RTC_CFG_SCALE_MASK 0xF +#define FEAON_RTC_CFG_EN (1 << 12) +#define FEAON_RTC_CFG_IP (1 << 28) + +#define FEAON_RTC_HI_MASK 0xFFFF + +#define FEAON_RTC_TIMEBASE_FREQ 31250LL + +#define FEAON_LOCK(sc) mtx_lock(&(sc)->mtx) +#define FEAON_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define FEAON_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) +#define FEAON_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) + +#define FEAON_READ_4(sc, reg) bus_read_4(sc->reg_res, reg) +#define FEAON_WRITE_4(sc, reg, val) bus_write_4(sc->reg_res, reg, val) + +#define FEAON_WDT_WRITE_4(sc, reg, val) do { \ + FEAON_WRITE_4(sc, (FEAON_WDT_KEY), (FEAON_WDT_KEY_UNLOCK)); \ + FEAON_WRITE_4(sc, reg, val); \ + } while (0) + +struct feaon_softc { + device_t dev; + struct mtx mtx; + + /* Resources */ + int reg_rid; + struct resource *reg_res; + + /* WDT */ + eventhandler_tag ev_tag; +}; + +static void +feaon_wdt_event(void *arg, unsigned int cmd, int *err) +{ + struct feaon_softc *sc; + uint32_t scale, val; + uint64_t time; + + sc = (struct feaon_softc *)arg; + FEAON_LOCK(sc); + + /* First feed WDT */ + FEAON_WDT_WRITE_4(sc, FEAON_WDT_FEED, FEAON_WDT_FEED_FOOD); + + if ((cmd & WD_INTERVAL) == WD_TO_NEVER) { + /* Disable WDT */ + val = FEAON_READ_4(sc, FEAON_WDT_CFG); + val &= ~(FEAON_WDT_CFG_EN_ALWAYS | FEAON_WDT_CFG_EN_CORE_AWAKE); + FEAON_WDT_WRITE_4(sc, FEAON_WDT_CFG, val); + goto exit; + } + + /* Calculate time in WDT frequency */ + time = 1LL << (cmd & WD_INTERVAL); + time /= FEAON_WDT_TIMEBASE_RATIO; + + /* Fit time in CMP register with scale */ + scale = 0; + while (time > FEAON_WDT_CMP_MASK) { + time >>= 1; + scale++; + } + + if (time > FEAON_WDT_CMP_MASK || scale > FEAON_WDT_CFG_SCALE_MASK) { + device_printf(sc->dev, "Time interval too large for WDT\n"); + *err = EINVAL; + goto exit; + } + + /* Program WDT */ + val = FEAON_READ_4(sc, FEAON_WDT_CFG); + val &= ~FEAON_WDT_CFG_SCALE_MASK; + val |= scale | FEAON_WDT_CFG_RST_EN | FEAON_WDT_CFG_EN_ALWAYS | + FEAON_WDT_CFG_ZERO_CMP; + + FEAON_WDT_WRITE_4(sc, FEAON_WDT_CMP, (uint32_t)time); + FEAON_WDT_WRITE_4(sc, FEAON_WDT_CFG, val); + +exit: + FEAON_UNLOCK(sc); +} + +static int +feaon_rtc_settime(device_t dev, struct timespec *ts) +{ + struct feaon_softc *sc; + uint64_t time; + uint32_t cfg; + uint8_t scale; + + scale = 0; + sc = device_get_softc(dev); + + FEAON_LOCK(sc); + + clock_dbgprint_ts(dev, CLOCK_DBG_WRITE, ts); + + time = ts->tv_sec * FEAON_RTC_TIMEBASE_FREQ; + + /* Find an appropriate scale */ + while (time >= 0xFFFFFFFFFFFFLL) { + scale++; + time >>= 1; + } + if (scale > FEAON_RTC_CFG_SCALE_MASK) { + device_printf(sc->dev, "Time value too large for RTC\n"); + FEAON_UNLOCK(sc); + return (1); + } + cfg = FEAON_READ_4(sc, FEAON_RTC_CFG) & ~FEAON_RTC_CFG_SCALE_MASK; + cfg |= scale; + + FEAON_WRITE_4(sc, FEAON_RTC_CFG, cfg); + FEAON_WRITE_4(sc, FEAON_RTC_LO, (uint32_t)time); + FEAON_WRITE_4(sc, FEAON_RTC_HI, (time >> 32) & FEAON_RTC_HI_MASK); + + FEAON_UNLOCK(sc); + + return (0); +} + +static int +feaon_rtc_gettime(device_t dev, struct timespec *ts) +{ + struct feaon_softc *sc; + uint64_t time; + uint8_t scale; + + sc = device_get_softc(dev); + FEAON_LOCK(sc); + + time = FEAON_READ_4(sc, FEAON_RTC_LO); + time |= ((uint64_t)FEAON_READ_4(sc, FEAON_RTC_HI)) << 32; + + scale = FEAON_READ_4(sc, FEAON_RTC_CFG) & FEAON_RTC_CFG_SCALE_MASK; + time <<= scale; + + ts->tv_sec = time / FEAON_RTC_TIMEBASE_FREQ; + ts->tv_nsec = (time % FEAON_RTC_TIMEBASE_FREQ) * + (NANOSECOND / FEAON_RTC_TIMEBASE_FREQ); + + clock_dbgprint_ts(dev, CLOCK_DBG_READ, ts); + + FEAON_UNLOCK(sc); + + return (0); +} + +static int +feaon_attach(device_t dev) +{ + struct feaon_softc *sc; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + /* Mutex setup */ + mtx_init(&sc->mtx, device_get_nameunit(sc->dev), NULL, MTX_DEF); + + /* Resource setup */ + sc->reg_rid = 0; + if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->reg_rid, RF_ACTIVE)) == NULL) { + device_printf(dev, "Error allocating memory resource.\n"); + err = ENXIO; + goto error; + } + + /* Enable RTC */ + clock_register(dev, 1000000); /* 1 sec resolution */ + FEAON_LOCK(sc); + FEAON_WRITE_4(sc, FEAON_RTC_CFG, FEAON_RTC_CFG_EN); + FEAON_UNLOCK(sc); + + /* Register WDT */ + sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, feaon_wdt_event, sc, 0); + + return (0); + +error: + bus_release_resource(dev, SYS_RES_MEMORY, sc->reg_rid, sc->reg_res); + mtx_destroy(&sc->mtx); + return (err); +} + +static int +feaon_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "sifive,aon0")) + return (ENXIO); + + device_set_desc(dev, "SiFive FE310 Always-On Controller"); + return (BUS_PROBE_DEFAULT); +} + +static device_method_t feaon_methods[] = { + DEVMETHOD(device_probe, feaon_probe), + DEVMETHOD(device_attach, feaon_attach), + + /* RTC */ + DEVMETHOD(clock_gettime, feaon_rtc_gettime), + DEVMETHOD(clock_settime, feaon_rtc_settime), + + DEVMETHOD_END +}; + +static driver_t feaon_driver = { + "fe310aon", + feaon_methods, + sizeof(struct feaon_softc) +}; + +static devclass_t feaon_devclass; + +DRIVER_MODULE(fe310aon, simplebus, feaon_driver, feaon_devclass, 0, 0); Modified: head/sys/riscv/sifive/files.sifive ============================================================================== --- head/sys/riscv/sifive/files.sifive Thu Apr 2 00:30:36 2020 (r359554) +++ head/sys/riscv/sifive/files.sifive Thu Apr 2 00:33:15 2020 (r359555) @@ -1,5 +1,6 @@ # $FreeBSD$ +riscv/sifive/fe310_aon.c optional fe310aon riscv/sifive/fu540_prci.c standard riscv/sifive/fu540_spi.c optional fu540spi spibus riscv/sifive/sifive_uart.c standard From owner-svn-src-head@freebsd.org Thu Apr 2 00:47:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C913F2AA88E; Thu, 2 Apr 2020 00:47:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48t4D30sBwz3RKJ; Thu, 2 Apr 2020 00:47:46 +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 0320bBHM003303 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 2 Apr 2020 03:37:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0320bBHM003303 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 0320bB4C003302; Thu, 2 Apr 2020 03:37:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Apr 2020 03:37:11 +0300 From: Konstantin Belousov To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359550 - head/share/man/man5 Message-ID: <20200402003711.GK1992@kib.kiev.ua> References: <202004012336.031NaGuF081470@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202004012336.031NaGuF081470@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: 48t4D30sBwz3RKJ 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]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 00:47:50 -0000 On Wed, Apr 01, 2020 at 11:36:16PM +0000, Ed Maste wrote: > Author: emaste > Date: Wed Apr 1 23:36:16 2020 > New Revision: 359550 > URL: https://svnweb.freebsd.org/changeset/base/359550 > > Log: > elf.5: minor update to FreeBSD ELF note descriptions > > Modified: > head/share/man/man5/elf.5 > > Modified: head/share/man/man5/elf.5 > ============================================================================== > --- head/share/man/man5/elf.5 Wed Apr 1 22:51:30 2020 (r359549) > +++ head/share/man/man5/elf.5 Wed Apr 1 23:36:16 2020 (r359550) > @@ -1308,10 +1308,11 @@ ABI version > .Po i.e., > .Dv __FreeBSD_version Pc . > .It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 > -Indicates that crt does not call init. > +Indicates that the C Runtime (crt) does not call init. This is not c runtime, rather it is startup code, at best it can be described as C runtime startup. > .Va desc > is ignored. > .It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 > +Contains the MACHINE_ARCH that the executable was built for. > .It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 > Contains a bitmask of mitigations and features to enable: > .Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" From owner-svn-src-head@freebsd.org Thu Apr 2 01:03:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19FC52AAFA0; Thu, 2 Apr 2020 01:03:36 +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 48t4ZG11t2z42p6; Thu, 2 Apr 2020 01:03: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 143077838; Thu, 2 Apr 2020 01:03:28 +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 03213R9K036101; Thu, 2 Apr 2020 01:03:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03213RsO036100; Thu, 2 Apr 2020 01:03:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004020103.03213RsO036100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 2 Apr 2020 01:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359556 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 01:03:36 -0000 Author: emaste Date: Thu Apr 2 01:03:27 2020 New Revision: 359556 URL: https://svnweb.freebsd.org/changeset/base/359556 Log: elf.5: correct and expand NT_FREEBSD_NOINIT_TAG description Reported by: kib Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Thu Apr 2 00:33:15 2020 (r359555) +++ head/share/man/man5/elf.5 Thu Apr 2 01:03:27 2020 (r359556) @@ -1308,7 +1308,9 @@ ABI version .Po i.e., .Dv __FreeBSD_version Pc . .It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 -Indicates that the C Runtime (crt) does not call init. +Indicates that the C startup does not call initialization routines, and thus +.Xr rtld 1 +must do so. .Va desc is ignored. .It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 From owner-svn-src-head@freebsd.org Thu Apr 2 07:10:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D42D0270597; Thu, 2 Apr 2020 07:10:46 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tDjx35bnz4Qcs; Thu, 2 Apr 2020 07:10:44 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id F160E13E42; Thu, 2 Apr 2020 07:10:37 +0000 (UTC) Date: Thu, 2 Apr 2020 07:10:36 +0000 From: Mark Linimon To: Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359503 - in head Message-ID: <20200402071035.GA12649@lonesome.com> References: <20200401055314.GN9584@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401055314.GN9584@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 48tDjx35bnz4Qcs 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]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 07:10:47 -0000 On Wed, Apr 01, 2020 at 05:53:14AM +0000, Glen Barber wrote: > Update head to 14.0-CURRENT in order to prevent having > a 13.0-RELEASE. You forgot to update the Porter's Handbook. mcl From owner-svn-src-head@freebsd.org Thu Apr 2 08:03:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E167B274A03; Thu, 2 Apr 2020 08:03:05 +0000 (UTC) (envelope-from se@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 48tFtK0St6z3HC5; Thu, 2 Apr 2020 08:03:05 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300CD5F06B000E92ED0342A5CC4C7.dip0.t-ipconnect.de [IPv6:2003:cd:5f06:b000:e92e:d034:2a5c:c4c7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 912137DEE; Thu, 2 Apr 2020 08:02:56 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r359503 - in head To: Mark Linimon Cc: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <20200401055314.GN9584@FreeBSD.org> <20200402071035.GA12649@lonesome.com> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: <8d1a666a-28b8-e580-2f0a-631a0e880c68@freebsd.org> Date: Thu, 2 Apr 2020 10:02:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200402071035.GA12649@lonesome.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 08:03:06 -0000 Am 02.04.20 um 09:10 schrieb Mark Linimon: > On Wed, Apr 01, 2020 at 05:53:14AM +0000, Glen Barber wrote: >> Update head to 14.0-CURRENT in order to prevent having >> a 13.0-RELEASE. > > You forgot to update the Porter's Handbook. You are aware that this commit message came from and only applied to some parallel universe ... ??? ;-) Regards, STefan From owner-svn-src-head@freebsd.org Thu Apr 2 09:21:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31A2227C04F; Thu, 2 Apr 2020 09:21:48 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tHd72bvXz4HHL; Thu, 2 Apr 2020 09:21:47 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D8FCE5C0; Thu, 2 Apr 2020 09:15:32 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0329FWw3034432; Thu, 2 Apr 2020 09:15:32 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0329FWAr034431; Thu, 2 Apr 2020 09:15:32 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202004020915.0329FWAr034431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Thu, 2 Apr 2020 09:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359560 - head/sys/netgraph/bluetooth/hci X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/hci X-SVN-Commit-Revision: 359560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 09:21:48 -0000 Author: takawata Date: Thu Apr 2 09:15:31 2020 New Revision: 359560 URL: https://svnweb.freebsd.org/changeset/base/359560 Log: Fix mbuf handling in le advertize packet processing. Submitted by: Marc Veldman Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 2 07:42:29 2020 (r359559) +++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 2 09:15:31 2020 (r359560) @@ -381,17 +381,20 @@ le_advertizing_report(ng_hci_unit_p unit, struct mbuf ng_hci_neighbor_p n = NULL; bdaddr_t bdaddr; int error = 0; + int num_reports = 0; u_int8_t event_type; u_int8_t addr_type; - + NG_HCI_M_PULLUP(event, sizeof(*ep)); if (event == NULL) return (ENOBUFS); ep = mtod(event, ng_hci_le_advertising_report_ep *); + num_reports = ep->num_reports; m_adj(event, sizeof(*ep)); - - for (; ep->num_reports > 0; ep->num_reports --) { + ep = NULL; + + for (; num_reports > 0; num_reports --) { /* Get remote unit address */ NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); event_type = *mtod(event, u_int8_t *); From owner-svn-src-head@freebsd.org Thu Apr 2 09:57:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 669A527F035; Thu, 2 Apr 2020 09:57:46 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tJQX5y2lz4Vcd; Thu, 2 Apr 2020 09:57:40 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id 13CF613E42; Thu, 2 Apr 2020 09:52:00 +0000 (UTC) Date: Thu, 2 Apr 2020 09:51:59 +0000 From: Mark Linimon To: Stefan =?iso-8859-1?Q?E=DFer?= Cc: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359503 - in head Message-ID: <20200402095158.GA21231@lonesome.com> References: <20200401055314.GN9584@FreeBSD.org> <20200402071035.GA12649@lonesome.com> <8d1a666a-28b8-e580-2f0a-631a0e880c68@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8d1a666a-28b8-e580-2f0a-631a0e880c68@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 48tJQX5y2lz4Vcd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of linimon@lonesome.com has no SPF policy when checking 18.222.6.11) smtp.mailfrom=linimon@lonesome.com X-Spamd-Result: default: False [-1.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.826,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.967,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[lonesome.com]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; IP_SCORE(-0.17)[ip: (0.04), ipnet: 18.220.0.0/14(0.18), asn: 16509(-1.01), country: US(-0.05)]; RCVD_IN_DNSWL_MED(-0.20)[11.6.222.18.list.dnswl.org : 127.0.5.2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:18.220.0.0/14, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 09:57:46 -0000 On Thu, Apr 02, 2020 at 10:02:51AM +0200, Stefan Eßer wrote: > You are aware that this commit message came from and > only applied to some parallel universe ... If it's better than the one we are currently in: Beam Me Up Scotty. mcl From owner-svn-src-head@freebsd.org Thu Apr 2 11:08:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E5BD2A564E; Thu, 2 Apr 2020 11:08:30 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tL0D18Gbz3xgV; Thu, 2 Apr 2020 11:08:25 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3B57FC97; Thu, 2 Apr 2020 11:08:19 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 032B8JLo001205; Thu, 2 Apr 2020 11:08:19 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032B8Jvt001204; Thu, 2 Apr 2020 11:08:19 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <202004021108.032B8Jvt001204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 2 Apr 2020 11:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359561 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 359561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 11:08:30 -0000 Author: sevan (doc committer) Date: Thu Apr 2 11:08:19 2020 New Revision: 359561 URL: https://svnweb.freebsd.org/changeset/base/359561 Log: Add NetBSD 8.2 Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Thu Apr 2 09:15:31 2020 (r359560) +++ head/share/misc/bsd-family-tree Thu Apr 2 11:08:19 2020 (r359561) @@ -398,20 +398,22 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | NetBSD | | | | | | | 8.1 | DragonFly 5.6 - | | | | | | | - | | | | | | DragonFly 5.6.1 - | | FreeBSD macOS | | | - | | 11.3 10.15 | | | - | FreeBSD | | OpenBSD 6.6 | - | 12.1 macOS | | | - | | 10.15.1 | | DragonFly 5.6.2 - | | | *--NetBSD | | - | v | | 9.0 | | + | | | | | | | | + | | | | | | | DragonFly 5.6.1 + | | FreeBSD macOS | | | | + | | 11.3 10.15 | | | | + | FreeBSD | | | OpenBSD 6.6 | + | 12.1 macOS | `-------. | | + | | 10.15.1 | | | DragonFly 5.6.2 + | | | *--NetBSD | | | + | v | | 9.0 | | | + | | | | | | + | | | | | DragonFly 5.8 + | | | | | | + | | | | | DragonFly 5.6.3 + | | | NetBSD | | + | | | 8.2 | | | | | | | - | | | | DragonFly 5.8 - | | | | | - | | | | DragonFly 5.6.3 - | | | | | FreeBSD 13 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -806,6 +808,7 @@ FreeBSD 12.1 2019-11-04 [FBD] NetBSD 9.0 2020-02-14 [NBD] DragonFly 5.8 2020-03-03 [DFB] DragonFly 5.6.3 2020-03-11 [DFB] +NetBSD 8.2 2020-03-31 [NBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Thu Apr 2 13:33:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EB1627D074; Thu, 2 Apr 2020 13:33:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 48tPC52NB5z3ys0; Thu, 2 Apr 2020 13:33:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Jzxhjqml07t92Jzxjjf3HS; Thu, 02 Apr 2020 07:32:52 -0600 X-Authority-Analysis: v=2.3 cv=Os7UNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=NJUFZQFXB-NkEPeW6hkA:9 a=CjuIK1q_8ugA: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 128A19E9; Thu, 2 Apr 2020 06:32:49 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 032DWm7e008550; Thu, 2 Apr 2020 06:32:48 -0700 (PDT) (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 032DWmwK008547; Thu, 2 Apr 2020 06:32:48 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004021332.032DWmwK008547@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: Sevan Janiyan cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359561 - head/share/misc In-reply-to: <202004021108.032B8Jvt001204@repo.freebsd.org> References: <202004021108.032B8Jvt001204@repo.freebsd.org> Comments: In-reply-to Sevan Janiyan message dated "Thu, 02 Apr 2020 11:08:19 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 02 Apr 2020 06:32:48 -0700 X-CMAE-Envelope: MS4wfOkmgzcZZ8+GqRfy5U/G6OS8YpvrldtYROSkirpKeDSdZ5Pj+sdL2F8FT1c5GtIawFb7GYZJjkT1QrnCg6tXwHCTIY1hMrqPRdWWizZ8zwn0u8ATOxfD AekB5xu3fbQLIb9N2V+0jddoPh+IcUqQ/0hLazICwAUlGzLiPxAHw0HmpJx6In3Guffhkh2g383Ucjydm3gA5jpzMJrGsEcQKlmhrngKlq+U/Hy/ym/umcA7 +fuBFNUdezX8lnvk169QFe3iFqz+v2183wPfvuK5oRVcf8Zvl13aSmthy1xjaEG6 X-Rspamd-Queue-Id: 48tPC52NB5z3ys0 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)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 13:33:08 -0000 In message <202004021108.032B8Jvt001204@repo.freebsd.org>, Sevan Janiyan writes : > Author: sevan (doc committer) > Date: Thu Apr 2 11:08:19 2020 > New Revision: 359561 > URL: https://svnweb.freebsd.org/changeset/base/359561 > > Log: > Add NetBSD 8.2 > > Modified: > head/share/misc/bsd-family-tree > > Modified: head/share/misc/bsd-family-tree > ============================================================================= > = > --- head/share/misc/bsd-family-tree Thu Apr 2 09:15:31 2020 (r35956 > 0) > +++ head/share/misc/bsd-family-tree Thu Apr 2 11:08:19 2020 (r35956 > 1) > @@ -398,20 +398,22 @@ FreeBSD 5.2 | | | > | | | | | | | | > | | | | | NetBSD | | > | | | | | 8.1 | DragonFly 5.6 > - | | | | | | | > - | | | | | | DragonFly 5.6 > .1 > - | | FreeBSD macOS | | | > - | | 11.3 10.15 | | | > - | FreeBSD | | OpenBSD 6.6 | > - | 12.1 macOS | | | > - | | 10.15.1 | | DragonFly 5.6 > .2 > - | | | *--NetBSD | | > - | v | | 9.0 | | > + | | | | | | | | > + | | | | | | | DragonFly 5.6 > .1 > + | | FreeBSD macOS | | | | > + | | 11.3 10.15 | | | | > + | FreeBSD | | | OpenBSD 6.6 | > + | 12.1 macOS | `-------. | | > + | | 10.15.1 | | | DragonFly 5.6 > .2 > + | | | *--NetBSD | | | > + | v | | 9.0 | | | > + | | | | | | > + | | | | | DragonFly 5.8 > + | | | | | | > + | | | | | DragonFly 5.6 > .3 > + | | | NetBSD | | > + | | | 8.2 | | > | | | | | > - | | | | DragonFly 5.8 > - | | | | | > - | | | | DragonFly 5.6 > .3 > - | | | | | > FreeBSD 13 -current | NetBSD -current OpenBSD -current DragonFly -cu > rrent > | | | | | > v v v v v > @@ -806,6 +808,7 @@ FreeBSD 12.1 2019-11-04 [FBD] > NetBSD 9.0 2020-02-14 [NBD] > DragonFly 5.8 2020-03-03 [DFB] > DragonFly 5.6.3 2020-03-11 [DFB] > +NetBSD 8.2 2020-03-31 [NBD] > > Bibliography > ------------------------ > To me this document is pointless unless we MFC that every release and every ISO has the latest family tree. -- 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-head@freebsd.org Thu Apr 2 13:53:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C81E27EC2E; Thu, 2 Apr 2020 13:53:05 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tPf7758Fz46sJ; Thu, 2 Apr 2020 13:53:03 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03E6019FBF; Thu, 2 Apr 2020 13:52:57 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 032Dqu1R015791; Thu, 2 Apr 2020 13:52:56 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032Dqttx015782; Thu, 2 Apr 2020 13:52:55 GMT (envelope-from dab@FreeBSD.org) Message-Id: <202004021352.032Dqttx015782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 2 Apr 2020 13:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359562 - in head/sbin/nvmecontrol: . modules/wdc X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: in head/sbin/nvmecontrol: . modules/wdc X-SVN-Commit-Revision: 359562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 13:53:05 -0000 Author: dab Date: Thu Apr 2 13:52:54 2020 New Revision: 359562 URL: https://svnweb.freebsd.org/changeset/base/359562 Log: Fix various Coverity-detected errors in nvmecontrol This fixes several Coverity-detected errors in nvmecontrol. While in here, a couple additional errors with shift/mask confusion that were not diagnosed by Coverity are also fixed. CIDs addressed: 1040299, 1040300, 1403972, 1403973, 1403985, 1403988, 1403990, 1404374, 1404427, 1404469, 1404510, 1404534, 1418118 CID 1403657 (resource leak of shared library handle) was marked "intentional" in the Coverity scan database. Reviewed by: vangyzen, robert.herndon_dell.com Reviewed by: daniel.william.ryan_gmail.com (earlier version) Reviewed by: rramsden_isilon.com (earlier version), imp MFC after: 5 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24203 Modified: head/sbin/nvmecontrol/firmware.c head/sbin/nvmecontrol/identify.c head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/modules/wdc/wdc.c head/sbin/nvmecontrol/nsid.c head/sbin/nvmecontrol/passthru.c head/sbin/nvmecontrol/power.c head/sbin/nvmecontrol/reset.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/firmware.c Thu Apr 2 13:52:54 2020 (r359562) @@ -151,6 +151,7 @@ read_image_file(const char *path, void **buf, int32_t errx(1, "error reading '%s' (read %d bytes, requested %d bytes)", path, *size, filesize); + close(fd); } static void @@ -188,6 +189,7 @@ update_firmware(int fd, uint8_t *payload, int32_t payl resid -= size; off += size; } + free(chunk); } static int Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/identify.c Thu Apr 2 13:52:54 2020 (r359562) @@ -94,7 +94,7 @@ print_namespace(struct nvme_namespace_data *nsdata) NVME_NS_DATA_DPC_PIT3_MASK) ? "Type 3, " : "", ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_SHIFT) & NVME_NS_DATA_DPC_PIT2_MASK) ? "Type 2, " : "", - ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_MASK) & + ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT1_SHIFT) & NVME_NS_DATA_DPC_PIT1_MASK) ? "Type 1" : ""); printf("Data Protection Settings: "); ptype = (nsdata->dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & @@ -238,7 +238,8 @@ identify(const struct cmd *f, int argc, char *argv[]) int fd; uint32_t nsid; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; open_dev(opt.dev, &fd, 1, 1); get_nsid(fd, &path, &nsid); Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/logpage.c Thu Apr 2 13:52:54 2020 (r359562) @@ -570,11 +570,11 @@ print_log_sanitize_status(const struct nvme_controller printf("Unknown"); break; } - p = (ss->sstat & NVME_SS_PAGE_SSTAT_PASSES_SHIFT) >> + p = (ss->sstat >> NVME_SS_PAGE_SSTAT_PASSES_SHIFT) & NVME_SS_PAGE_SSTAT_PASSES_MASK; if (p > 0) printf(", %d passes", p); - if ((ss->sstat & NVME_SS_PAGE_SSTAT_GDE_SHIFT) >> + if ((ss->sstat >> NVME_SS_PAGE_SSTAT_GDE_SHIFT) & NVME_SS_PAGE_SSTAT_GDE_MASK) printf(", Global Data Erased"); printf("\n"); Modified: head/sbin/nvmecontrol/modules/wdc/wdc.c ============================================================================== --- head/sbin/nvmecontrol/modules/wdc/wdc.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/modules/wdc/wdc.c Thu Apr 2 13:52:54 2020 (r359562) @@ -275,7 +275,7 @@ print_hgst_info_subpage_gen(void *buf, uint16_t subtyp wsp++; /* Flags, just ignore */ plen = *wsp++; param = 0; - for (i = 0; i < plen; i++) + for (i = 0; i < plen && wsp < esp; i++) param |= (uint64_t)*wsp++ << (i * 8); printf(" %-30s: %jd\n", kv_lookup(kv, kv_count, ptype), (uintmax_t)param); } Modified: head/sbin/nvmecontrol/nsid.c ============================================================================== --- head/sbin/nvmecontrol/nsid.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/nsid.c Thu Apr 2 13:52:54 2020 (r359562) @@ -70,7 +70,8 @@ gnsid(const struct cmd *f, int argc, char *argv[]) int fd; uint32_t nsid; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; open_dev(nsid_opt.dev, &fd, 1, 1); get_nsid(fd, &path, &nsid); Modified: head/sbin/nvmecontrol/passthru.c ============================================================================== --- head/sbin/nvmecontrol/passthru.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/passthru.c Thu Apr 2 13:52:54 2020 (r359562) @@ -158,10 +158,12 @@ static void passthru(const struct cmd *f, int argc, char *argv[]) { int fd = -1, ifd = -1; + size_t bytes_read; void *data = NULL, *metadata = NULL; struct nvme_pt_command pt; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; open_dev(argv[optind], &fd, 1, 1); if (opt.read && opt.write) @@ -189,8 +191,12 @@ passthru(const struct cmd *f, int argc, char *argv[]) goto cleanup; } memset(data, opt.prefill, opt.data_len); - if (opt.write && read(ifd, data, opt.data_len) < 0) { - warn("read %s", *opt.ifn ? opt.ifn : "stdin"); + if (opt.write && + (bytes_read = read(ifd, data, opt.data_len)) != + opt.data_len) { + warn("read %s; expected %u bytes; got %zd", + *opt.ifn ? opt.ifn : "stdin", + opt.data_len, bytes_read); goto cleanup; } } @@ -249,6 +255,10 @@ passthru(const struct cmd *f, int argc, char *argv[]) } } cleanup: + free(data); + close(fd); + if (ifd > -1) + close(ifd); if (errno) exit(1); } Modified: head/sbin/nvmecontrol/power.c ============================================================================== --- head/sbin/nvmecontrol/power.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/power.c Thu Apr 2 13:52:54 2020 (r359562) @@ -145,7 +145,8 @@ power(const struct cmd *f, int argc, char *argv[]) struct nvme_controller_data cdata; int fd; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; if (opt.list && opt.power != POWER_NONE) { fprintf(stderr, "Can't set power and list power states\n"); Modified: head/sbin/nvmecontrol/reset.c ============================================================================== --- head/sbin/nvmecontrol/reset.c Thu Apr 2 11:08:19 2020 (r359561) +++ head/sbin/nvmecontrol/reset.c Thu Apr 2 13:52:54 2020 (r359562) @@ -57,7 +57,8 @@ reset(const struct cmd *f, int argc, char *argv[]) { int fd; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; open_dev(opt.dev, &fd, 1, 1); if (ioctl(fd, NVME_RESET_CONTROLLER) < 0) From owner-svn-src-head@freebsd.org Thu Apr 2 14:24:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 853002A2EF8; Thu, 2 Apr 2020 14:24:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from host2.hosts.geeklan.co.uk (host2.hosts.geeklan.co.uk [195.154.57.113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "host2.hosts.geeklan.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tQLb23cMz4LBd; Thu, 2 Apr 2020 14:24:38 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from host2.hosts.geeklan.co.uk (localhost [127.0.0.1]) by host2.hosts.geeklan.co.uk (OpenSMTPD) with ESMTP id e2114935; Thu, 2 Apr 2020 15:24:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=geeklan.co.uk; h=subject :to:cc:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=geeklan; bh=rjXqU1DEw 6TZ2uiQl/pqQ+ZGykc=; b=Ylvne3Q36xurRMMDYRwBAZbHI6XNM5HHFL4NbvJbk UdyiWuznf6EDvysxfaXHy+SHuvJsYLcP9P4ZtBe9t9sXhjwBfo3YqsxIxt0NyrNf 0h8SqN4iQePhfAR4nJL0rmx710Mq8O737Ez7S5zaMX9v3ieQuYSEo6yOGIOyRk4Z Inpb37n2BvFsYP+nMfke99NCzHKLncK54soyAvJPMhkP9BIAYRuLWOziklQRL33+ MI+6BxRrHW4UcKeYRKeGJMjc8/GMggmP0dc+eHoztRJW/fHC7D40fCDPKDBykqrW zBIXbK7cOO1VhOVuK0XO8PAB3n/6O1WDgLrqIKTrHhnjw== Received: by host2.hosts.geeklan.co.uk (OpenSMTPD) with ESMTPSA id 50577574 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 2 Apr 2020 15:24:20 +0100 (BST) Subject: Re: svn commit: r359561 - head/share/misc To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004021108.032B8Jvt001204@repo.freebsd.org> <202004021332.032DWmwK008547@slippy.cwsent.com> From: Sevan Janiyan Autocrypt: addr=sevan@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFV6/hIBEADFfMfQEOJZZuIsrwq4USHbFSfbafwnGfcz67Q0wHI8lVlPkgcPFLMrH/6w lre2qt8DDpNxofLC912PBlrxYdvDsW5GzCc/icmQY6qlA/Km4K+55X3QpewB81quZXBo+uQn +GYJxCdvE8VSSYP1I2aTTSjsN7Y3p87lkpYZSn8WSG/DsGlZjwRN0rIT66jyfmYBQ51zkMk3 i6/pf5KNHJ6xDbZZvC7yG4CLMYbFwsxERlPT7RUHZFvEelOxmfSM3qp+PqnMhX2+oAYD0mjg Mtx3ZqmXzLKNdybr5QCs34TkKNXP644pxttPGs40eKMr70FAsGDEizCcG4yB7bH+YbGKgDP6 O8o74ikG2I6n6se0LILc/QU1CG7X/4/OfcF5eFJvnfv/5AeMy+vFSRHKhh/cUPAydGNc8IRA aXHO9uYWbGhxD0nODYzjhRwyjWyijxk3d1MOv+xg4RFAC+tm6/npZXFDKxKI1+c6u/bz8ViF 3HFXrwiEtNojatNWJryCHPpHmTQ93JHBGaFsYkyeNOIwx0tpGZpqJjhcDxlUjlWfGXx2+ubN kUUh8ZAbsiYIlyppiKW0vawJn+SjEZ8JnGb07a48WRY5wVK5yZAzA31c8YQki1S+7xqbKyl2 dn+PX3QT/eUO2GNoyWOciqLg8DIJ/6ZA7KlX6tCBoaQldlDmTwARAQABtCFTZXZhbiBKYW5p eWFuIDxzZXZhbkBGcmVlQlNELm9yZz6JAlYEEwEIAEACGwMHCwkIBwMCAQYVCAIJCgsEFgID AQIeAQIXgBYhBJcIMbgJ6/fDirgXb8gty0BTP0s7BQJc7c3UBQkLSlzRAAoJEMgty0BTP0s7 15UP/2Q+bi0XHgylWd/BPgjIHMXpRoXTik1Uky69uaxnSBCdWZ0gIdFLVaOUdRxV+BfMroA4 +Q+w23XjCNc9In9nJd+Z2SQfEI9NaZGmRw4BtBsRKH/RO6TR2OYBlueUw74Hj45jwjuDb5lK SrxmNBeCmYJk87eYvkZqXpxc7qHy41AIX0bD9kuhLfU63Cn9/F3VOVVy0GwjIqQpw2aF2/G6 IVUW7xdl3pkJRQlZr8ooG7JeNsbw+BUrkJCj1qZocLyEg4UeIWZcAX2sKj3AKTMJjPuatNrW rFgvb52fkAx6dWbTFOg4QMPhoPD/oFM3EIhnA2qF/G0B0kzxhFDuynWW7oaGJQRfU1RsUBmS YUGyuGZAUl2CTx6lRb/WZlBqDmYekSCtly1G9cpT8MFPPyw/XEhBAfCgiLk0wjILVjHKMhZn nJp1m/Vf5Yk0jPv4V6dPACxOShPTOrc1baem/9so/j/xZsJtGHj/9mdvs42KyEhzNCf0lHsm 8VobO7Tpu/Vy9DQglKsO6g1ByRsvtctD89WaN6fz+FC4hgSyU/OFgtEZyhdpkZrD7Aaa8Gq/ PZpRLKMq8eO432Symzgz2PsdSGwBL6dEGRND0G6ekOtJBmafJr3FDYmeF3TxaVV/8os3re3y 642glIUHQ85uiF1VKYLwsLF0AGkkBOzOU3rVQKZCuQINBFV6/hIBEADQfPg0Q0ps5Rt2+gbp ZBwXBCDKVV4NTMeBN2tRhdemMOjeKIpCQsbJqMzUp7Yn/qPPs2cl62GpFP/iVejZ24rQ5/xV 8yH7v/Z8XnmU/egxqrmLJMeen8siQj9LQCEXgdOmYbCO5/OSGOme/w21/JDBrEL0n1ZA8GO9 KoNibOaOYLSCyRc1G6SiTmqBONrOghdUCtuxCAEjfQJ1Nl/S+azuFr3jtJ9fzMLSOAOLfrmF BRRYhT70urcetPbEFU4/zP15dYraXpFjtrZ4QFBKKBrQc6ZHj0PsHdKfLWZCp2/QyFp2b0Xi /R7pmyNhQh+eljthNFtdZK3LmUpDPhKUuN1oG7SoigfxKCJclnunTFgCMc026zjL479wTSuR 3z209fCrBmGvlXl2OCeI7tPbzITKojCJBmX36gmhYdv/nmXVF6PiS81Cg5Ctq9grMkvtwaMe D0nxYUojc3G/9EM7oKzLNGa2MlilZRq37mDLQn8tUYq/G5AtAxNyAZGNFWXf+4NkLSy91Kib LUWEEgBKd7f3aMsuiFR2ZzPlraBuUuf1jCVc9V1Yj5H1PsdT2KkhLtO4Jmxoy9dbnVD/S8sz DK2xjvu+acK1X+IiqXwE4275Pt339A/EaDSkY/PYEUiSXcim+03UpcIZGslOW/EYwpJsDbaR tlN+4N4wjy5g5gUXDwARAQABiQI8BBgBCAAmAhsMFiEElwgxuAnr98OKuBdvyC3LQFM/SzsF AlzuSHgFCQs1v3YACgkQyC3LQFM/SztX1RAAhxt+BZ3+BO77CU4skwzQAyMP0s5/YEPHvAA4 Q5Z4+Zc6XSFsqoI7supZpMN/ZXTN2s33mkIqJ2f7boMRH/51CObIqq0EcqFaJAuGoHKyyimP LqV5iUCKzj66P55eCUAj02IGDTst9dljpV2EPrgWxTRG5Mc2NHzCZ/gri3plc24xme/NBYvU U71GTO8shC/MGPFv8w34ucp5L1oLwgPmX2sKUWtaQYWPS8UrMhAOk29l/Egoh9gImknrgsun jOvkgh6HgdPNZg81SAwGedCf5x5Q4SGaPmBNiJH1nU/bwcKQ8b0HRHgQLilkUbTFgygu2ufO 1tBHZNvhnG1zTn2xEzKtPpa8HTflrrnOl1TYekGJKuMPytviFUhzOGhDwQGvsfeLrEL/BX7a 9BEXFDgaAiujiPqQ5bqTpQkMhEw3Y2R7fkuUERT5N73tIBvFIathNdBf1FrrV8o0q8ZoPCfJ l7j+j5AVG0V4qNI1TMRob1zg+DUdaNFhoN9MxeY5H8iEj/f9urpIIQLgS7mJy3LkQAlV6m8y tg7bYUsog/lRx0ORRXdbyjOimBrWFl47Hqj1xJVqXZw1Kuoa6MYtLfmuuleC3g9fErQCfCBC f4pAB1cBmjAJlt1vijKZS6/XAve5qMg4tGBYC1p10pOvl3m72/uFt1N8n8eUAdpm/XwNBaE= Message-ID: <05a1e1bd-621e-202f-8a53-4643ae45a258@FreeBSD.org> Date: Thu, 2 Apr 2020 15:23:03 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202004021332.032DWmwK008547@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48tQLb23cMz4LBd X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.40)[-0.402,0]; ASN(0.00)[asn:12876, ipnet:195.154.0.0/16, country:FR]; NEURAL_HAM_LONG(-0.50)[-0.499,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 14:24:43 -0000 On 02/04/2020 14:32, Cy Schubert wrote: > To me this document is pointless unless we MFC that every release and every > ISO has the latest family tree. Ok, noted. I'll MFC. Sevan From owner-svn-src-head@freebsd.org Thu Apr 2 15:25:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA1FA2A766D; Thu, 2 Apr 2020 15:25:53 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tRjC2QbQz4kb8; Thu, 2 Apr 2020 15:25:50 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F13571B28D; Thu, 2 Apr 2020 15:17:53 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 032FHrW1065077; Thu, 2 Apr 2020 15:17:53 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032FHrnA065074; Thu, 2 Apr 2020 15:17:53 GMT (envelope-from phk@FreeBSD.org) Message-Id: <202004021517.032FHrnA065074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Thu, 2 Apr 2020 15:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359563 - head/sbin/recoverdisk X-SVN-Group: head X-SVN-Commit-Author: phk X-SVN-Commit-Paths: head/sbin/recoverdisk X-SVN-Commit-Revision: 359563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 15:25:54 -0000 Author: phk Date: Thu Apr 2 15:17:53 2020 New Revision: 359563 URL: https://svnweb.freebsd.org/changeset/base/359563 Log: Add two options to recoverdisk(1) inspired by a recent data-archæology project: -u pattern Fill unread parts of the output with pattern. Default pattern is "_UNREAD_", empty pattern disables. -v Fancy status reporting using ANSI escapes and UTF-8 Modified: head/sbin/recoverdisk/Makefile head/sbin/recoverdisk/recoverdisk.1 head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/Makefile ============================================================================== --- head/sbin/recoverdisk/Makefile Thu Apr 2 13:52:54 2020 (r359562) +++ head/sbin/recoverdisk/Makefile Thu Apr 2 15:17:53 2020 (r359563) @@ -3,6 +3,10 @@ PACKAGE=runtime PROG= recoverdisk +LDFLAGS += -lm + +WARNS?= 6 + .include test: ${PROG} Modified: head/sbin/recoverdisk/recoverdisk.1 ============================================================================== --- head/sbin/recoverdisk/recoverdisk.1 Thu Apr 2 13:52:54 2020 (r359562) +++ head/sbin/recoverdisk/recoverdisk.1 Thu Apr 2 15:17:53 2020 (r359563) @@ -35,6 +35,8 @@ .Op Fl b Ar bigsize .Op Fl r Ar readlist .Op Fl s Ar interval +.Op Fl u Ar pattern +.Op Fl v .Op Fl w Ar writelist .Ar source .Op Ar destination @@ -68,6 +70,13 @@ Read the list of blocks and block sizes to read from t How often we should update the writelist file while things go OK. The default is 60 and the unit is "progress messages" so if things go well, this is the same as once per minute. +.It Fl u Ar pattern +By default blocks which encounter read errors will be filled with +the pattern "_UNREAD_" in the output file. This option can be +used to specify another pattern. Nothing gets written if the string +is empty. +.It Fl v +Enables nicer status report using ANSI escapes and UTF-8. .It Fl w Ar writelist Write the list of remaining blocks to read to the specified file if .Nm Modified: head/sbin/recoverdisk/recoverdisk.c ============================================================================== --- head/sbin/recoverdisk/recoverdisk.c Thu Apr 2 13:52:54 2020 (r359562) +++ head/sbin/recoverdisk/recoverdisk.c Thu Apr 2 15:17:53 2020 (r359563) @@ -15,21 +15,27 @@ #include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include -static volatile sig_atomic_t aborting = 0; -static size_t bigsize = 1024 * 1024; -static size_t medsize; -static size_t minsize = 512; +/* Safe printf into a fixed-size buffer */ +#define bprintf(buf, fmt, ...) \ + do { \ + int ibprintf; \ + ibprintf = snprintf(buf, sizeof buf, fmt, __VA_ARGS__); \ + assert(ibprintf >= 0 && ibprintf < (int)sizeof buf); \ + } while (0) struct lump { off_t start; @@ -38,9 +44,249 @@ struct lump { TAILQ_ENTRY(lump) list; }; +struct period { + time_t t0; + time_t t1; + char str[20]; + off_t bytes_read; + TAILQ_ENTRY(period) list; +}; +TAILQ_HEAD(period_head, period); + +static volatile sig_atomic_t aborting = 0; +static int verbose = 0; +static size_t bigsize = 1024 * 1024; +static size_t medsize; +static size_t minsize = 512; +static off_t tot_size; +static off_t done_size; +static char *input; +static char *wworklist = NULL; +static char *rworklist = NULL; +static const char *unreadable_pattern = "_UNREAD_"; +static const int write_errors_are_fatal = 1; +static int fdr, fdw; + static TAILQ_HEAD(, lump) lumps = TAILQ_HEAD_INITIALIZER(lumps); +static struct period_head minute = TAILQ_HEAD_INITIALIZER(minute); +static struct period_head quarter = TAILQ_HEAD_INITIALIZER(quarter); +static struct period_head hour = TAILQ_HEAD_INITIALIZER(quarter); +static struct period_head day = TAILQ_HEAD_INITIALIZER(quarter); +/**********************************************************************/ + static void +report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) +{ + struct period *pp; + const char *fmt; + struct tm tm1; + + pp = TAILQ_FIRST(ph); + if (pp == NULL || pp->t1 < now) { + pp = calloc(sizeof *pp, 1L); + assert(pp != NULL); + pp->t0 = (now / dt) * dt; + pp->t1 = (now / dt + 1) * dt; + assert(localtime_r(&pp->t0, &tm1) != NULL); + if (dt < 86400) + fmt = "%H:%M"; + else + fmt = "%d%b"; + assert(strftime(pp->str, sizeof pp->str, fmt, &tm1) != 0); + TAILQ_INSERT_HEAD(ph, pp, list); + } + pp->bytes_read += bytes; +} + +static void +report_good_read(time_t now, size_t bytes) +{ + + report_good_read2(now, bytes, &minute, 60L); + report_good_read2(now, bytes, &quarter, 900L); + report_good_read2(now, bytes, &hour, 3600L); + report_good_read2(now, bytes, &day, 86400L); +} + +static void +report_one_period(const char *period, struct period_head *ph) +{ + struct period *pp; + int n; + + n = 0; + printf("%s \xe2\x94\x82", period); + TAILQ_FOREACH(pp, ph, list) { + if (n == 3) { + TAILQ_REMOVE(ph, pp, list); + free(pp); + break; + } + if (n++) + printf(" \xe2\x94\x82"); + printf(" %s %14jd", pp->str, pp->bytes_read); + } + for (; n < 3; n++) { + printf(" \xe2\x94\x82"); + printf(" %5s %14s", "", ""); + } + printf("\x1b[K\n"); +} + +static void +report_periods(void) +{ + report_one_period("1m ", &minute); + report_one_period("15m", &quarter); + report_one_period("1h ", &hour); + report_one_period("1d ", &day); +} + +/**********************************************************************/ + +static void +set_verbose(void) +{ + struct winsize wsz; + time_t t0; + + if (!isatty(STDIN_FILENO) || ioctl(STDIN_FILENO, TIOCGWINSZ, &wsz)) + return; + printf("\x1b[2J"); + verbose = 1; + t0 = time(NULL); +} + +static void +report_header(int eol) +{ + printf("%13s %7s %13s %5s %13s %13s %9s", + "start", + "size", + "block-len", + "pass", + "done", + "remaining", + "% done"); + if (eol) + printf("\x1b[K"); + putchar('\n'); +} + +#define REPORTWID 79 + +static void +report_hline(const char *how) +{ + int j; + + for (j = 0; j < REPORTWID; j++) { + if (how && (j == 4 || j == 29 || j == 54)) { + printf("%s", how); + } else { + printf("\xe2\x94\x80"); + } + } + printf("\x1b[K\n"); +} + +static off_t hist[REPORTWID]; +static off_t last_done = -1; + +static void +report_histogram(const struct lump *lp) +{ + off_t j, bucket, fp, fe, k, now; + double a; + struct lump *lp2; + + bucket = tot_size / REPORTWID; + if (tot_size > bucket * REPORTWID) + bucket += 1; + if (done_size != last_done) { + memset(hist, 0, sizeof hist); + TAILQ_FOREACH(lp2, &lumps, list) { + fp = lp2->start; + fe = lp2->start + lp2->len; + for (j = fp / bucket; fp < fe; j++) { + k = (j + 1) * bucket; + if (k > fe) + k = fe; + k -= fp; + hist[j] += k; + fp += k; + } + } + last_done = done_size; + } + now = lp->start / bucket; + for (j = 0; j < REPORTWID; j++) { + a = round(8 * (double)hist[j] / bucket); + assert (a >= 0 && a < 9); + if (a == 0 && hist[j]) + a = 1; + if (j == now) + printf("\x1b[31m"); + if (a == 0) { + putchar(' '); + } else { + putchar(0xe2); + putchar(0x96); + putchar(0x80 + (int)a); + } + if (j == now) + printf("\x1b[0m"); + } + putchar('\n'); +} + +static void +report(const struct lump *lp, size_t sz) +{ + struct winsize wsz; + int j; + + assert(lp != NULL); + + if (verbose) { + printf("\x1b[H%s\x1b[K\n", input); + report_header(1); + } else { + putchar('\r'); + } + + printf("%13jd %7zu %13jd %5d %13jd %13jd %9.4f", + (intmax_t)lp->start, + sz, + (intmax_t)lp->len, + lp->state, + (intmax_t)done_size, + (intmax_t)(tot_size - done_size), + 100*(double)done_size/(double)tot_size + ); + + if (verbose) { + printf("\x1b[K\n"); + report_hline(NULL); + report_histogram(lp); + if (TAILQ_EMPTY(&minute)) { + report_hline(NULL); + } else { + report_hline("\xe2\x94\xac"); + report_periods(); + report_hline("\xe2\x94\xb4"); + } + j = ioctl(STDIN_FILENO, TIOCGWINSZ, &wsz); + if (!j) + printf("\x1b[%d;1H", wsz.ws_row); + } + fflush(stdout); +} + +/**********************************************************************/ + +static void new_lump(off_t start, off_t len, int state) { struct lump *lp; @@ -54,45 +300,38 @@ new_lump(off_t start, off_t len, int state) TAILQ_INSERT_TAIL(&lumps, lp, list); } -static struct lump *lp; -static char *wworklist = NULL; -static char *rworklist = NULL; +/********************************************************************** + * Save the worklist if -w was given + */ - -#define PRINT_HEADER \ - printf("%13s %7s %13s %5s %13s %13s %9s\n", \ - "start", "size", "block-len", "state", "done", "remaining", "% done") - -#define PRINT_STATUS(start, i, len, state, d, t) \ - printf("\r%13jd %7zu %13jd %5d %13jd %13jd %9.5f", \ - (intmax_t)start, \ - i, \ - (intmax_t)len, \ - state, \ - (intmax_t)d, \ - (intmax_t)(t - d), \ - 100*(double)d/(double)t) - -/* Save the worklist if -w was given */ static void save_worklist(void) { FILE *file; struct lump *llp; + char buf[PATH_MAX]; + if (fdw >= 0 && fdatasync(fdw)) + err(1, "Write error, probably disk full"); + if (wworklist != NULL) { + bprintf(buf, "%s.tmp", wworklist); (void)fprintf(stderr, "\nSaving worklist ..."); - fflush(stderr); + (void)fflush(stderr); - file = fopen(wworklist, "w"); + file = fopen(buf, "w"); if (file == NULL) - err(1, "Error opening file %s", wworklist); + err(1, "Error opening file %s", buf); TAILQ_FOREACH(llp, &lumps, list) fprintf(file, "%jd %jd %d\n", (intmax_t)llp->start, (intmax_t)llp->len, llp->state); - fclose(file); + (void)fflush(file); + if (ferror(file) || fdatasync(fileno(file)) || fclose(file)) + err(1, "Error writing file %s", buf); + if (rename(buf, wworklist)) + err(1, "Error renaming %s to %s", buf, wworklist); (void)fprintf(stderr, " done.\n"); } } @@ -106,7 +345,7 @@ read_worklist(off_t t) FILE *file; (void)fprintf(stderr, "Reading worklist ..."); - fflush(stderr); + (void)fflush(stderr); file = fopen(rworklist, "r"); if (file == NULL) err(1, "Error opening file %s", rworklist); @@ -125,7 +364,8 @@ read_worklist(off_t t) new_lump(s, l, state); d -= l; } - fclose(file); + if (fclose(file)) + err(1, "Error closing file %s", rworklist); (void)fprintf(stderr, " done.\n"); /* * Return the number of bytes already read @@ -134,11 +374,46 @@ read_worklist(off_t t) return (d); } +/**********************************************************************/ + static void +write_buf(int fd, const void *buf, ssize_t len, off_t where) +{ + ssize_t i; + + i = pwrite(fd, buf, len, where); + if (i == len) + return; + + printf("\nWrite error at %jd/%zu\n\t%s\n", + where, i, strerror(errno)); + save_worklist(); + if (write_errors_are_fatal) + exit(3); +} + +static void +fill_buf(char *buf, ssize_t len, const char *pattern) +{ + ssize_t sz = strlen(pattern); + ssize_t i, j; + + for (i = 0; i < len; i += sz) { + j = len - i; + if (j > sz) + j = sz; + memcpy(buf + i, pattern, j); + } +} + +/**********************************************************************/ + +static void usage(void) { (void)fprintf(stderr, "usage: recoverdisk [-b bigsize] [-r readlist] " "[-s interval] [-w writelist] source [destination]\n"); + /* XXX update */ exit(1); } @@ -153,18 +428,17 @@ int main(int argc, char * const argv[]) { int ch; - int fdr, fdw; - off_t t, d, start, len; - size_t i, j; - int error, state; - u_char *buf; + size_t sz, j; + int error; + char *buf; u_int sectorsize; off_t stripesize; time_t t1, t2; struct stat sb; u_int n, snapshot = 60; + static struct lump *lp; - while ((ch = getopt(argc, argv, "b:r:w:s:")) != -1) { + while ((ch = getopt(argc, argv, "b:r:w:s:u:v")) != -1) { switch (ch) { case 'b': bigsize = strtoul(optarg, NULL, 0); @@ -177,6 +451,12 @@ main(int argc, char * const argv[]) case 's': snapshot = strtoul(optarg, NULL, 0); break; + case 'u': + unreadable_pattern = optarg; + break; + case 'v': + set_verbose(); + break; case 'w': wworklist = strdup(optarg); if (wworklist == NULL) @@ -193,6 +473,7 @@ main(int argc, char * const argv[]) if (argc < 1 || argc > 2) usage(); + input = argv[0]; fdr = open(argv[0], O_RDONLY); if (fdr < 0) err(1, "Cannot open read descriptor %s", argv[0]); @@ -212,11 +493,11 @@ main(int argc, char * const argv[]) minsize = sectorsize; bigsize = rounddown(bigsize, sectorsize); - error = ioctl(fdr, DIOCGMEDIASIZE, &t); + error = ioctl(fdr, DIOCGMEDIASIZE, &tot_size); if (error < 0) err(1, "DIOCGMEDIASIZE failed"); } else { - t = sb.st_size; + tot_size = sb.st_size; } if (bigsize < minsize) @@ -238,88 +519,102 @@ main(int argc, char * const argv[]) fdw = open(argv[1], O_WRONLY | O_CREAT, DEFFILEMODE); if (fdw < 0) err(1, "Cannot open write descriptor %s", argv[1]); - if (ftruncate(fdw, t) < 0) + if (ftruncate(fdw, tot_size) < 0) err(1, "Cannot truncate output %s to %jd bytes", - argv[1], (intmax_t)t); + argv[1], (intmax_t)tot_size); } else fdw = -1; if (rworklist != NULL) { - d = read_worklist(t); + done_size = read_worklist(tot_size); } else { - new_lump(0, t, 0); - d = 0; + new_lump(0, tot_size, 0); + done_size = 0; } if (wworklist != NULL) signal(SIGINT, sighandler); - t1 = 0; - start = len = i = state = 0; - PRINT_HEADER; + t1 = time(NULL); + sz = 0; + if (!verbose) + report_header(0); n = 0; for (;;) { lp = TAILQ_FIRST(&lumps); if (lp == NULL) break; - while (lp->len > 0 && !aborting) { - /* These are only copied for printing stats */ - start = lp->start; - len = lp->len; - state = lp->state; + while (lp->len > 0) { - i = MIN(lp->len, (off_t)bigsize); - if (lp->state == 1) - i = MIN(lp->len, (off_t)medsize); - if (lp->state > 1) - i = MIN(lp->len, (off_t)minsize); - time(&t2); + if (lp->state == 0) + sz = MIN(lp->len, (off_t)bigsize); + else if (lp->state == 1) + sz = MIN(lp->len, (off_t)medsize); + else + sz = MIN(lp->len, (off_t)minsize); + assert(sz != 0); + + t2 = time(NULL); if (t1 != t2 || lp->len < (off_t)bigsize) { - PRINT_STATUS(start, i, len, state, d, t); t1 = t2; if (++n == snapshot) { save_worklist(); n = 0; } + report(lp, sz); } - if (i == 0) { - errx(1, "BOGUS i %10jd", (intmax_t)i); - } - fflush(stdout); - j = pread(fdr, buf, i, lp->start); - if (j == i) { - d += i; + + j = pread(fdr, buf, sz, lp->start); +#if 0 +if (!(random() & 0xf)) { + j = -1; + errno = EIO; +} +#endif + if (j == sz) { + done_size += sz; if (fdw >= 0) - j = pwrite(fdw, buf, i, lp->start); - else - j = i; - if (j != i) - printf("\nWrite error at %jd/%zu\n", - lp->start, i); - lp->start += i; - lp->len -= i; + write_buf(fdw, buf, sz, lp->start); + lp->start += sz; + lp->len -= sz; + if (verbose && lp->state > 2) + report_good_read(t2, sz); continue; } - printf("\n%jd %zu failed (%s)\n", - lp->start, i, strerror(errno)); - if (errno == EINVAL) { - printf("read() size too big? Try with -b 131072"); + error = errno; + + printf("%jd %zu %d read error (%s)\n", + lp->start, sz, lp->state, strerror(error)); + if (verbose) + report(lp, sz); + if (error == EINVAL) { + printf("Try with -b 131072 or lower ?\n"); aborting = 1; + break; } - if (errno == ENXIO) + if (error == ENXIO) { + printf("Input device probably detached...\n"); aborting = 1; - new_lump(lp->start, i, lp->state + 1); - lp->start += i; - lp->len -= i; + break; + } + if (fdw >= 0 && strlen(unreadable_pattern)) { + fill_buf(buf, sz, unreadable_pattern); + write_buf(fdw, buf, sz, lp->start); + } + new_lump(lp->start, sz, lp->state + 1); + lp->start += sz; + lp->len -= sz; } - if (aborting) { + if (aborting) save_worklist(); - return (0); - } + if (aborting || !TAILQ_NEXT(lp, list)) + report(lp, sz); + if (aborting) + break; + assert(lp->len == 0); TAILQ_REMOVE(&lumps, lp, list); free(lp); } - PRINT_STATUS(start, i, len, state, d, t); - save_worklist(); - printf("\nCompleted\n"); + printf("%s", aborting ? "Aborted\n" : "Completed\n"); + free(buf); return (0); } From owner-svn-src-head@freebsd.org Thu Apr 2 16:55:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50A572AC5D8; Thu, 2 Apr 2020 16:55:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tThn28hrz45lx; Thu, 2 Apr 2020 16:55:37 +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 DABF71C6F4; Thu, 2 Apr 2020 16:55:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 032GtSoo026060; Thu, 2 Apr 2020 16:55:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032GtSju026059; Thu, 2 Apr 2020 16:55:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004021655.032GtSju026059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Apr 2020 16:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359569 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 359569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 16:55:38 -0000 Author: jhb Date: Thu Apr 2 16:55:28 2020 New Revision: 359569 URL: https://svnweb.freebsd.org/changeset/base/359569 Log: Remove duplicate conditional. CID: 1422192 Reported by: Coverity Modified: head/sys/opencrypto/crypto.c Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Thu Apr 2 16:48:46 2020 (r359568) +++ head/sys/opencrypto/crypto.c Thu Apr 2 16:55:28 2020 (r359569) @@ -722,8 +722,6 @@ alg_is_digest(int alg) return (true); if (alg >= CRYPTO_SHA2_256_HMAC && alg <= CRYPTO_SHA2_512_HMAC) return (true); - if (alg >= CRYPTO_SHA2_256_HMAC && alg <= CRYPTO_SHA2_512_HMAC) - return (true); if (alg == CRYPTO_AES_NIST_GMAC) return (true); if (alg >= CRYPTO_BLAKE2B && alg <= CRYPTO_BLAKE2S) From owner-svn-src-head@freebsd.org Thu Apr 2 17:22:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A4372AD8A6; Thu, 2 Apr 2020 17:22:29 +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 48tVHl5PPGz4Gtt; Thu, 2 Apr 2020 17:22:27 +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 4952F1CCF1; Thu, 2 Apr 2020 17:22:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 032HMHBP044092; Thu, 2 Apr 2020 17:22:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032HMHkX044091; Thu, 2 Apr 2020 17:22:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004021722.032HMHkX044091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Apr 2020 17:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359570 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 359570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 17:22:30 -0000 Author: jhb Date: Thu Apr 2 17:22:16 2020 New Revision: 359570 URL: https://svnweb.freebsd.org/changeset/base/359570 Log: Avoid checking pointers that are never NULL. Coverity noted that cod pointer is always non-NULL at the end of cryptodev_aead(). While here, fix cryptodev_op() to match by making one earlier failure case before cod and crp are allocated just return directly. CID: 1422185 Reported by: Coverity Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Thu Apr 2 16:55:28 2020 (r359569) +++ head/sys/opencrypto/cryptodev.c Thu Apr 2 17:22:16 2020 (r359570) @@ -915,8 +915,7 @@ cryptodev_op( if (cop->mac && cse->hashsize == 0) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); - error = EINVAL; - goto bail; + return (EINVAL); } /* @@ -1091,10 +1090,8 @@ again: } bail: - if (crp) - crypto_freereq(crp); - if (cod) - cod_free(cod); + crypto_freereq(crp); + cod_free(cod); return (error); } @@ -1285,8 +1282,7 @@ again: bail: crypto_freereq(crp); - if (cod) - cod_free(cod); + cod_free(cod); return (error); } From owner-svn-src-head@freebsd.org Thu Apr 2 17:57:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FE4D2AE76F; Thu, 2 Apr 2020 17:57:52 +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 48tW4b4NZXz4Txd; Thu, 2 Apr 2020 17:57:49 +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 300B91D505; Thu, 2 Apr 2020 17:57:41 +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 032Hve44062842; Thu, 2 Apr 2020 17:57:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032HvelJ062841; Thu, 2 Apr 2020 17:57:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202004021757.032HvelJ062841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 2 Apr 2020 17:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359571 - head/sys/dev/cadence X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/cadence X-SVN-Commit-Revision: 359571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 17:57:53 -0000 Author: ian Date: Thu Apr 2 17:57:40 2020 New Revision: 359571 URL: https://svnweb.freebsd.org/changeset/base/359571 Log: Cadence GEM ethernet driver style clean-up, no functional changes. This is mostly indentation whitespace, and reflowing a few multiline comments. This gets a bunch of minor stuff out of the way so that the diffs for style don't clutter up the diffs for some upcoming functional changes. Submitted by: Thomas Skibo Differential Revision: https://reviews.freebsd.org/D24226 Modified: head/sys/dev/cadence/if_cgem.c head/sys/dev/cadence/if_cgem_hw.h Modified: head/sys/dev/cadence/if_cgem.c ============================================================================== --- head/sys/dev/cadence/if_cgem.c Thu Apr 2 17:22:16 2020 (r359570) +++ head/sys/dev/cadence/if_cgem.c Thu Apr 2 17:57:40 2020 (r359571) @@ -112,8 +112,8 @@ struct cgem_softc { device_t miibus; u_int mii_media_active; /* last active media */ int if_old_flags; - struct resource *mem_res; - struct resource *irq_res; + struct resource *mem_res; + struct resource *irq_res; void *intrhand; struct callout tick_ch; uint32_t net_ctl_shadow; @@ -131,7 +131,7 @@ struct cgem_softc { int rxring_hd_ptr; /* where to put rcv bufs */ int rxring_tl_ptr; /* where to get receives */ int rxring_queued; /* how many rcv bufs queued */ - bus_dmamap_t rxring_dma_map; + bus_dmamap_t rxring_dma_map; int rxbufs; /* tunable number rcv bufs */ int rxhangwar; /* rx hang work-around */ u_int rxoverruns; /* rx overruns */ @@ -200,16 +200,15 @@ struct cgem_softc { } stats; }; -#define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) -#define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) +#define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) +#define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) #define BARRIER(sc, off, len, flags) \ (bus_barrier((sc)->mem_res, (off), (len), (flags)) #define CGEM_LOCK(sc) mtx_lock(&(sc)->sc_mtx) -#define CGEM_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) -#define CGEM_LOCK_INIT(sc) \ - mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), \ - MTX_NETWORK_LOCK, MTX_DEF) +#define CGEM_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define CGEM_LOCK_INIT(sc) mtx_init(&(sc)->sc_mtx, \ + device_get_nameunit((sc)->dev), MTX_NETWORK_LOCK, MTX_DEF) #define CGEM_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) #define CGEM_ASSERT_LOCKED(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) @@ -259,9 +258,8 @@ cgem_get_mac(struct cgem_softc *sc, u_char eaddr[]) eaddr[5] = rnd & 0xff; device_printf(sc->dev, "no mac address found, assigning " - "random: %02x:%02x:%02x:%02x:%02x:%02x\n", - eaddr[0], eaddr[1], eaddr[2], - eaddr[3], eaddr[4], eaddr[5]); + "random: %02x:%02x:%02x:%02x:%02x:%02x\n", eaddr[0], + eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]); } /* Move address to first slot and zero out the rest. */ @@ -275,11 +273,11 @@ cgem_get_mac(struct cgem_softc *sc, u_char eaddr[]) } } -/* cgem_mac_hash(): map 48-bit address to a 6-bit hash. - * The 6-bit hash corresponds to a bit in a 64-bit hash - * register. Setting that bit in the hash register enables - * reception of all frames with a destination address that hashes - * to that 6-bit value. +/* + * cgem_mac_hash(): map 48-bit address to a 6-bit hash. The 6-bit hash + * corresponds to a bit in a 64-bit hash register. Setting that bit in the hash + * register enables reception of all frames with a destination address that + * hashes to that 6-bit value. * * The hash function is described in sec. 16.2.3 in the Zynq-7000 Tech * Reference Manual. Bits 0-5 in the hash are the exclusive-or of @@ -308,15 +306,16 @@ cgem_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_ index = cgem_mac_hash(LLADDR(sdl)); if (index > 31) - hashes[0] |= (1 << (index - 32)); + hashes[0] |= (1U << (index - 32)); else - hashes[1] |= (1 << index); + hashes[1] |= (1U << index); return (1); } -/* After any change in rx flags or multi-cast addresses, set up - * hash registers and net config register bits. +/* + * After any change in rx flags or multi-cast addresses, set up hash registers + * and net config register bits. */ static void cgem_rx_filter(struct cgem_softc *sc) @@ -328,8 +327,7 @@ cgem_rx_filter(struct cgem_softc *sc) net_cfg = RD4(sc, CGEM_NET_CFG); net_cfg &= ~(CGEM_NET_CFG_MULTI_HASH_EN | - CGEM_NET_CFG_NO_BCAST | - CGEM_NET_CFG_COPY_ALL); + CGEM_NET_CFG_NO_BCAST | CGEM_NET_CFG_COPY_ALL); if ((if_getflags(ifp) & IFF_PROMISC) != 0) net_cfg |= CGEM_NET_CFG_COPY_ALL; @@ -370,51 +368,32 @@ cgem_setup_descs(struct cgem_softc *sc) sc->txring = NULL; sc->rxring = NULL; - /* Allocate non-cached DMA space for RX and TX descriptors. - */ + /* Allocate non-cached DMA space for RX and TX descriptors. */ err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, - NULL, NULL, - MAX_DESC_RING_SIZE, - 1, - MAX_DESC_RING_SIZE, - 0, - busdma_lock_mutex, - &sc->sc_mtx, - &sc->desc_dma_tag); + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MAX_DESC_RING_SIZE, 1, MAX_DESC_RING_SIZE, 0, + busdma_lock_mutex, &sc->sc_mtx, &sc->desc_dma_tag); if (err) return (err); /* Set up a bus_dma_tag for mbufs. */ err = bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, - NULL, NULL, - MCLBYTES, - TX_MAX_DMA_SEGS, - MCLBYTES, - 0, - busdma_lock_mutex, - &sc->sc_mtx, - &sc->mbuf_dma_tag); + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MCLBYTES, TX_MAX_DMA_SEGS, MCLBYTES, 0, + busdma_lock_mutex, &sc->sc_mtx, &sc->mbuf_dma_tag); if (err) return (err); /* Allocate DMA memory in non-cacheable space. */ - err = bus_dmamem_alloc(sc->desc_dma_tag, - (void **)&sc->rxring, - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, - &sc->rxring_dma_map); + err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->rxring, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->rxring_dma_map); if (err) return (err); /* Load descriptor DMA memory. */ err = bus_dmamap_load(sc->desc_dma_tag, sc->rxring_dma_map, - (void *)sc->rxring, - CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc), - cgem_getaddr, &sc->rxring_physaddr, - BUS_DMA_NOWAIT); + (void *)sc->rxring, CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc), + cgem_getaddr, &sc->rxring_physaddr, BUS_DMA_NOWAIT); if (err) return (err); @@ -432,19 +411,15 @@ cgem_setup_descs(struct cgem_softc *sc) sc->rxring_queued = 0; /* Allocate DMA memory for TX descriptors in non-cacheable space. */ - err = bus_dmamem_alloc(sc->desc_dma_tag, - (void **)&sc->txring, - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, - &sc->txring_dma_map); + err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->txring, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &sc->txring_dma_map); if (err) return (err); /* Load TX descriptor DMA memory. */ err = bus_dmamap_load(sc->desc_dma_tag, sc->txring_dma_map, - (void *)sc->txring, - CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc), - cgem_getaddr, &sc->txring_physaddr, - BUS_DMA_NOWAIT); + (void *)sc->txring, CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc), + cgem_getaddr, &sc->txring_physaddr, BUS_DMA_NOWAIT); if (err) return (err); @@ -486,14 +461,14 @@ cgem_fill_rqueue(struct cgem_softc *sc) /* Load map and plug in physical address. */ if (bus_dmamap_create(sc->mbuf_dma_tag, 0, - &sc->rxring_m_dmamap[sc->rxring_hd_ptr])) { + &sc->rxring_m_dmamap[sc->rxring_hd_ptr])) { sc->rxdmamapfails++; m_free(m); break; } - if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[sc->rxring_hd_ptr], m, - segs, &nsegs, BUS_DMA_NOWAIT)) { + if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, + sc->rxring_m_dmamap[sc->rxring_hd_ptr], m, + segs, &nsegs, BUS_DMA_NOWAIT)) { sc->rxdmamapfails++; bus_dmamap_destroy(sc->mbuf_dma_tag, sc->rxring_m_dmamap[sc->rxring_hd_ptr]); @@ -505,18 +480,18 @@ cgem_fill_rqueue(struct cgem_softc *sc) /* Sync cache with receive buffer. */ bus_dmamap_sync(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[sc->rxring_hd_ptr], - BUS_DMASYNC_PREREAD); + sc->rxring_m_dmamap[sc->rxring_hd_ptr], + BUS_DMASYNC_PREREAD); /* Write rx descriptor and increment head pointer. */ sc->rxring[sc->rxring_hd_ptr].ctl = 0; if (sc->rxring_hd_ptr == CGEM_NUM_RX_DESCS - 1) { sc->rxring[sc->rxring_hd_ptr].addr = segs[0].ds_addr | - CGEM_RXDESC_WRAP; + CGEM_RXDESC_WRAP; sc->rxring_hd_ptr = 0; } else sc->rxring[sc->rxring_hd_ptr++].addr = segs[0].ds_addr; - + sc->rxring_queued++; } } @@ -535,7 +510,7 @@ cgem_recv(struct cgem_softc *sc) m_hd = NULL; m_tl = &m_hd; while (sc->rxring_queued > 0 && - (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { + (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { ctl = sc->rxring[sc->rxring_tl_ptr].ctl; @@ -545,14 +520,14 @@ cgem_recv(struct cgem_softc *sc) /* Sync cache with receive buffer. */ bus_dmamap_sync(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[sc->rxring_tl_ptr], - BUS_DMASYNC_POSTREAD); + sc->rxring_m_dmamap[sc->rxring_tl_ptr], + BUS_DMASYNC_POSTREAD); /* Unload and destroy dmamap. */ bus_dmamap_unload(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[sc->rxring_tl_ptr]); + sc->rxring_m_dmamap[sc->rxring_tl_ptr]); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[sc->rxring_tl_ptr]); + sc->rxring_m_dmamap[sc->rxring_tl_ptr]); sc->rxring_m_dmamap[sc->rxring_tl_ptr] = NULL; /* Increment tail pointer. */ @@ -560,13 +535,14 @@ cgem_recv(struct cgem_softc *sc) sc->rxring_tl_ptr = 0; sc->rxring_queued--; - /* Check FCS and make sure entire packet landed in one mbuf + /* + * Check FCS and make sure entire packet landed in one mbuf * cluster (which is much bigger than the largest ethernet * packet). */ if ((ctl & CGEM_RXDESC_BAD_FCS) != 0 || (ctl & (CGEM_RXDESC_SOF | CGEM_RXDESC_EOF)) != - (CGEM_RXDESC_SOF | CGEM_RXDESC_EOF)) { + (CGEM_RXDESC_SOF | CGEM_RXDESC_EOF)) { /* discard. */ m_free(m); if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); @@ -579,8 +555,9 @@ cgem_recv(struct cgem_softc *sc) m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len; - /* Are we using hardware checksumming? Check the - * status in the receive descriptor. + /* + * Are we using hardware checksumming? Check the status in the + * receive descriptor. */ if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) { /* TCP or UDP checks out, IP checks out too. */ @@ -589,14 +566,14 @@ cgem_recv(struct cgem_softc *sc) (ctl & CGEM_RXDESC_CKSUM_STAT_MASK) == CGEM_RXDESC_CKSUM_STAT_UDP_GOOD) { m->m_pkthdr.csum_flags |= - CSUM_IP_CHECKED | CSUM_IP_VALID | - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + CSUM_IP_CHECKED | CSUM_IP_VALID | + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xffff; } else if ((ctl & CGEM_RXDESC_CKSUM_STAT_MASK) == - CGEM_RXDESC_CKSUM_STAT_IP_GOOD) { + CGEM_RXDESC_CKSUM_STAT_IP_GOOD) { /* Only IP checks out. */ m->m_pkthdr.csum_flags |= - CSUM_IP_CHECKED | CSUM_IP_VALID; + CSUM_IP_CHECKED | CSUM_IP_VALID; m->m_pkthdr.csum_data = 0xffff; } } @@ -632,19 +609,19 @@ cgem_clean_tx(struct cgem_softc *sc) /* free up finished transmits. */ while (sc->txring_queued > 0 && - ((ctl = sc->txring[sc->txring_tl_ptr].ctl) & - CGEM_TXDESC_USED) != 0) { + ((ctl = sc->txring[sc->txring_tl_ptr].ctl) & + CGEM_TXDESC_USED) != 0) { /* Sync cache. */ bus_dmamap_sync(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_tl_ptr], - BUS_DMASYNC_POSTWRITE); + sc->txring_m_dmamap[sc->txring_tl_ptr], + BUS_DMASYNC_POSTWRITE); /* Unload and destroy DMA map. */ bus_dmamap_unload(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_tl_ptr]); + sc->txring_m_dmamap[sc->txring_tl_ptr]); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_tl_ptr]); + sc->txring_m_dmamap[sc->txring_tl_ptr]); sc->txring_m_dmamap[sc->txring_tl_ptr] = NULL; /* Free up the mbuf. */ @@ -655,18 +632,19 @@ cgem_clean_tx(struct cgem_softc *sc) /* Check the status. */ if ((ctl & CGEM_TXDESC_AHB_ERR) != 0) { /* Serious bus error. log to console. */ - device_printf(sc->dev, "cgem_clean_tx: Whoa! " - "AHB error, addr=0x%x\n", - sc->txring[sc->txring_tl_ptr].addr); + device_printf(sc->dev, + "cgem_clean_tx: AHB error, addr=0x%x\n", + sc->txring[sc->txring_tl_ptr].addr); } else if ((ctl & (CGEM_TXDESC_RETRY_ERR | - CGEM_TXDESC_LATE_COLL)) != 0) { + CGEM_TXDESC_LATE_COLL)) != 0) { if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); } else if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1); - /* If the packet spanned more than one tx descriptor, - * skip descriptors until we find the end so that only - * start-of-frame descriptors are processed. + /* + * If the packet spanned more than one tx descriptor, skip + * descriptors until we find the end so that only start-of-frame + * descriptors are processed. */ while ((ctl & CGEM_TXDESC_LAST_BUF) == 0) { if ((ctl & CGEM_TXDESC_WRAP) != 0) @@ -678,7 +656,7 @@ cgem_clean_tx(struct cgem_softc *sc) ctl = sc->txring[sc->txring_tl_ptr].ctl; sc->txring[sc->txring_tl_ptr].ctl = - ctl | CGEM_TXDESC_USED; + ctl | CGEM_TXDESC_USED; } /* Next descriptor. */ @@ -731,14 +709,14 @@ cgem_start_locked(if_t ifp) /* Create and load DMA map. */ if (bus_dmamap_create(sc->mbuf_dma_tag, 0, - &sc->txring_m_dmamap[sc->txring_hd_ptr])) { + &sc->txring_m_dmamap[sc->txring_hd_ptr])) { m_freem(m); sc->txdmamapfails++; continue; } err = bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_hd_ptr], - m, segs, &nsegs, BUS_DMA_NOWAIT); + sc->txring_m_dmamap[sc->txring_hd_ptr], m, segs, &nsegs, + BUS_DMA_NOWAIT); if (err == EFBIG) { /* Too many segments! defrag and try again. */ struct mbuf *m2 = m_defrag(m, M_NOWAIT); @@ -747,21 +725,21 @@ cgem_start_locked(if_t ifp) sc->txdefragfails++; m_freem(m); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_hd_ptr]); + sc->txring_m_dmamap[sc->txring_hd_ptr]); sc->txring_m_dmamap[sc->txring_hd_ptr] = NULL; continue; } m = m2; err = bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_hd_ptr], - m, segs, &nsegs, BUS_DMA_NOWAIT); + sc->txring_m_dmamap[sc->txring_hd_ptr], m, segs, + &nsegs, BUS_DMA_NOWAIT); sc->txdefrags++; } if (err) { /* Give up. */ m_freem(m); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_hd_ptr]); + sc->txring_m_dmamap[sc->txring_hd_ptr]); sc->txring_m_dmamap[sc->txring_hd_ptr] = NULL; sc->txdmamapfails++; continue; @@ -770,20 +748,21 @@ cgem_start_locked(if_t ifp) /* Sync tx buffer with cache. */ bus_dmamap_sync(sc->mbuf_dma_tag, - sc->txring_m_dmamap[sc->txring_hd_ptr], - BUS_DMASYNC_PREWRITE); + sc->txring_m_dmamap[sc->txring_hd_ptr], + BUS_DMASYNC_PREWRITE); /* Set wrap flag if next packet might run off end of ring. */ wrap = sc->txring_hd_ptr + nsegs + TX_MAX_DMA_SEGS >= - CGEM_NUM_TX_DESCS; + CGEM_NUM_TX_DESCS; - /* Fill in the TX descriptors back to front so that USED - * bit in first descriptor is cleared last. + /* + * Fill in the TX descriptors back to front so that USED bit in + * first descriptor is cleared last. */ for (i = nsegs - 1; i >= 0; i--) { /* Descriptor address. */ sc->txring[sc->txring_hd_ptr + i].addr = - segs[i].ds_addr; + segs[i].ds_addr; /* Descriptor control word. */ ctl = segs[i].ds_len; @@ -951,8 +930,9 @@ cgem_intr(void *arg) /* Hresp not ok. Something is very bad with DMA. Try to clear. */ if ((istatus & CGEM_INTR_HRESP_NOT_OK) != 0) { - device_printf(sc->dev, "cgem_intr: hresp not okay! " - "rx_status=0x%x\n", RD4(sc, CGEM_RX_STAT)); + device_printf(sc->dev, + "cgem_intr: hresp not okay! rx_status=0x%x\n", + RD4(sc, CGEM_RX_STAT)); WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_HRESP_NOT_OK); } @@ -997,8 +977,7 @@ cgem_reset(struct cgem_softc *sc) WR4(sc, CGEM_RX_QBAR, 0); /* Get management port running even if interface is down. */ - WR4(sc, CGEM_NET_CFG, - CGEM_NET_CFG_DBUS_WIDTH_32 | + WR4(sc, CGEM_NET_CFG, CGEM_NET_CFG_DBUS_WIDTH_32 | CGEM_NET_CFG_MDC_CLK_DIV_64); sc->net_ctl_shadow = CGEM_NET_CTRL_MGMT_PORT_EN; @@ -1018,13 +997,13 @@ cgem_config(struct cgem_softc *sc) /* Program Net Config Register. */ net_cfg = CGEM_NET_CFG_DBUS_WIDTH_32 | - CGEM_NET_CFG_MDC_CLK_DIV_64 | - CGEM_NET_CFG_FCS_REMOVE | - CGEM_NET_CFG_RX_BUF_OFFSET(ETHER_ALIGN) | - CGEM_NET_CFG_GIGE_EN | - CGEM_NET_CFG_1536RXEN | - CGEM_NET_CFG_FULL_DUPLEX | - CGEM_NET_CFG_SPEED100; + CGEM_NET_CFG_MDC_CLK_DIV_64 | + CGEM_NET_CFG_FCS_REMOVE | + CGEM_NET_CFG_RX_BUF_OFFSET(ETHER_ALIGN) | + CGEM_NET_CFG_GIGE_EN | + CGEM_NET_CFG_1536RXEN | + CGEM_NET_CFG_FULL_DUPLEX | + CGEM_NET_CFG_SPEED100; /* Enable receive checksum offloading? */ if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) @@ -1034,10 +1013,10 @@ cgem_config(struct cgem_softc *sc) /* Program DMA Config Register. */ dma_cfg = CGEM_DMA_CFG_RX_BUF_SIZE(MCLBYTES) | - CGEM_DMA_CFG_RX_PKTBUF_MEMSZ_SEL_8K | - CGEM_DMA_CFG_TX_PKTBUF_MEMSZ_SEL | - CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16 | - CGEM_DMA_CFG_DISC_WHEN_NO_AHB; + CGEM_DMA_CFG_RX_PKTBUF_MEMSZ_SEL_8K | + CGEM_DMA_CFG_TX_PKTBUF_MEMSZ_SEL | + CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16 | + CGEM_DMA_CFG_DISC_WHEN_NO_AHB; /* Enable transmit checksum offloading? */ if ((if_getcapenable(ifp) & IFCAP_TXCSUM) != 0) @@ -1048,7 +1027,7 @@ cgem_config(struct cgem_softc *sc) /* Write the rx and tx descriptor ring addresses to the QBAR regs. */ WR4(sc, CGEM_RX_QBAR, (uint32_t) sc->rxring_physaddr); WR4(sc, CGEM_TX_QBAR, (uint32_t) sc->txring_physaddr); - + /* Enable rx and tx. */ sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN); WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow); @@ -1059,8 +1038,7 @@ cgem_config(struct cgem_softc *sc) WR4(sc, CGEM_SPEC_ADDR_HI(0), (eaddr[5] << 8) | eaddr[4]); /* Set up interrupts. */ - WR4(sc, CGEM_INTR_EN, - CGEM_INTR_RX_COMPLETE | CGEM_INTR_RX_OVERRUN | + WR4(sc, CGEM_INTR_EN, CGEM_INTR_RX_COMPLETE | CGEM_INTR_RX_OVERRUN | CGEM_INTR_TX_USED_READ | CGEM_INTR_RX_USED_READ | CGEM_INTR_HRESP_NOT_OK); } @@ -1117,9 +1095,9 @@ cgem_stop(struct cgem_softc *sc) if (sc->txring_m[i]) { /* Unload and destroy dmamap. */ bus_dmamap_unload(sc->mbuf_dma_tag, - sc->txring_m_dmamap[i]); + sc->txring_m_dmamap[i]); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->txring_m_dmamap[i]); + sc->txring_m_dmamap[i]); sc->txring_m_dmamap[i] = NULL; m_freem(sc->txring_m[i]); sc->txring_m[i] = NULL; @@ -1138,9 +1116,9 @@ cgem_stop(struct cgem_softc *sc) if (sc->rxring_m[i]) { /* Unload and destroy dmamap. */ bus_dmamap_unload(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[i]); + sc->rxring_m_dmamap[i]); bus_dmamap_destroy(sc->mbuf_dma_tag, - sc->rxring_m_dmamap[i]); + sc->rxring_m_dmamap[i]); sc->rxring_m_dmamap[i] = NULL; m_freem(sc->rxring_m[i]); @@ -1172,7 +1150,7 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((if_getflags(ifp) & IFF_UP) != 0) { if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) { if (((if_getflags(ifp) ^ sc->if_old_flags) & - (IFF_PROMISC | IFF_ALLMULTI)) != 0) { + (IFF_PROMISC | IFF_ALLMULTI)) != 0) { cgem_rx_filter(sc); } } else { @@ -1210,41 +1188,41 @@ cgem_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((ifr->ifr_reqcap & IFCAP_TXCSUM) != 0) { /* Turn on TX checksumming. */ if_setcapenablebit(ifp, IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6, 0); + IFCAP_TXCSUM_IPV6, 0); if_sethwassistbits(ifp, CGEM_CKSUM_ASSIST, 0); WR4(sc, CGEM_DMA_CFG, RD4(sc, CGEM_DMA_CFG) | - CGEM_DMA_CFG_CHKSUM_GEN_OFFLOAD_EN); + CGEM_DMA_CFG_CHKSUM_GEN_OFFLOAD_EN); } else { /* Turn off TX checksumming. */ if_setcapenablebit(ifp, 0, IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6); + IFCAP_TXCSUM_IPV6); if_sethwassistbits(ifp, 0, CGEM_CKSUM_ASSIST); WR4(sc, CGEM_DMA_CFG, RD4(sc, CGEM_DMA_CFG) & - ~CGEM_DMA_CFG_CHKSUM_GEN_OFFLOAD_EN); + ~CGEM_DMA_CFG_CHKSUM_GEN_OFFLOAD_EN); } } if ((mask & IFCAP_RXCSUM) != 0) { if ((ifr->ifr_reqcap & IFCAP_RXCSUM) != 0) { /* Turn on RX checksumming. */ if_setcapenablebit(ifp, IFCAP_RXCSUM | - IFCAP_RXCSUM_IPV6, 0); + IFCAP_RXCSUM_IPV6, 0); WR4(sc, CGEM_NET_CFG, RD4(sc, CGEM_NET_CFG) | - CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); + CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); } else { /* Turn off RX checksumming. */ if_setcapenablebit(ifp, 0, IFCAP_RXCSUM | - IFCAP_RXCSUM_IPV6); + IFCAP_RXCSUM_IPV6); WR4(sc, CGEM_NET_CFG, RD4(sc, CGEM_NET_CFG) & - ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); + ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); } } - if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == + if ((if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == (IFCAP_RXCSUM | IFCAP_TXCSUM)) if_setcapenablebit(ifp, IFCAP_VLAN_HWCSUM, 0); else @@ -1311,9 +1289,8 @@ cgem_miibus_readreg(device_t dev, int phy, int reg) struct cgem_softc *sc = device_get_softc(dev); int tries, val; - WR4(sc, CGEM_PHY_MAINT, - CGEM_PHY_MAINT_CLAUSE_22 | CGEM_PHY_MAINT_MUST_10 | - CGEM_PHY_MAINT_OP_READ | + WR4(sc, CGEM_PHY_MAINT, CGEM_PHY_MAINT_CLAUSE_22 | + CGEM_PHY_MAINT_MUST_10 | CGEM_PHY_MAINT_OP_READ | (phy << CGEM_PHY_MAINT_PHY_ADDR_SHIFT) | (reg << CGEM_PHY_MAINT_REG_ADDR_SHIFT)); @@ -1344,10 +1321,9 @@ cgem_miibus_writereg(device_t dev, int phy, int reg, i { struct cgem_softc *sc = device_get_softc(dev); int tries; - - WR4(sc, CGEM_PHY_MAINT, - CGEM_PHY_MAINT_CLAUSE_22 | CGEM_PHY_MAINT_MUST_10 | - CGEM_PHY_MAINT_OP_WRITE | + + WR4(sc, CGEM_PHY_MAINT, CGEM_PHY_MAINT_CLAUSE_22 | + CGEM_PHY_MAINT_MUST_10 | CGEM_PHY_MAINT_OP_WRITE | (phy << CGEM_PHY_MAINT_PHY_ADDR_SHIFT) | (reg << CGEM_PHY_MAINT_REG_ADDR_SHIFT) | (data & CGEM_PHY_MAINT_DATA_MASK)); @@ -1417,12 +1393,12 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_dat /* Update hardware to reflect media. */ net_cfg = RD4(sc, CGEM_NET_CFG); net_cfg &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | - CGEM_NET_CFG_FULL_DUPLEX); + CGEM_NET_CFG_FULL_DUPLEX); switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_1000_T: net_cfg |= (CGEM_NET_CFG_SPEED100 | - CGEM_NET_CFG_GIGE_EN); + CGEM_NET_CFG_GIGE_EN); ref_clk_freq = 125000000; break; case IFM_100_TX: @@ -1440,9 +1416,9 @@ cgem_mediachange(struct cgem_softc *sc, struct mii_dat /* Set the reference clock if necessary. */ if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) - device_printf(sc->dev, "cgem_mediachange: " - "could not set ref clk%d to %d.\n", - sc->ref_clk_num, ref_clk_freq); + device_printf(sc->dev, + "cgem_mediachange: could not set ref clk%d to %d.\n", + sc->ref_clk_num, ref_clk_freq); sc->mii_media_active = mii->mii_media_active; } @@ -1459,169 +1435,195 @@ cgem_add_sysctls(device_t dev) child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rxbufs", CTLFLAG_RW, - &sc->rxbufs, 0, - "Number receive buffers to provide"); + &sc->rxbufs, 0, "Number receive buffers to provide"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rxhangwar", CTLFLAG_RW, - &sc->rxhangwar, 0, - "Enable receive hang work-around"); + &sc->rxhangwar, 0, "Enable receive hang work-around"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxoverruns", CTLFLAG_RD, - &sc->rxoverruns, 0, - "Receive overrun events"); + &sc->rxoverruns, 0, "Receive overrun events"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxnobufs", CTLFLAG_RD, - &sc->rxnobufs, 0, - "Receive buf queue empty events"); + &sc->rxnobufs, 0, "Receive buf queue empty events"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxdmamapfails", CTLFLAG_RD, - &sc->rxdmamapfails, 0, - "Receive DMA map failures"); + &sc->rxdmamapfails, 0, "Receive DMA map failures"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txfull", CTLFLAG_RD, - &sc->txfull, 0, - "Transmit ring full events"); + &sc->txfull, 0, "Transmit ring full events"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdmamapfails", CTLFLAG_RD, - &sc->txdmamapfails, 0, - "Transmit DMA map failures"); + &sc->txdmamapfails, 0, "Transmit DMA map failures"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdefrags", CTLFLAG_RD, - &sc->txdefrags, 0, - "Transmit m_defrag() calls"); + &sc->txdefrags, 0, "Transmit m_defrag() calls"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdefragfails", CTLFLAG_RD, - &sc->txdefragfails, 0, - "Transmit m_defrag() failures"); + &sc->txdefragfails, 0, "Transmit m_defrag() failures"); tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "GEM statistics"); child = SYSCTL_CHILDREN(tree); SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_bytes", CTLFLAG_RD, - &sc->stats.tx_bytes, "Total bytes transmitted"); + &sc->stats.tx_bytes, "Total bytes transmitted"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames", CTLFLAG_RD, - &sc->stats.tx_frames, 0, "Total frames transmitted"); + &sc->stats.tx_frames, 0, "Total frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_bcast", CTLFLAG_RD, - &sc->stats.tx_frames_bcast, 0, - "Number broadcast frames transmitted"); + &sc->stats.tx_frames_bcast, 0, + "Number broadcast frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_multi", CTLFLAG_RD, - &sc->stats.tx_frames_multi, 0, - "Number multicast frames transmitted"); + &sc->stats.tx_frames_multi, 0, + "Number multicast frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_pause", - CTLFLAG_RD, &sc->stats.tx_frames_pause, 0, - "Number pause frames transmitted"); + CTLFLAG_RD, &sc->stats.tx_frames_pause, 0, + "Number pause frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_64b", CTLFLAG_RD, - &sc->stats.tx_frames_64b, 0, - "Number frames transmitted of size 64 bytes or less"); + &sc->stats.tx_frames_64b, 0, + "Number frames transmitted of size 64 bytes or less"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_65to127b", CTLFLAG_RD, - &sc->stats.tx_frames_65to127b, 0, - "Number frames transmitted of size 65-127 bytes"); + &sc->stats.tx_frames_65to127b, 0, + "Number frames transmitted of size 65-127 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_128to255b", - CTLFLAG_RD, &sc->stats.tx_frames_128to255b, 0, - "Number frames transmitted of size 128-255 bytes"); + CTLFLAG_RD, &sc->stats.tx_frames_128to255b, 0, + "Number frames transmitted of size 128-255 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_256to511b", - CTLFLAG_RD, &sc->stats.tx_frames_256to511b, 0, - "Number frames transmitted of size 256-511 bytes"); + CTLFLAG_RD, &sc->stats.tx_frames_256to511b, 0, + "Number frames transmitted of size 256-511 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_512to1023b", - CTLFLAG_RD, &sc->stats.tx_frames_512to1023b, 0, - "Number frames transmitted of size 512-1023 bytes"); + CTLFLAG_RD, &sc->stats.tx_frames_512to1023b, 0, + "Number frames transmitted of size 512-1023 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_1024to1536b", - CTLFLAG_RD, &sc->stats.tx_frames_1024to1536b, 0, - "Number frames transmitted of size 1024-1536 bytes"); + CTLFLAG_RD, &sc->stats.tx_frames_1024to1536b, 0, + "Number frames transmitted of size 1024-1536 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_under_runs", - CTLFLAG_RD, &sc->stats.tx_under_runs, 0, - "Number transmit under-run events"); + CTLFLAG_RD, &sc->stats.tx_under_runs, 0, + "Number transmit under-run events"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_single_collisn", - CTLFLAG_RD, &sc->stats.tx_single_collisn, 0, - "Number single-collision transmit frames"); + CTLFLAG_RD, &sc->stats.tx_single_collisn, 0, + "Number single-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_multi_collisn", - CTLFLAG_RD, &sc->stats.tx_multi_collisn, 0, - "Number multi-collision transmit frames"); + CTLFLAG_RD, &sc->stats.tx_multi_collisn, 0, + "Number multi-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_excsv_collisn", - CTLFLAG_RD, &sc->stats.tx_excsv_collisn, 0, - "Number excessive collision transmit frames"); + CTLFLAG_RD, &sc->stats.tx_excsv_collisn, 0, + "Number excessive collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_late_collisn", - CTLFLAG_RD, &sc->stats.tx_late_collisn, 0, - "Number late-collision transmit frames"); + CTLFLAG_RD, &sc->stats.tx_late_collisn, 0, + "Number late-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_deferred_frames", - CTLFLAG_RD, &sc->stats.tx_deferred_frames, 0, - "Number deferred transmit frames"); + CTLFLAG_RD, &sc->stats.tx_deferred_frames, 0, + "Number deferred transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_carrier_sense_errs", - CTLFLAG_RD, &sc->stats.tx_carrier_sense_errs, 0, - "Number carrier sense errors on transmit"); + CTLFLAG_RD, &sc->stats.tx_carrier_sense_errs, 0, + "Number carrier sense errors on transmit"); SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "rx_bytes", CTLFLAG_RD, - &sc->stats.rx_bytes, "Total bytes received"); + &sc->stats.rx_bytes, "Total bytes received"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames", CTLFLAG_RD, - &sc->stats.rx_frames, 0, "Total frames received"); + &sc->stats.rx_frames, 0, "Total frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_bcast", - CTLFLAG_RD, &sc->stats.rx_frames_bcast, 0, - "Number broadcast frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_bcast, 0, + "Number broadcast frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_multi", - CTLFLAG_RD, &sc->stats.rx_frames_multi, 0, - "Number multicast frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_multi, 0, + "Number multicast frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_pause", - CTLFLAG_RD, &sc->stats.rx_frames_pause, 0, - "Number pause frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_pause, 0, + "Number pause frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_64b", - CTLFLAG_RD, &sc->stats.rx_frames_64b, 0, - "Number frames received of size 64 bytes or less"); + CTLFLAG_RD, &sc->stats.rx_frames_64b, 0, + "Number frames received of size 64 bytes or less"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_65to127b", - CTLFLAG_RD, &sc->stats.rx_frames_65to127b, 0, - "Number frames received of size 65-127 bytes"); + CTLFLAG_RD, &sc->stats.rx_frames_65to127b, 0, + "Number frames received of size 65-127 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_128to255b", - CTLFLAG_RD, &sc->stats.rx_frames_128to255b, 0, - "Number frames received of size 128-255 bytes"); + CTLFLAG_RD, &sc->stats.rx_frames_128to255b, 0, + "Number frames received of size 128-255 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_256to511b", - CTLFLAG_RD, &sc->stats.rx_frames_256to511b, 0, - "Number frames received of size 256-511 bytes"); + CTLFLAG_RD, &sc->stats.rx_frames_256to511b, 0, + "Number frames received of size 256-511 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_512to1023b", - CTLFLAG_RD, &sc->stats.rx_frames_512to1023b, 0, - "Number frames received of size 512-1023 bytes"); + CTLFLAG_RD, &sc->stats.rx_frames_512to1023b, 0, + "Number frames received of size 512-1023 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_1024to1536b", - CTLFLAG_RD, &sc->stats.rx_frames_1024to1536b, 0, - "Number frames received of size 1024-1536 bytes"); + CTLFLAG_RD, &sc->stats.rx_frames_1024to1536b, 0, + "Number frames received of size 1024-1536 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_undersize", - CTLFLAG_RD, &sc->stats.rx_frames_undersize, 0, - "Number undersize frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_undersize, 0, + "Number undersize frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_oversize", - CTLFLAG_RD, &sc->stats.rx_frames_oversize, 0, - "Number oversize frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_oversize, 0, + "Number oversize frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_jabber", - CTLFLAG_RD, &sc->stats.rx_frames_jabber, 0, - "Number jabber frames received"); + CTLFLAG_RD, &sc->stats.rx_frames_jabber, 0, + "Number jabber frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_fcs_errs", - CTLFLAG_RD, &sc->stats.rx_frames_fcs_errs, 0, - "Number frames received with FCS errors"); + CTLFLAG_RD, &sc->stats.rx_frames_fcs_errs, 0, + "Number frames received with FCS errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_length_errs", - CTLFLAG_RD, &sc->stats.rx_frames_length_errs, 0, - "Number frames received with length errors"); + CTLFLAG_RD, &sc->stats.rx_frames_length_errs, 0, + "Number frames received with length errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_symbol_errs", - CTLFLAG_RD, &sc->stats.rx_symbol_errs, 0, - "Number receive symbol errors"); + CTLFLAG_RD, &sc->stats.rx_symbol_errs, 0, + "Number receive symbol errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_align_errs", - CTLFLAG_RD, &sc->stats.rx_align_errs, 0, - "Number receive alignment errors"); + CTLFLAG_RD, &sc->stats.rx_align_errs, 0, + "Number receive alignment errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_resource_errs", - CTLFLAG_RD, &sc->stats.rx_resource_errs, 0, - "Number frames received when no rx buffer available"); + CTLFLAG_RD, &sc->stats.rx_resource_errs, 0, + "Number frames received when no rx buffer available"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_overrun_errs", - CTLFLAG_RD, &sc->stats.rx_overrun_errs, 0, - "Number frames received but not copied due to " - "receive overrun"); + CTLFLAG_RD, &sc->stats.rx_overrun_errs, 0, + "Number frames received but not copied due to receive overrun"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_ip_hdr_csum_errs", - CTLFLAG_RD, &sc->stats.rx_ip_hdr_csum_errs, 0, - "Number frames received with IP header checksum " - "errors"); + CTLFLAG_RD, &sc->stats.rx_ip_hdr_csum_errs, 0, + "Number frames received with IP header checksum errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_tcp_csum_errs", - CTLFLAG_RD, &sc->stats.rx_tcp_csum_errs, 0, - "Number frames received with TCP checksum errors"); + CTLFLAG_RD, &sc->stats.rx_tcp_csum_errs, 0, + "Number frames received with TCP checksum errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_udp_csum_errs", - CTLFLAG_RD, &sc->stats.rx_udp_csum_errs, 0, - "Number frames received with UDP checksum errors"); + CTLFLAG_RD, &sc->stats.rx_udp_csum_errs, 0, + "Number frames received with UDP checksum errors"); } @@ -1661,7 +1663,7 @@ cgem_attach(device_t dev) /* Get memory resource. */ rid = 0; sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); + RF_ACTIVE); if (sc->mem_res == NULL) { device_printf(dev, "could not allocate memory resources.\n"); return (ENOMEM); @@ -1669,8 +1671,7 @@ cgem_attach(device_t dev) /* Get IRQ resource. */ rid = 0; - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_ACTIVE); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->irq_res == NULL) { device_printf(dev, "could not allocate interrupt resource.\n"); cgem_detach(dev); @@ -1691,14 +1692,14 @@ cgem_attach(device_t dev) if_setioctlfn(ifp, cgem_ioctl); if_setstartfn(ifp, cgem_start); if_setcapabilitiesbit(ifp, IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | - IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM, 0); + IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM, 0); if_setsendqlen(ifp, CGEM_NUM_TX_DESCS); if_setsendqready(ifp); /* Disable hardware checksumming by default. */ if_sethwassist(ifp, 0); if_setcapenable(ifp, if_getcapabilities(ifp) & - ~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM)); + ~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM)); sc->if_old_flags = if_getflags(ifp); sc->rxbufs = DEFAULT_NUM_RX_BUFS; @@ -1711,8 +1712,8 @@ cgem_attach(device_t dev) /* Attach phy to mii bus. */ err = mii_attach(dev, &sc->miibus, ifp, - cgem_ifmedia_upd, cgem_ifmedia_sts, - BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + cgem_ifmedia_upd, cgem_ifmedia_sts, BMSR_DEFCAPMASK, + MII_PHY_ANY, MII_OFFSET_ANY, 0); if (err) { device_printf(dev, "attaching PHYs failed\n"); cgem_detach(dev); @@ -1736,7 +1737,7 @@ cgem_attach(device_t dev) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Apr 2 19:06:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 738D9260C0C; Thu, 2 Apr 2020 19:06:18 +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 48tXbW1yFDz3xbv; Thu, 2 Apr 2020 19:06:14 +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 0A7881E4FA; Thu, 2 Apr 2020 19:06:06 +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 032J66tK006254; Thu, 2 Apr 2020 19:06:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032J65Gm006251; Thu, 2 Apr 2020 19:06:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202004021906.032J65Gm006251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 2 Apr 2020 19:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359574 - in head/sys: arm/xilinx conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/xilinx conf X-SVN-Commit-Revision: 359574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 19:06:18 -0000 Author: ian Date: Thu Apr 2 19:06:05 2020 New Revision: 359574 URL: https://svnweb.freebsd.org/changeset/base/359574 Log: Add the Cadence GEM ethernet driver to NOTES so that it gets built with LINT kernels. Move the config for it from files. files into the main config (conf/files), because it works on multiple platforms now. Modified: head/sys/arm/xilinx/files.zynq7 head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.riscv Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Thu Apr 2 18:37:15 2020 (r359573) +++ head/sys/arm/xilinx/files.zynq7 Thu Apr 2 19:06:05 2020 (r359574) @@ -9,7 +9,6 @@ arm/xilinx/zy7_slcr.c standard arm/xilinx/zy7_devcfg.c standard arm/xilinx/zy7_mp.c optional smp -dev/cadence/if_cgem.c optional cgem arm/xilinx/zy7_ehci.c optional ehci arm/xilinx/uart_dev_cdnc.c optional uart arm/xilinx/zy7_gpio.c optional gpio Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Apr 2 18:37:15 2020 (r359573) +++ head/sys/conf/NOTES Thu Apr 2 19:06:05 2020 (r359574) @@ -1786,6 +1786,7 @@ device axphy # Asix Semiconductor AX88x9x device bmtphy # Broadcom BCM5201/BCM5202 and 3Com 3c905C device bnxt # Broadcom NetXtreme-C/NetXtreme-E device brgphy # Broadcom BCM54xx/57xx 1000baseTX +device cgem # Cadence GEM Gigabit Ethernet device ciphy # Cicada/Vitesse CS/VSC8xxx device e1000phy # Marvell 88E1000 1000/100/10-BT device gentbi # Generic 10-bit 1000BASE-{LX,SX} fiber ifaces Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 2 18:37:15 2020 (r359573) +++ head/sys/conf/files Thu Apr 2 19:06:05 2020 (r359574) @@ -1351,6 +1351,7 @@ dev/bwn/if_bwn_phy_g.c optional bwn bhnd dev/bwn/if_bwn_phy_lp.c optional bwn bhnd dev/bwn/if_bwn_phy_n.c optional bwn bhnd dev/bwn/if_bwn_util.c optional bwn bhnd +dev/cadence/if_cgem.c optional cgem fdt dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus Modified: head/sys/conf/files.riscv ============================================================================== --- head/sys/conf/files.riscv Thu Apr 2 18:37:15 2020 (r359573) +++ head/sys/conf/files.riscv Thu Apr 2 19:06:05 2020 (r359574) @@ -4,7 +4,6 @@ cddl/dev/dtrace/riscv/dtrace_subr.c optional dtrace cddl/dev/fbt/riscv/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb -dev/cadence/if_cgem.c optional cgem dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional pci fdt dev/pci/pci_host_generic.c optional pci From owner-svn-src-head@freebsd.org Thu Apr 2 20:02:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FACC262D1C; Thu, 2 Apr 2020 20:02:35 +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 48tYrV3PGKz4KcV; Thu, 2 Apr 2020 20:02:34 +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 36BB81F248; Thu, 2 Apr 2020 20:02:34 +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 032K2Y2j043014; Thu, 2 Apr 2020 20:02:34 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032K2X7n043010; Thu, 2 Apr 2020 20:02:33 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004022002.032K2X7n043010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 2 Apr 2020 20:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359579 - 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: 359579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 20:02:35 -0000 Author: melifaro Date: Thu Apr 2 20:02:33 2020 New Revision: 359579 URL: https://svnweb.freebsd.org/changeset/base/359579 Log: Add routing tests verifying basic RTM_CHANGE functionality. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24239 Modified: head/tests/sys/net/routing/rtsock_common.h head/tests/sys/net/routing/rtsock_config.h head/tests/sys/net/routing/test_rtsock_l3.c head/tests/sys/net/routing/test_rtsock_lladdr.c Modified: head/tests/sys/net/routing/rtsock_common.h ============================================================================== --- head/tests/sys/net/routing/rtsock_common.h Thu Apr 2 19:56:43 2020 (r359578) +++ head/tests/sys/net/routing/rtsock_common.h Thu Apr 2 20:02:33 2020 (r359579) @@ -71,6 +71,8 @@ void rtsock_update_rtm_len(struct rt_msghdr *rtm); void rtsock_validate_message(char *buffer, ssize_t len); void rtsock_add_rtm_sa(struct rt_msghdr *rtm, int addr_type, struct sockaddr *sa); +void file_append_line(char *fname, char *text); + static int _rtm_seq = 42; @@ -151,34 +153,43 @@ _enforce_cloner_loaded(char *cloner_name) return (1); } -static int -iface_create_cloned(char *ifname_ptr) +static char * +iface_create(char *ifname_orig) { struct ifreq ifr; int s; - char prefix[IFNAMSIZ]; + char prefix[IFNAMSIZ], ifname[IFNAMSIZ], *result; char *src, *dst; - for (src = ifname_ptr, dst = prefix; *src && isalpha(*src); src++) + for (src = ifname_orig, dst = prefix; *src && isalpha(*src); src++) *dst++ = *src; *dst = '\0'; if (_enforce_cloner_loaded(prefix) == 0) - return (0); + return (NULL); memset(&ifr, 0, sizeof(struct ifreq)); s = socket(AF_LOCAL, SOCK_DGRAM, 0); - strlcpy(ifr.ifr_name, ifname_ptr, sizeof(ifr.ifr_name)); + strlcpy(ifr.ifr_name, ifname_orig, sizeof(ifr.ifr_name)); RLOG("creating iface %s %s", prefix, ifr.ifr_name); if (ioctl(s, SIOCIFCREATE2, &ifr) < 0) err(1, "SIOCIFCREATE2"); - strlcpy(ifname_ptr, ifr.ifr_name, IFNAMSIZ); - RLOG("created interface %s", ifname_ptr); + strlcpy(ifname, ifr.ifr_name, IFNAMSIZ); + RLOG("created interface %s", ifname); - return (1); + result = strdup(ifname); + + file_append_line(IFACES_FNAME, ifname); + if (strstr(ifname, "epair") == ifname) { + /* call returned epairXXXa, need to add epairXXXb */ + ifname[strlen(ifname) - 1] = 'b'; + file_append_line(IFACES_FNAME, ifname); + } + + return (result); } static int @@ -357,16 +368,19 @@ vnet_wait_interface(char *vnet_name, char *ifname) } void -vnet_switch(char *vnet_name, char *ifname) +vnet_switch(char *vnet_name, char **ifnames, int count) { char buf[512], cmd[512], *line; FILE *fp; - int jid, ret; + int jid, len, ret; - RLOG("switching to vnet %s with interface %s", vnet_name, ifname); - snprintf(cmd, sizeof(cmd), - "/usr/sbin/jail -i -c name=%s persist vnet vnet.interface=%s", - vnet_name, ifname); + RLOG("switching to vnet %s with interface(s) %s", vnet_name, ifnames[0]); + len = snprintf(cmd, sizeof(cmd), + "/usr/sbin/jail -i -c name=%s persist vnet", vnet_name); + for (int i = 0; i < count && len < sizeof(cmd); i++) { + len += snprintf(&cmd[len], sizeof(cmd) - len, + " vnet.interface=%s", ifnames[i]); + } RLOG("jail cmd: \"%s\"\n", cmd); fp = popen(cmd, "r"); @@ -384,8 +398,11 @@ vnet_switch(char *vnet_name, char *ifname) file_append_line(JAILS_FNAME, vnet_name); /* Wait while interface appearsh inside vnet */ - if (!vnet_wait_interface(vnet_name, ifname)) { - atf_tc_fail("unable to move interface %s to jail %s", ifname, vnet_name); + for (int i = 0; i < count; i++) { + if (vnet_wait_interface(vnet_name, ifnames[i])) + continue; + atf_tc_fail("unable to move interface %s to jail %s", + ifnames[i], vnet_name); } if (jail_attach(jid) == -1) { @@ -396,7 +413,16 @@ vnet_switch(char *vnet_name, char *ifname) RLOG("attached to the jail"); } +void +vnet_switch_one(char *vnet_name, char *ifname) +{ + char *ifnames[1]; + ifnames[0] = ifname; + vnet_switch(vnet_name, ifnames, 1); +} + + #define SA_F_IGNORE_IFNAME 0x01 #define SA_F_IGNORE_IFTYPE 0x02 #define SA_F_IGNORE_MEMCMP 0x04 @@ -699,15 +725,19 @@ struct rt_msghdr * rtsock_read_rtm_reply(int fd, char *buffer, size_t buflen, int seq) { struct rt_msghdr *rtm; + int found = 0; while (true) { rtm = rtsock_read_rtm(fd, buffer, buflen); - if (rtm->rtm_pid != getpid()) - continue; - if (rtm->rtm_seq != seq) - continue; - - return (rtm); + if (rtm->rtm_pid == getpid() && rtm->rtm_seq == seq) + found = 1; + if (found) + RLOG("--- MATCHED RTSOCK MESSAGE ---"); + else + RLOG("--- SKIPPED RTSOCK MESSAGE ---"); + rtsock_print_rtm(rtm); + if (found) + return (rtm); } /* NOTREACHED */ Modified: head/tests/sys/net/routing/rtsock_config.h ============================================================================== --- head/tests/sys/net/routing/rtsock_config.h Thu Apr 2 19:56:43 2020 (r359578) +++ head/tests/sys/net/routing/rtsock_config.h Thu Apr 2 20:02:33 2020 (r359579) @@ -32,6 +32,10 @@ #include "params.h" +struct rtsock_config_options { + int num_interfaces; /* number of interfaces to create */ +}; + struct rtsock_test_config { int ifindex; char net4_str[INET_ADDRSTRLEN]; @@ -48,31 +52,30 @@ struct rtsock_test_config { int plen6; char *remote_lladdr; char *ifname; + char **ifnames; bool autocreated_interface; int rtsock_fd; + int num_interfaces; }; struct rtsock_test_config * -config_setup_base(const atf_tc_t *tc) +config_setup(const atf_tc_t *tc, struct rtsock_config_options *co) { + struct rtsock_config_options default_co; struct rtsock_test_config *c; - - c = calloc(1, sizeof(struct rtsock_test_config)); - c->rtsock_fd = -1; - - return c; -} - -struct rtsock_test_config * -config_setup(const atf_tc_t *tc) -{ - struct rtsock_test_config *c; char buf[64], *s; const char *key; int mask; - c = config_setup_base(tc); + if (co == NULL) { + bzero(&default_co, sizeof(default_co)); + co = &default_co; + co->num_interfaces = 1; + } + c = calloc(1, sizeof(struct rtsock_test_config)); + c->rtsock_fd = -1; + key = atf_tc_get_config_var_wd(tc, "rtsock.v4prefix", "192.0.2.0/24"); strlcpy(buf, key, sizeof(buf)); if ((s = strchr(buf, '/')) == NULL) @@ -123,27 +126,17 @@ config_setup(const atf_tc_t *tc) inet_ntop(AF_INET6, &c->net6.sin6_addr, c->net6_str, INET6_ADDRSTRLEN); inet_ntop(AF_INET6, &c->addr6.sin6_addr, c->addr6_str, INET6_ADDRSTRLEN); - c->ifname = strdup("epair"); - c->autocreated_interface = true; + if (co->num_interfaces > 0) { + c->ifnames = calloc(co->num_interfaces, sizeof(char *)); + for (int i = 0; i < co->num_interfaces; i++) + c->ifnames[i] = iface_create("epair"); - if (c->autocreated_interface && (if_nametoindex(c->ifname) == 0)) - { - /* create our own interface */ - char new_ifname[IFNAMSIZ]; - strlcpy(new_ifname, c->ifname, sizeof(new_ifname)); - int ret = iface_create_cloned(new_ifname); - ATF_REQUIRE_MSG(ret != 0, "%s interface creation failed: %s", new_ifname, - strerror(errno)); - c->ifname = strdup(new_ifname); - file_append_line(IFACES_FNAME, new_ifname); - if (strstr(new_ifname, "epair") == new_ifname) { - /* call returned epairXXXa, need to add epairXXXb */ - new_ifname[strlen(new_ifname) - 1] = 'b'; - file_append_line(IFACES_FNAME, new_ifname); - } + c->ifname = c->ifnames[0]; + c->ifindex = if_nametoindex(c->ifname); + ATF_REQUIRE_MSG(c->ifindex != 0, "interface %s not found", + c->ifname); } - c->ifindex = if_nametoindex(c->ifname); - ATF_REQUIRE_MSG(c->ifindex != 0, "inteface %s not found", c->ifname); + c->num_interfaces = co->num_interfaces; c->remote_lladdr = strdup(atf_tc_get_config_var_wd(tc, "rtsock.remote_lladdr", "00:00:5E:00:53:42")); Modified: head/tests/sys/net/routing/test_rtsock_l3.c ============================================================================== --- head/tests/sys/net/routing/test_rtsock_l3.c Thu Apr 2 19:56:43 2020 (r359578) +++ head/tests/sys/net/routing/test_rtsock_l3.c Thu Apr 2 20:02:33 2020 (r359579) @@ -43,7 +43,7 @@ jump_vnet(struct rtsock_test_config *c, const atf_tc_t snprintf(vnet_name, sizeof(vnet_name), "vt-%s", atf_tc_get_ident(tc)); RLOG("jumping to %s", vnet_name); - vnet_switch(vnet_name, c->ifname); + vnet_switch(vnet_name, c->ifnames, c->num_interfaces); /* Update ifindex cache */ c->ifindex = if_nametoindex(c->ifname); @@ -55,7 +55,7 @@ presetup_ipv6_iface(const atf_tc_t *tc) struct rtsock_test_config *c; int ret; - c = config_setup(tc); + c = config_setup(tc, NULL); jump_vnet(c, tc); @@ -89,7 +89,7 @@ presetup_ipv4_iface(const atf_tc_t *tc) struct rtsock_test_config *c; int ret; - c = config_setup(tc); + c = config_setup(tc, NULL); jump_vnet(c, tc); @@ -353,8 +353,12 @@ ATF_TC_HEAD(rtm_get_v4_empty_dst_failure, tc) ATF_TC_BODY(rtm_get_v4_empty_dst_failure, tc) { DECLARE_TEST_VARS; + struct rtsock_config_options co; - c = config_setup_base(tc); + bzero(&co, sizeof(co)); + co.num_interfaces = 0; + + c = config_setup(tc,&co); c->rtsock_fd = rtsock_setup_socket(); rtsock_prepare_route_message(rtm, RTM_GET, NULL, @@ -486,6 +490,133 @@ ATF_TC_CLEANUP(rtm_del_v4_prefix_nogw_success, tc) CLEANUP_AFTER_TEST; } +RTM_DECLARE_ROOT_TEST(rtm_change_v4_gw_success, + "Tests IPv4 gateway change"); + +ATF_TC_BODY(rtm_change_v4_gw_success, tc) +{ + DECLARE_TEST_VARS; + struct rtsock_config_options co; + + bzero(&co, sizeof(co)); + co.num_interfaces = 2; + + c = config_setup(tc, &co); + jump_vnet(c, tc); + + ret = iface_turn_up(c->ifnames[0]); + ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifnames[0]); + ret = iface_turn_up(c->ifnames[1]); + ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifnames[1]); + + ret = iface_setup_addr(c->ifnames[0], c->addr4_str, c->plen4); + ATF_REQUIRE_MSG(ret == 0, "ifconfig failed"); + + /* Use 198.51.100.0/24 "TEST-NET-2" for the second interface */ + ret = iface_setup_addr(c->ifnames[1], "198.51.100.1", 24); + ATF_REQUIRE_MSG(ret == 0, "ifconfig failed"); + + c->rtsock_fd = rtsock_setup_socket(); + + /* Create IPv4 subnetwork with smaller prefix */ + struct sockaddr_in mask4; + struct sockaddr_in net4; + struct sockaddr_in gw4; + prepare_v4_network(c, &net4, &mask4, &gw4); + + prepare_route_message(rtm, RTM_ADD, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_ADD, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); + + /* Change gateway to the one on desiding on the other interface */ + inet_pton(AF_INET, "198.51.100.2", &gw4.sin_addr.s_addr); + prepare_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); + rtsock_send_rtm(c->rtsock_fd, rtm); + + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); + + verify_route_message_extra(rtm, if_nametoindex(c->ifnames[1]), + RTF_DONE | RTF_GATEWAY | RTF_STATIC); + + /* Verify the change has actually taken place */ + prepare_route_message(rtm, RTM_GET, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, NULL); + + rtsock_send_rtm(c->rtsock_fd, rtm); + + /* + * RTM_GET: len 200, pid: 3894, seq 44, errno 0, flags: + * sockaddrs: 0x7 + * af=inet len=16 addr=192.0.2.0 hd={x10, x02, x00{2}, xC0, x00, x02, x00{9}} + * af=inet len=16 addr=198.51.100.2 hd={x10, x02, x00{2}, xC6, x33, x64, x02, x00{8}} + * af=inet len=16 addr=255.255.255.128 hd={x10, x02, xFF, xFF, xFF, xFF, xFF, x80, x00{8}} + */ + + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + verify_route_message_extra(rtm, if_nametoindex(c->ifnames[1]), + RTF_UP | RTF_DONE | RTF_GATEWAY | RTF_STATIC); + +} + +RTM_DECLARE_ROOT_TEST(rtm_change_v4_mtu_success, + "Tests IPv4 path mtu change"); + +ATF_TC_BODY(rtm_change_v4_mtu_success, tc) +{ + DECLARE_TEST_VARS; + + unsigned long test_mtu = 1442; + + c = presetup_ipv4(tc); + + /* Create IPv4 subnetwork with smaller prefix */ + struct sockaddr_in mask4; + struct sockaddr_in net4; + struct sockaddr_in gw4; + prepare_v4_network(c, &net4, &mask4, &gw4); + + prepare_route_message(rtm, RTM_ADD, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, (struct sockaddr *)&gw4); + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + /* Change MTU */ + prepare_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, NULL); + rtm->rtm_inits |= RTV_MTU; + rtm->rtm_rmx.rmx_mtu = test_mtu; + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, NULL); + + RTSOCK_ATF_REQUIRE_MSG(rtm, rtm->rtm_rmx.rmx_mtu == test_mtu, + "expected mtu: %lu, got %lu", test_mtu, rtm->rtm_rmx.rmx_mtu); + + /* Verify the change has actually taken place */ + prepare_route_message(rtm, RTM_GET, (struct sockaddr *)&net4, + (struct sockaddr *)&mask4, NULL); + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + RTSOCK_ATF_REQUIRE_MSG(rtm, rtm->rtm_rmx.rmx_mtu == test_mtu, + "expected mtu: %lu, got %lu", test_mtu, rtm->rtm_rmx.rmx_mtu); +} + + ATF_TC_WITH_CLEANUP(rtm_add_v6_gu_gw_gu_direct_success); ATF_TC_HEAD(rtm_add_v6_gu_gw_gu_direct_success, tc) { @@ -578,6 +709,136 @@ ATF_TC_CLEANUP(rtm_del_v6_gu_prefix_nogw_success, tc) CLEANUP_AFTER_TEST; } +RTM_DECLARE_ROOT_TEST(rtm_change_v6_gw_success, + "Tests IPv6 gateway change"); + +ATF_TC_BODY(rtm_change_v6_gw_success, tc) +{ + DECLARE_TEST_VARS; + struct rtsock_config_options co; + + bzero(&co, sizeof(co)); + co.num_interfaces = 2; + + c = config_setup(tc, &co); + jump_vnet(c, tc); + + ret = iface_turn_up(c->ifnames[0]); + ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifnames[0]); + ret = iface_turn_up(c->ifnames[1]); + ATF_REQUIRE_MSG(ret == 0, "Unable to turn up %s", c->ifnames[1]); + + ret = iface_enable_ipv6(c->ifnames[0]); + ATF_REQUIRE_MSG(ret == 0, "Unable to enable IPv6 on %s", c->ifnames[0]); + ret = iface_enable_ipv6(c->ifnames[1]); + ATF_REQUIRE_MSG(ret == 0, "Unable to enable IPv6 on %s", c->ifnames[1]); + + ret = iface_setup_addr(c->ifnames[0], c->addr6_str, c->plen6); + ATF_REQUIRE_MSG(ret == 0, "ifconfig failed"); + + ret = iface_setup_addr(c->ifnames[1], "2001:DB8:4242::1", 64); + ATF_REQUIRE_MSG(ret == 0, "ifconfig failed"); + + c->rtsock_fd = rtsock_setup_socket(); + + /* Create IPv6 subnetwork with smaller prefix */ + struct sockaddr_in6 mask6; + struct sockaddr_in6 net6; + struct sockaddr_in6 gw6; + prepare_v6_network(c, &net6, &mask6, &gw6); + + prepare_route_message(rtm, RTM_ADD, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, (struct sockaddr *)&gw6); + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_ADD, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, (struct sockaddr *)&gw6); + + /* Change gateway to the one on residing on the other interface */ + inet_pton(AF_INET6, "2001:DB8:4242::4242", &gw6.sin6_addr); + prepare_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, (struct sockaddr *)&gw6); + rtsock_send_rtm(c->rtsock_fd, rtm); + + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, (struct sockaddr *)&gw6); + + verify_route_message_extra(rtm, if_nametoindex(c->ifnames[1]), + RTF_DONE | RTF_GATEWAY | RTF_STATIC); + + /* Verify the change has actually taken place */ + prepare_route_message(rtm, RTM_GET, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, NULL); + + rtsock_send_rtm(c->rtsock_fd, rtm); + + /* + * RTM_GET: len 248, pid: 2268, seq 44, errno 0, flags: + * sockaddrs: 0x7 + * af=inet6 len=28 addr=2001:db8:: hd={x1C, x1C, x00{6}, x20, x01, x0D, xB8, x00{16}} + * af=inet6 len=28 addr=2001:db8:4242::4242 hd={x1C, x1C, x00{6}, x20, x01, x0D, xB8, x42, x42, x00{8}, x42, x42, x00{4}} + * af=inet6 len=28 addr=ffff:ffff:8000:: hd={x1C, x1C, xFF, xFF, xFF, xFF, xFF, xFF, xFF, xFF, xFF, xFF, x80, x00{15}} + */ + + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + verify_route_message_extra(rtm, if_nametoindex(c->ifnames[1]), + RTF_UP | RTF_DONE | RTF_GATEWAY | RTF_STATIC); +} + +RTM_DECLARE_ROOT_TEST(rtm_change_v6_mtu_success, + "Tests IPv6 path mtu change"); + +ATF_TC_BODY(rtm_change_v6_mtu_success, tc) +{ + DECLARE_TEST_VARS; + + unsigned long test_mtu = 1442; + + c = presetup_ipv6(tc); + + /* Create IPv6 subnetwork with smaller prefix */ + struct sockaddr_in6 mask6; + struct sockaddr_in6 net6; + struct sockaddr_in6 gw6; + prepare_v6_network(c, &net6, &mask6, &gw6); + + prepare_route_message(rtm, RTM_ADD, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, (struct sockaddr *)&gw6); + + /* Send route add */ + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + /* Change MTU */ + prepare_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, NULL); + rtm->rtm_inits |= RTV_MTU; + rtm->rtm_rmx.rmx_mtu = test_mtu; + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + verify_route_message(rtm, RTM_CHANGE, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, NULL); + + RTSOCK_ATF_REQUIRE_MSG(rtm, rtm->rtm_rmx.rmx_mtu == test_mtu, + "expected mtu: %lu, got %lu", test_mtu, rtm->rtm_rmx.rmx_mtu); + + /* Verify the change has actually taken place */ + prepare_route_message(rtm, RTM_GET, (struct sockaddr *)&net6, + (struct sockaddr *)&mask6, NULL); + + rtsock_send_rtm(c->rtsock_fd, rtm); + rtm = rtsock_read_rtm_reply(c->rtsock_fd, buffer, sizeof(buffer), rtm->rtm_seq); + + RTSOCK_ATF_REQUIRE_MSG(rtm, rtm->rtm_rmx.rmx_mtu == test_mtu, + "expected mtu: %lu, got %lu", test_mtu, rtm->rtm_rmx.rmx_mtu); +} + ATF_TC_WITH_CLEANUP(rtm_add_v4_temporal1_success); ATF_TC_HEAD(rtm_add_v4_temporal1_success, tc) { @@ -1012,6 +1273,10 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, rtm_del_v4_prefix_nogw_success); ATF_TP_ADD_TC(tp, rtm_add_v6_gu_gw_gu_direct_success); ATF_TP_ADD_TC(tp, rtm_del_v6_gu_prefix_nogw_success); + ATF_TP_ADD_TC(tp, rtm_change_v4_gw_success); + ATF_TP_ADD_TC(tp, rtm_change_v4_mtu_success); + ATF_TP_ADD_TC(tp, rtm_change_v6_gw_success); + ATF_TP_ADD_TC(tp, rtm_change_v6_mtu_success); /* ifaddr tests */ ATF_TP_ADD_TC(tp, rtm_add_v6_gu_ifa_hostroute_success); ATF_TP_ADD_TC(tp, rtm_add_v6_gu_ifa_prefixroute_success); Modified: head/tests/sys/net/routing/test_rtsock_lladdr.c ============================================================================== --- head/tests/sys/net/routing/test_rtsock_lladdr.c Thu Apr 2 19:56:43 2020 (r359578) +++ head/tests/sys/net/routing/test_rtsock_lladdr.c Thu Apr 2 20:02:33 2020 (r359579) @@ -38,7 +38,7 @@ jump_vnet(struct rtsock_test_config *c, const atf_tc_t snprintf(vnet_name, sizeof(vnet_name), "vt-%s", atf_tc_get_ident(tc)); RLOG("jumping to %s", vnet_name); - vnet_switch(vnet_name, c->ifname); + vnet_switch_one(vnet_name, c->ifname); /* Update ifindex cache */ c->ifindex = if_nametoindex(c->ifname); @@ -50,7 +50,7 @@ presetup_ipv6(const atf_tc_t *tc) struct rtsock_test_config *c; int ret; - c = config_setup(tc); + c = config_setup(tc, NULL); jump_vnet(c, tc); @@ -70,7 +70,7 @@ presetup_ipv4(const atf_tc_t *tc) struct rtsock_test_config *c; int ret; - c = config_setup(tc); + c = config_setup(tc, NULL); jump_vnet(c, tc); From owner-svn-src-head@freebsd.org Thu Apr 2 20:15:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA8942637EC; Thu, 2 Apr 2020 20:15:53 +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 48tZ7s35LCz4Pxn; Thu, 2 Apr 2020 20:15:53 +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 C471D1F04C; Thu, 2 Apr 2020 19:56:43 +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 032JuhF2036837; Thu, 2 Apr 2020 19:56:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032JuhJx036836; Thu, 2 Apr 2020 19:56:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004021956.032JuhJx036836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 2 Apr 2020 19:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359578 - head/contrib/llvm-project/lldb/bindings X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/lldb/bindings X-SVN-Commit-Revision: 359578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 20:15:54 -0000 Author: dim Date: Thu Apr 2 19:56:43 2020 New Revision: 359578 URL: https://svnweb.freebsd.org/changeset/base/359578 Log: Merge once more from ^/vendor/llvm-project/release-10.x, to get the lldb/bindings directory, which will be used to provide lua bindings for lldb. Requested by: emaste MFC after: 6 weeks X-MFC-With: 358851 Added: head/contrib/llvm-project/lldb/bindings/ - copied from r359577, vendor/llvm-project/release-10.x/lldb/bindings/ Modified: Directory Properties: head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/lldb/ (props changed) From owner-svn-src-head@freebsd.org Thu Apr 2 20:16:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4A1B26385B; Thu, 2 Apr 2020 20:16:11 +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 48tZ8B4KtXz4Q3r; Thu, 2 Apr 2020 20:16:10 +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 EF4ED1F28C; Thu, 2 Apr 2020 20:06: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 032K6bJ7043397; Thu, 2 Apr 2020 20:06:37 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032K6bOb043396; Thu, 2 Apr 2020 20:06:37 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004022006.032K6bOb043396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 2 Apr 2020 20:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359580 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 359580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 20:16:11 -0000 Author: melifaro Date: Thu Apr 2 20:06:37 2020 New Revision: 359580 URL: https://svnweb.freebsd.org/changeset/base/359580 Log: Use interface fib for proxyarp checks. Before the change, proxyarp checks for src and dst addresses were performed using default fib, breaking multi-fib scenario. PR: 245181 Submitted by: Scott Aitken (original version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24244 Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Apr 2 20:02:33 2020 (r359579) +++ head/sys/netinet/if_ether.c Thu Apr 2 20:06:37 2020 (r359580) @@ -1044,7 +1044,11 @@ reply: (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); } else { - struct llentry *lle = NULL; + /* + * Destination address is not ours. Check if + * proxyarp entry exists or proxyarp is turned on globally. + */ + struct llentry *lle; sin.sin_addr = itaddr; lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)&sin); @@ -1061,8 +1065,8 @@ reply: if (!V_arp_proxyall) goto drop; - /* XXX MRT use table 0 for arp reply */ - if (fib4_lookup_nh_basic(0, itaddr, 0, 0, &nh4) != 0) + if (fib4_lookup_nh_basic(ifp->if_fib, itaddr, 0, 0, + &nh4) != 0) goto drop; /* @@ -1083,8 +1087,8 @@ reply: * wrong network. */ - /* XXX MRT use table 0 for arp checks */ - if (fib4_lookup_nh_basic(0, isaddr, 0, 0, &nh4) != 0) + if (fib4_lookup_nh_basic(ifp->if_fib, isaddr, 0, 0, + &nh4) != 0) goto drop; if (nh4.nh_ifp != ifp) { ARP_LOG(LOG_INFO, "proxy: ignoring request" From owner-svn-src-head@freebsd.org Thu Apr 2 20:47:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B4E32646E1; Thu, 2 Apr 2020 20:47:59 +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 48tZrv1BzNz4cH3; Thu, 2 Apr 2020 20:47:59 +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 C05EC1FB69; Thu, 2 Apr 2020 20:47:51 +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 032Klpd1067657; Thu, 2 Apr 2020 20:47:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032Klp4d067656; Thu, 2 Apr 2020 20:47:51 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004022047.032Klp4d067656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 2 Apr 2020 20:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359581 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 359581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 20:48:00 -0000 Author: cem Date: Thu Apr 2 20:47:51 2020 New Revision: 359581 URL: https://svnweb.freebsd.org/changeset/base/359581 Log: ddb(4): show lockchain: Don't dereference LK_KERNPROC Also, print a little more information for otherwise unhandled inhibited states. Finally, improve the grammar of some prints. Some of the print statements missing verb. Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_turnstile.c Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Thu Apr 2 20:06:37 2020 (r359580) +++ head/sys/kern/subr_turnstile.c Thu Apr 2 20:47:51 2020 (r359581) @@ -1180,17 +1180,21 @@ print_lockchain(struct thread *td, const char *prefix) * blocked on a lock that has an owner. */ while (!db_pager_quit) { - db_printf("%sthread %d (pid %d, %s) ", prefix, td->td_tid, + if (td == (void *)LK_KERNPROC) { + db_printf("%sdisowned (LK_KERNPROC)\n", prefix); + return; + } + db_printf("%sthread %d (pid %d, %s) is ", prefix, td->td_tid, td->td_proc->p_pid, td->td_name); switch (td->td_state) { case TDS_INACTIVE: - db_printf("is inactive\n"); + db_printf("inactive\n"); return; case TDS_CAN_RUN: - db_printf("can run\n"); + db_printf("runnable\n"); return; case TDS_RUNQ: - db_printf("is on a run queue\n"); + db_printf("on a run queue\n"); return; case TDS_RUNNING: db_printf("running on CPU %d\n", td->td_oncpu); @@ -1218,7 +1222,7 @@ print_lockchain(struct thread *td, const char *prefix) td = owner; break; } - db_printf("inhibited\n"); + db_printf("inhibited: %s\n", KTDSTATE(td)); return; default: db_printf("??? (%#x)\n", td->td_state); From owner-svn-src-head@freebsd.org Thu Apr 2 21:08:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B7232651D2; Thu, 2 Apr 2020 21:08:36 +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 48tbJg5fH3z3GcB; Thu, 2 Apr 2020 21:08: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 F337C1FF98; Thu, 2 Apr 2020 21:08:28 +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 032L8S68079313; Thu, 2 Apr 2020 21:08:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 032L8SAR079311; Thu, 2 Apr 2020 21:08:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004022108.032L8SAR079311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 2 Apr 2020 21:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359582 - in head/contrib/llvm-project/lldb: include/lldb source/Core X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/contrib/llvm-project/lldb: include/lldb source/Core X-SVN-Commit-Revision: 359582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 21:08:36 -0000 Author: emaste Date: Thu Apr 2 21:08:28 2020 New Revision: 359582 URL: https://svnweb.freebsd.org/changeset/base/359582 Log: lldb: use lua as the default script language In the FreeBSD base system we do not have Python support in lldb, but will have Lua support. Make Lua the default. This needs to be made into a configure-time option; that is being discussed upstream and will appear in a future lldb import. For now carry this change as a tiny patch to our copy of lldb. Modified: head/contrib/llvm-project/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm-project/lldb/source/Core/CoreProperties.td Modified: head/contrib/llvm-project/lldb/include/lldb/lldb-enumerations.h ============================================================================== --- head/contrib/llvm-project/lldb/include/lldb/lldb-enumerations.h Thu Apr 2 20:47:51 2020 (r359581) +++ head/contrib/llvm-project/lldb/include/lldb/lldb-enumerations.h Thu Apr 2 21:08:28 2020 (r359582) @@ -215,7 +215,7 @@ enum ScriptLanguage { eScriptLanguagePython, eScriptLanguageLua, eScriptLanguageUnknown, - eScriptLanguageDefault = eScriptLanguagePython + eScriptLanguageDefault = eScriptLanguageLua }; /// Register numbering types. Modified: head/contrib/llvm-project/lldb/source/Core/CoreProperties.td ============================================================================== --- head/contrib/llvm-project/lldb/source/Core/CoreProperties.td Thu Apr 2 20:47:51 2020 (r359581) +++ head/contrib/llvm-project/lldb/source/Core/CoreProperties.td Thu Apr 2 21:08:28 2020 (r359582) @@ -35,7 +35,7 @@ let Definition = "debugger" in { Desc<"The debugger command line prompt displayed for the user.">; def ScriptLanguage: Property<"script-lang", "Enum">, Global, - DefaultEnumValue<"eScriptLanguagePython">, + DefaultEnumValue<"eScriptLanguageLua">, EnumValues<"OptionEnumValues(g_language_enumerators)">, Desc<"The script language to be used for evaluating user-written scripts.">; def StopDisassemblyCount: Property<"stop-disassembly-count", "SInt64">, From owner-svn-src-head@freebsd.org Fri Apr 3 01:26:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D749826EC1F; Fri, 3 Apr 2020 01:26:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tj1j1XnXz4R0Q; Fri, 3 Apr 2020 01:26:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99FC42368A; Fri, 3 Apr 2020 01:17:44 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0331HitL036411; Fri, 3 Apr 2020 01:17:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0331Hh1T036408; Fri, 3 Apr 2020 01:17:43 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202004030117.0331Hh1T036408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 3 Apr 2020 01:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359585 - in head/usr.bin/calendar: . tests X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/usr.bin/calendar: . tests X-SVN-Commit-Revision: 359585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 01:26:02 -0000 Author: gonzo Date: Fri Apr 3 01:17:43 2020 New Revision: 359585 URL: https://svnweb.freebsd.org/changeset/base/359585 Log: Fix calculation of the recurring weekdays Both the result of the first_dayofweek_of_year and the target weekday are zero-based (0 fo sunday) while the target month-day or year-day is 1-based. Adjust logic accordingly. Also add testcase for this PR to the kyua test suite PR: 201062 Submitted by: Richard Narron MFC after: 1 week Added: head/usr.bin/calendar/tests/regress.s5.out (contents, props changed) Modified: head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/tests/calendar.calibrate head/usr.bin/calendar/tests/regress.sh Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Fri Apr 3 00:38:12 2020 (r359584) +++ head/usr.bin/calendar/parsedata.c Fri Apr 3 01:17:43 2020 (r359585) @@ -578,7 +578,9 @@ parsedaymonth(char *date, int *yearp, int *monthp, int /* Every dayofweek of the year */ if (lflags == (F_DAYOFWEEK | F_VARIABLE)) { dow = first_dayofweek_of_year(year); - d = (idayofweek - dow + 8) % 7; + if (dow < 0) + continue; + d = (idayofweek - dow + 7) % 7 + 1; while (d <= 366) { if (remember_yd(year, d, &rm, &rd)) remember(&remindex, @@ -616,7 +618,9 @@ parsedaymonth(char *date, int *yearp, int *monthp, int (F_MONTH | F_DAYOFWEEK | F_MODIFIERINDEX | F_VARIABLE)) { offset = indextooffset(modifierindex); dow = first_dayofweek_of_month(year, imonth); - d = (idayofweek - dow + 8) % 7; + if (dow < 0) + continue; + d = (idayofweek - dow + 7) % 7 + 1; if (offset > 0) { while (d <= yearinfo->monthdays[imonth]) { @@ -650,7 +654,9 @@ parsedaymonth(char *date, int *yearp, int *monthp, int /* Every dayofweek of the month */ if (lflags == (F_DAYOFWEEK | F_MONTH | F_VARIABLE)) { dow = first_dayofweek_of_month(year, imonth); - d = (idayofweek - dow + 8) % 7; + if (dow < 0) + continue; + d = (idayofweek - dow + 7) % 7 + 1; while (d <= yearinfo->monthdays[imonth]) { if (remember_ymd(year, imonth, d)) remember(&remindex, Modified: head/usr.bin/calendar/tests/calendar.calibrate ============================================================================== --- head/usr.bin/calendar/tests/calendar.calibrate Fri Apr 3 00:38:12 2020 (r359584) +++ head/usr.bin/calendar/tests/calendar.calibrate Fri Apr 3 01:17:43 2020 (r359585) @@ -188,6 +188,7 @@ LANG=C 06/28 jun 28 06/29 jun 29 06/30 jun 30 +06/SunThird sunthird 07/01 jul 1 07/02 jul 2 07/03 jul 3 Added: head/usr.bin/calendar/tests/regress.s5.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/tests/regress.s5.out Fri Apr 3 01:17:43 2020 (r359585) @@ -0,0 +1,3 @@ +Jun 21* sunthird +Jun 21 jun 21 +Jun 22 jun 22 Modified: head/usr.bin/calendar/tests/regress.sh ============================================================================== --- head/usr.bin/calendar/tests/regress.sh Fri Apr 3 00:38:12 2020 (r359584) +++ head/usr.bin/calendar/tests/regress.sh Fri Apr 3 01:17:43 2020 (r359585) @@ -7,12 +7,13 @@ CALENDAR="${CALENDAR_BIN} ${CALENDAR_FILE}" REGRESSION_START($1) -echo 1..28 +echo 1..29 REGRESSION_TEST(`s1',`$CALENDAR -t 29.12.2006') REGRESSION_TEST(`s2',`$CALENDAR -t 30.12.2006') REGRESSION_TEST(`s3',`$CALENDAR -t 31.12.2006') REGRESSION_TEST(`s4',`$CALENDAR -t 01.01.2007') +REGRESSION_TEST(`s5',`$CALENDAR -t 21.06.2015') REGRESSION_TEST(`a1',`$CALENDAR -A 3 -t 28.12.2006') REGRESSION_TEST(`a2',`$CALENDAR -A 3 -t 29.12.2006') From owner-svn-src-head@freebsd.org Fri Apr 3 02:39:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3B93270CFD; Fri, 3 Apr 2020 02:39:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48tkfz5kJwz3PgP; Fri, 3 Apr 2020 02:39:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E97AF246AF; Fri, 3 Apr 2020 02:39:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0332dkST084988; Fri, 3 Apr 2020 02:39:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0332dkDG084987; Fri, 3 Apr 2020 02:39:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202004030239.0332dkDG084987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 3 Apr 2020 02:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359587 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 359587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 02:39:57 -0000 Author: gonzo Date: Fri Apr 3 02:39:46 2020 New Revision: 359587 URL: https://svnweb.freebsd.org/changeset/base/359587 Log: Remove hardcoded US Election Day from calendar.usholiday calendar(1) syntax is not capable of representing the rules for the US Election Day. The hardcoded date was set in r15066 in 1996 and hasn't changed since then. PR: 173389 Reported by: Steve Ames MFC after: 1 week Modified: head/usr.bin/calendar/calendars/calendar.usholiday Modified: head/usr.bin/calendar/calendars/calendar.usholiday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.usholiday Fri Apr 3 01:31:48 2020 (r359586) +++ head/usr.bin/calendar/calendars/calendar.usholiday Fri Apr 3 02:39:46 2020 (r359587) @@ -30,7 +30,6 @@ 09/22* Autumnal Equinox 10/MonSecond Columbus Day in USA (2nd Monday of October) 10/31 All Hallows Eve (Halloween) -11/05* Election Day in USA (1st Tuesday after 1st Monday for even years) 11/SunFirst Daylight Savings Time ends in USA; clocks move back (1st Sunday of November) 11/11 Veterans' Day 11/ThuFourth Thanksgiving Day (4th Thursday in November) From owner-svn-src-head@freebsd.org Fri Apr 3 13:05:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48C172A22E5; Fri, 3 Apr 2020 13:05:37 +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 48v0Xv1M0Xz3N6x; Fri, 3 Apr 2020 13:05:35 +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 BE3C84E47; Fri, 3 Apr 2020 13:05:26 +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 033D5Q7h068417; Fri, 3 Apr 2020 13:05:26 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033D5Q8H068416; Fri, 3 Apr 2020 13:05:26 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004031305.033D5Q8H068416@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: Fri, 3 Apr 2020 13:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359591 - head/sbin/recoverdisk X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/sbin/recoverdisk X-SVN-Commit-Revision: 359591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 13:05:37 -0000 Author: 0mp (doc,ports committer) Date: Fri Apr 3 13:05:26 2020 New Revision: 359591 URL: https://svnweb.freebsd.org/changeset/base/359591 Log: Bump date after recent changes and lint Modified: head/sbin/recoverdisk/recoverdisk.1 Modified: head/sbin/recoverdisk/recoverdisk.1 ============================================================================== --- head/sbin/recoverdisk/recoverdisk.1 Fri Apr 3 05:11:16 2020 (r359590) +++ head/sbin/recoverdisk/recoverdisk.1 Fri Apr 3 13:05:26 2020 (r359591) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd April 3, 2020 .Dt RECOVERDISK 1 .Os .Sh NAME @@ -72,9 +72,12 @@ The default is 60 and the unit is "progress messages" go well, this is the same as once per minute. .It Fl u Ar pattern By default blocks which encounter read errors will be filled with -the pattern "_UNREAD_" in the output file. This option can be -used to specify another pattern. Nothing gets written if the string -is empty. +the pattern +.Ql _UNREAD_ +in the output file. +This option can be +used to specify another pattern. +Nothing gets written if the string is empty. .It Fl v Enables nicer status report using ANSI escapes and UTF-8. .It Fl w Ar writelist @@ -164,7 +167,7 @@ This is harmless and can be avoided by setting to no more than 128kB. .Pp .Nm -needs to know about read errors as fast as possible, i.e. retries by lower +needs to know about read errors as fast as possible, i.e., retries by lower layers will usually slow down the operation. When using .Xr cam 4 From owner-svn-src-head@freebsd.org Fri Apr 3 13:35:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D6C12A2EC9; Fri, 3 Apr 2020 13:35:54 +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 48v1Cq1szTz43gx; Fri, 3 Apr 2020 13:35:51 +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 D67B0549C; Fri, 3 Apr 2020 13:35:44 +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 033DZiuJ086412; Fri, 3 Apr 2020 13:35:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033DZiaj086411; Fri, 3 Apr 2020 13:35:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004031335.033DZiaj086411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Apr 2020 13:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359594 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 359594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 13:35:55 -0000 Author: markj Date: Fri Apr 3 13:35:44 2020 New Revision: 359594 URL: https://svnweb.freebsd.org/changeset/base/359594 Log: Fix the description of the -m flag in top.1. PR: 244153 Submitted by: fehmi noyan isi MFC after: 3 days Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 ============================================================================== --- head/usr.bin/top/top.1 Fri Apr 3 13:26:38 2020 (r359593) +++ head/usr.bin/top/top.1 Fri Apr 3 13:35:44 2020 (r359594) @@ -103,7 +103,7 @@ Toggle displaying thread ID (tid) instead of process i Do not display the .Nm process itself. -.It Fl display +.It Fl m Display either 'cpu' or 'io' statistics. Default is 'cpu'. .It Fl n From owner-svn-src-head@freebsd.org Fri Apr 3 13:57:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 910212A39AC; Fri, 3 Apr 2020 13:57:52 +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 48v1jC168dz4CFS; Fri, 3 Apr 2020 13:57:51 +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 5F08858E7; Fri, 3 Apr 2020 13:57: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 033Dvge4098724; Fri, 3 Apr 2020 13:57:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033DvgOa098723; Fri, 3 Apr 2020 13:57:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004031357.033DvgOa098723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Apr 2020 13:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359595 - head/sys/geom/journal X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/journal X-SVN-Commit-Revision: 359595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 13:57:52 -0000 Author: markj Date: Fri Apr 3 13:57:41 2020 New Revision: 359595 URL: https://svnweb.freebsd.org/changeset/base/359595 Log: geom_journal: Only stop the switcher process if one was started. PR: 243196 MFC after: 1 week Modified: head/sys/geom/journal/g_journal.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Fri Apr 3 13:35:44 2020 (r359594) +++ head/sys/geom/journal/g_journal.c Fri Apr 3 13:57:41 2020 (r359595) @@ -2757,7 +2757,8 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_stop_switcher(); + if (g_journal_switcher_proc != NULL) + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); From owner-svn-src-head@freebsd.org Fri Apr 3 14:11:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2ECC2A3E47; Fri, 3 Apr 2020 14:11:07 +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 48v20T6KXtz4HYP; Fri, 3 Apr 2020 14:11:05 +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 6FE9A5AEF; Fri, 3 Apr 2020 14:03:59 +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 033E3xFC004783; Fri, 3 Apr 2020 14:03:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033E3xaE004782; Fri, 3 Apr 2020 14:03:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004031403.033E3xaE004782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Apr 2020 14:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359596 - head/usr.bin/xargs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/xargs X-SVN-Commit-Revision: 359596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 14:11:07 -0000 Author: markj Date: Fri Apr 3 14:03:58 2020 New Revision: 359596 URL: https://svnweb.freebsd.org/changeset/base/359596 Log: xargs: Fix exit status expression when a child process fails to exec. PR: 244327 Submitted by: thomas.duffy.99@alumni.brown.edu MFC after: 1 week Modified: head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Fri Apr 3 13:57:41 2020 (r359595) +++ head/usr.bin/xargs/xargs.c Fri Apr 3 14:03:58 2020 (r359596) @@ -650,7 +650,7 @@ waitchildren(const char *name, int waitall) if (childerr != 0 && cause_exit == 0) { errno = childerr; waitall = 1; - cause_exit = ENOENT ? 127 : 126; + cause_exit = errno == ENOENT ? 127 : 126; warn("%s", name); } else if (WIFSIGNALED(status)) { waitall = cause_exit = 1; From owner-svn-src-head@freebsd.org Fri Apr 3 14:41:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A0AA2A4B8F; Fri, 3 Apr 2020 14:41:12 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 48v2fw0Pf7z4TLY; Fri, 3 Apr 2020 14:40:55 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-wm1-f44.google.com with SMTP id r16so7388326wmg.5; Fri, 03 Apr 2020 07:40:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=fLfqM4ESsZDUGae9a+H5GkKk4fuNFViOLmKPhInxX8s=; b=L8nhIWI2idEL0RkmE4zfUNUgIIsFtbaj0Uf9cUesY+MYuF6A730jsMu46xvy45sp42 cMxRfWp/gEn1QoUFEidmm7+0Tx3rvrMEy9tC6YgNX5uOwPemOncFtD1P2lOEuF4E1Vlv YfxBCBpTokgI9+K3IQ3GN7yHFjqTqrGPrkKtkKyy1UvJwFGlvAmw6GoZWXVZR8aP2OiI n+Sw8ssskrGnKaaQYz51Bi1Oin2lZVuYEou66iX/0TfnKqs3AnRgD9tyhkfCFVs0asOr cq8959Oisku9kQmCP4d1H28/lJ9zFtvTQRDFHRuozY0F6nmbwVl+864zAoT5/YzAt3gH VEhg== X-Gm-Message-State: AGi0PuZs7TUEdmf9TQkjQAthml/Lzh5FD7iXei8O2tfe5VCxz/nD7FsT Ug8VwT6sGuQ6wLYoWv9tF7x4xNAS3bc= X-Google-Smtp-Source: APiQypIrRWf5jhz+oTqNinuj62eMYjkd4YkJWHjDQkKwRYVu4dyvVp4ZwQltD1E/SPYA1tXYbMJQTA== X-Received: by 2002:a1c:6505:: with SMTP id z5mr4612561wmb.28.1585923312320; Fri, 03 Apr 2020 07:15:12 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id d6sm12360557wrw.10.2020.04.03.07.15.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Apr 2020 07:15:11 -0700 (PDT) Subject: Re: svn commit: r359594 - head/usr.bin/top To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004031335.033DZiaj086411@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: Date: Fri, 3 Apr 2020 16:15:28 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202004031335.033DZiaj086411@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 48v2fw0Pf7z4TLY X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.63 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[FreeBSD.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-0.63)[ip: (-2.17), ipnet: 209.85.128.0/17(-0.48), asn: 15169(-0.44), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[44.128.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[44.128.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)[0mp@FreeBSD.org,mpp302@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 14:41:12 -0000 Hi, On 4/3/20 3:35 PM, Mark Johnston wrote: > Author: markj > Date: Fri Apr 3 13:35:44 2020 > New Revision: 359594 > URL: https://svnweb.freebsd.org/changeset/base/359594 > > Log: > Fix the description of the -m flag in top.1. > > PR: 244153 > Submitted by: fehmi noyan isi > MFC after: 3 days > > Modified: > head/usr.bin/top/top.1 > > Modified: head/usr.bin/top/top.1 > ============================================================================== > --- head/usr.bin/top/top.1 Fri Apr 3 13:26:38 2020 (r359593) > +++ head/usr.bin/top/top.1 Fri Apr 3 13:35:44 2020 (r359594) > @@ -103,7 +103,7 @@ Toggle displaying thread ID (tid) instead of process i > Do not display the > .Nm > process itself. > -.It Fl display > +.It Fl m Shoudn't it be It "Fl m Ar display"? From owner-svn-src-head@freebsd.org Fri Apr 3 14:47:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 029752A4F58; Fri, 3 Apr 2020 14:47: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 48v2pq3YNCz4Wfg; Fri, 3 Apr 2020 14:47:47 +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 8DC096356; Fri, 3 Apr 2020 14:47:40 +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 033EleDN029766; Fri, 3 Apr 2020 14:47:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033Ele1s029765; Fri, 3 Apr 2020 14:47:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004031447.033Ele1s029765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Apr 2020 14:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359597 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 359597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 14:47:49 -0000 Author: markj Date: Fri Apr 3 14:47:40 2020 New Revision: 359597 URL: https://svnweb.freebsd.org/changeset/base/359597 Log: Fix up r359594: -m takes an argument. PR: 244153 Reported by: 0mp MFC with: r359594 Modified: head/usr.bin/top/top.1 Modified: head/usr.bin/top/top.1 ============================================================================== --- head/usr.bin/top/top.1 Fri Apr 3 14:03:58 2020 (r359596) +++ head/usr.bin/top/top.1 Fri Apr 3 14:47:40 2020 (r359597) @@ -103,7 +103,7 @@ Toggle displaying thread ID (tid) instead of process i Do not display the .Nm process itself. -.It Fl m +.It Fl m Ar display Display either 'cpu' or 'io' statistics. Default is 'cpu'. .It Fl n From owner-svn-src-head@freebsd.org Fri Apr 3 14:48:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50E1D2A4F87; Fri, 3 Apr 2020 14:48:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 48v2qH6dVQz4Wnh; Fri, 3 Apr 2020 14:48:11 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x72f.google.com with SMTP id y3so3371884qky.8; Fri, 03 Apr 2020 07:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XE6wUvc0oA2MIfOrR7H1on4SxWv/14K/Y5krdzuGwaQ=; b=N6VXWMTy2Xoan/jzq3vs9+KY3CzYYwkjUgfCi7ovqIueugruYrlkNN0mzFYJLXUXWT EkG6rmrVVIoNga0YD0D6tUScyB96CqmmSnjXZZapEMlcOQ12JvOwn9b89eYUqOcWgBVj L0D107nG7ASBb0Tcy5X6DZCMgBnLlPKDqpJfF9TSdEjnIYr/GZRl3F3uwF7mQHDFgbI1 eeEbHWT6Jr1P5a//qZjARR0cOlfSn2++kw7Zit1a1BS3ybLUiQc/uYUJQFCCL45vDRPC jLSnsuTfFPQTq9PM8exWzD3I8O70elunEpBZQvtNz092CxWBArJzYRqqTuezZ711TnQ6 JqDw== 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=XE6wUvc0oA2MIfOrR7H1on4SxWv/14K/Y5krdzuGwaQ=; b=h/dlDF+lhOkLQr5V7b/Lhuf1fichrdJW90vi597ExcU4wTNNwdrXAaHuyhgUtXE3JF yC0b+Kg2KufmgKgW6bNZaMsBJtuuxiojKJBLLa9cjm4Lu9gZXyuvSn4qd9kRxgY3e7ac YvFVKS++Cg8LjnspWXDmzLka4uyM42KWfVp/9/fTpbxQe4h4iY8EfDt8AYf5A11O5eMY N9/C8/i575NXbZvXX22ChZE4JKQRUEOsbFR1KbM4+aRfwAPmUC7k1FgL4wbV46LBnXGf 0yu7shx8rBUpMPd3Daj1b+7mku3NaEM8Tt08hcbeYNtLlS31SJ2z9gjS/UqJe4miklgk +ViQ== X-Gm-Message-State: AGi0PuYUzce6Pu/BSlu8hlj+iI/nrhkwNuFOsscr+8A2VnYp4C1JlBlz BDw1VTD/kRXVjYGUFLxpApD7+s+4 X-Google-Smtp-Source: APiQypLn0kfJPah90c+C8Wh1C/Cu8SsfX6nr99c/8NEEohyzXum0MWQNS8MNmTOpMZVRFGyBQI5OUg== X-Received: by 2002:a05:620a:341:: with SMTP id t1mr7841582qkm.356.1585925281871; Fri, 03 Apr 2020 07:48:01 -0700 (PDT) Received: from raichu (toroon0560w-lp130-10-174-94-17-182.dsl.bell.ca. [174.94.17.182]) by smtp.gmail.com with ESMTPSA id 73sm6511254qkf.82.2020.04.03.07.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 07:48:01 -0700 (PDT) Sender: Mark Johnston Date: Fri, 3 Apr 2020 10:47:59 -0400 From: Mark Johnston To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359594 - head/usr.bin/top Message-ID: <20200403144759.GE9531@raichu> References: <202004031335.033DZiaj086411@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48v2qH6dVQz4Wnh X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 14:48:12 -0000 On Fri, Apr 03, 2020 at 04:15:28PM +0200, Mateusz Piotrowski wrote: > Hi, > > On 4/3/20 3:35 PM, Mark Johnston wrote: > > Author: markj > > Date: Fri Apr 3 13:35:44 2020 > > New Revision: 359594 > > URL: https://svnweb.freebsd.org/changeset/base/359594 > > > > Log: > > Fix the description of the -m flag in top.1. > > PR: 244153 > > Submitted by: fehmi noyan isi > > MFC after: 3 days > > > > Modified: > > head/usr.bin/top/top.1 > > > > Modified: head/usr.bin/top/top.1 > > ============================================================================== > > --- head/usr.bin/top/top.1 Fri Apr 3 13:26:38 2020 (r359593) > > +++ head/usr.bin/top/top.1 Fri Apr 3 13:35:44 2020 (r359594) > > @@ -103,7 +103,7 @@ Toggle displaying thread ID (tid) instead of process i > > Do not display the > > .Nm > > process itself. > > -.It Fl display > > +.It Fl m > Shoudn't it be It "Fl m Ar display"? Thanks, you are right. Fixed in r359597. From owner-svn-src-head@freebsd.org Fri Apr 3 15:56:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E43402A6F2A; Fri, 3 Apr 2020 15:56:08 +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 48v4Kg4c85z3yYT; Fri, 3 Apr 2020 15:56:07 +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 79FE8710B; Fri, 3 Apr 2020 15:47:16 +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 033FlGJv066231; Fri, 3 Apr 2020 15:47:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033FlGLd066229; Fri, 3 Apr 2020 15:47:16 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004031547.033FlGLd066229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 3 Apr 2020 15:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359598 - head/usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/usr.bin/kyua X-SVN-Commit-Revision: 359598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 15:56:09 -0000 Author: brooks Date: Fri Apr 3 15:47:15 2020 New Revision: 359598 URL: https://svnweb.freebsd.org/changeset/base/359598 Log: Install a kyua.conf based on the one in devel/kyua. The kyua.conf from examples doesn't match the expected config and contains a lot of undesirable entries such as setting the architecture to amd64 explicitly. Reported by: arichardson (missing config) Reviewed by: emaste Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D24267 Added: head/usr.bin/kyua/kyua.conf-default (contents, props changed) Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Fri Apr 3 14:47:40 2020 (r359597) +++ head/usr.bin/kyua/Makefile Fri Apr 3 15:47:15 2020 (r359598) @@ -30,8 +30,11 @@ CFLAGS+= -Wno-deprecated-declarations FILESGROUPS= DOCS EXAMPLES MISC STORE -CONFS= kyua.conf +# Install a minimal default config that uses the 'tests' user. +# The examples config is not appropriate for general use. +CONFS= kyua.conf-default CONFSDIR= ${KYUA_CONFDIR} +CONFSNAME= kyua.conf DOCS= AUTHORS CONTRIBUTORS LICENSE DOCSDIR= ${KYUA_DOCDIR} Added: head/usr.bin/kyua/kyua.conf-default ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/kyua/kyua.conf-default Fri Apr 3 15:47:15 2020 (r359598) @@ -0,0 +1,14 @@ +-- $FreeBSD$ +-- +-- System-wide configuration file for kyua(1). See kyua.conf(5) for details +-- on the syntax. +-- + +syntax(2) + +-- User to drop privileges to when invoking kyua(1) as root and a test case +-- requests to be run with non-root permissions. +unprivileged_user = 'tests' + +-- An example to set a configuration property specific to FreeBSD. +--test_suites.FreeBSD.fstype = 'ffs' From owner-svn-src-head@freebsd.org Fri Apr 3 15:56:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F21302A6F2E; Fri, 3 Apr 2020 15:56:08 +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 48v4Kh0ZVPz3yYp; Fri, 3 Apr 2020 15:56:07 +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 852CD741B; Fri, 3 Apr 2020 15:55:59 +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 033FtxOE072026; Fri, 3 Apr 2020 15:55:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033FtxOA072025; Fri, 3 Apr 2020 15:55:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004031555.033FtxOA072025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 15:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359600 - head/lib/clang/liblldb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/clang/liblldb X-SVN-Commit-Revision: 359600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 15:56:09 -0000 Author: emaste Date: Fri Apr 3 15:55:58 2020 New Revision: 359600 URL: https://svnweb.freebsd.org/changeset/base/359600 Log: lldb: commit generated LLDBWrapLua.cpp Added: head/lib/clang/liblldb/LLDBWrapLua.cpp (contents, props changed) Added: head/lib/clang/liblldb/LLDBWrapLua.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/liblldb/LLDBWrapLua.cpp Fri Apr 3 15:55:58 2020 (r359600) @@ -0,0 +1,71334 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 3.0.12 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + + +#ifndef SWIGLUA +#define SWIGLUA +#endif + +#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA +#define SWIG_LUA_MODULE_GLOBAL + + +#ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; + +template T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * luarun.swg + * + * This file contains the runtime support for Lua modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lua.h" +#include "lauxlib.h" +#include /* for malloc */ +#include /* for a few sanity tests */ + +/* ----------------------------------------------------------------------------- + * Lua flavors + * ----------------------------------------------------------------------------- */ + +#define SWIG_LUA_FLAVOR_LUA 1 +#define SWIG_LUA_FLAVOR_ELUA 2 +#define SWIG_LUA_FLAVOR_ELUAC 3 + +#if !defined(SWIG_LUA_TARGET) +# error SWIG_LUA_TARGET not defined +#endif + +#if defined(SWIG_LUA_ELUA_EMULATE) + +struct swig_elua_entry; + +typedef struct swig_elua_key { + int type; + union { + const char* strkey; + lua_Number numkey; + } key; +} swig_elua_key; + +typedef struct swig_elua_val { + int type; + union { + lua_Number number; + const struct swig_elua_entry *table; + const char *string; + lua_CFunction function; + struct { + char member; + long lvalue; + void *pvalue; + swig_type_info **ptype; + } userdata; + } value; +} swig_elua_val; + +typedef struct swig_elua_entry { + swig_elua_key key; + swig_elua_val value; +} swig_elua_entry; + +#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} } +#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} } +#define LNILKEY {LUA_TNIL, {.strkey = 0} } + +#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} } +#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} } +#define LROVAL(x) {LUA_TTABLE, {.table = x} } +#define LNILVAL {LUA_TNIL, {.string = 0} } +#define LSTRVAL(x) {LUA_TSTRING, {.string = x} } + +#define LUA_REG_TYPE swig_elua_entry + +#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable" + +#define lua_pushrotable(L,p)\ + lua_newtable(L);\ + assert(p);\ + SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p)); + +#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\ + LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } } + +#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\ + LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } } +#endif + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C) +# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C) +# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C) +# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C) + /* Those two types of constants are not supported in elua */ + +#ifndef SWIG_LUA_CONSTTAB_POINTER +#warning eLua does not support pointers as constants. By default, nil will be used as value +#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL +#endif + +#ifndef SWIG_LUA_CONSTTAB_BINARY +#warning eLua does not support pointers to member as constants. By default, nil will be used as value +#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL +#endif +#else /* SWIG_LUA_FLAVOR_LUA */ +# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0 +# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0 +# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0 +# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0 +# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\ + SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D +# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\ + SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D +#endif + +#ifndef SWIG_LUA_ELUA_EMULATE +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING} +# define LSTRVAL LRO_STRVAL +#endif +#endif /* SWIG_LUA_ELUA_EMULATE*/ + +#ifndef SWIG_LUA_ELUA_EMULATE +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) + +#ifndef MIN_OPT_LEVEL +#define MIN_OPT_LEVEL 2 +#endif + +#include "lrodefs.h" +#include "lrotable.h" +#endif +#endif /* SWIG_LUA_ELUA_EMULATE*/ +/* ----------------------------------------------------------------------------- + * compatibility defines + * ----------------------------------------------------------------------------- */ + +/* History of Lua C API length functions: In Lua 5.0 (and before?) + there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen", + but a compatibility define of "lua_strlen" was added. In Lua 5.2, + this function was again renamed, to "lua_rawlen" (to emphasize that + it doesn't call the "__len" metamethod), and the compatibility + define of lua_strlen was removed. All SWIG uses have been updated + to "lua_rawlen", and we add our own defines of that here for older + versions of Lua. */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 +# define lua_rawlen lua_strlen +#elif LUA_VERSION_NUM == 501 +# define lua_rawlen lua_objlen +#endif + + +/* lua_pushglobaltable is the recommended "future-proof" way to get + the global table for Lua 5.2 and later. Here we define + lua_pushglobaltable ourselves for Lua versions before 5.2. */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX) +#endif + +/* lua_absindex was introduced in Lua 5.2 */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1) +#endif + +/* lua_rawsetp was introduced in Lua 5.2 */ +#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +#define lua_rawsetp(L,index,ptr)\ + lua_pushlightuserdata(L,(void*)(ptr));\ + lua_insert(L,-2);\ + lua_rawset(L,index); + +#define lua_rawgetp(L,index,ptr)\ + lua_pushlightuserdata(L,(void*)(ptr));\ + lua_rawget(L,index); + +#endif + +/* -------------------------------------------------------------------------- + * Helper functions for error handling + * -------------------------------------------------------------------------- */ + +/* Push the string STR on the Lua stack, like lua_pushstring, but + prefixed with the the location of the innermost Lua call-point + (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pusherrstring (lua_State *L, const char *str) +{ + luaL_where (L, 1); + lua_pushstring (L, str); + lua_concat (L, 2); +} + +/* Push a formatted string generated from FMT and following args on + the Lua stack, like lua_pushfstring, but prefixed with the the + location of the innermost Lua call-point (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...) +{ + va_list argp; + va_start(argp, fmt); + luaL_where(L, 1); + lua_pushvfstring(L, fmt, argp); + va_end(argp); + lua_concat(L, 2); +} + + +/* ----------------------------------------------------------------------------- + * global swig types + * ----------------------------------------------------------------------------- */ +/* Constant table */ +#define SWIG_LUA_INT 1 +#define SWIG_LUA_FLOAT 2 +#define SWIG_LUA_STRING 3 +#define SWIG_LUA_POINTER 4 +#define SWIG_LUA_BINARY 5 +#define SWIG_LUA_CHAR 6 + +/* Structure for variable linking table */ +typedef struct { + const char *name; + lua_CFunction get; + lua_CFunction set; +} swig_lua_var_info; + +#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC) +typedef const LUA_REG_TYPE swig_lua_method; +typedef const LUA_REG_TYPE swig_lua_const_info; +#else /* Normal lua */ +typedef luaL_Reg swig_lua_method; + +/* Constant information structure */ +typedef struct { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_lua_const_info; + +#endif + +typedef struct { + const char *name; + lua_CFunction getmethod; + lua_CFunction setmethod; +} swig_lua_attribute; + + +struct swig_lua_class; +/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */ +typedef struct swig_lua_namespace { + const char *name; + swig_lua_method *ns_methods; + swig_lua_attribute *ns_attributes; + swig_lua_const_info *ns_constants; + struct swig_lua_class **ns_classes; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Apr 3 16:01:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A59732A74E4; Fri, 3 Apr 2020 16:01:46 +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 48v4S95X5wz41rP; Fri, 3 Apr 2020 16:01:45 +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 E92E473E7; Fri, 3 Apr 2020 15:52:44 +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 033Fqi5w071775; Fri, 3 Apr 2020 15:52:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033Fqi3t071774; Fri, 3 Apr 2020 15:52:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004031552.033Fqi3t071774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 15:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359599 - head/lib/clang/liblldb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/clang/liblldb X-SVN-Commit-Revision: 359599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 16:01:46 -0000 Author: emaste Date: Fri Apr 3 15:52:44 2020 New Revision: 359599 URL: https://svnweb.freebsd.org/changeset/base/359599 Log: lldb: add rule to generate LLDBWrapLua.cpp Building lldb's lua/python bindings requires swig, but we do not want to include it in the FreeBSD base system (as a build tool) because it has non-trivial dependencies. As a workaround, add a make rule to generate LLDBWrapLua.cpp, and we will commit the generated file. Requires the swig30 package. Reviewed by: brooks Discussed with: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24265 Modified: head/lib/clang/liblldb/Makefile Modified: head/lib/clang/liblldb/Makefile ============================================================================== --- head/lib/clang/liblldb/Makefile Fri Apr 3 15:47:15 2020 (r359598) +++ head/lib/clang/liblldb/Makefile Fri Apr 3 15:52:44 2020 (r359599) @@ -679,4 +679,17 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} INTERNALLIB= +# Building lldb's bindings requires swig, but we do not want to include it in +# the FreeBSD base system (as a build tool) because it has non-trivial +# dependencies. As a workaround we commit the generated file. Requires the +# swig30 package. +# +# After importing an updated llvm/lldb into FreeBSD run `make run-swig` in +# this directory to generate generate LLDBWrapLua.cpp, and commit the result. +.PHONY: run-swig +run-swig: + swig3.0 -I${LLDB_SRCS}/include \ + -c++ -features autodoc -lua -w503 \ + -o ${.CURDIR}/LLDBWrapLua.cpp ${LLDB_SRCS}/bindings/lua.swig + .include From owner-svn-src-head@freebsd.org Fri Apr 3 16:11:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E1EB2A792D; Fri, 3 Apr 2020 16:11:11 +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 48v4fz3WLJz452C; Fri, 3 Apr 2020 16:11:07 +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 E005A762E; Fri, 3 Apr 2020 16:10:42 +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 033GAgTg078727; Fri, 3 Apr 2020 16:10:42 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033GAguU078726; Fri, 3 Apr 2020 16:10:42 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004031610.033GAguU078726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 3 Apr 2020 16:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359601 - head/usr.sbin/pmc X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/usr.sbin/pmc X-SVN-Commit-Revision: 359601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 16:11:11 -0000 Author: brooks Date: Fri Apr 3 16:10:42 2020 New Revision: 359601 URL: https://svnweb.freebsd.org/changeset/base/359601 Log: pmc: diable position-independent builds, they fail to link on amd64 PR: 245189 Reported by: Gordon Bergling Sponsored by: DARPA Modified: head/usr.sbin/pmc/Makefile Modified: head/usr.sbin/pmc/Makefile ============================================================================== --- head/usr.sbin/pmc/Makefile Fri Apr 3 15:55:58 2020 (r359600) +++ head/usr.sbin/pmc/Makefile Fri Apr 3 16:10:42 2020 (r359601) @@ -11,6 +11,9 @@ CXXSTD= c++14 CWARNFLAGS.gcc+= -Wno-redundant-decls CFLAGS+= -I${SRCTOP}/lib/libpmcstat +# Does not link when built position-independent. +MK_PIE=no + LIBADD= kvm pmc m ncursesw pmcstat elf SRCS= pmc.c pmc_util.c cmd_pmc_stat.c \ From owner-svn-src-head@freebsd.org Fri Apr 3 16:19:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC3592A7DDC; Fri, 3 Apr 2020 16:19:17 +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 48v4rN5sVGz47vH; Fri, 3 Apr 2020 16:19:16 +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 8C5537839; Fri, 3 Apr 2020 16:19:08 +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 033GJ8qs084926; Fri, 3 Apr 2020 16:19:08 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033GJ8v2084925; Fri, 3 Apr 2020 16:19:08 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004031619.033GJ8v2084925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 3 Apr 2020 16:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359603 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 359603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 16:19:18 -0000 Author: brooks Date: Fri Apr 3 16:19:07 2020 New Revision: 359603 URL: https://svnweb.freebsd.org/changeset/base/359603 Log: Pass the real value of MK_TESTS_SUPPORT to distribution. This allows kyua's config file to actually be installed. Reported by: arichardson Reviewed by: arichardson Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24268 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Apr 3 16:11:39 2020 (r359602) +++ head/Makefile.inc1 Fri Apr 3 16:19:07 2020 (r359603) @@ -1509,7 +1509,8 @@ distrib-dirs distribution: .MAKE .PHONY .if make(distribution) ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ - METALOG=${METALOG} MK_TESTS=no installconfig + METALOG=${METALOG} MK_TESTS=no \ + MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} installconfig .endif # From owner-svn-src-head@freebsd.org Fri Apr 3 16:54:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36B812610A0; Fri, 3 Apr 2020 16:54:23 +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 48v5ct5W36z4Mfl; Fri, 3 Apr 2020 16:54:22 +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 5D50680B6; Fri, 3 Apr 2020 16:54:14 +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 033GsEN4009101; Fri, 3 Apr 2020 16:54:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033GsD54009099; Fri, 3 Apr 2020 16:54:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004031654.033GsD54009099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 16:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359606 - in head: lib/clang/include/lldb/Host lib/clang/liblldb usr.bin/clang/lldb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/clang/include/lldb/Host lib/clang/liblldb usr.bin/clang/lldb X-SVN-Commit-Revision: 359606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 16:54:23 -0000 Author: emaste Date: Fri Apr 3 16:54:13 2020 New Revision: 359606 URL: https://svnweb.freebsd.org/changeset/base/359606 Log: lldb: build and enable lua script bindings Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24266 Modified: head/lib/clang/include/lldb/Host/Config.h head/lib/clang/liblldb/Makefile head/usr.bin/clang/lldb/Makefile Modified: head/lib/clang/include/lldb/Host/Config.h ============================================================================== --- head/lib/clang/include/lldb/Host/Config.h Fri Apr 3 16:31:45 2020 (r359605) +++ head/lib/clang/include/lldb/Host/Config.h Fri Apr 3 16:54:13 2020 (r359606) @@ -43,7 +43,7 @@ #define LLDB_ENABLE_LIBXML2 0 -#define LLDB_ENABLE_LUA 0 +#define LLDB_ENABLE_LUA 1 #define LLDB_ENABLE_PYTHON 0 Modified: head/lib/clang/liblldb/Makefile ============================================================================== --- head/lib/clang/liblldb/Makefile Fri Apr 3 16:31:45 2020 (r359605) +++ head/lib/clang/liblldb/Makefile Fri Apr 3 16:54:13 2020 (r359606) @@ -13,6 +13,8 @@ CFLAGS+= -I${LLDB_SRCS}/source/Plugins/Process/Utility CFLAGS+= -I${OBJTOP}/lib/clang/libllvm CFLAGS+= -I${OBJTOP}/lib/clang/libclang CFLAGS+= -I${OBJTOP}/lib/clang/liblldb +CFLAGS+= -I${SRCTOP}/contrib/lua/src +CFLAGS+= -I${SRCTOP}/lib/liblua SRCS+= API/SBAddress.cpp SRCS+= API/SBAttachInfo.cpp @@ -462,6 +464,8 @@ SRCS+= Plugins/Process/gdb-remote/GDBRemoteRegisterCo SRCS+= Plugins/Process/gdb-remote/ProcessGDBRemote.cpp SRCS+= Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp SRCS+= Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +SRCS+= Plugins/ScriptInterpreter/Lua/Lua.cpp +SRCS+= Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp SRCS+= Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp SRCS+= Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp SRCS+= Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp @@ -642,6 +646,7 @@ SRCS+= Utility/UserID.cpp SRCS+= Utility/UserIDResolver.cpp SRCS+= Utility/VASprintf.cpp SRCS+= Utility/VMRange.cpp +SRCS+= LLDBWrapLua.cpp SRCS+= lldb.cpp LLDB_TBLGEN?= lldb-tblgen Modified: head/usr.bin/clang/lldb/Makefile ============================================================================== --- head/usr.bin/clang/lldb/Makefile Fri Apr 3 16:31:45 2020 (r359605) +++ head/usr.bin/clang/lldb/Makefile Fri Apr 3 16:54:13 2020 (r359606) @@ -36,6 +36,7 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} LIBADD+= edit LIBADD+= execinfo +LIBADD+= lua LIBADD+= lzma LIBADD+= ncursesw LIBADD+= panel From owner-svn-src-head@freebsd.org Fri Apr 3 17:17:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0A72261CA6; Fri, 3 Apr 2020 17:17:24 +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 48v67R5w46z4W2D; Fri, 3 Apr 2020 17:17:23 +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 A95D584C9; Fri, 3 Apr 2020 17:17:17 +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 033HHHHM021256; Fri, 3 Apr 2020 17:17:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033HHHXZ021255; Fri, 3 Apr 2020 17:17:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004031717.033HHHXZ021255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 17:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359608 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 17:17:25 -0000 Author: emaste Date: Fri Apr 3 17:17:17 2020 New Revision: 359608 URL: https://svnweb.freebsd.org/changeset/base/359608 Log: elf.5: expand on NT_FREEBSD_FEATURE_CTL bit definitions Based on suggestions from kib in review D23982. Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Fri Apr 3 17:08:47 2020 (r359607) +++ head/share/man/man5/elf.5 Fri Apr 3 17:17:17 2020 (r359608) @@ -1317,12 +1317,24 @@ is ignored. Contains the MACHINE_ARCH that the executable was built for. .It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 Contains a bitmask of mitigations and features to enable: -.Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" -.Sy Name Ta Sy Value Ta Sy Description -.It NT_FREEBSD_FCTL_ASLR_DISABLE Ta 0x01 Ta Disable ASLR -.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Ta 0x02 Ta Disable implicit PROT_MAX -.It NT_FREEBSD_FCTL_STKGAP_DISABLE Ta 0x04 Ta Disable stack gap -.It NT_FREEBSD_FCTL_WXNEEDED Ta 0x08 Ta Binary makes W+X mappings +.Bl -tag -width 4n +.\" .Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" +.\" .Sy Name Ta Sy Value Ta Sy Description +.It NT_FREEBSD_FCTL_ASLR_DISABLE Pq Value: 0x01 +Request that address randomization (ASLR) not be performed. +See +.Xr security 7 . +.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Pq Value: 0x02 +Request that +.Xr mmap 2 +calls not set PROT_MAX to the initial value of the +.Fa prot +argument. +.It NT_FREEBSD_FCTL_STKGAP_DISABLE Pq Value: 0x04 +Disable stack gap. +.It NT_FREEBSD_FCTL_WXNEEDED Pq Value: 0x08 +Indicate that the binary requires mappings that are simultaneously +writeable and executable. .El .El .Sh SEE ALSO From owner-svn-src-head@freebsd.org Fri Apr 3 19:42:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B639726630E; Fri, 3 Apr 2020 19:42: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 48v9Ln6rM5z4Rms; Fri, 3 Apr 2020 19:42:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3CE2A760; Fri, 3 Apr 2020 19:42: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 033JgGLP011728; Fri, 3 Apr 2020 19:42:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033JgGMo011727; Fri, 3 Apr 2020 19:42:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004031942.033JgGMo011727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 19:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359611 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 359611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 19:42:27 -0000 Author: emaste Date: Fri Apr 3 19:42:16 2020 New Revision: 359611 URL: https://svnweb.freebsd.org/changeset/base/359611 Log: elf.5: remove commented out leftovers Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 ============================================================================== --- head/share/man/man5/elf.5 Fri Apr 3 19:00:11 2020 (r359610) +++ head/share/man/man5/elf.5 Fri Apr 3 19:42:16 2020 (r359611) @@ -1318,8 +1318,6 @@ Contains the MACHINE_ARCH that the executable was buil .It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 Contains a bitmask of mitigations and features to enable: .Bl -tag -width 4n -.\" .Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" -.\" .Sy Name Ta Sy Value Ta Sy Description .It NT_FREEBSD_FCTL_ASLR_DISABLE Pq Value: 0x01 Request that address randomization (ASLR) not be performed. See From owner-svn-src-head@freebsd.org Fri Apr 3 20:41:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CA0D270168; Fri, 3 Apr 2020 20:41:54 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vBgN69bwz3LYB; Fri, 3 Apr 2020 20:41:52 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36A13B2CD; Fri, 3 Apr 2020 20:30:46 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 033KUjtP041661; Fri, 3 Apr 2020 20:30:45 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033KUjZw041660; Fri, 3 Apr 2020 20:30:45 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202004032030.033KUjZw041660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 3 Apr 2020 20:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359612 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 359612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 20:41:54 -0000 Author: mckusick Date: Fri Apr 3 20:30:45 2020 New Revision: 359612 URL: https://svnweb.freebsd.org/changeset/base/359612 Log: Convert DOINGSOFTDEP, MOUNTEDSOFTDEP, DOINGSUJ, and MOUNTEDSUJ to being boolean expressions so that their values are not lost when assigned to `bool' or `int' variables. Reviewed by: Chuck Silvers (chs) MFC after: 3 days Sponsored by: Netflix Modified: head/sys/ufs/ufs/inode.h Modified: head/sys/ufs/ufs/inode.h ============================================================================== --- head/sys/ufs/ufs/inode.h Fri Apr 3 19:42:16 2020 (r359611) +++ head/sys/ufs/ufs/inode.h Fri Apr 3 20:30:45 2020 (r359612) @@ -230,10 +230,11 @@ struct indir { #define ITOV(ip) ((ip)->i_vnode) /* Determine if soft dependencies are being done */ -#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) -#define MOUNTEDSOFTDEP(mp) ((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) -#define DOINGSUJ(vp) ((vp)->v_mount->mnt_flag & MNT_SUJ) -#define MOUNTEDSUJ(mp) ((mp)->mnt_flag & MNT_SUJ) +#define DOINGSOFTDEP(vp) \ + (((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0) +#define MOUNTEDSOFTDEP(mp) (((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0) +#define DOINGSUJ(vp) (((vp)->v_mount->mnt_flag & MNT_SUJ) != 0) +#define MOUNTEDSUJ(mp) (((mp)->mnt_flag & MNT_SUJ) != 0) /* This overlays the fid structure (see mount.h). */ struct ufid { From owner-svn-src-head@freebsd.org Fri Apr 3 20:43:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED4AF270340; Fri, 3 Apr 2020 20:43:36 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vBjM5L2xz3MFY; Fri, 3 Apr 2020 20:43:35 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96C7FB774; Fri, 3 Apr 2020 20:43:25 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 033KhPxs049834; Fri, 3 Apr 2020 20:43:25 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033KhP4j049833; Fri, 3 Apr 2020 20:43:25 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202004032043.033KhP4j049833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 3 Apr 2020 20:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359613 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 359613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 20:43:37 -0000 Author: mckusick Date: Fri Apr 3 20:43:25 2020 New Revision: 359613 URL: https://svnweb.freebsd.org/changeset/base/359613 Log: When shrinking the size of a directory it is sometimes necessary to sync it to disk before shrinking it. Complete the sync before getting the buffer for the block to be updated to do the shrink to avoid panicing with a recursive lock on one of the directory's buffers. Reviewed by: Chuck Silvers (chs) MFC after: 3 days Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Fri Apr 3 20:30:45 2020 (r359612) +++ head/sys/ufs/ffs/ffs_inode.c Fri Apr 3 20:43:25 2020 (r359613) @@ -426,11 +426,6 @@ ffs_truncate(vp, length, flags, cred) ip->i_size = length; DIP_SET(ip, i_size, length); } else { - lbn = lblkno(fs, length); - flags |= BA_CLRBUF; - error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp); - if (error) - return (error); /* * When we are doing soft updates and the UFS_BALLOC * above fills in a direct block hole with a full sized @@ -439,9 +434,14 @@ ffs_truncate(vp, length, flags, cred) * so that we do not get a soft updates inconsistency * when we create the fragment below. */ + lbn = lblkno(fs, length); if (DOINGSOFTDEP(vp) && lbn < UFS_NDADDR && fragroundup(fs, blkoff(fs, length)) < fs->fs_bsize && (error = ffs_syncvnode(vp, MNT_WAIT, 0)) != 0) + return (error); + flags |= BA_CLRBUF; + error = UFS_BALLOC(vp, length - 1, 1, cred, flags, &bp); + if (error) return (error); ip->i_size = length; DIP_SET(ip, i_size, length); From owner-svn-src-head@freebsd.org Fri Apr 3 20:45:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E896270572; Fri, 3 Apr 2020 20:45:26 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vBlT2blPz3Mt7; Fri, 3 Apr 2020 20:45:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E25C1B775; Fri, 3 Apr 2020 20:45:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 033KjGGF050024; Fri, 3 Apr 2020 20:45:16 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033KjGcL050020; Fri, 3 Apr 2020 20:45:16 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202004032045.033KjGcL050020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 3 Apr 2020 20:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359614 - in head/sys: conf powerpc/amigaone X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys: conf powerpc/amigaone X-SVN-Commit-Revision: 359614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 20:45:26 -0000 Author: jhibbits Date: Fri Apr 3 20:45:16 2020 New Revision: 359614 URL: https://svnweb.freebsd.org/changeset/base/359614 Log: powerpc/amigaone: Add CPLD driver for AmigaOne A1222 "Tabor" Like the X5000, the main CPLD on the A1222 is the communication medium between the CPU and the GPIO CPLD. It provides a mailbox communication feature, along with dual-port RAM accessible from both the CPU and GPIO CPLD, and 3 fan speed reporting registers. Added: head/sys/powerpc/amigaone/cpld_a1222.c (contents, props changed) Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Fri Apr 3 20:43:25 2020 (r359613) +++ head/sys/conf/files.powerpc Fri Apr 3 20:45:16 2020 (r359614) @@ -140,7 +140,8 @@ powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 powerpc/amigaone/platform_amigaone.c optional amigaone -powerpc/amigaone/cpld_x5000.c optional powerpc amigaone | powerpc64 amigaone +powerpc/amigaone/cpld_a1222.c optional powerpc amigaone | powerpcspe amigaone +powerpc/amigaone/cpld_x5000.c optional powerpc amigaone | powerpc64 amigaone powerpc/booke/locore.S optional booke no-obj powerpc/booke/booke_machdep.c optional booke powerpc/booke/machdep_e500.c optional booke_e500 Added: head/sys/powerpc/amigaone/cpld_a1222.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/amigaone/cpld_a1222.c Fri Apr 3 20:45:16 2020 (r359614) @@ -0,0 +1,401 @@ +/*- + * Copyright (c) 2020 Justin Hibbits + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include "cpld.h" + +/* + * A driver for the AmigaOne A1222 "Tabor" Main CPLD. + * + * The main CPLD is the interface between the CPU and the GPIO CPLD. + * Communication with the GPIO CPLD is over the main CPLD's mailbox interface, + * along with the dual-port RAM on the CPLD. + * + * Only one process can open the CPLD character device at a time. The driver + * enforces this to simplify the communication protocol. + */ + +/* Resource access addresses. */ +#define CPLD_MEM_ADDR_H 0x00 +#define CPLD_MEM_ADDR_L 0x01 +#define CPLD_MEM_DATA 0x80 + +#define CPLD_MAX_DRAM_WORDS 0x800 + +/* CPLD Registers. */ +#define CPLD_REG_SIG1 0x00 +#define CPLD_REG_SIG2 0x01 +#define CPLD_REG_HWREV 0x02 +#define CPLD_REG_CPLDREV 0x03 +#define CPLD_REG_MBC2X 0x04 +#define CPLD_REG_MBX2C 0x05 +#define CPLD_REG_FAN1_TACHO_U 0x10 +#define CPLD_REG_FAN1_TACHO_L 0x11 +#define CPLD_REG_FAN2_TACHO_U 0x12 +#define CPLD_REG_FAN2_TACHO_L 0x13 +#define CPLD_REG_FAN3_TACHO_U 0x14 +#define CPLD_REG_FAN3_TACHO_L 0x15 +#define CPLD_REG_DATE_UU 0x20 +#define CPLD_REG_DATE_UL 0x21 +#define CPLD_REG_DATE_LU 0x22 +#define CPLD_REG_DATE_LL 0x23 +#define CPLD_REG_TIME_UU 0x24 +#define CPLD_REG_TIME_UL 0x25 +#define CPLD_REG_TIME_LU 0x26 +#define CPLD_REG_TIME_LL 0x27 +#define CPLD_REG_SCR1 0x5c +#define CPLD_REG_SCR2 0x6a +#define CPLD_REG_RAM 0x80 + +struct cpld_softc { + device_t sc_dev; + struct resource *sc_mem; + struct cdev *sc_cdev; + struct mtx sc_mutex; + bool sc_isopen; +}; + +static d_open_t cpld_open; +static d_close_t cpld_close; +static d_ioctl_t cpld_ioctl; + +static struct cdevsw cpld_cdevsw = { + .d_version = D_VERSION, + .d_open = cpld_open, + .d_close = cpld_close, + .d_ioctl = cpld_ioctl, + .d_name = "nvram", +}; + +static device_probe_t cpld_probe; +static device_attach_t cpld_attach; +static int cpld_fan_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t cpld_methods[] = { + DEVMETHOD(device_probe, cpld_probe), + DEVMETHOD(device_attach, cpld_attach), + + DEVMETHOD_END +}; + +static driver_t cpld_driver = { + "cpld", + cpld_methods, + sizeof(struct cpld_softc) +}; + +static devclass_t cpld_devclass; +DRIVER_MODULE(cpld, lbc, cpld_driver, cpld_devclass, 0, 0); + +static void +cpld_write(struct cpld_softc *sc, int addr, int data) +{ + if (addr >= CPLD_REG_RAM) { + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr); + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_L, addr); + } else + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr); + bus_write_1(sc->sc_mem, CPLD_MEM_DATA, data); +} + +static int +cpld_read(struct cpld_softc *sc, int addr) +{ + if (addr >= CPLD_REG_RAM) { + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr); + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_L, addr); + } else + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr); + + return (bus_read_1(sc->sc_mem, CPLD_MEM_DATA)); +} + +/* + * This is only to read a register that's split into two 8-bit registers. + * Dual-port RAM is not accepted for this purpose. + */ +static int +cpld_read_pair(struct cpld_softc *sc, int addr) +{ + int tmp; + + KASSERT(addr <= 0xff, ("Invalid register-pair base address %x.", addr)); + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr); + tmp = bus_read_1(sc->sc_mem, CPLD_MEM_DATA) << 8; + + bus_write_1(sc->sc_mem, CPLD_MEM_ADDR_H, addr + 1); + tmp |= bus_read_1(sc->sc_mem, CPLD_MEM_DATA); + + return (tmp); +} + +static int +cpld_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "aeon,tabor-cpld")) + return (ENXIO); + + device_set_desc(dev, "AmigaOne Tabor CPLD"); + + return (BUS_PROBE_GENERIC); +} + +static int +cpld_attach(device_t dev) +{ + struct make_dev_args mda; + struct cpld_softc *sc; + int rid; + int date, time, tmp; + int err; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->sc_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE|RF_SHAREABLE); + if (sc->sc_mem == NULL) { + device_printf(dev, "Unable to allocate memory resource.\n"); + return (ENXIO); + } + mtx_init(&sc->sc_mutex, "cpld", NULL, MTX_DEF); + + if (bootverbose) { + date = (cpld_read_pair(sc, CPLD_REG_DATE_UU) << 16) | + cpld_read_pair(sc, CPLD_REG_DATE_LU); + time = (cpld_read_pair(sc, CPLD_REG_TIME_UU) << 16) | + cpld_read_pair(sc, CPLD_REG_TIME_LU); + + device_printf(dev, "Build date: %04x-%02x-%02x\n", + (date >> 16) & 0xffff, (date >> 8) & 0xff, date & 0xff); +#if 0 + /* Build time is nonsense on tested system. */ + device_printf(dev, "Build time: %02x:%02x:%02x\n", + (time >> 16) & 0xff, (time >> 8) & 0xff, time & 0xff); +#endif + } + + tmp = cpld_read(sc, CPLD_REG_HWREV); + device_printf(dev, "Hardware revision: %d\n", tmp); + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "cpu_fan", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, + CPLD_REG_FAN1_TACHO_U, cpld_fan_sysctl, "I", + "CPU Fan speed in RPM"); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "case_1_fan", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, + CPLD_REG_FAN2_TACHO_U, cpld_fan_sysctl, "I", + "Case fan 1 speed in RPM"); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "case_2_fan", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, + CPLD_REG_FAN3_TACHO_U, cpld_fan_sysctl, "I", + "Case fan 2 speed in RPM"); + + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_CHECKNAME; + mda.mda_devsw = &cpld_cdevsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0660; + err = make_dev_s(&mda, &sc->sc_cdev, "cpld"); + if (err != 0) { + device_printf(dev, "Error creating character device: %d\n", err); + device_printf(dev, "Only sysctl interfaces will be available.\n"); + } + + return (0); +} + +static int +cpld_fan_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct cpld_softc *sc; + int error, old, rpm; + int fan_reg; + + sc = arg1; + fan_reg = arg2; + mtx_lock(&sc->sc_mutex); + /* Read until we get some level of read stability. */ + rpm = cpld_read(sc, fan_reg); + do { + old = rpm; + rpm = cpld_read_pair(sc, fan_reg); + } while (abs(rpm - old) > 10); + mtx_unlock(&sc->sc_mutex); + + /* Convert RPS->RPM. */ + rpm *= 60; + error = sysctl_handle_int(oidp, &rpm, 0, req); + + return (error); +} + +static int +cpld_open(struct cdev *dev, int flags, int fmt, struct thread *td) +{ + struct cpld_softc *sc = dev->si_drv1; + + if (sc->sc_isopen) + return (EBUSY); + sc->sc_isopen = 1; + return (0); +} + +static int +cpld_close(struct cdev *dev, int fflag, int devtype, struct thread *td) +{ + struct cpld_softc *sc = dev->si_drv1; + + sc->sc_isopen = 0; + return (0); +} + +/* + * Send a command over the CPLD to the other side. + * + * This will first copy the data into the dual-port RAM, then signal the other + * side by writing to the mailbox. + */ +static int +cpld_send(device_t dev, struct cpld_cmd_data *d) +{ + struct cpld_softc *sc; + uint16_t *word; + int i; + + if (d->cmd > USHRT_MAX) + return (EINVAL); + + sc = device_get_softc(dev); + + mtx_lock(&sc->sc_mutex); + for (i = 0, word = d->words; i < d->len; i++, word++) { + if (i == 0) + cpld_write(sc, CPLD_REG_RAM + d->offset, *word); + else + bus_write_4(sc->sc_mem, CPLD_MEM_DATA, *word); + } + + cpld_write(sc, CPLD_REG_MBC2X, d->cmd); + mtx_unlock(&sc->sc_mutex); + + return (0); +} + +static int +cpld_recv(device_t dev, struct cpld_cmd_data *d) +{ + struct cpld_softc *sc; + uint16_t *word; + int i; + + sc = device_get_softc(dev); + + mtx_lock(&sc->sc_mutex); + d->cmd = cpld_read(sc, CPLD_REG_MBX2C); + + for (i = 0, word = d->words; i < d->len; i++, word++) { + if (i == 0) + *word = cpld_read(sc, CPLD_REG_RAM + d->offset); + else + *word = bus_read_4(sc->sc_mem, CPLD_MEM_DATA); + } + mtx_unlock(&sc->sc_mutex); + + return (0); +} + +static int +cpld_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct cpld_softc *sc; + struct cpld_cmd_data *d; + void *xfer_data, *tmp; + int err; + + sc = dev->si_drv1; + + err = 0; + d = (struct cpld_cmd_data *)data; + if (d->len + d->offset > CPLD_MAX_DRAM_WORDS) { + return (EINVAL); + } + xfer_data = malloc(d->len * sizeof(uint16_t), M_TEMP, M_WAITOK); + + switch (cmd) { + case IOCCPLDSEND: + err = copyin(d->words, xfer_data, d->len * sizeof(uint16_t)); + d->words = xfer_data; + if (err == 0) + err = cpld_send(sc->sc_dev, d); + break; + case IOCCPLDRECV: + tmp = d->words; + d->words = xfer_data; + err = cpld_recv(sc->sc_dev, d); + d->words = tmp; + if (err == 0) + err = copyout(xfer_data, d->words, + d->len * sizeof(uint16_t)); + break; + default: + err = ENOTTY; + break; + } + free(xfer_data, M_TEMP); + + return (err); +} From owner-svn-src-head@freebsd.org Fri Apr 3 21:05:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 636A427146F; Fri, 3 Apr 2020 21:05:52 +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 48vCC30Dmwz40pM; Fri, 3 Apr 2020 21:05:51 +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 2756BB9FF; Fri, 3 Apr 2020 20:56:44 +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 033Kuh2b055974; Fri, 3 Apr 2020 20:56:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033Kuhma055973; Fri, 3 Apr 2020 20:56:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004032056.033Kuhma055973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 20:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359615 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 359615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 21:05:52 -0000 Author: emaste Date: Fri Apr 3 20:56:43 2020 New Revision: 359615 URL: https://svnweb.freebsd.org/changeset/base/359615 Log: ANSIfy and KNF function arg definitions in libmd/md4.c Reported by: bde, in 2017 Modified: head/lib/libmd/md4c.c Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Fri Apr 3 20:45:16 2020 (r359614) +++ head/lib/libmd/md4c.c Fri Apr 3 20:56:43 2020 (r359615) @@ -93,8 +93,8 @@ static unsigned char PADDING[64] = { /* MD4 initialization. Begins an MD4 operation, writing a new context. */ -void MD4Init (context) -MD4_CTX *context; /* context */ +void +MD4Init(MD4_CTX *context) { context->count[0] = context->count[1] = 0; @@ -110,10 +110,8 @@ MD4_CTX *context; operation, processing another message block, and updating the context. */ -void MD4Update (context, in, inputLen) -MD4_CTX *context; /* context */ -const void *in; /* input block */ -unsigned int inputLen; /* length of input block */ +void +MD4Update(MD4_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, idx, partLen; const unsigned char *input = in; @@ -149,8 +147,8 @@ unsigned int inputLen; /* length o } /* MD4 padding. */ -void MD4Pad (context) -MD4_CTX *context; /* context */ +void +MD4Pad(MD4_CTX *context) { unsigned char bits[8]; unsigned int idx, padLen; @@ -171,9 +169,8 @@ MD4_CTX *context; /* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */ -void MD4Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD4_CTX *context; /* context */ +void +MD4Final(unsigned char digest[16], MD4_CTX *context) { /* Do padding */ MD4Pad (context); @@ -188,9 +185,8 @@ MD4_CTX *context; /* MD4 basic transformation. Transforms state based on block. */ -static void MD4Transform (state, block) -UINT4 state[4]; -const unsigned char block[64]; +static void +MD4Transform(UINT4 state[4], const unsigned char block[64]) { UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; @@ -263,10 +259,8 @@ const unsigned char block[64]; /* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ -static void Encode (output, input, len) -unsigned char *output; -UINT4 *input; -unsigned int len; +static void +Encode(unsigned char *output, UINT4 *input, unsigned int len) { unsigned int i, j; @@ -281,11 +275,8 @@ unsigned int len; /* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ -static void Decode (output, input, len) - -UINT4 *output; -const unsigned char *input; -unsigned int len; +static void +Decode(UINT4 *output, const unsigned char *input, unsigned int len) { unsigned int i, j; From owner-svn-src-head@freebsd.org Fri Apr 3 22:36:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B71F2274E4F; Fri, 3 Apr 2020 22:36:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vFCh0bHMz4Zvm; Fri, 3 Apr 2020 22:36:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 827FED2F0; Fri, 3 Apr 2020 22:36:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 033MaNvr017766; Fri, 3 Apr 2020 22:36:23 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033MaMfW017761; Fri, 3 Apr 2020 22:36:22 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202004032236.033MaMfW017761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 3 Apr 2020 22:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359622 - in head/lib/libpmc/pmu-events/arch/x86: . bonnell broadwell broadwellde broadwellx cascadelakex goldmont goldmontplus haswell haswellx icelake ivybridge ivytown jaketown knigh... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/lib/libpmc/pmu-events/arch/x86: . bonnell broadwell broadwellde broadwellx cascadelakex goldmont goldmontplus haswell haswellx icelake ivybridge ivytown jaketown knightslanding sandybridge sil... X-SVN-Commit-Revision: 359622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 22:36:34 -0000 Author: mmacy Date: Fri Apr 3 22:36:22 2020 New Revision: 359622 URL: https://svnweb.freebsd.org/changeset/base/359622 Log: Update x86 counters MFC after: 1 week Added: head/lib/libpmc/pmu-events/arch/x86/cascadelakex/ head/lib/libpmc/pmu-events/arch/x86/cascadelakex/cache.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/clx-metrics.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/floating-point.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/frontend.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/pipeline.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/uncore-memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/uncore-other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/cascadelakex/virtual-memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/ head/lib/libpmc/pmu-events/arch/x86/icelake/cache.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/floating-point.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/frontend.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/pipeline.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/icelake/virtual-memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/silvermont/other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/ head/lib/libpmc/pmu-events/arch/x86/tremontx/cache.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/frontend.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/pipeline.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/uncore-memory.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/uncore-other.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/uncore-power.json (contents, props changed) head/lib/libpmc/pmu-events/arch/x86/tremontx/virtual-memory.json (contents, props changed) Modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json head/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json head/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json head/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json head/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/cache.json head/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json head/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswell/memory.json head/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json head/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json head/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json head/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json head/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json head/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json head/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json head/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json head/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json head/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/mapfile.csv head/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json head/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json head/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json head/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylake/cache.json head/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylake/memory.json head/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json head/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json head/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json head/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json head/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json head/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json head/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json Modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json Fri Apr 3 22:22:50 2020 (r359621) +++ head/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json Fri Apr 3 22:36:22 2020 (r359622) @@ -77,7 +77,7 @@ "UMask": "0x1", "EventName": "UOPS.MS_CYCLES", "SampleAfterValue": "2000000", - "BriefDescription": "This event counts the cycles where 1 or more uops are issued by the micro-sequencer (MS), including microcode assists and inserted flows, and written to the IQ. ", + "BriefDescription": "This event counts the cycles where 1 or more uops are issued by the micro-sequencer (MS), including microcode assists and inserted flows, and written to the IQ.", "CounterMask": "1" } ] \ No newline at end of file Modified: head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json Fri Apr 3 22:22:50 2020 (r359621) +++ head/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json Fri Apr 3 22:36:22 2020 (r359622) @@ -189,7 +189,7 @@ "UMask": "0x8", "EventName": "BR_MISSP_TYPE_RETIRED.IND_CALL", "SampleAfterValue": "200000", - "BriefDescription": "Mispredicted indirect calls, including both register and memory indirect. " + "BriefDescription": "Mispredicted indirect calls, including both register and memory indirect." }, { "EventCode": "0x89", Modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json Fri Apr 3 22:22:50 2020 (r359621) +++ head/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json Fri Apr 3 22:36:22 2020 (r359622) @@ -1,6 +1,62 @@ [ { - "BriefDescription": "Instructions Per Cycle (per logical thread)", + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Frontend_Bound", + "PublicDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound." + }, + { + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Frontend_Bound_SMT", + "PublicDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", + "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Bad_Speculation", + "PublicDescription": "This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example." + }, + { + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Bad_Speculation_SMT", + "PublicDescription": "This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend", + "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)) )", + "MetricGroup": "TopdownL1", + "MetricName": "Backend_Bound", + "PublicDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound." + }, + { + "BriefDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) )", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Backend_Bound_SMT", + "PublicDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Retiring", + "PublicDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. " + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Retiring_SMT", + "PublicDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "Instructions Per Cycle (per Logical Processor)", "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD", "MetricGroup": "TopDownL1", "MetricName": "IPC" @@ -8,40 +64,82 @@ { "BriefDescription": "Uops Per Instruction", "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", - "MetricGroup": "Pipeline", + "MetricGroup": "Pipeline;Retire", "MetricName": "UPI" }, { - "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions", + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fetch_BW;PGO", + "MetricName": "IpTB" + }, + { + "BriefDescription": "Branch instructions per taken branch. ", + "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;PGO", + "MetricName": "BpTB" + }, + { + "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely (includes speculatively fetches) consumed by program instructions", "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )", - "MetricGroup": "Frontend", + "MetricGroup": "PGO;IcMiss", "MetricName": "IFetch_Line_Utilization" }, { - "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)", - "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )", - "MetricGroup": "DSB; Frontend_Bandwidth", + "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", + "MetricExpr": "IDQ.DSB_UOPS / (( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS ) )", + "MetricGroup": "DSB;Fetch_BW", "MetricName": "DSB_Coverage" }, { - "BriefDescription": "Cycles Per Instruction (threaded)", + "BriefDescription": "Cycles Per Instruction (per Logical Processor)", "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)", "MetricGroup": "Pipeline;Summary", "MetricName": "CPI" }, { - "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.", + "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", "MetricExpr": "CPU_CLK_UNHALTED.THREAD", "MetricGroup": "Summary", "MetricName": "CLKS" }, { - "BriefDescription": "Total issue-pipeline slots", - "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "BriefDescription": "Total issue-pipeline slots (per-Physical Core)", + "MetricExpr": "4 * cycles", "MetricGroup": "TopDownL1", "MetricName": "SLOTS" }, { + "BriefDescription": "Total issue-pipeline slots (per-Physical Core)", + "MetricExpr": "4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "TopDownL1_SMT", + "MetricName": "SLOTS_SMT" + }, + { + "BriefDescription": "Instructions per Load (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", + "MetricGroup": "Instruction_Type", + "MetricName": "IpL" + }, + { + "BriefDescription": "Instructions per Store (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", + "MetricGroup": "Instruction_Type", + "MetricName": "IpS" + }, + { + "BriefDescription": "Instructions per Branch (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", + "MetricGroup": "Branches;Instruction_Type", + "MetricName": "IpB" + }, + { + "BriefDescription": "Instruction per (near) call (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", + "MetricGroup": "Branches", + "MetricName": "IpCall" + }, + { "BriefDescription": "Total number of retired Instructions", "MetricExpr": "INST_RETIRED.ANY", "MetricGroup": "Summary", @@ -49,47 +147,131 @@ }, { "BriefDescription": "Instructions Per Cycle (per physical core)", - "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "MetricExpr": "INST_RETIRED.ANY / cycles", "MetricGroup": "SMT", "MetricName": "CoreIPC" }, { + "BriefDescription": "Instructions Per Cycle (per physical core)", + "MetricExpr": "INST_RETIRED.ANY / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "SMT", + "MetricName": "CoreIPC_SMT" + }, + { + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / cycles", + "MetricGroup": "FLOPS", + "MetricName": "FLOPc" + }, + { + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "FLOPS_SMT", + "MetricName": "FLOPc_SMT" + }, + { "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)", - "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", - "MetricGroup": "Pipeline;Ports_Utilization", + "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 ) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", + "MetricGroup": "Pipeline", "MetricName": "ILP" }, { - "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)", - "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED )) ) / RS_EVENTS.EMPTY_END)", - "MetricGroup": "Unknown_Branches", - "MetricName": "BAClear_Cost" + "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)", + "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) ) * (4 * cycles) / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts", + "MetricName": "Branch_Misprediction_Cost" }, { - "BriefDescription": "Core actual clocks when any thread is active on the physical core", - "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD", + "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)", + "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) ) * (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))) / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts_SMT", + "MetricName": "Branch_Misprediction_Cost_SMT" + }, + { + "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear)", + "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts", + "MetricName": "IpMispredict" + }, + { + "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", + "MetricExpr": "( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )", "MetricGroup": "SMT", "MetricName": "CORE_CLKS" }, { - "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads", + "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads (in core cycles)", "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )", "MetricGroup": "Memory_Bound;Memory_Lat", "MetricName": "Load_Miss_Real_Latency" }, { - "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)", - "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)", + "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)", + "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES", "MetricGroup": "Memory_Bound;Memory_BW", "MetricName": "MLP" }, { "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", - "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED)) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / cycles", "MetricGroup": "TLB", "MetricName": "Page_Walks_Utilization" }, { + "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", + "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "TLB_SMT", + "MetricName": "Page_Walks_Utilization_SMT" + }, + { + "BriefDescription": "Average data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "64 * L1D.REPLACEMENT / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L1D_Cache_Fill_BW" + }, + { + "BriefDescription": "Average data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "64 * L2_LINES_IN.ALL / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L2_Cache_Fill_BW" + }, + { + "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L3_Cache_Fill_BW" + }, + { + "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L1MPKI" + }, + { + "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2MPKI" + }, + { + "BriefDescription": "L2 cache misses per kilo instruction for all request types (including speculative)", + "MetricExpr": "1000 * L2_RQSTS.MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2MPKI_All" + }, + { + "BriefDescription": "L2 cache hits per kilo instruction for all request types (including speculative)", + "MetricExpr": "1000 * ( L2_RQSTS.REFERENCES - L2_RQSTS.MISS ) / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2HPKI_All" + }, + { + "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L3_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L3MPKI" + }, + { "BriefDescription": "Average CPU Utilization", "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@", "MetricGroup": "Summary", @@ -97,7 +279,7 @@ }, { "BriefDescription": "Giga Floating Point Operations Per Second", - "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time", + "MetricExpr": "( (( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 ) / duration_time", "MetricGroup": "FLOPS;Summary", "MetricName": "GFLOPs" }, @@ -108,16 +290,22 @@ "MetricName": "Turbo_Utilization" }, { - "BriefDescription": "Fraction of cycles where both hardware threads were active", + "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0", "MetricGroup": "SMT;Summary", "MetricName": "SMT_2T_Utilization" }, { "BriefDescription": "Fraction of cycles spent in Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC", + "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:k / CPU_CLK_UNHALTED.REF_TSC", "MetricGroup": "Summary", "MetricName": "Kernel_Utilization" + }, + { + "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", + "MetricExpr": "64 * ( arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@ ) / 1000000 / duration_time / 1000", + "MetricGroup": "Memory_BW", + "MetricName": "DRAM_BW_Use" }, { "BriefDescription": "C3 residency percent per core", Modified: head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json Fri Apr 3 22:22:50 2020 (r359621) +++ head/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json Fri Apr 3 22:36:22 2020 (r359622) @@ -56,10 +56,10 @@ "CounterHTOff": "0,1,2,3,4,5,6,7" }, { - "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.", + "PublicDescription": "Counts the number of demand Data Read requests, initiated by load instructions, that hit L2 cache.", "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x41", + "UMask": "0xc1", "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", "SampleAfterValue": "200003", "BriefDescription": "Demand Data Read requests that hit L2 cache", @@ -68,7 +68,7 @@ { "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x42", + "UMask": "0xc2", "EventName": "L2_RQSTS.RFO_HIT", "SampleAfterValue": "200003", "BriefDescription": "RFO requests that hit L2 cache.", @@ -77,7 +77,7 @@ { "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x44", + "UMask": "0xc4", "EventName": "L2_RQSTS.CODE_RD_HIT", "SampleAfterValue": "200003", "BriefDescription": "L2 cache hits when fetching instructions, code reads.", @@ -87,7 +87,7 @@ "PublicDescription": "This event counts the number of requests from the L2 hardware prefetchers that hit L2 cache. L3 prefetch new types.", "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x50", + "UMask": "0xd0", "EventName": "L2_RQSTS.L2_PF_HIT", "SampleAfterValue": "200003", "BriefDescription": "L2 prefetch requests that hit L2 cache", @@ -771,2628 +771,2628 @@ "CounterHTOff": "0,1,2,3,4,5,6,7" }, { - "PublicDescription": "Counts demand data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010001 ", + "MSRValue": "0x0000010001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that have any response type.", + "BriefDescription": "Counts demand data reads have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020001 ", + "MSRValue": "0x0080020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0100020001 ", + "MSRValue": "0x0100020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0200020001 ", + "MSRValue": "0x0200020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_MISS", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0400020001 ", + "MSRValue": "0x0400020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x1000020001 ", + "MSRValue": "0x1000020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_HITM", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f80020001 ", + "MSRValue": "0x3F80020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & ANY_SNOOP", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0001 ", + "MSRValue": "0x00803C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0001 ", + "MSRValue": "0x01003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0001 ", + "MSRValue": "0x02003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0001 ", + "MSRValue": "0x04003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0001 ", + "MSRValue": "0x10003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0001 ", + "MSRValue": "0x3F803C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs) have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010002 ", + "MSRValue": "0x0000010002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that have any response type.", + "BriefDescription": "Counts all demand data writes (RFOs) have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0002 ", + "MSRValue": "0x00803C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0002 ", + "MSRValue": "0x01003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0002 ", + "MSRValue": "0x02003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0002 ", + "MSRValue": "0x04003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0002 ", + "MSRValue": "0x10003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_RFO & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0002 ", + "MSRValue": "0x3F803C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010004 ", + "MSRValue": "0x0000010004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that have any response type.", + "BriefDescription": "Counts all demand code reads have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020004 ", + "MSRValue": "0x0080020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0100020004 ", + "MSRValue": "0x0100020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0200020004 ", + "MSRValue": "0x0200020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_MISS", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0400020004 ", + "MSRValue": "0x0400020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x1000020004 ", + "MSRValue": "0x1000020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HITM", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f80020004 ", + "MSRValue": "0x3F80020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & ANY_SNOOP", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0004 ", + "MSRValue": "0x00803C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0004 ", + "MSRValue": "0x01003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0004 ", + "MSRValue": "0x02003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0004 ", + "MSRValue": "0x04003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0004 ", + "MSRValue": "0x10003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0004 ", + "MSRValue": "0x3F803C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts writebacks (modified to exclusive) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts writebacks (modified to exclusive) have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010008 ", + "MSRValue": "0x0000010008", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts writebacks (modified to exclusive) that have any response type.", + "BriefDescription": "Counts writebacks (modified to exclusive) have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts writebacks (modified to exclusive)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020008 ", + "MSRValue": "0x0080020008", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.COREWB.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "COREWB & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts writebacks (modified to exclusive)", "Offcore": "1", "CounterHTOff": "0,1,2,3" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Apr 4 00:32:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6BBE27840E; Sat, 4 Apr 2020 00:32:21 +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 48vHnJ2QgVz4Km0; Sat, 4 Apr 2020 00:32:20 +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 63019EF34; Sat, 4 Apr 2020 00:31:31 +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 0340VVxN088260; Sat, 4 Apr 2020 00:31:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0340VVS5088259; Sat, 4 Apr 2020 00:31:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004040031.0340VVS5088259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 4 Apr 2020 00:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359626 - head/sys/dev/vt/hw/fb X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/vt/hw/fb X-SVN-Commit-Revision: 359626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 00:32:21 -0000 Author: emaste Date: Sat Apr 4 00:31:30 2020 New Revision: 359626 URL: https://svnweb.freebsd.org/changeset/base/359626 Log: vt: avoid overrun when stride is not a multiple of bytes per pixel The reporter is developing a frame buffer driver for hardware using 3 bytes per pixel, but a stride that's a multiple of 256. Previously this resulted in writing beyond the end of each stride. On the last row this attempted to write past the end of the frame buffer, triggering the assertion in vt_fb_mem_wr1(). PR: 243533 MFC after: 2 weeks Submitted by: Thomas Skibo Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Fri Apr 3 23:00:26 2020 (r359625) +++ head/sys/dev/vt/hw/fb/vt_fb.c Sat Apr 4 00:31:30 2020 (r359626) @@ -235,12 +235,12 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 2: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 2) + for (o = 0; o < info->fb_stride - 1; o += 2) vt_fb_mem_wr2(info, h*info->fb_stride + o, c); break; case 3: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 3) { + for (o = 0; o < info->fb_stride - 2; o += 3) { vt_fb_mem_wr1(info, h*info->fb_stride + o, (c >> 16) & 0xff); vt_fb_mem_wr1(info, h*info->fb_stride + o + 1, @@ -251,7 +251,7 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 4: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 4) + for (o = 0; o < info->fb_stride - 3; o += 4) vt_fb_mem_wr4(info, h*info->fb_stride + o, c); break; default: From owner-svn-src-head@freebsd.org Sat Apr 4 00:57:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 698C8278C9C; Sat, 4 Apr 2020 00:57:09 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vJKw3S20z4TV7; Sat, 4 Apr 2020 00:57:08 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D20F495; Sat, 4 Apr 2020 00:56:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0340uw3Y003220; Sat, 4 Apr 2020 00:56:58 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0340uuL6003212; Sat, 4 Apr 2020 00:56:56 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202004040056.0340uuL6003212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sat, 4 Apr 2020 00:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359627 - in head: include/protocols sbin/dump sbin/restore X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: include/protocols sbin/dump sbin/restore X-SVN-Commit-Revision: 359627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 00:57:10 -0000 Author: mckusick Date: Sat Apr 4 00:56:56 2020 New Revision: 359627 URL: https://svnweb.freebsd.org/changeset/base/359627 Log: Clean up global variable declarations in the dump and restore utilities so that they will compile with -fno-common. Started by: Kyle Evans (kevans) Reviewed by: Kyle Evans (kevans) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24210 Modified: head/include/protocols/dumprestore.h head/sbin/dump/dump.h head/sbin/dump/dumprmt.c head/sbin/dump/itime.c head/sbin/dump/main.c head/sbin/dump/pathnames.h head/sbin/dump/tape.c head/sbin/restore/restore.h head/sbin/restore/tape.c Modified: head/include/protocols/dumprestore.h ============================================================================== --- head/include/protocols/dumprestore.h Sat Apr 4 00:31:30 2020 (r359626) +++ head/include/protocols/dumprestore.h Sat Apr 4 00:56:56 2020 (r359627) @@ -76,7 +76,7 @@ */ typedef uint32_t dump_ino_t; -union u_spcl { +extern union u_spcl { char dummy[TP_BSIZE]; struct s_spcl { int32_t c_type; /* record type (see below) */ Modified: head/sbin/dump/dump.h ============================================================================== --- head/sbin/dump/dump.h Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/dump.h Sat Apr 4 00:56:56 2020 (r359627) @@ -36,10 +36,10 @@ /* * Dump maps used to describe what is to be dumped. */ -int mapsize; /* size of the state maps */ -char *usedinomap; /* map of allocated inodes */ -char *dumpdirmap; /* map of directories to be dumped */ -char *dumpinomap; /* map of files to be dumped */ +extern int mapsize; /* size of the state maps */ +extern char *usedinomap; /* map of allocated inodes */ +extern char *dumpdirmap; /* map of directories to be dumped */ +extern char *dumpinomap; /* map of files to be dumped */ /* * Map manipulation macros. */ @@ -56,40 +56,40 @@ char *dumpinomap; /* map of files to be dumped */ /* * All calculations done in 0.1" units! */ -char *disk; /* name of the disk file */ -char *tape; /* name of the tape file */ -char *popenout; /* popen(3) per-"tape" command */ -char *dumpdates; /* name of the file containing dump date information*/ -char *temp; /* name of the file for doing rewrite of dumpdates */ -int lastlevel; /* dump level of previous dump */ -int level; /* dump level of this dump */ -int uflag; /* update flag */ -int diskfd; /* disk file descriptor */ -int tapefd; /* tape file descriptor */ -int pipeout; /* true => output to standard output */ -ino_t curino; /* current inumber; used globally */ -int newtape; /* new tape flag */ -int density; /* density in 0.1" units */ -long tapesize; /* estimated tape size, blocks */ -long tsize; /* tape size in 0.1" units */ -long asize; /* number of 0.1" units written on current tape */ -int etapes; /* estimated number of tapes */ -int nonodump; /* if set, do not honor UF_NODUMP user flags */ -int unlimited; /* if set, write to end of medium */ -int cachesize; /* size of block cache in bytes */ -int rsync_friendly; /* be friendly with rsync */ +extern char *disk; /* name of the disk file */ +extern char *tape; /* name of the tape file */ +extern char *popenout; /* popen(3) per-"tape" command */ +extern char *dumpdates; /* name of the file containing dump date info */ +extern int lastlevel; /* dump level of previous dump */ +extern int level; /* dump level of this dump */ +extern int uflag; /* update flag */ +extern int diskfd; /* disk file descriptor */ +extern int pipeout; /* true => output to standard output */ +extern ino_t curino; /* current inumber; used globally */ +extern int newtape; /* new tape flag */ +extern int density; /* density in 0.1" units */ +extern long tapesize; /* estimated tape size, blocks */ +extern long tsize; /* tape size in 0.1" units */ +extern int etapes; /* estimated number of tapes */ +extern int nonodump; /* if set, do not honor UF_NODUMP user flags */ +extern int unlimited; /* if set, write to end of medium */ +extern int cachesize; /* size of block cache in bytes */ +extern int rsync_friendly; /* be friendly with rsync */ +extern int notify; /* notify operator flag */ +extern int blockswritten; /* number of blocks written on current tape */ +extern int tapeno; /* current tape number */ +extern int ntrec; /* blocking factor on tape */ +extern long blocksperfile; /* number of blocks per output file */ +extern int cartridge; /* assume non-cartridge tape */ +extern char *host; /* remote host (if any) */ +extern time_t tstart_writing; /* when started writing the first tape block */ +extern time_t tend_writing; /* after writing the last tape block */ +extern int passno; /* current dump pass number */ +extern struct fs *sblock; /* the file system super block */ +extern long dev_bsize; /* block size of underlying disk device */ +extern int dev_bshift; /* log2(dev_bsize) */ +extern int tp_bshift; /* log2(TP_BSIZE) */ -int notify; /* notify operator flag */ -int blockswritten; /* number of blocks written on current tape */ -int tapeno; /* current tape number */ -time_t tstart_writing; /* when started writing the first tape block */ -time_t tend_writing; /* after writing the last tape block */ -int passno; /* current dump pass number */ -struct fs *sblock; /* the file system super block */ -long dev_bsize; /* block size of underlying disk device */ -int dev_bshift; /* log2(dev_bsize) */ -int tp_bshift; /* log2(TP_BSIZE) */ - /* operator interface functions */ void broadcast(const char *message); void infosch(int); @@ -163,8 +163,8 @@ struct dumpdates { int dd_level; time_t dd_ddate; }; -int nddates; /* number of records (might be zero) */ -struct dumpdates **ddatev; /* the arrayfied version */ +extern int nddates; /* number of records (might be zero) */ +extern struct dumpdates **ddatev; /* the arrayfied version */ void initdumptimes(void); void getdumptime(void); void putdumptime(void); Modified: head/sbin/dump/dumprmt.c ============================================================================== --- head/sbin/dump/dumprmt.c Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/dumprmt.c Sat Apr 4 00:56:56 2020 (r359627) @@ -80,7 +80,6 @@ static void rmtgets(char *, int); static int rmtreply(const char *); static int errfd = -1; -extern int ntrec; /* blocking factor on tape */ int rmthost(const char *host) Modified: head/sbin/dump/itime.c ============================================================================== --- head/sbin/dump/itime.c Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/itime.c Sat Apr 4 00:56:56 2020 (r359627) @@ -60,8 +60,10 @@ struct dumptime { SLIST_ENTRY(dumptime) dt_list; }; SLIST_HEAD(dthead, dumptime) dthead = SLIST_HEAD_INITIALIZER(dthead); -struct dumpdates **ddatev = NULL; -int nddates = 0; +int nddates = 0; /* number of records (might be zero) */ +struct dumpdates **ddatev; /* the arrayfied version */ +char *dumpdates; /* name of the file containing dump date info */ +int lastlevel; /* dump level of previous dump */ static void dumprecout(FILE *, const struct dumpdates *); static int getrecord(FILE *, struct dumpdates *); Modified: head/sbin/dump/main.c ============================================================================== --- head/sbin/dump/main.c Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/main.c Sat Apr 4 00:56:56 2020 (r359627) @@ -73,17 +73,40 @@ static const char rcsid[] = #include "dump.h" #include "pathnames.h" +int mapsize; /* size of the state maps */ +char *usedinomap; /* map of allocated inodes */ +char *dumpdirmap; /* map of directories to be dumped */ +char *dumpinomap; /* map of files to be dumped */ +char *disk; /* name of the disk file */ +char *tape; /* name of the tape file */ +char *popenout; /* popen(3) per-"tape" command */ +int level; /* dump level of this dump */ +int uflag; /* update flag */ +int diskfd; /* disk file descriptor */ +int pipeout; /* true => output to standard output */ +int density = 0; /* density in bytes/0.1" " <- this is for hilit19 */ +long tapesize; /* estimated tape size, blocks */ +long tsize; /* tape size in 0.1" units */ +int etapes; /* estimated number of tapes */ +int nonodump; /* if set, do not honor UF_NODUMP user flags */ +int unlimited; /* if set, write to end of medium */ +int cachesize = 0; /* block cache size (in bytes), defaults to 0 */ +int rsync_friendly; /* be friendly with rsync */ int notify = 0; /* notify operator flag */ -int snapdump = 0; /* dumping live filesystem, so use snapshot */ -int blockswritten = 0; /* number of blocks written on current tape */ +int blockswritten = 0; /* number of blocks written on current tape */ int tapeno = 0; /* current tape number */ -int density = 0; /* density in bytes/0.1" " <- this is for hilit19 */ int ntrec = NTREC; /* # tape blocks in each tape record */ +long blocksperfile; /* number of blocks per output file */ int cartridge = 0; /* Assume non-cartridge tape */ -int cachesize = 0; /* block cache size (in bytes), defaults to 0 */ -long dev_bsize = 1; /* recalculated below */ -long blocksperfile; /* output blocks per file */ char *host = NULL; /* remote host (if any) */ +time_t tstart_writing; /* when started writing the first tape block */ +time_t tend_writing; /* after writing the last tape block */ +int passno; /* current dump pass number */ +struct fs *sblock; /* the file system super block */ +long dev_bsize = 1; /* recalculated below */ +int dev_bshift; /* log2(dev_bsize) */ +int tp_bshift; /* log2(TP_BSIZE) */ +int snapdump = 0; /* dumping live filesystem, so use snapshot */ static char *getmntpt(char *, int *); static long numarg(const char *, long, long); @@ -111,7 +134,6 @@ main(int argc, char *argv[]) dumpdates = _PATH_DUMPDATES; popenout = NULL; tape = NULL; - temp = _PATH_DTMP; if (TP_BSIZE / DEV_BSIZE == 0 || TP_BSIZE % DEV_BSIZE != 0) quit("TP_BSIZE must be a multiple of DEV_BSIZE\n"); level = 0; Modified: head/sbin/dump/pathnames.h ============================================================================== --- head/sbin/dump/pathnames.h Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/pathnames.h Sat Apr 4 00:56:56 2020 (r359627) @@ -35,7 +35,6 @@ #include #define _PATH_DEFTAPE "/dev/sa0" -#define _PATH_DTMP "/etc/dtmp" #define _PATH_DUMPDATES "/etc/dumpdates" #define _PATH_LOCK "/tmp/dumplockXXXXXX" #define _PATH_RMT "/etc/rmt" /* path on remote host */ Modified: head/sbin/dump/tape.c ============================================================================== --- head/sbin/dump/tape.c Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/dump/tape.c Sat Apr 4 00:56:56 2020 (r359627) @@ -61,17 +61,19 @@ static const char rcsid[] = #include "dump.h" -int writesize; /* size of malloc()ed buffer for tape */ -int64_t lastspclrec = -1; /* tape block number of last written header */ -int trecno = 0; /* next record to write in current block */ -extern long blocksperfile; /* number of blocks per output file */ -long blocksthisvol; /* number of blocks on current output file */ -extern int ntrec; /* blocking factor on tape */ -extern int cartridge; -extern char *host; -char *nexttape; -FILE *popenfp = NULL; +ino_t curino; /* current inumber; used globally */ +int newtape; /* new tape flag */ +union u_spcl u_spcl; /* mapping of variables in a control block */ +static int tapefd; /* tape file descriptor */ +static long asize; /* number of 0.1" units written on cur tape */ +static int writesize; /* size of malloc()ed buffer for tape */ +static int64_t lastspclrec = -1; /* tape block number of last written header */ +static int trecno = 0; /* next record to write in current block */ +static long blocksthisvol; /* number of blocks on current output file */ +static char *nexttape; +static FILE *popenfp = NULL; + static int atomic(ssize_t (*)(), int, char *, int); static void doslave(int, int); static void enslave(void); @@ -91,10 +93,10 @@ struct req { ufs2_daddr_t dblk; int count; }; -int reqsiz; +static int reqsiz; #define SLAVES 3 /* 1 slave writing, 1 reading, 1 for slack */ -struct slave { +static struct slave { int64_t tapea; /* header number at start of this chunk */ int64_t firstrec; /* record number of this block */ int count; /* count to next header (used for TS_TAPE */ @@ -106,12 +108,12 @@ struct slave { char (*tblock)[TP_BSIZE]; /* buffer for data blocks */ struct req *req; /* buffer for requests */ } slaves[SLAVES+1]; -struct slave *slp; +static struct slave *slp; -char (*nextblock)[TP_BSIZE]; +static char (*nextblock)[TP_BSIZE]; -int master; /* pid of master, for sending error signals */ -int tenths; /* length of tape used per block written */ +static int master; /* pid of master, for sending error signals */ +static int tenths; /* length of tape used per block written */ static volatile sig_atomic_t caught; /* have we caught the signal to proceed? */ static volatile sig_atomic_t ready; /* reached the lock point without having */ /* received the SIGUSR2 signal from the prev slave? */ Modified: head/sbin/restore/restore.h ============================================================================== --- head/sbin/restore/restore.h Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/restore/restore.h Sat Apr 4 00:56:56 2020 (r359627) @@ -103,7 +103,7 @@ struct entry { /* * The entry describes the next file available on the tape */ -struct context { +extern struct context { short action; /* action being taken on this file */ mode_t mode; /* mode of file */ ino_t ino; /* inumber of file */ Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Sat Apr 4 00:31:30 2020 (r359626) +++ head/sbin/restore/tape.c Sat Apr 4 00:56:56 2020 (r359627) @@ -94,6 +94,8 @@ static char *map; static char lnkbuf[MAXPATHLEN + 1]; static int pathlen; +struct context curfile; /* describes next file available on the tape */ +union u_spcl u_spcl; /* mapping of variables in a control block */ int Bcvt; /* Swap Bytes */ int oldinofmt; /* FreeBSD 1 inode format needs cvt */ From owner-svn-src-head@freebsd.org Sat Apr 4 04:03:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D256027D873; Sat, 4 Apr 2020 04:03:22 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vNSm0XJ0z4Pt4; Sat, 4 Apr 2020 04:03:20 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A86719DD8; Sat, 4 Apr 2020 04:03:11 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03443B4f019169; Sat, 4 Apr 2020 04:03:11 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03443B91019168; Sat, 4 Apr 2020 04:03:11 GMT (envelope-from jah@FreeBSD.org) Message-Id: <202004040403.03443B91019168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 4 Apr 2020 04:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359628 - head/sys/security/mac X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/sys/security/mac X-SVN-Commit-Revision: 359628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 04:03:22 -0000 Author: jah Date: Sat Apr 4 04:03:10 2020 New Revision: 359628 URL: https://svnweb.freebsd.org/changeset/base/359628 Log: mac_policy: Remove mac_policy_sx This lock was made unnecessary by the addition of mac_policy_rms in r356120. Reviewed by: mjg, kib Differential Revision: https://reviews.freebsd.org/D24283 Modified: head/sys/security/mac/mac_framework.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Sat Apr 4 00:56:56 2020 (r359627) +++ head/sys/security/mac/mac_framework.c Sat Apr 4 04:03:10 2020 (r359628) @@ -184,7 +184,7 @@ MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary lab * The dynamic policy list is protected by two locks: modifying the list * requires both locks to be held exclusively. One of the locks, * mac_policy_rm, is acquired over policy entry points that will never sleep; - * the other, mac_policy_sx, is acquire over policy entry points that may + * the other, mac_policy_rms, is acquired over policy entry points that may * sleep. The former category will be used when kernel locks may be held * over calls to the MAC Framework, during network processing in ithreads, * etc. The latter will tend to involve potentially blocking memory @@ -192,8 +192,7 @@ MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary lab */ #ifndef MAC_STATIC static struct rmlock mac_policy_rm; /* Non-sleeping entry points. */ -static struct sx mac_policy_sx; /* Sleeping entry points. */ -static struct rmslock mac_policy_rms; +static struct rmslock mac_policy_rms; /* Sleeping entry points. */ #endif struct mac_policy_list_head mac_policy_list; @@ -266,7 +265,6 @@ mac_policy_xlock(void) if (!mac_late) return; - sx_xlock(&mac_policy_sx); rms_wlock(&mac_policy_rms); rm_wlock(&mac_policy_rm); #endif @@ -282,7 +280,6 @@ mac_policy_xunlock(void) rm_wunlock(&mac_policy_rm); rms_wunlock(&mac_policy_rms); - sx_xunlock(&mac_policy_sx); #endif } @@ -294,8 +291,7 @@ mac_policy_xlock_assert(void) if (!mac_late) return; - /* XXXRW: rm_assert(&mac_policy_rm, RA_WLOCKED); */ - sx_assert(&mac_policy_sx, SA_XLOCKED); + rm_assert(&mac_policy_rm, RA_WLOCKED); #endif } @@ -313,7 +309,6 @@ mac_init(void) #ifndef MAC_STATIC rm_init_flags(&mac_policy_rm, "mac_policy_rm", RM_NOWITNESS | RM_RECURSE); - sx_init_flags(&mac_policy_sx, "mac_policy_sx", SX_NOWITNESS); rms_init(&mac_policy_rms, "mac_policy_rms"); #endif } From owner-svn-src-head@freebsd.org Sat Apr 4 07:43:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 457B82A411F; Sat, 4 Apr 2020 07:43:57 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vTMH1J8rz3N86; Sat, 4 Apr 2020 07:43:54 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8946B1CCEA; Sat, 4 Apr 2020 07:43:48 +0000 (UTC) (envelope-from carlavilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0347hm8q061556; Sat, 4 Apr 2020 07:43:48 GMT (envelope-from carlavilla@FreeBSD.org) Received: (from carlavilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0347hmd6061555; Sat, 4 Apr 2020 07:43:48 GMT (envelope-from carlavilla@FreeBSD.org) Message-Id: <202004040743.0347hmd6061555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: carlavilla set sender to carlavilla@FreeBSD.org using -f From: Sergio Carlavilla Delgado Date: Sat, 4 Apr 2020 07:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359629 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: carlavilla X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 359629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 07:43:57 -0000 Author: carlavilla (doc committer) Date: Sat Apr 4 07:43:47 2020 New Revision: 359629 URL: https://svnweb.freebsd.org/changeset/base/359629 Log: Fix typo Modified: head/lib/msun/man/cos.3 Modified: head/lib/msun/man/cos.3 ============================================================================== --- head/lib/msun/man/cos.3 Sat Apr 4 04:03:10 2020 (r359628) +++ head/lib/msun/man/cos.3 Sat Apr 4 07:43:47 2020 (r359629) @@ -83,6 +83,6 @@ These functions conform to .St -isoC-99 . .Sh HISTORY The -.Fn sin +.Fn cos function first appeared in .At v1 . From owner-svn-src-head@freebsd.org Sat Apr 4 12:07:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A24E42AAF9B; Sat, 4 Apr 2020 12:07:44 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vbCg40pZz4YZ6; Sat, 4 Apr 2020 12:07:43 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8E7B20861; Sat, 4 Apr 2020 12:07:36 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 034C7arE021613; Sat, 4 Apr 2020 12:07:36 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 034C7ad8021612; Sat, 4 Apr 2020 12:07:36 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <202004041207.034C7ad8021612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sat, 4 Apr 2020 12:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359631 - head/usr.bin/ruptime X-SVN-Group: head X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: head/usr.bin/ruptime X-SVN-Commit-Revision: 359631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 12:07:44 -0000 Author: nyan Date: Sat Apr 4 12:07:36 2020 New Revision: 359631 URL: https://svnweb.freebsd.org/changeset/base/359631 Log: Remove extra spaces for the load average of machines that are down. PR: 245296 Submitted by: martin _at_ lispworks.com MFC after: 1 week Modified: head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/ruptime.c ============================================================================== --- head/usr.bin/ruptime/ruptime.c Sat Apr 4 11:11:27 2020 (r359630) +++ head/usr.bin/ruptime/ruptime.c Sat Apr 4 12:07:36 2020 (r359631) @@ -234,18 +234,21 @@ ruptime(const char *host, int aflg, int (*cmp)(const v if (hostnamewidth < (int)strlen(wd->wd_hostname)) hostnamewidth = (int)strlen(wd->wd_hostname); - for (i = 0; i < 3; i++) { - w = iwidth(wd->wd_loadav[i] / 100) + 3; - if (loadavwidth[i] < w) - loadavwidth[i] = w; + + if (!ISDOWN(hsp)) { + for (i = 0; i < 3; i++) { + w = iwidth(wd->wd_loadav[i] / 100) + 3; + if (loadavwidth[i] < w) + loadavwidth[i] = w; + } + for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; + (char *)(we + 1) <= (char *)wd + cc; we++) + if (aflg || we->we_idle < 3600) + ++hsp->hs_nusers; + if (userswidth < iwidth(hsp->hs_nusers)) + userswidth = iwidth(hsp->hs_nusers); } - for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; - (char *)(we + 1) <= (char *)wd + cc; we++) - if (aflg || we->we_idle < 3600) - ++hsp->hs_nusers; - if (userswidth < iwidth(hsp->hs_nusers)) - userswidth = iwidth(hsp->hs_nusers); ++hsp; ++nhosts; } From owner-svn-src-head@freebsd.org Sat Apr 4 21:45:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBA0B2A401D; Sat, 4 Apr 2020 21:45:44 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vr2b3yytz4JhP; Sat, 4 Apr 2020 21:45:42 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF17254A; Sat, 4 Apr 2020 21:38:01 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 034Lc13f085912; Sat, 4 Apr 2020 21:38:01 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 034Lc1J1085911; Sat, 4 Apr 2020 21:38:01 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <202004042138.034Lc1J1085911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Sat, 4 Apr 2020 21:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359633 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: brueffer X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 359633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 21:45:45 -0000 Author: brueffer Date: Sat Apr 4 21:38:00 2020 New Revision: 359633 URL: https://svnweb.freebsd.org/changeset/base/359633 Log: Add a manpage for smbios(4). Submitted by: Gordon Bergling MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23714 Added: head/share/man/man4/smbios.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Apr 4 17:08:58 2020 (r359632) +++ head/share/man/man4/Makefile Sat Apr 4 21:38:00 2020 (r359633) @@ -471,6 +471,7 @@ MAN= aac.4 \ sk.4 \ ${_smartpqi.4} \ smb.4 \ + smbios.4 \ smbus.4 \ smp.4 \ smsc.4 \ Added: head/share/man/man4/smbios.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/smbios.4 Sat Apr 4 21:38:00 2020 (r359633) @@ -0,0 +1,63 @@ +.\" Copyright (c) 2020 Gordon Bergling +.\" +.\" 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$ +.\" +.Dd April 4, 2020 +.Dt SMBIOS 4 +.Os +.Sh NAME +.Nm smbios +.Nd "System Management BIOS" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device smbios" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +smbios_load="YES" +.Ed +.Sh DESCRIPTION +The System Management BIOS (SMBIOS) describes hardware components. +.Sh SEE ALSO +.Xr efi 4 +.Rs +.%T System Management BIOS (SMBIOS) Reference Specification +.%N DMTF DSP0134 +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 4.8 . +.Sh AUTHORS +The +.Nm +device driver was written by +.An Matthew N. Dodd Aq Mt winter@jurai.net . From owner-svn-src-head@freebsd.org Sat Apr 4 22:37:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66CAA2A5387; Sat, 4 Apr 2020 22:37:59 +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 48vsBt1YJNz4dCM; Sat, 4 Apr 2020 22:37:57 +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 4FB0711CB; Sat, 4 Apr 2020 22:37: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 034MboOa022793; Sat, 4 Apr 2020 22:37:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 034MboGg022789; Sat, 4 Apr 2020 22:37:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004042237.034MboGg022789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Apr 2020 22:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359634 - 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: 359634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2020 22:37:59 -0000 Author: kib Date: Sat Apr 4 22:37:50 2020 New Revision: 359634 URL: https://svnweb.freebsd.org/changeset/base/359634 Log: Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments. See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case. See https://reviews.llvm.org/D64930 for the background and more discussion. Also this fixes another bug in malloc_aligned() where total size of the allocated memory might be not enough to fit the aligned requested block after the initial pointer is incremented by the pointer size. Reviewed by: bdragon Tested by: antoine (exp-run PR 244866), bdragon, emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D21163 Modified: head/libexec/rtld-elf/map_object.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/xmalloc.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Sat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/map_object.c Sat Apr 4 22:37:50 2020 (r359634) @@ -313,6 +313,7 @@ map_object(int fd, const char *path, const struct stat obj->tlsindex = ++tls_max_index; obj->tlssize = phtls->p_memsz; obj->tlsalign = phtls->p_align; + obj->tlspoffset = phtls->p_offset; obj->tlsinitsize = phtls->p_filesz; obj->tlsinit = mapbase + phtls->p_vaddr; } Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/rtld.c Sat Apr 4 22:37:50 2020 (r359634) @@ -1501,6 +1501,7 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t e obj->tlsalign = ph->p_align; obj->tlsinitsize = ph->p_filesz; obj->tlsinit = (void*)(ph->p_vaddr + obj->relocbase); + obj->tlspoffset = ph->p_offset; break; case PT_GNU_STACK: @@ -4868,7 +4869,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb Elf_Addr addr; Elf_Addr i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; - size_t tls_init_align; + size_t tls_init_align, tls_init_offset; if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); @@ -4885,7 +4886,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb tls_block_size += pre_size + tls_static_space - TLS_TCB_SIZE - post_size; /* Allocate whole TLS block */ - tls_block = malloc_aligned(tls_block_size, maxalign); + tls_block = malloc_aligned(tls_block_size, maxalign, 0); tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); if (oldtcb != NULL) { @@ -4909,15 +4910,21 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb for (obj = globallist_curr(objs); obj != NULL; obj = globallist_next(obj)) { - if (obj->tlsoffset > 0) { - addr = (Elf_Addr)tcb + obj->tlsoffset; - if (obj->tlsinitsize > 0) - memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize); - if (obj->tlssize > obj->tlsinitsize) - memset((void*)(addr + obj->tlsinitsize), 0, - obj->tlssize - obj->tlsinitsize); - dtv[obj->tlsindex + 1] = addr; + if (obj->tlsoffset == 0) + continue; + tls_init_offset = obj->tlspoffset & (obj->tlsalign - 1); + addr = (Elf_Addr)tcb + obj->tlsoffset; + if (tls_init_offset > 0) + memset((void *)addr, 0, tls_init_offset); + if (obj->tlsinitsize > 0) { + memcpy((void *)(addr + tls_init_offset), obj->tlsinit, + obj->tlsinitsize); } + if (obj->tlssize > obj->tlsinitsize) { + memset((void *)(addr + tls_init_offset + obj->tlsinitsize), + 0, obj->tlssize - obj->tlsinitsize - tls_init_offset); + } + dtv[obj->tlsindex + 1] = addr; } } @@ -4975,7 +4982,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcb size = round(tls_static_space, ralign) + round(tcbsize, ralign); assert(tcbsize >= 2*sizeof(Elf_Addr)); - tls = malloc_aligned(size, ralign); + tls = malloc_aligned(size, ralign, 0 /* XXX */); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); @@ -5068,25 +5075,24 @@ free_tls(void *tls, size_t tcbsize __unused, size_t t void * allocate_module_tls(int index) { - Obj_Entry* obj; - char* p; + Obj_Entry *obj; + char *p; - TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) - continue; - if (obj->tlsindex == index) - break; - } - if (!obj) { - _rtld_error("Can't find module with TLS index %d", index); - rtld_die(); - } + TAILQ_FOREACH(obj, &obj_list, next) { + if (obj->marker) + continue; + if (obj->tlsindex == index) + break; + } + if (obj == NULL) { + _rtld_error("Can't find module with TLS index %d", index); + rtld_die(); + } - p = malloc_aligned(obj->tlssize, obj->tlsalign); - memcpy(p, obj->tlsinit, obj->tlsinitsize); - memset(p + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize); - - return p; + p = malloc_aligned(obj->tlssize, obj->tlsalign, obj->tlspoffset); + memcpy(p, obj->tlsinit, obj->tlsinitsize); + memset(p + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize); + return (p); } bool Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/rtld.h Sat Apr 4 22:37:50 2020 (r359634) @@ -163,6 +163,7 @@ typedef struct Struct_Obj_Entry { size_t tlssize; /* Size of TLS block for this module */ size_t tlsoffset; /* Offset of static TLS block for this module */ size_t tlsalign; /* Alignment of static TLS block */ + size_t tlspoffset; /* p_offset of the static TLS block */ caddr_t relro_page; size_t relro_size; @@ -361,7 +362,7 @@ Obj_Entry *map_object(int, const char *, const struct void *xcalloc(size_t, size_t); void *xmalloc(size_t); char *xstrdup(const char *); -void *malloc_aligned(size_t size, size_t align); +void *malloc_aligned(size_t size, size_t align, size_t offset); void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ Modified: head/libexec/rtld-elf/xmalloc.c ============================================================================== --- head/libexec/rtld-elf/xmalloc.c Sat Apr 4 21:38:00 2020 (r359633) +++ head/libexec/rtld-elf/xmalloc.c Sat Apr 4 22:37:50 2020 (r359634) @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#include #include #include #include @@ -76,16 +77,21 @@ xstrdup(const char *str) } void * -malloc_aligned(size_t size, size_t align) +malloc_aligned(size_t size, size_t align, size_t offset) { - void *mem, *res; + char *mem, *res; + uintptr_t x; + offset &= align - 1; if (align < sizeof(void *)) align = sizeof(void *); - mem = xmalloc(size + sizeof(void *) + align - 1); - res = (void *)round((uintptr_t)mem + sizeof(void *), align); - *(void **)((uintptr_t)res - sizeof(void *)) = mem; + mem = xmalloc(size + 3 * align + offset); + x = roundup((uintptr_t)mem + sizeof(void *), align); + x += offset; + res = (void *)x; + x -= sizeof(void *); + memcpy((void *)x, &mem, sizeof(mem)); return (res); } @@ -99,6 +105,6 @@ free_aligned(void *ptr) return; x = (uintptr_t)ptr; x -= sizeof(void *); - mem = *(void **)x; + memcpy(&mem, (void *)x, sizeof(mem)); free(mem); }