From owner-svn-src-stable@freebsd.org Sun Nov 1 01:47:16 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BC7345D7FD for ; Sun, 1 Nov 2020 01:47:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CNzSM3VSFz4Hsl for ; Sun, 1 Nov 2020 01:47:15 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1604195228; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=u0Yvt0WEjlboTutnBb55LWXq9cr628PnX+ySzTj33GMowBFsMOohCZArN/D7bYAfRQ+ceAoGu6ZFV 3yy+1kg0hTaJDf5KyZIdY8mKnrlBc7XqJK2It73F9kHw6ZVMdllcEQqXTdWWIJgAorrOsc6GWyiKbk PW38oLRD89LX274Ty+3/02Lk0m3Zc4T8gKE+9bUEjm3fNkhMIX0U0Wb6/1n6gsN6a0O6phwI844Jhy jKNFpKE6PCr28g55nDk41YGlohKIKiPYVBau0KRbUM7YfVXCMb9lNEnezaYnrcQeUZZGExE7PSVOv8 37xHQDAX/A4z8ynDxhJYbzIyj6M2Xeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=oQlP95mUcPu5KSajQhwSAvCOMxvxFeDgXGbDYBYGcNY=; b=BpAzZGSL2p6mjnWI80CtCwn/I3x4n+0mKpSZptrz3foiYvT304AihCaq5QI6RK3gtXGRFcZOQGybl 4+f72rPdN1WlRQ1E/k27k18NE4DQHIy2hruKKzYg54NwfU9qiVoA5eLbIe5WWeDASP/kzWdDH7ZOCC AAoxPmVkzyef89qqrbgJNPpScHgHgKWC83QpXVlhYwLfokyjrf6GS4cRZ/l0J/qYgEAcyp4z+FNZSx tfkoSLmcvXydb6QxquSFCOgU7EyXvLLHx455KHWyfjDUH17yV9nJr1CB9tObWbL4VJlpaceBkq9n/f btCFzrgumfd16KZdVJN+joSzoroSSoA== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=oQlP95mUcPu5KSajQhwSAvCOMxvxFeDgXGbDYBYGcNY=; b=jDQ+Fw3NT8BCI1kiyxFBdAr393DFeJDBSFeLO/lEZMbGf2qsfWDbBDakFuWCE3UcRkIR/Sjus6fAK T0KtrGnxjhPFgKbTgxM+pV2agw481q8vPrxYl9zEeUrOzxHkgNNam51RJUhAQnMXKqDqN3cyGk74O6 gnc5Zo+CwTcGazK/EUZ2hSE4kSYIUUB5WmSU0QchM2/CFBo19kEPIrwpZMClF+ohibBpcuWl/6YSzP P0ETRksWZmyuVMtc6n3hBhFMdG7ZL8p0mNVh6eJYB4SP6c+XemnnD5tnWbTKYdKHqJZaHd51XZrv8f cv5ZkcZZZKPWf3UgH9ui7936HtVNMxQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 25318c58-1be4-11eb-8b38-614106969e8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 25318c58-1be4-11eb-8b38-614106969e8d; Sun, 01 Nov 2020 01:47:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0A11l5dM079546; Sat, 31 Oct 2020 19:47:05 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <527bf56f85177bfaf06e3631c3871c43f1f1b4cb.camel@freebsd.org> Subject: Re: svn commit: r367228 - in stable: 11/contrib/llvm-project/lldb/source/Target 12/contrib/llvm-project/lldb/source/Target From: Ian Lepore To: rgrimes@freebsd.org, Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Date: Sat, 31 Oct 2020 19:47:05 -0600 In-Reply-To: <202010311859.09VIxKjM006518@gndrsh.dnsmgr.net> References: <202010311859.09VIxKjM006518@gndrsh.dnsmgr.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CNzSM3VSFz4Hsl X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2020 01:47:16 -0000 On Sat, 2020-10-31 at 11:59 -0700, Rodney W. Grimes wrote: > > Author: dim > > Date: Sat Oct 31 18:42:03 2020 > > New Revision: 367228 > > URL: https://svnweb.freebsd.org/changeset/base/367228 > > > > Log: > > MFC r364480: > > > > Merge commit 1ce07cd614be from llvm git (by me): > > ^^^^^^^ > FYI, we have a username me so this is not the best > way to express yourself in commit mail: > freefall:rgrimes {102} grep ^me: /etc/passwd > me:*:589:589:Michael Elbel:/home/me:/usr/local/bin/bash I think everyone understands that in plain English, 'me' is self- referential. If someone really wanted to refer to the user, they would do so with the usual convention of typing 'me@'. -- Ian From owner-svn-src-stable@freebsd.org Sun Nov 1 11:09:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02B8D449EA1; Sun, 1 Nov 2020 11:09:12 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPCwl61Q0z41gy; Sun, 1 Nov 2020 11:09:11 +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 ACEED1756C; Sun, 1 Nov 2020 11:09:11 +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 0A1B9BdC026212; Sun, 1 Nov 2020 11:09:11 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A1B9BK9026211; Sun, 1 Nov 2020 11:09:11 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011011109.0A1B9BK9026211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 1 Nov 2020 11:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367246 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 367246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2020 11:09:12 -0000 Author: 0mp (doc,ports committer) Date: Sun Nov 1 11:09:11 2020 New Revision: 367246 URL: https://svnweb.freebsd.org/changeset/base/367246 Log: MFC r367039: ifconfig.8: Remove spurious commas Correct misuse of commas/parentheses in an enumeration that makes the number of actual parameters more important than expected. PR: 250526 Submitted by: Samy Mahmoudi Modified: stable/12/sbin/ifconfig/ifconfig.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Sun Nov 1 03:39:34 2020 (r367245) +++ stable/12/sbin/ifconfig/ifconfig.8 Sun Nov 1 11:09:11 2020 (r367246) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd September 17, 2020 +.Dd October 25, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -849,10 +849,10 @@ is one of .Cm ahdemo (or .Cm adhoc-demo ) , -.Cm ibss , +.Cm ibss (or .Cm adhoc ) , -.Cm ap , +.Cm ap (or .Cm hostap ) , .Cm wds , From owner-svn-src-stable@freebsd.org Sun Nov 1 11:34:16 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BE1444A5F9; Sun, 1 Nov 2020 11:34:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPDTh3cQyz42KV; Sun, 1 Nov 2020 11:34:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F3C717E9F; Sun, 1 Nov 2020 11:34:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A1BYG5V044302; Sun, 1 Nov 2020 11:34:16 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A1BYGO5044301; Sun, 1 Nov 2020 11:34:16 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011011134.0A1BYGO5044301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 1 Nov 2020 11:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367247 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 367247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2020 11:34:16 -0000 Author: 0mp (doc,ports committer) Date: Sun Nov 1 11:34:15 2020 New Revision: 367247 URL: https://svnweb.freebsd.org/changeset/base/367247 Log: MFC r367039: ifconfig.8: Remove spurious commas Correct misuse of commas/parentheses in an enumeration that makes the number of actual parameters more important than expected. PR: 250526 Submitted by: Samy Mahmoudi Modified: stable/11/sbin/ifconfig/ifconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.8 Sun Nov 1 11:09:11 2020 (r367246) +++ stable/11/sbin/ifconfig/ifconfig.8 Sun Nov 1 11:34:15 2020 (r367247) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd September 17, 2016 +.Dd October 25, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -832,10 +832,10 @@ is one of .Cm ahdemo (or .Cm adhoc-demo ), -.Cm ibss , +.Cm ibss (or .Cm adhoc ), -.Cm ap , +.Cm ap (or .Cm hostap ), .Cm wds , From owner-svn-src-stable@freebsd.org Mon Nov 2 00:45:40 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E25883F09FE; Mon, 2 Nov 2020 00:45: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPZ2r5TPhz3bRR; Mon, 2 Nov 2020 00:45:40 +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 9FB7A2153B; Mon, 2 Nov 2020 00:45:40 +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 0A20jeKG031481; Mon, 2 Nov 2020 00:45:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A20jeI9031480; Mon, 2 Nov 2020 00:45:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202011020045.0A20jeI9031480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Nov 2020 00:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367260 - in stable/12/sys/modules: . vmware X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12/sys/modules: . vmware X-SVN-Commit-Revision: 367260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 00:45:41 -0000 Author: emaste Date: Mon Nov 2 00:45:40 2020 New Revision: 367260 URL: https://svnweb.freebsd.org/changeset/base/367260 Log: MFC r366861: build vmware modules on arm64 Modified: stable/12/sys/modules/Makefile stable/12/sys/modules/vmware/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/Makefile ============================================================================== --- stable/12/sys/modules/Makefile Sun Nov 1 22:50:21 2020 (r367259) +++ stable/12/sys/modules/Makefile Mon Nov 2 00:45:40 2020 (r367260) @@ -527,6 +527,7 @@ _mthca= mthca _mlx4ib= mlx4ib _mlx5ib= mlx5ib .endif +_vmware= vmware .endif .if ${MK_NAND} != "no" || defined(ALL_MODULES) @@ -668,7 +669,6 @@ _scsi_low= scsi_low _speaker= speaker _splash= splash _sppp= sppp -_vmware= vmware _wbwd= wbwd _wi= wi _xe= xe Modified: stable/12/sys/modules/vmware/Makefile ============================================================================== --- stable/12/sys/modules/vmware/Makefile Sun Nov 1 22:50:21 2020 (r367259) +++ stable/12/sys/modules/vmware/Makefile Mon Nov 2 00:45:40 2020 (r367260) @@ -23,6 +23,9 @@ # SUCH DAMAGE. # -SUBDIR= vmci vmxnet3 +SUBDIR= vmxnet3 +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +SUBDIR+= vmci +.endif .include From owner-svn-src-stable@freebsd.org Mon Nov 2 01:05:42 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 805CE3F1372; Mon, 2 Nov 2020 01:05:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPZTy370Cz3cVF; Mon, 2 Nov 2020 01:05:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B0212145D; Mon, 2 Nov 2020 01:05:42 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A215gOR044265; Mon, 2 Nov 2020 01:05:42 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A215g7Y044263; Mon, 2 Nov 2020 01:05:42 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202011020105.0A215g7Y044263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 2 Nov 2020 01:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367262 - in stable/11/tools/tools/locale: etc/final-maps tools X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in stable/11/tools/tools/locale: etc/final-maps tools X-SVN-Commit-Revision: 367262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 01:05:42 -0000 Author: lwhsu Date: Mon Nov 2 01:05:41 2020 New Revision: 367262 URL: https://svnweb.freebsd.org/changeset/base/367262 Log: MFC r353127: Pre-generate Big5 charmap from CLDR data. The one used previously was missing the characters in 0-127 range, making various tools try to escape them in output. PR: 235100 Reviewed by: bapt Tested by: Ting-Wei Lan Differential Revision: https://reviews.freebsd.org/D21794 Modified: stable/11/tools/tools/locale/etc/final-maps/map.Big5 (contents, props changed) stable/11/tools/tools/locale/tools/finalize Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/locale/etc/final-maps/map.Big5 ============================================================================== --- stable/11/tools/tools/locale/etc/final-maps/map.Big5 Mon Nov 2 01:01:41 2020 (r367261) +++ stable/11/tools/tools/locale/etc/final-maps/map.Big5 Mon Nov 2 01:05:41 2020 (r367262) @@ -1,13708 +1,13968 @@ +###################### +# POSIX charmap +# Generated automatically from the Unicode Character Database and Common Locale Data Repository +# see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html +# charset: Big5 +###################### +################################################################################################# +# Copyright 1991-2011 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in # +# http://www.unicode.org/copyright.html. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode # +# data files and any associated documentation (the "Data Files") or Unicode software and any # +# associated documentation (the "Software") to deal in the Data Files or Software without # +# restriction, including without limitation the rights to use, copy, modify, merge, publish, # +# distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom # +# the Data Files or Software are furnished to do so, provided that (a) the above copyright # +# notice(s) and this permission notice appear with all copies of the Data Files or Software, # +# (b) both the above copyright notice(s) and this permission notice appear in associated # +# documentation, and (c) there is clear notice in each modified Data File or in the Software as # +# well as in the documentation associated with the Data File(s) or Software that the data or # +# software has been modified. # +# # +# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT # +# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR # +# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # +# CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. # +################################################################################################# + "Big5" - 1 - 2 + 1 + 2 + CHARMAP - \xa1\x40 - \xa1\x41 - \xa1\x42 - \xa1\x43 - \xa1\x44 - \xa1\x45 - \xa1\x46 - \xa1\x47 - \xa1\x48 - \xa1\x49 - \xa1\x4a - \xa1\x4b - \xa1\x4c - \xa1\x4d - \xa1\x4e - \xa1\x4f - \xa1\x50 - \xa1\x51 - \xa1\x52 - \xa1\x53 - \xa1\x54 - \xa1\x55 - \xa1\x56 - \xa1\x57 - \xa1\x58 - \xa1\x59 - \xa1\x5b - \xa1\x5c - \xa1\x5d - \xa1\x5e - \xa1\x5f - \xa1\x60 - \xa1\x61 - \xa1\x62 - \xa1\x63 - \xa1\x64 - \xa1\x65 - \xa1\x66 - \xa1\x67 - \xa1\x68 - \xa1\x69 - \xa1\x6a - \xa1\x6b - \xa1\x6c - \xa1\x6d - \xa1\x6e - \xa1\x6f - \xa1\x70 - \xa1\x71 - \xa1\x72 - \xa1\x73 - \xa1\x74 - \xa1\x75 - \xa1\x76 - \xa1\x77 - \xa1\x78 - \xa1\x79 - \xa1\x7a - \xa1\x7b - \xa1\x7c - \xa1\x7d - \xa1\x7e - \xa1\xa1 - \xa1\xa2 - \xa1\xa3 - \xa1\xa4 - \xa1\xa5 - \xa1\xa6 - \xa1\xa7 - \xa1\xa8 - \xa1\xa9 - \xa1\xaa - \xa1\xab - \xa1\xac - \xa1\xad - \xa1\xae - \xa1\xaf - \xa1\xb0 - \xa1\xb1 - \xa1\xb2 - \xa1\xb3 - \xa1\xb4 - \xa1\xb5 - \xa1\xb6 - \xa1\xb7 - \xa1\xb8 - \xa1\xb9 - \xa1\xba - \xa1\xbb - \xa1\xbc - \xa1\xbd - \xa1\xbe - \xa1\xbf - \xa1\xc0 - \xa1\xc1 - \xa1\xc2 - \xa1\xc4 - \xa1\xc6 - \xa1\xc7 - \xa1\xc8 - \xa1\xc9 - \xa1\xca - \xa1\xcb - \xa1\xcc - \xa1\xcd - \xa1\xce - \xa1\xcf - \xa1\xd0 - \xa1\xd1 - \xa1\xd2 - \xa1\xd3 - \xa1\xd4 - \xa1\xd5 - \xa1\xd6 - \xa1\xd7 - \xa1\xd8 - \xa1\xd9 - \xa1\xda - \xa1\xdb - \xa1\xdc - \xa1\xdd - \xa1\xde - \xa1\xdf - \xa1\xe0 - \xa1\xe1 - \xa1\xe2 - \xa1\xe3 - \xa1\xe4 - \xa1\xe5 - \xa1\xe6 - \xa1\xe7 - \xa1\xe8 - \xa1\xe9 - \xa1\xea - \xa1\xeb - \xa1\xec - \xa1\xed - \xa1\xee - \xa1\xef - \xa1\xf0 - \xa1\xf1 - \xa1\xf2 - \xa1\xf3 - \xa1\xf4 - \xa1\xf5 - \xa1\xf6 - \xa1\xf7 - \xa1\xf8 - \xa1\xf9 - \xa1\xfa - \xa1\xfb - \xa1\xfc - \xa1\xfd - \xa2\x41 - \xa2\x42 - \xa2\x43 - \xa2\x44 - \xa2\x45 - \xa2\x46 - \xa2\x47 - \xa2\x48 - \xa2\x49 - \xa2\x4a - \xa2\x4b - \xa2\x4c - \xa2\x4d - \xa2\x4e - \xa2\x4f - \xa2\x50 - \xa2\x51 - \xa2\x52 - \xa2\x53 - \xa2\x54 - \xa2\x55 - \xa2\x56 - \xa2\x57 - \xa2\x58 - \xa2\x59 - \xa2\x5a - \xa2\x5b - \xa2\x5c - \xa2\x5d - \xa2\x5e - \xa2\x5f - \xa2\x60 - \xa2\x61 - \xa2\x62 - \xa2\x63 - \xa2\x64 - \xa2\x65 - \xa2\x66 - \xa2\x67 - \xa2\x68 - \xa2\x69 - \xa2\x6a - \xa2\x6b - \xa2\x6c - \xa2\x6d - \xa2\x6e - \xa2\x6f - \xa2\x70 - \xa2\x71 - \xa2\x72 - \xa2\x73 - \xa2\x74 - \xa2\x75 - \xa2\x76 - \xa2\x77 - \xa2\x78 - \xa2\x79 - \xa2\x7a - \xa2\x7b - \xa2\x7c - \xa2\x7d - \xa2\x7e - \xa2\xa1 - \xa2\xa2 - \xa2\xa3 - \xa2\xa4 - \xa2\xa5 - \xa2\xa6 - \xa2\xa7 - \xa2\xa8 - \xa2\xa9 - \xa2\xaa - \xa2\xab - \xa2\xac - \xa2\xad - \xa2\xae - \xa2\xaf - \xa2\xb0 - \xa2\xb1 - \xa2\xb2 - \xa2\xb3 - \xa2\xb4 - \xa2\xb5 - \xa2\xb6 - \xa2\xb7 - \xa2\xb8 - \xa2\xb9 - \xa2\xba - \xa2\xbb - \xa2\xbc - \xa2\xbd - \xa2\xbe - \xa2\xbf - \xa2\xc0 - \xa2\xc1 - \xa2\xc2 - \xa2\xc3 - \xa2\xc4 - \xa2\xc5 - \xa2\xc6 - \xa2\xc7 - \xa2\xc8 - \xa2\xc9 - \xa2\xca - \xa2\xcb - \xa2\xcd - \xa2\xcf - \xa2\xd0 - \xa2\xd1 - \xa2\xd2 - \xa2\xd3 - \xa2\xd4 - \xa2\xd5 - \xa2\xd6 - \xa2\xd7 - \xa2\xd8 - \xa2\xd9 - \xa2\xda - \xa2\xdb - \xa2\xdc - \xa2\xdd - \xa2\xde - \xa2\xdf - \xa2\xe0 - \xa2\xe1 - \xa2\xe2 - \xa2\xe3 - \xa2\xe4 - \xa2\xe5 - \xa2\xe6 - \xa2\xe7 - \xa2\xe8 - \xa2\xe9 - \xa2\xea - \xa2\xeb - \xa2\xec - \xa2\xed - \xa2\xee - \xa2\xef - \xa2\xf0 - \xa2\xf1 - \xa2\xf2 - \xa2\xf3 - \xa2\xf4 - \xa2\xf5 - \xa2\xf6 - \xa2\xf7 - \xa2\xf8 - \xa2\xf9 - \xa2\xfa - \xa2\xfb - \xa2\xfc - \xa2\xfd - \xa2\xfe - \xa3\x40 - \xa3\x41 - \xa3\x42 - \xa3\x43 - \xa3\x44 - \xa3\x45 - \xa3\x46 - \xa3\x47 - \xa3\x48 - \xa3\x49 - \xa3\x4a - \xa3\x4b - \xa3\x4c - \xa3\x4d - \xa3\x4e - \xa3\x4f - \xa3\x50 - \xa3\x51 - \xa3\x52 - \xa3\x53 - \xa3\x54 - \xa3\x55 - \xa3\x56 - \xa3\x57 - \xa3\x58 - \xa3\x59 - \xa3\x5a - \xa3\x5b - \xa3\x5c - \xa3\x5d - \xa3\x5e - \xa3\x5f - \xa3\x60 - \xa3\x61 - \xa3\x62 - \xa3\x63 - \xa3\x64 - \xa3\x65 - \xa3\x66 - \xa3\x67 - \xa3\x68 - \xa3\x69 - \xa3\x6a - \xa3\x6b - \xa3\x6c - \xa3\x6d - \xa3\x6e - \xa3\x6f - \xa3\x70 - \xa3\x71 - \xa3\x72 - \xa3\x73 - \xa3\x74 - \xa3\x75 - \xa3\x76 - \xa3\x77 - \xa3\x78 - \xa3\x79 - \xa3\x7a - \xa3\x7b - \xa3\x7c - \xa3\x7d - \xa3\x7e - \xa3\xa1 - \xa3\xa2 - \xa3\xa3 - \xa3\xa4 - \xa3\xa5 - \xa3\xa6 - \xa3\xa7 - \xa3\xa8 - \xa3\xa9 - \xa3\xaa - \xa3\xab - \xa3\xac - \xa3\xad - \xa3\xae - \xa3\xaf - \xa3\xb0 - \xa3\xb1 - \xa3\xb2 - \xa3\xb3 - \xa3\xb4 - \xa3\xb5 - \xa3\xb6 - \xa3\xb7 - \xa3\xb8 - \xa3\xb9 - \xa3\xba - \xa3\xbb - \xa3\xbc - \xa3\xbd - \xa3\xbe - \xa3\xbf - \xa4\x40 - \xa4\x41 - \xa4\x42 - \xa4\x43 - \xa4\x44 - \xa4\x45 - \xa4\x46 - \xa4\x47 - \xa4\x48 - \xa4\x49 - \xa4\x4a - \xa4\x4b - \xa4\x4c - \xa4\x4d - \xa4\x4e - \xa4\x4f - \xa4\x50 - \xa4\x51 - \xa4\x52 - \xa4\x53 - \xa4\x54 - \xa4\x55 - \xa4\x56 - \xa4\x57 - \xa4\x58 - \xa4\x59 - \xa4\x5a - \xa4\x5b - \xa4\x5c - \xa4\x5d - \xa4\x5e - \xa4\x5f - \xa4\x60 - \xa4\x61 - \xa4\x62 - \xa4\x63 - \xa4\x64 - \xa4\x65 - \xa4\x66 - \xa4\x67 - \xa4\x68 - \xa4\x69 - \xa4\x6a - \xa4\x6b - \xa4\x6c - \xa4\x6d - \xa4\x6e - \xa4\x6f - \xa4\x70 - \xa4\x71 - \xa4\x72 - \xa4\x73 - \xa4\x74 - \xa4\x75 - \xa4\x76 - \xa4\x77 - \xa4\x78 - \xa4\x79 - \xa4\x7a - \xa4\x7b - \xa4\x7c - \xa4\x7d - \xa4\x7e - \xa4\xa1 - \xa4\xa2 - \xa4\xa3 - \xa4\xa4 - \xa4\xa5 - \xa4\xa6 - \xa4\xa7 - \xa4\xa8 - \xa4\xa9 - \xa4\xaa - \xa4\xab - \xa4\xac - \xa4\xad - \xa4\xae - \xa4\xaf - \xa4\xb0 - \xa4\xb1 - \xa4\xb2 - \xa4\xb3 - \xa4\xb4 - \xa4\xb5 - \xa4\xb6 - \xa4\xb7 - \xa4\xb8 - \xa4\xb9 - \xa4\xba - \xa4\xbb - \xa4\xbc - \xa4\xbd - \xa4\xbe - \xa4\xbf - \xa4\xc0 - \xa4\xc1 - \xa4\xc2 - \xa4\xc3 - \xa4\xc4 - \xa4\xc5 - \xa4\xc6 - \xa4\xc7 - \xa4\xc8 - \xa4\xc9 - \xa4\xca - \xa4\xcb - \xa4\xcc - \xa4\xcd - \xa4\xce - \xa4\xcf - \xa4\xd0 - \xa4\xd1 - \xa4\xd2 - \xa4\xd3 - \xa4\xd4 - \xa4\xd5 - \xa4\xd6 - \xa4\xd7 - \xa4\xd8 - \xa4\xd9 - \xa4\xda - \xa4\xdb - \xa4\xdc - \xa4\xdd - \xa4\xde - \xa4\xdf - \xa4\xe0 - \xa4\xe1 - \xa4\xe2 - \xa4\xe3 - \xa4\xe4 - \xa4\xe5 - \xa4\xe6 - \xa4\xe7 - \xa4\xe8 - \xa4\xe9 - \xa4\xea - \xa4\xeb - \xa4\xec - \xa4\xed - \xa4\xee - \xa4\xef - \xa4\xf0 - \xa4\xf1 - \xa4\xf2 - \xa4\xf3 - \xa4\xf4 - \xa4\xf5 - \xa4\xf6 - \xa4\xf7 - \xa4\xf8 - \xa4\xf9 - \xa4\xfa - \xa4\xfb - \xa4\xfc - \xa4\xfd - \xa4\xfe - \xa5\x40 - \xa5\x41 - \xa5\x42 - \xa5\x43 - \xa5\x44 - \xa5\x45 - \xa5\x46 - \xa5\x47 - \xa5\x48 - \xa5\x49 - \xa5\x4a - \xa5\x4b - \xa5\x4c - \xa5\x4d - \xa5\x4e - \xa5\x4f - \xa5\x50 - \xa5\x51 - \xa5\x52 - \xa5\x53 - \xa5\x54 - \xa5\x55 - \xa5\x56 - \xa5\x57 - \xa5\x58 - \xa5\x59 - \xa5\x5a - \xa5\x5b - \xa5\x5c - \xa5\x5d - \xa5\x5e - \xa5\x5f - \xa5\x60 - \xa5\x61 - \xa5\x62 - \xa5\x63 - \xa5\x64 - \xa5\x65 - \xa5\x66 - \xa5\x67 - \xa5\x68 - \xa5\x69 - \xa5\x6a - \xa5\x6b - \xa5\x6c - \xa5\x6d - \xa5\x6e - \xa5\x6f - \xa5\x70 - \xa5\x71 - \xa5\x72 - \xa5\x73 - \xa5\x74 - \xa5\x75 - \xa5\x76 - \xa5\x77 - \xa5\x78 - \xa5\x79 - \xa5\x7a - \xa5\x7b - \xa5\x7c - \xa5\x7d - \xa5\x7e - \xa5\xa1 - \xa5\xa2 - \xa5\xa3 - \xa5\xa4 - \xa5\xa5 - \xa5\xa6 - \xa5\xa7 - \xa5\xa8 - \xa5\xa9 - \xa5\xaa - \xa5\xab - \xa5\xac - \xa5\xad - \xa5\xae - \xa5\xaf - \xa5\xb0 - \xa5\xb1 - \xa5\xb2 - \xa5\xb3 - \xa5\xb4 - \xa5\xb5 - \xa5\xb6 - \xa5\xb7 - \xa5\xb8 - \xa5\xb9 - \xa5\xba - \xa5\xbb - \xa5\xbc - \xa5\xbd - \xa5\xbe - \xa5\xbf - \xa5\xc0 - \xa5\xc1 - \xa5\xc2 - \xa5\xc3 - \xa5\xc4 - \xa5\xc5 - \xa5\xc6 - \xa5\xc7 - \xa5\xc8 - \xa5\xc9 - \xa5\xca - \xa5\xcb - \xa5\xcc - \xa5\xcd - \xa5\xce - \xa5\xcf - \xa5\xd0 - \xa5\xd1 - \xa5\xd2 - \xa5\xd3 - \xa5\xd4 - \xa5\xd5 - \xa5\xd6 - \xa5\xd7 - \xa5\xd8 - \xa5\xd9 - \xa5\xda - \xa5\xdb - \xa5\xdc - \xa5\xdd - \xa5\xde - \xa5\xdf - \xa5\xe0 - \xa5\xe1 - \xa5\xe2 - \xa5\xe3 - \xa5\xe4 - \xa5\xe5 - \xa5\xe6 - \xa5\xe7 - \xa5\xe8 - \xa5\xe9 - \xa5\xea - \xa5\xeb - \xa5\xec - \xa5\xed - \xa5\xee - \xa5\xef - \xa5\xf0 - \xa5\xf1 - \xa5\xf2 - \xa5\xf3 - \xa5\xf4 - \xa5\xf5 - \xa5\xf6 - \xa5\xf7 - \xa5\xf8 - \xa5\xf9 - \xa5\xfa - \xa5\xfb - \xa5\xfc - \xa5\xfd - \xa5\xfe - \xa6\x40 - \xa6\x41 - \xa6\x42 - \xa6\x43 - \xa6\x44 - \xa6\x45 - \xa6\x46 - \xa6\x47 - \xa6\x48 - \xa6\x49 - \xa6\x4a - \xa6\x4b - \xa6\x4c - \xa6\x4d - \xa6\x4e - \xa6\x4f - \xa6\x50 - \xa6\x51 - \xa6\x52 - \xa6\x53 - \xa6\x54 - \xa6\x55 - \xa6\x56 - \xa6\x57 - \xa6\x58 - \xa6\x59 - \xa6\x5a - \xa6\x5b - \xa6\x5c - \xa6\x5d - \xa6\x5e - \xa6\x5f - \xa6\x60 - \xa6\x61 - \xa6\x62 - \xa6\x63 - \xa6\x64 - \xa6\x65 - \xa6\x66 - \xa6\x67 - \xa6\x68 - \xa6\x69 - \xa6\x6a - \xa6\x6b - \xa6\x6c - \xa6\x6d - \xa6\x6e - \xa6\x6f - \xa6\x70 - \xa6\x71 - \xa6\x72 - \xa6\x73 - \xa6\x74 - \xa6\x75 - \xa6\x76 - \xa6\x77 - \xa6\x78 - \xa6\x79 - \xa6\x7a - \xa6\x7b - \xa6\x7c - \xa6\x7d - \xa6\x7e - \xa6\xa1 - \xa6\xa2 - \xa6\xa3 - \xa6\xa4 - \xa6\xa5 - \xa6\xa6 - \xa6\xa7 - \xa6\xa8 - \xa6\xa9 - \xa6\xaa - \xa6\xab - \xa6\xac - \xa6\xad - \xa6\xae - \xa6\xaf - \xa6\xb0 - \xa6\xb1 - \xa6\xb2 - \xa6\xb3 - \xa6\xb4 - \xa6\xb5 - \xa6\xb6 - \xa6\xb7 - \xa6\xb8 - \xa6\xb9 - \xa6\xba - \xa6\xbb - \xa6\xbc - \xa6\xbd - \xa6\xbe - \xa6\xbf - \xa6\xc0 - \xa6\xc1 - \xa6\xc2 - \xa6\xc3 - \xa6\xc4 - \xa6\xc5 - \xa6\xc6 - \xa6\xc7 - \xa6\xc8 - \xa6\xc9 - \xa6\xca - \xa6\xcb - \xa6\xcc - \xa6\xcd - \xa6\xce - \xa6\xcf - \xa6\xd0 - \xa6\xd1 - \xa6\xd2 - \xa6\xd3 - \xa6\xd4 - \xa6\xd5 - \xa6\xd6 - \xa6\xd7 - \xa6\xd8 - \xa6\xd9 - \xa6\xda - \xa6\xdb - \xa6\xdc - \xa6\xdd - \xa6\xde - \xa6\xdf - \xa6\xe0 - \xa6\xe1 - \xa6\xe2 - \xa6\xe3 - \xa6\xe4 - \xa6\xe5 - \xa6\xe6 - \xa6\xe7 - \xa6\xe8 - \xa6\xe9 - \xa6\xea - \xa6\xeb - \xa6\xec - \xa6\xed - \xa6\xee - \xa6\xef - \xa6\xf0 - \xa6\xf1 - \xa6\xf2 - \xa6\xf3 - \xa6\xf4 - \xa6\xf5 - \xa6\xf6 - \xa6\xf7 - \xa6\xf8 - \xa6\xf9 - \xa6\xfa - \xa6\xfb - \xa6\xfc - \xa6\xfd - \xa6\xfe - \xa7\x40 - \xa7\x41 - \xa7\x42 - \xa7\x43 - \xa7\x44 - \xa7\x45 - \xa7\x46 - \xa7\x47 - \xa7\x48 - \xa7\x49 - \xa7\x4a - \xa7\x4b - \xa7\x4c - \xa7\x4d - \xa7\x4e - \xa7\x4f - \xa7\x50 - \xa7\x51 - \xa7\x52 - \xa7\x53 - \xa7\x54 - \xa7\x55 - \xa7\x56 - \xa7\x57 - \xa7\x58 - \xa7\x59 - \xa7\x5a - \xa7\x5b - \xa7\x5c - \xa7\x5d - \xa7\x5e - \xa7\x5f - \xa7\x60 - \xa7\x61 - \xa7\x62 - \xa7\x63 - \xa7\x64 - \xa7\x65 - \xa7\x66 - \xa7\x67 - \xa7\x68 - \xa7\x69 - \xa7\x6a - \xa7\x6b - \xa7\x6c - \xa7\x6d - \xa7\x6e - \xa7\x6f - \xa7\x70 - \xa7\x71 - \xa7\x72 - \xa7\x73 - \xa7\x74 - \xa7\x75 - \xa7\x76 - \xa7\x77 - \xa7\x78 - \xa7\x79 - \xa7\x7a - \xa7\x7b - \xa7\x7c - \xa7\x7d - \xa7\x7e - \xa7\xa1 - \xa7\xa2 - \xa7\xa3 - \xa7\xa4 - \xa7\xa5 - \xa7\xa6 - \xa7\xa7 - \xa7\xa8 - \xa7\xa9 - \xa7\xaa - \xa7\xab - \xa7\xac - \xa7\xad - \xa7\xae - \xa7\xaf - \xa7\xb0 - \xa7\xb1 - \xa7\xb2 - \xa7\xb3 - \xa7\xb4 - \xa7\xb5 - \xa7\xb6 - \xa7\xb7 - \xa7\xb8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Nov 2 01:29:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08E403F1A7A; Mon, 2 Nov 2020 01:29:51 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPb1p6R6sz3dG8; Mon, 2 Nov 2020 01:29:50 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C012521B9D; Mon, 2 Nov 2020 01:29:50 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A21To5A056559; Mon, 2 Nov 2020 01:29:50 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A21TolK056558; Mon, 2 Nov 2020 01:29:50 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202011020129.0A21TolK056558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 2 Nov 2020 01:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367263 - stable/12/bin/echo X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/bin/echo X-SVN-Commit-Revision: 367263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 01:29:51 -0000 Author: lwhsu Date: Mon Nov 2 01:29:50 2020 New Revision: 367263 URL: https://svnweb.freebsd.org/changeset/base/367263 Log: MFC r367134: Remove superfluous `this` in comment PR: 250721 Submitted by: Hiroya EBINE Modified: stable/12/bin/echo/echo.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/echo/echo.c ============================================================================== --- stable/12/bin/echo/echo.c Mon Nov 2 01:05:41 2020 (r367262) +++ stable/12/bin/echo/echo.c Mon Nov 2 01:29:50 2020 (r367263) @@ -104,7 +104,7 @@ main(int argc, char *argv[]) len = strlen(argv[0]); /* - * If the next argument is NULL then this is this + * If the next argument is NULL then this is * the last argument, therefore we need to check * for a trailing \c. */ From owner-svn-src-stable@freebsd.org Mon Nov 2 01:30:18 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A582D3F1C92; Mon, 2 Nov 2020 01:30:18 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPb2L3ylVz3ddl; Mon, 2 Nov 2020 01:30:18 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C31321CAC; Mon, 2 Nov 2020 01:30:18 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A21UIlH056672; Mon, 2 Nov 2020 01:30:18 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A21UIoO056671; Mon, 2 Nov 2020 01:30:18 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202011020130.0A21UIoO056671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 2 Nov 2020 01:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367264 - stable/11/bin/echo X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/bin/echo X-SVN-Commit-Revision: 367264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 01:30:18 -0000 Author: lwhsu Date: Mon Nov 2 01:30:17 2020 New Revision: 367264 URL: https://svnweb.freebsd.org/changeset/base/367264 Log: MFC r367134: Remove superfluous `this` in comment PR: 250721 Submitted by: Hiroya EBINE Modified: stable/11/bin/echo/echo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/echo/echo.c ============================================================================== --- stable/11/bin/echo/echo.c Mon Nov 2 01:29:50 2020 (r367263) +++ stable/11/bin/echo/echo.c Mon Nov 2 01:30:17 2020 (r367264) @@ -102,7 +102,7 @@ main(int argc, char *argv[]) len = strlen(argv[0]); /* - * If the next argument is NULL then this is this + * If the next argument is NULL then this is * the last argument, therefore we need to check * for a trailing \c. */ From owner-svn-src-stable@freebsd.org Mon Nov 2 01:34:44 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFBF73F0E4E; Mon, 2 Nov 2020 01:34:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPb7S3yfwz3dq5; Mon, 2 Nov 2020 01:34:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C0E921B4F; Mon, 2 Nov 2020 01:34:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A21Yiix062856; Mon, 2 Nov 2020 01:34:44 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A21Yi4S062855; Mon, 2 Nov 2020 01:34:44 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202011020134.0A21Yi4S062855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 2 Nov 2020 01:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367265 - stable/12/bin/echo X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/bin/echo X-SVN-Commit-Revision: 367265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 01:34:44 -0000 Author: lwhsu Date: Mon Nov 2 01:34:43 2020 New Revision: 367265 URL: https://svnweb.freebsd.org/changeset/base/367265 Log: MFC r367136: Whitespace cleanup Modified: stable/12/bin/echo/echo.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/echo/echo.c ============================================================================== --- stable/12/bin/echo/echo.c Mon Nov 2 01:30:17 2020 (r367264) +++ stable/12/bin/echo/echo.c Mon Nov 2 01:34:43 2020 (r367265) @@ -71,7 +71,7 @@ errexit(const char *prog, const char *reason) write(STDERR_FILENO, "\n", 1); exit(1); } - + int main(int argc, char *argv[]) { @@ -100,13 +100,12 @@ main(int argc, char *argv[]) while (argv[0] != NULL) { size_t len; - + len = strlen(argv[0]); /* - * If the next argument is NULL then this is - * the last argument, therefore we need to check - * for a trailing \c. + * If the next argument is NULL then this is the last argument, + * therefore we need to check for a trailing \c. */ if (argv[1] == NULL) { /* is there room for a '\c' and is there one? */ From owner-svn-src-stable@freebsd.org Mon Nov 2 01:34:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81EC3F1E39; Mon, 2 Nov 2020 01:34:59 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPb7l3yM9z3dZt; Mon, 2 Nov 2020 01:34:59 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B26521D1C; Mon, 2 Nov 2020 01:34:59 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A21Yx36062909; Mon, 2 Nov 2020 01:34:59 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A21YxCK062908; Mon, 2 Nov 2020 01:34:59 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202011020134.0A21YxCK062908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 2 Nov 2020 01:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367266 - stable/11/bin/echo X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/bin/echo X-SVN-Commit-Revision: 367266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 01:34:59 -0000 Author: lwhsu Date: Mon Nov 2 01:34:58 2020 New Revision: 367266 URL: https://svnweb.freebsd.org/changeset/base/367266 Log: MFC r367136: Whitespace cleanup Modified: stable/11/bin/echo/echo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/echo/echo.c ============================================================================== --- stable/11/bin/echo/echo.c Mon Nov 2 01:34:43 2020 (r367265) +++ stable/11/bin/echo/echo.c Mon Nov 2 01:34:58 2020 (r367266) @@ -69,7 +69,7 @@ errexit(const char *prog, const char *reason) write(STDERR_FILENO, "\n", 1); exit(1); } - + int main(int argc, char *argv[]) { @@ -98,13 +98,12 @@ main(int argc, char *argv[]) while (argv[0] != NULL) { size_t len; - + len = strlen(argv[0]); /* - * If the next argument is NULL then this is - * the last argument, therefore we need to check - * for a trailing \c. + * If the next argument is NULL then this is the last argument, + * therefore we need to check for a trailing \c. */ if (argv[1] == NULL) { /* is there room for a '\c' and is there one? */ From owner-svn-src-stable@freebsd.org Mon Nov 2 14:00:26 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6F864529B0; Mon, 2 Nov 2020 14:00:26 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPvgt4Nrhz4YXn; Mon, 2 Nov 2020 14:00:26 +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 7A148A88A; Mon, 2 Nov 2020 14:00:26 +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 0A2E0Qa2018012; Mon, 2 Nov 2020 14:00:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A2E0P93018008; Mon, 2 Nov 2020 14:00:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202011021400.0A2E0P93018008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 2 Nov 2020 14:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367270 - stable/12/sys/amd64/vmm/intel X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/amd64/vmm/intel X-SVN-Commit-Revision: 367270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 14:00:26 -0000 Author: markj Date: Mon Nov 2 14:00:25 2020 New Revision: 367270 URL: https://svnweb.freebsd.org/changeset/base/367270 Log: MFC r366834: vmx: Implement pmap (de)activation in C Modified: stable/12/sys/amd64/vmm/intel/vmx.c stable/12/sys/amd64/vmm/intel/vmx.h stable/12/sys/amd64/vmm/intel/vmx_genassym.c stable/12/sys/amd64/vmm/intel/vmx_support.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/12/sys/amd64/vmm/intel/vmx.c Mon Nov 2 10:44:29 2020 (r367269) +++ stable/12/sys/amd64/vmm/intel/vmx.c Mon Nov 2 14:00:25 2020 (r367270) @@ -2822,7 +2822,6 @@ vmx_exit_inst_error(struct vmxctx *vmxctx, int rc, str switch (rc) { case VMX_VMRESUME_ERROR: case VMX_VMLAUNCH_ERROR: - case VMX_INVEPT_ERROR: vmexit->u.vmx.inst_type = rc; break; default: @@ -2927,6 +2926,29 @@ vmx_dr_leave_guest(struct vmxctx *vmxctx) write_rflags(read_rflags() | vmxctx->host_tf); } +static __inline void +vmx_pmap_activate(struct vmx *vmx, pmap_t pmap) +{ + long eptgen; + int cpu; + + cpu = curcpu; + + CPU_SET_ATOMIC(cpu, &pmap->pm_active); + eptgen = atomic_load_long(&pmap->pm_eptgen); + if (eptgen != vmx->eptgen[cpu]) { + vmx->eptgen[cpu] = eptgen; + invept(INVEPT_TYPE_SINGLE_CONTEXT, + (struct invept_desc){ .eptp = vmx->eptp, ._res = 0 }); + } +} + +static __inline void +vmx_pmap_deactivate(struct vmx *vmx, pmap_t pmap) +{ + CPU_CLR_ATOMIC(curcpu, &pmap->pm_active); +} + static int vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap, struct vm_eventinfo *evinfo) @@ -3075,11 +3097,19 @@ vmx_run(void *arg, int vcpu, register_t rip, pmap_t pm */ vmx_msr_guest_enter_tsc_aux(vmx, vcpu); - vmx_run_trace(vmx, vcpu); vmx_dr_enter_guest(vmxctx); + + /* + * Mark the EPT as active on this host CPU and invalidate + * EPTP-tagged TLB entries if required. + */ + vmx_pmap_activate(vmx, pmap); + + vmx_run_trace(vmx, vcpu); rc = vmx_enter_guest(vmxctx, vmx, launched); - vmx_dr_leave_guest(vmxctx); + vmx_pmap_deactivate(vmx, pmap); + vmx_dr_leave_guest(vmxctx); vmx_msr_guest_exit_tsc_aux(vmx, vcpu); bare_lgdt(&gdtr); Modified: stable/12/sys/amd64/vmm/intel/vmx.h ============================================================================== --- stable/12/sys/amd64/vmm/intel/vmx.h Mon Nov 2 10:44:29 2020 (r367269) +++ stable/12/sys/amd64/vmm/intel/vmx.h Mon Nov 2 14:00:25 2020 (r367270) @@ -142,7 +142,6 @@ CTASSERT((offsetof(struct vmx, pir_desc[0]) & 63) == 0 #define VMX_GUEST_VMEXIT 0 #define VMX_VMRESUME_ERROR 1 #define VMX_VMLAUNCH_ERROR 2 -#define VMX_INVEPT_ERROR 3 int vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched); void vmx_call_isr(uintptr_t entry); Modified: stable/12/sys/amd64/vmm/intel/vmx_genassym.c ============================================================================== --- stable/12/sys/amd64/vmm/intel/vmx_genassym.c Mon Nov 2 10:44:29 2020 (r367269) +++ stable/12/sys/amd64/vmm/intel/vmx_genassym.c Mon Nov 2 14:00:25 2020 (r367270) @@ -70,17 +70,12 @@ ASSYM(VMXCTX_HOST_RSP, offsetof(struct vmxctx, host_rs ASSYM(VMXCTX_HOST_RBX, offsetof(struct vmxctx, host_rbx)); ASSYM(VMXCTX_INST_FAIL_STATUS, offsetof(struct vmxctx, inst_fail_status)); -ASSYM(VMXCTX_PMAP, offsetof(struct vmxctx, pmap)); -ASSYM(VMX_EPTGEN, offsetof(struct vmx, eptgen)); -ASSYM(VMX_EPTP, offsetof(struct vmx, eptp)); - ASSYM(VM_FAIL_INVALID, VM_FAIL_INVALID); ASSYM(VM_FAIL_VALID, VM_FAIL_VALID); ASSYM(VMX_GUEST_VMEXIT, VMX_GUEST_VMEXIT); ASSYM(VMX_VMRESUME_ERROR, VMX_VMRESUME_ERROR); ASSYM(VMX_VMLAUNCH_ERROR, VMX_VMLAUNCH_ERROR); -ASSYM(VMX_INVEPT_ERROR, VMX_INVEPT_ERROR); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); Modified: stable/12/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- stable/12/sys/amd64/vmm/intel/vmx_support.S Mon Nov 2 10:44:29 2020 (r367269) +++ stable/12/sys/amd64/vmm/intel/vmx_support.S Mon Nov 2 14:00:25 2020 (r367270) @@ -148,33 +148,6 @@ ENTRY(vmx_enter_guest) */ VMX_HOST_SAVE - /* - * Activate guest pmap on this cpu. - */ - movq VMXCTX_PMAP(%rdi), %r11 - movl PCPU(CPUID), %eax - LK btsl %eax, PM_ACTIVE(%r11) - - /* - * If 'vmx->eptgen[curcpu]' is not identical to 'pmap->pm_eptgen' - * then we must invalidate all mappings associated with this EPTP. - */ - movq PM_EPTGEN(%r11), %r10 - cmpq %r10, VMX_EPTGEN(%rsi, %rax, 8) - je guest_restore - - /* Refresh 'vmx->eptgen[curcpu]' */ - movq %r10, VMX_EPTGEN(%rsi, %rax, 8) - - /* Setup the invept descriptor on the host stack */ - mov %rsp, %r11 - movq VMX_EPTP(%rsi), %rax - movq %rax, -16(%r11) - movq $0x0, -8(%r11) - mov $0x1, %eax /* Single context invalidate */ - invept -16(%r11), %rax - jbe invept_error /* Check invept instruction error */ - guest_restore: movl %edx, %r8d cmpb $0, guest_l1d_flush_sw(%rip) @@ -208,10 +181,6 @@ do_launch: movl $VMX_VMLAUNCH_ERROR, %eax jmp decode_inst_error -invept_error: - movl $VMX_INVEPT_ERROR, %eax - jmp decode_inst_error - decode_inst_error: movl $VM_FAIL_VALID, %r11d jz inst_error @@ -224,13 +193,6 @@ inst_error: * it as a scratch register beyond this point. */ - /* - * Deactivate guest pmap from this cpu. - */ - movq VMXCTX_PMAP(%rdi), %r11 - movl PCPU(CPUID), %r10d - LK btrl %r10d, PM_ACTIVE(%r11) - VMX_HOST_RESTORE VLEAVE ret @@ -248,13 +210,6 @@ vmx_exit_guest_flush_rsb: */ VMX_GUEST_SAVE - /* - * Deactivate guest pmap from this cpu. - */ - movq VMXCTX_PMAP(%rdi), %r11 - movl PCPU(CPUID), %r10d - LK btrl %r10d, PM_ACTIVE(%r11) - VMX_HOST_RESTORE VMX_GUEST_CLOBBER @@ -290,13 +245,6 @@ vmx_exit_guest: * Save guest state that is not automatically saved in the vmcs. */ VMX_GUEST_SAVE - - /* - * Deactivate guest pmap from this cpu. - */ - movq VMXCTX_PMAP(%rdi), %r11 - movl PCPU(CPUID), %r10d - LK btrl %r10d, PM_ACTIVE(%r11) VMX_HOST_RESTORE From owner-svn-src-stable@freebsd.org Mon Nov 2 14:01:34 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5662C452B35; Mon, 2 Nov 2020 14:01:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPvjB1dydz4Yr1; Mon, 2 Nov 2020 14:01:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C832A89C; Mon, 2 Nov 2020 14:01:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A2E1XrT020382; Mon, 2 Nov 2020 14:01:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A2E1XHH020381; Mon, 2 Nov 2020 14:01:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202011021401.0A2E1XHH020381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 2 Nov 2020 14:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367271 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 367271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 14:01:34 -0000 Author: markj Date: Mon Nov 2 14:01:33 2020 New Revision: 367271 URL: https://svnweb.freebsd.org/changeset/base/367271 Log: MFC r366837: vmem: Simplify bt_fill() callers a bit Modified: stable/12/sys/kern/subr_vmem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_vmem.c ============================================================================== --- stable/12/sys/kern/subr_vmem.c Mon Nov 2 14:00:25 2020 (r367270) +++ stable/12/sys/kern/subr_vmem.c Mon Nov 2 14:01:33 2020 (r367271) @@ -257,8 +257,8 @@ vmem_t *memguard_arena = &memguard_arena_storage; * allocation will not fail once bt_fill() passes. To do so we cache * at least the maximum possible tag allocations in the arena. */ -static int -bt_fill(vmem_t *vm, int flags) +static __noinline int +_bt_fill(vmem_t *vm, int flags) { bt_t *bt; @@ -298,6 +298,14 @@ bt_fill(vmem_t *vm, int flags) return 0; } +static inline int +bt_fill(vmem_t *vm, int flags) +{ + if (vm->vm_nfreetags >= BT_MAXALLOC) + return (0); + return (_bt_fill(vm, flags)); +} + /* * Pop a tag off of the freetag stack. */ @@ -1079,7 +1087,7 @@ retry: /* * Make sure we have enough tags to complete the operation. */ - if (vm->vm_nfreetags < BT_MAXALLOC && bt_fill(vm, flags) != 0) + if (bt_fill(vm, flags) != 0) goto out; /* @@ -1361,11 +1369,9 @@ vmem_xalloc(vmem_t *vm, const vmem_size_t size0, vmem_ * Make sure we have enough tags to complete the * operation. */ - if (vm->vm_nfreetags < BT_MAXALLOC && - bt_fill(vm, flags) != 0) { - error = ENOMEM; + error = bt_fill(vm, flags); + if (error != 0) break; - } /* * Scan freelists looking for a tag that satisfies the @@ -1484,13 +1490,12 @@ vmem_add(vmem_t *vm, vmem_addr_t addr, vmem_size_t siz { int error; - error = 0; flags &= VMEM_FLAGS; + VMEM_LOCK(vm); - if (vm->vm_nfreetags >= BT_MAXALLOC || bt_fill(vm, flags) == 0) + error = bt_fill(vm, flags); + if (error == 0) vmem_add1(vm, addr, size, BT_TYPE_SPAN_STATIC); - else - error = ENOMEM; VMEM_UNLOCK(vm); return (error); From owner-svn-src-stable@freebsd.org Mon Nov 2 14:30:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D912E453521; Mon, 2 Nov 2020 14:30:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPwM359QPz4bSj; Mon, 2 Nov 2020 14:30:55 +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 94BCCAD18; Mon, 2 Nov 2020 14:30:55 +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 0A2EUtlG041799; Mon, 2 Nov 2020 14:30:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A2EUthX041798; Mon, 2 Nov 2020 14:30:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202011021430.0A2EUthX041798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 2 Nov 2020 14:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367272 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 367272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 14:30:55 -0000 Author: markj Date: Mon Nov 2 14:30:55 2020 New Revision: 367272 URL: https://svnweb.freebsd.org/changeset/base/367272 Log: MFC r366838: vmem: Allocate btags before looping in vmem_xalloc() Modified: stable/12/sys/kern/subr_vmem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_vmem.c ============================================================================== --- stable/12/sys/kern/subr_vmem.c Mon Nov 2 14:01:33 2020 (r367271) +++ stable/12/sys/kern/subr_vmem.c Mon Nov 2 14:30:55 2020 (r367272) @@ -359,6 +359,24 @@ bt_free(vmem_t *vm, bt_t *bt) } /* + * Hide MAXALLOC tags before dropping the arena lock to ensure that a + * concurrent allocation attempt does not grab them. + */ +static void +bt_save(vmem_t *vm) +{ + KASSERT(vm->vm_nfreetags >= BT_MAXALLOC, + ("%s: insufficient free tags %d", __func__, vm->vm_nfreetags)); + vm->vm_nfreetags -= BT_MAXALLOC; +} + +static void +bt_restore(vmem_t *vm) +{ + vm->vm_nfreetags += BT_MAXALLOC; +} + +/* * freelist[0] ... [1, 1] * freelist[1] ... [2, 2] * : @@ -886,16 +904,11 @@ vmem_import(vmem_t *vm, vmem_size_t size, vmem_size_t if (vm->vm_limit != 0 && vm->vm_limit < vm->vm_size + size) return (ENOMEM); - /* - * Hide MAXALLOC tags so we're guaranteed to be able to add this - * span and the tag we want to allocate from it. - */ - MPASS(vm->vm_nfreetags >= BT_MAXALLOC); - vm->vm_nfreetags -= BT_MAXALLOC; + bt_save(vm); VMEM_UNLOCK(vm); error = (vm->vm_importfn)(vm->vm_arg, size, flags, &addr); VMEM_LOCK(vm); - vm->vm_nfreetags += BT_MAXALLOC; + bt_restore(vm); if (error) return (ENOMEM); @@ -1023,19 +1036,23 @@ vmem_try_fetch(vmem_t *vm, const vmem_size_t size, vme */ if (vm->vm_qcache_max != 0 || vm->vm_reclaimfn != NULL) { avail = vm->vm_size - vm->vm_inuse; + bt_save(vm); VMEM_UNLOCK(vm); if (vm->vm_qcache_max != 0) qc_drain(vm); if (vm->vm_reclaimfn != NULL) vm->vm_reclaimfn(vm, flags); VMEM_LOCK(vm); + bt_restore(vm); /* If we were successful retry even NOWAIT. */ if (vm->vm_size - vm->vm_inuse > avail) return (1); } if ((flags & M_NOWAIT) != 0) return (0); + bt_save(vm); VMEM_CONDVAR_WAIT(vm); + bt_restore(vm); return (1); } @@ -1083,13 +1100,14 @@ vmem_xalloc_nextfit(vmem_t *vm, const vmem_size_t size error = ENOMEM; VMEM_LOCK(vm); -retry: + /* * Make sure we have enough tags to complete the operation. */ if (bt_fill(vm, flags) != 0) goto out; +retry: /* * Find the next free tag meeting our constraints. If one is found, * perform the allocation. @@ -1364,15 +1382,14 @@ vmem_xalloc(vmem_t *vm, const vmem_size_t size0, vmem_ */ first = bt_freehead_toalloc(vm, size, strat); VMEM_LOCK(vm); - for (;;) { - /* - * Make sure we have enough tags to complete the - * operation. - */ - error = bt_fill(vm, flags); - if (error != 0) - break; + /* + * Make sure we have enough tags to complete the operation. + */ + error = bt_fill(vm, flags); + if (error != 0) + goto out; + for (;;) { /* * Scan freelists looking for a tag that satisfies the * allocation. If we're doing BESTFIT we may encounter From owner-svn-src-stable@freebsd.org Mon Nov 2 20:00:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E400A459BC6; Mon, 2 Nov 2020 20:00:51 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQ3gl64Pcz3gNH; Mon, 2 Nov 2020 20:00:51 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3A94E84F; Mon, 2 Nov 2020 20:00:51 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A2K0pDO045279; Mon, 2 Nov 2020 20:00:51 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A2K0pxY045275; Mon, 2 Nov 2020 20:00:51 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202011022000.0A2K0pxY045275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Mon, 2 Nov 2020 20:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367283 - in stable/12: sbin/sysctl sys/kern sys/sys usr.bin/truss X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable/12: sbin/sysctl sys/kern sys/sys usr.bin/truss X-SVN-Commit-Revision: 367283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 20:00:52 -0000 Author: freqlabs Date: Mon Nov 2 20:00:50 2020 New Revision: 367283 URL: https://svnweb.freebsd.org/changeset/base/367283 Log: MFC r366465, r367003, r367006, r367009 Enable iterating all sysctls, even ones with CTLFLAG_SKIP kern_sysctl: Misc code cleanup sysctl: Misc code cleanup sysctl+kern_sysctl: Honor SKIP for descendant nodes Modified: stable/12/sbin/sysctl/sysctl.c stable/12/sys/kern/kern_sysctl.c stable/12/sys/sys/sysctl.h stable/12/usr.bin/truss/syscalls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/sysctl/sysctl.c ============================================================================== --- stable/12/sbin/sysctl/sysctl.c Mon Nov 2 19:56:15 2020 (r367282) +++ stable/12/sbin/sysctl/sysctl.c Mon Nov 2 20:00:50 2020 (r367283) @@ -29,20 +29,9 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char copyright[] = -"@(#) Copyright (c) 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); -#ifndef lint -#if 0 -static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93"; -#endif -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include @@ -81,7 +70,7 @@ static int Nflag, nflag, oflag, qflag, tflag, Tflag, W static int oidfmt(int *, int, char *, u_int *); static int parsefile(const char *); static int parse(const char *, int); -static int show_var(int *, int); +static int show_var(int *, int, bool); static int sysctl_all(int *oid, int len); static int name2oid(const char *, int *); @@ -221,7 +210,7 @@ main(int argc, char **argv) if (Nflag && nflag) usage(); if (aflag && argc == 0) - exit(sysctl_all(0, 0)); + exit(sysctl_all(NULL, 0)); if (argc == 0 && conffile == NULL) usage(); @@ -369,6 +358,13 @@ parse(const char *string, int lineno) else line[0] = '\0'; + /* + * Split the string into name and value. + * + * Either = or : may be used as the delimiter. + * Whitespace surrounding the delimiter is trimmed. + * Quotes around the value are stripped. + */ cp = buf; if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) { warnx("oid too long: '%s'%s", string, line); @@ -381,6 +377,7 @@ parse(const char *string, int lineno) warnx("Can't set variables when using -T or -W"); usage(); } + /* Trim whitespace before the value. */ while (isspace(*cp)) cp++; /* Strip a pair of " or ' if any. */ @@ -394,14 +391,17 @@ parse(const char *string, int lineno) newvalstr = cp; newsize = strlen(cp); } - /* Trim spaces */ + /* Trim whitespace after the name. */ cp = bufp + strlen(bufp) - 1; while (cp >= bufp && isspace((int)*cp)) { *cp = '\0'; cp--; } - len = name2oid(bufp, mib); + /* + * Check the name is a useable oid. + */ + len = name2oid(bufp, mib); if (len < 0) { if (iflag) return (0); @@ -425,118 +425,126 @@ parse(const char *string, int lineno) exit(1); } + /* + * We have a useable oid to work with. If there is no value given, + * show the node and its children. Otherwise, set the new value. + */ if (newvalstr == NULL || dflag) { if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { - i = show_var(mib, len); + i = show_var(mib, len, false); if (!i && !bflag) putchar('\n'); } sysctl_all(mib, len); } else { - i = show_var(mib, len); + i = show_var(mib, len, false); if (!i && !bflag) putchar('\n'); } - } else { - if ((kind & CTLTYPE) == CTLTYPE_NODE) { - warnx("oid '%s' isn't a leaf node%s", bufp, line); - return (1); - } + return (0); + } - if (!(kind & CTLFLAG_WR)) { - if (kind & CTLFLAG_TUN) { - warnx("oid '%s' is a read only tunable%s", bufp, line); - warnx("Tunable values are set in /boot/loader.conf"); - } else - warnx("oid '%s' is read only%s", bufp, line); - return (1); - } + /* + * We have a new value to set. Check its validity and parse if numeric. + */ + if ((kind & CTLTYPE) == CTLTYPE_NODE) { + warnx("oid '%s' isn't a leaf node%s", bufp, line); + return (1); + } - switch (kind & CTLTYPE) { - case CTLTYPE_INT: - case CTLTYPE_UINT: - case CTLTYPE_LONG: - case CTLTYPE_ULONG: - case CTLTYPE_S8: - case CTLTYPE_S16: - case CTLTYPE_S32: - case CTLTYPE_S64: - case CTLTYPE_U8: - case CTLTYPE_U16: - case CTLTYPE_U32: - case CTLTYPE_U64: - if (strlen(newvalstr) == 0) { - warnx("empty numeric value"); - return (1); - } - /* FALLTHROUGH */ - case CTLTYPE_STRING: - break; - default: - warnx("oid '%s' is type %d," - " cannot set that%s", bufp, - kind & CTLTYPE, line); + if (!(kind & CTLFLAG_WR)) { + if (kind & CTLFLAG_TUN) { + warnx("oid '%s' is a read only tunable%s", bufp, line); + warnx("Tunable values are set in /boot/loader.conf"); + } else + warnx("oid '%s' is read only%s", bufp, line); + return (1); + } + + switch (kind & CTLTYPE) { + case CTLTYPE_INT: + case CTLTYPE_UINT: + case CTLTYPE_LONG: + case CTLTYPE_ULONG: + case CTLTYPE_S8: + case CTLTYPE_S16: + case CTLTYPE_S32: + case CTLTYPE_S64: + case CTLTYPE_U8: + case CTLTYPE_U16: + case CTLTYPE_U32: + case CTLTYPE_U64: + if (strlen(newvalstr) == 0) { + warnx("empty numeric value"); return (1); } + /* FALLTHROUGH */ + case CTLTYPE_STRING: + break; + default: + warnx("oid '%s' is type %d, cannot set that%s", + bufp, kind & CTLTYPE, line); + return (1); + } - newbuf = NULL; + newbuf = NULL; - switch (kind & CTLTYPE) { - case CTLTYPE_STRING: - newval = newvalstr; - break; - default: - newsize = 0; - while ((cp = strsep(&newvalstr, " ,")) != NULL) { - if (*cp == '\0') - continue; - if (!parse_numeric(cp, fmt, kind, &newbuf, - &newsize)) { - warnx("invalid %s '%s'%s", - ctl_typename[kind & CTLTYPE], - cp, line); - free(newbuf); - return (1); - } - } - newval = newbuf; - break; - } - - i = show_var(mib, len); - if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { - free(newbuf); - if (!i && !bflag) - putchar('\n'); - switch (errno) { - case EOPNOTSUPP: - warnx("%s: value is not available%s", - string, line); + switch (kind & CTLTYPE) { + case CTLTYPE_STRING: + newval = newvalstr; + break; + default: + newsize = 0; + while ((cp = strsep(&newvalstr, " ,")) != NULL) { + if (*cp == '\0') + continue; + if (!parse_numeric(cp, fmt, kind, &newbuf, &newsize)) { + warnx("invalid %s '%s'%s", + ctl_typename[kind & CTLTYPE], cp, line); + free(newbuf); return (1); - case ENOTDIR: - warnx("%s: specification is incomplete%s", - string, line); - return (1); - case ENOMEM: - warnx("%s: type is unknown to this program%s", - string, line); - return (1); - default: - warn("%s%s", string, line); - return (1); } } + newval = newbuf; + break; + } + + /* + * Show the current value, then set and show the new value. + */ + i = show_var(mib, len, false); + if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { free(newbuf); - if (!bflag) - printf(" -> "); - i = nflag; - nflag = 1; - j = show_var(mib, len); - if (!j && !bflag) + if (!i && !bflag) putchar('\n'); - nflag = i; + switch (errno) { + case EOPNOTSUPP: + warnx("%s: value is not available%s", + string, line); + return (1); + case ENOTDIR: + warnx("%s: specification is incomplete%s", + string, line); + return (1); + case ENOMEM: + warnx("%s: type is unknown to this program%s", + string, line); + return (1); + default: + warn("%s%s", string, line); + return (1); + } } + free(newbuf); + if (!bflag) + printf(" -> "); + i = nflag; + nflag = 1; + j = show_var(mib, len, false); + if (!j && !bflag) + putchar('\n'); + nflag = i; return (0); } @@ -875,8 +883,8 @@ name2oid(const char *name, int *oidp) int i; size_t j; - oid[0] = 0; - oid[1] = 3; + oid[0] = CTL_SYSCTL; + oid[1] = CTL_SYSCTL_NAME2OID; j = CTL_MAXNAME * sizeof(int); i = sysctl(oid, 2, oidp, &j, name, strlen(name)); @@ -894,8 +902,8 @@ oidfmt(int *oid, int len, char *fmt, u_int *kind) int i; size_t j; - qoid[0] = 0; - qoid[1] = 4; + qoid[0] = CTL_SYSCTL; + qoid[1] = CTL_SYSCTL_OIDFMT; memcpy(qoid + 2, oid, len * sizeof(int)); j = sizeof(buf); @@ -919,8 +927,9 @@ oidfmt(int *oid, int len, char *fmt, u_int *kind) * Return minus one if we had errors. */ static int -show_var(int *oid, int nlen) +show_var(int *oid, int nlen, bool honor_skip) { + static int skip_len = 0, skip_oid[CTL_MAXNAME]; u_char buf[BUFSIZ], *val, *oval, *p; char name[BUFSIZ], fmt[BUFSIZ]; const char *sep, *sep1, *prntype; @@ -941,10 +950,10 @@ show_var(int *oid, int nlen) bzero(buf, BUFSIZ); bzero(fmt, BUFSIZ); bzero(name, BUFSIZ); - qoid[0] = 0; + qoid[0] = CTL_SYSCTL; memcpy(qoid + 2, oid, nlen * sizeof(int)); - qoid[1] = 1; + qoid[1] = CTL_SYSCTL_NAME; j = sizeof(name); i = sysctl(qoid, nlen + 2, name, &j, 0, 0); if (i || !j) @@ -953,11 +962,11 @@ show_var(int *oid, int nlen) oidfmt(oid, nlen, fmt, &kind); /* if Wflag then only list sysctls that are writeable and not stats. */ if (Wflag && ((kind & CTLFLAG_WR) == 0 || (kind & CTLFLAG_STATS) != 0)) - return 1; + return (1); /* if Tflag then only list sysctls that are tuneables. */ if (Tflag && (kind & CTLFLAG_TUN) == 0) - return 1; + return (1); if (Nflag) { printf("%s", name); @@ -983,13 +992,29 @@ show_var(int *oid, int nlen) printf("%s", prntype); return (0); } - qoid[1] = 5; + qoid[1] = CTL_SYSCTL_OIDDESCR; j = sizeof(buf); i = sysctl(qoid, nlen + 2, buf, &j, 0, 0); printf("%s", buf); return (0); } + /* keep track of encountered skip nodes, ignoring descendants */ + if (skip_len == 0 && (kind & CTLFLAG_SKIP) != 0) { + /* Save this oid so we can skip descendants. */ + skip_len = nlen * sizeof(int); + memcpy(skip_oid, oid, skip_len); + } + + /* bail before fetching the value if we're honoring skip */ + if (honor_skip) { + if (0 < skip_len && skip_len <= nlen * (int)sizeof(int) && + memcmp(skip_oid, oid, skip_len) == 0) + return (1); + /* Not a skip node or descendant of a skip node. */ + skip_len = 0; + } + /* don't fetch opaques that we don't know how to print */ if (ctltype == CTLTYPE_OPAQUE) { if (strcmp(fmt, "S,clockinfo") == 0) @@ -1170,15 +1195,17 @@ sysctl_all(int *oid, int len) int name1[22], name2[22]; int i, j; size_t l1, l2; + bool honor_skip = false; - name1[0] = 0; - name1[1] = 2; + name1[0] = CTL_SYSCTL; + name1[1] = (oid != NULL || Nflag || dflag || tflag) ? + CTL_SYSCTL_NEXTNOSKIP : CTL_SYSCTL_NEXT; l1 = 2; if (len) { - memcpy(name1+2, oid, len * sizeof(int)); + memcpy(name1 + 2, oid, len * sizeof(int)); l1 += len; } else { - name1[2] = 1; + name1[2] = CTL_KERN; l1++; } for (;;) { @@ -1196,15 +1223,15 @@ sysctl_all(int *oid, int len) if (len < 0 || l2 < (unsigned int)len) return (0); - for (i = 0; i < len; i++) - if (name2[i] != oid[i]) - return (0); + if (memcmp(name2, oid, len * sizeof(int)) != 0) + return (0); - i = show_var(name2, l2); + i = show_var(name2, l2, honor_skip); if (!i && !bflag) putchar('\n'); - memcpy(name1+2, name2, l2 * sizeof(int)); + memcpy(name1 + 2, name2, l2 * sizeof(int)); l1 = 2 + l2; + honor_skip = true; } } Modified: stable/12/sys/kern/kern_sysctl.c ============================================================================== --- stable/12/sys/kern/kern_sysctl.c Mon Nov 2 19:56:15 2020 (r367282) +++ stable/12/sys/kern/kern_sysctl.c Mon Nov 2 20:00:50 2020 (r367283) @@ -937,7 +937,8 @@ SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_re * {CTL_SYSCTL, CTL_SYSCTL_DEBUG} printf the entire MIB-tree. * {CTL_SYSCTL, CTL_SYSCTL_NAME, ...} return the name of the "..." * OID. - * {CTL_SYSCTL, CTL_SYSCTL_NEXT, ...} return the next OID. + * {CTL_SYSCTL, CTL_SYSCTL_NEXT, ...} return the next OID, honoring + * CTLFLAG_SKIP. * {CTL_SYSCTL, CTL_SYSCTL_NAME2OID} return the OID of the name in * "new" * {CTL_SYSCTL, CTL_SYSCTL_OIDFMT, ...} return the kind & format info @@ -946,6 +947,8 @@ SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_re * "..." OID. * {CTL_SYSCTL, CTL_SYSCTL_OIDLABEL, ...} return the aggregation label of * the "..." OID. + * {CTL_SYSCTL, CTL_SYSCTL_NEXTNOSKIP, ...} return the next OID, ignoring + * CTLFLAG_SKIP. */ #ifdef SYSCTL_DEBUG @@ -1086,9 +1089,13 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) static SYSCTL_NODE(_sysctl, CTL_SYSCTL_NAME, name, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_name, ""); +/* + * Walk the sysctl subtree at lsp until we find the given name, + * and return the next name in order by oid_number. + */ static int sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, - int *next, int *len, int level, struct sysctl_oid **oidpp) + int *next, int *len, int level, bool honor_skip) { struct sysctl_oid *oidp; @@ -1096,54 +1103,95 @@ sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *len = level; SLIST_FOREACH(oidp, lsp, oid_link) { *next = oidp->oid_number; - *oidpp = oidp; - if ((oidp->oid_kind & (CTLFLAG_SKIP | CTLFLAG_DORMANT)) != 0) + if ((oidp->oid_kind & CTLFLAG_DORMANT) != 0) continue; - if (!namelen) { + if (honor_skip && (oidp->oid_kind & CTLFLAG_SKIP) != 0) + continue; + + if (namelen == 0) { + /* + * We have reached a node with a full name match and are + * looking for the next oid in its children. + * + * For CTL_SYSCTL_NEXTNOSKIP we are done. + * + * For CTL_SYSCTL_NEXT we skip CTLTYPE_NODE (unless it + * has a handler) and move on to the children. + */ + if (!honor_skip) + return (0); if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) return (0); if (oidp->oid_handler) - /* We really should call the handler here...*/ return (0); lsp = SYSCTL_CHILDREN(oidp); - if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, - len, level+1, oidpp)) + if (!sysctl_sysctl_next_ls(lsp, NULL, 0, next + 1, len, + level + 1, honor_skip)) return (0); + /* + * There were no useable children in this node. + * Continue searching for the next oid at this level. + */ goto emptynode; } + /* + * No match yet. Continue seeking the given name. + * + * We are iterating in order by oid_number, so skip oids lower + * than the one we are looking for. + * + * When the current oid_number is higher than the one we seek, + * that means we have reached the next oid in the sequence and + * should return it. + * + * If the oid_number matches the name at this level then we + * have to find a node to continue searching at the next level. + */ if (oidp->oid_number < *name) continue; - if (oidp->oid_number > *name) { + /* + * We have reached the next oid. + * + * For CTL_SYSCTL_NEXTNOSKIP we are done. + * + * For CTL_SYSCTL_NEXT we skip CTLTYPE_NODE (unless it + * has a handler) and move on to the children. + */ + if (!honor_skip) + return (0); if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) return (0); if (oidp->oid_handler) return (0); lsp = SYSCTL_CHILDREN(oidp); - if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, - next+1, len, level+1, oidpp)) + if (!sysctl_sysctl_next_ls(lsp, name + 1, namelen - 1, + next + 1, len, level + 1, honor_skip)) return (0); goto next; } if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) continue; - if (oidp->oid_handler) continue; - lsp = SYSCTL_CHILDREN(oidp); - if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, - len, level+1, oidpp)) + if (!sysctl_sysctl_next_ls(lsp, name + 1, namelen - 1, + next + 1, len, level + 1, honor_skip)) return (0); next: + /* + * There were no useable children in this node. + * Continue searching for the next oid at the root level. + */ namelen = 1; emptynode: + /* Reset len in case a failed recursive call changed it. */ *len = level; } - return (1); + return (ENOENT); } static int @@ -1151,18 +1199,18 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) { int *name = (int *) arg1; u_int namelen = arg2; - int i, j, error; - struct sysctl_oid *oid; + int len, error; struct sysctl_oid_list *lsp = &sysctl__children; struct rm_priotracker tracker; - int newoid[CTL_MAXNAME]; + int next[CTL_MAXNAME]; SYSCTL_RLOCK(&tracker); - i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); + error = sysctl_sysctl_next_ls(lsp, name, namelen, next, &len, 1, + oidp->oid_number == CTL_SYSCTL_NEXT); SYSCTL_RUNLOCK(&tracker); - if (i) - return (ENOENT); - error = SYSCTL_OUT(req, newoid, j * sizeof (int)); + if (error) + return (error); + error = SYSCTL_OUT(req, next, len * sizeof (int)); return (error); } @@ -1171,6 +1219,9 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) * capability mode. */ static SYSCTL_NODE(_sysctl, CTL_SYSCTL_NEXT, next, CTLFLAG_RD | + CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_next, ""); + +static SYSCTL_NODE(_sysctl, CTL_SYSCTL_NEXTNOSKIP, nextnoskip, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_next, ""); static int Modified: stable/12/sys/sys/sysctl.h ============================================================================== --- stable/12/sys/sys/sysctl.h Mon Nov 2 19:56:15 2020 (r367282) +++ stable/12/sys/sys/sysctl.h Mon Nov 2 20:00:50 2020 (r367283) @@ -867,11 +867,12 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); */ #define CTL_SYSCTL_DEBUG 0 /* printf all nodes */ #define CTL_SYSCTL_NAME 1 /* string name of OID */ -#define CTL_SYSCTL_NEXT 2 /* next OID */ +#define CTL_SYSCTL_NEXT 2 /* next OID, honoring CTLFLAG_SKIP */ #define CTL_SYSCTL_NAME2OID 3 /* int array of name */ #define CTL_SYSCTL_OIDFMT 4 /* OID's kind and format */ #define CTL_SYSCTL_OIDDESCR 5 /* OID's description */ #define CTL_SYSCTL_OIDLABEL 6 /* aggregation label */ +#define CTL_SYSCTL_NEXTNOSKIP 7 /* next OID, ignoring CTLFLAG_SKIP */ /* * CTL_KERN identifiers Modified: stable/12/usr.bin/truss/syscalls.c ============================================================================== --- stable/12/usr.bin/truss/syscalls.c Mon Nov 2 19:56:15 2020 (r367282) +++ stable/12/usr.bin/truss/syscalls.c Mon Nov 2 20:00:50 2020 (r367283) @@ -2339,6 +2339,9 @@ print_arg(struct syscall_args *sc, unsigned long *args fprintf(fp, "oidlabel "); print_sysctl(fp, oid + 2, len - 2); break; + case CTL_SYSCTL_NEXTNOSKIP: + fprintf(fp, "nextnoskip"); + break; default: print_sysctl(fp, oid + 1, len - 1); } From owner-svn-src-stable@freebsd.org Tue Nov 3 01:38:17 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59491461BD0; Tue, 3 Nov 2020 01:38:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQC951mjvz4LHP; Tue, 3 Nov 2020 01:38:17 +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 20A4712BEA; Tue, 3 Nov 2020 01:38: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 0A31cHoS054846; Tue, 3 Nov 2020 01:38:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A31cHgk054845; Tue, 3 Nov 2020 01:38:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202011030138.0A31cHgk054845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Nov 2020 01:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367289 - stable/12/sys/arm64/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/arm64/conf X-SVN-Commit-Revision: 367289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 01:38:17 -0000 Author: emaste Date: Tue Nov 3 01:38:16 2020 New Revision: 367289 URL: https://svnweb.freebsd.org/changeset/base/367289 Log: MFC r366902: arm64: add uhci to GENERIC uhci is (or, can be) used by VMware ESXi-Arm. PR: 250308 Reported by: Vincent Milum Jr Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/arm64/conf/GENERIC Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Tue Nov 3 01:19:13 2020 (r367288) +++ stable/12/sys/arm64/conf/GENERIC Tue Nov 3 01:38:16 2020 (r367289) @@ -189,6 +189,7 @@ device rk_typec_phy # Rockchip TypeC PHY device dwcotg # DWC OTG controller device musb # Mentor Graphics USB OTG controller device ohci # OHCI USB interface +device uhci # UHCI USB interface device ehci # EHCI USB interface (USB 2.0) device ehci_mv # Marvell EHCI USB interface device xhci # XHCI PCI->USB interface (USB 3.0) From owner-svn-src-stable@freebsd.org Tue Nov 3 14:41:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13A0F45AD9D; Tue, 3 Nov 2020 14:41:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQXY96mbxz40Mg; Tue, 3 Nov 2020 14:41:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4C9E1C063; Tue, 3 Nov 2020 14:41:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A3EfnxU042141; Tue, 3 Nov 2020 14:41:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3EfnEx042140; Tue, 3 Nov 2020 14:41:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202011031441.0A3EfnEx042140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Nov 2020 14:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367297 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 367297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 14:41:50 -0000 Author: markj Date: Tue Nov 3 14:41:49 2020 New Revision: 367297 URL: https://svnweb.freebsd.org/changeset/base/367297 Log: MFC r367081: arm64: Remove a racy KASSERT from pmap_remove_pages() Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable@freebsd.org Tue Nov 3 20:43:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDF9A4638D5; Tue, 3 Nov 2020 20:43:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQhYz5xDzz4RBK; Tue, 3 Nov 2020 20:43:03 +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 94B8B20C06; Tue, 3 Nov 2020 20:43:03 +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 0A3Kh3YH070381; Tue, 3 Nov 2020 20:43:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3Kh1OU070368; Tue, 3 Nov 2020 20:43:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011032043.0A3Kh1OU070368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 3 Nov 2020 20:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367305 - in stable/12: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Commit-Revision: 367305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 20:43:03 -0000 Author: jhb Date: Tue Nov 3 20:43:01 2020 New Revision: 367305 URL: https://svnweb.freebsd.org/changeset/base/367305 Log: MFC 358556,360167: Add support for the TFTP windowsize option. 358556: Add support for the TFTP windowsize option described in RFC 7440. The windowsize option permits multiple blocks to be transmitted before the receiver sends an ACK improving throughput for larger files. 360167: Abort transfer if fseeko() fails. Modified: stable/12/libexec/tftpd/tests/functional.c stable/12/libexec/tftpd/tftp-file.c stable/12/libexec/tftpd/tftp-file.h stable/12/libexec/tftpd/tftp-options.c stable/12/libexec/tftpd/tftp-options.h stable/12/libexec/tftpd/tftp-transfer.c stable/12/libexec/tftpd/tftp-utils.c stable/12/libexec/tftpd/tftp-utils.h stable/12/libexec/tftpd/tftpd.8 stable/12/usr.bin/tftp/main.c stable/12/usr.bin/tftp/tftp.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/tftpd/tests/functional.c ============================================================================== --- stable/12/libexec/tftpd/tests/functional.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tests/functional.c Tue Nov 3 20:43:01 2020 (r367305) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -89,6 +90,13 @@ recv_ack(uint16_t blocknum) RECV(hdr, NULL, 0); } +static void +recv_oack(const char *options, size_t options_len) +{ + char hdr[] = {0, 6}; + RECV(hdr, options, options_len); +} + /* * Receive a data packet from tftpd * @param blocknum Expected block number to be received @@ -159,6 +167,11 @@ send_ack(uint16_t blocknum) } +/* + * build an option string + */ +#define OPTION_STR(name, value) name "\000" value "\000" + /* * send a read request to tftpd. * @param filename filename as a string, absolute or relative @@ -166,6 +179,11 @@ send_ack(uint16_t blocknum) */ #define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") +/* + * send a read request with options + */ +#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) + /* * send a write request to tftpd. * @param filename filename as a string, absolute or relative @@ -173,6 +191,11 @@ send_ack(uint16_t blocknum) */ #define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") +/* + * send a write request with options + */ +#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) + /* Define a test case, for both IPv4 and IPv6 */ #define TFTPD_TC_DEFINE(name, head, ...) \ static void \ @@ -573,6 +596,32 @@ TFTPD_TC_DEFINE(rrq_medium,) } /* + * Read a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(rrq_medium_window,) +{ + int fd; + size_t i; + uint32_t contents[192]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, (const char*)&contents[0], 512); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + +/* * Read a file in netascii format */ TFTPD_TC_DEFINE(rrq_netascii,) @@ -652,6 +701,59 @@ TFTPD_TC_DEFINE(rrq_small,) } /* + * Read a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(rrq_window_rfc7440,) +{ + int fd; + size_t i; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + uint32_t *u32p; + + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, &contents[0 * 512], 512); + recv_data(2, &contents[1 * 512], 512); + recv_data(3, &contents[2 * 512], 512); + recv_data(4, &contents[3 * 512], 512); + send_ack(4); + recv_data(5, &contents[4 * 512], 512); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + + /* ACK 5 as if 6-8 were dropped. */ + send_ack(5); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + recv_data(9, &contents[8 * 512], 512); + send_ack(9); + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + + /* Drop ACK and after timeout receive 10-13. */ + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + send_ack(13); +} + +/* * Try to transfer a file with an unknown mode. */ TFTPD_TC_DEFINE(unknown_modes,) @@ -872,6 +974,38 @@ TFTPD_TC_DEFINE(wrq_medium,) } /* + * Write a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(wrq_medium_window,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_data(1, (const char*)&contents[0], 512); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* * Write a file in netascii format */ TFTPD_TC_DEFINE(wrq_netascii,) @@ -965,7 +1099,71 @@ TFTPD_TC_DEFINE(wrq_truncate,) ATF_REQUIRE_EQ(sb.st_size, 0); } +/* + * Write a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(wrq_window_rfc7440,) +{ + int fd; + size_t i; + ssize_t r; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + char buffer[sizeof(contents)]; + uint32_t *u32p; + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_data(1, &contents[0 * 512], 512); + send_data(2, &contents[1 * 512], 512); + send_data(3, &contents[2 * 512], 512); + send_data(4, &contents[3 * 512], 512); + recv_ack(4); + send_data(5, &contents[4 * 512], 512); + + /* Drop 6-8. */ + recv_ack(5); + send_data(6, &contents[5 * 512], 512); + send_data(7, &contents[6 * 512], 512); + send_data(8, &contents[7 * 512], 512); + send_data(9, &contents[8 * 512], 512); + recv_ack(9); + + /* Drop 11. */ + send_data(10, &contents[9 * 512], 512); + send_data(12, &contents[11 * 512], 512); + + /* + * We can't send 13 here as tftpd has probably already seen 12 + * and sent the ACK of 10 if running locally. While it would + * recover by sending another ACK of 10, our state machine + * would be out of sync. + */ + + /* Ignore ACK for 10 and resend 10-13. */ + recv_ack(10); + send_data(10, &contents[9 * 512], 512); + send_data(11, &contents[10 * 512], 512); + send_data(12, &contents[11 * 512], 512); + send_data(13, &contents[12 * 512], 508); + recv_ack(13); + + fd = open("rfc7440.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, sizeof(contents), buffer, r); +} + + /* * Main */ @@ -981,10 +1179,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, rrq_eaccess); TFTPD_TC_ADD(tp, rrq_empty); TFTPD_TC_ADD(tp, rrq_medium); + TFTPD_TC_ADD(tp, rrq_medium_window); TFTPD_TC_ADD(tp, rrq_netascii); TFTPD_TC_ADD(tp, rrq_nonexistent); TFTPD_TC_ADD(tp, rrq_path_max); TFTPD_TC_ADD(tp, rrq_small); + TFTPD_TC_ADD(tp, rrq_window_rfc7440); TFTPD_TC_ADD(tp, unknown_modes); TFTPD_TC_ADD(tp, unknown_opcode); TFTPD_TC_ADD(tp, w_flag); @@ -994,10 +1194,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, wrq_eaccess); TFTPD_TC_ADD(tp, wrq_eaccess_world_readable); TFTPD_TC_ADD(tp, wrq_medium); + TFTPD_TC_ADD(tp, wrq_medium_window); TFTPD_TC_ADD(tp, wrq_netascii); TFTPD_TC_ADD(tp, wrq_nonexistent); TFTPD_TC_ADD(tp, wrq_small); TFTPD_TC_ADD(tp, wrq_truncate); + TFTPD_TC_ADD(tp, wrq_window_rfc7440); return (atf_no_error()); } Modified: stable/12/libexec/tftpd/tftp-file.c ============================================================================== --- stable/12/libexec/tftpd/tftp-file.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-file.c Tue Nov 3 20:43:01 2020 (r367305) @@ -214,6 +214,20 @@ write_close(void) return 0; } +off_t +tell_file(void) +{ + + return ftello(file); +} + +int +seek_file(off_t offset) +{ + + return fseeko(file, offset, SEEK_SET); +} + int read_init(int fd, FILE *f, const char *mode) { Modified: stable/12/libexec/tftpd/tftp-file.h ============================================================================== --- stable/12/libexec/tftpd/tftp-file.h Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-file.h Tue Nov 3 20:43:01 2020 (r367305) @@ -36,4 +36,7 @@ int read_init(int fd, FILE *f, const char *mode); size_t read_file(char *buffer, int count); int read_close(void); +int seek_file(off_t offset); +off_t tell_file(void); + int synchnet(int peer); Modified: stable/12/libexec/tftpd/tftp-options.c ============================================================================== --- stable/12/libexec/tftpd/tftp-options.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-options.c Tue Nov 3 20:43:01 2020 (r367305) @@ -56,6 +56,7 @@ struct options options[] = { { "blksize", NULL, NULL, option_blksize, 1 }, { "blksize2", NULL, NULL, option_blksize2, 0 }, { "rollover", NULL, NULL, option_rollover, 0 }, + { "windowsize", NULL, NULL, option_windowsize, 1 }, { NULL, NULL, NULL, NULL, 0 } }; @@ -271,6 +272,41 @@ option_blksize2(int peer __unused) if (debug&DEBUG_OPTIONS) tftp_log(LOG_DEBUG, "Setting blksize2 to '%s'", options[OPT_BLKSIZE2].o_reply); + + return (0); +} + +int +option_windowsize(int peer) +{ + int size; + + if (options[OPT_WINDOWSIZE].o_request == NULL) + return (0); + + size = atoi(options[OPT_WINDOWSIZE].o_request); + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + if (acting_as_client) { + tftp_log(LOG_ERR, + "Invalid windowsize (%d blocks), aborting", + size); + send_error(peer, EBADOP); + return (1); + } else { + tftp_log(LOG_WARNING, + "Invalid windowsize (%d blocks), ignoring request", + size); + return (0); + } + } + + /* XXX: Should force a windowsize of 1 for non-seekable files. */ + asprintf(&options[OPT_WINDOWSIZE].o_reply, "%d", size); + windowsize = size; + + if (debug&DEBUG_OPTIONS) + tftp_log(LOG_DEBUG, "Setting windowsize to '%s'", + options[OPT_WINDOWSIZE].o_reply); return (0); } Modified: stable/12/libexec/tftpd/tftp-options.h ============================================================================== --- stable/12/libexec/tftpd/tftp-options.h Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-options.h Tue Nov 3 20:43:01 2020 (r367305) @@ -42,6 +42,7 @@ int option_timeout(int peer); int option_blksize(int peer); int option_blksize2(int peer); int option_rollover(int peer); +int option_windowsize(int peer); extern int options_extra_enabled; extern int options_rfc_enabled; @@ -61,4 +62,5 @@ enum opt_enum { OPT_BLKSIZE, OPT_BLKSIZE2, OPT_ROLLOVER, + OPT_WINDOWSIZE, }; Modified: stable/12/libexec/tftpd/tftp-transfer.c ============================================================================== --- stable/12/libexec/tftpd/tftp-transfer.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-transfer.c Tue Nov 3 20:43:01 2020 (r367305) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "tftp-file.h" @@ -48,6 +49,12 @@ __FBSDID("$FreeBSD$"); #include "tftp-options.h" #include "tftp-transfer.h" +struct block_data { + off_t offset; + uint16_t block; + int size; +}; + /* * Send a file via the TFTP data session. */ @@ -55,54 +62,79 @@ void tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) { struct tftphdr *rp; - int size, n_data, n_ack, try; - uint16_t oldblock; + int size, n_data, n_ack, sendtry, acktry; + u_int i, j; + uint16_t oldblock, windowblock; char sendbuffer[MAXPKTSIZE]; char recvbuffer[MAXPKTSIZE]; + struct block_data window[WINDOWSIZE_MAX]; rp = (struct tftphdr *)recvbuffer; *block = 1; ts->amount = 0; + windowblock = 0; + acktry = 0; do { +read_block: if (debug&DEBUG_SIMPLE) - tftp_log(LOG_DEBUG, "Sending block %d", *block); + tftp_log(LOG_DEBUG, "Sending block %d (window block %d)", + *block, windowblock); + window[windowblock].offset = tell_file(); + window[windowblock].block = *block; size = read_file(sendbuffer, segsize); if (size < 0) { tftp_log(LOG_ERR, "read_file returned %d", size); send_error(peer, errno + 100); goto abort; } + window[windowblock].size = size; + windowblock++; - for (try = 0; ; try++) { + for (sendtry = 0; ; sendtry++) { n_data = send_data(peer, *block, sendbuffer, size); - if (n_data > 0) { - if (try == maxtimeouts) { - tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, " - "giving up", *block); - return; - } + if (n_data == 0) + break; + + if (sendtry == maxtimeouts) { tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, trying again", - *block); - continue; + "Cannot send DATA packet #%d, " + "giving up", *block); + return; } + tftp_log(LOG_ERR, + "Cannot send DATA packet #%d, trying again", + *block); + } + /* Only check for ACK for last block in window. */ + if (windowblock == windowsize || size != segsize) { n_ack = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); if (n_ack < 0) { if (n_ack == RP_TIMEOUT) { - if (try == maxtimeouts) { + if (acktry == maxtimeouts) { tftp_log(LOG_ERR, "Timeout #%d send ACK %d " - "giving up", try, *block); + "giving up", acktry, *block); return; } tftp_log(LOG_WARNING, "Timeout #%d on ACK %d", - try, *block); - continue; + acktry, *block); + + acktry++; + ts->retries++; + if (seek_file(window[0].offset) != 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } + *block = window[0].block; + windowblock = 0; + goto read_block; } /* Either read failure or ERROR packet */ @@ -112,18 +144,73 @@ tftp_send(int peer, uint16_t *block, struct tftp_stats goto abort; } if (rp->th_opcode == ACK) { - ts->blocks++; - if (rp->th_block == *block) { - ts->amount += size; - break; + /* + * Look for the ACKed block in our open + * window. + */ + for (i = 0; i < windowblock; i++) { + if (rp->th_block == window[i].block) + break; } - /* Re-synchronize with the other side */ - (void) synchnet(peer); - if (rp->th_block == (*block - 1)) { + if (i == windowblock) { + /* Did not recognize ACK. */ + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACK %d out of window", + rp->th_block); + + /* Re-synchronize with the other side */ + (void) synchnet(peer); + + /* Resend the current window. */ ts->retries++; - continue; + if (seek_file(window[0].offset) != 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } + *block = window[0].block; + windowblock = 0; + goto read_block; } + + /* ACKed at least some data. */ + acktry = 0; + for (j = 0; j <= i; j++) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACKed block %d", + window[j].block); + ts->blocks++; + ts->amount += window[j].size; + } + + /* + * Partial ACK. Rewind state to first + * un-ACKed block. + */ + if (i + 1 != windowblock) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Partial ACK"); + if (seek_file(window[i + 1].offset) != + 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } + *block = window[i + 1].block; + windowblock = 0; + ts->retries++; + goto read_block; + } + + windowblock = 0; } } @@ -161,31 +248,35 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st struct tftphdr *firstblock, size_t fb_size) { struct tftphdr *rp; - uint16_t oldblock; - int n_data, n_ack, writesize, i, retry; + uint16_t oldblock, windowstart; + int n_data, n_ack, writesize, i, retry, windowblock; char recvbuffer[MAXPKTSIZE]; ts->amount = 0; + windowblock = 0; if (firstblock != NULL) { writesize = write_file(firstblock->th_data, fb_size); ts->amount += writesize; - for (i = 0; ; i++) { - n_ack = send_ack(peer, *block); - if (n_ack > 0) { - if (i == maxtimeouts) { + windowblock++; + if (windowsize == 1 || fb_size != segsize) { + for (i = 0; ; i++) { + n_ack = send_ack(peer, *block); + if (n_ack > 0) { + if (i == maxtimeouts) { + tftp_log(LOG_ERR, + "Cannot send ACK packet #%d, " + "giving up", *block); + return; + } tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, " - "giving up", *block); - return; + "Cannot send ACK packet #%d, trying again", + *block); + continue; } - tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, trying again", - *block); - continue; - } - break; + break; + } } if (fb_size != segsize) { @@ -216,7 +307,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st for (retry = 0; ; retry++) { if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, - "Receiving DATA block %d", *block); + "Receiving DATA block %d (window block %d)", + *block, windowblock); n_data = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); @@ -232,6 +324,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st "Timeout #%d on DATA block %d", retry, *block); send_ack(peer, oldblock); + windowblock = 0; continue; } @@ -247,19 +340,42 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (rp->th_block == *block) break; + /* + * Ignore duplicate blocks within the + * window. + * + * This does not handle duplicate + * blocks during a rollover as + * gracefully, but that should still + * recover eventually. + */ + if (*block > windowsize) + windowstart = *block - windowsize; + else + windowstart = 0; + if (rp->th_block > windowstart && + rp->th_block < *block) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Ignoring duplicate DATA block %d", + rp->th_block); + windowblock++; + retry = 0; + continue; + } + tftp_log(LOG_WARNING, "Expected DATA block %d, got block %d", *block, rp->th_block); /* Re-synchronize with the other side */ (void) synchnet(peer); - if (rp->th_block == (*block-1)) { - tftp_log(LOG_INFO, "Trying to sync"); - *block = oldblock; - ts->retries++; - goto send_ack; /* rexmit */ - } + tftp_log(LOG_INFO, "Trying to sync"); + *block = oldblock; + ts->retries++; + goto send_ack; /* rexmit */ + } else { tftp_log(LOG_WARNING, "Expected DATA block, got %s block", @@ -282,7 +398,11 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (n_data != segsize) write_close(); } + windowblock++; + /* Only send ACKs for the last block in the window. */ + if (windowblock < windowsize && n_data == segsize) + continue; send_ack: for (i = 0; ; i++) { n_ack = send_ack(peer, *block); @@ -301,6 +421,9 @@ send_ack: continue; } + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Sent ACK for %d", *block); + windowblock = 0; break; } gettimeofday(&(ts->tstop), NULL); Modified: stable/12/libexec/tftpd/tftp-utils.c ============================================================================== --- stable/12/libexec/tftpd/tftp-utils.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-utils.c Tue Nov 3 20:43:01 2020 (r367305) @@ -51,6 +51,7 @@ int timeoutnetwork = MAX_TIMEOUTS * TIMEOUT; int maxtimeouts = MAX_TIMEOUTS; uint16_t segsize = SEGSIZE; uint16_t pktsize = SEGSIZE + 4; +uint16_t windowsize = WINDOWSIZE; int acting_as_client; Modified: stable/12/libexec/tftpd/tftp-utils.h ============================================================================== --- stable/12/libexec/tftpd/tftp-utils.h Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftp-utils.h Tue Nov 3 20:43:01 2020 (r367305) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #define TIMEOUT_MAX 255 /* Maximum timeout value */ #define MIN_TIMEOUTS 3 +/* For the windowsize option */ +#define WINDOWSIZE 1 +#define WINDOWSIZE_MIN 1 +#define WINDOWSIZE_MAX 65535 + extern int timeoutpacket; extern int timeoutnetwork; extern int maxtimeouts; @@ -53,6 +58,7 @@ int settimeouts(int timeoutpacket, int timeoutnetwork, extern uint16_t segsize; extern uint16_t pktsize; +extern uint16_t windowsize; extern int acting_as_client; Modified: stable/12/libexec/tftpd/tftpd.8 ============================================================================== --- stable/12/libexec/tftpd/tftpd.8 Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/libexec/tftpd/tftpd.8 Tue Nov 3 20:43:01 2020 (r367305) @@ -28,7 +28,7 @@ .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 22, 2011 +.Dd March 2, 2020 .Dt TFTPD 8 .Os .Sh NAME @@ -245,6 +245,9 @@ The following RFC's are supported: .Rs .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options .Re +.Rs +.%T RFC 7440: TFTP Windowsize Option +.Re .Pp The non-standard .Cm rollover @@ -291,6 +294,9 @@ Edwin Groothuis performed a major and .Xr tftp 1 code to support RFC2348. +.Pp +Support for the windowsize option (RFC7440) was introduced in +.Fx 13.0 . .Sh NOTES Files larger than 33,553,919 octets (65535 blocks, last one <512 octets) cannot be correctly transferred without client and server Modified: stable/12/usr.bin/tftp/main.c ============================================================================== --- stable/12/usr.bin/tftp/main.c Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/usr.bin/tftp/main.c Tue Nov 3 20:43:01 2020 (r367305) @@ -114,6 +114,7 @@ static void setblocksize2(int, char **); static void setoptions(int, char **); static void setrollover(int, char **); static void setpacketdrop(int, char **); +static void setwindowsize(int, char **); static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); @@ -158,6 +159,7 @@ static struct cmd cmdtab[] = { "enable or disable RFC2347 style options" }, { "help", help, "print help information" }, { "packetdrop", setpacketdrop, "artificial packetloss feature" }, + { "windowsize", setwindowsize, "set windowsize[*]" }, { "?", help, "print help information" }, { NULL, NULL, NULL } }; @@ -1068,4 +1070,28 @@ setpacketdrop(int argc, char *argv[]) printf("Randomly %d in 100 packets will be dropped\n", packetdroppercentage); +} + +static void +setwindowsize(int argc, char *argv[]) +{ + + if (!options_rfc_enabled) + printf("RFC2347 style options are not enabled " + "(but proceeding anyway)\n"); + + if (argc != 1) { + int size = atoi(argv[1]); + + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + printf("Windowsize should be between %d and %d " + "blocks.\n", WINDOWSIZE_MIN, WINDOWSIZE_MAX); + return; + } else { + asprintf(&options[OPT_WINDOWSIZE].o_request, "%d", + size); + } + } + printf("Windowsize is now %s blocks.\n", + options[OPT_WINDOWSIZE].o_request); } Modified: stable/12/usr.bin/tftp/tftp.1 ============================================================================== --- stable/12/usr.bin/tftp/tftp.1 Tue Nov 3 19:57:28 2020 (r367304) +++ stable/12/usr.bin/tftp/tftp.1 Tue Nov 3 20:43:01 2020 (r367305) @@ -28,7 +28,7 @@ .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd Aug 22, 2018 +.Dd March 2, 2020 .Dt TFTP 1 .Os .Sh NAME @@ -216,6 +216,14 @@ Toggle packet tracing. .Pp .It Cm verbose Toggle verbose mode. +.Pp +.It Cm windowsize Op Ar size +Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to +.Op Ar size +blocks as specified in RFC 7440. +Valid values are between 1 and 65535. +If no windowsize is specified, +then the default windowsize of 1 block will be used. .El .Sh SEE ALSO .Xr tftpd 8 @@ -235,6 +243,9 @@ The following RFC's are supported: .Re .Rs .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) +.Re +.Rs +.%T RFC 7440: TFTP Windowsize Option .Re .Pp The non-standard From owner-svn-src-stable@freebsd.org Tue Nov 3 23:26:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 936A7467428; Tue, 3 Nov 2020 23:26:27 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQmBW3Mp0z4bgJ; Tue, 3 Nov 2020 23:26:27 +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 56FE922B10; Tue, 3 Nov 2020 23:26:27 +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 0A3NQRDO069017; Tue, 3 Nov 2020 23:26:27 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3NQRgg069016; Tue, 3 Nov 2020 23:26:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202011032326.0A3NQRgg069016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Nov 2020 23:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367312 - stable/12/contrib/sendmail/include/sm/os X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/contrib/sendmail/include/sm/os X-SVN-Commit-Revision: 367312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 23:26:27 -0000 Author: brooks Date: Tue Nov 3 23:26:26 2020 New Revision: 367312 URL: https://svnweb.freebsd.org/changeset/base/367312 Log: MFC r367063: Key decleration of union semun on src version __FreeBSD__ is defined by the compiler derived from the triple. When building FreeBSD 11 on a FreeBSD 12 with a CROSS_TOOLCHAIN=llvm10, __FreeBSD__ was set to 12 when building lib32 (for some reason no triple is being passed which seems to mean that we're taking default values from the build system). This in turn meant we end up with a double decleration of union semun which is a build error. Reviewed by: gshapiro, dim Differential Revision: https://reviews.freebsd.org/D26902 Modified: stable/12/contrib/sendmail/include/sm/os/sm_os_freebsd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- stable/12/contrib/sendmail/include/sm/os/sm_os_freebsd.h Tue Nov 3 22:53:23 2020 (r367311) +++ stable/12/contrib/sendmail/include/sm/os/sm_os_freebsd.h Tue Nov 3 23:26:26 2020 (r367312) @@ -32,8 +32,8 @@ # define SM_CONF_SHM 1 #endif #ifndef SM_CONF_SEM -# if __FreeBSD__ > 11 -# define SM_CONF_SEM 2 /* union semun is now longer available by default */ +# if __FreeBSD_version >= 1200059 +# define SM_CONF_SEM 2 /* union semun is no longer declared by default */ # else # define SM_CONF_SEM 1 # endif From owner-svn-src-stable@freebsd.org Tue Nov 3 23:27:25 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B4F646758E; Tue, 3 Nov 2020 23:27:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQmCd1pC2z4bpx; Tue, 3 Nov 2020 23:27:25 +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 20EE222A90; Tue, 3 Nov 2020 23:27:25 +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 0A3NROEa069117; Tue, 3 Nov 2020 23:27:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3NRO1i069116; Tue, 3 Nov 2020 23:27:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202011032327.0A3NRO1i069116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Nov 2020 23:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367313 - stable/11/contrib/sendmail/include/sm/os X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/contrib/sendmail/include/sm/os X-SVN-Commit-Revision: 367313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 23:27:25 -0000 Author: brooks Date: Tue Nov 3 23:27:24 2020 New Revision: 367313 URL: https://svnweb.freebsd.org/changeset/base/367313 Log: MFC r367063: Key decleration of union semun on src version __FreeBSD__ is defined by the compiler derived from the triple. When building FreeBSD 11 on a FreeBSD 12 with a CROSS_TOOLCHAIN=llvm10, __FreeBSD__ was set to 12 when building lib32 (for some reason no triple is being passed which seems to mean that we're taking default values from the build system). This in turn meant we end up with a double decleration of union semun which is a build error. Reviewed by: gshapiro, dim Differential Revision: https://reviews.freebsd.org/D26902 Modified: stable/11/contrib/sendmail/include/sm/os/sm_os_freebsd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- stable/11/contrib/sendmail/include/sm/os/sm_os_freebsd.h Tue Nov 3 23:26:26 2020 (r367312) +++ stable/11/contrib/sendmail/include/sm/os/sm_os_freebsd.h Tue Nov 3 23:27:24 2020 (r367313) @@ -32,8 +32,8 @@ # define SM_CONF_SHM 1 #endif #ifndef SM_CONF_SEM -# if __FreeBSD__ > 11 -# define SM_CONF_SEM 2 /* union semun is now longer available by default */ +# if __FreeBSD_version >= 1200059 +# define SM_CONF_SEM 2 /* union semun is no longer declared by default */ # else # define SM_CONF_SEM 1 # endif From owner-svn-src-stable@freebsd.org Tue Nov 3 23:29:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86C8046761F; Tue, 3 Nov 2020 23:29: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQmFc2hmPz4bnG; Tue, 3 Nov 2020 23:29:08 +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 3FF9722178; Tue, 3 Nov 2020 23:29: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 0A3NT8pp069243; Tue, 3 Nov 2020 23:29:08 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3NT8A4069242; Tue, 3 Nov 2020 23:29:08 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202011032329.0A3NT8A4069242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Nov 2020 23:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367314 - stable/12/lib/libc/tests/ssp X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/lib/libc/tests/ssp X-SVN-Commit-Revision: 367314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 23:29:08 -0000 Author: brooks Date: Tue Nov 3 23:29:07 2020 New Revision: 367314 URL: https://svnweb.freebsd.org/changeset/base/367314 Log: MFC r367121: Disable ssp raw test without ASAN r366981 disabled ASAN when it might not be reliable (with an external compiler), but this test is broken without ASAN so disable it completely in that case. PR: 250706 Reviewed by: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D26982 Modified: stable/12/lib/libc/tests/ssp/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/tests/ssp/Makefile ============================================================================== --- stable/12/lib/libc/tests/ssp/Makefile Tue Nov 3 23:27:24 2020 (r367313) +++ stable/12/lib/libc/tests/ssp/Makefile Tue Nov 3 23:29:07 2020 (r367314) @@ -33,7 +33,7 @@ PROGS+= h_memset # probably needs to be fixed as it's currently hardcoded. # # sanitizer is not tested or supported for ARM right now. sbruno -.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \ +.if ${COMPILER_TYPE} == "clang" && ${CC} == "cc" && !defined(_SKIP_BUILD) && \ (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw") .if !defined(_CLANG_RESOURCE_DIR) _CLANG_RESOURCE_DIR!= ${CC:N${CCACHE_BIN}} -print-resource-dir From owner-svn-src-stable@freebsd.org Tue Nov 3 23:30:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B829A467376; Tue, 3 Nov 2020 23:30:12 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQmGr36vnz4c4b; Tue, 3 Nov 2020 23:30:12 +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 4DEDF228B0; Tue, 3 Nov 2020 23:30:12 +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 0A3NUCsa069391; Tue, 3 Nov 2020 23:30:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A3NUCEg069390; Tue, 3 Nov 2020 23:30:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202011032330.0A3NUCEg069390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Nov 2020 23:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367315 - stable/11/lib/libc/tests/ssp X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/lib/libc/tests/ssp X-SVN-Commit-Revision: 367315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 23:30:12 -0000 Author: brooks Date: Tue Nov 3 23:30:11 2020 New Revision: 367315 URL: https://svnweb.freebsd.org/changeset/base/367315 Log: MFC r367121: Disable ssp raw test without ASAN r366981 disabled ASAN when it might not be reliable (with an external compiler), but this test is broken without ASAN so disable it completely in that case. PR: 250706 Reviewed by: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D26982 Modified: stable/11/lib/libc/tests/ssp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/tests/ssp/Makefile ============================================================================== --- stable/11/lib/libc/tests/ssp/Makefile Tue Nov 3 23:29:07 2020 (r367314) +++ stable/11/lib/libc/tests/ssp/Makefile Tue Nov 3 23:30:11 2020 (r367315) @@ -33,7 +33,7 @@ PROGS+= h_memset # probably needs to be fixed as it's currently hardcoded. # # sanitizer is not tested or supported for ARM right now. sbruno -.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \ +.if ${COMPILER_TYPE} == "clang" && ${CC} == "cc" && !defined(_SKIP_BUILD) && \ (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw") .if !defined(_CLANG_RESOURCE_DIR) _CLANG_RESOURCE_DIR!= ${CC:N${CCACHE_BIN}} -print-resource-dir From owner-svn-src-stable@freebsd.org Wed Nov 4 07:52:00 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42281454287; Wed, 4 Nov 2020 07:52:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQzPr0rhSz4NtX; Wed, 4 Nov 2020 07:52:00 +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 00425A257; Wed, 4 Nov 2020 07:52:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A47pxHF081333; Wed, 4 Nov 2020 07:51:59 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A47pxES081332; Wed, 4 Nov 2020 07:51:59 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011040751.0A47pxES081332@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, 4 Nov 2020 07:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367316 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 367316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 07:52:00 -0000 Author: 0mp (doc,ports committer) Date: Wed Nov 4 07:51:59 2020 New Revision: 367316 URL: https://svnweb.freebsd.org/changeset/base/367316 Log: MFC r367259: ifconfig.8: Improve formatting of -f in synopsis Modified: stable/12/sbin/ifconfig/ifconfig.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Tue Nov 3 23:30:11 2020 (r367315) +++ stable/12/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:51:59 2020 (r367316) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 25, 2020 +.Dd November 1, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd configure network interface parameters .Sh SYNOPSIS .Nm -.Op Fl f Ar type:format Ns Op Ar ,type:format +.Op Fl f Ar type Ns Cm \&: Ns Ar format Ns Op Cm \&, Ns Ar type Ns Cm \& : Ns Ar format ... .Op Fl L .Op Fl k .Op Fl m From owner-svn-src-stable@freebsd.org Wed Nov 4 07:52:43 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00377454373; Wed, 4 Nov 2020 07:52: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQzQf6FGrz4Ns8; Wed, 4 Nov 2020 07:52: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 B9715A6C3; Wed, 4 Nov 2020 07:52:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A47qg6b082158; Wed, 4 Nov 2020 07:52:42 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A47qg6u082157; Wed, 4 Nov 2020 07:52:42 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011040752.0A47qg6u082157@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, 4 Nov 2020 07:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367317 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 367317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 07:52:43 -0000 Author: 0mp (doc,ports committer) Date: Wed Nov 4 07:52:42 2020 New Revision: 367317 URL: https://svnweb.freebsd.org/changeset/base/367317 Log: MFC r367259: ifconfig.8: Improve formatting of -f in synopsis Modified: stable/11/sbin/ifconfig/ifconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:51:59 2020 (r367316) +++ stable/11/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:52:42 2020 (r367317) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 25, 2020 +.Dd November 1, 2020 .Dt IFCONFIG 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd configure network interface parameters .Sh SYNOPSIS .Nm -.Op Fl f Ar type:format Ns Op Ar ,type:format +.Op Fl f Ar type Ns Cm \&: Ns Ar format Ns Op Cm \&, Ns Ar type Ns Cm \& : Ns Ar format ... .Op Fl L .Op Fl k .Op Fl m From owner-svn-src-stable@freebsd.org Wed Nov 4 07:53:24 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B84F04542BD; Wed, 4 Nov 2020 07:53:24 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQzRS4VjLz4P2k; Wed, 4 Nov 2020 07:53:24 +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 7DB7EA61D; Wed, 4 Nov 2020 07:53:24 +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 0A47rO5w082233; Wed, 4 Nov 2020 07:53:24 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A47rOIh082232; Wed, 4 Nov 2020 07:53:24 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011040753.0A47rOIh082232@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, 4 Nov 2020 07:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367318 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 367318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 07:53:24 -0000 Author: 0mp (doc,ports committer) Date: Wed Nov 4 07:53:24 2020 New Revision: 367318 URL: https://svnweb.freebsd.org/changeset/base/367318 Log: MFC r367258: Remove Tn macros from ifconfig.8 Modified: stable/12/sbin/ifconfig/ifconfig.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:52:42 2020 (r367317) +++ stable/12/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:53:24 2020 (r367318) @@ -92,15 +92,11 @@ or other operating parameters. The following options are available: .Bl -tag -width indent .It Ar address -For the -.Tn DARPA Ns -Internet -family, +For the DARPA-Internet family, the address is either a host name present in the host name data base, .Xr hosts 5 , -or a -.Tn DARPA -Internet address expressed in the Internet standard +or a DARPA Internet address expressed in the Internet standard .Dq dot notation . .Pp It is also possible to use the CIDR notation (also known as the @@ -131,9 +127,7 @@ parameter below for more information. .\" (Ethernet, FDDI, and Token Ring) interfaces, .\" which use the hardware physical address, .\" and on interfaces other than the first. -.\" For the -.\" .Tn ISO -.\" family, addresses are specified as a long hexadecimal string, +.\" For the ISO family, addresses are specified as a long hexadecimal string, .\" as in the Xerox family. .\" However, two consecutive dots imply a zero .\" byte, and the dots are optional, if the user wishes to (carefully) @@ -320,12 +314,8 @@ Enable the use of the Address Resolution Protocol .Pq Xr arp 4 in mapping between network level addresses and link level addresses (default). -This is currently implemented for mapping between -.Tn DARPA -Internet -addresses and -.Tn IEEE -802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). +This is currently implemented for mapping between DARPA Internet addresses +and IEEE 802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). .It Fl arp Disable the use of the Address Resolution Protocol .Pq Xr arp 4 . @@ -425,8 +415,7 @@ of the interface to Some interfaces support the mutually exclusive use of one of several different physical media connectors. For example, a 10Mbit/s Ethernet -interface might support the use of either -.Tn AUI +interface might support the use of either AUI or twisted pair connectors. Setting the media type to .Cm 10base5/AUI @@ -564,7 +553,7 @@ Note that this must be configured on a physical interf not on a .Xr vlan 4 interface itself. -.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso +.It Fl vlanmtu , vlanhwtag , vlanhwfilter , vlanhwtso If the driver offers user-configurable VLAN support, disable reception of extended frames, tag processing in hardware, frame filtering in hardware, or TSO on VLAN, @@ -620,16 +609,12 @@ Destroy the specified network pseudo-device. Another name for the .Cm create parameter. -Included for -.Tn Solaris -compatibility. +Included for Solaris compatibility. .It Cm unplumb Another name for the .Cm destroy parameter. -Included for -.Tn Solaris -compatibility. +Included for Solaris compatibility. .It Cm metric Ar n Set the routing metric of the interface to .Ar n , @@ -1942,9 +1927,7 @@ string or as a string of hexadecimal digits preceded b .Ql 0x . For maximum portability, hex keys are recommended; the mapping of text keys to WEP encryption is usually driver-specific. -In particular, the -.Tn Windows -drivers do this mapping differently to +In particular, the Windows drivers do this mapping differently to .Fx . A key may be cleared by setting it to .Ql - . From owner-svn-src-stable@freebsd.org Wed Nov 4 07:54:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 832BA4544C5; Wed, 4 Nov 2020 07:54:08 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQzSJ2qc4z4P1K; Wed, 4 Nov 2020 07:54:08 +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 44272A5BB; Wed, 4 Nov 2020 07:54:08 +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 0A47s8BR082316; Wed, 4 Nov 2020 07:54:08 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A47s8hu082315; Wed, 4 Nov 2020 07:54:08 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011040754.0A47s8hu082315@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, 4 Nov 2020 07:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367319 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 367319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 07:54:08 -0000 Author: 0mp (doc,ports committer) Date: Wed Nov 4 07:54:07 2020 New Revision: 367319 URL: https://svnweb.freebsd.org/changeset/base/367319 Log: MFC r367258: Remove Tn macros from ifconfig.8 Modified: stable/11/sbin/ifconfig/ifconfig.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/11/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:53:24 2020 (r367318) +++ stable/11/sbin/ifconfig/ifconfig.8 Wed Nov 4 07:54:07 2020 (r367319) @@ -92,15 +92,11 @@ or other operating parameters. The following options are available: .Bl -tag -width indent .It Ar address -For the -.Tn DARPA Ns -Internet -family, +For the DARPA-Internet family, the address is either a host name present in the host name data base, .Xr hosts 5 , -or a -.Tn DARPA -Internet address expressed in the Internet standard +or a DARPA Internet address expressed in the Internet standard .Dq dot notation . .Pp It is also possible to use the CIDR notation (also known as the @@ -131,9 +127,7 @@ parameter below for more information. .\" (Ethernet, FDDI, and Token Ring) interfaces, .\" which use the hardware physical address, .\" and on interfaces other than the first. -.\" For the -.\" .Tn ISO -.\" family, addresses are specified as a long hexadecimal string, +.\" For the ISO family, addresses are specified as a long hexadecimal string, .\" as in the Xerox family. .\" However, two consecutive dots imply a zero .\" byte, and the dots are optional, if the user wishes to (carefully) @@ -320,12 +314,8 @@ Enable the use of the Address Resolution Protocol .Pq Xr arp 4 in mapping between network level addresses and link level addresses (default). -This is currently implemented for mapping between -.Tn DARPA -Internet -addresses and -.Tn IEEE -802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). +This is currently implemented for mapping between DARPA Internet addresses +and IEEE 802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). .It Fl arp Disable the use of the Address Resolution Protocol .Pq Xr arp 4 . @@ -425,8 +415,7 @@ of the interface to Some interfaces support the mutually exclusive use of one of several different physical media connectors. For example, a 10Mbit/s Ethernet -interface might support the use of either -.Tn AUI +interface might support the use of either AUI or twisted pair connectors. Setting the media type to .Cm 10base5/AUI @@ -562,7 +551,7 @@ Note that this must be issued on a physical interface not on a .Xr vlan 4 interface itself. -.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso +.It Fl vlanmtu , vlanhwtag , vlanhwfilter , vlanhwtso If the driver offers user-configurable VLAN support, disable reception of extended frames, tag processing in hardware, frame filtering in hardware, or TSO on VLAN, @@ -603,16 +592,12 @@ Destroy the specified network pseudo-device. Another name for the .Cm create parameter. -Included for -.Tn Solaris -compatibility. +Included for Solaris compatibility. .It Cm unplumb Another name for the .Cm destroy parameter. -Included for -.Tn Solaris -compatibility. +Included for Solaris compatibility. .It Cm metric Ar n Set the routing metric of the interface to .Ar n , @@ -1930,9 +1915,7 @@ string or as a string of hexadecimal digits preceded b .Ql 0x . For maximum portability, hex keys are recommended; the mapping of text keys to WEP encryption is usually driver-specific. -In particular, the -.Tn Windows -drivers do this mapping differently to +In particular, the Windows drivers do this mapping differently to .Fx . A key may be cleared by setting it to .Ql - . From owner-svn-src-stable@freebsd.org Wed Nov 4 14:12:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55C4945DB32; Wed, 4 Nov 2020 14:12:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CR7rt1dqQz3Y2p; Wed, 4 Nov 2020 14:12:30 +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 01C91EC2E; Wed, 4 Nov 2020 14:12:30 +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 0A4ECTbZ017054; Wed, 4 Nov 2020 14:12:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A4ECTvo017052; Wed, 4 Nov 2020 14:12:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202011041412.0A4ECTvo017052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Nov 2020 14:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367329 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 367329 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 14:12:30 -0000 Author: mav Date: Wed Nov 4 14:12:29 2020 New Revision: 367329 URL: https://svnweb.freebsd.org/changeset/base/367329 Log: MFC r367109, r367113: Print NVMe controller capabilities in verbose dmesg. Those values are not reported in controller identification, while sometimes interesting for development and debugging. Modified: stable/12/sys/dev/nvme/nvme.h stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.h ============================================================================== --- stable/12/sys/dev/nvme/nvme.h Wed Nov 4 13:43:34 2020 (r367328) +++ stable/12/sys/dev/nvme/nvme.h Wed Nov 4 14:12:29 2020 (r367329) @@ -84,6 +84,8 @@ #define NVME_CAP_HI_REG_DSTRD_MASK (0xF) #define NVME_CAP_HI_REG_NSSRS_SHIFT (4) #define NVME_CAP_HI_REG_NSSRS_MASK (0x1) +#define NVME_CAP_HI_REG_CSS_SHIFT (5) +#define NVME_CAP_HI_REG_CSS_MASK (0xff) #define NVME_CAP_HI_REG_CSS_NVM_SHIFT (5) #define NVME_CAP_HI_REG_CSS_NVM_MASK (0x1) #define NVME_CAP_HI_REG_BPS_SHIFT (13) @@ -98,12 +100,22 @@ #define NVME_CAP_HI_REG_CMBS_MASK (0x1) #define NVME_CAP_HI_DSTRD(x) \ (((x) >> NVME_CAP_HI_REG_DSTRD_SHIFT) & NVME_CAP_HI_REG_DSTRD_MASK) +#define NVME_CAP_HI_NSSRS(x) \ + (((x) >> NVME_CAP_HI_REG_NSSRS_SHIFT) & NVME_CAP_HI_REG_NSSRS_MASK) +#define NVME_CAP_HI_CSS(x) \ + (((x) >> NVME_CAP_HI_REG_CSS_SHIFT) & NVME_CAP_HI_REG_CSS_MASK) #define NVME_CAP_HI_CSS_NVM(x) \ (((x) >> NVME_CAP_HI_REG_CSS_NVM_SHIFT) & NVME_CAP_HI_REG_CSS_NVM_MASK) +#define NVME_CAP_HI_BPS(x) \ + (((x) >> NVME_CAP_HI_REG_BPS_SHIFT) & NVME_CAP_HI_REG_BPS_MASK) #define NVME_CAP_HI_MPSMIN(x) \ (((x) >> NVME_CAP_HI_REG_MPSMIN_SHIFT) & NVME_CAP_HI_REG_MPSMIN_MASK) #define NVME_CAP_HI_MPSMAX(x) \ (((x) >> NVME_CAP_HI_REG_MPSMAX_SHIFT) & NVME_CAP_HI_REG_MPSMAX_MASK) +#define NVME_CAP_HI_PMRS(x) \ + (((x) >> NVME_CAP_HI_REG_PMRS_SHIFT) & NVME_CAP_HI_REG_PMRS_MASK) +#define NVME_CAP_HI_CMBS(x) \ + (((x) >> NVME_CAP_HI_REG_CMBS_SHIFT) & NVME_CAP_HI_REG_CMBS_MASK) #define NVME_CC_REG_EN_SHIFT (0) #define NVME_CC_REG_EN_MASK (0x1) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Nov 4 13:43:34 2020 (r367328) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Nov 4 14:12:29 2020 (r367329) @@ -1329,7 +1329,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, de struct make_dev_args md_args; uint32_t cap_lo; uint32_t cap_hi; - uint32_t to; + uint32_t to, vs; uint8_t mpsmin; int status, timeout_period; @@ -1339,14 +1339,41 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, de if (bus_get_domain(dev, &ctrlr->domain) != 0) ctrlr->domain = 0; + cap_lo = nvme_mmio_read_4(ctrlr, cap_lo); + if (bootverbose) { + device_printf(dev, "CapLo: 0x%08x: MQES %u%s%s%s%s, TO %u\n", + cap_lo, NVME_CAP_LO_MQES(cap_lo), + NVME_CAP_LO_CQR(cap_lo) ? ", CQR" : "", + NVME_CAP_LO_AMS(cap_lo) ? ", AMS" : "", + (NVME_CAP_LO_AMS(cap_lo) & 0x1) ? " WRRwUPC" : "", + (NVME_CAP_LO_AMS(cap_lo) & 0x2) ? " VS" : "", + NVME_CAP_LO_TO(cap_lo)); + } cap_hi = nvme_mmio_read_4(ctrlr, cap_hi); + if (bootverbose) { + device_printf(dev, "CapHi: 0x%08x: DSTRD %u%s, CSS %x%s, " + "MPSMIN %u, MPSMAX %u %s%s\n", cap_hi, + NVME_CAP_HI_DSTRD(cap_hi), + NVME_CAP_HI_NSSRS(cap_lo) ? ", NSSRS" : "", + NVME_CAP_HI_CSS(cap_hi), + NVME_CAP_HI_BPS(cap_lo) ? ", BPS" : "", + NVME_CAP_HI_MPSMIN(cap_hi), + NVME_CAP_HI_MPSMAX(cap_hi), + NVME_CAP_HI_PMRS(cap_lo) ? ", PMRS" : "", + NVME_CAP_HI_CMBS(cap_lo) ? ", CMBS" : ""); + } + if (bootverbose) { + vs = nvme_mmio_read_4(ctrlr, vs); + device_printf(dev, "Version: 0x%08x: %d.%d\n", vs, + NVME_MAJOR(vs), NVME_MINOR(vs)); + } + ctrlr->dstrd = NVME_CAP_HI_DSTRD(cap_hi) + 2; mpsmin = NVME_CAP_HI_MPSMIN(cap_hi); ctrlr->min_page_size = 1 << (12 + mpsmin); /* Get ready timeout value from controller, in units of 500ms. */ - cap_lo = nvme_mmio_read_4(ctrlr, cap_lo); to = NVME_CAP_LO_TO(cap_lo) + 1; ctrlr->ready_timeout_in_ms = to * 500; From owner-svn-src-stable@freebsd.org Wed Nov 4 14:13:33 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B107A45DF07; Wed, 4 Nov 2020 14:13:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CR7t519X3z3YCS; Wed, 4 Nov 2020 14:13:33 +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 DD3ACEE17; Wed, 4 Nov 2020 14:13:30 +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 0A4EDUDW017271; Wed, 4 Nov 2020 14:13:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A4EDUt0017268; Wed, 4 Nov 2020 14:13:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202011041413.0A4EDUt0017268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Nov 2020 14:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367330 - stable/12/sbin/nvmecontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sbin/nvmecontrol X-SVN-Commit-Revision: 367330 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 14:13:33 -0000 Author: mav Date: Wed Nov 4 14:13:29 2020 New Revision: 367330 URL: https://svnweb.freebsd.org/changeset/base/367330 Log: MFC r367112: Use proper variable for device path. It seems *-passthru commands were broken from the day one, since the device path is fetched into opt.dev variable and not left in argv[optind]. The other three wrong argv[optind] instances are just in error messages. Modified: stable/12/sbin/nvmecontrol/ns.c stable/12/sbin/nvmecontrol/passthru.c stable/12/sbin/nvmecontrol/reset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/ns.c ============================================================================== --- stable/12/sbin/nvmecontrol/ns.c Wed Nov 4 14:12:29 2020 (r367329) +++ stable/12/sbin/nvmecontrol/ns.c Wed Nov 4 14:13:29 2020 (r367330) @@ -605,7 +605,7 @@ nscreate(const struct cmd *f, int argc, char *argv[]) pt.len = sizeof(struct nvme_namespace_data); pt.is_read = 0; /* passthrough writes data to ctrlr */ if ((result = ioctl(fd, NVME_PASSTHROUGH_CMD, &pt)) < 0) - errx(1, "ioctl request to %s failed: %d", argv[optind], result); + errx(1, "ioctl request to %s failed: %d", create_opt.dev, result); if (nvme_completion_is_error(&pt.cpl)) { errx(1, "namespace creation failed: %s", @@ -822,7 +822,7 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) pt.len = sizeof(clist); if ((result = ioctl(fd, NVME_PASSTHROUGH_CMD, &pt)) < 0) - errx(1, "ioctl request to %s failed: %d", argv[optind], result); + errx(1, "ioctl request to %s failed: %d", detach_opt.dev, result); if (nvme_completion_is_error(&pt.cpl)) { errx(1, "namespace detach failed: %s", Modified: stable/12/sbin/nvmecontrol/passthru.c ============================================================================== --- stable/12/sbin/nvmecontrol/passthru.c Wed Nov 4 14:12:29 2020 (r367329) +++ stable/12/sbin/nvmecontrol/passthru.c Wed Nov 4 14:13:29 2020 (r367330) @@ -164,7 +164,7 @@ passthru(const struct cmd *f, int argc, char *argv[]) if (arg_parse(argc, argv, f)) return; - open_dev(argv[optind], &fd, 1, 1); + open_dev(opt.dev, &fd, 1, 1); if (opt.read && opt.write) errx(1, "need exactly one of --read or --write"); Modified: stable/12/sbin/nvmecontrol/reset.c ============================================================================== --- stable/12/sbin/nvmecontrol/reset.c Wed Nov 4 14:12:29 2020 (r367329) +++ stable/12/sbin/nvmecontrol/reset.c Wed Nov 4 14:13:29 2020 (r367330) @@ -70,7 +70,7 @@ reset(const struct cmd *f, int argc, char *argv[]) free(path); if (ioctl(fd, NVME_RESET_CONTROLLER) < 0) - err(1, "reset request to %s failed", argv[optind]); + err(1, "reset request to %s failed", opt.dev); exit(0); } From owner-svn-src-stable@freebsd.org Wed Nov 4 17:22:13 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 489CF462805; Wed, 4 Nov 2020 17:22:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRD3n18j4z42f5; Wed, 4 Nov 2020 17:22:13 +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 0B0D310FC7; Wed, 4 Nov 2020 17:22:13 +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 0A4HMCqv035491; Wed, 4 Nov 2020 17:22:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A4HMC0a035490; Wed, 4 Nov 2020 17:22:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011041722.0A4HMC0a035490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 4 Nov 2020 17:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367336 - stable/12/sys/geom/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/geom/eli X-SVN-Commit-Revision: 367336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 17:22:13 -0000 Author: jhb Date: Wed Nov 4 17:22:12 2020 New Revision: 367336 URL: https://svnweb.freebsd.org/changeset/base/367336 Log: MFC 359263: Use the newer EINTEGRITY error when authentication fails. GELI used to fail with EINVAL when a read request spanned a disk sector whose contents did not match the sector's authentication tag. The recently-added EINTEGRITY more closely matches to the error in this case. Modified: stable/12/sys/geom/eli/g_eli_integrity.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/12/sys/geom/eli/g_eli_integrity.c Wed Nov 4 16:42:20 2020 (r367335) +++ stable/12/sys/geom/eli/g_eli_integrity.c Wed Nov 4 17:22:12 2020 (r367336) @@ -231,7 +231,7 @@ g_eli_auth_read_done(struct cryptop *crp) bp->bio_driver2 = NULL; if (bp->bio_error != 0) { if (bp->bio_error == -1) - bp->bio_error = EINVAL; + bp->bio_error = EINTEGRITY; else { G_ELI_LOGREQ(0, bp, "Crypto READ request failed (error=%d).", From owner-svn-src-stable@freebsd.org Thu Nov 5 02:57:40 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D647D4488BA; Thu, 5 Nov 2020 02:57: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRSqm5K25z4gGm; Thu, 5 Nov 2020 02:57:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AFA417EE3; Thu, 5 Nov 2020 02:57:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A52vec9086638; Thu, 5 Nov 2020 02:57:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A52veoR086637; Thu, 5 Nov 2020 02:57:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202011050257.0A52veoR086637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Nov 2020 02:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367359 - stable/12/sys/dev/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/pci X-SVN-Commit-Revision: 367359 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 02:57:40 -0000 Author: mav Date: Thu Nov 5 02:57:40 2020 New Revision: 367359 URL: https://svnweb.freebsd.org/changeset/base/367359 Log: MFC r364038: Enable hw.pci.enable_aspm tunable by default. While effects on power saving is only a guess, effects on hot-plug are clearly visible. Lets try to enable it and see what happen. Modified: stable/12/sys/dev/pci/pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pci.c ============================================================================== --- stable/12/sys/dev/pci/pci.c Thu Nov 5 02:12:33 2020 (r367358) +++ stable/12/sys/dev/pci/pci.c Thu Nov 5 02:57:40 2020 (r367359) @@ -411,7 +411,7 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); -int pci_enable_aspm; +int pci_enable_aspm = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_aspm, CTLFLAG_RDTUN, &pci_enable_aspm, 0, "Enable support for PCIe Active State Power Management"); From owner-svn-src-stable@freebsd.org Thu Nov 5 11:11:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E820464A27; Thu, 5 Nov 2020 11:11:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRgnz1ZpYz4WBr; Thu, 5 Nov 2020 11:11:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2944C13013; Thu, 5 Nov 2020 11:11:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5BBpqh089898; Thu, 5 Nov 2020 11:11:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5BBpgr089897; Thu, 5 Nov 2020 11:11:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051111.0A5BBpgr089897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 11:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367366 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 367366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 11:11:51 -0000 Author: bz Date: Thu Nov 5 11:11:50 2020 New Revision: 367366 URL: https://svnweb.freebsd.org/changeset/base/367366 Log: MFC r364305: For consistency and to avoid any problems getting past the 31bit boundry change the last two IF_Mbps(2500) and additionally one IF_Mbps(5000) to ULL as well. Modified: stable/12/sys/net/if_media.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_media.h ============================================================================== --- stable/12/sys/net/if_media.h Thu Nov 5 09:55:55 2020 (r367365) +++ stable/12/sys/net/if_media.h Thu Nov 5 11:11:50 2020 (r367366) @@ -807,9 +807,9 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_10G_KR, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_10G_CR1, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_20G_KR2, IF_Gbps(20ULL) }, \ - { IFM_ETHER | IFM_2500_KX, IF_Mbps(2500) }, \ - { IFM_ETHER | IFM_2500_T, IF_Mbps(2500) }, \ - { IFM_ETHER | IFM_5000_T, IF_Mbps(5000) }, \ + { IFM_ETHER | IFM_2500_KX, IF_Mbps(2500ULL) }, \ + { IFM_ETHER | IFM_2500_T, IF_Mbps(2500ULL) }, \ + { IFM_ETHER | IFM_5000_T, IF_Mbps(5000ULL) }, \ { IFM_ETHER | IFM_50G_PCIE, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_25G_PCIE, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_1000_SGMII, IF_Mbps(1000) }, \ From owner-svn-src-stable@freebsd.org Thu Nov 5 11:19:32 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A9A6464A69; Thu, 5 Nov 2020 11:19:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRgyr2ZSDz4WXg; Thu, 5 Nov 2020 11:19:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4165612C7F; Thu, 5 Nov 2020 11:19:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5BJWqG093291; Thu, 5 Nov 2020 11:19:32 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5BJWdo093290; Thu, 5 Nov 2020 11:19:32 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051119.0A5BJWdo093290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 11:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367367 - stable/12/sys/cam X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/cam X-SVN-Commit-Revision: 367367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 11:19:32 -0000 Author: bz Date: Thu Nov 5 11:19:31 2020 New Revision: 367367 URL: https://svnweb.freebsd.org/changeset/base/367367 Log: MFC r365333: cam_sim: harmonize code related to acquiring a mtx cam_sim_free(), cam_sim_release(), and cam_sim_hold() all assign a mtx variable during declaration and then if NULL or the mtx is held may re-asign the variable and/or acquire/release a lock. Harmonize the code, avoiding double assignments and make it look the same for all three function (with cam_sim_free() not needing an extra case). No functional changes intended. Modified: stable/12/sys/cam/cam_sim.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_sim.c ============================================================================== --- stable/12/sys/cam/cam_sim.c Thu Nov 5 11:11:50 2020 (r367366) +++ stable/12/sys/cam/cam_sim.c Thu Nov 5 11:19:31 2020 (r367367) @@ -103,14 +103,15 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_fun void cam_sim_free(struct cam_sim *sim, int free_devq) { - struct mtx *mtx = sim->mtx; + struct mtx *mtx; int error; - if (mtx) { - mtx_assert(mtx, MA_OWNED); - } else { + if (sim->mtx == NULL) { mtx = &cam_sim_free_mtx; mtx_lock(mtx); + } else { + mtx = sim->mtx; + mtx_assert(mtx, MA_OWNED); } sim->refcount--; if (sim->refcount > 0) { @@ -118,7 +119,7 @@ cam_sim_free(struct cam_sim *sim, int free_devq) KASSERT(error == 0, ("invalid error value for msleep(9)")); } KASSERT(sim->refcount == 0, ("sim->refcount == 0")); - if (sim->mtx == NULL) + if (mtx == &cam_sim_free_mtx) /* sim->mtx == NULL */ mtx_unlock(mtx); if (free_devq) @@ -129,17 +130,16 @@ cam_sim_free(struct cam_sim *sim, int free_devq) void cam_sim_release(struct cam_sim *sim) { - struct mtx *mtx = sim->mtx; + struct mtx *mtx; - if (mtx) { - if (!mtx_owned(mtx)) - mtx_lock(mtx); - else - mtx = NULL; - } else { + if (sim->mtx == NULL) mtx = &cam_sim_free_mtx; + else if (!mtx_owned(sim->mtx)) + mtx = sim->mtx; + else + mtx = NULL; /* We hold the lock. */ + if (mtx) mtx_lock(mtx); - } KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); sim->refcount--; if (sim->refcount == 0) @@ -151,17 +151,16 @@ cam_sim_release(struct cam_sim *sim) void cam_sim_hold(struct cam_sim *sim) { - struct mtx *mtx = sim->mtx; + struct mtx *mtx; - if (mtx) { - if (!mtx_owned(mtx)) - mtx_lock(mtx); - else - mtx = NULL; - } else { + if (sim->mtx == NULL) mtx = &cam_sim_free_mtx; + else if (!mtx_owned(sim->mtx)) + mtx = sim->mtx; + else + mtx = NULL; /* We hold the lock. */ + if (mtx) mtx_lock(mtx); - } KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); sim->refcount++; if (mtx) From owner-svn-src-stable@freebsd.org Thu Nov 5 11:33:24 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B741465127; Thu, 5 Nov 2020 11:33:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRhGr0Flgz4XLw; Thu, 5 Nov 2020 11:33:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFEFF1360B; Thu, 5 Nov 2020 11:33:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5BXNvR005463; Thu, 5 Nov 2020 11:33:23 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5BXNjg005462; Thu, 5 Nov 2020 11:33:23 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051133.0A5BXNjg005462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 11:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367369 - stable/12/sys/dev/usb/storage X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/dev/usb/storage X-SVN-Commit-Revision: 367369 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 11:33:24 -0000 Author: bz Date: Thu Nov 5 11:33:23 2020 New Revision: 367369 URL: https://svnweb.freebsd.org/changeset/base/367369 Log: MFC r365334: umass: fix a cam_sim leak in error case While debugging a hang I noticed that in case of error in umass_cam_attach_sim() we miss a cam_sim_free() call. Added that to not leak resources. Modified: stable/12/sys/dev/usb/storage/umass.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/storage/umass.c ============================================================================== --- stable/12/sys/dev/usb/storage/umass.c Thu Nov 5 11:24:45 2020 (r367368) +++ stable/12/sys/dev/usb/storage/umass.c Thu Nov 5 11:33:23 2020 (r367369) @@ -2105,6 +2105,7 @@ umass_cam_attach_sim(struct umass_softc *sc) if (xpt_bus_register(sc->sc_sim, sc->sc_dev, sc->sc_unit) != CAM_SUCCESS) { + cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); mtx_unlock(&sc->sc_mtx); return (ENOMEM); } From owner-svn-src-stable@freebsd.org Thu Nov 5 11:37:16 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 676D1465480; Thu, 5 Nov 2020 11:37:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRhMH6YK0z4XrV; Thu, 5 Nov 2020 11:37:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CB8B131D0; Thu, 5 Nov 2020 11:37:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5BbFjN005720; Thu, 5 Nov 2020 11:37:15 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5BbFoG005719; Thu, 5 Nov 2020 11:37:15 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051137.0A5BbFoG005719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 11:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367370 - stable/12/sys/dev/usb/storage X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/dev/usb/storage X-SVN-Commit-Revision: 367370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 11:37:16 -0000 Author: bz Date: Thu Nov 5 11:37:14 2020 New Revision: 367370 URL: https://svnweb.freebsd.org/changeset/base/367370 Log: MFC r365335: umass: enhance debugging Investigating a hang I found having some more error information available would be helpful, so be more verbose and also tell cam/xpt status in case of error/panic. Modified: stable/12/sys/dev/usb/storage/umass.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/storage/umass.c ============================================================================== --- stable/12/sys/dev/usb/storage/umass.c Thu Nov 5 11:33:23 2020 (r367369) +++ stable/12/sys/dev/usb/storage/umass.c Thu Nov 5 11:37:14 2020 (r367370) @@ -2074,6 +2074,7 @@ static int umass_cam_attach_sim(struct umass_softc *sc) { struct cam_devq *devq; /* Per device Queue */ + cam_status status; /* * A HBA is attached to the CAM layer. @@ -2102,11 +2103,12 @@ umass_cam_attach_sim(struct umass_softc *sc) } mtx_lock(&sc->sc_mtx); - - if (xpt_bus_register(sc->sc_sim, sc->sc_dev, - sc->sc_unit) != CAM_SUCCESS) { + status = xpt_bus_register(sc->sc_sim, sc->sc_dev, sc->sc_unit); + if (status != CAM_SUCCESS) { cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); mtx_unlock(&sc->sc_mtx); + printf("%s: xpt_bus_register failed with status %#x\n", + __func__, status); return (ENOMEM); } mtx_unlock(&sc->sc_mtx); @@ -2132,14 +2134,22 @@ umass_cam_attach(struct umass_softc *sc) static void umass_cam_detach_sim(struct umass_softc *sc) { + cam_status status; + if (sc->sc_sim != NULL) { - if (xpt_bus_deregister(cam_sim_path(sc->sc_sim))) { + status = xpt_bus_deregister(cam_sim_path(sc->sc_sim)); + if (status == CAM_REQ_CMP) { /* accessing the softc is not possible after this */ sc->sc_sim->softc = NULL; + DPRINTF(sc, UDMASS_SCSI, "%s: %s:%d:%d caling " + "cam_sim_free sim %p refc %u mtx %p\n", + __func__, sc->sc_name, cam_sim_path(sc->sc_sim), + sc->sc_unit, sc->sc_sim, + sc->sc_sim->refcount, sc->sc_sim->mtx); cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); } else { - panic("%s: CAM layer is busy\n", - sc->sc_name); + panic("%s: %s: CAM layer is busy: %#x\n", + __func__, sc->sc_name, status); } sc->sc_sim = NULL; } From owner-svn-src-stable@freebsd.org Thu Nov 5 11:56:49 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F151046598D; Thu, 5 Nov 2020 11:56:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRhns5SXJz4Yrd; Thu, 5 Nov 2020 11:56:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE6E513562; Thu, 5 Nov 2020 11:56:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5BunIC018265; Thu, 5 Nov 2020 11:56:49 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5BunBG018264; Thu, 5 Nov 2020 11:56:49 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051156.0A5BunBG018264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 11:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367371 - stable/12/sys/dev/iwm X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/dev/iwm X-SVN-Commit-Revision: 367371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 11:56:50 -0000 Author: bz Date: Thu Nov 5 11:56:49 2020 New Revision: 367371 URL: https://svnweb.freebsd.org/changeset/base/367371 Log: MFC r365633: iwm: fix regression from r365419 (ieee80211_media_change()) In r365419 ieee80211_media_change() callers were updated to not longer act on the obselete ENETRESET return code. While in the old days iwm has done a stop/init cycle in these cases, this was not executed since r193340. As a consequence simplify iwm code as well by passing ieee80211_media_change() right to ieee80211_vap_attach() as there is no more need for a local implementation. The actual problem was fixed in stable/12 since r365608; this just reduces changes to HEAD. PR: 248955 Modified: stable/12/sys/dev/iwm/if_iwm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/12/sys/dev/iwm/if_iwm.c Thu Nov 5 11:37:14 2020 (r367370) +++ stable/12/sys/dev/iwm/if_iwm.c Thu Nov 5 11:56:49 2020 (r367371) @@ -354,7 +354,6 @@ static struct ieee80211_node * static uint8_t iwm_rate_from_ucode_rate(uint32_t); static int iwm_rate2ridx(struct iwm_softc *, uint8_t); static void iwm_setrates(struct iwm_softc *, struct iwm_node *, int); -static int iwm_media_change(struct ifnet *); static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void iwm_endscan_cb(void *, int); static int iwm_send_bt_init_conf(struct iwm_softc *); @@ -4412,31 +4411,6 @@ iwm_setrates(struct iwm_softc *sc, struct iwm_node *in } } -static int -iwm_media_change(struct ifnet *ifp) -{ -#if 0 - struct ieee80211vap *vap = ifp->if_softc; - struct ieee80211com *ic = vap->iv_ic; - struct iwm_softc *sc = ic->ic_softc; -#endif - int error; - - error = ieee80211_media_change(ifp); - if (error != 0) - return (error); - -#if 0 - IWM_LOCK(sc); - if (ic->ic_nrunning > 0) { - iwm_stop(sc); - iwm_init(sc); - } - IWM_UNLOCK(sc); -#endif - return (0); -} - static void iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap) { @@ -6431,8 +6405,8 @@ iwm_vap_create(struct ieee80211com *ic, const char nam ieee80211_ratectl_init(vap); /* Complete setup. */ - ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, - mac); + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status, mac); ic->ic_opmode = opmode; return vap; From owner-svn-src-stable@freebsd.org Thu Nov 5 12:08:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0778D46690F; Thu, 5 Nov 2020 12:08:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRj2v6cqdz4b7L; Thu, 5 Nov 2020 12:08:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5A6C1384B; Thu, 5 Nov 2020 12:08:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5C87Q0024518; Thu, 5 Nov 2020 12:08:07 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5C85uS024503; Thu, 5 Nov 2020 12:08:05 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051208.0A5C85uS024503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367373 - in stable/12/sys: dev/ath dev/bwn dev/iwn dev/malo dev/mwl net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in stable/12/sys: dev/ath dev/bwn dev/iwn dev/malo dev/mwl net80211 X-SVN-Commit-Revision: 367373 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:08:08 -0000 Author: bz Date: Thu Nov 5 12:08:04 2020 New Revision: 367373 URL: https://svnweb.freebsd.org/changeset/base/367373 Log: MFC r366112: Provide MS() and SM() macros for 80211 and wireless drivers. We have (two versions) of MS() and SM() macros which we use throughout the wireless code. Change all but three places (ath_hal, rtwn, and rsu) to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK() macros. Also change one internal case using both _S and _M instead of just _S away from _M (one of the reasons rtwn and rsu were not changed). This was done semi-mechanically. No functional changes intended. Modified: stable/12/sys/dev/ath/if_ath_tx.c stable/12/sys/dev/ath/if_ath_tx_ht.c stable/12/sys/dev/bwn/if_bwn.c stable/12/sys/dev/iwn/if_iwn.c stable/12/sys/dev/malo/if_malo.c stable/12/sys/dev/mwl/if_mwl.c stable/12/sys/net80211/ieee80211_freebsd.c stable/12/sys/net80211/ieee80211_ht.c stable/12/sys/net80211/ieee80211_ioctl.c stable/12/sys/net80211/ieee80211_output.c stable/12/sys/net80211/ieee80211_regdomain.c stable/12/sys/net80211/ieee80211_sta.c stable/12/sys/net80211/ieee80211_superg.c stable/12/sys/net80211/ieee80211_var.h stable/12/sys/net80211/ieee80211_vht.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ath/if_ath_tx.c ============================================================================== --- stable/12/sys/dev/ath/if_ath_tx.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/ath/if_ath_tx.c Thu Nov 5 12:08:04 2020 (r367373) @@ -2598,7 +2598,6 @@ ieee80211_is_action(struct ieee80211_frame *wh) return 1; } -#define MS(_v, _f) (((_v) & _f) >> _f##_S) /* * Return an alternate TID for ADDBA request frames. * @@ -2637,11 +2636,10 @@ ath_tx_action_frame_override_queue(struct ath_softc *s /* Extract TID, return it */ baparamset = le16toh(ia->rq_baparamset); - *tid = (int) MS(baparamset, IEEE80211_BAPS_TID); + *tid = (int) _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); return 1; } -#undef MS /* Per-node software queue operations */ Modified: stable/12/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- stable/12/sys/dev/ath/if_ath_tx_ht.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/ath/if_ath_tx_ht.c Thu Nov 5 12:08:04 2020 (r367373) @@ -406,7 +406,6 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf, uint16_t pktlen, int is_first) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) const HAL_RATE_TABLE *rt = sc->sc_currates; struct ieee80211_node *ni = first_bf->bf_node; struct ieee80211vap *vap = ni->ni_vap; @@ -421,7 +420,8 @@ ath_compute_num_delims(struct ath_softc *sc, struct at /* * Get the advertised density from the node. */ - peer_mpdudensity = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + peer_mpdudensity = + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); /* * vap->iv_ampdu_density is a net80211 value, rather than the actual @@ -528,7 +528,6 @@ ath_compute_num_delims(struct ath_softc *sc, struct at __func__, pktlen, minlen, rix, rc, width, half_gi, ndelim); return ndelim; -#undef MS } /* @@ -568,7 +567,6 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 { struct ieee80211vap *vap = ni->ni_vap; -#define MS(_v, _f) (((_v) & _f) >> _f##_S) int amin = ATH_AGGR_MAXSIZE; int i; @@ -583,8 +581,8 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 * Check the HTCAP field for the maximum size the node has * negotiated. If it's smaller than what we have, cap it there. */ - amin = MIN(amin, ath_rx_ampdu_to_byte(MS(ni->ni_htparam, - IEEE80211_HTCAP_MAXRXAMPDU))); + amin = MIN(amin, ath_rx_ampdu_to_byte( + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU))); for (i = 0; i < ATH_RC_NUM; i++) { if (bf->bf_state.bfs_rc[i].tries == 0) @@ -598,11 +596,10 @@ ath_get_aggr_limit(struct ath_softc *sc, struct ieee80 __func__, sc->sc_aggr_limit, vap->iv_ampdu_limit, - MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), + _IEEE80211_MASKSHIFT(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU), amin); return amin; -#undef MS } /* Modified: stable/12/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/12/sys/dev/bwn/if_bwn.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/bwn/if_bwn.c Thu Nov 5 12:08:04 2020 (r367373) @@ -2122,7 +2122,6 @@ bwn_stop(struct bwn_softc *sc) static void bwn_wme_clear(struct bwn_softc *sc) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct wmeParams *p; unsigned int i; @@ -2137,29 +2136,37 @@ bwn_wme_clear(struct bwn_softc *sc) p->wmep_txopLimit = 0; p->wmep_aifsn = 2; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x0001, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMAX); break; case BWN_WME_VIDEO: p->wmep_txopLimit = 0; p->wmep_aifsn = 2; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x0001, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMAX); break; case BWN_WME_BESTEFFORT: p->wmep_txopLimit = 0; p->wmep_aifsn = 3; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x03ff, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x03ff, WME_PARAM_LOGCWMAX); break; case BWN_WME_BACKGROUND: p->wmep_txopLimit = 0; p->wmep_aifsn = 7; /* XXX FIXME: log2(cwmin) */ - p->wmep_logcwmin = MS(0x0001, WME_PARAM_LOGCWMIN); - p->wmep_logcwmax = MS(0x03ff, WME_PARAM_LOGCWMAX); + p->wmep_logcwmin = + _IEEE80211_MASKSHIFT(0x0001, WME_PARAM_LOGCWMIN); + p->wmep_logcwmax = + _IEEE80211_MASKSHIFT(0x03ff, WME_PARAM_LOGCWMAX); break; default: KASSERT(0 == 1, ("%s:%d: fail", __func__, __LINE__)); @@ -4612,14 +4619,13 @@ static void bwn_wme_loadparams(struct bwn_mac *mac, const struct wmeParams *p, uint16_t shm_offset) { -#define SM(_v, _f) (((_v) << _f##_S) & _f) struct bwn_softc *sc = mac->mac_sc; uint16_t params[BWN_NR_WMEPARAMS]; int slot, tmp; unsigned int i; slot = BWN_READ_2(mac, BWN_RNG) & - SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); memset(¶ms, 0, sizeof(params)); @@ -4628,9 +4634,12 @@ bwn_wme_loadparams(struct bwn_mac *mac, p->wmep_logcwmin, p->wmep_logcwmax, p->wmep_aifsn); params[BWN_WMEPARAM_TXOP] = p->wmep_txopLimit * 32; - params[BWN_WMEPARAM_CWMIN] = SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); - params[BWN_WMEPARAM_CWMAX] = SM(p->wmep_logcwmax, WME_PARAM_LOGCWMAX); - params[BWN_WMEPARAM_CWCUR] = SM(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + params[BWN_WMEPARAM_CWMIN] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); + params[BWN_WMEPARAM_CWMAX] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmax, WME_PARAM_LOGCWMAX); + params[BWN_WMEPARAM_CWCUR] = + _IEEE80211_SHIFTMASK(p->wmep_logcwmin, WME_PARAM_LOGCWMIN); params[BWN_WMEPARAM_AIFS] = p->wmep_aifsn; params[BWN_WMEPARAM_BSLOTS] = slot; params[BWN_WMEPARAM_REGGAP] = slot + p->wmep_aifsn; Modified: stable/12/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/12/sys/dev/iwn/if_iwn.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/iwn/if_iwn.c Thu Nov 5 12:08:04 2020 (r367373) @@ -7439,7 +7439,6 @@ static int iwn_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap, int baparamset, int batimeout, int baseqctl) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct iwn_softc *sc = ni->ni_ic->ic_softc; struct iwn_ops *ops = &sc->ops; struct iwn_node *wn = (void *)ni; @@ -7450,8 +7449,8 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct i DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); - tid = MS(le16toh(baparamset), IEEE80211_BAPS_TID); - ssn = MS(le16toh(baseqctl), IEEE80211_BASEQ_START); + tid = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_TID); + ssn = _IEEE80211_MASKSHIFT(le16toh(baseqctl), IEEE80211_BASEQ_START); if (wn->id == IWN_ID_UNDEFINED) return (ENOENT); @@ -7468,7 +7467,6 @@ iwn_ampdu_rx_start(struct ieee80211_node *ni, struct i if (error != 0) return error; return sc->sc_ampdu_rx_start(ni, rap, baparamset, batimeout, baseqctl); -#undef MS } /* Modified: stable/12/sys/dev/malo/if_malo.c ============================================================================== --- stable/12/sys/dev/malo/if_malo.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/malo/if_malo.c Thu Nov 5 12:08:04 2020 (r367373) @@ -918,10 +918,6 @@ malo_fix2rate(int fix_rate) return (fix_rate < nitems(rates) ? rates[fix_rate] : 0); } -/* idiomatic shorthands: MS = mask+shift, SM = shift+mask */ -#define MS(v,x) (((v) & x) >> x##_S) -#define SM(v,x) (((v) << x##_S) & x) - /* * Process completed xmit descriptors from the specified queue. */ @@ -962,7 +958,8 @@ malo_tx_processq(struct malo_softc *sc, struct malo_tx status = le32toh(ds->status); if (status & MALO_TXD_STATUS_OK) { uint16_t format = le16toh(ds->format); - uint8_t txant = MS(format, MALO_TXD_ANTENNA); + uint8_t txant =_IEEE80211_MASKSHIFT( + format, MALO_TXD_ANTENNA); sc->malo_stats.mst_ant_tx[txant]++; if (status & MALO_TXD_STATUS_OK_RETRY) Modified: stable/12/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/12/sys/dev/mwl/if_mwl.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/dev/mwl/if_mwl.c Thu Nov 5 12:08:04 2020 (r367373) @@ -83,10 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* idiomatic shorthands: MS = mask+shift, SM = shift+mask */ -#define MS(v,x) (((v) & x) >> x##_S) -#define SM(v,x) (((v) << x##_S) & x) - static struct ieee80211vap *mwl_vap_create(struct ieee80211com *, const char [IFNAMSIZ], int, enum ieee80211_opmode, int, const uint8_t [IEEE80211_ADDR_LEN], @@ -1230,8 +1226,8 @@ mwl_reset_vap(struct ieee80211vap *vap, int state) vap->iv_opmode == IEEE80211_M_MBSS || vap->iv_opmode == IEEE80211_M_IBSS)) { mwl_setapmode(vap, vap->iv_bss->ni_chan); - mwl_hal_setnprotmode(hvap, - MS(ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); + mwl_hal_setnprotmode(hvap, _IEEE80211_MASKSHIFT( + ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); return mwl_beacon_setup(vap); } return 0; @@ -1862,8 +1858,8 @@ mwl_beacon_update(struct ieee80211vap *vap, int item) mwl_updateslot(ic); break; case IEEE80211_BEACON_HTINFO: - mwl_hal_setnprotmode(hvap, - MS(ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); + mwl_hal_setnprotmode(hvap, _IEEE80211_MASKSHIFT( + ic->ic_curhtprotmode, IEEE80211_HTINFO_OPMODE)); break; case IEEE80211_BEACON_CAPS: case IEEE80211_BEACON_WME: @@ -3040,13 +3036,13 @@ mwl_calcformat(uint8_t rate, const struct ieee80211_no { uint16_t fmt; - fmt = SM(3, EAGLE_TXD_ANTENNA) + fmt = _IEEE80211_SHIFTMASK(3, EAGLE_TXD_ANTENNA) | (IEEE80211_IS_CHAN_HT40D(ni->ni_chan) ? EAGLE_TXD_EXTCHAN_LO : EAGLE_TXD_EXTCHAN_HI); if (rate & IEEE80211_RATE_MCS) { /* HT MCS */ fmt |= EAGLE_TXD_FORMAT_HT /* NB: 0x80 implicitly stripped from ucastrate */ - | SM(rate, EAGLE_TXD_RATE); + | _IEEE80211_SHIFTMASK(rate, EAGLE_TXD_RATE); /* XXX short/long GI may be wrong; re-check */ if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { fmt |= EAGLE_TXD_CHW_40 @@ -3059,7 +3055,8 @@ mwl_calcformat(uint8_t rate, const struct ieee80211_no } } else { /* legacy rate */ fmt |= EAGLE_TXD_FORMAT_LEGACY - | SM(mwl_cvtlegacyrate(rate), EAGLE_TXD_RATE) + | _IEEE80211_SHIFTMASK(mwl_cvtlegacyrate(rate), + EAGLE_TXD_RATE) | EAGLE_TXD_CHW_20 /* XXX iv_flags & IEEE80211_F_SHPREAMBLE? */ | (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE ? @@ -3360,7 +3357,8 @@ mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq * status = le32toh(ds->Status); if (status & EAGLE_TXD_STATUS_OK) { uint16_t Format = le16toh(ds->Format); - uint8_t txant = MS(Format, EAGLE_TXD_ANTENNA); + uint8_t txant = _IEEE80211_MASKSHIFT(Format, + EAGLE_TXD_ANTENNA); sc->sc_stats.mst_ant_tx[txant]++; if (status & EAGLE_TXD_STATUS_OK_RETRY) @@ -3369,7 +3367,8 @@ mwl_tx_processq(struct mwl_softc *sc, struct mwl_txq * sc->sc_stats.mst_tx_mretries++; if (txq->qnum >= MWL_WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; - ni->ni_txrate = MS(Format, EAGLE_TXD_RATE); + ni->ni_txrate = _IEEE80211_MASKSHIFT(Format, + EAGLE_TXD_RATE); if ((Format & EAGLE_TXD_FORMAT_HT) == 0) { ni->ni_txrate = mwl_cvtlegacyrix( ni->ni_txrate); @@ -3552,7 +3551,8 @@ mwl_recv_action(struct ieee80211_node *ni, const struc mwl_hal_setmimops(sc->sc_mh, ni->ni_macaddr, mps->am_control & IEEE80211_A_HT_MIMOPWRSAVE_ENA, - MS(mps->am_control, IEEE80211_A_HT_MIMOPWRSAVE_MODE)); + _IEEE80211_MASKSHIFT(mps->am_control, + IEEE80211_A_HT_MIMOPWRSAVE_MODE)); return 0; } else return sc->sc_recv_action(ni, wh, frm, efrm); @@ -3655,7 +3655,7 @@ mwl_addba_response(struct ieee80211_node *ni, struct i * we know resources are available because we * pre-allocated one before forming the request. */ - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); if (bufsiz == 0) bufsiz = IEEE80211_AGGR_BAWMAX; error = mwl_hal_bastream_create(MWL_VAP(vap)->mv_hvap, Modified: stable/12/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_freebsd.c Thu Nov 5 12:08:04 2020 (r367373) @@ -309,7 +309,6 @@ ieee80211_sysctl_vdetach(struct ieee80211vap *vap) } } -#define MS(_v, _f) (((_v) & _f##_M) >> _f##_S) int ieee80211_com_vincref(struct ieee80211vap *vap) { @@ -322,7 +321,8 @@ ieee80211_com_vincref(struct ieee80211vap *vap) return (ENETDOWN); } - if (MS(ostate, IEEE80211_COM_REF) == IEEE80211_COM_REF_MAX) { + if (_IEEE80211_MASKSHIFT(ostate, IEEE80211_COM_REF) == + IEEE80211_COM_REF_MAX) { atomic_subtract_32(&vap->iv_com_state, IEEE80211_COM_REF_ADD); return (EOVERFLOW); } @@ -337,7 +337,7 @@ ieee80211_com_vdecref(struct ieee80211vap *vap) ostate = atomic_fetchadd_32(&vap->iv_com_state, -IEEE80211_COM_REF_ADD); - KASSERT(MS(ostate, IEEE80211_COM_REF) != 0, + KASSERT(_IEEE80211_MASKSHIFT(ostate, IEEE80211_COM_REF) != 0, ("com reference counter underflow")); (void) ostate; @@ -350,10 +350,10 @@ ieee80211_com_vdetach(struct ieee80211vap *vap) sleep_time = msecs_to_ticks(250); atomic_set_32(&vap->iv_com_state, IEEE80211_COM_DETACHED); - while (MS(atomic_load_32(&vap->iv_com_state), IEEE80211_COM_REF) != 0) + while (_IEEE80211_MASKSHIFT(atomic_load_32(&vap->iv_com_state), + IEEE80211_COM_REF) != 0) pause("comref", sleep_time); } -#undef MS int ieee80211_node_dectestref(struct ieee80211_node *ni) Modified: stable/12/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ht.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_ht.c Thu Nov 5 12:08:04 2020 (r367373) @@ -54,10 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* define here, used throughout file */ -#define MS(_v, _f) (((_v) & _f) >> _f##_S) -#define SM(_v, _f) (((_v) << _f##_S) & _f) - const struct ieee80211_mcs_rates ieee80211_htrates[IEEE80211_HTRATE_MAXSIZE] = { { 13, 14, 27, 30 }, /* MCS 0 */ { 26, 29, 54, 60 }, /* MCS 1 */ @@ -700,7 +696,7 @@ ampdu_rx_start(struct ieee80211_node *ni, struct ieee8 int baparamset, int batimeout, int baseqctl) { struct ieee80211vap *vap = ni->ni_vap; - int bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + int bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); if (rap->rxa_flags & IEEE80211_AGGR_RUNNING) { /* @@ -712,12 +708,12 @@ ampdu_rx_start(struct ieee80211_node *ni, struct ieee8 ieee80211_ampdu_rx_init_rap(ni, rap); rap->rxa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); - rap->rxa_start = MS(baseqctl, IEEE80211_BASEQ_START); + rap->rxa_start = _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_START); rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; /* XXX this should be a configuration flag */ if ((vap->iv_htcaps & IEEE80211_HTC_RX_AMSDU_AMPDU) && - (MS(baparamset, IEEE80211_BAPS_AMSDU))) + (_IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU))) rap->rxa_flags |= IEEE80211_AGGR_AMSDU; else rap->rxa_flags &= ~IEEE80211_AGGR_AMSDU; @@ -1244,7 +1240,7 @@ ieee80211_recv_bar(struct ieee80211_node *ni, struct m } wh = mtod(m0, struct ieee80211_frame_bar *); /* XXX check basic BAR */ - tid = MS(le16toh(wh->i_ctl), IEEE80211_BAR_TID); + tid = _IEEE80211_MASKSHIFT(le16toh(wh->i_ctl), IEEE80211_BAR_TID); rap = &ni->ni_rx_ampdu[tid]; if ((rap->rxa_flags & IEEE80211_AGGR_XCHGPEND) == 0) { /* @@ -1624,7 +1620,7 @@ void ieee80211_htprot_update(struct ieee80211vap *vap, int protmode) { struct ieee80211com *ic = vap->iv_ic; -#define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE) +#define OPMODE(x) _IEEE80211_SHIFTMASK(x, IEEE80211_HTINFO_OPMODE) IEEE80211_LOCK(ic); /* track non-HT station presence */ @@ -1696,11 +1692,12 @@ htinfo_parse(struct ieee80211_node *ni, uint16_t w; ni->ni_htctlchan = htinfo->hi_ctrlchannel; - ni->ni_ht2ndchan = SM(htinfo->hi_byte1, IEEE80211_HTINFO_2NDCHAN); + ni->ni_ht2ndchan = _IEEE80211_SHIFTMASK(htinfo->hi_byte1, + IEEE80211_HTINFO_2NDCHAN); w = le16dec(&htinfo->hi_byte2); - ni->ni_htopmode = SM(w, IEEE80211_HTINFO_OPMODE); + ni->ni_htopmode = _IEEE80211_SHIFTMASK(w, IEEE80211_HTINFO_OPMODE); w = le16dec(&htinfo->hi_byte45); - ni->ni_htstbc = SM(w, IEEE80211_HTINFO_BASIC_STBCMCS); + ni->ni_htstbc = _IEEE80211_SHIFTMASK(w, IEEE80211_HTINFO_BASIC_STBCMCS); } /* @@ -1939,7 +1936,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_flags_vht & IEEE80211_FVHT_VHT) { if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ - (MS(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160)) { vhtflags = IEEE80211_CHAN_VHT160; @@ -1951,7 +1948,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, } } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80P80MHZ) && /* XXX 2 means "160MHz and 80+80MHz" */ - (MS(vap->iv_vhtcaps, + (_IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && (vap->iv_flags_vht & IEEE80211_FVHT_USEVHT80P80)) { vhtflags = IEEE80211_CHAN_VHT80P80; @@ -2284,7 +2281,7 @@ ieee80211_addba_request(struct ieee80211_node *ni, /* XXX locking */ tap->txa_token = dialogtoken; tap->txa_flags |= IEEE80211_AGGR_IMMEDIATE; - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); addba_start_timeout(tap); @@ -2356,17 +2353,17 @@ ieee80211_addba_response(struct ieee80211_node *ni, /* XXX locking */ addba_stop_timeout(tap); if (status == IEEE80211_STATUS_SUCCESS) { - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); /* XXX override our request? */ tap->txa_wnd = (bufsiz == 0) ? IEEE80211_AGGR_BAWMAX : min(bufsiz, IEEE80211_AGGR_BAWMAX); - tid = MS(baparamset, IEEE80211_BAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); tap->txa_flags |= IEEE80211_AGGR_RUNNING; tap->txa_attempts = 0; /* TODO: this should be a vap flag */ if ((vap->iv_htcaps & IEEE80211_HTC_TX_AMSDU_AMPDU) && (ni->ni_flags & IEEE80211_NODE_AMSDU_TX) && - (MS(baparamset, IEEE80211_BAPS_AMSDU))) + (_IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU))) tap->txa_flags |= IEEE80211_AGGR_AMSDU; else tap->txa_flags &= ~IEEE80211_AGGR_AMSDU; @@ -2417,17 +2414,17 @@ ht_recv_action_ba_addba_request(struct ieee80211_node batimeout = le16dec(frm+5); baseqctl = le16dec(frm+7); - tid = MS(baparamset, IEEE80211_BAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, "recv ADDBA request: dialogtoken %u baparamset 0x%x " "(tid %d bufsiz %d) batimeout %d baseqctl %d:%d amsdu %d", dialogtoken, baparamset, - tid, MS(baparamset, IEEE80211_BAPS_BUFSIZ), + tid, _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ), batimeout, - MS(baseqctl, IEEE80211_BASEQ_START), - MS(baseqctl, IEEE80211_BASEQ_FRAG), - MS(baparamset, IEEE80211_BAPS_AMSDU)); + _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_START), + _IEEE80211_MASKSHIFT(baseqctl, IEEE80211_BASEQ_FRAG), + _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU)); rap = &ni->ni_rx_ampdu[tid]; @@ -2456,8 +2453,8 @@ ht_recv_action_ba_addba_request(struct ieee80211_node } /* XXX honor rap flags? */ args[2] = IEEE80211_BAPS_POLICY_IMMEDIATE - | SM(tid, IEEE80211_BAPS_TID) - | SM(rap->rxa_wnd, IEEE80211_BAPS_BUFSIZ) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAPS_TID) + | _IEEE80211_SHIFTMASK(rap->rxa_wnd, IEEE80211_BAPS_BUFSIZ) ; /* @@ -2492,10 +2489,10 @@ ht_recv_action_ba_addba_response(struct ieee80211_node dialogtoken = frm[2]; code = le16dec(frm+3); baparamset = le16dec(frm+5); - tid = MS(baparamset, IEEE80211_BAPS_TID); - bufsiz = MS(baparamset, IEEE80211_BAPS_BUFSIZ); - policy = MS(baparamset, IEEE80211_BAPS_POLICY); - amsdu = !! MS(baparamset, IEEE80211_BAPS_AMSDU); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_TID); + bufsiz = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_BUFSIZ); + policy = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_POLICY); + amsdu = !! _IEEE80211_MASKSHIFT(baparamset, IEEE80211_BAPS_AMSDU); batimeout = le16dec(frm+7); tap = &ni->ni_tx_ampdu[tid]; @@ -2569,12 +2566,12 @@ ht_recv_action_ba_delba(struct ieee80211_node *ni, baparamset = le16dec(frm+2); code = le16dec(frm+4); - tid = MS(baparamset, IEEE80211_DELBAPS_TID); + tid = _IEEE80211_MASKSHIFT(baparamset, IEEE80211_DELBAPS_TID); IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, "recv DELBA: baparamset 0x%x (tid %d initiator %d) " "code %d", baparamset, tid, - MS(baparamset, IEEE80211_DELBAPS_INIT), code); + _IEEE80211_MASKSHIFT(baparamset, IEEE80211_DELBAPS_INIT), code); if ((baparamset & IEEE80211_DELBAPS_INIT) == 0) { tap = &ni->ni_tx_ampdu[tid]; @@ -2703,8 +2700,9 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, args[0] = dialogtoken; args[1] = 0; /* NB: status code not used */ args[2] = IEEE80211_BAPS_POLICY_IMMEDIATE - | SM(tid, IEEE80211_BAPS_TID) - | SM(IEEE80211_AGGR_BAWMAX, IEEE80211_BAPS_BUFSIZ) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAPS_TID) + | _IEEE80211_SHIFTMASK(IEEE80211_AGGR_BAWMAX, + IEEE80211_BAPS_BUFSIZ) ; /* XXX TODO: this should be a flag, not iv_htcaps */ @@ -2728,8 +2726,8 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, } tokens = dialogtoken; /* allocate token */ /* NB: after calling ic_addba_request so driver can set txa_start */ - args[4] = SM(tap->txa_start, IEEE80211_BASEQ_START) - | SM(0, IEEE80211_BASEQ_FRAG) + args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) + | _IEEE80211_SHIFTMASK(0, IEEE80211_BASEQ_FRAG) ; return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, IEEE80211_ACTION_BA_ADDBA_REQUEST, args); @@ -2949,9 +2947,9 @@ ieee80211_send_bar(struct ieee80211_node *ni, barctl = (tap->txa_flags & IEEE80211_AGGR_IMMEDIATE ? 0 : IEEE80211_BAR_NOACK) | IEEE80211_BAR_COMP - | SM(tid, IEEE80211_BAR_TID) + | _IEEE80211_SHIFTMASK(tid, IEEE80211_BAR_TID) ; - barseqctl = SM(seq, IEEE80211_BAR_SEQ_START); + barseqctl = _IEEE80211_SHIFTMASK(seq, IEEE80211_BAR_SEQ_START); /* NB: known to have proper alignment */ bar->i_ctl = htole16(barctl); bar->i_seq = htole16(barseqctl); @@ -3045,9 +3043,10 @@ ht_send_action_ba_addba(struct ieee80211_node *ni, "send ADDBA %s: dialogtoken %d status %d " "baparamset 0x%x (tid %d amsdu %d) batimeout 0x%x baseqctl 0x%x", (action == IEEE80211_ACTION_BA_ADDBA_REQUEST) ? - "request" : "response", - args[0], args[1], args[2], MS(args[2], IEEE80211_BAPS_TID), - MS(args[2], IEEE80211_BAPS_AMSDU), args[3], args[4]); + "request" : "response", args[0], args[1], args[2], + _IEEE80211_MASKSHIFT(args[2], IEEE80211_BAPS_TID), + _IEEE80211_MASKSHIFT(args[2], IEEE80211_BAPS_AMSDU), + args[3], args[4]); IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", __func__, __LINE__, @@ -3090,7 +3089,7 @@ ht_send_action_ba_delba(struct ieee80211_node *ni, uint16_t baparamset; uint8_t *frm; - baparamset = SM(args[0], IEEE80211_DELBAPS_TID) + baparamset = _IEEE80211_SHIFTMASK(args[0], IEEE80211_DELBAPS_TID) | args[1] ; IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, @@ -3242,8 +3241,10 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee8021 caps &= ~IEEE80211_HTCAP_CHWIDTH40; /* Start by using the advertised settings */ - rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); - density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + rxmax = _IEEE80211_MASKSHIFT(ni->ni_htparam, + IEEE80211_HTCAP_MAXRXAMPDU); + density = _IEEE80211_MASKSHIFT(ni->ni_htparam, + IEEE80211_HTCAP_MPDUDENSITY); IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N, "%s: advertised rxmax=%d, density=%d, vap rxmax=%d, density=%d\n", @@ -3306,8 +3307,8 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee8021 ADDSHORT(frm, caps); /* HT parameters */ - *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) - | SM(density, IEEE80211_HTCAP_MPDUDENSITY) + *frm = _IEEE80211_SHIFTMASK(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | _IEEE80211_SHIFTMASK(density, IEEE80211_HTCAP_MPDUDENSITY) ; frm++; @@ -3395,8 +3396,8 @@ ieee80211_add_htcap_body_ch(uint8_t *frm, struct ieee8 ADDSHORT(frm, caps); /* HT parameters */ - *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) - | SM(density, IEEE80211_HTCAP_MPDUDENSITY) + *frm = _IEEE80211_SHIFTMASK(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | _IEEE80211_SHIFTMASK(density, IEEE80211_HTCAP_MPDUDENSITY) ; frm++; Modified: stable/12/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ioctl.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_ioctl.c Thu Nov 5 12:08:04 2020 (r367373) @@ -777,7 +777,6 @@ static int ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct ieee80211com *ic = vap->iv_ic; u_int kid, len; uint8_t tmpkey[IEEE80211_KEYBUF_SIZE]; @@ -1035,7 +1034,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l * XXX TODO: this isn't completely correct, as we've * negotiated the higher of the two. */ - ireq->i_val = MS(vap->iv_bss->ni_htparam, + ireq->i_val = _IEEE80211_MASKSHIFT( vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); else ireq->i_val = vap->iv_ampdu_limit; @@ -1048,7 +1047,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l * XXX TODO: this isn't completely correct, as we've * negotiated the higher of the two. */ - ireq->i_val = MS(vap->iv_bss->ni_htparam, + ireq->i_val = _IEEE80211_MASKSHIFT(vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); else ireq->i_val = vap->iv_ampdu_density; @@ -1167,7 +1166,6 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l break; } return error; -#undef MS } static int Modified: stable/12/sys/net80211/ieee80211_output.c ============================================================================== --- stable/12/sys/net80211/ieee80211_output.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_output.c Thu Nov 5 12:08:04 2020 (r367373) @@ -2216,7 +2216,6 @@ static uint8_t * ieee80211_add_wme_param(uint8_t *frm, struct ieee80211_wme_state *wme, int uapsd_enable) { -#define SM(_v, _f) (((_v) << _f##_S) & _f) #define ADDSHORT(frm, v) do { \ le16enc(frm, v); \ frm += 2; \ @@ -2243,17 +2242,18 @@ ieee80211_add_wme_param(uint8_t *frm, struct ieee80211 for (i = 0; i < WME_NUM_AC; i++) { const struct wmeParams *ac = &wme->wme_bssChanParams.cap_wmeParams[i]; - *frm++ = SM(i, WME_PARAM_ACI) - | SM(ac->wmep_acm, WME_PARAM_ACM) - | SM(ac->wmep_aifsn, WME_PARAM_AIFSN) + *frm++ = _IEEE80211_SHIFTMASK(i, WME_PARAM_ACI) + | _IEEE80211_SHIFTMASK(ac->wmep_acm, WME_PARAM_ACM) + | _IEEE80211_SHIFTMASK(ac->wmep_aifsn, WME_PARAM_AIFSN) ; - *frm++ = SM(ac->wmep_logcwmax, WME_PARAM_LOGCWMAX) - | SM(ac->wmep_logcwmin, WME_PARAM_LOGCWMIN) + *frm++ = _IEEE80211_SHIFTMASK(ac->wmep_logcwmax, + WME_PARAM_LOGCWMAX) + | _IEEE80211_SHIFTMASK(ac->wmep_logcwmin, + WME_PARAM_LOGCWMIN) ; ADDSHORT(frm, ac->wmep_txopLimit); } return frm; -#undef SM #undef ADDSHORT } #undef WME_OUI_BYTES Modified: stable/12/sys/net80211/ieee80211_regdomain.c ============================================================================== --- stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:08:04 2020 (r367373) @@ -151,12 +151,12 @@ ieee80211_init_channels(struct ieee80211com *ic, if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { cbw_flags |= NET80211_CBW_FLAG_HT40; /* Make sure this is set; or assert? */ cbw_flags |= NET80211_CBW_FLAG_VHT80; -#define MS(_v, _f) (((_v) & _f) >> _f##_S) - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) cbw_flags |= NET80211_CBW_FLAG_VHT160; - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) cbw_flags |= NET80211_CBW_FLAG_VHT80P80; -#undef MS ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), bands, cbw_flags); Modified: stable/12/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/12/sys/net80211/ieee80211_sta.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_sta.c Thu Nov 5 12:08:04 2020 (r367373) @@ -1161,7 +1161,6 @@ int ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm, const struct ieee80211_frame *wh, uint8_t *qosinfo) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme; u_int len = frm[1], qosinfo_count; int i; @@ -1185,10 +1184,13 @@ ieee80211_parse_wmeparams(struct ieee80211vap *vap, ui struct wmeParams *wmep = &wme->wme_wmeChanParams.cap_wmeParams[i]; /* NB: ACI not used */ - wmep->wmep_acm = MS(frm[0], WME_PARAM_ACM); - wmep->wmep_aifsn = MS(frm[0], WME_PARAM_AIFSN); - wmep->wmep_logcwmin = MS(frm[1], WME_PARAM_LOGCWMIN); - wmep->wmep_logcwmax = MS(frm[1], WME_PARAM_LOGCWMAX); + wmep->wmep_acm = _IEEE80211_MASKSHIFT(frm[0], WME_PARAM_ACM); + wmep->wmep_aifsn = + _IEEE80211_MASKSHIFT(frm[0], WME_PARAM_AIFSN); + wmep->wmep_logcwmin = + _IEEE80211_MASKSHIFT(frm[1], WME_PARAM_LOGCWMIN); + wmep->wmep_logcwmax = + _IEEE80211_MASKSHIFT(frm[1], WME_PARAM_LOGCWMAX); wmep->wmep_txopLimit = le16dec(frm+2); IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME, "%s: WME: %d: acm=%d aifsn=%d logcwmin=%d logcwmax=%d txopLimit=%d\n", @@ -1203,7 +1205,6 @@ ieee80211_parse_wmeparams(struct ieee80211vap *vap, ui } wme->wme_wmeChanParams.cap_info = qosinfo_count; return 1; -#undef MS } /* Modified: stable/12/sys/net80211/ieee80211_superg.c ============================================================================== --- stable/12/sys/net80211/ieee80211_superg.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_superg.c Thu Nov 5 12:08:04 2020 (r367373) @@ -272,7 +272,6 @@ struct mbuf * ieee80211_ff_decap(struct ieee80211_node *ni, struct mbuf *m) { #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) -#define MS(x,f) (((x) & f) >> f##_S) struct ieee80211vap *vap = ni->ni_vap; struct llc *llc; uint32_t ath; @@ -301,7 +300,7 @@ ieee80211_ff_decap(struct ieee80211_node *ni, struct m return m; m_adj(m, FF_LLC_SIZE); m_copydata(m, 0, sizeof(uint32_t), (caddr_t) &ath); - if (MS(ath, ATH_FF_PROTO) != ATH_FF_PROTO_L2TUNNEL) { + if (_IEEE80211_MASKSHIFT(ath, ATH_FF_PROTO) != ATH_FF_PROTO_L2TUNNEL) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, ni->ni_macaddr, "fast-frame", "unsupport tunnel protocol, header 0x%x", ath); @@ -350,7 +349,6 @@ ieee80211_ff_decap(struct ieee80211_node *ni, struct m } /* XXX verify framelen against mbuf contents */ return n; /* 2nd delivered by caller */ -#undef MS #undef FF_LLC_SIZE } Modified: stable/12/sys/net80211/ieee80211_var.h ============================================================================== --- stable/12/sys/net80211/ieee80211_var.h Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_var.h Thu Nov 5 12:08:04 2020 (r367373) @@ -733,9 +733,9 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_COM_DETACHED 0x00000001 /* ieee80211_ifdetach called */ #define IEEE80211_COM_REF_ADD 0x00000002 /* add / remove reference */ -#define IEEE80211_COM_REF_M 0xfffffffe /* reference counter bits */ +#define IEEE80211_COM_REF 0xfffffffe /* reference counter bits */ #define IEEE80211_COM_REF_S 1 -#define IEEE80211_COM_REF_MAX (IEEE80211_COM_REF_M >> IEEE80211_COM_REF_S) +#define IEEE80211_COM_REF_MAX (IEEE80211_COM_REF >> IEEE80211_COM_REF_S) int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); void ieee80211_ifattach(struct ieee80211com *); @@ -1010,6 +1010,10 @@ ieee80211_get_node_txpower(struct ieee80211_node *ni) "\13WME\14ACL\15WPA\16RADKEYS\17RADDUMP\20RADIUS\21DOT1XSM\22HWMP" \ "\23POWER\24STATE\25OUTPUT\26SCAN\27AUTH\30ASSOC\31NODE\32ELEMID" \ "\33XRATE\34INPUT\35CRYPTO\36DUPMPKTS\37DEBUG\04011N" + +/* Helper macros unified. */ +#define _IEEE80211_MASKSHIFT(_v, _f) (((_v) & _f) >> _f##_S) +#define _IEEE80211_SHIFTMASK(_v, _f) (((_v) << _f##_S) & _f) #ifdef IEEE80211_DEBUG #define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m)) Modified: stable/12/sys/net80211/ieee80211_vht.c ============================================================================== --- stable/12/sys/net80211/ieee80211_vht.c Thu Nov 5 12:06:50 2020 (r367372) +++ stable/12/sys/net80211/ieee80211_vht.c Thu Nov 5 12:08:04 2020 (r367373) @@ -53,10 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* define here, used throughout file */ -#define MS(_v, _f) (((_v) & _f) >> _f##_S) -#define SM(_v, _f) (((_v) << _f##_S) & _f) - #define ADDSHORT(frm, v) do { \ frm[0] = (v) & 0xff; \ frm[1] = (v) >> 8; \ @@ -207,9 +203,11 @@ ieee80211_vht_announce(struct ieee80211com *ic) /* Channel width */ ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) printf(" 160MHz"); - if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) printf(" 80+80MHz"); printf("\n"); @@ -376,18 +374,20 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* Limit MPDU size to the smaller of the two */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_MAX_MPDU_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_MAX_MPDU_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_MAX_MPDU_MASK); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_MAX_MPDU_MASK); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_MAX_MPDU_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_MAX_MPDU_MASK); /* Limit supp channel config */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); } if ((val2 == 2) && @@ -397,31 +397,38 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, ((vap->iv_flags_vht & IEEE80211_FVHT_USEVHT160) == 0)) val2 = 0; val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK); /* RX LDPC */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXLDPC); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_RXLDPC); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXLDPC); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_RXLDPC); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXLDPC); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_RXLDPC); /* Short-GI 80 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_80); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SHORT_GI_80); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_80); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_SHORT_GI_80); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_80); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_SHORT_GI_80); /* Short-GI 160 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_SHORT_GI_160); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_SHORT_GI_160); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_SHORT_GI_160); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_SHORT_GI_160); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SHORT_GI_160); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_SHORT_GI_160); /* * STBC is slightly more complicated. @@ -439,28 +446,32 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* TX STBC */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_TXSTBC); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_TXSTBC); if (opmode == 1) { /* STA mode - enable it only if node RXSTBC is non-zero */ - val2 = !! MS(ni->ni_vhtcap, IEEE80211_VHTCAP_RXSTBC_MASK); + val2 = !! _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_RXSTBC_MASK); } val = MIN(val1, val2); /* XXX For now, use the 11n config flag */ if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) == 0) val = 0; - new_vhtcap |= SM(val, IEEE80211_VHTCAP_TXSTBC); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_TXSTBC); /* RX STBC1..4 */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_RXSTBC_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_RXSTBC_MASK); if (opmode == 1) { /* STA mode - enable it only if node TXSTBC is non-zero */ - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_TXSTBC); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_TXSTBC); } val = MIN(val1, val2); /* XXX For now, use the 11n config flag */ if ((vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) == 0) val = 0; - new_vhtcap |= SM(val, IEEE80211_VHTCAP_RXSTBC_MASK); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, IEEE80211_VHTCAP_RXSTBC_MASK); /* * Finally - if RXSTBC is 0, then don't enable TXSTBC. @@ -480,115 +491,129 @@ ieee80211_vht_get_vhtcap_ie(struct ieee80211_node *ni, */ /* SU Beamformer capable */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE); /* SU Beamformee capable */ - val2 = val1 = MS(vap->iv_vhtcaps, + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); } val = MIN(val1, val2); - new_vhtcap |= SM(val, IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); + new_vhtcap |= _IEEE80211_SHIFTMASK(val, + IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE); /* Beamformee STS capability - only if SU beamformee capable */ - val2 = val1 = MS(vap->iv_vhtcaps, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vhtcaps, + IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); if (opmode == 1) { - val2 = MS(ni->ni_vhtcap, IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); + val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, + IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Nov 5 12:10:26 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B31B4667C7; Thu, 5 Nov 2020 12:10:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRj5Z12XHz4bNB; Thu, 5 Nov 2020 12:10:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1665113B0E; Thu, 5 Nov 2020 12:10:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5CAPUv024717; Thu, 5 Nov 2020 12:10:25 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5CAPH7024713; Thu, 5 Nov 2020 12:10:25 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051210.0A5CAPH7024713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367374 - in stable/12: lib/lib80211 sbin/ifconfig sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in stable/12: lib/lib80211 sbin/ifconfig sys/net80211 X-SVN-Commit-Revision: 367374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:10:26 -0000 Author: bz Date: Thu Nov 5 12:10:24 2020 New Revision: 367374 URL: https://svnweb.freebsd.org/changeset/base/367374 Log: MFC r366522: 80211: non-functional changes Sort a few VHT160 and 80+80 lines, update some comments, and remove a superfluous ','. No functional changes intended. Modified: stable/12/lib/lib80211/lib80211_regdomain.c stable/12/sbin/ifconfig/ifieee80211.c stable/12/sys/net80211/ieee80211.c stable/12/sys/net80211/ieee80211_node.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/lib80211/lib80211_regdomain.c ============================================================================== --- stable/12/lib/lib80211/lib80211_regdomain.c Thu Nov 5 12:08:04 2020 (r367373) +++ stable/12/lib/lib80211/lib80211_regdomain.c Thu Nov 5 12:10:24 2020 (r367374) @@ -191,11 +191,11 @@ decode_flag(struct mystate *mt, const char *p, int len FLAG(IEEE80211_CHAN_VHT20), FLAG(IEEE80211_CHAN_VHT40), FLAG(IEEE80211_CHAN_VHT80), + FLAG(IEEE80211_CHAN_VHT160), /* * XXX VHT80P80? This likely should be done by * 80MHz chan logic in net80211 / ifconfig. */ - FLAG(IEEE80211_CHAN_VHT160), FLAG(IEEE80211_CHAN_ST), FLAG(IEEE80211_CHAN_TURBO), FLAG(IEEE80211_CHAN_PASSIVE), Modified: stable/12/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:08:04 2020 (r367373) +++ stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:10:24 2020 (r367374) @@ -2385,8 +2385,7 @@ regdomain_makechannels( &dc->dc_chaninfo); } - /* VHT80 */ - /* XXX dc_vhtcap? */ + /* VHT80 is mandatory (and so should be VHT40 above). */ if (1) { regdomain_addchans(ci, &rd->bands_11ac, reg, IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | Modified: stable/12/sys/net80211/ieee80211.c ============================================================================== --- stable/12/sys/net80211/ieee80211.c Thu Nov 5 12:08:04 2020 (r367373) +++ stable/12/sys/net80211/ieee80211.c Thu Nov 5 12:10:24 2020 (r367374) @@ -158,7 +158,7 @@ ieee80211_chan_init(struct ieee80211com *ic) /* * Setup the HT40/VHT40 upper/lower bits. - * The VHT80 math is done elsewhere. + * The VHT80/... math is done elsewhere. */ if (IEEE80211_IS_CHAN_HT40(c) && c->ic_extieee == 0) c->ic_extieee = ieee80211_mhz2ieee(c->ic_freq + @@ -167,8 +167,8 @@ ieee80211_chan_init(struct ieee80211com *ic) /* Update VHT math */ /* - * XXX VHT again, note that this assumes VHT80 channels - * are legit already + * XXX VHT again, note that this assumes VHT80/... channels + * are legit already. */ set_vht_extchan(c); @@ -712,8 +712,8 @@ ieee80211_vap_attach(struct ieee80211vap *vap, ifm_cha ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80); - ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); IEEE80211_UNLOCK(ic); return 1; @@ -767,8 +767,8 @@ ieee80211_vap_detach(struct ieee80211vap *vap) ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80); - ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160); + ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80); /* NB: this handles the bpfdetach done below */ ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF); @@ -1160,7 +1160,7 @@ struct vht_chan_range vht80_chan_ranges[] = { { 5570, 5650 }, { 5650, 5730 }, { 5735, 5815 }, - { 0, 0, } + { 0, 0 } }; static int Modified: stable/12/sys/net80211/ieee80211_node.h ============================================================================== --- stable/12/sys/net80211/ieee80211_node.h Thu Nov 5 12:08:04 2020 (r367373) +++ stable/12/sys/net80211/ieee80211_node.h Thu Nov 5 12:10:24 2020 (r367374) @@ -70,7 +70,7 @@ struct ieee80211vap; struct ieee80211_scanparams; /* - * Information element ``blob''. We use this structure + * Information element (IE) ``blob''. We use this structure * to capture management frame payloads that need to be * retained. Information elements within the payload that * we need to consult have references recorded. From owner-svn-src-stable@freebsd.org Thu Nov 5 12:12:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CD61466953; Thu, 5 Nov 2020 12:12:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRj7v39QRz4bv6; Thu, 5 Nov 2020 12:12:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FE4F13B9F; Thu, 5 Nov 2020 12:12:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5CCRLc031012; Thu, 5 Nov 2020 12:12:27 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5CCRqH031011; Thu, 5 Nov 2020 12:12:27 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051212.0A5CCRqH031011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367375 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 367375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:12:27 -0000 Author: bz Date: Thu Nov 5 12:12:26 2020 New Revision: 367375 URL: https://svnweb.freebsd.org/changeset/base/367375 Log: MFC r366524: 80211: ifconfig replace MS() with _IEEE80211_MASKSHIFT() As we did in the kernel in r366112 replace the MS() macro with the version(s) added to the kernel: _IEEE80211_MASKSHIFT(). Also provide its counter part. This will later allow use to use other macros defined in net80211 headers here in ifconfig. Modified: stable/12/sbin/ifconfig/ifieee80211.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:10:24 2020 (r367374) +++ stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:12:26 2020 (r367375) @@ -138,6 +138,14 @@ #define IEEE80211_FVHT_USEVHT80P80 0x000000010 /* CONF: Use VHT 80+80 */ #endif +/* Helper macros unified. */ +#ifndef _IEEE80211_MASKSHIFT +#define _IEEE80211_MASKSHIFT(_v, _f) (((_v) & _f) >> _f##_S) +#endif +#ifndef _IEEE80211_SHIFTMASK +#define _IEEE80211_SHIFTMASK(_v, _f) (((_v) << _f##_S) & _f) +#endif + #define MAXCHAN 1536 /* max 1.5K channels */ #define MAXCOL 78 @@ -2706,7 +2714,6 @@ printie(const char* tag, const uint8_t *ie, size_t iel static void printwmeparam(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen) { -#define MS(_v, _f) (((_v) & _f) >> _f##_S) static const char *acnames[] = { "BE", "BK", "VO", "VI" }; const struct ieee80211_wme_param *wme = (const struct ieee80211_wme_param *) ie; @@ -2721,17 +2728,17 @@ printwmeparam(const char *tag, const u_int8_t *ie, siz const struct ieee80211_wme_acparams *ac = &wme->params_acParams[i]; - printf(" %s[%saifsn %u cwmin %u cwmax %u txop %u]" - , acnames[i] - , MS(ac->acp_aci_aifsn, WME_PARAM_ACM) ? "acm " : "" - , MS(ac->acp_aci_aifsn, WME_PARAM_AIFSN) - , MS(ac->acp_logcwminmax, WME_PARAM_LOGCWMIN) - , MS(ac->acp_logcwminmax, WME_PARAM_LOGCWMAX) - , LE_READ_2(&ac->acp_txop) - ); + printf(" %s[%saifsn %u cwmin %u cwmax %u txop %u]", acnames[i], + _IEEE80211_MASKSHIFT(ac->acp_aci_aifsn, WME_PARAM_ACM) ? + "acm " : "", + _IEEE80211_MASKSHIFT(ac->acp_aci_aifsn, WME_PARAM_AIFSN), + _IEEE80211_MASKSHIFT(ac->acp_logcwminmax, + WME_PARAM_LOGCWMIN), + _IEEE80211_MASKSHIFT(ac->acp_logcwminmax, + WME_PARAM_LOGCWMAX), + LE_READ_2(&ac->acp_txop)); } printf(">"); -#undef MS } static void From owner-svn-src-stable@freebsd.org Thu Nov 5 12:14:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2ED6466BA2; Thu, 5 Nov 2020 12:14:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRjBg6Xnrz4bt0; Thu, 5 Nov 2020 12:14:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D371113AC0; Thu, 5 Nov 2020 12:14:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5CEpCw031172; Thu, 5 Nov 2020 12:14:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5CEpTT031171; Thu, 5 Nov 2020 12:14:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051214.0A5CEpTT031171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367376 - stable/12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/net80211 X-SVN-Commit-Revision: 367376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:14:52 -0000 Author: bz Date: Thu Nov 5 12:14:51 2020 New Revision: 367376 URL: https://svnweb.freebsd.org/changeset/base/367376 Log: MFC r366525: net80211: whitespace Fix indentation for the multi-line copies of ieee80211_add_channel_list_5ghz() for the 3 bands. Modified: stable/12/sys/net80211/ieee80211_regdomain.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net80211/ieee80211_regdomain.c ============================================================================== --- stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:12:26 2020 (r367375) +++ stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:14:51 2020 (r367376) @@ -158,14 +158,14 @@ ieee80211_init_channels(struct ieee80211com *ic, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) cbw_flags |= NET80211_CBW_FLAG_VHT80P80; ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, - nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), - bands, cbw_flags); + nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), + bands, cbw_flags); ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band2, nitems(def_chan_5ghz_band2), - bands, cbw_flags); + bands, cbw_flags); ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band3, nitems(def_chan_5ghz_band3), - bands, cbw_flags); + bands, cbw_flags); } if (rd != NULL) ic->ic_regdomain = *rd; From owner-svn-src-stable@freebsd.org Thu Nov 5 12:16:23 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBF5E466975; Thu, 5 Nov 2020 12:16:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRjDR6MTxz4c96; Thu, 5 Nov 2020 12:16:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2D3A1386C; Thu, 5 Nov 2020 12:16:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5CGNKE031317; Thu, 5 Nov 2020 12:16:23 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5CGMbN031312; Thu, 5 Nov 2020 12:16:22 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051216.0A5CGMbN031312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367377 - in stable/12: sbin/ifconfig sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in stable/12: sbin/ifconfig sys/net80211 X-SVN-Commit-Revision: 367377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:16:24 -0000 Author: bz Date: Thu Nov 5 12:16:22 2020 New Revision: 367377 URL: https://svnweb.freebsd.org/changeset/base/367377 Log: MFC r366800: net80211: update for (more) VHT160 support Implement two macros IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ() and its 80+80 counter part to check in vhtcaps for appropriate levels of support and use the macros throughout the code. Add vht160_chan_ranges/is_vht160_valid_freq and handle analogue to vht80 in various parts of the code. Add ieee80211_add_channel_cbw() which also takes the CBW flag fields and make the former ieee80211_add_channel() a wrapper to it. With the CBW flags we can add HT/VHT channels passing them to getflags() for the 2/5ghz functions. In ifconfig(8) add the regdomain_addchans() support for VHT160 and VHT80P80. With this (+ regdoain.xml updates) VHT160 channels can be configured, listed, and pass regdomain where appropriate. Modified: stable/12/sbin/ifconfig/ifieee80211.c stable/12/sys/net80211/ieee80211.c stable/12/sys/net80211/ieee80211.h stable/12/sys/net80211/ieee80211_regdomain.c stable/12/sys/net80211/ieee80211_var.h stable/12/sys/net80211/ieee80211_vht.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sbin/ifconfig/ifieee80211.c Thu Nov 5 12:16:22 2020 (r367377) @@ -2405,7 +2405,31 @@ regdomain_makechannels( &dc->dc_chaninfo); } - /* XXX TODO: VHT80P80, VHT160 */ + /* VHT160 */ + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ( + dc->dc_vhtcaps)) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT160, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT160, + &dc->dc_chaninfo); + } + + /* VHT80P80 */ + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( + dc->dc_vhtcaps)) { + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT80P80, + &dc->dc_chaninfo); + regdomain_addchans(ci, &rd->bands_11ac, reg, + IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT80P80, + &dc->dc_chaninfo); + } } if (!LIST_EMPTY(&rd->bands_11ng) && dc->dc_htcaps != 0) { Modified: stable/12/sys/net80211/ieee80211.c ============================================================================== --- stable/12/sys/net80211/ieee80211.c Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sys/net80211/ieee80211.c Thu Nov 5 12:16:22 2020 (r367377) @@ -1163,6 +1163,12 @@ struct vht_chan_range vht80_chan_ranges[] = { { 0, 0 } }; +struct vht_chan_range vht160_chan_ranges[] = { + { 5170, 5330 }, + { 5490, 5650 }, + { 0, 0 } +}; + static int set_vht_extchan(struct ieee80211_channel *c) { @@ -1177,8 +1183,24 @@ set_vht_extchan(struct ieee80211_channel *c) } if (IEEE80211_IS_CHAN_VHT160(c)) { - printf("%s: TODO VHT160 channel (ieee=%d, flags=0x%08x)\n", - __func__, c->ic_ieee, c->ic_flags); + for (i = 0; vht160_chan_ranges[i].freq_start != 0; i++) { + if (c->ic_freq >= vht160_chan_ranges[i].freq_start && + c->ic_freq < vht160_chan_ranges[i].freq_end) { + int midpoint; + + midpoint = vht160_chan_ranges[i].freq_start + 80; + c->ic_vht_ch_freq1 = + ieee80211_mhz2ieee(midpoint, c->ic_flags); + c->ic_vht_ch_freq2 = 0; +#if 0 + printf("%s: %d, freq=%d, midpoint=%d, freq1=%d, freq2=%d\n", + __func__, c->ic_ieee, c->ic_freq, midpoint, + c->ic_vht_ch_freq1, c->ic_vht_ch_freq2); +#endif + return (1); + } + } + return (0); } if (IEEE80211_IS_CHAN_VHT80(c)) { @@ -1225,11 +1247,24 @@ set_vht_extchan(struct ieee80211_channel *c) /* * Return whether the current channel could possibly be a part of - * a VHT80 channel. + * a VHT80/VHT160 channel. * * This doesn't check that the whole range is in the allowed list * according to regulatory. */ +static bool +is_vht160_valid_freq(uint16_t freq) +{ + int i; + + for (i = 0; vht160_chan_ranges[i].freq_start != 0; i++) { + if (freq >= vht160_chan_ranges[i].freq_start && + freq < vht160_chan_ranges[i].freq_end) + return (true); + } + return (false); +} + static int is_vht80_valid_freq(uint16_t freq) { @@ -1410,18 +1445,17 @@ getflags(const uint8_t bands[], uint32_t flags[], int * Add one 20 MHz channel into specified channel list. * You MUST NOT mix bands when calling this. It will not add 5ghz * channels if you have any B/G/N band bit set. - * This also does not support 40/80/160/80+80. + * The _cbw() variant does also support HT40/VHT80/160/80+80. */ -/* XXX VHT */ int -ieee80211_add_channel(struct ieee80211_channel chans[], int maxchans, +ieee80211_add_channel_cbw(struct ieee80211_channel chans[], int maxchans, int *nchans, uint8_t ieee, uint16_t freq, int8_t maxregpower, - uint32_t chan_flags, const uint8_t bands[]) + uint32_t chan_flags, const uint8_t bands[], int cbw_flags) { uint32_t flags[IEEE80211_MODE_MAX]; int i, error; - getflags(bands, flags, 0); + getflags(bands, flags, cbw_flags); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); error = addchan(chans, maxchans, nchans, ieee, freq, maxregpower, @@ -1434,6 +1468,16 @@ ieee80211_add_channel(struct ieee80211_channel chans[] return (error); } +int +ieee80211_add_channel(struct ieee80211_channel chans[], int maxchans, + int *nchans, uint8_t ieee, uint16_t freq, int8_t maxregpower, + uint32_t chan_flags, const uint8_t bands[]) +{ + + return (ieee80211_add_channel_cbw(chans, maxchans, nchans, ieee, freq, + maxregpower, chan_flags, bands, 0)); +} + static struct ieee80211_channel * findchannel(struct ieee80211_channel chans[], int nchans, uint16_t freq, uint32_t flags) @@ -1573,7 +1617,11 @@ add_chanlist(struct ieee80211_channel chans[], int max is_vht = !! (flags[j] & IEEE80211_CHAN_VHT); /* XXX TODO FIXME VHT80P80. */ - /* XXX TODO FIXME VHT160. */ + + /* Test for VHT160 analogue to the VHT80 below. */ + if (is_vht && flags[j] & IEEE80211_CHAN_VHT160) + if (! is_vht160_valid_freq(freq)) + continue; /* * Test for VHT80. Modified: stable/12/sys/net80211/ieee80211.h ============================================================================== --- stable/12/sys/net80211/ieee80211.h Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sys/net80211/ieee80211.h Thu Nov 5 12:16:22 2020 (r367377) @@ -817,6 +817,13 @@ struct ieee80211_ie_vht_operation { #define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80P80MHZ 2 #define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_RESERVED 3 +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(_vhtcaps) \ + (_IEEE80211_MASKSHIFT(_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= \ + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ) +#define IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(_vhtcaps) \ + (_IEEE80211_MASKSHIFT(_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == \ + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80P80MHZ) + #define IEEE80211_VHTCAP_RXLDPC 0x00000010 #define IEEE80211_VHTCAP_RXLDPC_S 4 Modified: stable/12/sys/net80211/ieee80211_regdomain.c ============================================================================== --- stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sys/net80211/ieee80211_regdomain.c Thu Nov 5 12:16:22 2020 (r367377) @@ -151,11 +151,10 @@ ieee80211_init_channels(struct ieee80211com *ic, if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { cbw_flags |= NET80211_CBW_FLAG_HT40; /* Make sure this is set; or assert? */ cbw_flags |= NET80211_CBW_FLAG_VHT80; - if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vhtcaps)) cbw_flags |= NET80211_CBW_FLAG_VHT160; - if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ( + ic->ic_vhtcaps)) cbw_flags |= NET80211_CBW_FLAG_VHT80P80; ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), Modified: stable/12/sys/net80211/ieee80211_var.h ============================================================================== --- stable/12/sys/net80211/ieee80211_var.h Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sys/net80211/ieee80211_var.h Thu Nov 5 12:16:22 2020 (r367377) @@ -770,6 +770,8 @@ int ieee80211_mhz2ieee(u_int, u_int); int ieee80211_chan2ieee(struct ieee80211com *, const struct ieee80211_channel *); u_int ieee80211_ieee2mhz(u_int, u_int); +int ieee80211_add_channel_cbw(struct ieee80211_channel[], int, int *, + uint8_t, uint16_t, int8_t, uint32_t, const uint8_t[], int); int ieee80211_add_channel(struct ieee80211_channel[], int, int *, uint8_t, uint16_t, int8_t, uint32_t, const uint8_t[]); int ieee80211_add_channel_ht40(struct ieee80211_channel[], int, int *, Modified: stable/12/sys/net80211/ieee80211_vht.c ============================================================================== --- stable/12/sys/net80211/ieee80211_vht.c Thu Nov 5 12:14:51 2020 (r367376) +++ stable/12/sys/net80211/ieee80211_vht.c Thu Nov 5 12:16:22 2020 (r367377) @@ -153,13 +153,10 @@ ieee80211_vht_vattach(struct ieee80211vap *vap) IEEE80211_FVHT_VHT | IEEE80211_FVHT_USEVHT40 | IEEE80211_FVHT_USEVHT80; -#if 0 - /* XXX TODO: enable VHT80+80, VHT160 capabilities */ - if (XXX TODO FIXME) + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vhtcaps)) vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT160; - if (XXX TODO FIXME) + if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vhtcaps)) vap->iv_flags_vht |= IEEE80211_FVHT_USEVHT80P80; -#endif memcpy(&vap->iv_vht_mcsinfo, &ic->ic_vht_mcsinfo, sizeof(struct ieee80211_vht_mcs_info)); @@ -202,15 +199,11 @@ ieee80211_vht_announce(struct ieee80211com *ic) return; /* Channel width */ - ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz"); - if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) - printf(" 160MHz"); - if (_IEEE80211_MASKSHIFT(ic->ic_vhtcaps, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) - printf(" 80+80MHz"); - printf("\n"); - + ic_printf(ic, "[VHT] Channel Widths: 20MHz, 40MHz, 80MHz%s%s\n", + (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vhtcaps)) ? + ", 160MHz" : "", + (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(ic->ic_vhtcaps)) ? + ", 80+80MHz" : ""); /* Features */ ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vhtcaps, IEEE80211_VHTCAP_BITS); From owner-svn-src-stable@freebsd.org Thu Nov 5 12:17:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D04BB466C51; Thu, 5 Nov 2020 12:17:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRjG75bSHz4cMS; Thu, 5 Nov 2020 12:17:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B31E313B36; Thu, 5 Nov 2020 12:17:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5CHph0031440; Thu, 5 Nov 2020 12:17:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5CHpPI031438; Thu, 5 Nov 2020 12:17:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051217.0A5CHpPI031438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 12:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367378 - stable/12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/net80211 X-SVN-Commit-Revision: 367378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 12:17:51 -0000 Author: bz Date: Thu Nov 5 12:17:50 2020 New Revision: 367378 URL: https://svnweb.freebsd.org/changeset/base/367378 Log: MFC r366817: net80211: factor out the priv(9) checks into OS specifc code. Factor out the priv(9) checks into OS specifc code so other OSes can equally implement them. This sorts out those XXX in the net80211 code. We provide 3 arguments (cmd, vap, ifp) where available to the functions, in order to allow other OSes to use that data but also in case we'd add auditing to these check to have the information available. For now the arguments are marked __unused. PR: 249403 Modified: stable/12/sys/net80211/ieee80211_freebsd.c stable/12/sys/net80211/ieee80211_freebsd.h stable/12/sys/net80211/ieee80211_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.c Thu Nov 5 12:16:22 2020 (r367377) +++ stable/12/sys/net80211/ieee80211_freebsd.c Thu Nov 5 12:17:50 2020 (r367378) @@ -72,6 +72,42 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ie static const char wlanname[] = "wlan"; static struct if_clone *wlan_cloner; +/* + * priv(9) NET80211 checks. + * Return 0 if operation is allowed, E* (usually EPERM) otherwise. + */ +int +ieee80211_priv_check_vap_getkey(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_GETKEY)); +} + +int +ieee80211_priv_check_vap_manage(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_MANAGE)); +} + +int +ieee80211_priv_check_vap_setmac(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_VAP_SETMAC)); +} + +int +ieee80211_priv_check_create_vap(u_long cmd __unused, + struct ieee80211vap *vap __unused, struct ifnet *ifp __unused) +{ + + return (priv_check(curthread, PRIV_NET80211_CREATE_VAP)); +} + static int wlan_clone_create(struct if_clone *ifc, int unit, caddr_t params) { @@ -80,7 +116,7 @@ wlan_clone_create(struct if_clone *ifc, int unit, cadd struct ieee80211com *ic; int error; - error = priv_check(curthread, PRIV_NET80211_CREATE_VAP); + error = ieee80211_priv_check_create_vap(0, NULL, NULL); if (error) return error; Modified: stable/12/sys/net80211/ieee80211_freebsd.h ============================================================================== --- stable/12/sys/net80211/ieee80211_freebsd.h Thu Nov 5 12:16:22 2020 (r367377) +++ stable/12/sys/net80211/ieee80211_freebsd.h Thu Nov 5 12:17:50 2020 (r367378) @@ -41,6 +41,19 @@ #include /* + * priv(9) NET80211 checks. + */ +struct ieee80211vap; +int ieee80211_priv_check_vap_getkey(u_long, struct ieee80211vap *, + struct ifnet *); +int ieee80211_priv_check_vap_manage(u_long, struct ieee80211vap *, + struct ifnet *); +int ieee80211_priv_check_vap_setmac(u_long, struct ieee80211vap *, + struct ifnet *); +int ieee80211_priv_check_create_vap(u_long, struct ieee80211vap *, + struct ifnet *); + +/* * Common state locking definitions. */ typedef struct { Modified: stable/12/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ioctl.c Thu Nov 5 12:16:22 2020 (r367377) +++ stable/12/sys/net80211/ieee80211_ioctl.c Thu Nov 5 12:17:50 2020 (r367378) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -72,7 +71,8 @@ static int ieee80211_scanreq(struct ieee80211vap *, struct ieee80211_scan_req *); static int -ieee80211_ioctl_getkey(struct ieee80211vap *vap, struct ieee80211req *ireq) +ieee80211_ioctl_getkey(u_long cmd, struct ieee80211vap *vap, + struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; @@ -106,8 +106,7 @@ ieee80211_ioctl_getkey(struct ieee80211vap *vap, struc ik.ik_flags = wk->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV); if (wk->wk_keyix == vap->iv_def_txkey) ik.ik_flags |= IEEE80211_KEY_DEFAULT; - /* XXX TODO: move priv check to ieee80211_freebsd.c */ - if (priv_check(curthread, PRIV_NET80211_VAP_GETKEY) == 0) { + if (ieee80211_priv_check_vap_getkey(cmd, vap, NULL) == 0) { /* NB: only root can read key data */ ik.ik_keyrsc = wk->wk_keyrsc[IEEE80211_NONQOS_TID]; ik.ik_keytsc = wk->wk_keytsc; @@ -822,8 +821,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l return EINVAL; len = (u_int) vap->iv_nw_keys[kid].wk_keylen; /* NB: only root can read WEP keys */ - /* XXX TODO: move priv check to ieee80211_freebsd.c */ - if (priv_check(curthread, PRIV_NET80211_VAP_GETKEY) == 0) { + if (ieee80211_priv_check_vap_getkey(cmd, vap, NULL) == 0) { bcopy(vap->iv_nw_keys[kid].wk_key, tmpkey, len); } else { bzero(tmpkey, len); @@ -916,7 +914,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l ireq->i_val = (vap->iv_flags & IEEE80211_F_NOBRIDGE) == 0; break; case IEEE80211_IOC_WPAKEY: - error = ieee80211_ioctl_getkey(vap, ireq); + error = ieee80211_ioctl_getkey(cmd, vap, ireq); break; case IEEE80211_IOC_CHANINFO: error = ieee80211_ioctl_getchaninfo(vap, ireq); @@ -3628,8 +3626,7 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t (struct ieee80211req *) data); break; case SIOCS80211: - /* XXX TODO: move priv check to ieee80211_freebsd.c */ - error = priv_check(curthread, PRIV_NET80211_VAP_MANAGE); + error = ieee80211_priv_check_vap_manage(cmd, vap, ifp); if (error == 0) error = ieee80211_ioctl_set80211(vap, cmd, (struct ieee80211req *) data); @@ -3675,8 +3672,7 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t } break; case SIOCSIFLLADDR: - /* XXX TODO: move priv check to ieee80211_freebsd.c */ - error = priv_check(curthread, PRIV_NET80211_VAP_SETMAC); + error = ieee80211_priv_check_vap_setmac(cmd, vap, ifp); if (error == 0) break; /* Fallthrough */ From owner-svn-src-stable@freebsd.org Thu Nov 5 13:38:26 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF19C4689D3; Thu, 5 Nov 2020 13:38:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRl365T81z4hC4; Thu, 5 Nov 2020 13:38:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A40A61465D; Thu, 5 Nov 2020 13:38:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5DcQ57080263; Thu, 5 Nov 2020 13:38:26 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5DcQ96080262; Thu, 5 Nov 2020 13:38:26 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051338.0A5DcQ96080262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 13:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367380 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 367380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 13:38:26 -0000 Author: bz Date: Thu Nov 5 13:38:26 2020 New Revision: 367380 URL: https://svnweb.freebsd.org/changeset/base/367380 Log: MFC r366523: LinuxKPI: add a bitfield.h implementation. This code was iteratively implemented during the work on various WiFi drivers -- from individual functions to a macro-created implementations for the various bit sized needed (and then extended to more for comepleteness). Some of the bit combinations do not seem to make sense so are left out. The __bf_shf(x) was obtained from D26681 by manu. Added: stable/12/sys/compat/linuxkpi/common/include/linux/bitfield.h - copied unchanged from r366523, head/sys/compat/linuxkpi/common/include/linux/bitfield.h Modified: Directory Properties: stable/12/ (props changed) Copied: stable/12/sys/compat/linuxkpi/common/include/linux/bitfield.h (from r366523, head/sys/compat/linuxkpi/common/include/linux/bitfield.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/compat/linuxkpi/common/include/linux/bitfield.h Thu Nov 5 13:38:26 2020 (r367380, copy of r366523, head/sys/compat/linuxkpi/common/include/linux/bitfield.h) @@ -0,0 +1,105 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 _LINUX_BITFIELD_H +#define _LINUX_BITFIELD_H + +#include +#include + +/* Use largest possible type. */ +static inline uint64_t ___lsb(uint64_t f) { return (f & -f); } +static inline uint64_t ___bitmask(uint64_t f) { return (f / ___lsb(f)); } + +#define _uX_get_bits(_n) \ + static __inline uint ## _n ## _t \ + u ## _n ## _get_bits(uint ## _n ## _t v, uint ## _n ## _t f) \ + { \ + return ((v & f) / ___lsb(f)); \ + } + +_uX_get_bits(64) +_uX_get_bits(32) +_uX_get_bits(16) +_uX_get_bits(8) + +#define _leX_get_bits(_n) \ + static __inline uint ## _n ## _t \ + le ## _n ## _get_bits(__le ## _n v, uint ## _n ## _t f) \ + { \ + return ((le ## _n ## _to_cpu(v) & f) / ___lsb(f)); \ + } + +_leX_get_bits(64) +_leX_get_bits(32) +_leX_get_bits(16) + +#define _uX_encode_bits(_n) \ + static __inline uint ## _n ## _t \ + u ## _n ## _encode_bits(uint ## _n ## _t v, uint ## _n ## _t f) \ + { \ + return ((v & ___bitmask(f)) * ___lsb(f)); \ + } + +_uX_encode_bits(64) +_uX_encode_bits(32) +_uX_encode_bits(16) +_uX_encode_bits(8) + +#define _leX_encode_bits(_n) \ + static __inline uint ## _n ## _t \ + le ## _n ## _encode_bits(__le ## _n v, uint ## _n ## _t f)\ + { \ + return (cpu_to_le ## _n((v & ___bitmask(f)) * ___lsb(f))); \ + } + +_leX_encode_bits(64) +_leX_encode_bits(32) +_leX_encode_bits(16) + +static __inline void +le32p_replace_bits(uint32_t *p, uint32_t v, uint32_t f) +{ + + *p = (*p & ~(cpu_to_le32(v))) | le32_encode_bits(v, f); + return; +} + +#define __bf_shf(x) (__builtin_ffsll(x) - 1) + +#define FIELD_PREP(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + +#define FIELD_GET(_mask, _value) \ + ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) + +#endif /* _LINUX_BITFIELD_H */ From owner-svn-src-stable@freebsd.org Thu Nov 5 13:43:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89D35468C91; Thu, 5 Nov 2020 13:43:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRl8W3GShz4hXv; Thu, 5 Nov 2020 13:43:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6305414762; Thu, 5 Nov 2020 13:43:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5Dh7UM086148; Thu, 5 Nov 2020 13:43:07 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5Dh73E086147; Thu, 5 Nov 2020 13:43:07 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051343.0A5Dh73E086147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 13:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367381 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 367381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 13:43:07 -0000 Author: bz Date: Thu Nov 5 13:43:06 2020 New Revision: 367381 URL: https://svnweb.freebsd.org/changeset/base/367381 Log: MFC r366623: ip_mroute: fix the viftable export sysctl It seems that in r354857 I got more than one thing wrong. Convert the SYSCTL_OPAQUE to a SYSCTL_PROC to properly export the these days allocated and not longer static per-vnet viftable array. This fixes a problem with netstat -g which would show bogus information for the IPv4 Virtual Interface Table. PR: 246626 Modified: stable/12/sys/netinet/ip_mroute.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/ip_mroute.c ============================================================================== --- stable/12/sys/netinet/ip_mroute.c Thu Nov 5 13:38:26 2020 (r367380) +++ stable/12/sys/netinet/ip_mroute.c Thu Nov 5 13:43:06 2020 (r367381) @@ -181,13 +181,6 @@ VNET_DEFINE_STATIC(vifi_t, numvifs); #define V_numvifs VNET(numvifs) VNET_DEFINE_STATIC(struct vif *, viftable); #define V_viftable VNET(viftable) -/* - * No one should be able to "query" this before initialisation happened in - * vnet_mroute_init(), so we should still be fine. - */ -SYSCTL_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(viftable), sizeof(*V_viftable) * MAXVIFS, "S,vif[MAXVIFS]", - "IPv4 Multicast Interfaces (struct vif[MAXVIFS], netinet/ip_mroute.h)"); static struct mtx vif_mtx; #define VIF_LOCK() mtx_lock(&vif_mtx) @@ -2803,6 +2796,30 @@ out_locked: static SYSCTL_NODE(_net_inet_ip, OID_AUTO, mfctable, CTLFLAG_RD, sysctl_mfctable, "IPv4 Multicast Forwarding Table " "(struct *mfc[mfchashsize], netinet/ip_mroute.h)"); + +static int +sysctl_viflist(SYSCTL_HANDLER_ARGS) +{ + int error; + + if (req->newptr) + return (EPERM); + if (V_viftable == NULL) /* XXX unlocked */ + return (0); + error = sysctl_wire_old_buffer(req, sizeof(*V_viftable) * MAXVIFS); + if (error) + return (error); + + VIF_LOCK(); + error = SYSCTL_OUT(req, V_viftable, sizeof(*V_viftable) * MAXVIFS); + VIF_UNLOCK(); + return (error); +} + +SYSCTL_PROC(_net_inet_ip, OID_AUTO, viftable, + CTLTYPE_OPAQUE | CTLFLAG_VNET | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, + sysctl_viflist, "S,vif[MAXVIFS]", + "IPv4 Multicast Interfaces (struct vif[MAXVIFS], netinet/ip_mroute.h)"); static void vnet_mroute_init(const void *unused __unused) From owner-svn-src-stable@freebsd.org Thu Nov 5 13:45:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18BC2468DA1; Thu, 5 Nov 2020 13:45:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRlCC07p1z4hq0; Thu, 5 Nov 2020 13:45:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC27014D8B; Thu, 5 Nov 2020 13:45:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5DjQMM086375; Thu, 5 Nov 2020 13:45:26 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5DjQq0086374; Thu, 5 Nov 2020 13:45:26 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051345.0A5DjQq0086374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 13:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367382 - stable/12/sys/dev/extres/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/dev/extres/clk X-SVN-Commit-Revision: 367382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 13:45:27 -0000 Author: bz Date: Thu Nov 5 13:45:26 2020 New Revision: 367382 URL: https://svnweb.freebsd.org/changeset/base/367382 Log: MFC r366799: clk: fix indentation Just fix indentation of an if() clause. No functional changes intended. Modified: stable/12/sys/dev/extres/clk/clk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/extres/clk/clk.c ============================================================================== --- stable/12/sys/dev/extres/clk/clk.c Thu Nov 5 13:43:06 2020 (r367381) +++ stable/12/sys/dev/extres/clk/clk.c Thu Nov 5 13:45:26 2020 (r367382) @@ -544,7 +544,7 @@ clknode_create(struct clkdom * clkdom, clknode_class_t CLK_TOPO_SLOCK(); clknode = clknode_find_by_name(def->name); CLK_TOPO_UNLOCK(); - if (clknode != NULL) { + if (clknode != NULL) { if (!(clknode->flags & CLK_NODE_LINKED) && def->flags & CLK_NODE_LINKED) { /* From owner-svn-src-stable@freebsd.org Thu Nov 5 15:27:38 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A924B46A4C0; Thu, 5 Nov 2020 15:27:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRnT64SnPz4nNm; Thu, 5 Nov 2020 15:27:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87CF51585F; Thu, 5 Nov 2020 15:27:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5FRcn1048296; Thu, 5 Nov 2020 15:27:38 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5FRcoD048295; Thu, 5 Nov 2020 15:27:38 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011051527.0A5FRcoD048295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 5 Nov 2020 15:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367385 - stable/12/sys/dev/rtwn/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/dev/rtwn/usb X-SVN-Commit-Revision: 367385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 15:27:38 -0000 Author: bz Date: Thu Nov 5 15:27:38 2020 New Revision: 367385 URL: https://svnweb.freebsd.org/changeset/base/367385 Log: MFC r366268 (and epoch parts of r357093): rtwn: narrow the epoch area Rather than placing the epoch around the entire receive loop which might call into rtwn_rx_frame() and USB and sleep, split the loop into two and leave us with one unlock/lock cycle as well. PR: 249925 Modified: stable/12/sys/dev/rtwn/usb/rtwn_usb_rx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- stable/12/sys/dev/rtwn/usb/rtwn_usb_rx.c Thu Nov 5 15:08:56 2020 (r367384) +++ stable/12/sys/dev/rtwn/usb/rtwn_usb_rx.c Thu Nov 5 15:27:38 2020 (r367385) @@ -363,11 +363,12 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) void rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { + struct epoch_tracker et; struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct mbuf *m = NULL, *next; + struct mbuf *m0, *m = NULL, *next; struct rtwn_data *data; RTWN_ASSERT_LOCKED(sc); @@ -399,23 +400,31 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ + m0 = m; while (m != NULL) { + M_ASSERTPKTHDR(m); + m->m_pkthdr.PH_loc.ptr = rtwn_rx_frame(sc, m); + m = m->m_nextpkt; + } + NET_EPOCH_ENTER_ET(et); + RTWN_UNLOCK(sc); + m = m0; + while (m != NULL) { next = m->m_nextpkt; m->m_nextpkt = NULL; - ni = rtwn_rx_frame(sc, m); - - RTWN_UNLOCK(sc); - + ni = m->m_pkthdr.PH_loc.ptr; + m->m_pkthdr.PH_loc.ptr = NULL; if (ni != NULL) { (void)ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); } else { (void)ieee80211_input_mimo_all(ic, m); } - RTWN_LOCK(sc); m = next; } + RTWN_LOCK(sc); + NET_EPOCH_EXIT_ET(et); break; default: /* needs it to the inactive queue due to a error. */ From owner-svn-src-stable@freebsd.org Thu Nov 5 19:37:58 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1570946F43F; Thu, 5 Nov 2020 19:37:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRv1y04Qjz3KL7; Thu, 5 Nov 2020 19:37:58 +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 E4F5118E9C; Thu, 5 Nov 2020 19:37:57 +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 0A5Jbvli002355; Thu, 5 Nov 2020 19:37:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5JbvH6002351; Thu, 5 Nov 2020 19:37:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011051937.0A5JbvH6002351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2020 19:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367396 - in stable/12: lib/libipsec sbin/setkey sys/net usr.bin/netstat X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12: lib/libipsec sbin/setkey sys/net usr.bin/netstat X-SVN-Commit-Revision: 367396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 19:37:58 -0000 Author: jhb Date: Thu Nov 5 19:37:56 2020 New Revision: 367396 URL: https://svnweb.freebsd.org/changeset/base/367396 Log: MFC 361810: Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec. At this point, AES is the more common name for Rijndael128. setkey(8) will still accept the old name, and old constants remain for compatiblity. Modified: stable/12/lib/libipsec/pfkey_dump.c stable/12/sbin/setkey/setkey.8 stable/12/sbin/setkey/token.l stable/12/sys/net/pfkeyv2.h stable/12/usr.bin/netstat/ipsec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libipsec/pfkey_dump.c ============================================================================== --- stable/12/lib/libipsec/pfkey_dump.c Thu Nov 5 19:30:31 2020 (r367395) +++ stable/12/lib/libipsec/pfkey_dump.c Thu Nov 5 19:37:56 2020 (r367396) @@ -181,8 +181,8 @@ static struct val2str str_alg_enc[] = { #endif { SADB_X_EALG_CAST128CBC, "cast128-cbc", }, { SADB_X_EALG_BLOWFISHCBC, "blowfish-cbc", }, -#ifdef SADB_X_EALG_RIJNDAELCBC - { SADB_X_EALG_RIJNDAELCBC, "rijndael-cbc", }, +#ifdef SADB_X_EALG_AESCBC + { SADB_X_EALG_AESCBC, "aes-cbc", }, #endif #ifdef SADB_X_EALG_TWOFISHCBC { SADB_X_EALG_TWOFISHCBC, "twofish-cbc", }, Modified: stable/12/sbin/setkey/setkey.8 ============================================================================== --- stable/12/sbin/setkey/setkey.8 Thu Nov 5 19:30:31 2020 (r367395) +++ stable/12/sbin/setkey/setkey.8 Thu Nov 5 19:37:56 2020 (r367396) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 04, 2020 +.Dd June 4, 2020 .Dt SETKEY 8 .Os .\" @@ -625,7 +625,7 @@ null 0 to 2048 rfc2410 blowfish-cbc 40 to 448 rfc2451 cast128-cbc 40 to 128 rfc2451 des-deriv 64 ipsec-ciph-des-derived-01 -rijndael-cbc 128/192/256 rfc3602 +aes-cbc 128/192/256 rfc3602 aes-ctr 160/224/288 rfc3686 aes-gcm-16 160/224/288 rfc4106 camellia-cbc 128/192/256 rfc4312 Modified: stable/12/sbin/setkey/token.l ============================================================================== --- stable/12/sbin/setkey/token.l Thu Nov 5 19:30:31 2020 (r367395) +++ stable/12/sbin/setkey/token.l Thu Nov 5 19:37:56 2020 (r367396) @@ -169,7 +169,8 @@ tcp { yylval.num = 0; return(PR_TCP); } cast128-cbc { yylval.num = SADB_X_EALG_CAST128CBC; BEGIN INITIAL; return(ALG_ENC); } des-deriv { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DESDERIV); } des-32iv { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DES32IV); } -rijndael-cbc { yylval.num = SADB_X_EALG_RIJNDAELCBC; BEGIN INITIAL; return(ALG_ENC); } +rijndael-cbc { yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC); } +aes-cbc { yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC); } aes-ctr { yylval.num = SADB_X_EALG_AESCTR; BEGIN INITIAL; return(ALG_ENC_SALT); } camellia-cbc { yylval.num = SADB_X_EALG_CAMELLIACBC; BEGIN INITIAL; return(ALG_ENC); } aes-gcm-16 { yylval.num = SADB_X_EALG_AESGCM16; BEGIN INITIAL; return(ALG_ENC_SALT); } Modified: stable/12/sys/net/pfkeyv2.h ============================================================================== --- stable/12/sys/net/pfkeyv2.h Thu Nov 5 19:30:31 2020 (r367395) +++ stable/12/sys/net/pfkeyv2.h Thu Nov 5 19:37:56 2020 (r367396) @@ -383,6 +383,7 @@ _Static_assert(sizeof(struct sadb_x_sa_replay) == 8, " #define SADB_EALG_NULL 11 #define SADB_X_EALG_RIJNDAELCBC 12 #define SADB_X_EALG_AES 12 +#define SADB_X_EALG_AESCBC 12 #define SADB_X_EALG_AESCTR 13 #define SADB_X_EALG_AESGCM8 18 /* RFC4106 */ #define SADB_X_EALG_AESGCM12 19 Modified: stable/12/usr.bin/netstat/ipsec.c ============================================================================== --- stable/12/usr.bin/netstat/ipsec.c Thu Nov 5 19:30:31 2020 (r367395) +++ stable/12/usr.bin/netstat/ipsec.c Thu Nov 5 19:37:56 2020 (r367396) @@ -147,7 +147,7 @@ static struct val2str ipsec_espnames[] = { { SADB_EALG_NULL, "null", }, { SADB_X_EALG_CAST128CBC, "cast128-cbc", }, { SADB_X_EALG_BLOWFISHCBC, "blowfish-cbc", }, - { SADB_X_EALG_RIJNDAELCBC, "rijndael-cbc", }, + { SADB_X_EALG_AESCBC, "aes-cbc", }, { SADB_X_EALG_CAMELLIACBC, "camellia-cbc", }, { SADB_X_EALG_AESCTR, "aes-ctr", }, { SADB_X_EALG_AESGCM16, "aes-gcm-16", }, From owner-svn-src-stable@freebsd.org Thu Nov 5 22:35:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D01C82D26C8; Thu, 5 Nov 2020 22:35:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRyz55H3Gz3kY6; Thu, 5 Nov 2020 22:35:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A82231ADD7; Thu, 5 Nov 2020 22:35:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5MZjou012555; Thu, 5 Nov 2020 22:35:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5MZjSx012554; Thu, 5 Nov 2020 22:35:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011052235.0A5MZjSx012554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2020 22:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367401 - stable/12/lib/libc/tests/resolv X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/lib/libc/tests/resolv X-SVN-Commit-Revision: 367401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 22:35:45 -0000 Author: jhb Date: Thu Nov 5 22:35:45 2020 New Revision: 367401 URL: https://svnweb.freebsd.org/changeset/base/367401 Log: MFC 365055: Fix a buffer overrun. getln() returns 'len' valid characters. line[len] is out of bounds. Modified: stable/12/lib/libc/tests/resolv/resolv_test.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/tests/resolv/resolv_test.c ============================================================================== --- stable/12/lib/libc/tests/resolv/resolv_test.c Thu Nov 5 21:44:58 2020 (r367400) +++ stable/12/lib/libc/tests/resolv/resolv_test.c Thu Nov 5 22:35:45 2020 (r367401) @@ -77,15 +77,15 @@ load(const char *fname) if ((fp = fopen(fname, "r")) == NULL) ATF_REQUIRE(fp != NULL); while ((line = fgetln(fp, &len)) != NULL) { - char c = line[len]; + char c = line[len - 1]; char *ptr; - line[len] = '\0'; + line[len - 1] = '\0'; for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) { if (ptr == '\0' || ptr[0] == '#') continue; sl_add(hosts, strdup(ptr)); } - line[len] = c; + line[len - 1] = c; } (void)fclose(fp); From owner-svn-src-stable@freebsd.org Thu Nov 5 22:41:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 821062D26FF; Thu, 5 Nov 2020 22:41:55 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRz6C3HW3z3kr9; Thu, 5 Nov 2020 22:41:55 +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 63B451AF56; Thu, 5 Nov 2020 22:41:55 +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 0A5MftVr018788; Thu, 5 Nov 2020 22:41:55 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5MftxO018787; Thu, 5 Nov 2020 22:41:55 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202011052241.0A5MftxO018787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 5 Nov 2020 22:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367402 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 367402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 22:41:55 -0000 Author: melifaro Date: Thu Nov 5 22:41:54 2020 New Revision: 367402 URL: https://svnweb.freebsd.org/changeset/base/367402 Log: MFC r367114. Fix use-after-free in icmp6_notify_error(). Reported by: Maxime Villard Modified: stable/12/sys/netinet6/icmp6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/icmp6.c ============================================================================== --- stable/12/sys/netinet6/icmp6.c Thu Nov 5 22:35:45 2020 (r367401) +++ stable/12/sys/netinet6/icmp6.c Thu Nov 5 22:41:54 2020 (r367402) @@ -912,6 +912,7 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp } icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off); eip6 = (struct ip6_hdr *)(icmp6 + 1); + bzero(&icmp6dst, sizeof(icmp6dst)); /* Detect the upper level protocol */ { @@ -920,7 +921,6 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp int eoff = off + sizeof(struct icmp6_hdr) + sizeof(struct ip6_hdr); struct ip6ctlparam ip6cp; - struct in6_addr *finaldst = NULL; int icmp6type = icmp6->icmp6_type; struct ip6_frag *fh; struct ip6_rthdr *rth; @@ -994,10 +994,11 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp } rth0 = (struct ip6_rthdr0 *) (mtod(m, caddr_t) + eoff); + /* just ignore a bogus header */ if ((rth0->ip6r0_len % 2) == 0 && (hops = rth0->ip6r0_len/2)) - finaldst = (struct in6_addr *)(rth0 + 1) + (hops - 1); + icmp6dst.sin6_addr = *((struct in6_addr *)(rth0 + 1) + (hops - 1)); } eoff += rthlen; nxt = rth->ip6r_nxt; @@ -1051,13 +1052,10 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp */ eip6 = (struct ip6_hdr *)(icmp6 + 1); - bzero(&icmp6dst, sizeof(icmp6dst)); icmp6dst.sin6_len = sizeof(struct sockaddr_in6); icmp6dst.sin6_family = AF_INET6; - if (finaldst == NULL) + if (IN6_IS_ADDR_UNSPECIFIED(&icmp6dst.sin6_addr)) icmp6dst.sin6_addr = eip6->ip6_dst; - else - icmp6dst.sin6_addr = *finaldst; if (in6_setscope(&icmp6dst.sin6_addr, m->m_pkthdr.rcvif, NULL)) goto freeit; bzero(&icmp6src, sizeof(icmp6src)); @@ -1069,13 +1067,11 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp icmp6src.sin6_flowinfo = (eip6->ip6_flow & IPV6_FLOWLABEL_MASK); - if (finaldst == NULL) - finaldst = &eip6->ip6_dst; ip6cp.ip6c_m = m; ip6cp.ip6c_icmp6 = icmp6; ip6cp.ip6c_ip6 = (struct ip6_hdr *)(icmp6 + 1); ip6cp.ip6c_off = eoff; - ip6cp.ip6c_finaldst = finaldst; + ip6cp.ip6c_finaldst = &icmp6dst.sin6_addr; ip6cp.ip6c_src = &icmp6src; ip6cp.ip6c_nxt = nxt; From owner-svn-src-stable@freebsd.org Thu Nov 5 23:28:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5DBA2D34EB; Thu, 5 Nov 2020 23:28:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CS08G4Y2lz3nKH; Thu, 5 Nov 2020 23:28:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 853291BA45; Thu, 5 Nov 2020 23:28:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A5NSkSZ043723; Thu, 5 Nov 2020 23:28:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A5NSkwK043722; Thu, 5 Nov 2020 23:28:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011052328.0A5NSkwK043722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2020 23:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367405 - stable/12/lib/libc/tests/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/lib/libc/tests/sys X-SVN-Commit-Revision: 367405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 23:28:46 -0000 Author: jhb Date: Thu Nov 5 23:28:46 2020 New Revision: 367405 URL: https://svnweb.freebsd.org/changeset/base/367405 Log: MFC 365280: Pass a valid mode with O_CREATE to open(2). CheriABI is pickier about the arguments to open(2) and crashes with a fault if a mode isn't passed to an open() when O_CREATE is specified. Modified: stable/12/lib/libc/tests/sys/sendfile_test.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/tests/sys/sendfile_test.c ============================================================================== --- stable/12/lib/libc/tests/sys/sendfile_test.c Thu Nov 5 23:28:05 2020 (r367404) +++ stable/12/lib/libc/tests/sys/sendfile_test.c Thu Nov 5 23:28:46 2020 (r367405) @@ -781,7 +781,7 @@ hdtr_negative_bad_pointers_test(int domain) hdtr3.trl_cnt = 1; hdtr3.trailers = (struct iovec*)-1; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); server_sock = setup_tcp_server(domain, port); @@ -836,7 +836,7 @@ offset_negative_value_less_than_zero_test(int domain) server_sock = setup_tcp_server(domain, port); client_sock = setup_tcp_client(domain, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, -1, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -985,7 +985,7 @@ s_negative_not_connected_socket_test(int domain) port = generate_random_port(__LINE__ + domain); client_sock = setup_tcp_server(domain, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -1037,7 +1037,7 @@ ATF_TC_BODY(s_negative_not_descriptor, tc) client_sock = -1; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -1058,7 +1058,7 @@ ATF_TC_BODY(s_negative_not_socket_file_descriptor, tc) { int client_sock, error, fd; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); client_sock = open(_PATH_DEVNULL, O_WRONLY); @@ -1079,7 +1079,7 @@ s_negative_udp_socket_test(int domain) port = generate_random_port(__LINE__ + domain); client_sock = setup_client(domain, SOCK_DGRAM, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); From owner-svn-src-stable@freebsd.org Fri Nov 6 00:07:48 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E1972D4EB6; Fri, 6 Nov 2020 00:07:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CS11H5k2zz3qkH; Fri, 6 Nov 2020 00:07:47 +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 B24D61C484; Fri, 6 Nov 2020 00:07:47 +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 0A607l47068579; Fri, 6 Nov 2020 00:07:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A607lt2068578; Fri, 6 Nov 2020 00:07:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011060007.0A607lt2068578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2020 00:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367408 - in stable: 11/usr.sbin/bhyvectl 12/usr.sbin/bhyvectl X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/usr.sbin/bhyvectl 12/usr.sbin/bhyvectl X-SVN-Commit-Revision: 367408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 00:07:48 -0000 Author: jhb Date: Fri Nov 6 00:07:46 2020 New Revision: 367408 URL: https://svnweb.freebsd.org/changeset/base/367408 Log: MFC 365842,365844: Remove support for setting some obscure fields. 365842: Remove support for setting some obscure fields. Don't permit setting the exception bitmap or VMCS entry interrupt information. These are not generally useful to set. If it is needed in the future, dedicated pseudo registers can be added for these that would be used with vm_set_register(). 365844: Remove no longer used variable. Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/11/usr.sbin/bhyvectl/bhyvectl.c Thu Nov 5 23:42:36 2020 (r367407) +++ stable/11/usr.sbin/bhyvectl/bhyvectl.c Fri Nov 6 00:07:46 2020 (r367408) @@ -299,11 +299,11 @@ static int get_vmcb_virq, get_avic_table; */ static int get_pinbased_ctls, get_procbased_ctls, get_procbased_ctls2; static int get_eptp, get_io_bitmap, get_tsc_offset; -static int get_vmcs_entry_interruption_info, set_vmcs_entry_interruption_info; +static int get_vmcs_entry_interruption_info; static int get_vmcs_interruptibility; uint32_t vmcs_entry_interruption_info; static int get_vmcs_gpa, get_vmcs_gla; -static int get_exception_bitmap, set_exception_bitmap, exception_bitmap; +static int get_exception_bitmap; static int get_cr0_mask, get_cr0_shadow; static int get_cr4_mask, get_cr4_shadow; static int get_cr3_targets; @@ -528,13 +528,6 @@ vm_get_vmcs_field(struct vmctx *ctx, int vcpu, int fie } static int -vm_set_vmcs_field(struct vmctx *ctx, int vcpu, int field, uint64_t val) -{ - - return (vm_set_register(ctx, vcpu, VMCS_IDENT(field), val)); -} - -static int vm_get_vmcb_field(struct vmctx *ctx, int vcpu, int off, int bytes, uint64_t *ret_val) { @@ -542,14 +535,6 @@ vm_get_vmcb_field(struct vmctx *ctx, int vcpu, int off return (vm_get_register(ctx, vcpu, VMCB_ACCESS(off, bytes), ret_val)); } -static int -vm_set_vmcb_field(struct vmctx *ctx, int vcpu, int off, int bytes, - uint64_t val) -{ - - return (vm_set_register(ctx, vcpu, VMCB_ACCESS(off, bytes), val)); -} - enum { VMNAME = 1000, /* avoid collision with return values from getopt */ VCPU, @@ -581,8 +566,6 @@ enum { SET_TR, SET_LDTR, SET_X2APIC_STATE, - SET_EXCEPTION_BITMAP, - SET_VMCS_ENTRY_INTERRUPTION_INFO, SET_CAP, CAPNAME, UNASSIGN_PPTDEV, @@ -1359,8 +1342,6 @@ setup_options(bool cpu_intel) { "set-tr", REQ_ARG, 0, SET_TR }, { "set-ldtr", REQ_ARG, 0, SET_LDTR }, { "set-x2apic-state",REQ_ARG, 0, SET_X2APIC_STATE }, - { "set-exception-bitmap", - REQ_ARG, 0, SET_EXCEPTION_BITMAP }, { "capname", REQ_ARG, 0, CAPNAME }, { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV }, { "setcap", REQ_ARG, 0, SET_CAP }, @@ -1490,8 +1471,6 @@ setup_options(bool cpu_intel) { "get-vmcs-host-pat", NO_ARG, &get_host_pat, 1 }, { "get-vmcs-host-cr0", NO_ARG, &get_host_cr0, 1 }, - { "set-vmcs-entry-interruption-info", - REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "get-vmcs-exit-qualification", NO_ARG, &get_vmcs_exit_qualification, 1 }, { "get-vmcs-exit-inst-length", @@ -1820,14 +1799,6 @@ main(int argc, char *argv[]) x2apic_state = strtol(optarg, NULL, 0); set_x2apic_state = 1; break; - case SET_EXCEPTION_BITMAP: - exception_bitmap = strtoul(optarg, NULL, 0); - set_exception_bitmap = 1; - break; - case SET_VMCS_ENTRY_INTERRUPTION_INFO: - vmcs_entry_interruption_info = strtoul(optarg, NULL, 0); - set_vmcs_entry_interruption_info = 1; - break; case SET_CAP: capval = strtoul(optarg, NULL, 0); setcap = 1; @@ -2010,22 +1981,6 @@ main(int argc, char *argv[]) if (!error && unassign_pptdev) error = vm_unassign_pptdev(ctx, bus, slot, func); - - if (!error && set_exception_bitmap) { - if (cpu_intel) - error = vm_set_vmcs_field(ctx, vcpu, - VMCS_EXCEPTION_BITMAP, - exception_bitmap); - else - error = vm_set_vmcb_field(ctx, vcpu, - VMCB_OFF_EXC_INTERCEPT, - 4, exception_bitmap); - } - - if (!error && cpu_intel && set_vmcs_entry_interruption_info) { - error = vm_set_vmcs_field(ctx, vcpu, VMCS_ENTRY_INTR_INFO, - vmcs_entry_interruption_info); - } if (!error && inject_nmi) { error = vm_inject_nmi(ctx, vcpu); From owner-svn-src-stable@freebsd.org Fri Nov 6 00:07:47 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A0BB2D4C78; Fri, 6 Nov 2020 00:07:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CS11H2NTGz3qdb; Fri, 6 Nov 2020 00:07:47 +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 4483C1C2A2; Fri, 6 Nov 2020 00:07:47 +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 0A607lj1068573; Fri, 6 Nov 2020 00:07:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A607ld1068572; Fri, 6 Nov 2020 00:07:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011060007.0A607ld1068572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2020 00:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367408 - in stable: 11/usr.sbin/bhyvectl 12/usr.sbin/bhyvectl X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/usr.sbin/bhyvectl 12/usr.sbin/bhyvectl X-SVN-Commit-Revision: 367408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 00:07:47 -0000 Author: jhb Date: Fri Nov 6 00:07:46 2020 New Revision: 367408 URL: https://svnweb.freebsd.org/changeset/base/367408 Log: MFC 365842,365844: Remove support for setting some obscure fields. 365842: Remove support for setting some obscure fields. Don't permit setting the exception bitmap or VMCS entry interrupt information. These are not generally useful to set. If it is needed in the future, dedicated pseudo registers can be added for these that would be used with vm_set_register(). 365844: Remove no longer used variable. Modified: stable/12/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/12/usr.sbin/bhyvectl/bhyvectl.c Thu Nov 5 23:42:36 2020 (r367407) +++ stable/12/usr.sbin/bhyvectl/bhyvectl.c Fri Nov 6 00:07:46 2020 (r367408) @@ -299,11 +299,11 @@ static int get_vmcb_virq, get_avic_table; */ static int get_pinbased_ctls, get_procbased_ctls, get_procbased_ctls2; static int get_eptp, get_io_bitmap, get_tsc_offset; -static int get_vmcs_entry_interruption_info, set_vmcs_entry_interruption_info; +static int get_vmcs_entry_interruption_info; static int get_vmcs_interruptibility; uint32_t vmcs_entry_interruption_info; static int get_vmcs_gpa, get_vmcs_gla; -static int get_exception_bitmap, set_exception_bitmap, exception_bitmap; +static int get_exception_bitmap; static int get_cr0_mask, get_cr0_shadow; static int get_cr4_mask, get_cr4_shadow; static int get_cr3_targets; @@ -528,13 +528,6 @@ vm_get_vmcs_field(struct vmctx *ctx, int vcpu, int fie } static int -vm_set_vmcs_field(struct vmctx *ctx, int vcpu, int field, uint64_t val) -{ - - return (vm_set_register(ctx, vcpu, VMCS_IDENT(field), val)); -} - -static int vm_get_vmcb_field(struct vmctx *ctx, int vcpu, int off, int bytes, uint64_t *ret_val) { @@ -542,14 +535,6 @@ vm_get_vmcb_field(struct vmctx *ctx, int vcpu, int off return (vm_get_register(ctx, vcpu, VMCB_ACCESS(off, bytes), ret_val)); } -static int -vm_set_vmcb_field(struct vmctx *ctx, int vcpu, int off, int bytes, - uint64_t val) -{ - - return (vm_set_register(ctx, vcpu, VMCB_ACCESS(off, bytes), val)); -} - enum { VMNAME = 1000, /* avoid collision with return values from getopt */ VCPU, @@ -581,8 +566,6 @@ enum { SET_TR, SET_LDTR, SET_X2APIC_STATE, - SET_EXCEPTION_BITMAP, - SET_VMCS_ENTRY_INTERRUPTION_INFO, SET_CAP, CAPNAME, UNASSIGN_PPTDEV, @@ -1361,8 +1344,6 @@ setup_options(bool cpu_intel) { "set-tr", REQ_ARG, 0, SET_TR }, { "set-ldtr", REQ_ARG, 0, SET_LDTR }, { "set-x2apic-state",REQ_ARG, 0, SET_X2APIC_STATE }, - { "set-exception-bitmap", - REQ_ARG, 0, SET_EXCEPTION_BITMAP }, { "capname", REQ_ARG, 0, CAPNAME }, { "unassign-pptdev", REQ_ARG, 0, UNASSIGN_PPTDEV }, { "setcap", REQ_ARG, 0, SET_CAP }, @@ -1492,8 +1473,6 @@ setup_options(bool cpu_intel) { "get-vmcs-host-pat", NO_ARG, &get_host_pat, 1 }, { "get-vmcs-host-cr0", NO_ARG, &get_host_cr0, 1 }, - { "set-vmcs-entry-interruption-info", - REQ_ARG, 0, SET_VMCS_ENTRY_INTERRUPTION_INFO }, { "get-vmcs-exit-qualification", NO_ARG, &get_vmcs_exit_qualification, 1 }, { "get-vmcs-exit-inst-length", @@ -1822,14 +1801,6 @@ main(int argc, char *argv[]) x2apic_state = strtol(optarg, NULL, 0); set_x2apic_state = 1; break; - case SET_EXCEPTION_BITMAP: - exception_bitmap = strtoul(optarg, NULL, 0); - set_exception_bitmap = 1; - break; - case SET_VMCS_ENTRY_INTERRUPTION_INFO: - vmcs_entry_interruption_info = strtoul(optarg, NULL, 0); - set_vmcs_entry_interruption_info = 1; - break; case SET_CAP: capval = strtoul(optarg, NULL, 0); setcap = 1; @@ -2012,22 +1983,6 @@ main(int argc, char *argv[]) if (!error && unassign_pptdev) error = vm_unassign_pptdev(ctx, bus, slot, func); - - if (!error && set_exception_bitmap) { - if (cpu_intel) - error = vm_set_vmcs_field(ctx, vcpu, - VMCS_EXCEPTION_BITMAP, - exception_bitmap); - else - error = vm_set_vmcb_field(ctx, vcpu, - VMCB_OFF_EXC_INTERCEPT, - 4, exception_bitmap); - } - - if (!error && cpu_intel && set_vmcs_entry_interruption_info) { - error = vm_set_vmcs_field(ctx, vcpu, VMCS_ENTRY_INTR_INFO, - vmcs_entry_interruption_info); - } if (!error && inject_nmi) { error = vm_inject_nmi(ctx, vcpu); From owner-svn-src-stable@freebsd.org Fri Nov 6 00:35:37 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06FBC2D62A1; Fri, 6 Nov 2020 00:35: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CS1dN6l4Pz3s1J; Fri, 6 Nov 2020 00:35: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 DA4631C467; Fri, 6 Nov 2020 00:35: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 0A60Za0u087036; Fri, 6 Nov 2020 00:35:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A60Za8Y087035; Fri, 6 Nov 2020 00:35:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202011060035.0A60Za8Y087035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Nov 2020 00:35:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367411 - stable/12/sys/dev/usb/controller X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/usb/controller X-SVN-Commit-Revision: 367411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 00:35:37 -0000 Author: kib Date: Fri Nov 6 00:35:36 2020 New Revision: 367411 URL: https://svnweb.freebsd.org/changeset/base/367411 Log: MFC r366978: xhci: Handle the case when MSI-X BAR is the same as IO BAR. Modified: stable/12/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/12/sys/dev/usb/controller/xhci_pci.c Fri Nov 6 00:15:52 2020 (r367410) +++ stable/12/sys/dev/usb/controller/xhci_pci.c Fri Nov 6 00:35:36 2020 (r367411) @@ -281,21 +281,29 @@ xhci_pci_attach(device_t self) rid = 0; if (xhci_use_msix && (msix_table = pci_msix_table_bar(self)) >= 0) { - sc->sc_msix_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, - &msix_table, RF_ACTIVE); - if (sc->sc_msix_res == NULL) { - /* May not be enabled */ - device_printf(self, - "Unable to map MSI-X table \n"); + if (msix_table == PCI_XHCI_CBMEM) { + sc->sc_msix_res = sc->sc_io_res; } else { + sc->sc_msix_res = bus_alloc_resource_any(self, + SYS_RES_MEMORY, &msix_table, RF_ACTIVE); + if (sc->sc_msix_res == NULL) { + /* May not be enabled */ + device_printf(self, + "Unable to map MSI-X table\n"); + } + } + if (sc->sc_msix_res != NULL) { count = 1; if (pci_alloc_msix(self, &count) == 0) { if (bootverbose) device_printf(self, "MSI-X enabled\n"); rid = 1; } else { - bus_release_resource(self, SYS_RES_MEMORY, - msix_table, sc->sc_msix_res); + if (sc->sc_msix_res != sc->sc_io_res) { + bus_release_resource(self, + SYS_RES_MEMORY, + msix_table, sc->sc_msix_res); + } sc->sc_msix_res = NULL; } } @@ -391,15 +399,15 @@ xhci_pci_detach(device_t self) sc->sc_irq_res = NULL; pci_release_msi(self); } + if (sc->sc_msix_res != NULL && sc->sc_msix_res != sc->sc_io_res) { + bus_release_resource(self, SYS_RES_MEMORY, + rman_get_rid(sc->sc_msix_res), sc->sc_msix_res); + sc->sc_msix_res = NULL; + } if (sc->sc_io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, sc->sc_io_res); sc->sc_io_res = NULL; - } - if (sc->sc_msix_res) { - bus_release_resource(self, SYS_RES_MEMORY, - rman_get_rid(sc->sc_msix_res), sc->sc_msix_res); - sc->sc_msix_res = NULL; } xhci_uninit(sc); From owner-svn-src-stable@freebsd.org Fri Nov 6 07:14:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33B072E4B5A; Fri, 6 Nov 2020 07:14:05 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSBT90yvSz4jqn; Fri, 6 Nov 2020 07:14:05 +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 1360F21484; Fri, 6 Nov 2020 07:14:05 +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 0A67E45E036391; Fri, 6 Nov 2020 07:14:04 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A67E4kl036390; Fri, 6 Nov 2020 07:14:04 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011060714.0A67E4kl036390@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, 6 Nov 2020 07:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367412 - stable/12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/share/man/man7 X-SVN-Commit-Revision: 367412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 07:14:05 -0000 Author: 0mp (doc,ports committer) Date: Fri Nov 6 07:14:04 2020 New Revision: 367412 URL: https://svnweb.freebsd.org/changeset/base/367412 Log: MFC r367299: Fix a typo in the description of WITH_DEBUG_PORTS For each origin listed in WITH_DEBUG_PORTS, the ports framework sets WITH_DEBUG instead of WITH_DEBUG_PORTS. Modified: stable/12/share/man/man7/ports.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/ports.7 ============================================================================== --- stable/12/share/man/man7/ports.7 Fri Nov 6 00:35:36 2020 (r367411) +++ stable/12/share/man/man7/ports.7 Fri Nov 6 07:14:04 2020 (r367412) @@ -525,7 +525,7 @@ instead of the OpenSSL from the base system. If set, debugging symbols are installed for ports binaries. .It Va WITH_DEBUG_PORTS A list of origins for which to set -.Va WITH_DEBUG_PORTS . +.Va WITH_DEBUG . .It Va WITH_SSP_PORTS .Pq Vt bool If set, enables From owner-svn-src-stable@freebsd.org Fri Nov 6 07:14:34 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 819492E4C3E; Fri, 6 Nov 2020 07:14:34 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSBTk3DXLz4k55; Fri, 6 Nov 2020 07:14:34 +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 615A62133B; Fri, 6 Nov 2020 07:14:34 +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 0A67EY7p036457; Fri, 6 Nov 2020 07:14:34 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A67EY7G036456; Fri, 6 Nov 2020 07:14:34 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011060714.0A67EY7G036456@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, 6 Nov 2020 07:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367413 - stable/11/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/share/man/man7 X-SVN-Commit-Revision: 367413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 07:14:34 -0000 Author: 0mp (doc,ports committer) Date: Fri Nov 6 07:14:33 2020 New Revision: 367413 URL: https://svnweb.freebsd.org/changeset/base/367413 Log: MFC r367299: Fix a typo in the description of WITH_DEBUG_PORTS For each origin listed in WITH_DEBUG_PORTS, the ports framework sets WITH_DEBUG instead of WITH_DEBUG_PORTS. Modified: stable/11/share/man/man7/ports.7 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/ports.7 ============================================================================== --- stable/11/share/man/man7/ports.7 Fri Nov 6 07:14:04 2020 (r367412) +++ stable/11/share/man/man7/ports.7 Fri Nov 6 07:14:33 2020 (r367413) @@ -506,7 +506,7 @@ instead of the OpenSSL from the base system. If set, debugging symbols are installed for ports binaries. .It Va WITH_DEBUG_PORTS A list of origins for which to set -.Va WITH_DEBUG_PORTS . +.Va WITH_DEBUG . .It Va WITH_SSP_PORTS .Pq Vt bool If set, enables From owner-svn-src-stable@freebsd.org Fri Nov 6 07:15:04 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEA092E45F5; Fri, 6 Nov 2020 07:15:04 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSBVJ50xbz4kDG; Fri, 6 Nov 2020 07:15:04 +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 9ED4521502; Fri, 6 Nov 2020 07:15:04 +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 0A67F43C036536; Fri, 6 Nov 2020 07:15:04 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A67F4Gd036535; Fri, 6 Nov 2020 07:15:04 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011060715.0A67F4Gd036535@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, 6 Nov 2020 07:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367414 - stable/12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/share/man/man7 X-SVN-Commit-Revision: 367414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 07:15:04 -0000 Author: 0mp (doc,ports committer) Date: Fri Nov 6 07:15:04 2020 New Revision: 367414 URL: https://svnweb.freebsd.org/changeset/base/367414 Log: MFC r367300: build.7: Mention etcupdate(8) alongside mergemaster(8) Modified: stable/12/share/man/man7/build.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/build.7 ============================================================================== --- stable/12/share/man/man7/build.7 Fri Nov 6 07:14:33 2020 (r367413) +++ stable/12/share/man/man7/build.7 Fri Nov 6 07:15:04 2020 (r367414) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2020 +.Dd November 3, 2020 .Dt BUILD 7 .Os .Sh NAME @@ -834,6 +834,7 @@ make TARGET_ARCH=armv6 DESTDIR=/clients/arm64 installw .Xr release 7 , .Xr tests 7 , .Xr config 8 , +.Xr etcupdate 8 , .Xr mergemaster 8 , .Xr portsnap 8 , .Xr reboot 8 , From owner-svn-src-stable@freebsd.org Fri Nov 6 07:16:22 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77C822E4D34; Fri, 6 Nov 2020 07:16:22 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSBWp2Tpxz4kFH; Fri, 6 Nov 2020 07:16:22 +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 48E5C210E2; Fri, 6 Nov 2020 07:16:22 +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 0A67GMxX036642; Fri, 6 Nov 2020 07:16:22 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A67GMOS036641; Fri, 6 Nov 2020 07:16:22 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202011060716.0A67GMOS036641@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, 6 Nov 2020 07:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367415 - stable/11/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/share/man/man7 X-SVN-Commit-Revision: 367415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 07:16:22 -0000 Author: 0mp (doc,ports committer) Date: Fri Nov 6 07:16:21 2020 New Revision: 367415 URL: https://svnweb.freebsd.org/changeset/base/367415 Log: MFC r367300: build.7: Mention etcupdate(8) alongside mergemaster(8) Modified: stable/11/share/man/man7/build.7 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/build.7 ============================================================================== --- stable/11/share/man/man7/build.7 Fri Nov 6 07:15:04 2020 (r367414) +++ stable/11/share/man/man7/build.7 Fri Nov 6 07:16:21 2020 (r367415) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2019 +.Dd November 3, 2020 .Dt BUILD 7 .Os .Sh NAME @@ -722,6 +722,7 @@ make TARGET_ARCH=armv6 DESTDIR=/clients/arm64 installw .Xr release 7 , .Xr tests 7 , .Xr config 8 , +.Xr etcupdate 8 , .Xr mergemaster 8 , .Xr portsnap 8 , .Xr reboot 8 , From owner-svn-src-stable@freebsd.org Fri Nov 6 17:52:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2007F44523C; Fri, 6 Nov 2020 17:52:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSSdK0B1Xz4Yf7; Fri, 6 Nov 2020 17:52:05 +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 ED5AE28E9F; Fri, 6 Nov 2020 17:52:04 +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 0A6Hq4Cp043549; Fri, 6 Nov 2020 17:52:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A6Hq4YX043546; Fri, 6 Nov 2020 17:52:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011061752.0A6Hq4YX043546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2020 17:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367424 - in stable/12/sys: amd64/amd64 x86/include X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 x86/include X-SVN-Commit-Revision: 367424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 17:52:05 -0000 Author: jhb Date: Fri Nov 6 17:52:04 2020 New Revision: 367424 URL: https://svnweb.freebsd.org/changeset/base/367424 Log: MFC 365642: Add constant for the DE_CFG MSR on AMD CPUs. Modified: stable/12/sys/amd64/amd64/initcpu.c stable/12/sys/x86/include/specialreg.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/12/sys/amd64/amd64/initcpu.c Fri Nov 6 16:33:42 2020 (r367423) +++ stable/12/sys/amd64/amd64/initcpu.c Fri Nov 6 17:52:04 2020 (r367424) @@ -103,7 +103,7 @@ init_amd(void) case 0x10: case 0x12: if ((cpu_feature2 & CPUID2_HV) == 0) - wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + wrmsr(MSR_DE_CFG, rdmsr(MSR_DE_CFG) | 1); break; } @@ -152,9 +152,9 @@ init_amd(void) if (CPUID_TO_FAMILY(cpu_id) == 0x17 && CPUID_TO_MODEL(cpu_id) == 0x1 && (cpu_feature2 & CPUID2_HV) == 0) { /* 1021 */ - msr = rdmsr(0xc0011029); + msr = rdmsr(MSR_DE_CFG); msr |= 0x2000; - wrmsr(0xc0011029, msr); + wrmsr(MSR_DE_CFG, msr); /* 1033 */ msr = rdmsr(MSR_LS_CFG); Modified: stable/12/sys/x86/include/specialreg.h ============================================================================== --- stable/12/sys/x86/include/specialreg.h Fri Nov 6 16:33:42 2020 (r367423) +++ stable/12/sys/x86/include/specialreg.h Fri Nov 6 17:52:04 2020 (r367424) @@ -1091,6 +1091,7 @@ #define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ #define MSR_LS_CFG 0xc0011020 #define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ +#define MSR_DE_CFG 0xc0011029 /* Decode Configuration */ /* MSR_VM_CR related */ #define VM_CR_SVMDIS 0x10 /* SVM: disabled by BIOS */ From owner-svn-src-stable@freebsd.org Sat Nov 7 13:16:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD4172EF1EA; Sat, 7 Nov 2020 13:16:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CSySX4YwRz4nYM; Sat, 7 Nov 2020 13:16:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 751857287; Sat, 7 Nov 2020 13:16:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7DGC52052436; Sat, 7 Nov 2020 13:16:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7DGB0P052434; Sat, 7 Nov 2020 13:16:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202011071316.0A7DGB0P052434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 7 Nov 2020 13:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367446 - in stable/12/sys: geom kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys: geom kern sys X-SVN-Commit-Revision: 367446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 13:16:12 -0000 Author: mav Date: Sat Nov 7 13:16:11 2020 New Revision: 367446 URL: https://svnweb.freebsd.org/changeset/base/367446 Log: MFC r367022: Fix asymmetry in devstat(9) calls by GEOM. Before this GEOM passed bio pointer to transaction end, but not start. It was irrelevant until devstat(9) got DTrace hooks, that appeared to provide bio pointer on I/O completion, but not on submission. Modified: stable/12/sys/geom/geom_io.c stable/12/sys/kern/subr_devstat.c stable/12/sys/sys/devicestat.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom_io.c ============================================================================== --- stable/12/sys/geom/geom_io.c Sat Nov 7 13:09:51 2020 (r367445) +++ stable/12/sys/geom/geom_io.c Sat Nov 7 13:16:11 2020 (r367446) @@ -616,9 +616,9 @@ g_io_request(struct bio *bp, struct g_consumer *cp) mtxp = mtx_pool_find(mtxpool_sleep, pp); mtx_lock(mtxp); if (g_collectstats & G_STATS_PROVIDERS) - devstat_start_transaction(pp->stat, &bp->bio_t0); + devstat_start_transaction_bio_t0(pp->stat, bp); if (g_collectstats & G_STATS_CONSUMERS) - devstat_start_transaction(cp->stat, &bp->bio_t0); + devstat_start_transaction_bio_t0(cp->stat, bp); pp->nstart++; cp->nstart++; mtx_unlock(mtxp); Modified: stable/12/sys/kern/subr_devstat.c ============================================================================== --- stable/12/sys/kern/subr_devstat.c Sat Nov 7 13:09:51 2020 (r367445) +++ stable/12/sys/kern/subr_devstat.c Sat Nov 7 13:16:11 2020 (r367446) @@ -261,6 +261,17 @@ devstat_start_transaction_bio(struct devstat *ds, stru return; binuptime(&bp->bio_t0); + devstat_start_transaction_bio_t0(ds, bp); +} + +void +devstat_start_transaction_bio_t0(struct devstat *ds, struct bio *bp) +{ + + /* sanity check */ + if (ds == NULL) + return; + devstat_start_transaction(ds, &bp->bio_t0); DTRACE_DEVSTAT_BIO_START(); } Modified: stable/12/sys/sys/devicestat.h ============================================================================== --- stable/12/sys/sys/devicestat.h Sat Nov 7 13:09:51 2020 (r367445) +++ stable/12/sys/sys/devicestat.h Sat Nov 7 13:16:11 2020 (r367446) @@ -196,6 +196,7 @@ struct devstat *devstat_new_entry(const void *dev_name void devstat_remove_entry(struct devstat *ds); void devstat_start_transaction(struct devstat *ds, const struct bintime *now); void devstat_start_transaction_bio(struct devstat *ds, struct bio *bp); +void devstat_start_transaction_bio_t0(struct devstat *ds, struct bio *bp); void devstat_end_transaction(struct devstat *ds, u_int32_t bytes, devstat_tag_type tag_type, devstat_trans_flags flags, From owner-svn-src-stable@freebsd.org Sat Nov 7 16:20:38 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79E93463ABC; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT2YL357qz3G4t; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CC8711628; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7GKcQu067328; Sat, 7 Nov 2020 16:20:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7GKcQv067327; Sat, 7 Nov 2020 16:20:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011071620.0A7GKcQv067327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 7 Nov 2020 16:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367449 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 367449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 16:20:38 -0000 Author: jhb Date: Sat Nov 7 16:20:37 2020 New Revision: 367449 URL: https://svnweb.freebsd.org/changeset/base/367449 Log: MFC 366296: Avoid a dubious assignment to bio_data in aio_qbio(). A user pointer is not a suitable value for bio_data and the next block of code always overwrites bio_data anyway. Just use cb->aio_buf directly in the call to vm_fault_quick_hold_pages(). Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/kern/vfs_aio.c ============================================================================== --- stable/12/sys/kern/vfs_aio.c Sat Nov 7 15:38:01 2020 (r367448) +++ stable/12/sys/kern/vfs_aio.c Sat Nov 7 16:20:37 2020 (r367449) @@ -1278,7 +1278,6 @@ aio_qbio(struct proc *p, struct kaiocb *job) bp->bio_length = cb->aio_nbytes; bp->bio_bcount = cb->aio_nbytes; bp->bio_done = aio_biowakeup; - bp->bio_data = (void *)(uintptr_t)cb->aio_buf; bp->bio_offset = cb->aio_offset; bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; bp->bio_dev = dev; @@ -1288,7 +1287,7 @@ aio_qbio(struct proc *p, struct kaiocb *job) if (cb->aio_lio_opcode == LIO_READ) prot |= VM_PROT_WRITE; /* Less backwards than it looks */ job->npages = vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - (vm_offset_t)bp->bio_data, bp->bio_length, prot, job->pages, + (vm_offset_t)cb->aio_buf, bp->bio_length, prot, job->pages, nitems(job->pages)); if (job->npages < 0) { error = EFAULT; From owner-svn-src-stable@freebsd.org Sat Nov 7 16:20:38 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBC7A463C8B; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT2YL5YkNz3Fb1; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1CD61174B; Sat, 7 Nov 2020 16:20:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7GKcs3067334; Sat, 7 Nov 2020 16:20:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7GKcQT067333; Sat, 7 Nov 2020 16:20:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202011071620.0A7GKcQT067333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 7 Nov 2020 16:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367449 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 367449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 16:20:39 -0000 Author: jhb Date: Sat Nov 7 16:20:37 2020 New Revision: 367449 URL: https://svnweb.freebsd.org/changeset/base/367449 Log: MFC 366296: Avoid a dubious assignment to bio_data in aio_qbio(). A user pointer is not a suitable value for bio_data and the next block of code always overwrites bio_data anyway. Just use cb->aio_buf directly in the call to vm_fault_quick_hold_pages(). Modified: stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Sat Nov 7 15:38:01 2020 (r367448) +++ stable/11/sys/kern/vfs_aio.c Sat Nov 7 16:20:37 2020 (r367449) @@ -1280,7 +1280,6 @@ aio_qbio(struct proc *p, struct kaiocb *job) bp->bio_length = cb->aio_nbytes; bp->bio_bcount = cb->aio_nbytes; bp->bio_done = aio_biowakeup; - bp->bio_data = (void *)(uintptr_t)cb->aio_buf; bp->bio_offset = cb->aio_offset; bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; bp->bio_dev = dev; @@ -1290,7 +1289,7 @@ aio_qbio(struct proc *p, struct kaiocb *job) if (cb->aio_lio_opcode == LIO_READ) prot |= VM_PROT_WRITE; /* Less backwards than it looks */ job->npages = vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - (vm_offset_t)bp->bio_data, bp->bio_length, prot, job->pages, + (vm_offset_t)cb->aio_buf, bp->bio_length, prot, job->pages, nitems(job->pages)); if (job->npages < 0) { error = EFAULT; From owner-svn-src-stable@freebsd.org Sat Nov 7 16:34:21 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCBC346434E; Sat, 7 Nov 2020 16:34:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT2s950v5z3HRK; Sat, 7 Nov 2020 16:34:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EDAA11B80; Sat, 7 Nov 2020 16:34:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7GYLtj077968; Sat, 7 Nov 2020 16:34:21 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7GYLvj077967; Sat, 7 Nov 2020 16:34:21 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011071634.0A7GYLvj077967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 7 Nov 2020 16:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367450 - stable/12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/net80211 X-SVN-Commit-Revision: 367450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 16:34:21 -0000 Author: bz Date: Sat Nov 7 16:34:21 2020 New Revision: 367450 URL: https://svnweb.freebsd.org/changeset/base/367450 Log: MFC r367326: net80211: fix a typo Correct a typo referring to the wrong flags in a comment. No functional changes. Modified: stable/12/sys/net80211/_ieee80211.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net80211/_ieee80211.h ============================================================================== --- stable/12/sys/net80211/_ieee80211.h Sat Nov 7 16:20:37 2020 (r367449) +++ stable/12/sys/net80211/_ieee80211.h Sat Nov 7 16:34:21 2020 (r367450) @@ -619,7 +619,7 @@ struct ieee80211_rx_stats { } evm; /* 32 bits */ - uint8_t c_phytype; /* PHY type, FW flags above */ + uint8_t c_phytype; /* PHY type, FP flags above */ uint8_t c_vhtnss; /* VHT - number of spatial streams */ uint8_t c_pad2[2]; }; From owner-svn-src-stable@freebsd.org Sat Nov 7 16:35:49 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CB48464743; Sat, 7 Nov 2020 16:35:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT2ts0n9dz3HY4; Sat, 7 Nov 2020 16:35:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D9D51147F; Sat, 7 Nov 2020 16:35:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7GZmYh078234; Sat, 7 Nov 2020 16:35:48 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7GZmg8078233; Sat, 7 Nov 2020 16:35:48 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202011071635.0A7GZmg8078233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 7 Nov 2020 16:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367451 - stable/12/sys/arm64/arm64 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/arm64/arm64 X-SVN-Commit-Revision: 367451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 16:35:49 -0000 Author: bz Date: Sat Nov 7 16:35:48 2020 New Revision: 367451 URL: https://svnweb.freebsd.org/changeset/base/367451 Log: MFC r367327: arm64: implement bs_sr_ Implement the bs_sr_ generic functions based on the generic mips implementation calling the generic bs_w_ functions in a loop. ral(4) (rt2860.c) panics in RAL_SET_REGION_4() because bs_sr_4() is NULL. It seems ral(4) and ti(4) might be the only consumers of these functions I could find quickly so keeping them in C rather than asm. Modified: stable/12/sys/arm64/arm64/bus_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/bus_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/bus_machdep.c Sat Nov 7 16:34:21 2020 (r367450) +++ stable/12/sys/arm64/arm64/bus_machdep.c Sat Nov 7 16:35:48 2020 (r367451) @@ -116,6 +116,50 @@ generic_bs_subregion(void *t, bus_space_handle_t bsh, return (0); } +/* + * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described + * by tag/handle starting at `offset'. + */ +static void +generic_bs_sr_1(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint8_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr++) + generic_bs_w_1(t, bsh, addr, value); +} + +static void +generic_bs_sr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 2) + generic_bs_w_2(t, bsh, addr, value); +} + +static void +generic_bs_sr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 4) + generic_bs_w_4(t, bsh, addr, value); +} + +static void +generic_bs_sr_8(void *t, bus_space_handle_t bsh, bus_size_t offset, + uint64_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 8) + generic_bs_w_8(t, bsh, addr, value); +} + struct bus_space memmap_bus = { /* cookie */ .bs_cookie = NULL, @@ -175,10 +219,10 @@ struct bus_space memmap_bus = { .bs_sm_8 = NULL, /* set region */ - .bs_sr_1 = NULL, - .bs_sr_2 = NULL, - .bs_sr_4 = NULL, - .bs_sr_8 = NULL, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = generic_bs_sr_8, /* copy */ .bs_c_1 = NULL, From owner-svn-src-stable@freebsd.org Sat Nov 7 18:11:18 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3C26466683; Sat, 7 Nov 2020 18:11:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT5124b05z3P5j; Sat, 7 Nov 2020 18:11:18 +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 9038312A55; Sat, 7 Nov 2020 18:11:18 +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 0A7IBINP038859; Sat, 7 Nov 2020 18:11:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7IB0cG038770; Sat, 7 Nov 2020 18:11:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071811.0A7IB0cG038770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 18:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367457 - in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9 11/stand/efi/libefi 11/s... X-SVN-Commit-Revision: 367457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 18:11:18 -0000 Author: dim Date: Sat Nov 7 18:10:59 2020 New Revision: 367457 URL: https://svnweb.freebsd.org/changeset/base/367457 Log: MFC r344855 (by jhb): Drop "All rights reserved" from my copyright statements. Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19485 Modified: stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c stable/12/lib/libc/tests/gen/makecontext_test.c stable/12/lib/libdevctl/devctl.3 stable/12/lib/libdevctl/devctl.c stable/12/lib/libdevctl/devctl.h stable/12/lib/libkvm/kvm_aarch64.h stable/12/lib/libkvm/kvm_amd64.h stable/12/lib/libkvm/kvm_arm.h stable/12/lib/libkvm/kvm_i386.h stable/12/lib/libkvm/kvm_mips.h stable/12/lib/libkvm/kvm_native.3 stable/12/lib/libkvm/kvm_riscv.h stable/12/lib/libkvm/kvm_sparc64.h stable/12/lib/libsysdecode/errno.c stable/12/lib/libsysdecode/signal.c stable/12/lib/libsysdecode/syscallnames.c stable/12/lib/libsysdecode/sysdecode.3 stable/12/lib/libsysdecode/sysdecode.h stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 stable/12/lib/libsysdecode/sysdecode_cap_rights.3 stable/12/lib/libsysdecode/sysdecode_enum.3 stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3 stable/12/lib/libsysdecode/sysdecode_ioctlname.3 stable/12/lib/libsysdecode/sysdecode_kevent.3 stable/12/lib/libsysdecode/sysdecode_mask.3 stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3 stable/12/lib/libsysdecode/sysdecode_sigcode.3 stable/12/lib/libsysdecode/sysdecode_socket_protocol.3 stable/12/lib/libsysdecode/sysdecode_sockopt_name.3 stable/12/lib/libsysdecode/sysdecode_syscallnames.3 stable/12/lib/libsysdecode/sysdecode_utrace.3 stable/12/lib/libutil/kinfo_getvmobject.3 stable/12/sbin/hastd/refcnt.h stable/12/share/man/man3/sigevent.3 stable/12/share/man/man4/ktr.4 stable/12/share/man/man4/witness.4 stable/12/share/man/man9/BUS_GET_CPUS.9 stable/12/share/man/man9/BUS_RESCAN.9 stable/12/share/man/man9/atomic.9 stable/12/share/man/man9/bus_map_resource.9 stable/12/share/man/man9/critical_enter.9 stable/12/share/man/man9/ithread.9 stable/12/share/man/man9/ktr.9 stable/12/share/man/man9/runqueue.9 stable/12/share/man/man9/scheduler.9 stable/12/share/man/man9/sleepqueue.9 stable/12/share/man/man9/swi.9 stable/12/stand/efi/libefi/devpath.c stable/12/stand/i386/cdboot/cdboot.S stable/12/stand/i386/libi386/pxe.c stable/12/stand/i386/libi386/pxe.h stable/12/stand/i386/pxeldr/pxeldr.S stable/12/sys/amd64/include/intr_machdep.h stable/12/sys/arm/arm/ptrace_machdep.c stable/12/sys/dev/acpica/acpi_isab.c stable/12/sys/dev/acpica/acpi_pcivar.h stable/12/sys/dev/pci/vga_pci.c stable/12/sys/dev/rc/rc.c stable/12/sys/dev/rc/rcreg.h stable/12/sys/i386/pci/pci_pir.c stable/12/sys/kern/kern_ktr.c stable/12/sys/kern/kern_rwlock.c stable/12/sys/kern/subr_lock.c stable/12/sys/kern/subr_sleepqueue.c stable/12/sys/kern/subr_smp.c stable/12/sys/sys/_rwlock.h stable/12/sys/sys/refcount.h stable/12/sys/sys/rwlock.h stable/12/sys/sys/sleepqueue.h stable/12/sys/sys/turnstile.h stable/12/sys/x86/acpica/madt.c stable/12/sys/x86/include/apicvar.h stable/12/sys/x86/include/intr_machdep.h stable/12/sys/x86/isa/atpic.c stable/12/sys/x86/isa/elcr.c stable/12/sys/x86/x86/intr_machdep.c stable/12/sys/x86/x86/io_apic.c stable/12/sys/x86/x86/local_apic.c stable/12/sys/x86/x86/mptable.c stable/12/sys/x86/x86/mptable_pci.c stable/12/sys/x86/xen/pvcpu_enum.c stable/12/tests/sys/capsicum/ioctls_test.c stable/12/tests/sys/kern/ptrace_test.c stable/12/tools/tools/decioctl/decioctl.c stable/12/usr.sbin/bhyve/gdb.c stable/12/usr.sbin/bhyve/gdb.h stable/12/usr.sbin/devctl/devctl.8 stable/12/usr.sbin/devctl/devctl.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c stable/11/lib/libdevctl/devctl.3 stable/11/lib/libdevctl/devctl.c stable/11/lib/libdevctl/devctl.h stable/11/lib/libkvm/kvm_aarch64.h stable/11/lib/libkvm/kvm_amd64.h stable/11/lib/libkvm/kvm_arm.h stable/11/lib/libkvm/kvm_i386.h stable/11/lib/libkvm/kvm_mips.h stable/11/lib/libkvm/kvm_native.3 stable/11/lib/libkvm/kvm_sparc64.h stable/11/lib/libsysdecode/errno.c stable/11/lib/libsysdecode/signal.c stable/11/lib/libsysdecode/syscallnames.c stable/11/lib/libsysdecode/sysdecode.3 stable/11/lib/libsysdecode/sysdecode.h stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 stable/11/lib/libsysdecode/sysdecode_cap_rights.3 stable/11/lib/libsysdecode/sysdecode_enum.3 stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3 stable/11/lib/libsysdecode/sysdecode_ioctlname.3 stable/11/lib/libsysdecode/sysdecode_kevent.3 stable/11/lib/libsysdecode/sysdecode_mask.3 stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 stable/11/lib/libsysdecode/sysdecode_sigcode.3 stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 stable/11/lib/libsysdecode/sysdecode_sockopt_name.3 stable/11/lib/libsysdecode/sysdecode_syscallnames.3 stable/11/lib/libsysdecode/sysdecode_utrace.3 stable/11/lib/libutil/kinfo_getvmobject.3 stable/11/sbin/hastd/refcnt.h stable/11/share/man/man3/sigevent.3 stable/11/share/man/man4/ktr.4 stable/11/share/man/man4/witness.4 stable/11/share/man/man9/BUS_GET_CPUS.9 stable/11/share/man/man9/BUS_RESCAN.9 stable/11/share/man/man9/atomic.9 stable/11/share/man/man9/bus_map_resource.9 stable/11/share/man/man9/critical_enter.9 stable/11/share/man/man9/ithread.9 stable/11/share/man/man9/ktr.9 stable/11/share/man/man9/runqueue.9 stable/11/share/man/man9/scheduler.9 stable/11/share/man/man9/sleepqueue.9 stable/11/share/man/man9/swi.9 stable/11/stand/efi/libefi/devpath.c stable/11/stand/i386/cdboot/cdboot.S stable/11/stand/i386/libi386/pxe.c stable/11/stand/i386/libi386/pxe.h stable/11/stand/i386/pxeldr/pxeldr.S stable/11/sys/amd64/include/intr_machdep.h stable/11/sys/arm/arm/ptrace_machdep.c stable/11/sys/dev/acpica/acpi_isab.c stable/11/sys/dev/acpica/acpi_pcivar.h stable/11/sys/dev/pci/vga_pci.c stable/11/sys/dev/rc/rc.c stable/11/sys/dev/rc/rcreg.h stable/11/sys/i386/pci/pci_pir.c stable/11/sys/kern/kern_ktr.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/subr_lock.c stable/11/sys/kern/subr_sleepqueue.c stable/11/sys/kern/subr_smp.c stable/11/sys/sys/_rwlock.h stable/11/sys/sys/refcount.h stable/11/sys/sys/rwlock.h stable/11/sys/sys/sleepqueue.h stable/11/sys/sys/turnstile.h stable/11/sys/x86/acpica/madt.c stable/11/sys/x86/include/apicvar.h stable/11/sys/x86/include/intr_machdep.h stable/11/sys/x86/isa/atpic.c stable/11/sys/x86/isa/elcr.c stable/11/sys/x86/x86/intr_machdep.c stable/11/sys/x86/x86/io_apic.c stable/11/sys/x86/x86/local_apic.c stable/11/sys/x86/x86/mptable.c stable/11/sys/x86/x86/mptable_pci.c stable/11/sys/x86/xen/pvcpu_enum.c stable/11/tests/sys/capsicum/ioctls_test.c stable/11/tests/sys/kern/ptrace_test.c stable/11/tools/tools/decioctl/decioctl.c stable/11/usr.sbin/devctl/devctl.8 stable/11/usr.sbin/devctl/devctl.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c ============================================================================== --- stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libc/tests/gen/makecontext_test.c ============================================================================== --- stable/12/lib/libc/tests/gen/makecontext_test.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libc/tests/gen/makecontext_test.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2018 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libdevctl/devctl.3 ============================================================================== --- stable/12/lib/libdevctl/devctl.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libdevctl/devctl.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2014 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libdevctl/devctl.c ============================================================================== --- stable/12/lib/libdevctl/devctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libdevctl/devctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libdevctl/devctl.h ============================================================================== --- stable/12/lib/libdevctl/devctl.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libdevctl/devctl.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_aarch64.h ============================================================================== --- stable/12/lib/libkvm/kvm_aarch64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_aarch64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_amd64.h ============================================================================== --- stable/12/lib/libkvm/kvm_amd64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_amd64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_arm.h ============================================================================== --- stable/12/lib/libkvm/kvm_arm.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_arm.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_i386.h ============================================================================== --- stable/12/lib/libkvm/kvm_i386.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_i386.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_mips.h ============================================================================== --- stable/12/lib/libkvm/kvm_mips.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_mips.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_native.3 ============================================================================== --- stable/12/lib/libkvm/kvm_native.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_native.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libkvm/kvm_riscv.h ============================================================================== --- stable/12/lib/libkvm/kvm_riscv.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_riscv.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * Copyright (c) 2019 Mitchell Horne * * Redistribution and use in source and binary forms, with or without Modified: stable/12/lib/libkvm/kvm_sparc64.h ============================================================================== --- stable/12/lib/libkvm/kvm_sparc64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libkvm/kvm_sparc64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/errno.c ============================================================================== --- stable/12/lib/libsysdecode/errno.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/errno.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/signal.c ============================================================================== --- stable/12/lib/libsysdecode/signal.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/signal.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/syscallnames.c ============================================================================== --- stable/12/lib/libsysdecode/syscallnames.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/syscallnames.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode.h ============================================================================== --- stable/12/lib/libsysdecode/sysdecode.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_cap_rights.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_cap_rights.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_cap_rights.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_enum.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_enum.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_enum.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_ioctlname.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_ioctlname.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_ioctlname.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_kevent.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_kevent.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_kevent.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2017 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_mask.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_mask.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_mask.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_sigcode.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_sigcode.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_sigcode.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_socket_protocol.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_socket_protocol.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_socket_protocol.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_sockopt_name.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_sockopt_name.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_sockopt_name.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_syscallnames.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_syscallnames.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_syscallnames.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libsysdecode/sysdecode_utrace.3 ============================================================================== --- stable/12/lib/libsysdecode/sysdecode_utrace.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libsysdecode/sysdecode_utrace.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/lib/libutil/kinfo_getvmobject.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getvmobject.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/lib/libutil/kinfo_getvmobject.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/sbin/hastd/refcnt.h ============================================================================== --- stable/12/sbin/hastd/refcnt.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sbin/hastd/refcnt.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/share/man/man3/sigevent.3 ============================================================================== --- stable/12/share/man/man3/sigevent.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man3/sigevent.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man4/ktr.4 ============================================================================== --- stable/12/share/man/man4/ktr.4 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man4/ktr.4 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man4/witness.4 ============================================================================== --- stable/12/share/man/man4/witness.4 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man4/witness.4 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/BUS_GET_CPUS.9 ============================================================================== --- stable/12/share/man/man9/BUS_GET_CPUS.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/BUS_GET_CPUS.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/BUS_RESCAN.9 ============================================================================== --- stable/12/share/man/man9/BUS_RESCAN.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/BUS_RESCAN.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/atomic.9 ============================================================================== --- stable/12/share/man/man9/atomic.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/atomic.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/bus_map_resource.9 ============================================================================== --- stable/12/share/man/man9/bus_map_resource.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/bus_map_resource.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/critical_enter.9 ============================================================================== --- stable/12/share/man/man9/critical_enter.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/critical_enter.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001,2002 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/ithread.9 ============================================================================== --- stable/12/share/man/man9/ithread.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/ithread.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/ktr.9 ============================================================================== --- stable/12/share/man/man9/ktr.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/ktr.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/runqueue.9 ============================================================================== --- stable/12/share/man/man9/runqueue.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/runqueue.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/scheduler.9 ============================================================================== --- stable/12/share/man/man9/scheduler.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/scheduler.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/sleepqueue.9 ============================================================================== --- stable/12/share/man/man9/sleepqueue.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/sleepqueue.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2004 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/share/man/man9/swi.9 ============================================================================== --- stable/12/share/man/man9/swi.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/share/man/man9/swi.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/stand/efi/libefi/devpath.c ============================================================================== --- stable/12/stand/efi/libefi/devpath.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/stand/efi/libefi/devpath.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/stand/i386/cdboot/cdboot.S ============================================================================== --- stable/12/stand/i386/cdboot/cdboot.S Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/stand/i386/cdboot/cdboot.S Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ # # Copyright (c) 2001 John Baldwin -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: stable/12/stand/i386/libi386/pxe.c ============================================================================== --- stable/12/stand/i386/libi386/pxe.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/stand/i386/libi386/pxe.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,8 +1,8 @@ /*- * Copyright (c) 2000 Alfred Perlstein * Copyright (c) 2000 Paul Saab - * Copyright (c) 2000 John Baldwin * All rights reserved. + * Copyright (c) 2000 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/stand/i386/libi386/pxe.h ============================================================================== --- stable/12/stand/i386/libi386/pxe.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/stand/i386/libi386/pxe.h Sat Nov 7 18:10:59 2020 (r367457) @@ -4,7 +4,6 @@ * Copyright (c) 2000 Paul Saab * All rights reserved. * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/stand/i386/pxeldr/pxeldr.S ============================================================================== --- stable/12/stand/i386/pxeldr/pxeldr.S Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/stand/i386/pxeldr/pxeldr.S Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /* * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/12/sys/amd64/include/intr_machdep.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/amd64/include/intr_machdep.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/arm/arm/ptrace_machdep.c ============================================================================== --- stable/12/sys/arm/arm/ptrace_machdep.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/arm/arm/ptrace_machdep.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/dev/acpica/acpi_isab.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_isab.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/dev/acpica/acpi_isab.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/dev/acpica/acpi_pcivar.h ============================================================================== --- stable/12/sys/dev/acpica/acpi_pcivar.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/dev/acpica/acpi_pcivar.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/dev/pci/vga_pci.c ============================================================================== --- stable/12/sys/dev/pci/vga_pci.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/dev/pci/vga_pci.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/dev/rc/rc.c ============================================================================== --- stable/12/sys/dev/rc/rc.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/dev/rc/rc.c Sat Nov 7 18:10:59 2020 (r367457) @@ -3,8 +3,8 @@ * * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. - * Copyright (C) 2002 by John Baldwin * All rights reserved. + * Copyright (C) 2002 by John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/dev/rc/rcreg.h ============================================================================== --- stable/12/sys/dev/rc/rcreg.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/dev/rc/rcreg.h Sat Nov 7 18:10:59 2020 (r367457) @@ -3,8 +3,8 @@ * * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. - * Copyright (C) 2002 by John Baldwin * All rights reserved. + * Copyright (C) 2002 by John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/i386/pci/pci_pir.c ============================================================================== --- stable/12/sys/i386/pci/pci_pir.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/i386/pci/pci_pir.c Sat Nov 7 18:10:59 2020 (r367457) @@ -4,8 +4,8 @@ * Copyright (c) 1997, Stefan Esser * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi - * Copyright (c) 2004, John Baldwin * All rights reserved. + * Copyright (c) 2004, John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/kern/kern_ktr.c ============================================================================== --- stable/12/sys/kern/kern_ktr.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/kern/kern_ktr.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/kern/kern_rwlock.c ============================================================================== --- stable/12/sys/kern/kern_rwlock.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/kern/kern_rwlock.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/kern/subr_lock.c ============================================================================== --- stable/12/sys/kern/subr_lock.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/kern/subr_lock.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/12/sys/kern/subr_sleepqueue.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/kern/subr_sleepqueue.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/kern/subr_smp.c ============================================================================== --- stable/12/sys/kern/subr_smp.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/kern/subr_smp.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2001, John Baldwin . - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/sys/_rwlock.h ============================================================================== --- stable/12/sys/sys/_rwlock.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/sys/_rwlock.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/sys/refcount.h ============================================================================== --- stable/12/sys/sys/refcount.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/sys/refcount.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/sys/rwlock.h ============================================================================== --- stable/12/sys/sys/rwlock.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/sys/rwlock.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/sys/sleepqueue.h ============================================================================== --- stable/12/sys/sys/sleepqueue.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/sys/sleepqueue.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/sys/turnstile.h ============================================================================== --- stable/12/sys/sys/turnstile.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/sys/turnstile.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/acpica/madt.c ============================================================================== --- stable/12/sys/x86/acpica/madt.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/acpica/madt.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/include/apicvar.h ============================================================================== --- stable/12/sys/x86/include/apicvar.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/include/apicvar.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/include/intr_machdep.h ============================================================================== --- stable/12/sys/x86/include/intr_machdep.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/include/intr_machdep.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/isa/atpic.c ============================================================================== --- stable/12/sys/x86/isa/atpic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/isa/atpic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/isa/elcr.c ============================================================================== --- stable/12/sys/x86/isa/elcr.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/isa/elcr.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/12/sys/x86/x86/intr_machdep.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/x86/intr_machdep.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/x86/io_apic.c ============================================================================== --- stable/12/sys/x86/x86/io_apic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/x86/io_apic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/x86/local_apic.c ============================================================================== --- stable/12/sys/x86/x86/local_apic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/x86/local_apic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2003 John Baldwin * Copyright (c) 1996, by Steve Passe * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/x86/mptable.c ============================================================================== --- stable/12/sys/x86/x86/mptable.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/x86/mptable.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2003 John Baldwin * Copyright (c) 1996, by Steve Passe * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/x86/mptable_pci.c ============================================================================== --- stable/12/sys/x86/x86/mptable_pci.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/x86/mptable_pci.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/sys/x86/xen/pvcpu_enum.c ============================================================================== --- stable/12/sys/x86/xen/pvcpu_enum.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/sys/x86/xen/pvcpu_enum.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,9 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2003 John Baldwin * Copyright (c) 2013 Roger Pau Monné * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/tests/sys/capsicum/ioctls_test.c ============================================================================== --- stable/12/tests/sys/capsicum/ioctls_test.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/tests/sys/capsicum/ioctls_test.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/12/tests/sys/kern/ptrace_test.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/tests/sys/kern/ptrace_test.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/tools/tools/decioctl/decioctl.c ============================================================================== --- stable/12/tools/tools/decioctl/decioctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/tools/tools/decioctl/decioctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2005-2006,2016 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/usr.sbin/bhyve/gdb.c ============================================================================== --- stable/12/usr.sbin/bhyve/gdb.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/usr.sbin/bhyve/gdb.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017-2018 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/usr.sbin/bhyve/gdb.h ============================================================================== --- stable/12/usr.sbin/bhyve/gdb.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/usr.sbin/bhyve/gdb.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/12/usr.sbin/devctl/devctl.8 ============================================================================== --- stable/12/usr.sbin/devctl/devctl.8 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/usr.sbin/devctl/devctl.8 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/12/usr.sbin/devctl/devctl.c ============================================================================== --- stable/12/usr.sbin/devctl/devctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/12/usr.sbin/devctl/devctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-stable@freebsd.org Sat Nov 7 18:11:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3F264663D0; Sat, 7 Nov 2020 18:11:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT51N4Cfvz3P8p; Sat, 7 Nov 2020 18:11:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82E7112B3A; Sat, 7 Nov 2020 18:11:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A7IBaRY038956; Sat, 7 Nov 2020 18:11:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7IBI41038864; Sat, 7 Nov 2020 18:11:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071811.0A7IBI41038864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 18:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367457 - in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9... X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9 11/stand/efi/libefi 11/s... X-SVN-Commit-Revision: 367457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 18:11:36 -0000 Author: dim Date: Sat Nov 7 18:10:59 2020 New Revision: 367457 URL: https://svnweb.freebsd.org/changeset/base/367457 Log: MFC r344855 (by jhb): Drop "All rights reserved" from my copyright statements. Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19485 Modified: stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c stable/11/lib/libdevctl/devctl.3 stable/11/lib/libdevctl/devctl.c stable/11/lib/libdevctl/devctl.h stable/11/lib/libkvm/kvm_aarch64.h stable/11/lib/libkvm/kvm_amd64.h stable/11/lib/libkvm/kvm_arm.h stable/11/lib/libkvm/kvm_i386.h stable/11/lib/libkvm/kvm_mips.h stable/11/lib/libkvm/kvm_native.3 stable/11/lib/libkvm/kvm_sparc64.h stable/11/lib/libsysdecode/errno.c stable/11/lib/libsysdecode/signal.c stable/11/lib/libsysdecode/syscallnames.c stable/11/lib/libsysdecode/sysdecode.3 stable/11/lib/libsysdecode/sysdecode.h stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 stable/11/lib/libsysdecode/sysdecode_cap_rights.3 stable/11/lib/libsysdecode/sysdecode_enum.3 stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3 stable/11/lib/libsysdecode/sysdecode_ioctlname.3 stable/11/lib/libsysdecode/sysdecode_kevent.3 stable/11/lib/libsysdecode/sysdecode_mask.3 stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 stable/11/lib/libsysdecode/sysdecode_sigcode.3 stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 stable/11/lib/libsysdecode/sysdecode_sockopt_name.3 stable/11/lib/libsysdecode/sysdecode_syscallnames.3 stable/11/lib/libsysdecode/sysdecode_utrace.3 stable/11/lib/libutil/kinfo_getvmobject.3 stable/11/sbin/hastd/refcnt.h stable/11/share/man/man3/sigevent.3 stable/11/share/man/man4/ktr.4 stable/11/share/man/man4/witness.4 stable/11/share/man/man9/BUS_GET_CPUS.9 stable/11/share/man/man9/BUS_RESCAN.9 stable/11/share/man/man9/atomic.9 stable/11/share/man/man9/bus_map_resource.9 stable/11/share/man/man9/critical_enter.9 stable/11/share/man/man9/ithread.9 stable/11/share/man/man9/ktr.9 stable/11/share/man/man9/runqueue.9 stable/11/share/man/man9/scheduler.9 stable/11/share/man/man9/sleepqueue.9 stable/11/share/man/man9/swi.9 stable/11/stand/efi/libefi/devpath.c stable/11/stand/i386/cdboot/cdboot.S stable/11/stand/i386/libi386/pxe.c stable/11/stand/i386/libi386/pxe.h stable/11/stand/i386/pxeldr/pxeldr.S stable/11/sys/amd64/include/intr_machdep.h stable/11/sys/arm/arm/ptrace_machdep.c stable/11/sys/dev/acpica/acpi_isab.c stable/11/sys/dev/acpica/acpi_pcivar.h stable/11/sys/dev/pci/vga_pci.c stable/11/sys/dev/rc/rc.c stable/11/sys/dev/rc/rcreg.h stable/11/sys/i386/pci/pci_pir.c stable/11/sys/kern/kern_ktr.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/subr_lock.c stable/11/sys/kern/subr_sleepqueue.c stable/11/sys/kern/subr_smp.c stable/11/sys/sys/_rwlock.h stable/11/sys/sys/refcount.h stable/11/sys/sys/rwlock.h stable/11/sys/sys/sleepqueue.h stable/11/sys/sys/turnstile.h stable/11/sys/x86/acpica/madt.c stable/11/sys/x86/include/apicvar.h stable/11/sys/x86/include/intr_machdep.h stable/11/sys/x86/isa/atpic.c stable/11/sys/x86/isa/elcr.c stable/11/sys/x86/x86/intr_machdep.c stable/11/sys/x86/x86/io_apic.c stable/11/sys/x86/x86/local_apic.c stable/11/sys/x86/x86/mptable.c stable/11/sys/x86/x86/mptable_pci.c stable/11/sys/x86/xen/pvcpu_enum.c stable/11/tests/sys/capsicum/ioctls_test.c stable/11/tests/sys/kern/ptrace_test.c stable/11/tools/tools/decioctl/decioctl.c stable/11/usr.sbin/devctl/devctl.8 stable/11/usr.sbin/devctl/devctl.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c stable/12/lib/libc/tests/gen/makecontext_test.c stable/12/lib/libdevctl/devctl.3 stable/12/lib/libdevctl/devctl.c stable/12/lib/libdevctl/devctl.h stable/12/lib/libkvm/kvm_aarch64.h stable/12/lib/libkvm/kvm_amd64.h stable/12/lib/libkvm/kvm_arm.h stable/12/lib/libkvm/kvm_i386.h stable/12/lib/libkvm/kvm_mips.h stable/12/lib/libkvm/kvm_native.3 stable/12/lib/libkvm/kvm_riscv.h stable/12/lib/libkvm/kvm_sparc64.h stable/12/lib/libsysdecode/errno.c stable/12/lib/libsysdecode/signal.c stable/12/lib/libsysdecode/syscallnames.c stable/12/lib/libsysdecode/sysdecode.3 stable/12/lib/libsysdecode/sysdecode.h stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 stable/12/lib/libsysdecode/sysdecode_cap_rights.3 stable/12/lib/libsysdecode/sysdecode_enum.3 stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3 stable/12/lib/libsysdecode/sysdecode_ioctlname.3 stable/12/lib/libsysdecode/sysdecode_kevent.3 stable/12/lib/libsysdecode/sysdecode_mask.3 stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3 stable/12/lib/libsysdecode/sysdecode_sigcode.3 stable/12/lib/libsysdecode/sysdecode_socket_protocol.3 stable/12/lib/libsysdecode/sysdecode_sockopt_name.3 stable/12/lib/libsysdecode/sysdecode_syscallnames.3 stable/12/lib/libsysdecode/sysdecode_utrace.3 stable/12/lib/libutil/kinfo_getvmobject.3 stable/12/sbin/hastd/refcnt.h stable/12/share/man/man3/sigevent.3 stable/12/share/man/man4/ktr.4 stable/12/share/man/man4/witness.4 stable/12/share/man/man9/BUS_GET_CPUS.9 stable/12/share/man/man9/BUS_RESCAN.9 stable/12/share/man/man9/atomic.9 stable/12/share/man/man9/bus_map_resource.9 stable/12/share/man/man9/critical_enter.9 stable/12/share/man/man9/ithread.9 stable/12/share/man/man9/ktr.9 stable/12/share/man/man9/runqueue.9 stable/12/share/man/man9/scheduler.9 stable/12/share/man/man9/sleepqueue.9 stable/12/share/man/man9/swi.9 stable/12/stand/efi/libefi/devpath.c stable/12/stand/i386/cdboot/cdboot.S stable/12/stand/i386/libi386/pxe.c stable/12/stand/i386/libi386/pxe.h stable/12/stand/i386/pxeldr/pxeldr.S stable/12/sys/amd64/include/intr_machdep.h stable/12/sys/arm/arm/ptrace_machdep.c stable/12/sys/dev/acpica/acpi_isab.c stable/12/sys/dev/acpica/acpi_pcivar.h stable/12/sys/dev/pci/vga_pci.c stable/12/sys/dev/rc/rc.c stable/12/sys/dev/rc/rcreg.h stable/12/sys/i386/pci/pci_pir.c stable/12/sys/kern/kern_ktr.c stable/12/sys/kern/kern_rwlock.c stable/12/sys/kern/subr_lock.c stable/12/sys/kern/subr_sleepqueue.c stable/12/sys/kern/subr_smp.c stable/12/sys/sys/_rwlock.h stable/12/sys/sys/refcount.h stable/12/sys/sys/rwlock.h stable/12/sys/sys/sleepqueue.h stable/12/sys/sys/turnstile.h stable/12/sys/x86/acpica/madt.c stable/12/sys/x86/include/apicvar.h stable/12/sys/x86/include/intr_machdep.h stable/12/sys/x86/isa/atpic.c stable/12/sys/x86/isa/elcr.c stable/12/sys/x86/x86/intr_machdep.c stable/12/sys/x86/x86/io_apic.c stable/12/sys/x86/x86/local_apic.c stable/12/sys/x86/x86/mptable.c stable/12/sys/x86/x86/mptable_pci.c stable/12/sys/x86/xen/pvcpu_enum.c stable/12/tests/sys/capsicum/ioctls_test.c stable/12/tests/sys/kern/ptrace_test.c stable/12/tools/tools/decioctl/decioctl.c stable/12/usr.sbin/bhyve/gdb.c stable/12/usr.sbin/bhyve/gdb.h stable/12/usr.sbin/devctl/devctl.8 stable/12/usr.sbin/devctl/devctl.c Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c ============================================================================== --- stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libdevctl/devctl.3 ============================================================================== --- stable/11/lib/libdevctl/devctl.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libdevctl/devctl.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2014 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libdevctl/devctl.c ============================================================================== --- stable/11/lib/libdevctl/devctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libdevctl/devctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libdevctl/devctl.h ============================================================================== --- stable/11/lib/libdevctl/devctl.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libdevctl/devctl.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_aarch64.h ============================================================================== --- stable/11/lib/libkvm/kvm_aarch64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_aarch64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_amd64.h ============================================================================== --- stable/11/lib/libkvm/kvm_amd64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_amd64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_arm.h ============================================================================== --- stable/11/lib/libkvm/kvm_arm.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_arm.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_i386.h ============================================================================== --- stable/11/lib/libkvm/kvm_i386.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_i386.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_mips.h ============================================================================== --- stable/11/lib/libkvm/kvm_mips.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_mips.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_native.3 ============================================================================== --- stable/11/lib/libkvm/kvm_native.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_native.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libkvm/kvm_sparc64.h ============================================================================== --- stable/11/lib/libkvm/kvm_sparc64.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libkvm/kvm_sparc64.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/errno.c ============================================================================== --- stable/11/lib/libsysdecode/errno.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/errno.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/signal.c ============================================================================== --- stable/11/lib/libsysdecode/signal.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/signal.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/syscallnames.c ============================================================================== --- stable/11/lib/libsysdecode/syscallnames.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/syscallnames.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode.h ============================================================================== --- stable/11/lib/libsysdecode/sysdecode.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_cap_rights.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_cap_rights.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_cap_rights.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_enum.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_enum.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_enum.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_ioctlname.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_ioctlname.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_kevent.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_kevent.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_kevent.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2017 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_mask.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_mask.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_mask.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_sigcode.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_sigcode.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_sigcode.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_socket_protocol.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_sockopt_name.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_sockopt_name.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_sockopt_name.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_syscallnames.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_syscallnames.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_syscallnames.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2016 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libsysdecode/sysdecode_utrace.3 ============================================================================== --- stable/11/lib/libsysdecode/sysdecode_utrace.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libsysdecode/sysdecode_utrace.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/lib/libutil/kinfo_getvmobject.3 ============================================================================== --- stable/11/lib/libutil/kinfo_getvmobject.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/lib/libutil/kinfo_getvmobject.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/sbin/hastd/refcnt.h ============================================================================== --- stable/11/sbin/hastd/refcnt.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sbin/hastd/refcnt.h Sat Nov 7 18:10:59 2020 (r367457) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/share/man/man3/sigevent.3 ============================================================================== --- stable/11/share/man/man3/sigevent.3 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man3/sigevent.3 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man4/ktr.4 ============================================================================== --- stable/11/share/man/man4/ktr.4 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man4/ktr.4 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man4/witness.4 ============================================================================== --- stable/11/share/man/man4/witness.4 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man4/witness.4 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/BUS_GET_CPUS.9 ============================================================================== --- stable/11/share/man/man9/BUS_GET_CPUS.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/BUS_GET_CPUS.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/BUS_RESCAN.9 ============================================================================== --- stable/11/share/man/man9/BUS_RESCAN.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/BUS_RESCAN.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/atomic.9 ============================================================================== --- stable/11/share/man/man9/atomic.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/atomic.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/bus_map_resource.9 ============================================================================== --- stable/11/share/man/man9/bus_map_resource.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/bus_map_resource.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,6 @@ .\" -*- nroff -*- .\" .\" Copyright (c) 2016 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/critical_enter.9 ============================================================================== --- stable/11/share/man/man9/critical_enter.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/critical_enter.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001,2002 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/ithread.9 ============================================================================== --- stable/11/share/man/man9/ithread.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/ithread.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/ktr.9 ============================================================================== --- stable/11/share/man/man9/ktr.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/ktr.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/runqueue.9 ============================================================================== --- stable/11/share/man/man9/runqueue.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/runqueue.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/scheduler.9 ============================================================================== --- stable/11/share/man/man9/scheduler.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/scheduler.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/sleepqueue.9 ============================================================================== --- stable/11/share/man/man9/sleepqueue.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/sleepqueue.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2004 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/share/man/man9/swi.9 ============================================================================== --- stable/11/share/man/man9/swi.9 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/share/man/man9/swi.9 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,5 +1,4 @@ .\" Copyright (c) 2000-2001 John H. Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/stand/efi/libefi/devpath.c ============================================================================== --- stable/11/stand/efi/libefi/devpath.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/stand/efi/libefi/devpath.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/stand/i386/cdboot/cdboot.S ============================================================================== --- stable/11/stand/i386/cdboot/cdboot.S Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/stand/i386/cdboot/cdboot.S Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ # # Copyright (c) 2001 John Baldwin -# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: stable/11/stand/i386/libi386/pxe.c ============================================================================== --- stable/11/stand/i386/libi386/pxe.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/stand/i386/libi386/pxe.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,8 +1,8 @@ /*- * Copyright (c) 2000 Alfred Perlstein * Copyright (c) 2000 Paul Saab - * Copyright (c) 2000 John Baldwin * All rights reserved. + * Copyright (c) 2000 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/stand/i386/libi386/pxe.h ============================================================================== --- stable/11/stand/i386/libi386/pxe.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/stand/i386/libi386/pxe.h Sat Nov 7 18:10:59 2020 (r367457) @@ -4,7 +4,6 @@ * Copyright (c) 2000 Paul Saab * All rights reserved. * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/stand/i386/pxeldr/pxeldr.S ============================================================================== --- stable/11/stand/i386/pxeldr/pxeldr.S Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/stand/i386/pxeldr/pxeldr.S Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /* * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/11/sys/amd64/include/intr_machdep.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/amd64/include/intr_machdep.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/arm/arm/ptrace_machdep.c ============================================================================== --- stable/11/sys/arm/arm/ptrace_machdep.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/arm/arm/ptrace_machdep.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2017 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/dev/acpica/acpi_isab.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_isab.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/dev/acpica/acpi_isab.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/dev/acpica/acpi_pcivar.h ============================================================================== --- stable/11/sys/dev/acpica/acpi_pcivar.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/dev/acpica/acpi_pcivar.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/dev/pci/vga_pci.c ============================================================================== --- stable/11/sys/dev/pci/vga_pci.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/dev/pci/vga_pci.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/dev/rc/rc.c ============================================================================== --- stable/11/sys/dev/rc/rc.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/dev/rc/rc.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,8 +1,8 @@ /*- * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. - * Copyright (C) 2002 by John Baldwin * All rights reserved. + * Copyright (C) 2002 by John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/dev/rc/rcreg.h ============================================================================== --- stable/11/sys/dev/rc/rcreg.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/dev/rc/rcreg.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,8 +1,8 @@ /*- * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. - * Copyright (C) 2002 by John Baldwin * All rights reserved. + * Copyright (C) 2002 by John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/i386/pci/pci_pir.c ============================================================================== --- stable/11/sys/i386/pci/pci_pir.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/i386/pci/pci_pir.c Sat Nov 7 18:10:59 2020 (r367457) @@ -2,8 +2,8 @@ * Copyright (c) 1997, Stefan Esser * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi - * Copyright (c) 2004, John Baldwin * All rights reserved. + * Copyright (c) 2004, John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/kern/kern_ktr.c ============================================================================== --- stable/11/sys/kern/kern_ktr.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/kern/kern_ktr.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2000 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/kern/kern_rwlock.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/kern/subr_lock.c ============================================================================== --- stable/11/sys/kern/subr_lock.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/kern/subr_lock.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/11/sys/kern/subr_sleepqueue.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/kern/subr_sleepqueue.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/kern/subr_smp.c ============================================================================== --- stable/11/sys/kern/subr_smp.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/kern/subr_smp.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2001, John Baldwin . - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/sys/_rwlock.h ============================================================================== --- stable/11/sys/sys/_rwlock.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/sys/_rwlock.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/sys/refcount.h ============================================================================== --- stable/11/sys/sys/refcount.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/sys/refcount.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2005 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/sys/rwlock.h ============================================================================== --- stable/11/sys/sys/rwlock.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/sys/rwlock.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2006 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/sys/sleepqueue.h ============================================================================== --- stable/11/sys/sys/sleepqueue.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/sys/sleepqueue.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/sys/turnstile.h ============================================================================== --- stable/11/sys/sys/turnstile.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/sys/turnstile.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2002 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/acpica/madt.c ============================================================================== --- stable/11/sys/x86/acpica/madt.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/acpica/madt.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/include/apicvar.h ============================================================================== --- stable/11/sys/x86/include/apicvar.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/include/apicvar.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/include/intr_machdep.h ============================================================================== --- stable/11/sys/x86/include/intr_machdep.h Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/include/intr_machdep.h Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/isa/atpic.c ============================================================================== --- stable/11/sys/x86/isa/atpic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/isa/atpic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/isa/elcr.c ============================================================================== --- stable/11/sys/x86/isa/elcr.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/isa/elcr.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2004 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/11/sys/x86/x86/intr_machdep.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/x86/intr_machdep.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/x86/io_apic.c ============================================================================== --- stable/11/sys/x86/x86/io_apic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/x86/io_apic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/x86/local_apic.c ============================================================================== --- stable/11/sys/x86/x86/local_apic.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/x86/local_apic.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,7 @@ /*- - * Copyright (c) 2003 John Baldwin * Copyright (c) 1996, by Steve Passe * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/x86/mptable.c ============================================================================== --- stable/11/sys/x86/x86/mptable.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/x86/mptable.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,7 @@ /*- - * Copyright (c) 2003 John Baldwin * Copyright (c) 1996, by Steve Passe * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/x86/mptable_pci.c ============================================================================== --- stable/11/sys/x86/x86/mptable_pci.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/x86/mptable_pci.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2003 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/sys/x86/xen/pvcpu_enum.c ============================================================================== --- stable/11/sys/x86/xen/pvcpu_enum.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/sys/x86/xen/pvcpu_enum.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,7 +1,7 @@ /*- - * Copyright (c) 2003 John Baldwin * Copyright (c) 2013 Roger Pau Monné * All rights reserved. + * Copyright (c) 2003 John Baldwin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/tests/sys/capsicum/ioctls_test.c ============================================================================== --- stable/11/tests/sys/capsicum/ioctls_test.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/tests/sys/capsicum/ioctls_test.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2018 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/11/tests/sys/kern/ptrace_test.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/tests/sys/kern/ptrace_test.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/tools/tools/decioctl/decioctl.c ============================================================================== --- stable/11/tools/tools/decioctl/decioctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/tools/tools/decioctl/decioctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2005-2006,2016 John H. Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/11/usr.sbin/devctl/devctl.8 ============================================================================== --- stable/11/usr.sbin/devctl/devctl.8 Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/usr.sbin/devctl/devctl.8 Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ .\" .\" Copyright (c) 2015 John Baldwin -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: stable/11/usr.sbin/devctl/devctl.c ============================================================================== --- stable/11/usr.sbin/devctl/devctl.c Sat Nov 7 18:07:55 2020 (r367456) +++ stable/11/usr.sbin/devctl/devctl.c Sat Nov 7 18:10:59 2020 (r367457) @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 John Baldwin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-stable@freebsd.org Sat Nov 7 18:15:29 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B46714666AC; Sat, 7 Nov 2020 18:15:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT55s4kDWz3PFq; Sat, 7 Nov 2020 18:15:29 +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 953A712A62; Sat, 7 Nov 2020 18:15:29 +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 0A7IFTvt041785; Sat, 7 Nov 2020 18:15:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7IFT6A041784; Sat, 7 Nov 2020 18:15:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071815.0A7IFT6A041784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 18:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367458 - in stable: 11 12 X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 367458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 18:15:29 -0000 Author: dim Date: Sat Nov 7 18:15:29 2020 New Revision: 367458 URL: https://svnweb.freebsd.org/changeset/base/367458 Log: MFC r340385 (by emaste): strings: enter capability mode when operating on stdin Reviewed by: oshogbo Sponsored by: The FreeBSD Foundation MFC r340391 (by emaste): Revert r340385, strings capability mode This needs to be reworked for bootstrapping. (This is a record-only merge, so these revisions no longer show up in "svn mergeinfo --show-revs=eligible" output.) Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Sat Nov 7 18:15:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 114794664E1; Sat, 7 Nov 2020 18:15:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT55t02tHz3PV5; Sat, 7 Nov 2020 18:15:30 +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 E8A2E12CBA; Sat, 7 Nov 2020 18:15:29 +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 0A7IFThK041790; Sat, 7 Nov 2020 18:15:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7IFTsb041789; Sat, 7 Nov 2020 18:15:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071815.0A7IFTsb041789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 18:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367458 - in stable: 11 12 X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 367458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 18:15:30 -0000 Author: dim Date: Sat Nov 7 18:15:29 2020 New Revision: 367458 URL: https://svnweb.freebsd.org/changeset/base/367458 Log: MFC r340385 (by emaste): strings: enter capability mode when operating on stdin Reviewed by: oshogbo Sponsored by: The FreeBSD Foundation MFC r340391 (by emaste): Revert r340385, strings capability mode This needs to be reworked for bootstrapping. (This is a record-only merge, so these revisions no longer show up in "svn mergeinfo --show-revs=eligible" output.) Modified: Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable@freebsd.org Sat Nov 7 19:55:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 593A02D053E; Sat, 7 Nov 2020 19:55:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT7Jq1mRnz3kqQ; Sat, 7 Nov 2020 19:55:07 +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 260AB13EC2; Sat, 7 Nov 2020 19:55:07 +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 0A7Jt7oV003661; Sat, 7 Nov 2020 19:55:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7Jt3fE003645; Sat, 7 Nov 2020 19:55:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071955.0A7Jt3fE003645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 19:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367462 - in stable/12: contrib/elftoolchain/elfcopy contrib/elftoolchain/libelf contrib/elftoolchain/libelftc contrib/elftoolchain/readelf contrib/elftoolchain/strings lib/libelf sys/s... X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: contrib/elftoolchain/elfcopy contrib/elftoolchain/libelf contrib/elftoolchain/libelftc contrib/elftoolchain/readelf contrib/elftoolchain/strings lib/libelf sys/sys usr.bin/elfctl usr.bin... X-SVN-Commit-Revision: 367462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 19:55:07 -0000 Author: dim Date: Sat Nov 7 19:55:03 2020 New Revision: 367462 URL: https://svnweb.freebsd.org/changeset/base/367462 Log: Sync up elftoolchain with head, except for the capsicum-related commits, which are incompatible with stable/12. MFC r345360 (by oshogbo): strings: do not depend on stdin Instead of depending on one stdin FILE structure and use freopen(3), pass to the functions appropriate FILE structure. Reviewed by: cem Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D18037 MFC r345361 (by oshogbo): strings: do not continue if getc or getcharacter returns EOF Reported by: cem MFC r345362 (by oshogbo): Fix powerpc and arm builds after r345361. Reported by: jenkins MFC r345364 (by oshogbo): In case of ENCODING_8BIT the EOF code will be pass to putchar. EOF check should be done before (uint8_t)c > 127 test. Reported by: cem MFC r345431 (by oshogbo): strings: return an error code and the char value separately If we returning 32 bits value it's hard to distinguish if the returned value is a valid one or if its an error (in case of EOF). For that reason separate exit code of the function from the returned character. Reported by: cem, se MFC r346323 (by emaste): readelf: speed up readelf -wo Use an array instead of STAILQ, and sort at the end instead of while adding new elements. PR: 212539 Submitted by: Bora Özarslan Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC r346327 (by emaste): readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation MFC r348776 (by csjp): Teach readelf about some OpenBSD ELF program headers - Add constants for OpenBSD wxneeded, bootdata and randomize to the FreeBSD elf_common.h file. This is the file that gets used by the elftoolchain library. - Update readelf and elfdump utilities to decode these program headers if they are encountered. Note: FreeBSD has it's own version of elfdump(1), which will be updated in a subsequent commit. I am adding it here anyway because this diff is going to be submitted upstream. Discussed with: emaste Reviewed by: imp MFC afer: 2 weeks Differential Revision: https://reviews.freebsd.org/D20548 M contrib/elftoolchain/elfdump/elfdump.c M contrib/elftoolchain/readelf/readelf.c M sys/sys/elf_common.h MFC r349510 (by luporl): [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI type) This prints out description text with the meaning of 'Flags' value in PowerPC64. Example: $ readelf -h ~/tmp/t1-Flag2 ELF Header: Magic: 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, big endian Version: 1 (current) OS/ABI: FreeBSD ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC 64-bit Version: 0x1 Entry point address: 0x10010000 Start of program headers: 64 (bytes into file) Start of section headers: 209368 (bytes into file) Flags: 0x2, OpenPOWER ELF V2 ABI Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 34 Section header string table index: 31 Submitted by: alfredo.junior_eldorado.org.br Reviewed by: luporl Differential Revision: https://reviews.freebsd.org/D20782 MFC r350511 (by emaste): readelf: decode NT_GNU_PROPERTY_TYPE_0 / GNU_PROPERTY_X86_FEATURE_1_AND These bits are used for Intel CET IBT/Shadow Stack. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20516 MFC r354544 (by emaste): elfcopy/strip: Ensure sections have required alignment on output Object files may specify insufficient alignment on certain sections, for example due to a bug in NASM[1]. When we detect that case in elfcopy or strip, emit a warning and increase the alignment to the minimum required. The NASM bug was fixed in 2015[2], but we might as well have this fixup (and warning) in elfcopy in case we encounter such a file for any other reason. This might be reworked somewhat upstream - see ELF Tool Chain ticket 485[3]. [1] https://bugzilla.nasm.us/show_bug.cgi?id=3392307 [2] https://repo.or.cz/w/nasm.git/commit/1f0cb0f2c1ba632c0fab02424928cfb756a9160c [3] https://sourceforge.net/p/elftoolchain/tickets/485/ PR: 198611 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2292 MFC r357540 (by markj): readelf: Fix a double close of the input file. The caller of dump_object() is responsible for opening the file, let it be responsible for closing too. CID: 1411588 Sponsored by: The FreeBSD Foundation MFC r357541 (by markj): readelf: Fix the check for an error from realloc(). Use err() instead of errx() while here, since realloc() sets errno. CID: 1401326 Sponsored by: The FreeBSD Foundation MFC r358499 (by emaste): readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation MFC r358631 (by emaste): Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 MFC r358637 (by emaste): readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC r358639 (by emaste): readelf: simplify namesz / descsz checks Sponsored by: The FreeBSD Foundation MFC r358685 (by emaste): libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation MFC r358706 (by emaste): readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation MFC r358708 (by emaste): readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation MFC r358713 (by emaste): readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation MFC r359189 (by emaste): readelf: simplify Xen string note printing Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24140 MFC r361662 (by emaste): readelf: add more DT_FLAGS_1 flags Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html > DF_1_SINGLETON Singleton symbols exist. > DF_1_STUB Object is a stub. > DF_1_PIE Object is a position-independent executable. Sponsored by: The FreeBSD Foundation MFC r364517 (by kib): Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64. Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 MFC r365489 (by bdragon): [PowerPC64LE] PPC64LE support for libelf. Fix native detection when building on powerpc64le. I will be submitting this and r361104 upstream shortly. Sponsored by: Tag1 Consulting, Inc. MFC r366977 (by emaste): libelf: add compression header support GNU and Oracle libelf implementations added support for section compression, intended to reduce the size of DWARF debug info (which might be an order of magnitude larger than the code). There are two compressed ELF section formats: 1. Old GNU - sections are renmaed to start with 'z'. Section contains a magic number, uncompressed size, and compressed data. 2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag. The compression header contains the compression type, uncompressed size, and uncompressed alignment. The second style is preferred and this change implements only that one. Submitted by: Tiger Gao Reviewed by: markj Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24566 MFC r367209 (by emaste): readelf: Add -z decompression support Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 MFC r367238 (by bdragon): Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC with: r367209 MFC r367322 (by dim): Merge elftoolchain r3877 (by jkoshy): Incorporate fixes from Dimitry Andric: - Use a BUFFER_GROW() macro to avoid rounding errors in capacity calculations. - Fix a bug introduced in [r3531]. - Fix handling of nested template parameters. Ticket: #581 This should fix a number of assertions on elftoolchain's cxxfilt, and allow it to correctly demangle several names that it could not handle before. Obtained from: https://sourceforge.net/p/elftoolchain/code/3877/ PR: 250702 Added: stable/12/contrib/elftoolchain/libelf/gelf_chdr.c - copied unchanged from r366977, head/contrib/elftoolchain/libelf/gelf_chdr.c stable/12/contrib/elftoolchain/libelf/gelf_getchdr.3 - copied unchanged from r366977, head/contrib/elftoolchain/libelf/gelf_getchdr.3 stable/12/contrib/elftoolchain/libelf/libelf_chdr.c - copied unchanged from r366977, head/contrib/elftoolchain/libelf/libelf_chdr.c Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c stable/12/contrib/elftoolchain/libelf/Version.map stable/12/contrib/elftoolchain/libelf/_libelf.h stable/12/contrib/elftoolchain/libelf/_libelf_config.h stable/12/contrib/elftoolchain/libelf/gelf.3 stable/12/contrib/elftoolchain/libelf/gelf.h stable/12/contrib/elftoolchain/libelf/libelf.h stable/12/contrib/elftoolchain/libelf/libelf_convert.m4 stable/12/contrib/elftoolchain/libelftc/_libelftc.h stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c stable/12/contrib/elftoolchain/readelf/readelf.1 stable/12/contrib/elftoolchain/readelf/readelf.c stable/12/contrib/elftoolchain/strings/strings.c stable/12/lib/libelf/Makefile stable/12/sys/sys/elf_common.h stable/12/usr.bin/elfctl/elfctl.c stable/12/usr.bin/readelf/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- stable/12/contrib/elftoolchain/elfcopy/sections.c Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/elfcopy/sections.c Sat Nov 7 19:55:03 2020 (r367462) @@ -890,6 +890,43 @@ pad_section(struct elfcopy *ecp, struct section *s) elf_errmsg(-1)); } +static int +section_type_alignment(int sht, int class) +{ + switch (sht) + { + case SHT_DYNAMIC: + case SHT_DYNSYM: + case SHT_FINI_ARRAY: + case SHT_GNU_HASH: + case SHT_INIT_ARRAY: + case SHT_PREINIT_ARRAY: + case SHT_REL: + case SHT_RELA: + case SHT_SYMTAB: + return (class == ELFCLASS64 ? 8 : 4); + case SHT_SUNW_move: + return (8); + case SHT_GNU_LIBLIST: + case SHT_GROUP: + case SHT_HASH: + case SHT_NOTE: + case SHT_SUNW_verdef: /* == SHT_GNU_verdef */ + case SHT_SUNW_verneed: /* == SHT_GNU_verneed */ + case SHT_SYMTAB_SHNDX: + return (4); + case SHT_SUNW_syminfo: + case SHT_SUNW_versym: /* == SHT_GNU_versym */ + return (2); + case SHT_NOBITS: + case SHT_PROGBITS: + case SHT_STRTAB: + case SHT_SUNW_dof: + return (1); + } + return (1); +} + void resync_sections(struct elfcopy *ecp) { @@ -897,6 +934,7 @@ resync_sections(struct elfcopy *ecp) GElf_Shdr osh; uint64_t off; int first; + int min_alignment; ps = NULL; first = 1; @@ -919,6 +957,12 @@ resync_sections(struct elfcopy *ecp) /* Align section offset. */ if (s->align == 0) s->align = 1; + min_alignment = section_type_alignment(s->type, ecp->oec); + if (s->align < INT_MAX && (int)s->align < min_alignment) { + warnx("section %s alignment %d increased to %d", + s->name, (int)s->align, min_alignment); + s->align = min_alignment; + } if (off <= s->off) { if (!s->loadable || (ecp->flags & RELOCATABLE)) s->off = roundup(off, s->align); @@ -948,6 +992,7 @@ resync_sections(struct elfcopy *ecp) errx(EXIT_FAILURE, "gelf_getshdr() failed: %s", elf_errmsg(-1)); osh.sh_addr = s->vma; + osh.sh_addralign = s->align; osh.sh_offset = s->off; osh.sh_size = s->sz; if (!gelf_update_shdr(s->os, &osh)) Modified: stable/12/contrib/elftoolchain/libelf/Version.map ============================================================================== --- stable/12/contrib/elftoolchain/libelf/Version.map Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/Version.map Sat Nov 7 19:55:03 2020 (r367462) @@ -91,6 +91,13 @@ global: gelf_update_symshndx; gelf_xlatetof; gelf_xlatetom; +}; + +R1.1 { +global: + elf32_getchdr; + elf64_getchdr; + gelf_getchdr; local: *; -}; +} R1.0; Modified: stable/12/contrib/elftoolchain/libelf/_libelf.h ============================================================================== --- stable/12/contrib/elftoolchain/libelf/_libelf.h Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/_libelf.h Sat Nov 7 19:55:03 2020 (r367462) @@ -220,6 +220,7 @@ size_t _libelf_fsize(Elf_Type _t, int _elfclass, unsig size_t count); _libelf_translator_function *_libelf_get_translator(Elf_Type _t, int _direction, int _elfclass, int _elfmachine); +void *_libelf_getchdr(Elf_Scn *_e, int _elfclass); void *_libelf_getphdr(Elf *_e, int _elfclass); void *_libelf_getshdr(Elf_Scn *_scn, int _elfclass); void _libelf_init_elf(Elf *_e, Elf_Kind _kind); Modified: stable/12/contrib/elftoolchain/libelf/_libelf_config.h ============================================================================== --- stable/12/contrib/elftoolchain/libelf/_libelf_config.h Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/_libelf_config.h Sat Nov 7 19:55:03 2020 (r367462) @@ -94,7 +94,11 @@ #elif defined(__powerpc64__) #define LIBELF_ARCH EM_PPC64 +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define LIBELF_BYTEORDER ELFDATA2LSB +#else #define LIBELF_BYTEORDER ELFDATA2MSB +#endif #define LIBELF_CLASS ELFCLASS64 #elif defined(__powerpc__) Modified: stable/12/contrib/elftoolchain/libelf/gelf.3 ============================================================================== --- stable/12/contrib/elftoolchain/libelf/gelf.3 Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/gelf.3 Sat Nov 7 19:55:03 2020 (r367462) @@ -23,7 +23,7 @@ .\" .\" $Id: gelf.3 3743 2019-06-12 19:36:30Z jkoshy $ .\" -.Dd June 12, 2019 +.Dd October 23, 2020 .Dt GELF 3 .Os .Sh NAME @@ -45,6 +45,8 @@ The GElf API defines the following class-independent d .Bl -tag -width GElf_Sxword .It Vt GElf_Addr A representation of ELF addresses. +.It Vt GElf_Chdr +A class-independent representation of an ELF Compression Header. .It Vt GElf_Dyn A class-independent representation of ELF .Sy .dynamic @@ -144,6 +146,8 @@ native representation. .El .It "Retrieving ELF Data" .Bl -tag -compact -width indent +.It Fn gelf_getchdr +Retrieve an ELF Compression Header from the underlying ELF descriptor. .It Fn gelf_getdyn Retrieve an ELF .Sy .dynamic Modified: stable/12/contrib/elftoolchain/libelf/gelf.h ============================================================================== --- stable/12/contrib/elftoolchain/libelf/gelf.h Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/gelf.h Sat Nov 7 19:55:03 2020 (r367462) @@ -39,6 +39,7 @@ typedef Elf64_Sxword GElf_Sxword; /* Signed long words typedef Elf64_Word GElf_Word; /* Unsigned words (32 bit) */ typedef Elf64_Xword GElf_Xword; /* Unsigned long words (64 bit) */ +typedef Elf64_Chdr GElf_Chdr; /* Compressed section header */ typedef Elf64_Dyn GElf_Dyn; /* ".dynamic" section entries */ typedef Elf64_Ehdr GElf_Ehdr; /* ELF header */ typedef Elf64_Phdr GElf_Phdr; /* Program header */ @@ -73,6 +74,7 @@ extern "C" { long gelf_checksum(Elf *_elf); size_t gelf_fsize(Elf *_elf, Elf_Type _type, size_t _count, unsigned int _version); +GElf_Chdr *gelf_getchdr(Elf_Scn *_scn, GElf_Chdr *_dst); int gelf_getclass(Elf *_elf); GElf_Dyn *gelf_getdyn(Elf_Data *_data, int _index, GElf_Dyn *_dst); GElf_Ehdr *gelf_getehdr(Elf *_elf, GElf_Ehdr *_dst); Copied: stable/12/contrib/elftoolchain/libelf/gelf_chdr.c (from r366977, head/contrib/elftoolchain/libelf/gelf_chdr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/elftoolchain/libelf/gelf_chdr.c Sat Nov 7 19:55:03 2020 (r367462, copy of r366977, head/contrib/elftoolchain/libelf/gelf_chdr.c) @@ -0,0 +1,82 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Tiger Gao under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 +#include +#include +#include +#include + +#include "_libelf.h" + +Elf32_Chdr * +elf32_getchdr(Elf_Scn *s) +{ + return (_libelf_getchdr(s, ELFCLASS32)); +} + +Elf64_Chdr * +elf64_getchdr(Elf_Scn *s) +{ + return (_libelf_getchdr(s, ELFCLASS64)); +} + +GElf_Chdr * +gelf_getchdr(Elf_Scn *s, GElf_Chdr *d) +{ + int ec; + void *ch; + Elf32_Chdr *ch32; + Elf64_Chdr *ch64; + + if (d == NULL) { + LIBELF_SET_ERROR(ARGUMENT, 0); + return (NULL); + } + + if ((ch = _libelf_getchdr(s, ELFCLASSNONE)) == NULL) + return (NULL); + + ec = s->s_elf->e_class; + assert(ec == ELFCLASS32 || ec == ELFCLASS64); + + if (ec == ELFCLASS32) { + ch32 = (Elf32_Chdr *)ch; + + d->ch_type = (Elf64_Word)ch32->ch_type; + d->ch_size = (Elf64_Xword)ch32->ch_size; + d->ch_addralign = (Elf64_Xword)ch32->ch_addralign; + } else { + ch64 = (Elf64_Chdr *)ch; + *d = *ch64; + } + + return (d); +} Copied: stable/12/contrib/elftoolchain/libelf/gelf_getchdr.3 (from r366977, head/contrib/elftoolchain/libelf/gelf_getchdr.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/elftoolchain/libelf/gelf_getchdr.3 Sat Nov 7 19:55:03 2020 (r367462, copy of r366977, head/contrib/elftoolchain/libelf/gelf_getchdr.3) @@ -0,0 +1,117 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2020 The FreeBSD Foundation +.\" +.\" This document was written by Tiger Gao under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE 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. +.\" +.\" $Id: gelf_getchdr.3 3639 2020-10-20 16:07:02Z tig $ +.\" +.Dd October 23, 2020 +.Dt GELF_GETCHDR 3 +.Os +.Sh NAME +.Nm elf32_getchdr , +.Nm elf64_getchdr , +.Nm gelf_getchdr +.Nd retrieve the compression header of a section +.Sh LIBRARY +.Lb libelf +.Sh SYNOPSIS +.In libelf.h +.Ft "Elf32_Chdr *" +.Fn elf32_getchdr "Elf_Scn *s" +.Ft "Elf64_Chdr *" +.Fn elf64_getchdr "Elf_Scn *s" +.In gelf.h +.Ft "GElf_Chdr *" +.Fn gelf_getchdr "Elf_Scn *scn" "GElf_Chdr *chdr" +.Sh DESCRIPTION +These functions return a pointer to the ELF Compression Header data +structure associated with section descriptor +.Ar scn . +.Pp +Function +.Fn elf32_getchdr +retrieves a pointer to an +.Vt Elf32_Chdr +structure. +Section descriptor +.Ar scn +must be associated with an ELF descriptor of class +.Dv ELFCLASS32 . +.Pp +Function +.Fn elf64_getchdr +retrieves a pointer to an +.Vt Elf64_Chdr +structure. +Section descriptor +.Ar scn +must be associated with an ELF descriptor of class +.Dv ELFCLASS64 . +.Pp +Function +.Fn gelf_getchdr +copies the values in the compression header associated with argument +.Ar scn +to the structure pointed to be argument +.Ar dst . +The +.Vt GElf_Chdr +data structure is described in +.Xr gelf 3 . +.Sh RETURN VALUES +Functions +.Fn elf32_getchdr +and +.Fn elf64_getchdr +return a valid pointer to the appropriate compression header on success +or NULL if an error was encountered. +.Pp +Function +.Fn gelf_getchdr +returns argument +.Ar dst +if successful, or NULL if an error was encountered. +.Sh ERRORS +These functions may fail with the following errors: +.Bl -tag -width "[ELF_E_RESOURCE]" +.It Bq Er ELF_E_INVALID_SECTION_FLAGS +Arguments +.Ar scn +has invalid flags. +.It Bq Er ELF_E_INVALID_SECTION_TYPE +Argument +.Ar scn +has invalid type. +.It Bq Er ELF_E_NOT_COMPRESSED +Argument +.Ar scn +is not compressed. +.El +.Sh SEE ALSO +.Xr elf 3 , +.Xr elf_getscn 3 , +.Xr gelf 3 , Modified: stable/12/contrib/elftoolchain/libelf/libelf.h ============================================================================== --- stable/12/contrib/elftoolchain/libelf/libelf.h Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/libelf.h Sat Nov 7 19:55:03 2020 (r367462) @@ -162,6 +162,9 @@ enum Elf_Error { ELF_E_SEQUENCE, /* API calls out of sequence */ ELF_E_UNIMPL, /* Feature is unimplemented */ ELF_E_VERSION, /* Unknown API version */ + ELF_E_INVALID_SECTION_FLAGS, /* Invalid ELF section header flags */ + ELF_E_INVALID_SECTION_TYPE, /* Invalid ELF section header type */ + ELF_E_NOT_COMPRESSED, /* Section is not compressed */ ELF_E_NUM /* Max error number */ }; @@ -227,6 +230,7 @@ unsigned int elf_version(unsigned int _version); long elf32_checksum(Elf *_elf); size_t elf32_fsize(Elf_Type _type, size_t _count, unsigned int _version); +Elf32_Chdr *elf32_getchdr(Elf_Scn *_scn); Elf32_Ehdr *elf32_getehdr(Elf *_elf); Elf32_Phdr *elf32_getphdr(Elf *_elf); Elf32_Shdr *elf32_getshdr(Elf_Scn *_scn); @@ -240,6 +244,7 @@ Elf_Data *elf32_xlatetom(Elf_Data *_dst, const Elf_Dat long elf64_checksum(Elf *_elf); size_t elf64_fsize(Elf_Type _type, size_t _count, unsigned int _version); +Elf64_Chdr *elf64_getchdr(Elf_Scn *_scn); Elf64_Ehdr *elf64_getehdr(Elf *_elf); Elf64_Phdr *elf64_getphdr(Elf *_elf); Elf64_Shdr *elf64_getshdr(Elf_Scn *_scn); Copied: stable/12/contrib/elftoolchain/libelf/libelf_chdr.c (from r366977, head/contrib/elftoolchain/libelf/libelf_chdr.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/elftoolchain/libelf/libelf_chdr.c Sat Nov 7 19:55:03 2020 (r367462, copy of r366977, head/contrib/elftoolchain/libelf/libelf_chdr.c) @@ -0,0 +1,104 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Tiger Gao under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 +#include + +#include "_libelf.h" + +void * +_libelf_getchdr(Elf_Scn *s, int ec) +{ + Elf *e; + void *sh; + Elf32_Shdr *sh32; + Elf64_Shdr *sh64; + + sh32 = NULL; + sh64 = NULL; + + if (s == NULL || (e = s->s_elf) == NULL || e->e_kind != ELF_K_ELF) { + LIBELF_SET_ERROR(ARGUMENT, 0); + return (NULL); + } + + if (ec == ELFCLASSNONE) { + ec = e->e_class; + } else if (ec != e->e_class) { + LIBELF_SET_ERROR(CLASS, 0); + return (NULL); + } + + if ((sh = _libelf_getshdr(s, ec)) == NULL) { + LIBELF_SET_ERROR(HEADER, 0); + return (NULL); + } + + if (ec == ELFCLASS32) { + sh32 = (Elf32_Shdr *)sh; + if ((sh32->sh_flags & SHF_ALLOC) != 0) { + LIBELF_SET_ERROR(INVALID_SECTION_FLAGS, 0); + return (NULL); + } + + if (sh32->sh_type == SHT_NULL || sh32->sh_type == SHT_NOBITS) { + LIBELF_SET_ERROR(INVALID_SECTION_TYPE, 0); + return (NULL); + } + + if ((sh32->sh_flags & SHF_COMPRESSED) == 0) { + LIBELF_SET_ERROR(NOT_COMPRESSED, 0); + return (NULL); + } + } else { + sh64 = (Elf64_Shdr *)sh; + if ((sh64->sh_flags & SHF_ALLOC) != 0) { + LIBELF_SET_ERROR(INVALID_SECTION_FLAGS, 0); + return (NULL); + } + + if (sh64->sh_type == SHT_NULL || sh64->sh_type == SHT_NOBITS) { + LIBELF_SET_ERROR(INVALID_SECTION_TYPE, 0); + return (NULL); + } + + if ((sh64->sh_flags & SHF_COMPRESSED) == 0) { + LIBELF_SET_ERROR(NOT_COMPRESSED, 0); + return (NULL); + } + } + + Elf_Data *d = elf_getdata(s, NULL); + + if (!d) + return (NULL); + + return ((void *)d->d_buf); +} Modified: stable/12/contrib/elftoolchain/libelf/libelf_convert.m4 ============================================================================== --- stable/12/contrib/elftoolchain/libelf/libelf_convert.m4 Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelf/libelf_convert.m4 Sat Nov 7 19:55:03 2020 (r367462) @@ -1022,7 +1022,7 @@ _libelf_cvt_NOTE_tof(unsigned char *dst, size_t dsz, u count -= sizeof(Elf_Note); if (count < sz) - sz = count; + return (0); (void) memcpy(dst, src, sz); Modified: stable/12/contrib/elftoolchain/libelftc/_libelftc.h ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/_libelftc.h Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelftc/_libelftc.h Sat Nov 7 19:55:03 2020 (r367462) @@ -56,6 +56,7 @@ struct vector_str { }; #define BUFFER_GROWFACTOR 1.618 +#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR) #define ELFTC_FAILURE 0 #define ELFTC_ISDIGIT(C) (isdigit((C) & 0xFF)) Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sat Nov 7 19:55:03 2020 (r367462) @@ -2135,10 +2135,10 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddat if (err == 0) return (0); - assert(ddata->output.size > 0); + assert(ddata->cur_output->size > 0); if (vector_read_cmd_find(&ddata->cmd, READ_TMPL) == NULL) ddata->last_sname = - ddata->output.container[ddata->output.size - 1]; + ddata->cur_output->container[ddata->output.size - 1]; ddata->cur += len; @@ -2421,7 +2421,7 @@ cpp_demangle_read_tmpl_args(struct cpp_demangle_data * return (0); limit = 0; - v = &ddata->output; + v = ddata->cur_output; for (;;) { idx = v->size; if (!cpp_demangle_read_tmpl_arg(ddata)) @@ -3909,7 +3909,7 @@ vector_read_cmd_push(struct vector_read_cmd *v, enum r return (0); if (v->size == v->capacity) { - tmp_cap = v->capacity * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(v->capacity); if ((tmp_r_ctn = malloc(sizeof(*tmp_r_ctn) * tmp_cap)) == NULL) return (0); for (i = 0; i < v->size; ++i) @@ -3974,7 +3974,7 @@ vector_type_qualifier_push(struct vector_type_qualifie return (0); if (v->size == v->capacity) { - tmp_cap = v->capacity * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(v->capacity); if ((tmp_ctn = malloc(sizeof(enum type_qualifier) * tmp_cap)) == NULL) return (0); Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c Sat Nov 7 19:55:03 2020 (r367462) @@ -152,7 +152,7 @@ vector_str_grow(struct vector_str *v) assert(v->capacity > 0); - tmp_cap = v->capacity * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(v->capacity); assert(tmp_cap > v->capacity); @@ -253,7 +253,7 @@ vector_str_push_vector_head(struct vector_str *dst, st if (dst == NULL || org == NULL) return (false); - tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(dst->size + org->size); if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) return (false); @@ -293,7 +293,7 @@ vector_str_push_vector(struct vector_str *dst, struct if (dst == NULL || org == NULL) return (false); - tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(dst->size + org->size); if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) return (false); Modified: stable/12/contrib/elftoolchain/readelf/readelf.1 ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.1 Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/readelf/readelf.1 Sat Nov 7 19:55:03 2020 (r367462) @@ -24,7 +24,7 @@ .\" .\" $Id: readelf.1 3753 2019-06-28 01:13:13Z emaste $ .\" -.Dd June 27, 2019 +.Dd October 31, 2020 .Dt READELF 1 .Os .Sh NAME @@ -49,6 +49,7 @@ .Fl -debug-dump Ns Op Ns = Ns Ar long-option-name , Ns ... .Oc .Op Fl x Ar section | Fl -hex-dump Ns = Ns Ar section +.Op Fl z | Fl -decompress .Op Fl A | Fl -arch-specific .Op Fl D | Fl -use-dynamic .Op Fl H | Fl -help @@ -157,6 +158,13 @@ Display the contents of the specified section in hexad The argument .Ar section should be the name of a section or a numeric section index. +.It Fl z | Fl -decompress +Decompress contents of sections specified by +.Fl x +or +.Fl p +before displaying. +If the specified section is not compressed, it is displayed as is. .It Fl A | Fl -arch-specific This option is accepted but is currently unimplemented. .It Fl D | Fl -use-dynamic Modified: stable/12/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.c Sat Nov 7 19:42:15 2020 (r367461) +++ stable/12/contrib/elftoolchain/readelf/readelf.c Sat Nov 7 19:55:03 2020 (r367462) @@ -38,12 +38,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include "_elftc.h" @@ -82,6 +84,7 @@ ELFTC_VCSID("$Id: readelf.c 3769 2019-06-29 15:15:02Z #define RE_WW 0x00040000 #define RE_W 0x00080000 #define RE_X 0x00100000 +#define RE_Z 0x00200000 /* * dwarf dump options. @@ -184,6 +187,7 @@ static struct option longopts[] = { {"arch-specific", no_argument, NULL, 'A'}, {"archive-index", no_argument, NULL, 'c'}, {"debug-dump", optional_argument, NULL, OPTION_DEBUG_DUMP}, + {"decompress", no_argument, 0, 'z'}, {"dynamic", no_argument, NULL, 'd'}, {"file-header", no_argument, NULL, 'h'}, {"full-section-name", no_argument, NULL, 'N'}, @@ -225,6 +229,15 @@ struct mips_option { const char *desc; }; +struct loc_at { + Dwarf_Attribute la_at; + Dwarf_Unsigned la_off; + Dwarf_Unsigned la_lowpc; + Dwarf_Half la_cu_psize; + Dwarf_Half la_cu_osize; + Dwarf_Half la_cu_ver; +}; + static void add_dumpop(struct readelf *re, size_t si, const char *sn, int op, int t); static const char *aeabi_adv_simd_arch(uint64_t simd); @@ -313,11 +326,13 @@ static void dump_mips_specific_info(struct readelf *re static void dump_notes(struct readelf *re); static void dump_notes_content(struct readelf *re, const char *buf, size_t sz, off_t off); -static void dump_notes_data(const char *name, uint32_t type, const char *buf, - size_t sz); +static void dump_notes_data(struct readelf *re, const char *name, + uint32_t type, const char *buf, size_t sz); static void dump_svr4_hash(struct section *s); static void dump_svr4_hash64(struct readelf *re, struct section *s); static void dump_gnu_hash(struct readelf *re, struct section *s); +static void dump_gnu_property_type_0(struct readelf *re, const char *buf, + size_t sz); static void dump_hash(struct readelf *re); static void dump_phdr(struct readelf *re); static void dump_ppc_attributes(uint8_t *p, uint8_t *pe); @@ -341,6 +356,7 @@ static const char *get_string(struct readelf *re, int static const char *get_symbol_name(struct readelf *re, int symtab, int i); static uint64_t get_symbol_value(struct readelf *re, int symtab, int i); static void load_sections(struct readelf *re); +static int loc_at_comparator(const void *la1, const void *la2); static const char *mips_abi_fp(uint64_t fp); static const char *note_type(const char *note_name, unsigned int et, unsigned int nt); @@ -359,7 +375,8 @@ static const char *ppc_abi_vector(uint64_t vec); static void readelf_usage(int status); static void readelf_version(void); static void search_loclist_at(struct readelf *re, Dwarf_Die die, - Dwarf_Unsigned lowpc); + Dwarf_Unsigned lowpc, struct loc_at **la_list, + size_t *la_list_len, size_t *la_list_cap); static void search_ver(struct readelf *re); static const char *section_type(unsigned int mach, unsigned int stype); static void set_cu_context(struct readelf *re, Dwarf_Half psize, @@ -1265,6 +1282,7 @@ note_type_xen(unsigned int nt) case 15: return "XEN_ELFNOTE_INIT_P2M"; case 16: return "XEN_ELFNOTE_MOD_START_PFN"; case 17: return "XEN_ELFNOTE_SUPPORTED_FEATURES"; + case 18: return "XEN_ELFNOTE_PHYS32_ENTRY"; default: return (note_type_unknown(nt)); } } @@ -2882,6 +2900,9 @@ static struct flag_desc dt_flags_1[] = { { 0x400000, "NORELOC" }, { 0x800000, "SYMINTPOSE" }, { 0x1000000, "GLOBAUDIT" }, + { 0x02000000, "SINGLETON" }, + { 0x04000000, "STUB" }, + { DF_1_PIE, "PIE" }, { 0, NULL } }; @@ -3508,7 +3529,63 @@ dump_gnu_hash(struct readelf *re, struct section *s) free(bl); } +static struct flag_desc gnu_property_x86_feature_1_and_bits[] = { + { GNU_PROPERTY_X86_FEATURE_1_IBT, "IBT" }, + { GNU_PROPERTY_X86_FEATURE_1_SHSTK, "SHSTK" }, + { 0, NULL } +}; + static void +dump_gnu_property_type_0(struct readelf *re, const char *buf, size_t sz) +{ + size_t i; + uint32_t type, prop_sz; + + printf(" Properties: "); + while (sz > 0) { + if (sz < 8) + goto bad; + + type = *(const uint32_t *)(const void *)buf; + prop_sz = *(const uint32_t *)(const void *)(buf + 4); + buf += 8; + sz -= 8; + + if (prop_sz > sz) + goto bad; + + if (type >= GNU_PROPERTY_LOPROC && + type <= GNU_PROPERTY_HIPROC) { + if (re->ehdr.e_machine != EM_X86_64) { + printf("machine type %x unknown\n", + re->ehdr.e_machine); + goto unknown; + } + switch (type) { + case GNU_PROPERTY_X86_FEATURE_1_AND: + printf("x86 features:"); + if (prop_sz != 4) + goto bad; + dump_flags(gnu_property_x86_feature_1_and_bits, + *(const uint32_t *)(const void *)buf); + break; + } + } + + buf += roundup2(prop_sz, 8); + sz -= roundup2(prop_sz, 8); + } + return; +bad: + printf("corrupt GNU property\n"); +unknown: + printf("remaining description data:"); + for (i = 0; i < sz; i++) + printf(" %02x", (unsigned char)buf[i]); + printf("\n"); +} + +static void dump_hash(struct readelf *re) { struct section *s; @@ -3595,12 +3672,51 @@ dump_notes(struct readelf *re) static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, + { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, + { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, + { NT_FREEBSD_FCTL_WXNEEDED, "WXNEEDED" }, { 0, NULL } }; +static bool +dump_note_string(const char *description, const char *s, size_t len) +{ + size_t i; + + if (len == 0 || s[--len] != '\0') { + return (false); + } else { + for (i = 0; i < len; i++) + if (!isprint(s[i])) + return (false); + } + + printf(" %s: %s\n", description, s); + return (true); +} + +struct note_desc { + uint32_t type; + const char *description; + bool (*fp)(const char *, const char *, size_t); +}; + +static struct note_desc xen_notes[] = { + { 5, "Xen version", dump_note_string }, + { 6, "Guest OS", dump_note_string }, + { 7, "Guest version", dump_note_string }, + { 8, "Loader", dump_note_string }, + { 9, "PAE mode", dump_note_string }, + { 10, "Features", dump_note_string }, + { 11, "BSD symtab", dump_note_string }, + { 0, NULL, NULL } +}; + static void -dump_notes_data(const char *name, uint32_t type, const char *buf, size_t sz) +dump_notes_data(struct readelf *re, const char *name, uint32_t type, + const char *buf, size_t sz) { + struct note_desc *nd; size_t i; const uint32_t *ubuf; @@ -3631,6 +3747,27 @@ dump_notes_data(const char *name, uint32_t type, const dump_flags(note_feature_ctl_flags, ubuf[0]); return; } + } else if (strcmp(name, "GNU") == 0) { + switch (type) { + case NT_GNU_PROPERTY_TYPE_0: + dump_gnu_property_type_0(re, buf, sz); + return; + case NT_GNU_BUILD_ID: + printf(" Build ID: "); + for (i = 0; i < sz; i++) + printf("%02x", (unsigned char)buf[i]); + printf("\n"); + return; + } + } else if (strcmp(name, "Xen") == 0) { + for (nd = xen_notes; nd->description != NULL; nd++) { + if (nd->type == type) { + if (nd->fp(nd->description, buf, sz)) + return; + else + break; + } + } } unknown: printf(" description data:"); @@ -3644,6 +3781,7 @@ dump_notes_content(struct readelf *re, const char *buf { Elf_Note *note; const char *end, *name; + uint32_t namesz, descsz; printf("\nNotes at offset %#010jx with length %#010jx:\n", (uintmax_t) off, (uintmax_t) sz); @@ -3655,9 +3793,16 @@ dump_notes_content(struct readelf *re, const char *buf return; } note = (Elf_Note *)(uintptr_t) buf; + namesz = roundup2(note->n_namesz, 4); + descsz = roundup2(note->n_descsz, 4); + if (namesz < note->n_namesz || descsz < note->n_descsz || + buf + namesz + descsz > end) { + warnx("invalid note header"); + return; + } buf += sizeof(Elf_Note); name = buf; - buf += roundup2(note->n_namesz, 4); + buf += namesz; /* * The name field is required to be nul-terminated, and * n_namesz includes the terminating nul in observed @@ -3675,8 +3820,8 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); - dump_notes_data(name, note->n_type, buf, note->n_descsz); - buf += roundup2(note->n_descsz, 4); + dump_notes_data(re, name, note->n_type, buf, note->n_descsz); + buf += descsz; } } @@ -6140,21 +6285,27 @@ dump_dwarf_str(struct readelf *re) } } -struct loc_at { - Dwarf_Attribute la_at; - Dwarf_Unsigned la_off; - Dwarf_Unsigned la_lowpc; - Dwarf_Half la_cu_psize; - Dwarf_Half la_cu_osize; - Dwarf_Half la_cu_ver; - TAILQ_ENTRY(loc_at) la_next; -}; +static int +loc_at_comparator(const void *la1, const void *la2) +{ + const struct loc_at *left, *right; -static TAILQ_HEAD(, loc_at) lalist = TAILQ_HEAD_INITIALIZER(lalist); + left = (const struct loc_at *)la1; + right = (const struct loc_at *)la2; + if (left->la_off > right->la_off) + return (1); + else if (left->la_off < right->la_off) + return (-1); + else + return (0); +} + static void -search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc) +search_loclist_at(struct readelf *re, Dwarf_Die die, Dwarf_Unsigned lowpc, + struct loc_at **la_list, size_t *la_list_len, size_t *la_list_cap) { + struct loc_at *la; Dwarf_Attribute *attr_list; Dwarf_Die ret_die; Dwarf_Unsigned off; @@ -6163,7 +6314,6 @@ search_loclist_at(struct readelf *re, Dwarf_Die die, D Dwarf_Half attr, form; Dwarf_Bool is_info; Dwarf_Error de; - struct loc_at *la, *nla; int i, ret; is_info = dwarf_get_die_infotypes_flag(die); @@ -6211,33 +6361,21 @@ search_loclist_at(struct readelf *re, Dwarf_Die die, D } else continue; - TAILQ_FOREACH(la, &lalist, la_next) { - if (off == la->la_off) - break; - if (off < la->la_off) { - if ((nla = malloc(sizeof(*nla))) == NULL) - err(EXIT_FAILURE, "malloc failed"); - nla->la_at = attr_list[i]; - nla->la_off = off; - nla->la_lowpc = lowpc; - nla->la_cu_psize = re->cu_psize; - nla->la_cu_osize = re->cu_osize; - nla->la_cu_ver = re->cu_ver; - TAILQ_INSERT_BEFORE(la, nla, la_next); - break; - } + if (*la_list_cap == *la_list_len) { + *la_list = realloc(*la_list, + *la_list_cap * 2 * sizeof(**la_list)); + if (*la_list == NULL) + err(EXIT_FAILURE, "realloc failed"); + *la_list_cap *= 2; } - if (la == NULL) { - if ((nla = malloc(sizeof(*nla))) == NULL) - err(EXIT_FAILURE, "malloc failed"); - nla->la_at = attr_list[i]; - nla->la_off = off; - nla->la_lowpc = lowpc; - nla->la_cu_psize = re->cu_psize; - nla->la_cu_osize = re->cu_osize; - nla->la_cu_ver = re->cu_ver; - TAILQ_INSERT_TAIL(&lalist, nla, la_next); - } + la = &((*la_list)[*la_list_len]); + la->la_at = attr_list[i]; + la->la_off = off; + la->la_lowpc = lowpc; + la->la_cu_psize = re->cu_psize; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Sat Nov 7 19:57:21 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71F392D087E; Sat, 7 Nov 2020 19:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CT7MN6Hxcz3lNQ; Sat, 7 Nov 2020 19:57:20 +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 5DC8414186; Sat, 7 Nov 2020 19:57:20 +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 0A7JvKGl003989; Sat, 7 Nov 2020 19:57:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7JvKWJ003988; Sat, 7 Nov 2020 19:57:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011071957.0A7JvKWJ003988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 19:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367463 - stable/12/contrib/libcxxrt X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/12/contrib/libcxxrt X-SVN-Commit-Revision: 367463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 19:57:21 -0000 Author: dim Date: Sat Nov 7 19:57:19 2020 New Revision: 367463 URL: https://svnweb.freebsd.org/changeset/base/367463 Log: MFC r367323: Update libcxxrt's private copy of elftoolchain demangler This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with the most recent version from upstream r3877. Similar to r367322, this fixes a number of possible assertions, and allows it to correctly demangle several names that it could not handle before. PR: 250702 MFC r367337: Make vector-related functions in libcxxrt's demangler static Follow-up to r367323 by re-adding static to a number of the functions copied from elftc's libelftc_vstr.c. This was requested by upstream. PR: 250702 Modified: stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c Sat Nov 7 19:55:03 2020 (r367462) +++ stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c Sat Nov 7 19:57:19 2020 (r367463) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2007, 2008 Hyogeol Lee + * Copyright (c) 2007 Hyogeol Lee + * Copyright (c) 2015-2017 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,12 +55,17 @@ struct vector_str { }; #define BUFFER_GROWFACTOR 1.618 -#define VECTOR_DEF_CAPACITY 8 +#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR) + +#define ELFTC_FAILURE 0 #define ELFTC_ISDIGIT(C) (isdigit((C) & 0xFF)) +#define ELFTC_SUCCESS 1 +#define VECTOR_DEF_CAPACITY 8 + enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST, TYPE_VEC + TYPE_CST, TYPE_VEC, TYPE_RREF }; struct vector_type_qualifier { @@ -73,35 +79,57 @@ enum read_cmd { READ_TYPE, READ_FUNC, READ_PTRMEM }; +struct read_cmd_item { + enum read_cmd cmd; + void *data; +}; + struct vector_read_cmd { size_t size, capacity; - enum read_cmd *r_container; + struct read_cmd_item *r_container; }; +enum push_qualifier { + PUSH_ALL_QUALIFIER, + PUSH_CV_QUALIFIER, + PUSH_NON_CV_QUALIFIER, +}; + struct cpp_demangle_data { struct vector_str output; /* output string vector */ - struct vector_str output_tmp; struct vector_str subst; /* substitution string vector */ struct vector_str tmpl; struct vector_str class_type; + struct vector_str *cur_output; /* ptr to current output vec */ struct vector_read_cmd cmd; - bool paren; /* parenthesis opened */ - bool pfirst; /* first element of parameter */ bool mem_rst; /* restrict member function */ bool mem_vat; /* volatile member function */ bool mem_cst; /* const member function */ + bool mem_ref; /* lvalue-ref member func */ + bool mem_rref; /* rvalue-ref member func */ + bool is_tmpl; /* template args */ + bool is_functype; /* function type */ + bool ref_qualifier; /* ref qualifier */ + enum type_qualifier ref_qualifier_type; /* ref qualifier type */ + enum push_qualifier push_qualifier; /* which qualifiers to push */ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ - int push_head; }; +struct type_delimit { + bool paren; + bool firstp; +}; + #define CPP_DEMANGLE_TRY_LIMIT 128 #define FLOAT_SPRINTF_TRY_LIMIT 5 #define FLOAT_QUADRUPLE_BYTES 16 #define FLOAT_EXTENED_BYTES 10 #define SIMPLE_HASH(x,y) (64 * x + y) +#define DEM_PUSH_STR(d,s) cpp_demangle_push_str((d), (s), strlen((s))) +#define VEC_PUSH_STR(d,s) vector_str_push((d), (s), strlen((s))) static size_t get_strlen_sum(const struct vector_str *v); static bool vector_str_grow(struct vector_str *v); @@ -213,7 +241,7 @@ vector_str_grow(struct vector_str *v) assert(v->capacity > 0); - tmp_cap = v->capacity * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(v->capacity); assert(tmp_cap > v->capacity); @@ -314,7 +342,7 @@ vector_str_push_vector_head(struct vector_str *dst, st if (dst == NULL || org == NULL) return (false); - tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(dst->size + org->size); if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) return (false); @@ -342,6 +370,47 @@ vector_str_push_vector_head(struct vector_str *dst, st } /** + * @brief Push org vector to the tail of det vector. + * @return false at failed, true at success. + */ +static bool +vector_str_push_vector(struct vector_str *dst, struct vector_str *org) +{ + size_t i, j, tmp_cap; + char **tmp_ctn; + + if (dst == NULL || org == NULL) + return (false); + + tmp_cap = BUFFER_GROW(dst->size + org->size); + + if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) + return (false); + + for (i = 0; i < dst->size; ++i) + tmp_ctn[i] = dst->container[i]; + + for (i = 0; i < org->size; ++i) + if ((tmp_ctn[i + dst->size] = strdup(org->container[i])) == + NULL) { + for (j = 0; j < i + dst->size; ++j) + free(tmp_ctn[j]); + + free(tmp_ctn); + + return (false); + } + + free(dst->container); + + dst->container = tmp_ctn; + dst->capacity = tmp_cap; + dst->size += org->size; + + return (true); +} + +/** * @brief Get new allocated flat string from vector between begin and end. * * If r_len is not NULL, string length will be returned. @@ -387,6 +456,7 @@ static int cpp_demangle_push_fp(struct cpp_demangle_da char *(*)(const char *, size_t)); static int cpp_demangle_push_str(struct cpp_demangle_data *, const char *, size_t); +static int cpp_demangle_pop_str(struct cpp_demangle_data *); static int cpp_demangle_push_subst(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_push_subst_v(struct cpp_demangle_data *, @@ -419,16 +489,18 @@ static int cpp_demangle_read_number_as_string(struct c static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); -static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *); +static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *, + struct vector_type_qualifier *); static int cpp_demangle_read_sname(struct cpp_demangle_data *); static int cpp_demangle_read_subst(struct cpp_demangle_data *); static int cpp_demangle_read_subst_std(struct cpp_demangle_data *); static int cpp_demangle_read_subst_stdtmpl(struct cpp_demangle_data *, - const char *, size_t); + const char *); static int cpp_demangle_read_tmpl_arg(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); -static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type(struct cpp_demangle_data *, + struct type_delimit *); static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); @@ -440,10 +512,12 @@ static char *decode_fp_to_float80(const char *, size_t static char *decode_fp_to_long_double(const char *, size_t); static int hex_to_dec(char); static void vector_read_cmd_dest(struct vector_read_cmd *); -static int vector_read_cmd_find(struct vector_read_cmd *, enum read_cmd); +static struct read_cmd_item *vector_read_cmd_find(struct vector_read_cmd *, + enum read_cmd); static int vector_read_cmd_init(struct vector_read_cmd *); static int vector_read_cmd_pop(struct vector_read_cmd *); -static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd); +static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd, + void *); static void vector_type_qualifier_dest(struct vector_type_qualifier *); static int vector_type_qualifier_init(struct vector_type_qualifier *); static int vector_type_qualifier_push(struct vector_type_qualifier *, @@ -460,14 +534,16 @@ char * __cxa_demangle_gnu3(const char *org) { struct cpp_demangle_data ddata; + struct vector_str ret_type; + struct type_delimit td; ssize_t org_len; unsigned int limit; - char *rtn = NULL; + char *rtn; + bool has_ret, more_type; - if (org == NULL) + if (org == NULL || (org_len = strlen(org)) < 2) return (NULL); - org_len = strlen(org); if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { if ((rtn = malloc(org_len + 19)) == NULL) return (NULL); @@ -476,52 +552,100 @@ __cxa_demangle_gnu3(const char *org) return (rtn); } - // Try demangling as a type for short encodings - if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { - if (!cpp_demangle_data_init(&ddata, org)) - return (NULL); - if (!cpp_demangle_read_type(&ddata, 0)) - goto clean; - rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); - goto clean; - } + if (org[0] != '_' || org[1] != 'Z') + return (NULL); - if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); rtn = NULL; + has_ret = more_type = false; if (!cpp_demangle_read_encoding(&ddata)) goto clean; + /* + * Pop function name from substitution candidate list. + */ + if (*ddata.cur != 0 && ddata.subst.size >= 1) { + if (!vector_str_pop(&ddata.subst)) + goto clean; + } + + td.paren = false; + td.firstp = true; limit = 0; + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata.is_tmpl) { + ddata.is_tmpl = false; + if (!vector_str_init(&ret_type)) + goto clean; + ddata.cur_output = &ret_type; + has_ret = true; + } + while (*ddata.cur != '\0') { /* * Breaking at some gcc info at tail. e.g) @@GLIBCXX_3.4 */ if (*ddata.cur == '@' && *(ddata.cur + 1) == '@') break; - if (!cpp_demangle_read_type(&ddata, 1)) - goto clean; + + if (has_ret) { + /* Read return type */ + if (!cpp_demangle_read_type(&ddata, NULL)) + goto clean; + } else { + /* Read function arg type */ + if (!cpp_demangle_read_type(&ddata, &td)) + goto clean; + } + + if (has_ret) { + /* Push return type to the beginning */ + if (!VEC_PUSH_STR(&ret_type, " ")) + goto clean; + if (!vector_str_push_vector_head(&ddata.output, + &ret_type)) + goto clean; + ddata.cur_output = &ddata.output; + vector_str_dest(&ret_type); + has_ret = false; + more_type = true; + } else if (more_type) + more_type = false; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) goto clean; } + if (more_type) + goto clean; if (ddata.output.size == 0) goto clean; - if (ddata.paren && !vector_str_push(&ddata.output, ")", 1)) + if (td.paren && !VEC_PUSH_STR(&ddata.output, ")")) goto clean; - if (ddata.mem_vat && !vector_str_push(&ddata.output, " volatile", 9)) + if (ddata.mem_vat && !VEC_PUSH_STR(&ddata.output, " volatile")) goto clean; - if (ddata.mem_cst && !vector_str_push(&ddata.output, " const", 6)) + if (ddata.mem_cst && !VEC_PUSH_STR(&ddata.output, " const")) goto clean; - if (ddata.mem_rst && !vector_str_push(&ddata.output, " restrict", 9)) + if (ddata.mem_rst && !VEC_PUSH_STR(&ddata.output, " restrict")) goto clean; + if (ddata.mem_ref && !VEC_PUSH_STR(&ddata.output, " &")) + goto clean; + if (ddata.mem_rref && !VEC_PUSH_STR(&ddata.output, " &&")) + goto clean; rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); clean: + if (has_ret) + vector_str_dest(&ret_type); + cpp_demangle_data_dest(&ddata); return (rtn); @@ -538,7 +662,6 @@ cpp_demangle_data_dest(struct cpp_demangle_data *d) vector_str_dest(&d->class_type); vector_str_dest(&d->tmpl); vector_str_dest(&d->subst); - vector_str_dest(&d->output_tmp); vector_str_dest(&d->output); } @@ -551,43 +674,42 @@ cpp_demangle_data_init(struct cpp_demangle_data *d, co if (!vector_str_init(&d->output)) return (0); - if (!vector_str_init(&d->output_tmp)) - goto clean1; if (!vector_str_init(&d->subst)) - goto clean2; + goto clean1; if (!vector_str_init(&d->tmpl)) - goto clean3; + goto clean2; if (!vector_str_init(&d->class_type)) - goto clean4; + goto clean3; if (!vector_read_cmd_init(&d->cmd)) - goto clean5; + goto clean4; assert(d->output.container != NULL); - assert(d->output_tmp.container != NULL); assert(d->subst.container != NULL); assert(d->tmpl.container != NULL); assert(d->class_type.container != NULL); - d->paren = false; - d->pfirst = false; d->mem_rst = false; d->mem_vat = false; d->mem_cst = false; + d->mem_ref = false; + d->mem_rref = false; + d->is_tmpl = false; + d->is_functype = false; + d->ref_qualifier = false; + d->push_qualifier = PUSH_ALL_QUALIFIER; d->func_type = 0; d->cur = cur; + d->cur_output = &d->output; d->last_sname = NULL; - d->push_head = 0; return (1); -clean5: - vector_str_dest(&d->class_type); clean4: - vector_str_dest(&d->tmpl); + vector_str_dest(&d->class_type); clean3: - vector_str_dest(&d->subst); + vector_str_dest(&d->tmpl); clean2: - vector_str_dest(&d->output_tmp); + vector_str_dest(&d->subst); clean1: vector_str_dest(&d->output); @@ -632,13 +754,27 @@ cpp_demangle_push_str(struct cpp_demangle_data *ddata, if (ddata == NULL || str == NULL || len == 0) return (0); - if (ddata->push_head > 0) - return (vector_str_push(&ddata->output_tmp, str, len)); + /* + * is_tmpl is used to check if the type (function arg) is right next + * to template args, and should always be cleared whenever new string + * pushed. + */ + ddata->is_tmpl = false; - return (vector_str_push(&ddata->output, str, len)); + return (vector_str_push(ddata->cur_output, str, len)); } static int +cpp_demangle_pop_str(struct cpp_demangle_data *ddata) +{ + + if (ddata == NULL) + return (0); + + return (vector_str_pop(ddata->cur_output)); +} + +static int cpp_demangle_push_subst(struct cpp_demangle_data *ddata, const char *str, size_t len) { @@ -677,9 +813,11 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d struct vector_type_qualifier *v, const char *type_str) { struct vector_str subst_v; + enum type_qualifier t; size_t idx, e_idx, e_len; - int rtn; char *buf; + int rtn; + bool cv; if (ddata == NULL || v == NULL) return (0); @@ -691,18 +829,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d if (type_str != NULL) { if (!vector_str_init(&subst_v)) return (0); - if (!vector_str_push(&subst_v, type_str, strlen(type_str))) + if (!VEC_PUSH_STR(&subst_v, type_str)) goto clean; } + cv = true; e_idx = 0; while (idx > 0) { switch (v->q_container[idx - 1]) { case TYPE_PTR: - if (!cpp_demangle_push_str(ddata, "*", 1)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "*")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, "*", 1)) + if (!VEC_PUSH_STR(&subst_v, "*")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -711,10 +853,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_REF: - if (!cpp_demangle_push_str(ddata, "&", 1)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, "&", 1)) + if (!VEC_PUSH_STR(&subst_v, "&")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -722,11 +867,29 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d } break; + case TYPE_RREF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&&")) + goto clean; + if (type_str != NULL) { + if (!VEC_PUSH_STR(&subst_v, "&&")) + goto clean; + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) + goto clean; + } + break; + case TYPE_CMX: - if (!cpp_demangle_push_str(ddata, " complex", 8)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, " complex")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " complex", 8)) + if (!VEC_PUSH_STR(&subst_v, " complex")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -735,11 +898,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_IMG: - if (!cpp_demangle_push_str(ddata, " imaginary", 10)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " imaginary", - 10)) + if (!VEC_PUSH_STR(&subst_v, " imaginary")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -748,6 +913,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_EXT: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -759,14 +927,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d snprintf(buf, e_len + 2, " %s", v->ext_name.container[e_idx]); - if (!cpp_demangle_push_str(ddata, buf, e_len + 1)) { + if (!DEM_PUSH_STR(ddata, buf)) { free(buf); goto clean; } if (type_str != NULL) { - if (!vector_str_push(&subst_v, buf, - e_len + 1)) { + if (!VEC_PUSH_STR(&subst_v, buf)) { free(buf); goto clean; } @@ -781,11 +948,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_RST: - if (!cpp_demangle_push_str(ddata, " restrict", 9)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " restrict")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " restrict", 9)) + if (!VEC_PUSH_STR(&subst_v, " restrict")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -793,11 +971,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VAT: - if (!cpp_demangle_push_str(ddata, " volatile", 9)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " volatile")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " volatile", 9)) + if (!VEC_PUSH_STR(&subst_v, " volatile")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -805,11 +994,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_CST: - if (!cpp_demangle_push_str(ddata, " const", 6)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " const")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " const", 6)) + if (!VEC_PUSH_STR(&subst_v, " const")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -817,6 +1017,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d break; case TYPE_VEC: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -827,13 +1030,12 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d goto clean; snprintf(buf, e_len + 12, " __vector(%s)", v->ext_name.container[e_idx]); - if (!cpp_demangle_push_str(ddata, buf, e_len + 11)) { + if (!DEM_PUSH_STR(ddata, buf)) { free(buf); goto clean; } if (type_str != NULL) { - if (!vector_str_push(&subst_v, buf, - e_len + 11)) { + if (!VEC_PUSH_STR(&subst_v, buf)) { free(buf); goto clean; } @@ -907,10 +1109,10 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); - if (!cpp_demangle_push_str(ddata, "[]", 2)) + if (!DEM_PUSH_STR(ddata, "[]")) return (0); } else { if (ELFTC_ISDIGIT(*ddata->cur) != 0) { @@ -923,13 +1125,13 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat assert(num_len > 0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); - if (!cpp_demangle_push_str(ddata, "[", 1)) + if (!DEM_PUSH_STR(ddata, "[")) return (0); if (!cpp_demangle_push_str(ddata, num, num_len)) return (0); - if (!cpp_demangle_push_str(ddata, "]", 1)) + if (!DEM_PUSH_STR(ddata, "]")) return (0); } else { p_idx = ddata->output.size; @@ -953,11 +1155,11 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat free(exp); return (0); } - if (!cpp_demangle_read_type(ddata, 0)) { + if (!cpp_demangle_read_type(ddata, NULL)) { free(exp); return (0); } - if (!cpp_demangle_push_str(ddata, "[", 1)) { + if (!DEM_PUSH_STR(ddata, "[")) { free(exp); return (0); } @@ -965,7 +1167,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddat free(exp); return (0); } - if (!cpp_demangle_push_str(ddata, "]", 1)) { + if (!DEM_PUSH_STR(ddata, "]")) { free(exp); return (0); } @@ -1001,10 +1203,10 @@ cpp_demangle_read_expr_primary(struct cpp_demangle_dat switch (*(++ddata->cur)) { case '0': ddata->cur += 2; - return (cpp_demangle_push_str(ddata, "false", 5)); + return (DEM_PUSH_STR(ddata, "false")); case '1': ddata->cur += 2; - return (cpp_demangle_push_str(ddata, "true", 4)); + return (DEM_PUSH_STR(ddata, "true")); default: return (0); } @@ -1041,7 +1243,7 @@ cpp_demangle_read_expr_primary(struct cpp_demangle_dat case 'x': case 'y': if (*(++ddata->cur) == 'n') { - if (!cpp_demangle_push_str(ddata, "-", 1)) + if (!DEM_PUSH_STR(ddata, "-")) return (0); ++ddata->cur; } @@ -1070,11 +1272,11 @@ cpp_demangle_read_expression(struct cpp_demangle_data switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('s', 't'): ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('s', 'r'): ddata->cur += 2; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!cpp_demangle_read_uqname(ddata)) return (0); @@ -1351,8 +1553,7 @@ cpp_demangle_read_expression_flat(struct cpp_demangle_ size_t i, p_idx, idx, exp_len; char *exp; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = &ddata->output; p_idx = output->size; @@ -1429,8 +1630,12 @@ static int cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, struct vector_type_qualifier *v) { + struct type_delimit td; + struct read_cmd_item *rc; size_t class_type_size, class_type_len, limit; const char *class_type; + int i; + bool paren, non_cv_qualifier; if (ddata == NULL || *ddata->cur != 'F' || v == NULL) return (0); @@ -1441,12 +1646,43 @@ cpp_demangle_read_function(struct cpp_demangle_data *d *ext_c = 1; ++ddata->cur; } - if (!cpp_demangle_read_type(ddata, 0)) + + /* Return type */ + if (!cpp_demangle_read_type(ddata, NULL)) return (0); + if (*ddata->cur != 'E') { - if (!cpp_demangle_push_str(ddata, "(", 1)) + if (!DEM_PUSH_STR(ddata, " ")) return (0); - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM)) { + + non_cv_qualifier = false; + if (v->size > 0) { + for (i = 0; (size_t) i < v->size; i++) { + if (v->q_container[i] != TYPE_RST && + v->q_container[i] != TYPE_VAT && + v->q_container[i] != TYPE_CST) { + non_cv_qualifier = true; + break; + } + } + } + + paren = false; + rc = vector_read_cmd_find(&ddata->cmd, READ_PTRMEM); + if (non_cv_qualifier || rc != NULL) { + if (!DEM_PUSH_STR(ddata, "(")) + return (0); + paren = true; + } + + /* Push non-cv qualifiers. */ + ddata->push_qualifier = PUSH_NON_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) + return (0); + + if (rc) { + if (non_cv_qualifier && !DEM_PUSH_STR(ddata, " ")) + return (0); if ((class_type_size = ddata->class_type.size) == 0) return (0); class_type = @@ -1458,42 +1694,69 @@ cpp_demangle_read_function(struct cpp_demangle_data *d if (!cpp_demangle_push_str(ddata, class_type, class_type_len)) return (0); - if (!cpp_demangle_push_str(ddata, "::*", 3)) + if (!DEM_PUSH_STR(ddata, "::*")) return (0); + /* Push pointer-to-member qualifiers. */ + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, rc->data, + NULL)) + return (0); ++ddata->func_type; - } else { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + } + + if (paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + paren = false; } - if (!cpp_demangle_push_str(ddata, ")(", 2)) - return (0); - + td.paren = false; + td.firstp = true; limit = 0; + ddata->is_functype = true; for (;;) { - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, &td)) return (0); if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } - - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM) == 1) { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) + ddata->is_functype = false; + if (td.paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) - return (0); + td.paren = false; } - if (!cpp_demangle_push_str(ddata, ")", 1)) + /* Push CV qualifiers. */ + ddata->push_qualifier = PUSH_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) return (0); + + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + + /* Release type qualifier vector. */ + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + + /* Push ref-qualifiers. */ + if (ddata->ref_qualifier) { + switch (ddata->ref_qualifier_type) { + case TYPE_REF: + if (!DEM_PUSH_STR(ddata, " &")) + return (0); + break; + case TYPE_RREF: + if (!DEM_PUSH_STR(ddata, " &&")) + return (0); + break; + default: + return (0); + } + ddata->ref_qualifier = false; + } } ++ddata->cur; @@ -1515,7 +1778,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d /* special name */ switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('G', 'A'): - if (!cpp_demangle_push_str(ddata, "hidden alias for ", 17)) + if (!DEM_PUSH_STR(ddata, "hidden alias for ")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1523,7 +1786,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d return (cpp_demangle_read_encoding(ddata)); case SIMPLE_HASH('G', 'R'): - if (!cpp_demangle_push_str(ddata, "reference temporary #", 21)) + if (!DEM_PUSH_STR(ddata, "reference temporary #")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1533,11 +1796,11 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d rtn = 0; if (!cpp_demangle_read_number_as_string(ddata, &num_str)) goto clean1; - if (!cpp_demangle_push_str(ddata, num_str, strlen(num_str))) + if (!DEM_PUSH_STR(ddata, num_str)) goto clean2; - if (!cpp_demangle_push_str(ddata, " for ", 5)) + if (!DEM_PUSH_STR(ddata, " for ")) goto clean2; - if (!cpp_demangle_push_str(ddata, name, strlen(name))) + if (!DEM_PUSH_STR(ddata, name)) goto clean2; rtn = 1; clean2: @@ -1552,14 +1815,12 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d return (0); switch (*ddata->cur) { case 'n': - if (!cpp_demangle_push_str(ddata, - "non-transaction clone for ", 26)) + if (!DEM_PUSH_STR(ddata, "non-transaction clone for ")) return (0); break; case 't': default: - if (!cpp_demangle_push_str(ddata, - "transaction clone for ", 22)) + if (!DEM_PUSH_STR(ddata, "transaction clone for ")) return (0); break; } @@ -1568,15 +1829,15 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d case SIMPLE_HASH('G', 'V'): /* sentry object for 1 time init */ - if (!cpp_demangle_push_str(ddata, "guard variable for ", 20)) + if (!DEM_PUSH_STR(ddata, "guard variable for ")) return (0); ddata->cur += 2; break; case SIMPLE_HASH('T', 'c'): /* virtual function covariant override thunk */ - if (!cpp_demangle_push_str(ddata, - "virtual function covariant override ", 36)) + if (!DEM_PUSH_STR(ddata, + "virtual function covariant override ")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1589,8 +1850,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d case SIMPLE_HASH('T', 'C'): /* construction vtable */ - if (!cpp_demangle_push_str(ddata, "construction vtable for ", - 24)) + if (!DEM_PUSH_STR(ddata, "construction vtable for ")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1602,11 +1862,11 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d goto clean3; if (*ddata->cur++ != '_') *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Sat Nov 7 23:58:00 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 849102D5D30; Sat, 7 Nov 2020 23:58:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CTDj42lLMz4STw; Sat, 7 Nov 2020 23:58:00 +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 505DD16D44; Sat, 7 Nov 2020 23:58:00 +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 0A7Nw0S6053638; Sat, 7 Nov 2020 23:58:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A7NvvGF053619; Sat, 7 Nov 2020 23:57:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202011072357.0A7NvvGF053619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 7 Nov 2020 23:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r367466 - in stable/11: contrib/elftoolchain contrib/elftoolchain/addr2line contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy... X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/11: contrib/elftoolchain contrib/elftoolchain/addr2line contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy contrib/elftoolchain/elf... X-SVN-Commit-Revision: 367466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2020 23:58:00 -0000 Author: dim Date: Sat Nov 7 23:57:57 2020 New Revision: 367466 URL: https://svnweb.freebsd.org/changeset/base/367466 Log: Sync up elftoolchain with head, except for the capsicum-related commits, which are incompatible with stable/11. MFC r308465 (by emaste): c++filt: flush output after newline Some tools spawn c++filt and pass it a single line at a time for demangling. This is akin to r276689 for addr2line. Sponsored by: The FreeBSD Foundation MFC r317626 (by emaste): revert r308465: c++filt: flush output after newline The ELF Tool Chain update to r3520 uses setvbuf to set line buffering. Sponsored by: The FreeBSD Foundation MFC r340746 (by oshogbo): strings: fix style nits Reviewed by: cem, emaste, Joseph Koshy Differential Revision: https://reviews.freebsd.org/D18036 MFC r340750 (by mjg): strings: unbreak the build after r340746 Discussed with: oshogbo Sponsored by: The FreeBSD Foundation MFC r342918 (by emaste): Update to ELF Tool Chain r3668 Highlights: - Make sure that only TLS sections are sorted into TLS segment. - Fixed multiple errors in "Section to Segment mapping". - Man page updates - ar improvements - elfcopy: avoid filter_reloc uninitialized variable for rela - elfcopy: avoid stripping relocations from static binaries - readelf: avoid printing directory in front of absolute path - readelf: add NT_FREEBSD_FEATURE_CTL FreeBSD note type - test improvements NOTES: Some of these changes originated in FreeBSD and simply reduce diffs between contrib and vendor. ELF Tool Chain ar is not (currently) used in FreeBSD, and there are improvements in both FreeBSD and ELF Tool Chain ar that are not in the other. Sponsored by: The FreeBSD Foundation MFC r343592 (by emaste): readelf: decode flag bits in DT_FLAGS/DT_FLAGS_1 Decode d_val when the tag is DT_FLAGS or DT_FLAGS_1 based on the information at: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html PR: 232983 Submitted by: Bora Ozarslan borako.ozarslan@gmail.com Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18784 MFC r343593 (by emaste): readelf: fix i386 build Use %jx and (uintmax_t) cast. PR: 232983 Sponsored by: The FreeBSD Foundation MFC r343614 (by emaste): readelf: dump elf note data Output format is compatible with GNU readelf's handling of unknown note types (modulo a GNU char signedness bug); future changes will add type- specific decoding. Reviewed by: kib Relnotes: Yes Sponsored by: The FreeBSD Foundation MFC r343665 (by emaste): readelf: use table-based DT_FLAGS and DT_FLAGS_1 decoding Fewer lines of code and more maintainable. Reviewed by: brooks, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19053 MFC r343669 (by emaste): readelf: decode FreeBSD note types Decode NT_FREEBSD_ABI_TAG, NT_FREEBSD_ARCH_TAG, and NT_FREEBSD_FEATURE_CTL. Reviewed by: brooks, kib (earlier) Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19054 MFC r345360 (by oshogbo): strings: do not depend on stdin Instead of depending on one stdin FILE structure and use freopen(3), pass to the functions appropriate FILE structure. Reviewed by: cem Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D18037 MFC r345361 (by oshogbo): strings: do not continue if getc or getcharacter returns EOF Reported by: cem MFC r345362 (by oshogbo): Fix powerpc and arm builds after r345361. Reported by: jenkins MFC r345364 (by oshogbo): In case of ENCODING_8BIT the EOF code will be pass to putchar. EOF check should be done before (uint8_t)c > 127 test. Reported by: cem MFC r345431 (by oshogbo): strings: return an error code and the char value separately If we returning 32 bits value it's hard to distinguish if the returned value is a valid one or if its an error (in case of EOF). For that reason separate exit code of the function from the returned character. Reported by: cem, se MFC r345593 (by markj): Prepend DW_AT_comp_dir to relative line number directory table entries. Relative directories may appear in the line number program for a CPU if files were included via a relative path, for instance with "-I.". Previously, dwarf_srclines(3) and dwarf_srcfiles(3) would return the relative path, so addr2line, for instance, would do the same. However, we can get an absolute path by prepending the compilation directory, so change libdwarf to do that to improve compatibility with GNU binutils and since it is more useful in general. Reviewed by: jhb Discussed with: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19705 MFC r345646 (by emaste): readelf: add newline after dumping dynamic FLAGS / FLAGS_1 All three dump_flags() callers need a newline after printing the flags. Sponsored by: The FreeBSD Foundation MFC r346323 (by emaste): readelf: speed up readelf -wo Use an array instead of STAILQ, and sort at the end instead of while adding new elements. PR: 212539 Submitted by: Bora ?zarslan Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC r346327 (by emaste): readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation MFC r348347 (by jhibbits): Add missing powerpc64 relocation support to libdwarf Summary: Due to missing relocation support in libdwarf for powerpc64, handling of dwarf info on unlinked objects was bogus. Examining raw dwarf data on objects compiled on ppc64 with a modern compiler (in-tree gcc tends to hide the issue, since it only rarely generates relocations in .debug_info and uses DW_FORM_str instead of DW_FORM_strp for everything), you will find that the dwarf data appears corrupt, with repeated references to the compiler version where things like types and function names should appear. This happens because the 0 offset of .debug_str contains the compiler version, and without applying the relocations, *all* indirect strings in .dwarf_info will end up pointing to it. This corruption then propogates to the CTF data, as ctfconvert relies on libdwarf to read the dwarf info, for every compiled object (when building a kernel.) However, if you examine the dwarf data on a compiled executable, it will appear correct, because during final link the relocations get applied and baked in by the linker. Submitted by: Brandon Bergren Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D20367 MFC r348430 (by markj): elfcopy: Remove an unneeded memset. Reviewed by: emaste, trasz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20445 MFC r348431 (by markj): elfcopy: Optimize for insertions at the end of the section list. This is the common case when strip(1) is creating the output file. The change provides a significant speedup when running on ELF files with many sections. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20444 MFC r348443 (by markj): readelf: Make -t imply -S, for compatibility with GNU binutils. Reported by: jhb Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20475 MFC r348444 (by markj): libelftc: Add MLINKS. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20474 MFC r348652 (by markj): libelf: Use a red-black tree to manage the section list. The tree is indexed by section number. This speeds up elf_getscn() and its callers, which previously had to traverse a linked list. In particular, since .shstrtab is often the last section in a file, elf_strptr() would have to traverse the entire list. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20443 MFC r348654 (by markj): elfcopy: Use elf_getscn() instead of iterating over all sections. When removing a section, we would loop over all sections looking for a corresponding relocation section. With r348652 it is much faster to just use elf_getscn(). PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20471 MFC r348655 (by markj): libelftc: Fix some minor style bugs. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20472 MFC r348657 (by markj): elfcopy: Use libelftc's string table routines to build .shstrtab. This replaces some hand-rolled routines and is substantially faster since libelftc uses a hash table for lookups and insertions, whereas elfcopy would perform a linear scan of the table. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20473 MFC r348776 (by csjp): Teach readelf about some OpenBSD ELF program headers - Add constants for OpenBSD wxneeded, bootdata and randomize to the FreeBSD elf_common.h file. This is the file that gets used by the elftoolchain library. - Update readelf and elfdump utilities to decode these program headers if they are encountered. Note: FreeBSD has it's own version of elfdump(1), which will be updated in a subsequent commit. I am adding it here anyway because this diff is going to be submitted upstream. Discussed with: emaste Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20548 MFC r349420 (by markj): libelftc: Micro-optimize string table insertion. The string's length is already known, so use memcpy() instead of strcpy() to add it to the string table image. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20760 MFC r349421 (by markj): libelftc: Consistently use size_t for string table offsets and sizes. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20702 MFC r349422 (by markj): libelftc: Fix the documented prototype for elftc_string_table_destroy(). Sponsored by: The FreeBSD Foundation MFC r349423 (by markj): elfcopy: Provide a size hint when creating the section string table. Use the input file's .shstrtab size as the hint if it exists. This gives a small performance improvement when processing files with many sections. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20544 MFC r349424 (by markj): libdwarf: Use the cached strtab pointer when reading string attributes. Previously we would perform a linear search of the DWARF section list for ".debug_str". However, libdwarf always caches a pointer to the strtab image in its debug descriptor. Using it gives a modest performance improvement when iterating over the attributes of each DIE. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20759 MFC r349481 (by mhorne): Add some missing RISC-V ELF defines This adds defines for the RISC-V specific e_flags values, and some of the missing static relocations. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20766 MFC r349482 (by mhorne): readelf: Add support for RISC-V specific e_flags Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20767 MFC r349483 (by mhorne): libelftc: add RISC-V bfd targets This adds the following targets: elf32-riscv, elf64-riscv, elf64-riscv-freebsd Reviewed by: emaste, markj, jkoshy@users.sourceforge.net Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20768 MFC r349510 (by luporl): [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI type) This prints out description text with the meaning of 'Flags' value in PowerPC64. Example: $ readelf -h ~/tmp/t1-Flag2 ELF Header: Magic: 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, big endian Version: 1 (current) OS/ABI: FreeBSD ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC 64-bit Version: 0x1 Entry point address: 0x10010000 Start of program headers: 64 (bytes into file) Start of section headers: 209368 (bytes into file) Flags: 0x2, OpenPOWER ELF V2 ABI Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 34 Section header string table index: 31 Submitted by: alfredo.junior_eldorado.org.br Reviewed by: luporl Differential Revision: https://reviews.freebsd.org/D20782 MFC r349562 (by mhorne): elftoolchain: fix an incorrect e_flags description r349482 introduced the definitions and descriptions of the RISC-V specific e_flags values to elftoolchain. However, the description for the EF_RISCV_RVE flag was incorrectly duplicated from EF_RISCV_RVC. Fix this by providing the proper description for this flag. Reported by: jhb Approved by: markj (mentor) MFC r349563 (by mhorne): readelf: Add RISC-V DWARF register aliases This allows DWARF debugging output to use the common register mneumonics, such as ra, sp, or t0. DWARF registers 0-31 are mapped to the 32 general purpose registers, which are then followed by the 32 floating point registers. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20779 MFC r349577 (by arichardson): Allow bootstrapping elftoolchain on MacOS and Linux This is required in order to build on non-FreeBSD systems without setting all the XAR/XSTRINGS/etc. variables Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D16771 MFC r349730 (by markj): elfcopy: Clear errors after fetching the shstrtab index. Otherwise a future call to elf_errno() will return a non-zero value. update_shdr(), for example, treats any errors associated with the ELF descriptor as fatal. Clear the error per the first example in elf_errmsg.3. Convert to elf_getshdrstrndx() while here since elf_getshstrndx() is apparently deprecated. Reported by: royger Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20852 MFC r350432 (by markj): Merge r3778 and r3779 from ELFToolchain. Modify strip(1) to not accept multiple input files when an output file is specified. There is no good way to handle this combination, and the change is compatible with binutils. Sponsored by: The FreeBSD Foundation MFC r350511 (by emaste): readelf: decode NT_GNU_PROPERTY_TYPE_0 / GNU_PROPERTY_X86_FEATURE_1_AND These bits are used for Intel CET IBT/Shadow Stack. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20516 MFC r350679 (by markj): Merge r3780 from elftoolchain. Adjust argc and argv by optind before using them. This slightly simplifies the code. No functional change intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21079 MFC r352875 (by ray): ections into expected offset in binary format. Calculate binary file offset using address field, bacause software know only offset to known data, not where to load segment. With that patch, kernel .data section can have any alignment/offset - kernel boor fine. PR: 235391 Reviewed by: markj Differential Revision: D21827 MFC r352878 (by ray): Initialize baseaddr to suppres warning. Pointy hat to: ray MFC r352908 (by markj): nm: Adjust argc and argv in get_opt(). This refactoring makes it slightly easier to capsicumize nm(1). Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC r354544 (by emaste): elfcopy/strip: Ensure sections have required alignment on output Object files may specify insufficient alignment on certain sections, for example due to a bug in NASM[1]. When we detect that case in elfcopy or strip, emit a warning and increase the alignment to the minimum required. The NASM bug was fixed in 2015[2], but we might as well have this fixup (and warning) in elfcopy in case we encounter such a file for any other reason. This might be reworked somewhat upstream - see ELF Tool Chain ticket 485[3]. [1] https://bugzilla.nasm.us/show_bug.cgi?id=3392307 [2] https://repo.or.cz/w/nasm.git/commit/1f0cb0f2c1ba632c0fab02424928cfb756a9160c [3] https://sourceforge.net/p/elftoolchain/tickets/485/ PR: 198611 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2292 MFC r354842 (by jhibbits): ELF toolchain: Add PowerPC VMX and VSX note decode to readelf Summary: A follow-on to r276634, which added the VMX note to userland cores, and r334538 for VSX notes. Copied from note_type_linux_core(). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D22404 MFC r355413 (by emaste): Update ELF Tool Chain to upstream r3769 This contains many small bugfixes and documentation improvements. Sponsored by: The FreeBSD Foundation MFC r357450 (by markj): addr2line: Cache CU DIEs upon a successful address lookup. Previously, addr2line would sequentially search all CUs for each input address. For some uses, notably syzkaller's code coverage map generator, this was extremely slow. Add a CU cache into which entries are added following a successful lookup, and search the cache before falling back to a scan. When translating a large number of addresses this yields slightly better performance than GNU addr2line. Garbage-collect an unused hash table which appears to have been intended for the same purpose. A hash table doesn't seem particularly suitable since each CU spans a range of addresses. Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23418 MFC r357462 (by markj): addr2line: Avoid a name collision. The RB_ macros define functions with a parameter named head, and gcc warns about this. MFC r357531 (by markj): libdwarf: Remove unnecessary NULL checks. All callers of _dwarf_add_expr() and _dwarf_expr_into_block() pass a non-NULL expr pointer, and these functions assume that expr is non-NULL anyway. CID: 1193305, 1193306 Sponsored by: The FreeBSD Foundation MFC r357532 (by markj): libdwarf: Fix a possible memory leak in dwarf_add_AT_location_expr(). CID: 1193364 Sponsored by: The FreeBSD Foundation MFC r357533 (by markj): libdwarf: Make an out-pointer of _dwarf_abbrev_add() mandatory. All callers pass a non-NULL pointer, and otherwise it was possible to leak memory if the abbrev was not added to a CU. CID: 1193365 Sponsored by: The FreeBSD Foundation MFC r357534 (by markj): libdwarf: Fix a memory leak in _dwarf_frame_section_init(). If frame length validation failed we would leak memory. CID: 1193366 Sponsored by: The FreeBSD Foundation MFC r357535 (by markj): libelftc: Fix memory leaks in the C++ demanglers. CID: 1262518, 1262519, 1262520, 1262529 Sponsored by: The FreeBSD Foundation MFC r357536 (by markj): libelftc: Add a missing check for an error from vector_str_init(). While here consistently use the same spelling for such checks. CID: 1376769 Sponsored by: The FreeBSD Foundation MFC r357537 (by markj): elfcopy: Handle multiple data descriptors properly. The code clearly meant to resize the buffer in the case where a section was backed by multiple data descriptors. In practice this shouldn't have been a problem since libelf would return a single data descriptor for each section in a newly opened file. CID: 1262522 Sponsored by: The FreeBSD Foundation MFC r357538 (by markj): elfcopy: Avoid leaking dst's fd when we fail to copy a file. We should really create the output file in the same directory as the destination file so that rename() works. This will be done in a future change as part of some work to run in capability mode. CID: 1262523 Sponsored by: The FreeBSD Foundation MFC r357539 (by markj): size: Avoid returning a stack pointer from xlatetom(). The callers only check whether the returned pointer is non-NULL, so this was harmless in practice, but change the return value to guard against the issue. CID: 1411597 Sponsored by: The FreeBSD Foundation MFC r357540 (by markj): readelf: Fix a double close of the input file. The caller of dump_object() is responsible for opening the file, let it be responsible for closing too. CID: 1411588 Sponsored by: The FreeBSD Foundation MFC r357541 (by markj): readelf: Fix the check for an error from realloc(). Use err() instead of errx() while here, since realloc() sets errno. CID: 1401326 Sponsored by: The FreeBSD Foundation MFC r357542 (by markj): readelf: Don't leak memory when dwarf_get_fde_info_for_all_regs() fails. CID: 1292493 Sponsored by: The FreeBSD Foundation MFC r357826 (by emaste): elfcopy: set ELF OS/ABI field when converting from binary PR: 228934 Submitted by: Tiger Gao Reviewed by: markj, jkoshy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23504 MFC r357844 (by emaste): addr2line: Handle DW_AT_ranges in compile units Based on original submission by Marat Radchenko in ELF Tool Chain ticket #545, rebased and updated by Tiger Gao. PR: 217736 Submitted by: Marat Radchenko Submitted by: Tiger Gao Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23501 MFC r357862 (by emaste): addr2line: use stdbool.h header for bool Presumably a bool definition is obtained via header contamination on FreeBSD-CURRENT. Found while trying to upstream FreeBSD addr2line changes - the FreeBSD 11.2 CI build failed there. Reported by: Cirrus-CI, upstream ELF Tool Chain Sponsored by: The FreeBSD Foundation MFC r358499 (by emaste): readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation MFC r358631 (by emaste): Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 MFC r358637 (by emaste): readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC r358639 (by emaste): readelf: simplify namesz / descsz checks Sponsored by: The FreeBSD Foundation MFC r358685 (by emaste): libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation MFC r358706 (by emaste): readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation MFC r358708 (by emaste): readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation MFC r358713 (by emaste): readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation MFC r358778 (by emaste): readelf: hoist file opening out of dump_object Diff reduction with HEAD to facilitate other MFCs. MFC r359166 (by emaste): objcopy: add new sections also when there is no .shstrtab Previously objcopy (elfcopy) --add-sections inserted new sections before .shstrtab, but omitted them if there was no .shstrtab. Now, after processing existing sections add new sections if they were not yet added. PR: 241437 Reported by: arrowd Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23571 MFC r359172 (by markj): libdwarf: Make an out-pointer assignment unconditional. There is no reason for diep to ever be NULL, since in that case we would simply be leaking memory. CID: 1418801 Sponsored by: The FreeBSD Foundation MFC r359173 (by markj): libpe: Avoid a potential use-after-free in pe_update_symtab(). This function appears to be unused within FreeBSD and ELFToolChain. CID: 1418982 Sponsored by: The FreeBSD Foundation MFC r359174 (by markj): readelf: Avoid leaking ELF descriptors for archive entries. CID: 1292494 Sponsored by: The FreeBSD Foundation MFC r359175 (by markj): readelf: Fix another instance of the leak mentioned in r357542. CID: 1292493 Sponsored by: The FreeBSD Foundation MFC r359176 (by markj): libelftc: Fix a memory leak in cpp_demangle_read_type(). CID: 1305425 Sponsored by: The FreeBSD Foundation MFC r359189 (by emaste): readelf: simplify Xen string note printing Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24140 MFC r361104 (by jhibbits): elftoolchain: Add powerpc64 definition to elftoolchain config powerpc is already in place, but powerpc64 is needed separately. MFC r361662 (by emaste): readelf: add more DT_FLAGS_1 flags Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html > DF_1_SINGLETON Singleton symbols exist. > DF_1_STUB Object is a stub. > DF_1_PIE Object is a position-independent executable. Sponsored by: The FreeBSD Foundation MFC r365489 (by bdragon): [PowerPC64LE] PPC64LE support for libelf. Fix native detection when building on powerpc64le. I will be submitting this and r361104 upstream shortly. Sponsored by: Tag1 Consulting, Inc. MFC r366977 (by emaste): libelf: add compression header support GNU and Oracle libelf implementations added support for section compression, intended to reduce the size of DWARF debug info (which might be an order of magnitude larger than the code). There are two compressed ELF section formats: 1. Old GNU - sections are renmaed to start with 'z'. Section contains a magic number, uncompressed size, and compressed data. 2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag. The compression header contains the compression type, uncompressed size, and uncompressed alignment. The second style is preferred and this change implements only that one. Submitted by: Tiger Gao Reviewed by: markj Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24566 MFC r367209 (by emaste): readelf: Add -z decompression support Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 MFC r367238 (by bdragon): Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC r367322 (by dim): Merge elftoolchain r3877 (by jkoshy): Incorporate fixes from Dimitry Andric: - Use a BUFFER_GROW() macro to avoid rounding errors in capacity calculations. - Fix a bug introduced in [r3531]. - Fix handling of nested template parameters. Ticket: #581 This should fix a number of assertions on elftoolchain's cxxfilt, and allow it to correctly demangle several names that it could not handle before. Obtained from: https://sourceforge.net/p/elftoolchain/code/3877/ PR: 250702 Added: stable/11/contrib/elftoolchain/.cirrus.yml - copied unchanged from r355413, head/contrib/elftoolchain/.cirrus.yml stable/11/contrib/elftoolchain/README.rst - copied, changed from r342918, head/contrib/elftoolchain/README.rst stable/11/contrib/elftoolchain/libelf/gelf_chdr.c - copied unchanged from r366977, head/contrib/elftoolchain/libelf/gelf_chdr.c stable/11/contrib/elftoolchain/libelf/gelf_getchdr.3 - copied unchanged from r366977, head/contrib/elftoolchain/libelf/gelf_getchdr.3 stable/11/contrib/elftoolchain/libelf/libelf_chdr.c - copied unchanged from r366977, head/contrib/elftoolchain/libelf/libelf_chdr.c stable/11/contrib/elftoolchain/libelf/libelf_elfmachine.c - copied unchanged from r342918, head/contrib/elftoolchain/libelf/libelf_elfmachine.c stable/11/contrib/elftoolchain/libelf/os.Linux.mk - copied unchanged from r355413, head/contrib/elftoolchain/libelf/os.Linux.mk Modified: stable/11/contrib/elftoolchain/addr2line/addr2line.1 stable/11/contrib/elftoolchain/addr2line/addr2line.c stable/11/contrib/elftoolchain/ar/ar.1 stable/11/contrib/elftoolchain/ar/ar.5 stable/11/contrib/elftoolchain/ar/ar.c stable/11/contrib/elftoolchain/ar/ar.h stable/11/contrib/elftoolchain/ar/ranlib.1 stable/11/contrib/elftoolchain/ar/read.c stable/11/contrib/elftoolchain/ar/write.c stable/11/contrib/elftoolchain/common/_elftc.h stable/11/contrib/elftoolchain/common/elfdefinitions.h stable/11/contrib/elftoolchain/common/native-elf-format stable/11/contrib/elftoolchain/cxxfilt/c++filt.1 stable/11/contrib/elftoolchain/elfcopy/ascii.c stable/11/contrib/elftoolchain/elfcopy/binary.c stable/11/contrib/elftoolchain/elfcopy/elfcopy.1 stable/11/contrib/elftoolchain/elfcopy/elfcopy.h stable/11/contrib/elftoolchain/elfcopy/main.c stable/11/contrib/elftoolchain/elfcopy/mcs.1 stable/11/contrib/elftoolchain/elfcopy/sections.c stable/11/contrib/elftoolchain/elfcopy/segments.c stable/11/contrib/elftoolchain/elfcopy/strip.1 stable/11/contrib/elftoolchain/elfdump/elfdump.c stable/11/contrib/elftoolchain/libdwarf/dwarf.3 stable/11/contrib/elftoolchain/libdwarf/dwarf.h stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_flag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_location_expr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_name.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_producer.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_ref_address.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_reference.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_signed_const.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_string.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_targ_address.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_arange.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_die_to_debug.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_directory_decl.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_expr_addr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_expr_gen.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_fde_inst.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_file_decl.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_frame_cie.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_frame_fde.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_funcname.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_pubname.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_typename.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_varname.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_add_weakname.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_attr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_attrlist.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_attroffset.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_child.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_dealloc.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_die_abbrev_code.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_die_link.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_diename.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_dieoffset.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c stable/11/contrib/elftoolchain/libdwarf/dwarf_end_macro_file.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_errmsg.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_errno.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_expr_current_offset.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_expr_into_block.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_fde_cfa_offset.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_find_macro_value_start.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_finish.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formaddr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formblock.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formexprloc.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formflag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formref.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formstring.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_formudata.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_AT_name.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_abbrev.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_children_flag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_code.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_entry.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_abbrev_tag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_address_size.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_arange.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_arange_info.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_aranges.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_cie_index.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_cie_info.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_cie_of_fde.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_cu_die_offset.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_die_infotypes_flag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_elf.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_at_pc.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs3.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_cfa_reg3.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg3.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_instr_bytes.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_list.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_n.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_fde_range.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_form_class.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_funcs.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_globals.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_loclist_entry.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_macro_details.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_pubtypes.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_relocation_info.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_relocation_info_count.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_section_bytes.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_section_max_offsets.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_str.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_types.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_vars.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_get_weaks.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_hasform.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_highpc.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_init.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_lineno.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_lne_end_sequence.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_lne_set_address.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_loclist.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_loclist_from_expr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_new_die.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_new_expr.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_new_fde.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_next_types_section.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_object_init.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_pro_attr.c stable/11/contrib/elftoolchain/libdwarf/dwarf_pro_expr.c stable/11/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_producer_set_isa.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_reset_section_bytes.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_set_frame_cfa_value.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_seterrarg.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_srcfiles.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_srclines.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_start_macro_file.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_tag.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_transform_to_disk_form.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_undef_macro.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_vendor_ext.3 stable/11/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 stable/11/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_attr.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_die.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_frame.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_lineno.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_reloc.c stable/11/contrib/elftoolchain/libelf/Makefile stable/11/contrib/elftoolchain/libelf/Version.map stable/11/contrib/elftoolchain/libelf/_libelf.h stable/11/contrib/elftoolchain/libelf/_libelf_config.h stable/11/contrib/elftoolchain/libelf/elf.3 stable/11/contrib/elftoolchain/libelf/elf_begin.3 stable/11/contrib/elftoolchain/libelf/elf_cntl.3 stable/11/contrib/elftoolchain/libelf/elf_data.c stable/11/contrib/elftoolchain/libelf/elf_end.3 stable/11/contrib/elftoolchain/libelf/elf_end.c stable/11/contrib/elftoolchain/libelf/elf_errmsg.3 stable/11/contrib/elftoolchain/libelf/elf_fill.3 stable/11/contrib/elftoolchain/libelf/elf_flagdata.3 stable/11/contrib/elftoolchain/libelf/elf_getarhdr.3 stable/11/contrib/elftoolchain/libelf/elf_getarsym.3 stable/11/contrib/elftoolchain/libelf/elf_getbase.3 stable/11/contrib/elftoolchain/libelf/elf_getdata.3 stable/11/contrib/elftoolchain/libelf/elf_getident.3 stable/11/contrib/elftoolchain/libelf/elf_getident.c stable/11/contrib/elftoolchain/libelf/elf_getphdrnum.3 stable/11/contrib/elftoolchain/libelf/elf_getphnum.3 stable/11/contrib/elftoolchain/libelf/elf_getscn.3 stable/11/contrib/elftoolchain/libelf/elf_getshdrnum.3 stable/11/contrib/elftoolchain/libelf/elf_getshdrstrndx.3 stable/11/contrib/elftoolchain/libelf/elf_getshnum.3 stable/11/contrib/elftoolchain/libelf/elf_getshstrndx.3 stable/11/contrib/elftoolchain/libelf/elf_hash.3 stable/11/contrib/elftoolchain/libelf/elf_kind.3 stable/11/contrib/elftoolchain/libelf/elf_memory.3 stable/11/contrib/elftoolchain/libelf/elf_next.3 stable/11/contrib/elftoolchain/libelf/elf_next.c stable/11/contrib/elftoolchain/libelf/elf_open.3 stable/11/contrib/elftoolchain/libelf/elf_rand.3 stable/11/contrib/elftoolchain/libelf/elf_rand.c stable/11/contrib/elftoolchain/libelf/elf_rawfile.3 stable/11/contrib/elftoolchain/libelf/elf_rawfile.c stable/11/contrib/elftoolchain/libelf/elf_scn.c stable/11/contrib/elftoolchain/libelf/elf_strptr.3 stable/11/contrib/elftoolchain/libelf/elf_update.3 stable/11/contrib/elftoolchain/libelf/elf_update.c stable/11/contrib/elftoolchain/libelf/elf_version.3 stable/11/contrib/elftoolchain/libelf/gelf.3 stable/11/contrib/elftoolchain/libelf/gelf.h stable/11/contrib/elftoolchain/libelf/gelf_cap.c stable/11/contrib/elftoolchain/libelf/gelf_checksum.3 stable/11/contrib/elftoolchain/libelf/gelf_dyn.c stable/11/contrib/elftoolchain/libelf/gelf_fsize.3 stable/11/contrib/elftoolchain/libelf/gelf_getcap.3 stable/11/contrib/elftoolchain/libelf/gelf_getclass.3 stable/11/contrib/elftoolchain/libelf/gelf_getdyn.3 stable/11/contrib/elftoolchain/libelf/gelf_getehdr.3 stable/11/contrib/elftoolchain/libelf/gelf_getmove.3 stable/11/contrib/elftoolchain/libelf/gelf_getphdr.3 stable/11/contrib/elftoolchain/libelf/gelf_getrel.3 stable/11/contrib/elftoolchain/libelf/gelf_getrela.3 stable/11/contrib/elftoolchain/libelf/gelf_getshdr.3 stable/11/contrib/elftoolchain/libelf/gelf_getsym.3 stable/11/contrib/elftoolchain/libelf/gelf_getsyminfo.3 stable/11/contrib/elftoolchain/libelf/gelf_getsymshndx.3 stable/11/contrib/elftoolchain/libelf/gelf_move.c stable/11/contrib/elftoolchain/libelf/gelf_newehdr.3 stable/11/contrib/elftoolchain/libelf/gelf_newphdr.3 stable/11/contrib/elftoolchain/libelf/gelf_rel.c stable/11/contrib/elftoolchain/libelf/gelf_rela.c stable/11/contrib/elftoolchain/libelf/gelf_sym.c stable/11/contrib/elftoolchain/libelf/gelf_syminfo.c stable/11/contrib/elftoolchain/libelf/gelf_symshndx.c stable/11/contrib/elftoolchain/libelf/gelf_update_ehdr.3 stable/11/contrib/elftoolchain/libelf/gelf_xlate.c stable/11/contrib/elftoolchain/libelf/gelf_xlatetof.3 stable/11/contrib/elftoolchain/libelf/libelf.h stable/11/contrib/elftoolchain/libelf/libelf_allocate.c stable/11/contrib/elftoolchain/libelf/libelf_ar.c stable/11/contrib/elftoolchain/libelf/libelf_convert.m4 stable/11/contrib/elftoolchain/libelf/libelf_data.c stable/11/contrib/elftoolchain/libelf/libelf_ehdr.c stable/11/contrib/elftoolchain/libelf/libelf_extended.c stable/11/contrib/elftoolchain/libelf/libelf_memory.c stable/11/contrib/elftoolchain/libelf/libelf_msize.m4 stable/11/contrib/elftoolchain/libelf/libelf_phdr.c stable/11/contrib/elftoolchain/libelf/libelf_xlate.c stable/11/contrib/elftoolchain/libelftc/_libelftc.h stable/11/contrib/elftoolchain/libelftc/elftc.3 stable/11/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 stable/11/contrib/elftoolchain/libelftc/elftc_bfdtarget.c stable/11/contrib/elftoolchain/libelftc/elftc_copyfile.3 stable/11/contrib/elftoolchain/libelftc/elftc_demangle.3 stable/11/contrib/elftoolchain/libelftc/elftc_reloc_type_str.3 stable/11/contrib/elftoolchain/libelftc/elftc_set_timestamps.3 stable/11/contrib/elftoolchain/libelftc/elftc_set_timestamps.c stable/11/contrib/elftoolchain/libelftc/elftc_string_table.c stable/11/contrib/elftoolchain/libelftc/elftc_string_table_create.3 stable/11/contrib/elftoolchain/libelftc/elftc_timestamp.3 stable/11/contrib/elftoolchain/libelftc/elftc_version.3 stable/11/contrib/elftoolchain/libelftc/libelftc.h stable/11/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c stable/11/contrib/elftoolchain/libelftc/libelftc_dem_arm.c stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c stable/11/contrib/elftoolchain/libelftc/libelftc_vstr.c stable/11/contrib/elftoolchain/libelftc/make-toolchain-version stable/11/contrib/elftoolchain/libpe/pe_symtab.c stable/11/contrib/elftoolchain/nm/nm.1 stable/11/contrib/elftoolchain/nm/nm.c stable/11/contrib/elftoolchain/readelf/readelf.1 stable/11/contrib/elftoolchain/readelf/readelf.c stable/11/contrib/elftoolchain/size/size.c stable/11/contrib/elftoolchain/strings/strings.c stable/11/lib/libelf/Makefile stable/11/lib/libelftc/Makefile stable/11/lib/libelftc/elftc_version.c stable/11/sys/sys/elf_common.h stable/11/usr.bin/readelf/Makefile Directory Properties: stable/11/ (props changed) Copied: stable/11/contrib/elftoolchain/.cirrus.yml (from r355413, head/contrib/elftoolchain/.cirrus.yml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/elftoolchain/.cirrus.yml Sat Nov 7 23:57:57 2020 (r367466, copy of r355413, head/contrib/elftoolchain/.cirrus.yml) @@ -0,0 +1,22 @@ +freebsd_11_task: + freebsd_instance: + image: freebsd-11-2-release-amd64 + install_script: pkg install -y git py27-yaml + script: + - fetch http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.tar.gz + - tar -x -C test/tet -f tet3.8-src.tar.gz + - make + +debian_stable_task: + container: + image: debian:stable + setup_script: + - apt-get update + - apt-get install -y + binutils bison bmake curl flex g++ gcc git + libarchive-dev libbsd-dev libc6-dev libexpat1-dev lsb-release + m4 perl python-yaml sharutils zlib1g-dev + script: + - curl -O http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.tar.gz + - tar -x -C test/tet -z -f tet3.8-src.tar.gz + - bmake Copied and modified: stable/11/contrib/elftoolchain/README.rst (from r342918, head/contrib/elftoolchain/README.rst) ============================================================================== --- head/contrib/elftoolchain/README.rst Thu Jan 10 14:35:23 2019 (r342918, copy source) +++ stable/11/contrib/elftoolchain/README.rst Sat Nov 7 23:57:57 2020 (r367466) @@ -62,12 +62,12 @@ The project uses subversion_ for its version control s The subversion branch for the current set of sources may be accessed at the following URL:: - https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk + https://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/ The project's source tree may be checked out from its repository by using the ``svn checkout`` command:: - % svn checkout https://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk + % svn checkout https://svn.code.sf.net/p/elftoolchain/code/trunk Checked-out sources may be kept upto-date by running ``svn update`` inside the source directory:: @@ -105,10 +105,10 @@ The project's developers may be contacted using the ma Reporting Bugs -------------- -Please use our `Trac instance`_ for viewing existing bug reports and +Please use our `bug tracker`_ for viewing existing bug reports and for submitting new bug reports. -.. _`Trac instance`: http://sourceforge.net/apps/trac/elftoolchain/report +.. _`bug tracker`: https://sourceforge.net/p/elftoolchain/tickets/ Additional Information @@ -119,7 +119,7 @@ website`_. .. _project website: http://elftoolchain.sourceforge.net/ -.. $Id: README.rst 3656 2018-12-26 09:46:24Z jkoshy $ +.. $Id: README.rst 3677 2019-02-11 09:37:09Z jkoshy $ .. Local Variables: .. mode: rst Modified: stable/11/contrib/elftoolchain/addr2line/addr2line.1 ============================================================================== --- stable/11/contrib/elftoolchain/addr2line/addr2line.1 Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/addr2line/addr2line.1 Sat Nov 7 23:57:57 2020 (r367466) @@ -22,11 +22,11 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: addr2line.1 3263 2015-11-30 04:25:54Z kaiwang27 $ +.\" $Id: addr2line.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd November 30, 2015 -.Os .Dt ADDR2LINE 1 +.Os .Sh NAME .Nm addr2line .Nd translate program addresses to source file names and line numbers Modified: stable/11/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- stable/11/contrib/elftoolchain/addr2line/addr2line.c Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/addr2line/addr2line.c Sat Nov 7 23:57:57 2020 (r367466) @@ -25,6 +25,8 @@ */ #include +#include + #include #include #include @@ -33,11 +35,11 @@ #include #include #include +#include #include #include #include -#include "uthash.h" #include "_elftc.h" ELFTC_VCSID("$Id: addr2line.c 3499 2016-11-25 16:06:29Z emaste $"); @@ -55,13 +57,15 @@ struct Func { }; struct CU { + RB_ENTRY(CU) entry; Dwarf_Off off; Dwarf_Unsigned lopc; Dwarf_Unsigned hipc; char **srcfiles; Dwarf_Signed nsrcfiles; STAILQ_HEAD(, Func) funclist; - UT_hash_handle hh; + Dwarf_Die die; + Dwarf_Debug dbg; }; static struct option longopts[] = { @@ -78,11 +82,23 @@ static struct option longopts[] = { {"version", no_argument, NULL, 'V'}, {NULL, 0, NULL, 0} }; + static int demangle, func, base, inlines, print_addr, pretty_print; static char unknown[] = { '?', '?', '\0' }; static Dwarf_Addr section_base; -static struct CU *culist; +/* Need a new curlopc that stores last lopc value. */ +static Dwarf_Unsigned curlopc = ~0ULL; +static RB_HEAD(cutree, CU) cuhead = RB_INITIALIZER(&cuhead); +static int +lopccmp(struct CU *e1, struct CU *e2) +{ + return (e1->lopc < e2->lopc ? -1 : e1->lopc > e2->lopc); +} + +RB_PROTOTYPE(cutree, CU, entry, lopccmp); +RB_GENERATE(cutree, CU, entry, lopccmp) + #define USAGE_MESSAGE "\ Usage: %s [options] hexaddress...\n\ Map program addresses to source file names and line numbers.\n\n\ @@ -330,7 +346,8 @@ cont_search: collect_func(dbg, ret_die, parent, cu); /* Cleanup */ - dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die != cu->die) + dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) dwarf_dealloc(dbg, abst_die, DW_DLA_DIE); @@ -376,6 +393,122 @@ print_inlines(struct CU *cu, struct Func *f, Dwarf_Uns f->call_line); } +static struct CU * +culookup(Dwarf_Unsigned addr) +{ + struct CU find, *res; + + find.lopc = addr; + res = RB_NFIND(cutree, &cuhead, &find); + if (res != NULL) { + if (res->lopc != addr) + res = RB_PREV(cutree, &cuhead, res); + if (res != NULL && addr >= res->lopc && addr < res->hipc) + return (res); + } else { + res = RB_MAX(cutree, &cuhead); + if (res != NULL && addr >= res->lopc && addr < res->hipc) + return (res); + } + return (NULL); +} + +/* + * Check whether addr falls into range(s) of current CU, and save current CU + * to lookup tree if so. + */ +static int +check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct CU **cu) +{ + Dwarf_Error de; + Dwarf_Unsigned addr_base, lopc, hipc; + Dwarf_Off ranges_off; + Dwarf_Signed ranges_cnt; + Dwarf_Ranges *ranges; + int i, ret; + bool in_range; + + addr_base = 0; + ranges = NULL; + ranges_cnt = 0; + in_range = false; + + ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); + if (ret == DW_DLV_NO_ENTRY) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, + &de) == DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != + DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_range = true; + } + } + } else if (ret == DW_DLV_OK) { + ret = dwarf_get_ranges(dbg, ranges_off, &ranges, + &ranges_cnt, NULL, &de); + if (ret != DW_DLV_OK) + return (ret); + + if (!ranges || ranges_cnt <= 0) + return (DW_DLV_ERROR); + + for (i = 0; i < ranges_cnt; i++) { + if (ranges[i].dwr_type == DW_RANGES_END) + return (DW_DLV_NO_ENTRY); + + if (ranges[i].dwr_type == + DW_RANGES_ADDRESS_SELECTION) { + addr_base = ranges[i].dwr_addr2; + continue; + } + + /* DW_RANGES_ENTRY */ + lopc = ranges[i].dwr_addr1 + addr_base; + hipc = ranges[i].dwr_addr2 + addr_base; + + if (lopc == curlopc) + return (DW_DLV_ERROR); + + if (addr >= lopc && addr < hipc){ + in_range = true; + break; + } + } + } else { + return (DW_DLV_ERROR); + } + + if (in_range) { + if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + err(EXIT_FAILURE, "calloc"); + (*cu)->lopc = lopc; + (*cu)->hipc = hipc; + (*cu)->die = die; + (*cu)->dbg = dbg; + STAILQ_INIT(&(*cu)->funclist); + RB_INSERT(cutree, &cuhead, *cu); + curlopc = lopc; + return (DW_DLV_OK); + } else { + return (DW_DLV_NO_ENTRY); + } +} + static void translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) { @@ -383,10 +516,9 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr Dwarf_Line *lbuf; Dwarf_Error de; Dwarf_Half tag; - Dwarf_Unsigned lopc, hipc, addr, lineno, plineno; + Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - Dwarf_Off off; struct CU *cu; struct Func *f; const char *funcname; @@ -398,11 +530,31 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr addr += section_base; lineno = 0; file = unknown; - cu = NULL; die = NULL; + ret = DW_DLV_OK; - while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, - &de)) == DW_DLV_OK) { + cu = culookup(addr); + if (cu != NULL) { + die = cu->die; + dbg = cu->dbg; + goto status_ok; + } + + while (true) { + /* + * We resume the CU scan from the last place we found a match. + * Because when we have 2 sequential addresses, and the second + * one is of the next CU, it is faster to just go to the next CU + * instead of starting from the beginning. + */ + ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, + &de); + if (ret == DW_DLV_NO_ENTRY) { + if (curlopc == ~0ULL) + goto out; + ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, + NULL, &de); + } die = NULL; while (dwarf_siblingof(dbg, die, &ret_die, &de) == DW_DLV_OK) { if (die != NULL) @@ -418,51 +570,17 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr if (tag == DW_TAG_compile_unit) break; } + if (ret_die == NULL) { warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - goto out; - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - /* - * Record the CU in the hash table for faster lookup - * later. - */ - if (dwarf_dieoffset(die, &off, &de) != DW_DLV_OK) { - warnx("dwarf_dieoffset failed: %s", - dwarf_errmsg(de)); - goto out; - } - HASH_FIND(hh, culist, &off, sizeof(off), cu); - if (cu == NULL) { - if ((cu = calloc(1, sizeof(*cu))) == NULL) - err(EXIT_FAILURE, "calloc"); - cu->off = off; - cu->lopc = lopc; - cu->hipc = hipc; - STAILQ_INIT(&cu->funclist); - HASH_ADD(hh, culist, off, sizeof(off), cu); - } - - if (addr >= lopc && addr < hipc) - break; - } - - next_cu: + ret = check_range(dbg, die, addr, &cu); + if (ret == DW_DLV_OK) + break; + if (ret == DW_DLV_ERROR) + goto out; +next_cu: if (die != NULL) { dwarf_dealloc(dbg, die, DW_DLA_DIE); die = NULL; @@ -472,6 +590,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr if (ret != DW_DLV_OK || die == NULL) goto out; +status_ok: switch (dwarf_srclines(die, &lbuf, &lcount, &de)) { case DW_DLV_OK: break; @@ -570,21 +689,6 @@ out: cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) print_inlines(cu, f->inlined_caller, f->call_file, f->call_line); - - if (die != NULL) - dwarf_dealloc(dbg, die, DW_DLA_DIE); - - /* - * Reset internal CU pointer, so we will start from the first CU - * next round. - */ - while (ret != DW_DLV_NO_ENTRY) { - if (ret == DW_DLV_ERROR) - errx(EXIT_FAILURE, "dwarf_next_cu_header: %s", - dwarf_errmsg(de)); - ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, - &de); - } } static void Modified: stable/11/contrib/elftoolchain/ar/ar.1 ============================================================================== --- stable/11/contrib/elftoolchain/ar/ar.1 Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/ar.1 Sat Nov 7 23:57:57 2020 (r367466) @@ -21,51 +21,52 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ar.1 3230 2015-07-27 17:11:38Z emaste $ +.\" $Id: ar.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" -.Dd July 27, 2015 -.Os +.Dd September 30, 2018 .Dt AR 1 +.Os .Sh NAME .Nm ar .Nd manage archives .Sh SYNOPSIS .Nm .Fl d -.Op Fl T .Op Fl f .Op Fl j +.Op Fl T .Op Fl v .Op Fl z .Ar archive .Ar .Nm .Fl m -.Op Fl T .Op Fl a Ar position-after .Op Fl b Ar position-before .Op Fl f .Op Fl i Ar position-before .Op Fl j .Op Fl s | Fl S +.Op Fl T .Op Fl z .Ar archive .Ar .Nm .Fl p -.Op Fl T .Op Fl f +.Op Fl s +.Op Fl T .Op Fl v .Ar archive .Op Ar .Nm .Fl q -.Op Fl T .Op Fl c .Op Fl D .Op Fl f .Op Fl F Ar flavor | Fl -flavor Ar flavor .Op Fl s | Fl S +.Op Fl T .Op Fl U .Op Fl v .Op Fl z @@ -73,7 +74,6 @@ .Ar .Nm .Fl r -.Op Fl T .Op Fl a Ar position-after .Op Fl b Ar position-before .Op Fl c @@ -83,6 +83,7 @@ .Op Fl i Ar position-before .Op Fl j .Op Fl s | Fl S +.Op Fl T .Op Fl u .Op Fl U .Op Fl v @@ -99,6 +100,7 @@ .Nm .Fl t .Op Fl f +.Op Fl s .Op Fl T .Op Fl v .Ar archive @@ -106,9 +108,10 @@ .Nm .Fl x .Op Fl C -.Op Fl T .Op Fl f .Op Fl o +.Op Fl s +.Op Fl T .Op Fl u .Op Fl v .Ar archive Modified: stable/11/contrib/elftoolchain/ar/ar.5 ============================================================================== --- stable/11/contrib/elftoolchain/ar/ar.5 Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/ar.5 Sat Nov 7 23:57:57 2020 (r367466) @@ -21,11 +21,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: ar.5 3182 2015-04-10 16:08:10Z emaste $ +.\" $Id: ar.5 3642 2018-10-14 14:24:28Z jkoshy $ .\" -.Dd November 28, 2010 -.Os +.Dd September 30, 2018 .Dt AR 5 +.Os .Sh NAME .Nm ar .Nd archive file format for @@ -84,6 +84,8 @@ An archive header comprises the following fixed sized .Bl -tag -width "Li ar_name" .It Ar ar_name (16 bytes) The file name of the archive member. +This field names a leaf file; absolute paths and relative paths containing +directory names are not supported. The format of this field varies between the BSD and SVR4/GNU formats and is described in more detail in the section .Sx "Representing File Names" Modified: stable/11/contrib/elftoolchain/ar/ar.c ============================================================================== --- stable/11/contrib/elftoolchain/ar/ar.c Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/ar.c Sat Nov 7 23:57:57 2020 (r367466) @@ -72,7 +72,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: ar.c 3319 2016-01-13 21:37:53Z jkoshy $"); +ELFTC_VCSID("$Id: ar.c 3629 2018-09-30 19:26:28Z jkoshy $"); enum options { @@ -100,11 +100,12 @@ main(int argc, char **argv) struct bsdar *bsdar, bsdar_storage; char *arcmd, *argv1_saved; size_t len; - int i, opt; + int exitcode, i, opt; bsdar = &bsdar_storage; memset(bsdar, 0, sizeof(*bsdar)); + exitcode = EXIT_SUCCESS; arcmd = argv1_saved = NULL; bsdar->output = stdout; @@ -152,9 +153,9 @@ main(int argc, char **argv) bsdar->options |= AR_S; while ((bsdar->filename = *argv++) != NULL) - ar_write_archive(bsdar, 's'); + exitcode |= ar_write_archive(bsdar, 's'); - exit(EXIT_SUCCESS); + exit(exitcode); } else { if (argc < 2) bsdar_usage(); @@ -331,30 +332,33 @@ main(int argc, char **argv) if ((!bsdar->mode || strchr("ptx", bsdar->mode)) && bsdar->options & AR_S) { - ar_write_archive(bsdar, 's'); + exitcode = ar_write_archive(bsdar, 's'); if (!bsdar->mode) - exit(EXIT_SUCCESS); + exit(exitcode); } switch(bsdar->mode) { case 'd': case 'm': case 'q': case 'r': - ar_write_archive(bsdar, bsdar->mode); + exitcode = ar_write_archive(bsdar, bsdar->mode); break; case 'p': case 't': case 'x': - ar_read_archive(bsdar, bsdar->mode); + exitcode = ar_read_archive(bsdar, bsdar->mode); break; default: bsdar_usage(); /* NOTREACHED */ } - for (i = 0; i < bsdar->argc; i++) - if (bsdar->argv[i] != NULL) + for (i = 0; i < bsdar->argc; i++) { + if (bsdar->argv[i] != NULL) { bsdar_warnc(bsdar, 0, "%s: not found in archive", bsdar->argv[i]); + exitcode = EXIT_FAILURE; + } + } - exit(EXIT_SUCCESS); + exit(exitcode); } static void Modified: stable/11/contrib/elftoolchain/ar/ar.h ============================================================================== --- stable/11/contrib/elftoolchain/ar/ar.h Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/ar.h Sat Nov 7 23:57:57 2020 (r367466) @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ar.h 2496 2012-04-24 02:33:40Z jkoshy $ + * $Id: ar.h 3629 2018-09-30 19:26:28Z jkoshy $ */ #include @@ -135,8 +135,8 @@ struct bsdar { }; void ar_mode_script(struct bsdar *ar); -void ar_read_archive(struct bsdar *_ar, int _mode); -void ar_write_archive(struct bsdar *_ar, int _mode); +int ar_read_archive(struct bsdar *_ar, int _mode); +int ar_write_archive(struct bsdar *_ar, int _mode); void bsdar_errc(struct bsdar *, int _code, const char *fmt, ...); int bsdar_is_pseudomember(struct bsdar *_ar, const char *_name); const char *bsdar_strmode(mode_t m); Modified: stable/11/contrib/elftoolchain/ar/ranlib.1 ============================================================================== --- stable/11/contrib/elftoolchain/ar/ranlib.1 Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/ranlib.1 Sat Nov 7 23:57:57 2020 (r367466) @@ -21,11 +21,11 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ranlib.1 3195 2015-05-12 17:22:19Z emaste $ +.\" $Id: ranlib.1 3642 2018-10-14 14:24:28Z jkoshy $ .\" .Dd December 9, 2012 -.Os .Dt RANLIB 1 +.Os .Sh NAME .Nm ranlib .Nd update archive symbol tables Modified: stable/11/contrib/elftoolchain/ar/read.c ============================================================================== --- stable/11/contrib/elftoolchain/ar/read.c Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/read.c Sat Nov 7 23:57:57 2020 (r367466) @@ -34,16 +34,20 @@ #include #include #include +#include #include #include "ar.h" -ELFTC_VCSID("$Id: read.c 3180 2015-04-09 15:13:57Z emaste $"); +ELFTC_VCSID("$Id: read.c 3629 2018-09-30 19:26:28Z jkoshy $"); /* * Handle read modes: 'x', 't' and 'p'. + * + * Returns EXIT_SUCCESS if all operations completed successfully or returns + * EXIT_FAILURE otherwise. */ -void +int ar_read_archive(struct bsdar *bsdar, int mode) { FILE *out; @@ -60,8 +64,8 @@ ar_read_archive(struct bsdar *bsdar, int mode) gid_t gid; char **av; char buf[25]; - char find; - int i, flags, r; + int found; + int exitcode, i, flags, r; assert(mode == 'p' || mode == 't' || mode == 'x'); @@ -70,6 +74,7 @@ ar_read_archive(struct bsdar *bsdar, int mode) archive_read_support_format_ar(a); AC(archive_read_open_filename(a, bsdar->filename, DEF_BLKSZ)); + exitcode = EXIT_SUCCESS; out = bsdar->output; for (;;) { @@ -96,12 +101,27 @@ ar_read_archive(struct bsdar *bsdar, int mode) if (bsdar_is_pseudomember(bsdar, name)) continue; + /* The ar(5) format only supports 'leaf' file names. */ + if (strchr(name, '/')) { + bsdar_warnc(bsdar, 0, "ignoring entry: %s", + name); + continue; + } + + /* + * If we had been given a list of file names to process, check + * that the current entry is present in this list. + */ if (bsdar->argc > 0) { - find = 0; + found = 0; for(i = 0; i < bsdar->argc; i++) { av = &bsdar->argv[i]; if (*av == NULL) continue; + /* + * Per POSIX, only the basename of a file + * argument should be compared. + */ if ((bname = basename(*av)) == NULL) bsdar_errc(bsdar, errno, "basename failed"); @@ -109,10 +129,10 @@ ar_read_archive(struct bsdar *bsdar, int mode) continue; *av = NULL; - find = 1; + found = 1; break; } - if (!find) + if (!found) continue; } @@ -157,7 +177,7 @@ ar_read_archive(struct bsdar *bsdar, int mode) /* mode == 'x' */ if (stat(name, &sb) != 0) { if (errno != ENOENT) { - bsdar_warnc(bsdar, 0, + bsdar_warnc(bsdar, errno, "stat %s failed", bsdar->filename); continue; @@ -174,12 +194,6 @@ ar_read_archive(struct bsdar *bsdar, int mode) if (bsdar->options & AR_V) (void)fprintf(out, "x - %s\n", name); - /* Disallow absolute paths. */ - if (name[0] == '/') { - bsdar_warnc(bsdar, 0, - "Absolute path '%s'", name); - continue; - } /* Basic path security flags. */ flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | ARCHIVE_EXTRACT_SECURE_NODOTDOT; @@ -189,11 +203,19 @@ ar_read_archive(struct bsdar *bsdar, int mode) r = archive_read_extract(a, entry, flags); } - if (r) + if (r) { bsdar_warnc(bsdar, 0, "%s", archive_error_string(a)); + exitcode = EXIT_FAILURE; + } } } + + if (r == ARCHIVE_FATAL) + exitcode = EXIT_FAILURE; + AC(archive_read_close(a)); ACV(archive_read_free(a)); + + return (exitcode); } Modified: stable/11/contrib/elftoolchain/ar/write.c ============================================================================== --- stable/11/contrib/elftoolchain/ar/write.c Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/ar/write.c Sat Nov 7 23:57:57 2020 (r367466) @@ -40,7 +40,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 3183 2015-04-10 16:18:42Z emaste $"); +ELFTC_VCSID("$Id: write.c 3629 2018-09-30 19:26:28Z jkoshy $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ @@ -352,17 +352,20 @@ read_objs(struct bsdar *bsdar, const char *archive, in /* * Write an archive. + * + * Returns EXIT_SUCCESS if the write succeeded or EXIT_FAILURE otherwise. */ -void +int ar_write_archive(struct bsdar *bsdar, int mode) { struct ar_obj *nobj, *obj, *obj_temp, *pos; struct stat sb; const char *bname; char **av; - int i; + int exitcode, i; TAILQ_INIT(&bsdar->v_obj); + exitcode = EXIT_SUCCESS; nobj = NULL; pos = NULL; memset(&sb, 0, sizeof(sb)); @@ -376,16 +379,16 @@ ar_write_archive(struct bsdar *bsdar, int mode) */ if (stat(bsdar->filename, &sb) != 0) { if (errno != ENOENT) { - bsdar_warnc(bsdar, 0, "stat %s failed", + bsdar_warnc(bsdar, errno, "stat %s failed", bsdar->filename); - return; + return (EXIT_FAILURE); } /* We do not create archive in mode 'd', 'm' and 's'. */ if (mode != 'r' && mode != 'q') { bsdar_warnc(bsdar, 0, "%s: no such file", bsdar->filename); - return; + return (EXIT_FAILURE); } /* Issue a message if the '-c' option was not specified. */ @@ -474,8 +477,10 @@ ar_write_archive(struct bsdar *bsdar, int mode) */ nobj = create_obj_from_file(bsdar, *av, obj->mtime); - if (nobj == NULL) + if (nobj == NULL) { + exitcode = EXIT_FAILURE; goto skip_obj; + } } if (bsdar->options & AR_V) @@ -510,9 +515,13 @@ new_archive: av = &bsdar->argv[i]; if (*av != NULL && (mode == 'r' || mode == 'q')) { nobj = create_obj_from_file(bsdar, *av, 0); - if (nobj != NULL) - insert_obj(bsdar, nobj, pos); - if (bsdar->options & AR_V && nobj != NULL) + if (nobj == NULL) { + exitcode = EXIT_FAILURE; + *av = NULL; + continue; + } + insert_obj(bsdar, nobj, pos); + if (bsdar->options & AR_V) (void)fprintf(bsdar->output, "a - %s\n", *av); *av = NULL; } @@ -521,6 +530,8 @@ new_archive: write_objs: write_objs(bsdar); write_cleanup(bsdar); + + return (exitcode); } /* Modified: stable/11/contrib/elftoolchain/common/_elftc.h ============================================================================== --- stable/11/contrib/elftoolchain/common/_elftc.h Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/common/_elftc.h Sat Nov 7 23:57:57 2020 (r367466) @@ -374,11 +374,14 @@ extern const char *__progname; #include #define htobe32(x) OSSwapHostToBigInt32(x) +#define htole32(x) OSSwapHostToLittleInt32(x) +#ifndef roundup2 #define roundup2 roundup +#endif -#define ELFTC_BYTE_ORDER _BYTE_ORDER -#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN -#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN +#define ELFTC_BYTE_ORDER __DARWIN_BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN __DARWIN_BIG_ENDIAN #define ELFTC_HAVE_MMAP 1 #define ELFTC_HAVE_STRMODE 1 @@ -418,7 +421,9 @@ extern const char *__progname; /* Whether we need to supply {be,le}32dec. */ #define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 +#ifndef roundup2 #define roundup2 roundup +#endif #endif /* __GLIBC__ || __linux__ */ Modified: stable/11/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- stable/11/contrib/elftoolchain/common/elfdefinitions.h Sat Nov 7 21:46:27 2020 (r367465) +++ stable/11/contrib/elftoolchain/common/elfdefinitions.h Sat Nov 7 23:57:57 2020 (r367466) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3515 2017-01-24 22:04:22Z emaste $ + * $Id: elfdefinitions.h 3769 2019-06-29 15:15:02Z emaste $ */ /* @@ -33,7 +33,7 @@ * See: http://www.sco.com/developers/gabi/latest/ch4.intro.html * - The May 1998 (version 1.5) draft of "The ELF-64 object format". * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, - * ia64, and powerpc processors. + * ia64, powerpc, and RISC-V processors. * - The "Linkers and Libraries Guide", from Sun Microsystems. */ @@ -72,7 +72,39 @@ _ELF_DEFINE_DF(DF_TEXTREL, 0x4, \ _ELF_DEFINE_DF(DF_BIND_NOW, 0x8, \ "process relocation entries at load time") \ _ELF_DEFINE_DF(DF_STATIC_TLS, 0x10, \ - "uses static thread-local storage") + "uses static thread-local storage") \ +_ELF_DEFINE_DF(DF_1_BIND_NOW, 0x1, \ + "process relocation entries at load time") \ +_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2, \ + "unused") \ +_ELF_DEFINE_DF(DF_1_GROUP, 0x4, \ + "object is a member of a group") \ +_ELF_DEFINE_DF(DF_1_NODELETE, 0x8, \ + "object cannot be deleted from a process") \ +_ELF_DEFINE_DF(DF_1_LOADFLTR, 0x10, \ + "immediate load filtees") \ +_ELF_DEFINE_DF(DF_1_INITFIRST, 0x20, \ + "initialize object first") \ +_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40, \ + "disallow dlopen()") \ +_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80, \ + "object being loaded may refer to $ORIGIN") \ +_ELF_DEFINE_DF(DF_1_DIRECT, 0x100, \ + "direct bindings enabled") \ +_ELF_DEFINE_DF(DF_1_INTERPOSE, 0x400, \ + "object is interposer") \ +_ELF_DEFINE_DF(DF_1_NODEFLIB, 0x800, \ + "ignore default library search path") \ +_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000, \ + "disallow dldump()") \ +_ELF_DEFINE_DF(DF_1_CONFALT, 0x2000, \ + "object is a configuration alternative") \ +_ELF_DEFINE_DF(DF_1_ENDFILTEE, 0x4000, \ + "filtee terminates filter search") \ +_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000, \ + "displacement relocation done") \ +_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x10000, \ + "displacement relocation pending") #undef _ELF_DEFINE_DF #define _ELF_DEFINE_DF(N, V, DESCR) N = V , enum { @@ -426,6 +458,22 @@ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE, 0x00010000UL, \ "-mrelocatable flag") \ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL, \ "-mrelocatable-lib flag") \ +_ELF_DEFINE_EF(EF_RISCV_RVC, 0x00000001UL, \ + "Compressed instruction extension") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_MASK, 0x00000006UL, \ + "Floating point ABI") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SOFT, 0x00000000UL, \ + "Software emulated floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SINGLE, 0x00000002UL, \ + "Single precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL, \ + "Double precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \ + "Quad precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \ + "RV32E embedded ABI") \ +_ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \ + "RVTSO memory consistency model") \ _ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \ "Vendor Extension mask") \ _ELF_DEFINE_EF(EF_SPARC_32PLUS, 0x00000100UL, \ @@ -2448,7 +2496,10 @@ _ELF_DEFINE_NT(NT_PSTATUS, 10, "Linux process status") _ELF_DEFINE_NT(NT_FPREGS, 12, "Linux floating point regset") \ _ELF_DEFINE_NT(NT_PSINFO, 13, "Linux process information") \ _ELF_DEFINE_NT(NT_LWPSTATUS, 16, "Linux lwpstatus_t type") \ -_ELF_DEFINE_NT(NT_LWPSINFO, 17, "Linux lwpinfo_t type") +_ELF_DEFINE_NT(NT_LWPSINFO, 17, "Linux lwpinfo_t type") \ +_ELF_DEFINE_NT(NT_FREEBSD_NOINIT_TAG, 2, "FreeBSD no .init tag") \ +_ELF_DEFINE_NT(NT_FREEBSD_ARCH_TAG, 3, "FreeBSD arch tag") \ +_ELF_DEFINE_NT(NT_FREEBSD_FEATURE_CTL, 4, "FreeBSD feature control") *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***