From owner-svn-src-all@freebsd.org Sun Jun 9 00:26:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F68915B79B2; Sun, 9 Jun 2019 00:26:33 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D927B80A7B; Sun, 9 Jun 2019 00:26:32 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id u64so3950012oib.1; Sat, 08 Jun 2019 17:26:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=GWMZLgyTombFr65+Xkkb2PddY+cYEw0vSPJFGP7G6Cs=; b=tKIr7UUXHqpZydAa7of3wVbrhEvHH/NjvEX9ckG2sh5iVyiYOaCmMfrCmd4UUZetqj PL0nPvKvQJr9uUGbOocAvwNBztn6f4mXyNfjTn3vnaivf4622zH9pKrOe4giKFbS9YVa bA134718XMigEPjjiYmX1gOlvoLU31VpVNrHr7VP/BKcmccHE7zc5ouDcxT8S1t2bQFW PfEsJ4yDM/PklD92ypS97X1JNtA8xCAZMWnCXhNa/Mj867ALdXe4+FNW0pwwyFX8iD+u 8ZFSz/bX2XBqOUMxdRd9xvVQQFaCYvdAo59z13jOZz7bMlQjU3hc5p+mAVGeNomqirOb x51Q== X-Gm-Message-State: APjAAAXOSJi8I9yzbttZGMyLezLG+5Obl9L+NpXdI+CH0PMJNdQhdcoo /1sVG4QYXZxsAbWfiW3720QOQCmr X-Google-Smtp-Source: APXvYqzWfYmNZafTx4pc9ZAreWEC1W4fIGw2IXqMs7pX1q+rgDaMDlRrzFQl/WnaomODws0qonxHuQ== X-Received: by 2002:aca:38d4:: with SMTP id f203mr8353880oia.88.1560038128434; Sat, 08 Jun 2019 16:55:28 -0700 (PDT) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com. [209.85.210.50]) by smtp.gmail.com with ESMTPSA id x193sm2466836oix.15.2019.06.08.16.55.28 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jun 2019 16:55:28 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id j19so5203723otq.2; Sat, 08 Jun 2019 16:55:28 -0700 (PDT) X-Received: by 2002:a9d:7a82:: with SMTP id l2mr3219679otn.120.1560038128050; Sat, 08 Jun 2019 16:55:28 -0700 (PDT) MIME-Version: 1.0 References: <201906081717.x58HHHST031098@repo.freebsd.org> In-Reply-To: <201906081717.x58HHHST031098@repo.freebsd.org> From: Chuck Tuffli Date: Sat, 8 Jun 2019 16:55:11 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348806 - head/usr.sbin/camdd To: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D927B80A7B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 00:26:33 -0000 On Sat, Jun 8, 2019 at 10:17 AM Chuck Tuffli wrote: > > Author: chuck > Date: Sat Jun 8 17:17:17 2019 > New Revision: 348806 > URL: https://svnweb.freebsd.org/changeset/base/348806 > > Log: > Add NVMe support to camdd(8) > > Reviewed by: ken > Approved by: ken (mentor) > MFC after: 1 week > Differential Review: https://reviews.freebsd.org/D12141 > > Modified: > head/usr.sbin/camdd/camdd.c This is breaking several builds and I'm looking at it now. Sorry :( --chuck From owner-svn-src-all@freebsd.org Sun Jun 9 01:26:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83BEC15B8C28; Sun, 9 Jun 2019 01:26:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 876CB824CE; Sun, 9 Jun 2019 01:26:57 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6244023BAF; Sun, 9 Jun 2019 01:26:57 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x591Qvwj087303; Sun, 9 Jun 2019 01:26:57 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x591Qvb6087302; Sun, 9 Jun 2019 01:26:57 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906090126.x591Qvb6087302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 9 Jun 2019 01:26: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: r348823 - stable/12/sys/modules/ipfilter X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/sys/modules/ipfilter X-SVN-Commit-Revision: 348823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 876CB824CE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 01:26:58 -0000 Author: cy Date: Sun Jun 9 01:26:56 2019 New Revision: 348823 URL: https://svnweb.freebsd.org/changeset/base/348823 Log: MFC r348718: Whitespace adjustment. Modified: stable/12/sys/modules/ipfilter/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/ipfilter/Makefile ============================================================================== --- stable/12/sys/modules/ipfilter/Makefile Sat Jun 8 22:29:51 2019 (r348822) +++ stable/12/sys/modules/ipfilter/Makefile Sun Jun 9 01:26:56 2019 (r348823) @@ -9,7 +9,7 @@ SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_prox ip_nat6.c ip_rules.c ip_scan.c ip_dstlist.c radix_ipf.c SRCS+= opt_bpf.h opt_inet6.h -CFLAGS+= -I${SRCTOP}/sys/contrib/ipfilter +CFLAGS+= -I${SRCTOP}/sys/contrib/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP # # If you don't want log functionality remove -DIPFILTER_LOG From owner-svn-src-all@freebsd.org Sun Jun 9 02:06:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3BD515B98A7; Sun, 9 Jun 2019 02:06:32 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92B31835B6; Sun, 9 Jun 2019 02:06:32 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81E092425B; Sun, 9 Jun 2019 02:06:32 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5926WK6008687; Sun, 9 Jun 2019 02:06:32 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5926W30008686; Sun, 9 Jun 2019 02:06:32 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <201906090206.x5926W30008686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Sun, 9 Jun 2019 02:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348824 - head/usr.sbin/camdd X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/camdd X-SVN-Commit-Revision: 348824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 92B31835B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 02:06:33 -0000 Author: chuck Date: Sun Jun 9 02:06:31 2019 New Revision: 348824 URL: https://svnweb.freebsd.org/changeset/base/348824 Log: Fix uninitialized variable in camdd gcc builds were failing because of this uninitialized warning. Reported by: bz, imp Approved by: imp (mentor) Discussed with: ken Pointy hat: chuck Modified: head/usr.sbin/camdd/camdd.c Modified: head/usr.sbin/camdd/camdd.c ============================================================================== --- head/usr.sbin/camdd/camdd.c Sun Jun 9 01:26:56 2019 (r348823) +++ head/usr.sbin/camdd/camdd.c Sun Jun 9 02:06:31 2019 (r348824) @@ -1475,7 +1475,7 @@ camdd_probe_pass(struct cam_device *cam_dev, struct ca struct kevent ke; struct ccb_getdev cgd; int retval; - int scsi_dev_type; + int scsi_dev_type = T_NODEVICE; if ((retval = camdd_get_cgd(cam_dev, &cgd)) != 0) { warnx("%s: error retrieving CGD", __func__); From owner-svn-src-all@freebsd.org Sun Jun 9 02:32:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B14A15BA32F; Sun, 9 Jun 2019 02:32:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE78841C3; Sun, 9 Jun 2019 02:32:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 192B624781; Sun, 9 Jun 2019 02:32:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x592WqpJ023965; Sun, 9 Jun 2019 02:32:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x592WqTo023964; Sun, 9 Jun 2019 02:32:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906090232.x592WqTo023964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 9 Jun 2019 02:32:52 +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: r348825 - stable/11/sys/modules/ipfilter X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/modules/ipfilter X-SVN-Commit-Revision: 348825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2CE78841C3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 02:32:53 -0000 Author: cy Date: Sun Jun 9 02:32:52 2019 New Revision: 348825 URL: https://svnweb.freebsd.org/changeset/base/348825 Log: MFC r348718: Whitespace adjustment. Approved by: re (gjb@) Modified: stable/11/sys/modules/ipfilter/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/ipfilter/Makefile ============================================================================== --- stable/11/sys/modules/ipfilter/Makefile Sun Jun 9 02:06:31 2019 (r348824) +++ stable/11/sys/modules/ipfilter/Makefile Sun Jun 9 02:32:52 2019 (r348825) @@ -9,7 +9,7 @@ SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_prox ip_nat6.c ip_rules.c ip_scan.c ip_dstlist.c radix_ipf.c SRCS+= opt_bpf.h opt_inet6.h -CFLAGS+= -I${SRCTOP}/sys/contrib/ipfilter +CFLAGS+= -I${SRCTOP}/sys/contrib/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP # # If you don't want log functionality remove -DIPFILTER_LOG From owner-svn-src-all@freebsd.org Sun Jun 9 03:29:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 665E115BB4C2; Sun, 9 Jun 2019 03:29:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01C9185A89; Sun, 9 Jun 2019 03:29:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA3452507F; Sun, 9 Jun 2019 03:29:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x593TShi051359; Sun, 9 Jun 2019 03:29:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x593TRcZ051352; Sun, 9 Jun 2019 03:29:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906090329.x593TRcZ051352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 9 Jun 2019 03:29: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: r348826 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 348826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01C9185A89 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 03:29:29 -0000 Author: markj Date: Sun Jun 9 03:29:26 2019 New Revision: 348826 URL: https://svnweb.freebsd.org/changeset/base/348826 Log: MFC r348502: Add a vm_page_wired() predicate. Modified: stable/12/sys/vm/memguard.c stable/12/sys/vm/swap_pager.c stable/12/sys/vm/vm_fault.c stable/12/sys/vm/vm_object.c stable/12/sys/vm/vm_page.c stable/12/sys/vm/vm_page.h stable/12/sys/vm/vm_pageout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/memguard.c ============================================================================== --- stable/12/sys/vm/memguard.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/memguard.c Sun Jun 9 03:29:26 2019 (r348826) @@ -259,7 +259,7 @@ v2sizep(vm_offset_t va) if (pa == 0) panic("MemGuard detected double-free of %p", (void *)va); p = PHYS_TO_VM_PAGE(pa); - KASSERT(p->wire_count != 0 && p->queue == PQ_NONE, + KASSERT(vm_page_wired(p) && p->queue == PQ_NONE, ("MEMGUARD: Expected wired page %p in vtomgfifo!", p)); return (&p->plinks.memguard.p); } @@ -274,7 +274,7 @@ v2sizev(vm_offset_t va) if (pa == 0) panic("MemGuard detected double-free of %p", (void *)va); p = PHYS_TO_VM_PAGE(pa); - KASSERT(p->wire_count != 0 && p->queue == PQ_NONE, + KASSERT(vm_page_wired(p) && p->queue == PQ_NONE, ("MEMGUARD: Expected wired page %p in vtomgfifo!", p)); return (&p->plinks.memguard.v); } Modified: stable/12/sys/vm/swap_pager.c ============================================================================== --- stable/12/sys/vm/swap_pager.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/swap_pager.c Sun Jun 9 03:29:26 2019 (r348826) @@ -1681,7 +1681,7 @@ swp_pager_force_pagein(vm_object_t object, vm_pindex_t vm_page_dirty(m); #ifdef INVARIANTS vm_page_lock(m); - if (m->wire_count == 0 && m->queue == PQ_NONE) + if (!vm_page_wired(m) && m->queue == PQ_NONE) panic("page %p is neither wired nor queued", m); vm_page_unlock(m); #endif Modified: stable/12/sys/vm/vm_fault.c ============================================================================== --- stable/12/sys/vm/vm_fault.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/vm_fault.c Sun Jun 9 03:29:26 2019 (r348826) @@ -1004,7 +1004,7 @@ readrest: */ if (rv == VM_PAGER_ERROR || rv == VM_PAGER_BAD) { vm_page_lock(fs.m); - if (fs.m->wire_count == 0) + if (!vm_page_wired(fs.m)) vm_page_free(fs.m); else vm_page_xunbusy_maybelocked(fs.m); @@ -1027,7 +1027,7 @@ readrest: */ if (fs.object != fs.first_object) { vm_page_lock(fs.m); - if (fs.m->wire_count == 0) + if (!vm_page_wired(fs.m)) vm_page_free(fs.m); else vm_page_xunbusy_maybelocked(fs.m); @@ -1794,7 +1794,7 @@ again: vm_page_wire(dst_m); vm_page_unlock(dst_m); } else { - KASSERT(dst_m->wire_count > 0, + KASSERT(vm_page_wired(dst_m), ("dst_m %p is not wired", dst_m)); } } else { Modified: stable/12/sys/vm/vm_object.c ============================================================================== --- stable/12/sys/vm/vm_object.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/vm_object.c Sun Jun 9 03:29:26 2019 (r348826) @@ -742,7 +742,7 @@ vm_object_terminate_pages(vm_object_t object) */ vm_page_change_lock(p, &mtx); p->object = NULL; - if (p->wire_count != 0) + if (vm_page_wired(p)) continue; VM_CNT_INC(v_pfree); vm_page_free(p); @@ -1617,7 +1617,7 @@ vm_object_collapse_scan(vm_object_t object, int op) vm_page_lock(p); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (p->wire_count == 0) + if (!vm_page_wired(p)) vm_page_free(p); else vm_page_remove(p); @@ -1661,7 +1661,7 @@ vm_object_collapse_scan(vm_object_t object, int op) vm_page_lock(p); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (p->wire_count == 0) + if (!vm_page_wired(p)) vm_page_free(p); else vm_page_remove(p); @@ -1966,7 +1966,7 @@ again: VM_OBJECT_WLOCK(object); goto again; } - if (p->wire_count != 0) { + if (vm_page_wired(p)) { if ((options & OBJPR_NOTMAPPED) == 0 && object->ref_count != 0) pmap_remove_all(p); Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/vm_page.c Sun Jun 9 03:29:26 2019 (r348826) @@ -2602,7 +2602,7 @@ retry: error = ENOMEM; goto unlock; } - KASSERT(m_new->wire_count == 0, + KASSERT(!vm_page_wired(m_new), ("page %p is wired", m_new)); /* @@ -3399,7 +3399,7 @@ vm_page_activate(vm_page_t m) vm_page_assert_locked(m); - if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) return; if (vm_page_queue(m) == PQ_ACTIVE) { if (m->act_count < ACT_INIT) @@ -3474,7 +3474,7 @@ vm_page_free_prep(vm_page_t m) m->valid = 0; vm_page_undirty(m); - if (m->wire_count != 0) + if (vm_page_wired(m) != 0) panic("vm_page_free_prep: freeing wired page %p", m); if (m->hold_count != 0) { m->flags &= ~PG_ZERO; @@ -3575,7 +3575,7 @@ vm_page_wire(vm_page_t m) m)); return; } - if (m->wire_count == 0) { + if (!vm_page_wired(m)) { KASSERT((m->oflags & VPO_UNMANAGED) == 0 || m->queue == PQ_NONE, ("vm_page_wire: unmanaged page %p is queued", m)); @@ -3653,7 +3653,7 @@ vm_page_unwire_noq(vm_page_t m) ("vm_page_unwire: fictitious page %p's wire count isn't one", m)); return (false); } - if (m->wire_count == 0) + if (!vm_page_wired(m)) panic("vm_page_unwire: page %p's wire count is zero", m); m->wire_count--; if (m->wire_count == 0) { @@ -3675,7 +3675,7 @@ vm_page_deactivate(vm_page_t m) vm_page_assert_locked(m); - if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) return; if (!vm_page_inactive(m)) { @@ -3699,7 +3699,7 @@ vm_page_deactivate_noreuse(vm_page_t m) vm_page_assert_locked(m); - if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) return; if (!vm_page_inactive(m)) { @@ -3721,7 +3721,7 @@ vm_page_launder(vm_page_t m) { vm_page_assert_locked(m); - if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) return; if (vm_page_in_laundry(m)) @@ -3742,7 +3742,7 @@ vm_page_unswappable(vm_page_t m) { vm_page_assert_locked(m); - KASSERT(m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0, + KASSERT(!vm_page_wired(m) && (m->oflags & VPO_UNMANAGED) == 0, ("page %p already unswappable", m)); vm_page_dequeue(m); Modified: stable/12/sys/vm/vm_page.h ============================================================================== --- stable/12/sys/vm/vm_page.h Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/vm_page.h Sun Jun 9 03:29:26 2019 (r348826) @@ -820,5 +820,12 @@ vm_page_held(vm_page_t m) return (m->hold_count > 0 || m->wire_count > 0); } +static inline bool +vm_page_wired(vm_page_t m) +{ + + return (m->wire_count > 0); +} + #endif /* _KERNEL */ #endif /* !_VM_PAGE_ */ Modified: stable/12/sys/vm/vm_pageout.c ============================================================================== --- stable/12/sys/vm/vm_pageout.c Sun Jun 9 02:32:52 2019 (r348825) +++ stable/12/sys/vm/vm_pageout.c Sun Jun 9 03:29:26 2019 (r348826) @@ -753,7 +753,7 @@ recheck: */ if (m->hold_count != 0) continue; - if (m->wire_count != 0) { + if (vm_page_wired(m)) { vm_page_dequeue_deferred(m); continue; } @@ -1204,7 +1204,7 @@ act_scan: /* * Wired pages are dequeued lazily. */ - if (m->wire_count != 0) { + if (vm_page_wired(m)) { vm_page_dequeue_deferred(m); continue; } @@ -1431,7 +1431,7 @@ recheck: addl_page_shortage++; goto reinsert; } - if (m->wire_count != 0) { + if (vm_page_wired(m)) { vm_page_dequeue_deferred(m); continue; } From owner-svn-src-all@freebsd.org Sun Jun 9 03:31:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED5B415BB53B; Sun, 9 Jun 2019 03:31:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F51085D4C; Sun, 9 Jun 2019 03:31:08 +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 6AF89250B2; Sun, 9 Jun 2019 03:31:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x593V8qq056460; Sun, 9 Jun 2019 03:31:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x593V8Kg056459; Sun, 9 Jun 2019 03:31:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906090331.x593V8Kg056459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 9 Jun 2019 03:31: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: r348827 - stable/12/lib/libnetgraph X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/lib/libnetgraph X-SVN-Commit-Revision: 348827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F51085D4C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 03:31:09 -0000 Author: markj Date: Sun Jun 9 03:31:07 2019 New Revision: 348827 URL: https://svnweb.freebsd.org/changeset/base/348827 Log: MFC r347439: Atomically update the global gMsgId in libnetgraph. PR: 234442 Modified: stable/12/lib/libnetgraph/msg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libnetgraph/msg.c ============================================================================== --- stable/12/lib/libnetgraph/msg.c Sun Jun 9 03:29:26 2019 (r348826) +++ stable/12/lib/libnetgraph/msg.c Sun Jun 9 03:31:07 2019 (r348827) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -51,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include "internal.h" /* Next message token value */ -static int gMsgId; +static _Atomic(unsigned int) gMsgId; /* For delivering both messages and replies */ static int NgDeliverMsg(int cs, const char *path, @@ -72,9 +73,7 @@ NgSendMsg(int cs, const char *path, memset(&msg, 0, sizeof(msg)); msg.header.version = NG_VERSION; msg.header.typecookie = cookie; - if (++gMsgId < 0) - gMsgId = 1; - msg.header.token = gMsgId; + msg.header.token = atomic_fetch_add(&gMsgId, 1) & INT_MAX; msg.header.flags = NGF_ORIG; msg.header.cmd = cmd; snprintf((char *)msg.header.cmdstr, NG_CMDSTRSIZ, "cmd%d", cmd); @@ -143,9 +142,7 @@ NgSendAsciiMsg(int cs, const char *path, const char *f /* Now send binary version */ binary = (struct ng_mesg *)reply->data; - if (++gMsgId < 0) - gMsgId = 1; - binary->header.token = gMsgId; + binary->header.token = atomic_fetch_add(&gMsgId, 1) & INT_MAX; binary->header.version = NG_VERSION; if (NgDeliverMsg(cs, path, binary, binary->data, binary->header.arglen) < 0) { From owner-svn-src-all@freebsd.org Sun Jun 9 03:36:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2240415BB8DD; Sun, 9 Jun 2019 03:36:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF35A860DB; Sun, 9 Jun 2019 03:36:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B9682522B; Sun, 9 Jun 2019 03:36:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x593aBIN056735; Sun, 9 Jun 2019 03:36:11 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x593aBCf056732; Sun, 9 Jun 2019 03:36:11 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906090336.x593aBCf056732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 9 Jun 2019 03:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348828 - in head/sys: amd64/amd64 arm64/arm64 i386/i386 riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm64/arm64 i386/i386 riscv/riscv X-SVN-Commit-Revision: 348828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF35A860DB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 03:36:12 -0000 Author: alc Date: Sun Jun 9 03:36:10 2019 New Revision: 348828 URL: https://svnweb.freebsd.org/changeset/base/348828 Log: Implement an alternative solution to the amd64 and i386 pmap problem that we previously addressed in r348246. This pmap problem also exists on arm64 and riscv. However, the original solution developed for amd64 and i386 cannot be used on arm64 and riscv. In particular, arm64 and riscv do not define a PG_PROMOTED flag in their level 2 PTEs. (A PG_PROMOTED flag makes no sense on arm64, where unlike x86 or riscv we are required to break the old 4KB mappings before making the 2MB mapping; and on riscv there are no unused bits in the PTE to define a PG_PROMOTED flag.) This commit implements an alternative solution that can be used on all four architectures. Moreover, this solution has two other advantages. First, on older AMD processors that required the Erratum 383 workaround, it is less costly. Specifically, it avoids unnecessary calls to pmap_fill_ptp() on a superpage demotion. Second, it enables the elimination of some calls to pagezero() in pmap_kernel_remove_{l2,pde}(). In addition, remove a related stale comment from pmap_enter_{l2,pde}(). Reviewed by: kib, markj (an earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20538 Modified: head/sys/amd64/amd64/pmap.c head/sys/arm64/arm64/pmap.c head/sys/i386/i386/pmap.c head/sys/riscv/riscv/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Jun 9 03:31:07 2019 (r348827) +++ head/sys/amd64/amd64/pmap.c Sun Jun 9 03:36:10 2019 (r348828) @@ -1053,7 +1053,7 @@ static int pmap_enter_pde(pmap_t pmap, vm_offset_t va, static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); -static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted); static void pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, vm_offset_t eva); static void pmap_invalidate_cache_range_all(vm_offset_t sva, @@ -1757,8 +1757,13 @@ pmap_init(void) mpte->pindex = pmap_pde_pindex(KERNBASE) + i; mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); mpte->wire_count = 1; + + /* + * Collect the page table pages that were replaced by a 2MB + * page in create_pagetables(). They are zero filled. + */ if (i << PDRSHIFT < KERNend && - pmap_insert_pt_page(kernel_pmap, mpte)) + pmap_insert_pt_page(kernel_pmap, mpte, false)) panic("pmap_init: pmap_insert_pt_page failed"); } PMAP_UNLOCK(kernel_pmap); @@ -3129,12 +3134,15 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist * of idle page table pages. Each of a pmap's page table pages is responsible * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. + * + * If "promoted" is false, then the page table page "mpte" must be zero filled. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte) +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mpte->valid = promoted ? VM_PAGE_BITS_ALL : 0; return (vm_radix_insert(&pmap->pm_root, mpte)); } @@ -4626,7 +4634,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v * If the page table page is not leftover from an earlier promotion, * initialize it. */ - if ((oldpde & PG_PROMOTED) == 0) + if (mpte->valid == 0) pmap_fill_ptp(firstpte, newpte); pmap_demote_pde_check(firstpte, newpte); @@ -4699,9 +4707,11 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_entry_t *pde, v newpde = mptepa | X86_PG_M | X86_PG_A | X86_PG_RW | X86_PG_V; /* - * Initialize the page table page. + * If this page table page was unmapped by a promotion, then it + * contains valid mappings. Zero it to invalidate those mappings. */ - pagezero((void *)PHYS_TO_DMAP(mptepa)); + if (mpte->valid != 0) + pagezero((void *)PHYS_TO_DMAP(mptepa)); /* * Demote the mapping. @@ -4766,6 +4776,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse } else { mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { + KASSERT(mpte->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pde: pte page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -5399,7 +5411,7 @@ setpte: ("pmap_promote_pde: page table page is out of range")); KASSERT(mpte->pindex == pmap_pde_pindex(va), ("pmap_promote_pde: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, mpte)) { + if (pmap_insert_pt_page(pmap, mpte, true)) { atomic_add_long(&pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx in pmap %p", va, @@ -5826,15 +5838,13 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t } vm_page_free_pages_toq(&free, true); if (va >= VM_MAXUSER_ADDRESS) { + /* + * Both pmap_remove_pde() and pmap_remove_ptes() will + * leave the kernel page table page zero filled. + */ mt = PHYS_TO_VM_PAGE(*pde & PG_FRAME); - if (pmap_insert_pt_page(pmap, mt)) { - /* - * XXX Currently, this can't happen because - * we do not perform pmap_enter(psind == 1) - * on the kernel pmap. - */ + if (pmap_insert_pt_page(pmap, mt, false)) panic("pmap_enter_pde: trie insert failed"); - } } else KASSERT(*pde == 0, ("pmap_enter_pde: non-zero pde %p", pde)); @@ -6824,6 +6834,8 @@ pmap_remove_pages(pmap_t pmap) } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { + KASSERT(mpte->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pages: pte page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sun Jun 9 03:31:07 2019 (r348827) +++ head/sys/arm64/arm64/pmap.c Sun Jun 9 03:36:10 2019 (r348828) @@ -2401,9 +2401,11 @@ pmap_remove_kernel_l2(pmap_t pmap, pt_entry_t *l2, vm_ newl2 = ml3pa | L2_TABLE; /* - * Initialize the page table page. + * If this page table page was unmapped by a promotion, then it + * contains valid mappings. Zero it to invalidate those mappings. */ - pagezero((void *)PHYS_TO_DMAP(ml3pa)); + if (ml3->valid != 0) + pagezero((void *)PHYS_TO_DMAP(ml3pa)); /* * Demote the mapping. The caller must have already invalidated the @@ -2456,6 +2458,8 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ } else { ml3 = pmap_remove_pt_page(pmap, sva); if (ml3 != NULL) { + KASSERT(ml3->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_l2: l3 page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_l2: l3 page wire count error")); @@ -2812,12 +2816,15 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t * of idle page table pages. Each of a pmap's page table pages is responsible * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. + * + * If "promoted" is false, then the page table page "mpte" must be zero filled. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte) +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mpte->valid = promoted ? VM_PAGE_BITS_ALL : 0; return (vm_radix_insert(&pmap->pm_root, mpte)); } @@ -2962,7 +2969,7 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset ("pmap_promote_l2: page table page is out of range")); KASSERT(mpte->pindex == pmap_l2_pindex(va), ("pmap_promote_l2: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, mpte)) { + if (pmap_insert_pt_page(pmap, mpte, true)) { atomic_add_long(&pmap_l2_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx in pmap %p", va, @@ -3386,15 +3393,13 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t } vm_page_free_pages_toq(&free, true); if (va >= VM_MAXUSER_ADDRESS) { + /* + * Both pmap_remove_l2() and pmap_remove_l3() will + * leave the kernel page table page zero filled. + */ mt = PHYS_TO_VM_PAGE(pmap_load(l2) & ~ATTR_MASK); - if (pmap_insert_pt_page(pmap, mt)) { - /* - * XXX Currently, this can't happen bacuse - * we do not perform pmap_enter(psind == 1) - * on the kernel pmap. - */ + if (pmap_insert_pt_page(pmap, mt, false)) panic("pmap_enter_l2: trie insert failed"); - } } else KASSERT(pmap_load(l2) == 0, ("pmap_enter_l2: non-zero L2 entry %p", l2)); @@ -4081,6 +4086,8 @@ pmap_remove_pages(pmap_t pmap) ml3 = pmap_remove_pt_page(pmap, pv->pv_va); if (ml3 != NULL) { + KASSERT(ml3->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pages: l3 page not promoted")); pmap_resident_count_dec(pmap,1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_pages: l3 page wire count error")); @@ -5035,8 +5042,10 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ " in pmap %p", va, pmap); goto fail; } - if (va < VM_MAXUSER_ADDRESS) + if (va < VM_MAXUSER_ADDRESS) { + ml3->wire_count = NL3PG; pmap_resident_count_inc(pmap, 1); + } } l3phys = VM_PAGE_TO_PHYS(ml3); @@ -5048,10 +5057,10 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ newl3 = (oldl2 & (ATTR_MASK & ~ATTR_DESCR_MASK)) | L3_PAGE; /* - * If the page table page is new, initialize it. + * If the page table page is not leftover from an earlier promotion, + * initialize it. */ - if (ml3->wire_count == 1) { - ml3->wire_count = NL3PG; + if (ml3->valid == 0) { for (i = 0; i < Ln_ENTRIES; i++) { l3[i] = newl3 | phys; phys += L3_SIZE; Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Jun 9 03:31:07 2019 (r348827) +++ head/sys/i386/i386/pmap.c Sun Jun 9 03:36:10 2019 (r348828) @@ -318,7 +318,7 @@ static int pmap_enter_pde(pmap_t pmap, vm_offset_t va, u_int flags, vm_page_t m); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); -static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted); static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); @@ -990,9 +990,14 @@ __CONCAT(PMTYPE, init)(void) mpte->pindex = i + KPTDI; mpte->phys_addr = KPTphys + ptoa(i); mpte->wire_count = 1; + + /* + * Collect the page table pages that were replaced by a 2/4MB + * page. They are filled with equivalent 4KB page mappings. + */ if (pseflag != 0 && KERNBASE <= i << PDRSHIFT && i << PDRSHIFT < KERNend && - pmap_insert_pt_page(kernel_pmap, mpte)) + pmap_insert_pt_page(kernel_pmap, mpte, true)) panic("pmap_init: pmap_insert_pt_page failed"); } PMAP_UNLOCK(kernel_pmap); @@ -1900,12 +1905,15 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist * of idle page table pages. Each of a pmap's page table pages is responsible * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. + * + * If "promoted" is false, then the page table page "mpte" must be zero filled. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte) +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mpte->valid = promoted ? VM_PAGE_BITS_ALL : 0; return (vm_radix_insert(&pmap->pm_root, mpte)); } @@ -2823,7 +2831,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse * If the page table page is not leftover from an earlier promotion, * initialize it. */ - if ((oldpde & PG_PROMOTED) == 0) + if (mpte->valid == 0) pmap_fill_ptp(firstpte, newpte); KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), @@ -2895,9 +2903,11 @@ pmap_remove_kernel_pde(pmap_t pmap, pd_entry_t *pde, v newpde = mptepa | PG_M | PG_A | PG_RW | PG_V; /* - * Initialize the page table page. + * If this page table page was unmapped by a promotion, then it + * contains valid mappings. Zero it to invalidate those mappings. */ - pagezero((void *)&KPTmap[i386_btop(trunc_4mpage(va))]); + if (mpte->valid != 0) + pagezero((void *)&KPTmap[i386_btop(trunc_4mpage(va))]); /* * Remove the mapping. @@ -2960,6 +2970,8 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse } else { mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { + KASSERT(mpte->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pde: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pde: pte page wire count error")); @@ -3533,7 +3545,7 @@ setpte: ("pmap_promote_pde: page table page is out of range")); KASSERT(mpte->pindex == va >> PDRSHIFT, ("pmap_promote_pde: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, mpte)) { + if (pmap_insert_pt_page(pmap, mpte, true)) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x in pmap %p", va, @@ -3911,15 +3923,13 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t } vm_page_free_pages_toq(&free, true); if (pmap == kernel_pmap) { + /* + * Both pmap_remove_pde() and pmap_remove_ptes() will + * leave the kernel page table page zero filled. + */ mt = PHYS_TO_VM_PAGE(*pde & PG_FRAME); - if (pmap_insert_pt_page(pmap, mt)) { - /* - * XXX Currently, this can't happen because - * we do not perform pmap_enter(psind == 1) - * on the kernel pmap. - */ + if (pmap_insert_pt_page(pmap, mt, false)) panic("pmap_enter_pde: trie insert failed"); - } } else KASSERT(*pde == 0, ("pmap_enter_pde: non-zero pde %p", pde)); @@ -4797,6 +4807,8 @@ __CONCAT(PMTYPE, remove_pages)(pmap_t pmap) } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { + KASSERT(mpte->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pages: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->wire_count == NPTEPG, ("pmap_remove_pages: pte page wire count error")); Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Sun Jun 9 03:31:07 2019 (r348827) +++ head/sys/riscv/riscv/pmap.c Sun Jun 9 03:36:10 2019 (r348828) @@ -1104,12 +1104,15 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist * of idle page table pages. Each of a pmap's page table pages is responsible * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. + * + * If "promoted" is false, then the page table page "ml3" must be zero filled. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t ml3) +pmap_insert_pt_page(pmap_t pmap, vm_page_t ml3, bool promoted) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); + ml3->valid = promoted ? VM_PAGE_BITS_ALL : 0; return (vm_radix_insert(&pmap->pm_root, ml3)); } @@ -2002,9 +2005,11 @@ pmap_remove_kernel_l2(pmap_t pmap, pt_entry_t *l2, vm_ newl2 = ml3pa | PTE_V; /* - * Initialize the page table page. + * If this page table page was unmapped by a promotion, then it + * contains valid mappings. Zero it to invalidate those mappings. */ - pagezero((void *)PHYS_TO_DMAP(ml3pa)); + if (ml3->valid != 0) + pagezero((void *)PHYS_TO_DMAP(ml3pa)); /* * Demote the mapping. @@ -2064,6 +2069,8 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ } else { ml3 = pmap_remove_pt_page(pmap, sva); if (ml3 != NULL) { + KASSERT(ml3->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_l2: l3 page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(ml3->wire_count == Ln_ENTRIES, ("pmap_remove_l2: l3 page wire count error")); @@ -2482,8 +2489,10 @@ pmap_demote_l2_locked(pmap_t pmap, pd_entry_t *l2, vm_ "failure for va %#lx in pmap %p", va, pmap); return (false); } - if (va < VM_MAXUSER_ADDRESS) + if (va < VM_MAXUSER_ADDRESS) { + mpte->wire_count = Ln_ENTRIES; pmap_resident_count_inc(pmap, 1); + } } mptepa = VM_PAGE_TO_PHYS(mpte); firstl3 = (pt_entry_t *)PHYS_TO_DMAP(mptepa); @@ -2495,10 +2504,10 @@ pmap_demote_l2_locked(pmap_t pmap, pd_entry_t *l2, vm_ newl3 = oldl2; /* - * If the page table page is new, initialize it. + * If the page table page is not leftover from an earlier promotion, + * initialize it. */ - if (mpte->wire_count == 1) { - mpte->wire_count = Ln_ENTRIES; + if (mpte->valid == 0) { for (i = 0; i < Ln_ENTRIES; i++) pmap_store(firstl3 + i, newl3 + (i << PTE_PPN0_S)); } @@ -2589,7 +2598,7 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset ml3 = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2))); KASSERT(ml3->pindex == pmap_l2_pindex(va), ("pmap_promote_l2: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, ml3)) { + if (pmap_insert_pt_page(pmap, ml3, true)) { CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx pmap %p", va, pmap); atomic_add_long(&pmap_l2_p_failures, 1); @@ -2972,15 +2981,13 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t } vm_page_free_pages_toq(&free, true); if (va >= VM_MAXUSER_ADDRESS) { + /* + * Both pmap_remove_l2() and pmap_remove_l3() will + * leave the kernel page table page zero filled. + */ mt = PHYS_TO_VM_PAGE(PTE_TO_PHYS(pmap_load(l2))); - if (pmap_insert_pt_page(pmap, mt)) { - /* - * XXX Currently, this can't happen bacuse - * we do not perform pmap_enter(psind == 1) - * on the kernel pmap. - */ + if (pmap_insert_pt_page(pmap, mt, false)) panic("pmap_enter_l2: trie insert failed"); - } } else KASSERT(pmap_load(l2) == 0, ("pmap_enter_l2: non-zero L2 entry %p", l2)); @@ -3557,6 +3564,8 @@ pmap_remove_pages_pv(pmap_t pmap, vm_page_t m, pv_entr } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { + KASSERT(ml3->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pages: l3 page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == Ln_ENTRIES, ("pmap_remove_pages: pte page wire count error")); From owner-svn-src-all@freebsd.org Sun Jun 9 05:55:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A89F15BE49F; Sun, 9 Jun 2019 05:55:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 176BB8A3B8; Sun, 9 Jun 2019 05:55:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E113E269CB; Sun, 9 Jun 2019 05:55:58 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x595twOK031344; Sun, 9 Jun 2019 05:55:58 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x595twPt031343; Sun, 9 Jun 2019 05:55:58 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906090555.x595twPt031343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 9 Jun 2019 05:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348829 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 348829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 176BB8A3B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 05:55:59 -0000 Author: alc Date: Sun Jun 9 05:55:58 2019 New Revision: 348829 URL: https://svnweb.freebsd.org/changeset/base/348829 Log: Correct a new KASSERT() in r348828. X-MFC with: r348828 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Sun Jun 9 03:36:10 2019 (r348828) +++ head/sys/riscv/riscv/pmap.c Sun Jun 9 05:55:58 2019 (r348829) @@ -3564,8 +3564,8 @@ pmap_remove_pages_pv(pmap_t pmap, vm_page_t m, pv_entr } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - KASSERT(ml3->valid == VM_PAGE_BITS_ALL, - ("pmap_remove_pages: l3 page not promoted")); + KASSERT(mpte->valid == VM_PAGE_BITS_ALL, + ("pmap_remove_pages: pte page not promoted")); pmap_resident_count_dec(pmap, 1); KASSERT(mpte->wire_count == Ln_ENTRIES, ("pmap_remove_pages: pte page wire count error")); From owner-svn-src-all@freebsd.org Sun Jun 9 08:18:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50AB415C18D6; Sun, 9 Jun 2019 08:18:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC2D18EF2A; Sun, 9 Jun 2019 08:18:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF6AE1AF; Sun, 9 Jun 2019 08:18:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x598IO4e005823; Sun, 9 Jun 2019 08:18:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x598IOn4005822; Sun, 9 Jun 2019 08:18:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906090818.x598IOn4005822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 9 Jun 2019 08:18: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: r348830 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 348830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC2D18EF2A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 08:18:25 -0000 Author: hselasky Date: Sun Jun 9 08:18:24 2019 New Revision: 348830 URL: https://svnweb.freebsd.org/changeset/base/348830 Log: MFC r348603: Make sure the DMA tags get freed in mlx5en(4). Approved by: re (gjb) Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 05:55:58 2019 (r348829) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 08:18:24 2019 (r348830) @@ -1223,6 +1223,7 @@ mlx5e_destroy_rq(struct mlx5e_rq *rq) } free(rq->mbuf, M_MLX5EN); mlx5_wq_destroy(&rq->wq_ctrl); + bus_dma_tag_destroy(rq->dma_tag); } static int @@ -1547,6 +1548,7 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); + bus_dma_tag_destroy(sq->dma_tag); } int From owner-svn-src-all@freebsd.org Sun Jun 9 08:19:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 913BD15C196F; Sun, 9 Jun 2019 08:19:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29D5C8F069; Sun, 9 Jun 2019 08:19:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0503F1B2; Sun, 9 Jun 2019 08:19:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x598JjqU005931; Sun, 9 Jun 2019 08:19:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x598JjpM005929; Sun, 9 Jun 2019 08:19:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906090819.x598JjpM005929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 9 Jun 2019 08:19: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: r348831 - stable/12/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 348831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 29D5C8F069 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 08:19:46 -0000 Author: hselasky Date: Sun Jun 9 08:19:45 2019 New Revision: 348831 URL: https://svnweb.freebsd.org/changeset/base/348831 Log: MFC r348603: Make sure the DMA tags get freed in mlx5en(4). Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 08:18:24 2019 (r348830) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 08:19:45 2019 (r348831) @@ -1330,6 +1330,7 @@ mlx5e_destroy_rq(struct mlx5e_rq *rq) } free(rq->mbuf, M_MLX5EN); mlx5_wq_destroy(&rq->wq_ctrl); + bus_dma_tag_destroy(rq->dma_tag); } static int @@ -1654,6 +1655,7 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); mlx5_unmap_free_uar(sq->priv->mdev, &sq->uar); + bus_dma_tag_destroy(sq->dma_tag); } int Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Sun Jun 9 08:18:24 2019 (r348830) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_rl.c Sun Jun 9 08:19:45 2019 (r348831) @@ -156,6 +156,7 @@ mlx5e_rl_destroy_sq(struct mlx5e_sq *sq) mlx5e_free_sq_db(sq); mlx5_wq_destroy(&sq->wq_ctrl); + bus_dma_tag_destroy(sq->dma_tag); } static int From owner-svn-src-all@freebsd.org Sun Jun 9 08:22:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4417115C1BC6; Sun, 9 Jun 2019 08:22:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D92EB8F46B; Sun, 9 Jun 2019 08:22:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEA3435E; Sun, 9 Jun 2019 08:22:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x598MclU010656; Sun, 9 Jun 2019 08:22:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x598Mca5010655; Sun, 9 Jun 2019 08:22:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906090822.x598Mca5010655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 9 Jun 2019 08:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r348832 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 348832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D92EB8F46B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 08:22:39 -0000 Author: hselasky Date: Sun Jun 9 08:22:38 2019 New Revision: 348832 URL: https://svnweb.freebsd.org/changeset/base/348832 Log: MFC r348603: Make sure the DMA tags get freed in mlx5en(4). Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 08:19:45 2019 (r348831) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Sun Jun 9 08:22:38 2019 (r348832) @@ -772,6 +772,7 @@ mlx5e_destroy_rq(struct mlx5e_rq *rq) } free(rq->mbuf, M_MLX5EN); mlx5_wq_destroy(&rq->wq_ctrl); + bus_dma_tag_destroy(rq->dma_tag); } static int @@ -1098,6 +1099,7 @@ mlx5e_destroy_sq(struct mlx5e_sq *sq) } if (sq->br != NULL) buf_ring_free(sq->br, M_MLX5EN); + bus_dma_tag_destroy(sq->dma_tag); } int From owner-svn-src-all@freebsd.org Sun Jun 9 11:21:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3DCB15C4E98; Sun, 9 Jun 2019 11:21:30 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4025F6CC99; Sun, 9 Jun 2019 11:21:30 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A16F219F; Sun, 9 Jun 2019 11:21:30 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59BLTqa002636; Sun, 9 Jun 2019 11:21:29 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59BLT1T002635; Sun, 9 Jun 2019 11:21:29 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906091121.x59BLT1T002635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 9 Jun 2019 11:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348833 - head/usr.bin/tail X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/usr.bin/tail X-SVN-Commit-Revision: 348833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4025F6CC99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 11:21:30 -0000 Author: oshogbo Date: Sun Jun 9 11:21:29 2019 New Revision: 348833 URL: https://svnweb.freebsd.org/changeset/base/348833 Log: tail: style nits Modified: head/usr.bin/tail/tail.c Modified: head/usr.bin/tail/tail.c ============================================================================== --- head/usr.bin/tail/tail.c Sun Jun 9 08:22:38 2019 (r348832) +++ head/usr.bin/tail/tail.c Sun Jun 9 11:21:29 2019 (r348833) @@ -212,7 +212,8 @@ main(int argc, char *argv[]) file->file_name = strdup(fn); if (! file->file_name) errx(1, "Couldn't malloc space for file name."); - if ((file->fp = fileargs_fopen(fa, file->file_name, "r")) == NULL || + file->fp = fileargs_fopen(fa, file->file_name, "r"); + if (file->fp == NULL || fstat(fileno(file->fp), &file->st)) { if (file->fp != NULL) { fclose(file->fp); From owner-svn-src-all@freebsd.org Sun Jun 9 12:41:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 222B615C6B37; Sun, 9 Jun 2019 12:41:22 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6E4F6EDF4; Sun, 9 Jun 2019 12:41:21 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 922D72E07; Sun, 9 Jun 2019 12:41:21 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59CfLBU042203; Sun, 9 Jun 2019 12:41:21 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59CfLjQ042202; Sun, 9 Jun 2019 12:41:21 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201906091241.x59CfLjQ042202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Sun, 9 Jun 2019 12:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348834 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 348834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B6E4F6EDF4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 12:41:22 -0000 Author: vmaffione Date: Sun Jun 9 12:41:21 2019 New Revision: 348834 URL: https://svnweb.freebsd.org/changeset/base/348834 Log: bhyve: vtnet: simplify thread synchronization On vtnet device reset it is necessary to wait for threads to stop TX and RX processing. However, the rx_in_progress variable (used for to wait for RX processing to stop) is actually useless, and can be removed. Acquiring and releasing the RX lock is enough to synchronize correctly. Moreover, it is possible to reset the device while holding both TX and RX locks, so that the "resetting" variable becomes unnecessary for the RX thread, and can be protected by the TX lock (instead of being volatile). Reviewed by: jhb, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20543 Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Sun Jun 9 11:21:29 2019 (r348833) +++ head/usr.sbin/bhyve/pci_virtio_net.c Sun Jun 9 12:41:21 2019 (r348834) @@ -150,14 +150,13 @@ struct pci_vtnet_softc { struct nm_desc *vsc_nmd; int vsc_rx_ready; - volatile int resetting; /* set and checked outside lock */ + int resetting; /* protected by tx_mtx */ uint64_t vsc_features; /* negotiated features */ struct virtio_net_config vsc_config; pthread_mutex_t rx_mtx; - int rx_in_progress; int rx_vhdrlen; int rx_merge; /* merged rx bufs in use */ @@ -189,62 +188,39 @@ static struct virtio_consts vtnet_vi_consts = { VTNET_S_HOSTCAPS, /* our capabilities */ }; -/* - * If the transmit thread is active then stall until it is done. - */ static void -pci_vtnet_txwait(struct pci_vtnet_softc *sc) +pci_vtnet_reset(void *vsc) { + struct pci_vtnet_softc *sc = vsc; + DPRINTF(("vtnet: device reset requested !\n")); + + /* Acquire the RX lock to block RX processing. */ + pthread_mutex_lock(&sc->rx_mtx); + + /* Set sc->resetting and give a chance to the TX thread to stop. */ pthread_mutex_lock(&sc->tx_mtx); + sc->resetting = 1; while (sc->tx_in_progress) { pthread_mutex_unlock(&sc->tx_mtx); usleep(10000); pthread_mutex_lock(&sc->tx_mtx); } - pthread_mutex_unlock(&sc->tx_mtx); -} -/* - * If the receive thread is active then stall until it is done. - */ -static void -pci_vtnet_rxwait(struct pci_vtnet_softc *sc) -{ - - pthread_mutex_lock(&sc->rx_mtx); - while (sc->rx_in_progress) { - pthread_mutex_unlock(&sc->rx_mtx); - usleep(10000); - pthread_mutex_lock(&sc->rx_mtx); - } - pthread_mutex_unlock(&sc->rx_mtx); -} - -static void -pci_vtnet_reset(void *vsc) -{ - struct pci_vtnet_softc *sc = vsc; - - DPRINTF(("vtnet: device reset requested !\n")); - - sc->resetting = 1; - - /* - * Wait for the transmit and receive threads to finish their - * processing. - */ - pci_vtnet_txwait(sc); - pci_vtnet_rxwait(sc); - sc->vsc_rx_ready = 0; sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - /* now reset rings, MSI-X vectors, and negotiated capabilities */ + /* + * Now reset rings, MSI-X vectors, and negotiated capabilities. + * Do that with the TX lock held, since we need to reset + * sc->resetting. + */ vi_reset_dev(&sc->vsc_vs); sc->resetting = 0; + pthread_mutex_unlock(&sc->tx_mtx); + pthread_mutex_unlock(&sc->rx_mtx); } /* @@ -318,9 +294,9 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -515,9 +491,9 @@ pci_vtnet_netmap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -594,9 +570,7 @@ pci_vtnet_rx_callback(int fd, enum ev_type type, void struct pci_vtnet_softc *sc = param; pthread_mutex_lock(&sc->rx_mtx); - sc->rx_in_progress = 1; sc->pci_vtnet_rx(sc); - sc->rx_in_progress = 0; pthread_mutex_unlock(&sc->rx_mtx); } @@ -921,7 +895,6 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - sc->rx_in_progress = 0; pthread_mutex_init(&sc->rx_mtx, NULL); /* From owner-svn-src-all@freebsd.org Sun Jun 9 15:36:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82DD415C9F55; Sun, 9 Jun 2019 15:36:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2572673A93; Sun, 9 Jun 2019 15:36:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF05E4F0C; Sun, 9 Jun 2019 15:36:51 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59FapWo036041; Sun, 9 Jun 2019 15:36:51 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59FapFQ036040; Sun, 9 Jun 2019 15:36:51 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091536.x59FapFQ036040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348835 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 348835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2572673A93 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:36:52 -0000 Author: mhorne Date: Sun Jun 9 15:36:51 2019 New Revision: 348835 URL: https://svnweb.freebsd.org/changeset/base/348835 Log: Remove block of dead code Approved by: markj (mentor) Modified: head/sys/riscv/riscv/exception.S Modified: head/sys/riscv/riscv/exception.S ============================================================================== --- head/sys/riscv/riscv/exception.S Sun Jun 9 12:41:21 2019 (r348834) +++ head/sys/riscv/riscv/exception.S Sun Jun 9 15:36:51 2019 (r348835) @@ -81,16 +81,6 @@ __FBSDID("$FreeBSD$"); sd a6, (TF_A + 6 * 8)(sp) sd a7, (TF_A + 7 * 8)(sp) -#if 0 - /* XXX: temporary test: spin if stack is not kernel one */ -.if \el == 1 /* kernel */ - mv t0, sp - srli t0, t0, 63 -1: - beqz t0, 1b -.endif -#endif - .if \el == 1 /* Store kernel sp */ li t1, TF_SIZE From owner-svn-src-all@freebsd.org Sun Jun 9 15:43:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79CD15CA17D; Sun, 9 Jun 2019 15:43:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43DB174417; Sun, 9 Jun 2019 15:43:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B1E850C3; Sun, 9 Jun 2019 15:43:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59Fhep6041010; Sun, 9 Jun 2019 15:43:40 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59FhdLj041002; Sun, 9 Jun 2019 15:43:39 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091543.x59FhdLj041002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348836 - in head/sys: conf riscv/include riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys: conf riscv/include riscv/riscv X-SVN-Commit-Revision: 348836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43DB174417 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:43:41 -0000 Author: mhorne Date: Sun Jun 9 15:43:38 2019 New Revision: 348836 URL: https://svnweb.freebsd.org/changeset/base/348836 Log: Fix global pointer relaxations in the RISC-V kernel The gp register is intended to used by the linker as another means of performing relaxations, and should point to the small data section (.sdata). Currently gp is being used as the pcpu pointer within the kernel, but the more appropriate choice for this is the tp register, which is unused. Swap existing usage of gp with tp within the kernel, and set up gp properly at boot with the value of __global_pointer$ for all harts. Additionally, remove some cases of accessing tp from the PCB, as it is not part of the per-thread state. The user's tp and gp should be tracked only through the trapframe. Reviewed by: markj, jhb Approved by: markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19893 Modified: head/sys/conf/ldscript.riscv head/sys/riscv/include/asm.h head/sys/riscv/include/pcpu.h head/sys/riscv/riscv/exception.S head/sys/riscv/riscv/locore.S head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/mp_machdep.c head/sys/riscv/riscv/swtch.S head/sys/riscv/riscv/vm_machdep.c Modified: head/sys/conf/ldscript.riscv ============================================================================== --- head/sys/conf/ldscript.riscv Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/conf/ldscript.riscv Sun Jun 9 15:43:38 2019 (r348836) @@ -89,7 +89,11 @@ SECTIONS can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ . = ALIGN(8); - .sdata : { *(.sdata) } + .sdata : + { + __global_pointer$ = . + 0x800; + *(.sdata) + } _edata = .; PROVIDE (edata = .); /* Ensure __bss_start is associated with the next section in case orphan Modified: head/sys/riscv/include/asm.h ============================================================================== --- head/sys/riscv/include/asm.h Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/include/asm.h Sun Jun 9 15:43:38 2019 (r348836) @@ -59,7 +59,7 @@ .set alias,sym #define SET_FAULT_HANDLER(handler, tmp) \ - ld tmp, PC_CURTHREAD(gp); \ + ld tmp, PC_CURTHREAD(tp); \ ld tmp, TD_PCB(tmp); /* Load the pcb */ \ sd handler, PCB_ONFAULT(tmp) /* Set the handler */ Modified: head/sys/riscv/include/pcpu.h ============================================================================== --- head/sys/riscv/include/pcpu.h Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/include/pcpu.h Sun Jun 9 15:43:38 2019 (r348836) @@ -60,7 +60,7 @@ get_pcpu(void) { struct pcpu *pcpu; - __asm __volatile("mv %0, gp" : "=&r"(pcpu)); + __asm __volatile("mv %0, tp" : "=&r"(pcpu)); return (pcpu); } @@ -70,7 +70,7 @@ get_curthread(void) { struct thread *td; - __asm __volatile("ld %0, 0(gp)" : "=&r"(td)); + __asm __volatile("ld %0, 0(tp)" : "=&r"(td)); return (td); } Modified: head/sys/riscv/riscv/exception.S ============================================================================== --- head/sys/riscv/riscv/exception.S Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/exception.S Sun Jun 9 15:43:38 2019 (r348836) @@ -44,11 +44,18 @@ __FBSDID("$FreeBSD$"); addi sp, sp, -(TF_SIZE) sd ra, (TF_RA)(sp) - sd tp, (TF_TP)(sp) -.if \el == 0 /* We came from userspace. Load our pcpu */ +.if \el == 0 /* We came from userspace. */ sd gp, (TF_GP)(sp) - ld gp, (TF_SIZE)(sp) +.option push +.option norelax + /* Load the kernel's global pointer */ + la gp, __global_pointer$ +.option pop + + /* Load our pcpu */ + sd tp, (TF_TP)(sp) + ld tp, (TF_SIZE)(sp) .endif sd t0, (TF_T + 0 * 8)(sp) @@ -128,13 +135,15 @@ __FBSDID("$FreeBSD$"); ld t0, (TF_SP)(sp) csrw sscratch, t0 - /* And store our pcpu */ - sd gp, (TF_SIZE)(sp) + /* Store our pcpu */ + sd tp, (TF_SIZE)(sp) + ld tp, (TF_TP)(sp) + + /* And restore the user's global pointer */ ld gp, (TF_GP)(sp) .endif ld ra, (TF_RA)(sp) - ld tp, (TF_TP)(sp) ld t0, (TF_T + 0 * 8)(sp) ld t1, (TF_T + 1 * 8)(sp) @@ -175,7 +184,7 @@ __FBSDID("$FreeBSD$"); 1: csrci sstatus, (SSTATUS_SIE) - ld a1, PC_CURTHREAD(gp) + ld a1, PC_CURTHREAD(tp) lw a2, TD_FLAGS(a1) li a3, (TDF_ASTPENDING|TDF_NEEDRESCHED) Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/locore.S Sun Jun 9 15:43:38 2019 (r348836) @@ -171,12 +171,18 @@ va: li t0, 0 csrw sscratch, t0 + /* Set the global pointer */ +.option push +.option norelax + la gp, __global_pointer$ +.option pop + /* Initialize stack pointer */ la s3, initstack_end mv sp, s3 addi sp, sp, -PCB_SIZE - /* Clear BSS */ + /* Clear BSS */ la s0, _C_LABEL(__bss_start) la s1, _C_LABEL(_end) 1: @@ -251,12 +257,6 @@ virt_map: hart_lottery: .space 4 - /* Not in use, but required for linking. */ - .align 3 - .globl __global_pointer$ -__global_pointer$: - .space 8 - .globl init_pt_va init_pt_va: .quad pagetable_l2 /* XXX: Keep page tables VA */ @@ -323,6 +323,12 @@ mpva: /* Ensure sscratch is zero */ li t0, 0 csrw sscratch, t0 + + /* Set the global pointer */ +.option push +.option norelax + la gp, __global_pointer$ +.option pop call init_secondary END(mpentry) Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/machdep.c Sun Jun 9 15:43:38 2019 (r348836) @@ -822,7 +822,7 @@ initriscv(struct riscv_bootparams *rvbp) pcpup->pc_hart = boot_hart; /* Set the pcpu pointer */ - __asm __volatile("mv gp, %0" :: "r"(pcpup)); + __asm __volatile("mv tp, %0" :: "r"(pcpup)); PCPU_SET(curthread, &thread0); Modified: head/sys/riscv/riscv/mp_machdep.c ============================================================================== --- head/sys/riscv/riscv/mp_machdep.c Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/mp_machdep.c Sun Jun 9 15:43:38 2019 (r348836) @@ -234,7 +234,7 @@ init_secondary(uint64_t hart) /* Setup the pcpu pointer */ pcpup = &__pcpu[cpuid]; - __asm __volatile("mv gp, %0" :: "r"(pcpup)); + __asm __volatile("mv tp, %0" :: "r"(pcpup)); /* Workaround: make sure wfi doesn't halt the hart */ csr_set(sie, SIE_SSIE); Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/swtch.S Sun Jun 9 15:43:38 2019 (r348836) @@ -217,15 +217,14 @@ ENTRY(cpu_throw) mv a0, s0 /* Store the new curthread */ - sd a0, PC_CURTHREAD(gp) + sd a0, PC_CURTHREAD(tp) /* And the new pcb */ ld x13, TD_PCB(a0) - sd x13, PC_CURPCB(gp) + sd x13, PC_CURPCB(tp) /* Load registers */ ld ra, (PCB_RA)(x13) ld sp, (PCB_SP)(x13) - ld tp, (PCB_TP)(x13) /* s[0-11] */ ld s0, (PCB_S + 0 * 8)(x13) @@ -267,10 +266,10 @@ END(cpu_throw) */ ENTRY(cpu_switch) /* Store the new curthread */ - sd a1, PC_CURTHREAD(gp) + sd a1, PC_CURTHREAD(tp) /* And the new pcb */ ld x13, TD_PCB(a1) - sd x13, PC_CURPCB(gp) + sd x13, PC_CURPCB(tp) /* Save the old context. */ ld x13, TD_PCB(a0) @@ -278,7 +277,6 @@ ENTRY(cpu_switch) /* Store ra, sp and the callee-saved registers */ sd ra, (PCB_RA)(x13) sd sp, (PCB_SP)(x13) - sd tp, (PCB_TP)(x13) /* s[0-11] */ sd s0, (PCB_S + 0 * 8)(x13) @@ -340,7 +338,6 @@ ENTRY(cpu_switch) ld x13, TD_PCB(a1) /* Restore the registers */ - ld tp, (PCB_TP)(x13) ld ra, (PCB_RA)(x13) ld sp, (PCB_SP)(x13) @@ -429,15 +426,16 @@ ENTRY(fork_trampoline) ld a6, (TF_A + 6 * 8)(sp) ld a7, (TF_A + 7 * 8)(sp) - /* Load user ra and sp */ + /* Load user ra and gp */ ld ra, (TF_RA)(sp) + ld gp, (TF_GP)(sp) /* * Store our pcpup on stack, we will load it back * on kernel mode trap. */ - sd gp, (TF_SIZE)(sp) - ld gp, (TF_GP)(sp) + sd tp, (TF_SIZE)(sp) + ld tp, (TF_TP)(sp) /* Save kernel stack so we can use it doing a user trap */ addi sp, sp, TF_SIZE @@ -454,6 +452,7 @@ ENTRY(savectx) sd ra, (PCB_RA)(a0) sd sp, (PCB_SP)(a0) sd tp, (PCB_TP)(a0) + sd gp, (PCB_GP)(a0) /* s[0-11] */ sd s0, (PCB_S + 0 * 8)(a0) Modified: head/sys/riscv/riscv/vm_machdep.c ============================================================================== --- head/sys/riscv/riscv/vm_machdep.c Sun Jun 9 15:36:51 2019 (r348835) +++ head/sys/riscv/riscv/vm_machdep.c Sun Jun 9 15:43:38 2019 (r348836) @@ -69,23 +69,12 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t { struct pcb *pcb2; struct trapframe *tf; - register_t val; if ((flags & RFPROC) == 0) return; - if (td1 == curthread) { - /* - * Save the tp. These normally happen in cpu_switch, - * but if userland changes this then forks this may - * not have happened. - */ - __asm __volatile("mv %0, tp" : "=&r"(val)); - td1->td_pcb->pcb_tp = val; + /* RISCVTODO: save the FPU state here */ - /* RISCVTODO: save the FPU state here */ - } - pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; @@ -205,15 +194,15 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * int cpu_set_user_tls(struct thread *td, void *tls_base) { - struct pcb *pcb; if ((uintptr_t)tls_base >= VM_MAXUSER_ADDRESS) return (EINVAL); - pcb = td->td_pcb; - pcb->pcb_tp = (register_t)tls_base + TP_OFFSET; - if (td == curthread) - __asm __volatile("mv tp, %0" :: "r"(pcb->pcb_tp)); + /* + * The user TLS is set by modifying the trapframe's tp value, which + * will be restored when returning to userspace. + */ + td->td_frame->tf_tp = (register_t)tls_base + TP_OFFSET; return (0); } From owner-svn-src-all@freebsd.org Sun Jun 9 15:45:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01ABB15CA261; Sun, 9 Jun 2019 15:45:49 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 965FB746A6; Sun, 9 Jun 2019 15:45:48 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F09F50EF; Sun, 9 Jun 2019 15:45:48 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59FjmjH041271; Sun, 9 Jun 2019 15:45:48 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59FjmjX041269; Sun, 9 Jun 2019 15:45:48 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091545.x59FjmjX041269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348837 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 348837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 965FB746A6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:45:49 -0000 Author: mhorne Date: Sun Jun 9 15:45:48 2019 New Revision: 348837 URL: https://svnweb.freebsd.org/changeset/base/348837 Log: Add TSLOG events to initriscv() Add the enter and exit events, similar to what's found in hammer_time() on amd64. We must use TSRAW as the pcpu isn't yet initialized. Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20497 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Jun 9 15:43:38 2019 (r348836) +++ head/sys/riscv/riscv/machdep.c Sun Jun 9 15:45:48 2019 (r348837) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -816,6 +817,8 @@ initriscv(struct riscv_bootparams *rvbp) caddr_t kmdp; int i; + TSRAW(&thread0, TS_ENTER, __func__, NULL); + /* Set the pcpu data, this is needed by pmap_bootstrap */ pcpup = &__pcpu[0]; pcpu_init(pcpup, 0, sizeof(struct pcpu)); @@ -888,6 +891,8 @@ initriscv(struct riscv_bootparams *rvbp) kdb_init(); early_boot = 0; + + TSEXIT(); } #undef bzero From owner-svn-src-all@freebsd.org Sun Jun 9 15:48:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D128215CA31A; Sun, 9 Jun 2019 15:48:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70E2674812; Sun, 9 Jun 2019 15:48:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47B1450F4; Sun, 9 Jun 2019 15:48:37 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59FmbLC041417; Sun, 9 Jun 2019 15:48:37 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59Fmanq041416; Sun, 9 Jun 2019 15:48:36 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091548.x59Fmanq041416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348838 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 348838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70E2674812 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:48:38 -0000 Author: mhorne Date: Sun Jun 9 15:48:36 2019 New Revision: 348838 URL: https://svnweb.freebsd.org/changeset/base/348838 Log: RISC-V: Announce real and available memory at boot Most architectures print their total (real) and available memory during boot. Properly initialize the realmem global and print these messages. Also print the physical memory chunks (behind a bootverbose flag). Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20496 Modified: head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Jun 9 15:45:48 2019 (r348837) +++ head/sys/riscv/riscv/machdep.c Sun Jun 9 15:48:36 2019 (r348838) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -140,7 +141,34 @@ cpu_startup(void *dummy) identify_cpu(); + printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem), + ptoa((uintmax_t)realmem) / (1024 * 1024)); + + /* + * Display any holes after the first chunk of extended memory. + */ + if (bootverbose) { + int indx; + + printf("Physical memory chunk(s):\n"); + for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { + vm_paddr_t size; + + size = phys_avail[indx + 1] - phys_avail[indx]; + printf( + "0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n", + (uintmax_t)phys_avail[indx], + (uintmax_t)phys_avail[indx + 1] - 1, + (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); + } + } + vm_ksubmap_init(&kmi); + + printf("avail memory = %ju (%ju MB)\n", + ptoa((uintmax_t)vm_free_count()), + ptoa((uintmax_t)vm_free_count()) / (1024 * 1024)); + bufinit(); vm_pager_bufferinit(); } Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Sun Jun 9 15:45:48 2019 (r348837) +++ head/sys/riscv/riscv/pmap.c Sun Jun 9 15:48:36 2019 (r348838) @@ -640,6 +640,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, continue; dump_avail[map_slot] = start; dump_avail[map_slot + 1] = end; + realmem += atop((vm_offset_t)(end - start)); if (start >= kernstart && end <= pa) continue; From owner-svn-src-all@freebsd.org Sun Jun 9 15:50:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 280E615CA459; Sun, 9 Jun 2019 15:50:36 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3AD974A46; Sun, 9 Jun 2019 15:50:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF2BF50FE; Sun, 9 Jun 2019 15:50:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59FoZos041565; Sun, 9 Jun 2019 15:50:35 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59FoZdl041564; Sun, 9 Jun 2019 15:50:35 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091550.x59FoZdl041564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348839 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 348839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3AD974A46 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:50:36 -0000 Author: mhorne Date: Sun Jun 9 15:50:35 2019 New Revision: 348839 URL: https://svnweb.freebsd.org/changeset/base/348839 Log: RISC-V: Clean up some GENERIC options Some of the config options that are disabled by default seem to be only for historical reasons. Enable those that appear to no longer be problematic. This includes WITH_CTF, STACK, GEOM_RAID, and re-enabling blacklisted kernel modules. Reviewed by: markj Approved by: markj (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20495 Modified: head/sys/riscv/conf/GENERIC Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Sun Jun 9 15:48:36 2019 (r348838) +++ head/sys/riscv/conf/GENERIC Sun Jun 9 15:50:35 2019 (r348839) @@ -22,12 +22,8 @@ cpu RISCV ident GENERIC makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -# makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support -# FIXME: linker error. "--relax and -r may not be used together" -makeoptions WITHOUT_MODULES="usb otusfw mwlfw ispfw mwlfw ralfw rtwnfw" -# makeoptions NO_MODULES - options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET @@ -52,11 +48,11 @@ options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. -# options GEOM_RAID # Soft RAID functionality. +options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support -# options STACK # stack(9) support +options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores From owner-svn-src-all@freebsd.org Sun Jun 9 15:52:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E12F515CA931; Sun, 9 Jun 2019 15:52:27 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 812DA75029; Sun, 9 Jun 2019 15:52:27 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C8AE529A; Sun, 9 Jun 2019 15:52:27 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59FqRRI046750; Sun, 9 Jun 2019 15:52:27 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59FqRvQ046749; Sun, 9 Jun 2019 15:52:27 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906091552.x59FqRvQ046749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 9 Jun 2019 15:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348840 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 348840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 812DA75029 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:52:28 -0000 Author: mhorne Date: Sun Jun 9 15:52:26 2019 New Revision: 348840 URL: https://svnweb.freebsd.org/changeset/base/348840 Log: Remove unused mcall_trap() function The mcall_trap() dummy function is unused, and should be removed as we are unlikely to support M-mode traps any time soon. Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20494 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Jun 9 15:50:35 2019 (r348839) +++ head/sys/riscv/riscv/machdep.c Sun Jun 9 15:52:26 2019 (r348840) @@ -126,15 +126,6 @@ cpuset_t all_harts; extern int *end; extern int *initstack_end; -uintptr_t mcall_trap(uintptr_t mcause, uintptr_t* regs); - -uintptr_t -mcall_trap(uintptr_t mcause, uintptr_t* regs) -{ - - return (0); -} - static void cpu_startup(void *dummy) { From owner-svn-src-all@freebsd.org Sun Jun 9 22:45:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D393C15ADE3B; Sun, 9 Jun 2019 22:45:08 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77AF7898F1; Sun, 9 Jun 2019 22:45:08 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BEE29823; Sun, 9 Jun 2019 22:45:08 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59Mj8Te063233; Sun, 9 Jun 2019 22:45:08 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59Mj8S8063232; Sun, 9 Jun 2019 22:45:08 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906092245.x59Mj8S8063232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 9 Jun 2019 22:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348841 - head/cddl/usr.sbin/dtrace/tests/amd64 X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/cddl/usr.sbin/dtrace/tests/amd64 X-SVN-Commit-Revision: 348841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 77AF7898F1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 22:45:09 -0000 Author: oshogbo Date: Sun Jun 9 22:45:07 2019 New Revision: 348841 URL: https://svnweb.freebsd.org/changeset/base/348841 Log: DTrace: add a top level makefile to the new test suit Pointed out by: markj Added: head/cddl/usr.sbin/dtrace/tests/amd64/Makefile (contents, props changed) Added: head/cddl/usr.sbin/dtrace/tests/amd64/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dtrace/tests/amd64/Makefile Sun Jun 9 22:45:07 2019 (r348841) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/amd64 +TESTS_SUBDIRS+= arrays + +.PATH: ${.CURDIR:H:H:H:H:H}/tests +KYUAFILE= YES + +.include From owner-svn-src-all@freebsd.org Sun Jun 9 22:55:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26B0315AE18D; Sun, 9 Jun 2019 22:55:24 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0E9E89D82; Sun, 9 Jun 2019 22:55:23 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9682199CB; Sun, 9 Jun 2019 22:55:23 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x59MtNBQ068213; Sun, 9 Jun 2019 22:55:23 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x59MtMmW068206; Sun, 9 Jun 2019 22:55:22 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906092255.x59MtMmW068206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sun, 9 Jun 2019 22:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348842 - head/usr.bin/tail X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/usr.bin/tail X-SVN-Commit-Revision: 348842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B0E9E89D82 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 22:55:24 -0000 Author: oshogbo Date: Sun Jun 9 22:55:21 2019 New Revision: 348842 URL: https://svnweb.freebsd.org/changeset/base/348842 Log: tail: fix the checks if the file was rotated The freopen(3) was replaced with fileargs_open(3) and fclose(3). In the following function, we skip if the stream is standard in, so it is safe to do so. This also requires us to change the logic first to open the file and then check its status. The stat(2) is disallowed in capability mode. This commit unbrakes the -F option. The bug was introduced in the r348708. Reported by: pho Tested by: pho Modified: head/usr.bin/tail/extern.h head/usr.bin/tail/forward.c head/usr.bin/tail/misc.c head/usr.bin/tail/read.c head/usr.bin/tail/reverse.c head/usr.bin/tail/tail.c Modified: head/usr.bin/tail/extern.h ============================================================================== --- head/usr.bin/tail/extern.h Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/extern.h Sun Jun 9 22:55:21 2019 (r348842) @@ -78,3 +78,4 @@ int maparound(struct mapinfo *, off_t); void printfn(const char *, int); extern int Fflag, fflag, qflag, rflag, rval, no_files; +extern fileargs_t *fa; Modified: head/usr.bin/tail/forward.c ============================================================================== --- head/usr.bin/tail/forward.c Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/forward.c Sun Jun 9 22:55:21 2019 (r348842) @@ -57,6 +57,9 @@ static const char sccsid[] = "@(#)forward.c 8.1 (Berke #include #include +#include +#include + #include "extern.h" static void rlines(FILE *, const char *fn, off_t, struct stat *); @@ -310,6 +313,7 @@ follow(file_info_t *files, enum STYLE style, off_t off int active, ev_change, i, n = -1; struct stat sb2; file_info_t *file; + FILE *ftmp; struct timespec ts; /* Position each of the files */ @@ -346,7 +350,9 @@ follow(file_info_t *files, enum STYLE style, off_t off if (Fflag) { for (i = 0, file = files; i < no_files; i++, file++) { if (!file->fp) { - file->fp = fopen(file->file_name, "r"); + file->fp = + fileargs_fopen(fa, file->file_name, + "r"); if (file->fp != NULL && fstat(fileno(file->fp), &file->st) == -1) { @@ -359,7 +365,9 @@ follow(file_info_t *files, enum STYLE style, off_t off } if (fileno(file->fp) == STDIN_FILENO) continue; - if (stat(file->file_name, &sb2) == -1) { + ftmp = fileargs_fopen(fa, file->file_name, "r"); + if (ftmp == NULL || + fstat(fileno(file->fp), &sb2) == -1) { if (errno != ENOENT) ierr(file->file_name); show(file); @@ -367,6 +375,9 @@ follow(file_info_t *files, enum STYLE style, off_t off fclose(file->fp); file->fp = NULL; } + if (ftmp != NULL) { + fclose(ftmp); + } ev_change++; continue; } @@ -375,14 +386,13 @@ follow(file_info_t *files, enum STYLE style, off_t off sb2.st_dev != file->st.st_dev || sb2.st_nlink == 0) { show(file); - file->fp = freopen(file->file_name, "r", - file->fp); - if (file->fp != NULL) - memcpy(&file->st, &sb2, - sizeof(struct stat)); - else if (errno != ENOENT) - ierr(file->file_name); + fclose(file->fp); + file->fp = ftmp; + memcpy(&file->st, &sb2, + sizeof(struct stat)); ev_change++; + } else { + fclose(ftmp); } } } Modified: head/usr.bin/tail/misc.c ============================================================================== --- head/usr.bin/tail/misc.c Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/misc.c Sun Jun 9 22:55:21 2019 (r348842) @@ -51,6 +51,9 @@ static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley #include #include +#include +#include + #include "extern.h" void Modified: head/usr.bin/tail/read.c ============================================================================== --- head/usr.bin/tail/read.c Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/read.c Sun Jun 9 22:55:21 2019 (r348842) @@ -51,6 +51,9 @@ static const char sccsid[] = "@(#)read.c 8.1 (Berkeley #include #include +#include +#include + #include "extern.h" /* Modified: head/usr.bin/tail/reverse.c ============================================================================== --- head/usr.bin/tail/reverse.c Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/reverse.c Sun Jun 9 22:55:21 2019 (r348842) @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include "extern.h" static void r_buf(FILE *, const char *); Modified: head/usr.bin/tail/tail.c ============================================================================== --- head/usr.bin/tail/tail.c Sun Jun 9 22:45:07 2019 (r348841) +++ head/usr.bin/tail/tail.c Sun Jun 9 22:55:21 2019 (r348842) @@ -65,6 +65,7 @@ static const char sccsid[] = "@(#)tail.c 8.1 (Berkeley #include "extern.h" int Fflag, fflag, qflag, rflag, rval, no_files; +fileargs_t *fa; static file_info_t *files; @@ -90,10 +91,9 @@ main(int argc, char *argv[]) int i, ch, first; file_info_t *file; char *p; - fileargs_t *fa; cap_rights_t rights; - cap_rights_init(&rights, CAP_FSTAT, CAP_FCNTL, CAP_MMAP_RW); + cap_rights_init(&rights, CAP_FSTAT, CAP_FSTATFS, CAP_FCNTL, CAP_MMAP_RW); if (caph_rights_limit(STDIN_FILENO, &rights) < 0 || caph_limit_stderr() < 0 || caph_limit_stdout() < 0) err(1, "can't limit stdio rights"); From owner-svn-src-all@freebsd.org Mon Jun 10 03:07:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2EBB15B1FE3; Mon, 10 Jun 2019 03:07:11 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 692D58FB01; Mon, 10 Jun 2019 03:07:11 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52858C598; Mon, 10 Jun 2019 03:07:11 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A37BD5099670; Mon, 10 Jun 2019 03:07:11 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A37BFt099669; Mon, 10 Jun 2019 03:07:11 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906100307.x5A37BFt099669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Mon, 10 Jun 2019 03:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348843 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 692D58FB01 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 03:07:11 -0000 Author: dougm Date: Mon Jun 10 03:07:10 2019 New Revision: 348843 URL: https://svnweb.freebsd.org/changeset/base/348843 Log: There are times when a len==0 parameter to mmap is okay. But on a 32-bit machine, a len parameter just a few bytes short of 4G, rounded up to a page boundary and hitting zero then, is not okay. Return failure in that case. Reported by: pho Reviewed by: alc, kib (mentor) Tested by: pho Differential Revision: https://reviews.freebsd.org/D20580 Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s /* Adjust size for rounding (on both ends). */ size += pageoff; /* low end... */ - size = (vm_size_t) round_page(size); /* hi end */ + /* Check for rounding up to zero. */ + if (round_page(size) < size) + return (EINVAL); + size = round_page(size); /* hi end */ /* Ensure alignment is at least a page and fits in a pointer. */ align = flags & MAP_ALIGNMENT_MASK; From owner-svn-src-all@freebsd.org Mon Jun 10 03:16:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73A6215B228C; Mon, 10 Jun 2019 03:16:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E928FF9D; Mon, 10 Jun 2019 03:16:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1B87C759; Mon, 10 Jun 2019 03:16:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A3GtpN005248; Mon, 10 Jun 2019 03:16:55 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A3Gtj4005247; Mon, 10 Jun 2019 03:16:55 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201906100316.x5A3Gtj4005247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 10 Jun 2019 03:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348844 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 348844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 00E928FF9D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 03:16:56 -0000 Author: jhibbits Date: Mon Jun 10 03:16:55 2019 New Revision: 348844 URL: https://svnweb.freebsd.org/changeset/base/348844 Log: powerpc/powernv: Reduce the scope of the sensor guarding mutex vmem_xalloc() cannot be called while holding a nonblocking mutex, warned by WITNESS. The lock may not be necessary in general, but it avoids superfluous concurrent OPAL calls for the same sensor. Reported by: pkubaj Modified: head/sys/powerpc/powernv/opal_sensor.c Modified: head/sys/powerpc/powernv/opal_sensor.c ============================================================================== --- head/sys/powerpc/powernv/opal_sensor.c Mon Jun 10 03:07:10 2019 (r348843) +++ head/sys/powerpc/powernv/opal_sensor.c Mon Jun 10 03:16:55 2019 (r348844) @@ -92,13 +92,14 @@ const char *opal_sensor_types[] = { * Retrieve the raw value from OPAL. This will be cooked by the sysctl handler. */ static int -opal_sensor_get_val(uint32_t key, uint64_t *val) +opal_sensor_get_val(struct opal_sensor_softc *sc, uint32_t key, uint64_t *val) { struct opal_msg msg; uint32_t val32; int rv, token; token = opal_alloc_async_token(); + SENSOR_LOCK(sc); rv = opal_call(OPAL_SENSOR_READ, key, token, vtophys(&val32)); if (rv == OPAL_ASYNC_COMPLETION) { @@ -110,6 +111,7 @@ opal_sensor_get_val(uint32_t key, uint64_t *val) if (rv == OPAL_SUCCESS) val32 = msg.params[0]; } + SENSOR_UNLOCK(sc); if (rv == OPAL_SUCCESS) *val = val32; @@ -131,9 +133,7 @@ opal_sensor_sysctl(SYSCTL_HANDLER_ARGS) sc = arg1; sensor = arg2; - SENSOR_LOCK(sc); - error = opal_sensor_get_val(sensor, &sensval); - SENSOR_UNLOCK(sc); + error = opal_sensor_get_val(sc, sensor, &sensval); if (error) return (error); From owner-svn-src-all@freebsd.org Mon Jun 10 03:24:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9996215B24B9; Mon, 10 Jun 2019 03:24:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFE19041F; Mon, 10 Jun 2019 03:24:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08E56C908; Mon, 10 Jun 2019 03:24:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A3OcVR010493; Mon, 10 Jun 2019 03:24:38 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A3OcM4010492; Mon, 10 Jun 2019 03:24:38 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201906100324.x5A3OcM4010492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 10 Jun 2019 03:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348845 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 348845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2AFE19041F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 03:24:40 -0000 Author: jhibbits Date: Mon Jun 10 03:24:38 2019 New Revision: 348845 URL: https://svnweb.freebsd.org/changeset/base/348845 Log: powernv: Port HMI handler to use the message framework When an HMI occurs a message event also gets created with the details of the exception. Hook into the messaging framework to retrieve the HMI message. Nothing is done with it yet, except to panic on unhandled exception. Modified: head/sys/powerpc/powernv/opal_hmi.c Modified: head/sys/powerpc/powernv/opal_hmi.c ============================================================================== --- head/sys/powerpc/powernv/opal_hmi.c Mon Jun 10 03:16:55 2019 (r348844) +++ head/sys/powerpc/powernv/opal_hmi.c Mon Jun 10 03:24:38 2019 (r348845) @@ -28,8 +28,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include #include @@ -38,6 +40,47 @@ __FBSDID("$FreeBSD$"); #include #include "opal.h" +struct opal_hmi_event { + uint8_t version; + uint8_t severity; + uint8_t type; + uint8_t disposition; + uint8_t rsvd_1[4]; + uint64_t hmer; + uint64_t tfmr; + union { + struct { + uint8_t xstop_type; + uint8_t rsvd_2[3]; + uint32_t xstop_reason; + union { + uint32_t pir; + uint32_t chip_id; + }; + }; + }; +}; + +#define HMI_DISP_RECOVERED 0 +#define HMI_DISP_NOT_RECOVERED 1 + +static void +opal_hmi_event_handler(void *unused, struct opal_msg *msg) +{ + struct opal_hmi_event evt; + + memcpy(&evt, &msg->params, sizeof(evt)); + printf("Hypervisor Maintenance Event received" + "(Severity %d, type %d, HMER: %016lx).\n", + evt.severity, evt.type, evt.hmer); + + if (evt.disposition == HMI_DISP_NOT_RECOVERED) + panic("Unrecoverable hypervisor maintenance exception on CPU %d", + evt.pir); + + return; +} + static int opal_hmi_handler(struct trapframe *frame) { @@ -69,8 +112,11 @@ opal_setup_hmi(void *data) return; } + EVENTHANDLER_REGISTER(OPAL_HMI_EVT, opal_hmi_event_handler, NULL, + EVENTHANDLER_PRI_ANY); + if (bootverbose) printf("Installed OPAL HMI handler.\n"); } -SYSINIT(opal_setup_hmi, SI_SUB_HYPERVISOR, SI_ORDER_ANY, opal_setup_hmi, NULL); +SYSINIT(opal_setup_hmi, SI_SUB_CPU, SI_ORDER_ANY, opal_setup_hmi, NULL); From owner-svn-src-all@freebsd.org Mon Jun 10 03:34:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15FA015B2A4C; Mon, 10 Jun 2019 03:34:40 +0000 (UTC) (envelope-from dougm@rice.edu) Received: from mx0a-0010f301.pphosted.com (mx0a-0010f301.pphosted.com [148.163.149.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A75F90937; Mon, 10 Jun 2019 03:34:39 +0000 (UTC) (envelope-from dougm@rice.edu) Received: from pps.filterd (m0102855.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5A3PhXt028357; Sun, 9 Jun 2019 22:34:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=ricemail; bh=/OLITK+Nt4eTZ9bAqLinkEsLZ0/7ZWzjHR5SJqu1qck=; b=MQSPyuGk22W4pDulkDfUQxAKCxgG7f/GNuXNCYBv9/uKD2llauTbmAMVcO6qt8IJWZ3K aeS1eTUYDMKzhza7lzoEV+X57R+c/OC07vfHDneDVQvCE+Pz0VaxlIjFH9ZZYGohRmTW kGvpMYBrLuuwbPz8FBX61oBkexm784m6h8uH9WqOoLKd1RRUvtHEtp3SB9REvXhiqqXU QtxFs5IocPeWX7u4vuWnlvXwdVYqK+IsXUlyYspL2XUDhU8JYIptBaEP4C0Il68E+1no zX2nK/9mZgYqKvw8PZNtnrwe6m6uekYbOQ5DuAU5MqKH+kPqNBLgu/grahml1iF5MthO MQ== Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx0b-0010f301.pphosted.com with ESMTP id 2t0ab7hd96-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 09 Jun 2019 22:34:31 -0500 Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id 0C18C5001F1; Sun, 9 Jun 2019 22:34:31 -0500 (CDT) Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id 0A90B5001C8; Sun, 9 Jun 2019 22:34:31 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received-X: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 0IrRFQaRmuJI; Sun, 9 Jun 2019 22:34:30 -0500 (CDT) Received: from 108-254-203-202.lightspeed.hstntx.sbcglobal.net (108-254-203-202.lightspeed.hstntx.sbcglobal.net [108.254.203.202]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dougm) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 99AAF500191; Sun, 9 Jun 2019 22:34:29 -0500 (CDT) Subject: Re: svn commit: r348843 - head/sys/vm To: Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> From: Doug Moore Openpgp: preference=signencrypt Autocrypt: addr=dougm@rice.edu; keydata= mQENBFy53VQBCAD2UiGSouAAMcSIax5Sp9JtRSd9dYVuAmSraY7x5yOylq8yJ5IDvHZy5q3a FamaCHMpXxieiD/8yTnHIeHP4bg02oDD3ALs0hMAEz00pZlLdxeXRfDzAlMTqFF6USPjDUI8 J/WH+pciNT68bFVXFYVg+bgp4GIdi2Md8X8zQQnHY0xLyKE9FjVN1MlCk+62B6fFhMQIEvd5 RQdbGd+ljuoORD1ajljwP1waXKBfAN5RnIbAXppokgQvnwNRf1eZ7GnqSiwu0eaTHGBatPgr y2v5N19R5WxP2kiN95xdlJEwdUikAhWO1UncDxvXQoM1e68L/J85JSLLIgzuywKpBBtdABEB AAG0IERvdWdsYXMgVyBNb29yZSA8ZG91Z21AcmljZS5lZHU+iQFUBBMBCAA+FiEEeV41MZJW A65Cl96D6I8hU9O51W4FAly53VQCGwMFCQWjmoAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA CgkQ6I8hU9O51W58mgf8D9xOhD9/nqtHKUBDJz/m5DLzLyQVci6RrRFK9hSyQ1QdkG4VvvRL G1MpjsM16f42N41lf9Zhln7ydwpeUVNeGwwZu2S4EiSPOEhGpNOYC1lRjsD5ai9aZwzHcrAz 2PnyWxNJNEawrVdPUOaVlE+uzYe1048FaaB5tmYtooWZm5RZx6YBKSbWyWI8OvEO9BRlcwjr ErOlVlW3TNLpBGyvXYMAseWEozzsdaVbsekw6+7atIUYh6z9oBZXmClVdcpLF5/rtYhjwIIE 7AlWyt9tEJjRhA+2ujfbm96IrL5J8Da557IhjfslB8KcWGT+ynA5QzIrwidqllHMGsed4MAo RLkBDQRcud1UAQgA2xw6CEAjLMhRWjY86mW63fJ7WjMKUOoQS+0Z2yyUh2vI3oWWMgHbVlm2 7bclX+uidxABeh8gVxMcPX68ri1PsmXwDSNA93Jpm+dYwhugbvDZ5EEzn9ze3MNbGEEhx9j0 JYVmHOeSW7v2ia8H1ZxHIS3WzfKdsuFl0S34St9ojmkMzDNsRzZNvLF5wFeQ0cUI712OyBu3 E+T369rgIV6jwwwmbDI/YIWd2kMr6+6u40tbs70j7IpjluB3/XyaolcRdpDER9YUDXtSOL+/ UmhbQ10UrmIrxD1enqYn1gE8GOuv1P4zueU6qg8hc/wYPtggqR8smRjPQPn/OlcSxBnO4QAR AQABiQE8BBgBCAAmFiEEeV41MZJWA65Cl96D6I8hU9O51W4FAly53VQCGwwFCQWjmoAACgkQ 6I8hU9O51W5IYgf9ElaumHGMK89Y9ZQVJOwwlD1QC6DUoluIjYmudu6VkHRxrbE1VQohHAeu amaNA0qzLAL7RgkUs1HmyEOqJg0g51pm73l8pK97ztPqXEarCT0CnAE0atl43AY2TCjg+ANl zktrd4QDPqGOBfYbUCGPYJ7yukXU7cmnyaJx6XnjZDAuyhMDxkuocxVNJa32cV0NYqY9EDjo GfGaJjF20leX/BsGElCzDzlZgfWpNGQjqGuOdYdKNx43J654MO6HxSRT25j09s26VzpvT6rI c0wNdJ4CBE5tseI+YlbwhxGziQh/FEMnTSqxhWt1Ac6o9TqMQIIKoQhcekvT7EX5uvvOnLkB DQRcusvzAQgAvlC3Q5iWVbOxhZ6QXSiZ0p1SG19XZBo7tY5L4Pu6QPNsl/tIWbyDodMdz8vG rG36sRZXlcLOfZhhAHuWKUcoPpJ9H3deHrYZSK7H9LBvNm+0C8n/acRrkAZYch74A4HXlBpc +pMm1SfXufXm7TWII7hAvxpX/2+eaZppEl8eRf+JfNhK+34aYjoONp+wi6Jz/gMS7EfC+gIw jg3ncionUqKXHR/HR+kUzfQpiGEj0KvL0YgEawyzb1UB+D0Jb97OAiqj+s0jd4THS5S7b4He lDHcrlisUZNMtFoRmuG2fKCjwqOQ6+qNdjkhL8flHtkAUOu51WOR+kqAqKKRx6JnkQARAQAB iQLSBBgBCgAmFiEEeV41MZJWA65Cl96D6I8hU9O51W4FAly6y/MCGwIFCQWjmoABoAkQ6I8h U9O51W7A1CAEGQEKAH0WIQR+kHbQAKIFA/vka1CjtHtWP6FLrAUCXLrL818UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0N0U5MDc2RDAw MEEyMDUwM0ZCRTQ2QjUwQTNCNDdCNTYzRkExNEJBQwAKCRCjtHtWP6FLrKfwB/9JJhuW8pYI egq4N9O416AkIGb7U4WgfSxpn+e8qVL5368LdZ9BMe3CnEJ70gPtdvNPStdkJkeQ+tQHVPBw WkHaCxY9Kw4t+K2sYAGOeePmIhro/V2oDxCjHm/orr6r4XrQur+yvHl6qWliKMyKRSQphJcR jEp4AI/1epzp5ulw0sn4Gjgpp4zkEanuPblPukeu4G+1AeCflyR4D1pWvdQU6rL9zS3MFyDa j/ooh7YDC5qx9Y9HjYcTpPfkSzX9GG2XBmR3+3lo3CW1nAdd3tIBepkdEXEMQpZvPRFb9qfg jyE6V0wC6yG9fxF/TuG8/Trs3WZORa1gFDR0rQROvjHCc/UH/R7Pmbw4s7r/DTl9mGXikXQa VkrCkS99g5D67qerzA1S9SyH7d0iVy3PqFr8vNnwJtB7hjFx6uO2XG75h1CX50q3YYx0gd+U dwcM2GeP5SDQ0fdFoCsPjSTRK5oiD96D85VTbS7EJgF14wHcrBbqulUltE3JSVSIgYy4Jyr4 dF82pM8XWeaVaYAh8yoIDvud5UYRJECIC00VNG1W/wUJKmvIhsFIQXRneEoMvbMpDvP9QvAK WK7E+dYhu/eemFhteDTgbh16AbHcpwkwFWMEke/u393pzSsxKVCrYACxv7aY186fILDrQUpQ qJr40I2R31nvfny8tsCffMIvKtJ98Rw= Message-ID: Date: Sun, 9 Jun 2019 22:34:28 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <201906100307.x5A37BFt099669@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-10_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=922 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906100022 X-Rspamd-Queue-Id: 8A75F90937 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 03:34:40 -0000 I understand that I ought to have included this in the previous checkin. MFC after: 3 days and that my description of the appropriateness of len==0 passed to mmap was imprecise.  I regret the error. Doug Moore On 6/9/19 10:07 PM, Doug Moore wrote: > Author: dougm > Date: Mon Jun 10 03:07:10 2019 > New Revision: 348843 > URL: https://svnweb.freebsd.org/changeset/base/348843 > > Log: > There are times when a len==0 parameter to mmap is okay. But on a > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > up to a page boundary and hitting zero then, is not okay. Return > failure in that case. > > Reported by: pho > Reviewed by: alc, kib (mentor) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D20580 > > Modified: > head/sys/vm/vm_mmap.c > > Modified: head/sys/vm/vm_mmap.c > ============================================================================== > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s > > /* Adjust size for rounding (on both ends). */ > size += pageoff; /* low end... */ > - size = (vm_size_t) round_page(size); /* hi end */ > + /* Check for rounding up to zero. */ > + if (round_page(size) < size) > + return (EINVAL); > + size = round_page(size); /* hi end */ > > /* Ensure alignment is at least a page and fits in a pointer. */ > align = flags & MAP_ALIGNMENT_MASK; > From owner-svn-src-all@freebsd.org Mon Jun 10 05:09:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81A4E15B4509; Mon, 10 Jun 2019 05:09:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5D792DD1; Mon, 10 Jun 2019 05:09:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC69AD9CD; Mon, 10 Jun 2019 05:09:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A59Y0J062508; Mon, 10 Jun 2019 05:09:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A59Y1e062506; Mon, 10 Jun 2019 05:09:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906100509.x5A59Y1e062506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 10 Jun 2019 05:09:34 +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: r348846 - stable/12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B5D792DD1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 05:09:35 -0000 Author: cy Date: Mon Jun 10 05:09:34 2019 New Revision: 348846 URL: https://svnweb.freebsd.org/changeset/base/348846 Log: MFC r348575: Properly define the fourth argument to ipf_check, the main entry point into ipfilter. A proper definition simplifies dtrace scripts a little. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Mon Jun 10 03:24:38 2019 (r348845) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Mon Jun 10 05:09:34 2019 (r348846) @@ -2810,7 +2810,7 @@ ipf_check(ctx, ip, hlen, ifp, out mb_t **mp; ip_t *ip; int hlen; - void *ifp; + struct ifnet *ifp; int out; void *ctx; { Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Mon Jun 10 03:24:38 2019 (r348845) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Mon Jun 10 05:09:34 2019 (r348846) @@ -1655,7 +1655,7 @@ typedef struct ipf_main_softc_s { } while (0) #ifndef _KERNEL -extern int ipf_check __P((void *, struct ip *, int, void *, int, mb_t **)); +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, mb_t **)); extern struct ifnet *get_unit __P((char *, int)); extern char *get_ifname __P((struct ifnet *)); extern int ipfioctl __P((ipf_main_softc_t *, int, ioctlcmd_t, @@ -1672,7 +1672,7 @@ extern int ipl_enable __P((void)); extern int ipl_disable __P((void)); # ifdef MENTAT /* XXX MENTAT is always defined for Solaris */ -extern int ipf_check __P((void *, struct ip *, int, void *, int, void *, +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **)); # if SOLARIS extern void ipf_prependmbt(fr_info_t *, mblk_t *); @@ -1681,7 +1681,7 @@ extern int ipfioctl __P((dev_t, int, intptr_t, int, cr extern int ipf_qout __P((queue_t *, mblk_t *)); # else /* MENTAT */ /* XXX MENTAT is never defined for FreeBSD & NetBSD */ -extern int ipf_check __P((void *, struct ip *, int, void *, int, mb_t **)); +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, mb_t **)); extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **)); extern size_t mbufchainlen __P((mb_t *)); # ifdef IPFILTER_LKM From owner-svn-src-all@freebsd.org Mon Jun 10 05:28:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EEE815B4A95; Mon, 10 Jun 2019 05:28:05 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BBC2935C7; Mon, 10 Jun 2019 05:28:04 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E7E9DD23; Mon, 10 Jun 2019 05:28:04 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A5S4cf072562; Mon, 10 Jun 2019 05:28:04 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A5S4gm072561; Mon, 10 Jun 2019 05:28:04 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201906100528.x5A5S4gm072561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 10 Jun 2019 05:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348847 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 348847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BBC2935C7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 05:28:05 -0000 Author: dchagin Date: Mon Jun 10 05:28:03 2019 New Revision: 348847 URL: https://svnweb.freebsd.org/changeset/base/348847 Log: Use C11 anonymous unions. PR: 215202 Reported by: glebius MFC after: 2 weeks Modified: head/sys/sys/ucred.h Modified: head/sys/sys/ucred.h ============================================================================== --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) @@ -89,12 +89,11 @@ struct xucred { gid_t cr_groups[XU_NGROUPS]; /* groups */ union { void *_cr_unused1; /* compatibility with old ucred */ - pid_t _pid; - } _cr; + pid_t cr_pid; + }; }; #define XUCRED_VERSION 0 -#define cr_pid _cr._pid /* This can be used for both ucred and xucred structures. */ #define cr_gid cr_groups[0] From owner-svn-src-all@freebsd.org Mon Jun 10 06:35:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2CC715B5BE3; Mon, 10 Jun 2019 06:35:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5048A94D97; Mon, 10 Jun 2019 06:35:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f194.google.com with SMTP id p17so1913590ljg.1; Sun, 09 Jun 2019 23:35:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ZxR4eUmJrD1IsL20rHu7dnM3I07RDJ1rKNnv3Oya9fU=; b=pDfD6pntUaf66vZXu4ncJMdEriTDBO4QwQ+JaQrY9K30iKyhrDvxaOCJ5xMkURwgam YmDubvmBKiKOFAsedHXvtvk2XpVq7gab/uMpje+g3guJb6cEIsF91fcpd36TOwpGYjFz TeY0suBSZef4LaJlt/QDfITBuMEwhZ4EGNOkZ2rF9EW15qVOQPN2M1c4ySYMB4a+vtD8 itUfQpIlYRd8E+TgfWLVJK93M5LsshUjxfWe4/B9rRX2ui53QqWhOV30vsTs9keNobB/ AoXHWJhqs0Lbsi7OaPoV8zGRG0zN76J5F/YIUvRdyPMbXTvQZUO+lxFqghV4wBpjVKWc hQVQ== X-Gm-Message-State: APjAAAWdLeZohDfKOjZ/kbhJmQRuAIdc03x1rRPaYgH2tTbYLRXJqGuF SdD9DmCl8sZrBtf4Gtkn2rT4+otw X-Google-Smtp-Source: APXvYqwJPjTws5T9JP4dBwVNAEYcOB5raEtefccTh8Nl5yfZs+Fftr6H2rNF2uq5D1+8FvLKi3P8NQ== X-Received: by 2002:a2e:96c3:: with SMTP id d3mr23737823ljj.68.1560148519952; Sun, 09 Jun 2019 23:35:19 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id l29sm1831809lfp.83.2019.06.09.23.35.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jun 2019 23:35:19 -0700 (PDT) Subject: Re: svn commit: r348843 - head/sys/vm To: Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Mon, 10 Jun 2019 09:35:17 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201906100307.x5A37BFt099669@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 5048A94D97 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 06:35:28 -0000 On 10/06/2019 06:07, Doug Moore wrote: > Author: dougm > Date: Mon Jun 10 03:07:10 2019 > New Revision: 348843 > URL: https://svnweb.freebsd.org/changeset/base/348843 > > Log: > There are times when a len==0 parameter to mmap is okay. But on a > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > up to a page boundary and hitting zero then, is not okay. Return > failure in that case. > > Reported by: pho > Reviewed by: alc, kib (mentor) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D20580 > > Modified: > head/sys/vm/vm_mmap.c > > Modified: head/sys/vm/vm_mmap.c > ============================================================================== > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s > > /* Adjust size for rounding (on both ends). */ > size += pageoff; /* low end... */ > - size = (vm_size_t) round_page(size); /* hi end */ > + /* Check for rounding up to zero. */ > + if (round_page(size) < size) Is this guaranteed to work with all compilers? I think that some smart compilers may think that this condition is impossible. Are we finally using -fwrapv or something like it for kernel builds? > + return (EINVAL); > + size = round_page(size); /* hi end */ > > /* Ensure alignment is at least a page and fits in a pointer. */ > align = flags & MAP_ALIGNMENT_MASK; > -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Jun 10 06:42:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F05AB15B5E21; Mon, 10 Jun 2019 06:42:38 +0000 (UTC) (envelope-from dougm@rice.edu) Received: from mx0a-0010f301.pphosted.com (mx0a-0010f301.pphosted.com [148.163.149.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 687139519F; Mon, 10 Jun 2019 06:42:38 +0000 (UTC) (envelope-from dougm@rice.edu) Received: from pps.filterd (m0102857.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5A6fDc6031947; Mon, 10 Jun 2019 01:42:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=ricemail; bh=8wLuuqNA5BJ/xYPT7HX3WLMTd7syVvoo7yv06H9cARY=; b=DYCEg+n5wEmKyJCWlHK3KQjvvDv7Y2Wr8qwD1kMRLXgF+kLgAzz30x4wTox4sZRP09Q6 ape8RYeIJhDN5DZSKvpozPGigmcG6T8riw//7FmuwUHyk1RQNSr8sbAYYXPDENpybDBh BtRQ9VF4XIRW6zR9dR4tAZJu48mvHTjNfQM6nHQ4AR4dZs7ZF1sXLBm181dRUtWWiYLT afAsK/+/uXsgpDr1Hf0NaKdlU4Zu5S5qDCD30JCS9kr/oBYL7OFHaUrifObtJJT2KlmA rkjSNYvkpMnn/zxw52LN1qmHYsJee48iSg3BSaIEZ9kMFTduw+xPPd6F0LT+4pCz0Doh jw== Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx0b-0010f301.pphosted.com with ESMTP id 2t07b2hjju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2019 01:42:35 -0500 Received-X: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 34348460569; Mon, 10 Jun 2019 01:42:35 -0500 (CDT) Received-X: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 1D1934605E5; Mon, 10 Jun 2019 01:42:35 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received-X: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id iq_3jNXws1-P; Mon, 10 Jun 2019 01:42:35 -0500 (CDT) Received: from 108-254-203-202.lightspeed.hstntx.sbcglobal.net (108-254-203-202.lightspeed.hstntx.sbcglobal.net [108.254.203.202]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dougm) by mh1.mail.rice.edu (Postfix) with ESMTPSA id B8AB0460569; Mon, 10 Jun 2019 01:42:34 -0500 (CDT) Subject: Re: svn commit: r348843 - head/sys/vm To: Andriy Gapon , Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> From: Doug Moore Openpgp: preference=signencrypt Autocrypt: addr=dougm@rice.edu; keydata= mQENBFy53VQBCAD2UiGSouAAMcSIax5Sp9JtRSd9dYVuAmSraY7x5yOylq8yJ5IDvHZy5q3a FamaCHMpXxieiD/8yTnHIeHP4bg02oDD3ALs0hMAEz00pZlLdxeXRfDzAlMTqFF6USPjDUI8 J/WH+pciNT68bFVXFYVg+bgp4GIdi2Md8X8zQQnHY0xLyKE9FjVN1MlCk+62B6fFhMQIEvd5 RQdbGd+ljuoORD1ajljwP1waXKBfAN5RnIbAXppokgQvnwNRf1eZ7GnqSiwu0eaTHGBatPgr y2v5N19R5WxP2kiN95xdlJEwdUikAhWO1UncDxvXQoM1e68L/J85JSLLIgzuywKpBBtdABEB AAG0IERvdWdsYXMgVyBNb29yZSA8ZG91Z21AcmljZS5lZHU+iQFUBBMBCAA+FiEEeV41MZJW A65Cl96D6I8hU9O51W4FAly53VQCGwMFCQWjmoAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA CgkQ6I8hU9O51W58mgf8D9xOhD9/nqtHKUBDJz/m5DLzLyQVci6RrRFK9hSyQ1QdkG4VvvRL G1MpjsM16f42N41lf9Zhln7ydwpeUVNeGwwZu2S4EiSPOEhGpNOYC1lRjsD5ai9aZwzHcrAz 2PnyWxNJNEawrVdPUOaVlE+uzYe1048FaaB5tmYtooWZm5RZx6YBKSbWyWI8OvEO9BRlcwjr ErOlVlW3TNLpBGyvXYMAseWEozzsdaVbsekw6+7atIUYh6z9oBZXmClVdcpLF5/rtYhjwIIE 7AlWyt9tEJjRhA+2ujfbm96IrL5J8Da557IhjfslB8KcWGT+ynA5QzIrwidqllHMGsed4MAo RLkBDQRcud1UAQgA2xw6CEAjLMhRWjY86mW63fJ7WjMKUOoQS+0Z2yyUh2vI3oWWMgHbVlm2 7bclX+uidxABeh8gVxMcPX68ri1PsmXwDSNA93Jpm+dYwhugbvDZ5EEzn9ze3MNbGEEhx9j0 JYVmHOeSW7v2ia8H1ZxHIS3WzfKdsuFl0S34St9ojmkMzDNsRzZNvLF5wFeQ0cUI712OyBu3 E+T369rgIV6jwwwmbDI/YIWd2kMr6+6u40tbs70j7IpjluB3/XyaolcRdpDER9YUDXtSOL+/ UmhbQ10UrmIrxD1enqYn1gE8GOuv1P4zueU6qg8hc/wYPtggqR8smRjPQPn/OlcSxBnO4QAR AQABiQE8BBgBCAAmFiEEeV41MZJWA65Cl96D6I8hU9O51W4FAly53VQCGwwFCQWjmoAACgkQ 6I8hU9O51W5IYgf9ElaumHGMK89Y9ZQVJOwwlD1QC6DUoluIjYmudu6VkHRxrbE1VQohHAeu amaNA0qzLAL7RgkUs1HmyEOqJg0g51pm73l8pK97ztPqXEarCT0CnAE0atl43AY2TCjg+ANl zktrd4QDPqGOBfYbUCGPYJ7yukXU7cmnyaJx6XnjZDAuyhMDxkuocxVNJa32cV0NYqY9EDjo GfGaJjF20leX/BsGElCzDzlZgfWpNGQjqGuOdYdKNx43J654MO6HxSRT25j09s26VzpvT6rI c0wNdJ4CBE5tseI+YlbwhxGziQh/FEMnTSqxhWt1Ac6o9TqMQIIKoQhcekvT7EX5uvvOnLkB DQRcusvzAQgAvlC3Q5iWVbOxhZ6QXSiZ0p1SG19XZBo7tY5L4Pu6QPNsl/tIWbyDodMdz8vG rG36sRZXlcLOfZhhAHuWKUcoPpJ9H3deHrYZSK7H9LBvNm+0C8n/acRrkAZYch74A4HXlBpc +pMm1SfXufXm7TWII7hAvxpX/2+eaZppEl8eRf+JfNhK+34aYjoONp+wi6Jz/gMS7EfC+gIw jg3ncionUqKXHR/HR+kUzfQpiGEj0KvL0YgEawyzb1UB+D0Jb97OAiqj+s0jd4THS5S7b4He lDHcrlisUZNMtFoRmuG2fKCjwqOQ6+qNdjkhL8flHtkAUOu51WOR+kqAqKKRx6JnkQARAQAB iQLSBBgBCgAmFiEEeV41MZJWA65Cl96D6I8hU9O51W4FAly6y/MCGwIFCQWjmoABoAkQ6I8h U9O51W7A1CAEGQEKAH0WIQR+kHbQAKIFA/vka1CjtHtWP6FLrAUCXLrL818UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0N0U5MDc2RDAw MEEyMDUwM0ZCRTQ2QjUwQTNCNDdCNTYzRkExNEJBQwAKCRCjtHtWP6FLrKfwB/9JJhuW8pYI egq4N9O416AkIGb7U4WgfSxpn+e8qVL5368LdZ9BMe3CnEJ70gPtdvNPStdkJkeQ+tQHVPBw WkHaCxY9Kw4t+K2sYAGOeePmIhro/V2oDxCjHm/orr6r4XrQur+yvHl6qWliKMyKRSQphJcR jEp4AI/1epzp5ulw0sn4Gjgpp4zkEanuPblPukeu4G+1AeCflyR4D1pWvdQU6rL9zS3MFyDa j/ooh7YDC5qx9Y9HjYcTpPfkSzX9GG2XBmR3+3lo3CW1nAdd3tIBepkdEXEMQpZvPRFb9qfg jyE6V0wC6yG9fxF/TuG8/Trs3WZORa1gFDR0rQROvjHCc/UH/R7Pmbw4s7r/DTl9mGXikXQa VkrCkS99g5D67qerzA1S9SyH7d0iVy3PqFr8vNnwJtB7hjFx6uO2XG75h1CX50q3YYx0gd+U dwcM2GeP5SDQ0fdFoCsPjSTRK5oiD96D85VTbS7EJgF14wHcrBbqulUltE3JSVSIgYy4Jyr4 dF82pM8XWeaVaYAh8yoIDvud5UYRJECIC00VNG1W/wUJKmvIhsFIQXRneEoMvbMpDvP9QvAK WK7E+dYhu/eemFhteDTgbh16AbHcpwkwFWMEke/u393pzSsxKVCrYACxv7aY186fILDrQUpQ qJr40I2R31nvfny8tsCffMIvKtJ98Rw= Message-ID: <21baf615-3356-73a1-52b0-d2f33f4cf49d@rice.edu> Date: Mon, 10 Jun 2019 01:42:34 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-10_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906100047 X-Rspamd-Queue-Id: 687139519F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 06:42:39 -0000 -fwrapv concerns signed arithmetic.  This calculation is with unsigned arithmetic, and the possibility of wrapping around to 0 is part of the language. Doug Moore On 6/10/19 1:35 AM, Andriy Gapon wrote: > On 10/06/2019 06:07, Doug Moore wrote: >> Author: dougm >> Date: Mon Jun 10 03:07:10 2019 >> New Revision: 348843 >> URL: https://svnweb.freebsd.org/changeset/base/348843 >> >> Log: >> There are times when a len==0 parameter to mmap is okay. But on a >> 32-bit machine, a len parameter just a few bytes short of 4G, rounded >> up to a page boundary and hitting zero then, is not okay. Return >> failure in that case. >> >> Reported by: pho >> Reviewed by: alc, kib (mentor) >> Tested by: pho >> Differential Revision: https://reviews.freebsd.org/D20580 >> >> Modified: >> head/sys/vm/vm_mmap.c >> >> Modified: head/sys/vm/vm_mmap.c >> ============================================================================== >> --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) >> +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) >> @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s >> >> /* Adjust size for rounding (on both ends). */ >> size += pageoff; /* low end... */ >> - size = (vm_size_t) round_page(size); /* hi end */ >> + /* Check for rounding up to zero. */ >> + if (round_page(size) < size) > Is this guaranteed to work with all compilers? > I think that some smart compilers may think that this condition is impossible. > Are we finally using -fwrapv or something like it for kernel builds? > >> + return (EINVAL); >> + size = round_page(size); /* hi end */ >> >> /* Ensure alignment is at least a page and fits in a pointer. */ >> align = flags & MAP_ALIGNMENT_MASK; >> > From owner-svn-src-all@freebsd.org Mon Jun 10 06:54:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0289315B714D; Mon, 10 Jun 2019 06:54:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 68C46956E5; Mon, 10 Jun 2019 06:54:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 73D4743E1C7; Mon, 10 Jun 2019 16:54:11 +1000 (AEST) Date: Mon, 10 Jun 2019 16:54:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Doug Moore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm In-Reply-To: <201906100307.x5A37BFt099669@repo.freebsd.org> Message-ID: <20190610160930.S2504@besplex.bde.org> References: <201906100307.x5A37BFt099669@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=E8nMTcrMv8adVMIzyT4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 68C46956E5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.962,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 06:54:21 -0000 On Mon, 10 Jun 2019, Doug Moore wrote: > Log: > There are times when a len==0 parameter to mmap is okay. But on a > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > up to a page boundary and hitting zero then, is not okay. Return > failure in that case. Some overflows still occur. The problem is not limited to 32-bit machines. The first overflow is for len parameter just a few bytes short of SIZE_MAX added to a page offset of a few bytes. This overflows to a small value. Then rounding up to a page boundary doesn't overflow, but gives 0 or PAGE_SIZE, so the new overflow check doesn't work and overflow still occurs. The second overflow is for a len parameter just a few bytes short of SIZE_MAX with the first overflow not occurring (usually because the offset is 0). This is now detected. > Reported by: pho > Reviewed by: alc, kib (mentor) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D20580 > > Modified: > head/sys/vm/vm_mmap.c > > Modified: head/sys/vm/vm_mmap.c > ============================================================================== > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s > > /* Adjust size for rounding (on both ends). */ > size += pageoff; /* low end... */ The first overflow occurs here. Except in special cases, pageoff can be anything between 0 and PAGE_SIZE - 1, and size can be anything between 0 and SIZE_MAX. > - size = (vm_size_t) round_page(size); /* hi end */ > + /* Check for rounding up to zero. */ > + if (round_page(size) < size) > + return (EINVAL); > + size = round_page(size); /* hi end */ > > /* Ensure alignment is at least a page and fits in a pointer. */ > align = flags & MAP_ALIGNMENT_MASK; This bug was implemented in r239247 and affects all versions of FreeBSD newer than FreeBSD-7. Before then, FreeBSD used the bogus 4.4BSD check that (ssize_t)uap->len >= 0 (else return EINVAL). This behaviour was even documented. POSIX doesn't allow this -- it requires ENOMEM for invalid ranges, though it should require EOVERFLOW for ranges that are so invalid that they overflow something. Bruce From owner-svn-src-all@freebsd.org Mon Jun 10 07:17:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F6BE15B7580; Mon, 10 Jun 2019 07:17:50 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42F0C95EE6; Mon, 10 Jun 2019 07:17:49 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f194.google.com with SMTP id 16so6890860ljv.10; Mon, 10 Jun 2019 00:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=YX9hmvLMTUIzf1922UJ/0AFd+ihbS+Y3oCvL+R2YBTQ=; b=J1+hmfy/ud4BVTlQ2oMJ3fypu0kTej8789qWH61rVJ2fv3jY3XxEEkWFO3JZo6ZXFc ax44e7vJ7dJLwsQSnMddLffAw1CoeNe9BjmH6Gk0as1EBwUcF+PN0KJCFlnCLHbOGv8T 1GhR1Ks9Aee/HZGCVDkcKp4gkV+TQp+6Tqn7YSsbu9QJexZlEAwv0/DnXCxgwYig+ljd 9JFnBKhCiTxNdkUZ0N+f83qOMg8qu136h7QWCmJlYZZu56h0ZsOuBwzzfVianm/oA7Rw QuUq2MappfXUNPTrLn9ZGNV5bjUmz/kPNxDAiilznqLdE0JIY3xN+rsUfSQ7eTM8CDqe Ql3w== X-Gm-Message-State: APjAAAUiwzSRROS+QSE4LJOqJsJq+ea6z1QY9c0s/wR4ciioyb8KNCjS UCOzSDBWQgyZh7ye4pDKNfL9tvv1 X-Google-Smtp-Source: APXvYqw4FqxS0H2DdCMCh7r1ZqJ2Y/D3MbgtrIvtmY/iT5qRa0pDhIUcoAR+2zn4H92utt16ny3krg== X-Received: by 2002:a2e:8696:: with SMTP id l22mr11995757lji.201.1560151067448; Mon, 10 Jun 2019 00:17:47 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id g15sm1780925ljk.83.2019.06.10.00.17.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 00:17:46 -0700 (PDT) Subject: Re: svn commit: r348843 - head/sys/vm To: Doug Moore , Doug Moore , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> <21baf615-3356-73a1-52b0-d2f33f4cf49d@rice.edu> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Mon, 10 Jun 2019 10:17:44 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <21baf615-3356-73a1-52b0-d2f33f4cf49d@rice.edu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42F0C95EE6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 07:17:50 -0000 On 10/06/2019 09:42, Doug Moore wrote: > -fwrapv concerns signed arithmetic.  This calculation is with unsigned > arithmetic, and the possibility of wrapping around to 0 is part of the > language. Oh, sorry for the noise! > On 6/10/19 1:35 AM, Andriy Gapon wrote: >> On 10/06/2019 06:07, Doug Moore wrote: >>> Author: dougm >>> Date: Mon Jun 10 03:07:10 2019 >>> New Revision: 348843 >>> URL: https://svnweb.freebsd.org/changeset/base/348843 >>> >>> Log: >>> There are times when a len==0 parameter to mmap is okay. But on a >>> 32-bit machine, a len parameter just a few bytes short of 4G, rounded >>> up to a page boundary and hitting zero then, is not okay. Return >>> failure in that case. >>> >>> Reported by: pho >>> Reviewed by: alc, kib (mentor) >>> Tested by: pho >>> Differential Revision: https://reviews.freebsd.org/D20580 >>> >>> Modified: >>> head/sys/vm/vm_mmap.c >>> >>> Modified: head/sys/vm/vm_mmap.c >>> ============================================================================== >>> --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) >>> +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) >>> @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s >>> >>> /* Adjust size for rounding (on both ends). */ >>> size += pageoff; /* low end... */ >>> - size = (vm_size_t) round_page(size); /* hi end */ >>> + /* Check for rounding up to zero. */ >>> + if (round_page(size) < size) >> Is this guaranteed to work with all compilers? >> I think that some smart compilers may think that this condition is impossible. >> Are we finally using -fwrapv or something like it for kernel builds? >> >>> + return (EINVAL); >>> + size = round_page(size); /* hi end */ >>> >>> /* Ensure alignment is at least a page and fits in a pointer. */ >>> align = flags & MAP_ALIGNMENT_MASK; >>> >> -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Jun 10 09:03:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85FD715B9B3C; Mon, 10 Jun 2019 09:03:09 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26A3B6A2E1; Mon, 10 Jun 2019 09:03:09 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F06811821D; Mon, 10 Jun 2019 09:03:08 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5A938JH087182; Mon, 10 Jun 2019 09:03:08 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5A938jj087181; Mon, 10 Jun 2019 09:03:08 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201906100903.x5A938jj087181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Mon, 10 Jun 2019 09:03: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: r348849 - stable/12/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-12 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: stable/12/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 348849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 26A3B6A2E1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 09:03:09 -0000 Author: slavash Date: Mon Jun 10 09:03:08 2019 New Revision: 348849 URL: https://svnweb.freebsd.org/changeset/base/348849 Log: MFC r348601: Fix prio vs. nonprio tagged traffic in RDMACM In current RDMACM implementation RDMACM server will not find a GID index when the request was prio-tagged and the sever is non prio-tagged and vise-versa. According to 802.1Q-2014, VLAN tagged packets with VLAN id 0 should be considered as untagged. Treat RDMACM request the same. Reviewed by: hselasky, kib Sponsored by: Mellanox Technologies Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Jun 10 07:12:46 2019 (r348848) +++ stable/12/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Jun 10 09:03:08 2019 (r348849) @@ -414,18 +414,32 @@ struct find_gid_index_context { enum ib_gid_type gid_type; }; + +/* + * This function will return true only if a inspected GID index + * matches the request based on the GID type and VLAN configuration + */ static bool find_gid_index(const union ib_gid *gid, const struct ib_gid_attr *gid_attr, void *context) { + u16 vlan_diff; struct find_gid_index_context *ctx = (struct find_gid_index_context *)context; if (ctx->gid_type != gid_attr->gid_type) return false; - if (rdma_vlan_dev_vlan_id(gid_attr->ndev) != ctx->vlan_id) - return false; - return true; + + /* + * The following will verify: + * 1. VLAN ID matching for VLAN tagged requests. + * 2. prio-tagged/untagged to prio-tagged/untagged matching. + * + * This XOR is valid, since 0x0 < vlan_id < 0x0FFF. + */ + vlan_diff = rdma_vlan_dev_vlan_id(gid_attr->ndev) ^ ctx->vlan_id; + + return (vlan_diff == 0x0000 || vlan_diff == 0xFFFF); } static int get_sgid_index_from_eth(struct ib_device *device, u8 port_num, From owner-svn-src-all@freebsd.org Mon Jun 10 09:10:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE99915B9C76; Mon, 10 Jun 2019 09:10:43 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay102.isp.belgacom.be (mailrelay102.isp.belgacom.be [195.238.20.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D14FF6A666; Mon, 10 Jun 2019 09:10:42 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CPAQDuHf5c/1H1sVtlGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBZQKCD1kRUiASFBSNEIl2AQGCDDUBigiQHQkBAQIBAQE?= =?us-ascii?q?BASsMAQGEQAKCcCQ4EwEDAQEFAQEBAQRtHAxCAQwBhHsBBTocIxALDgYECSU?= =?us-ascii?q?PSAYBEoMjgg4LqBGEMgELAYRbgQoGgTQBi3OBf4QjPoREhWIElAiVHwmCEYZ?= =?us-ascii?q?EjHInlxuECokJhxORNSGBWE0wCIMnghsXiGGFQT0DMIIUjk4BAQ?= X-IPAS-Result: =?us-ascii?q?A2CPAQDuHf5c/1H1sVtlGQEBAQEBAQEBAQEBAQcBAQEBA?= =?us-ascii?q?QGBZQKCD1kRUiASFBSNEIl2AQGCDDUBigiQHQkBAQIBAQEBASsMAQGEQAKCc?= =?us-ascii?q?CQ4EwEDAQEFAQEBAQRtHAxCAQwBhHsBBTocIxALDgYECSUPSAYBEoMjgg4Lq?= =?us-ascii?q?BGEMgELAYRbgQoGgTQBi3OBf4QjPoREhWIElAiVHwmCEYZEjHInlxuECokJh?= =?us-ascii?q?xORNSGBWE0wCIMnghsXiGGFQT0DMIIUjk4BAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 10 Jun 2019 11:09:10 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x5A9996m007510; Mon, 10 Jun 2019 11:09:09 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Mon, 10 Jun 2019 11:09:09 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Dmitry Chagin , glebius@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> In-Reply-To: <201906100528.x5A5S4gm072561@repo.freebsd.org> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D14FF6A666 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 09:10:43 -0000 On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin wrote: > Author: dchagin > Date: Mon Jun 10 05:28:03 2019 > New Revision: 348847 > URL: https://svnweb.freebsd.org/changeset/base/348847 > > Log: > Use C11 anonymous unions. > > PR: 215202 > Reported by: glebius > MFC after: 2 weeks > > Modified: > head/sys/sys/ucred.h > > Modified: head/sys/sys/ucred.h > ============================================================================== > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) > @@ -89,12 +89,11 @@ struct xucred { > gid_t cr_groups[XU_NGROUPS]; /* groups */ > union { > void *_cr_unused1; /* compatibility with old ucred */ > - pid_t _pid; > - } _cr; > + pid_t cr_pid; > + }; > }; > #define XUCRED_VERSION 0 > > -#define cr_pid _cr._pid > /* This can be used for both ucred and xucred structures. */ > #define cr_gid cr_groups[0] Isn't this a userland header that should work with non-C11 compilers? From owner-svn-src-all@freebsd.org Mon Jun 10 12:40:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3F3515BE4A5; Mon, 10 Jun 2019 12:40:39 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 578C771457; Mon, 10 Jun 2019 12:40:39 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22CAE1A52C; Mon, 10 Jun 2019 12:40:39 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ACed3V000316; Mon, 10 Jun 2019 12:40:39 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ACecE0000315; Mon, 10 Jun 2019 12:40:38 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906101240.x5ACecE0000315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 10 Jun 2019 12:40: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: r348850 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 578C771457 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 12:40:39 -0000 Author: cy Date: Mon Jun 10 12:40:38 2019 New Revision: 348850 URL: https://svnweb.freebsd.org/changeset/base/348850 Log: MFC r348575: Properly define the fourth argument to ipf_check, the main entry point into ipfilter. A proper definition simplifies dtrace scripts a little. Approved by: re (delphij@) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Jun 10 09:03:08 2019 (r348849) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Jun 10 12:40:38 2019 (r348850) @@ -2810,7 +2810,7 @@ ipf_check(ctx, ip, hlen, ifp, out mb_t **mp; ip_t *ip; int hlen; - void *ifp; + struct ifnet *ifp; int out; void *ctx; { Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Mon Jun 10 09:03:08 2019 (r348849) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Mon Jun 10 12:40:38 2019 (r348850) @@ -1655,7 +1655,7 @@ typedef struct ipf_main_softc_s { } while (0) #ifndef _KERNEL -extern int ipf_check __P((void *, struct ip *, int, void *, int, mb_t **)); +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, mb_t **)); extern struct ifnet *get_unit __P((char *, int)); extern char *get_ifname __P((struct ifnet *)); extern int ipfioctl __P((ipf_main_softc_t *, int, ioctlcmd_t, @@ -1672,7 +1672,7 @@ extern int ipl_enable __P((void)); extern int ipl_disable __P((void)); # ifdef MENTAT /* XXX MENTAT is always defined for Solaris */ -extern int ipf_check __P((void *, struct ip *, int, void *, int, void *, +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **)); # if SOLARIS extern void ipf_prependmbt(fr_info_t *, mblk_t *); @@ -1681,7 +1681,7 @@ extern int ipfioctl __P((dev_t, int, intptr_t, int, cr extern int ipf_qout __P((queue_t *, mblk_t *)); # else /* MENTAT */ /* XXX MENTAT is never defined for FreeBSD & NetBSD */ -extern int ipf_check __P((void *, struct ip *, int, void *, int, mb_t **)); +extern int ipf_check __P((void *, struct ip *, int, struct ifnet *, int, mb_t **)); extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **)); extern size_t mbufchainlen __P((mb_t *)); # ifdef IPFILTER_LKM From owner-svn-src-all@freebsd.org Mon Jun 10 13:00:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 187C015BE90F for ; Mon, 10 Jun 2019 13:00:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9908171CCC for ; Mon, 10 Jun 2019 13:00:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x843.google.com with SMTP id d23so10428924qto.2 for ; Mon, 10 Jun 2019 06:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lRN7kbVAT6Nw12yBGC72tDOdiVHa8pf2/I01Z4DuBFo=; b=S7zQ4f3Cb4ZN4IyK7RybvnoMh+Vba0Gcplsf8zn4tJtOlo+0T4inWFtp9omc9WayBx 0/cFp57YQYwe7f79hBb6im+2iJUQbLmBd2FnaVTOp/JH4nPbbLmMzJKlRMUmGtB25/E/ ++kbR3X0+hp1KYhRo6UqkjGQb7Kz6HDI8qmWFMd4XpCiHge9RX4JOmZlcV8uz4VInm+B 1zcJ0hZ6ZK4IPQbvY3NwfMeQoPyvWPn7g1gaPShZY9F8gK85Rv7TEnKANl4tiBwWGE0s x76Z8YD4kXHUCo8wBT7Ji7UR/WfUQSjP777VzDNErsU80KzC/tPi2ZZ9j4QHn3pdgpFA UzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lRN7kbVAT6Nw12yBGC72tDOdiVHa8pf2/I01Z4DuBFo=; b=CMR8Qo5ouCffaLNs80os5jJXjfcu5SaQIcxNwxXDxcd+8K0Kxo2wRulrv2GuNR7eQ9 npPx+w7R6oih0UxKKebqr8FICGNMjgYuUitMLE/HPTKscJbgkzKDkuA1xdCzwIz8Qdbm YrFgPPNjidWvLawxbpEmYAx2uBdp3ksXuZ/KfIczc17M++8QKDaLX5NCbSwwDWZYCc65 6PDmy05CqXzuDcKEfMxRPYDUzGH188GUFf2qPYxbWDNmgV1mANPhxKEXRObUj+va9K3+ AeRh30ZDcwtiHWGOi5jPJ9q93sC3u4DFrEe5dv2lFsNv/8Aqa27NPhTjH9C+5/R94ZKq 3A/g== X-Gm-Message-State: APjAAAXUquAXoZ5uJL+Y/hzDI6p/2+uxW3WLVR4AlCwES2n2/zhhUE5x Mvapid7X483kkqzZ5eiHFy7A1A== X-Google-Smtp-Source: APXvYqz6X4sPYdU81EIihgdQ8NG/LrDb8hOEN/6lQsJdOCH2hdFhH7FjLT9NL0E/lV8aESiiLHt/kQ== X-Received: by 2002:a0c:984b:: with SMTP id e11mr57683591qvd.174.1560171635481; Mon, 10 Jun 2019 06:00:35 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.108]) by smtp.gmail.com with ESMTPSA id p40sm5987110qte.93.2019.06.10.06.00.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 06:00:34 -0700 (PDT) Date: Mon, 10 Jun 2019 09:00:34 -0400 From: Shawn Webb To: Doug Moore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm Message-ID: <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> References: <201906100307.x5A37BFt099669@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z44yomx5hny7i4jy" Content-Disposition: inline In-Reply-To: <201906100307.x5A37BFt099669@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 9908171CCC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:00:37 -0000 --z44yomx5hny7i4jy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: > Author: dougm > Date: Mon Jun 10 03:07:10 2019 > New Revision: 348843 > URL: https://svnweb.freebsd.org/changeset/base/348843 >=20 > Log: > There are times when a len=3D=3D0 parameter to mmap is okay. But on a > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > up to a page boundary and hitting zero then, is not okay. Return > failure in that case. > =20 > Reported by: pho > Reviewed by: alc, kib (mentor) > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D20580 >=20 > Modified: > head/sys/vm/vm_mmap.c >=20 > Modified: head/sys/vm/vm_mmap.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t= s > =20 > /* Adjust size for rounding (on both ends). */ > size +=3D pageoff; /* low end... */ > - size =3D (vm_size_t) round_page(size); /* hi end */ > + /* Check for rounding up to zero. */ > + if (round_page(size) < size) > + return (EINVAL); The mmap(2) manpage says that len=3D=3D0 results in EINVAL, so the manpage needs updating. I'm curious what "there are times" refers to. Can you or the original reporter elaborate those cases? Thanks a lot! --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 --z44yomx5hny7i4jy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAlz+VGwACgkQ/y5nonf4 4frvGA//eQq2TpOcbjRwgfD6CI3iSLMimv3LTcxYDdmWvBEOaQYLVU4jk4gHM02F PkiHEw95AhW+YLD+Wqy62xCuzc4A9FtEjMSbIcBK3rxZ7fJzBreWCUNoFen29+3T 0qJQTf7gOE/l5XQ2Ysghi/Z3+5lpaLEuQCwjQbmgkBO+3Yl15YdJFupH9rM+RqcH /YQXUUfdwmV77N07iOpM6IGRHBVoW33D8a0LNdf7E3xrqgvd2guZnv2cnxt6FAyZ 213Rj44nvs1zkBerYuT1n1aEHEcvaSGv+8Cok9iaF5vQHfIsj2kkko2pvawF/RsJ Oo79JaYueU6+nGq87Tb7V/Z0EGDN3nvrbPbWM1TZXf7spT7SZOwb/tE098GPtG2w o6YCZTdxtDEMlApGK4yT3lCPBfhrmL4NdQ8bla5KyxjwubtZImdjuDlcFHIrmIJF FNk8az1+kapJcJmpbSJ0DI79N1YjdS/uUhP+et99GxYfzU80VeYiLYgAmXs3Xfbc ffwpelv5gxlav+VaT2WHYru0xxOklADd2zHkhrmsGYg5sP5wg7gM5+AYvHF763nU F5xa8vMyCHh5lvrd7ZZjcaDhrbqtztMWStCuZAfZ6cAbbT686FFtblYmuCT1QulR AH/nfS2f/8/cftLvSpbGArAt2v6GVBCh02CwlIdF7lz7bcSbyTA= =kEQg -----END PGP SIGNATURE----- --z44yomx5hny7i4jy-- From owner-svn-src-all@freebsd.org Mon Jun 10 13:15:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B61715BED60; Mon, 10 Jun 2019 13:15:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4A54724AA; Mon, 10 Jun 2019 13:15:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DDBB1ABC3; Mon, 10 Jun 2019 13:15:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADFnNk018441; Mon, 10 Jun 2019 13:15:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADFnYm018440; Mon, 10 Jun 2019 13:15:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101315.x5ADFnYm018440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:15:49 +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: r348851 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/controller X-SVN-Commit-Revision: 348851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4A54724AA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:15:50 -0000 Author: hselasky Date: Mon Jun 10 13:15:49 2019 New Revision: 348851 URL: https://svnweb.freebsd.org/changeset/base/348851 Log: MFC r348604: In xhci(4) there is no stream ID in the completion TRB. Instead iterate all the stream IDs in stream mode to find the matching USB transfer. Approved by: re(kib) Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/controller/xhci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci.c Mon Jun 10 12:40:38 2019 (r348850) +++ stable/11/sys/dev/usb/controller/xhci.c Mon Jun 10 13:15:49 2019 (r348851) @@ -889,7 +889,7 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci uint64_t td_event; uint32_t temp; uint32_t remainder; - uint16_t stream_id; + uint16_t stream_id = 0; uint16_t i; uint8_t status; uint8_t halted; @@ -902,7 +902,6 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci remainder = XHCI_TRB_2_REM_GET(temp); status = XHCI_TRB_2_ERROR_GET(temp); - stream_id = XHCI_TRB_2_STREAM_GET(temp); temp = le32toh(trb->dwTrb3); epno = XHCI_TRB_3_EP_GET(temp); @@ -912,8 +911,8 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci halted = (status != XHCI_TRB_ERROR_SHORT_PKT && status != XHCI_TRB_ERROR_SUCCESS); - DPRINTF("slot=%u epno=%u stream=%u remainder=%u status=%u\n", - index, epno, stream_id, remainder, status); + DPRINTF("slot=%u epno=%u remainder=%u status=%u\n", + index, epno, remainder, status); if (index > sc->sc_noslot) { DPRINTF("Invalid slot.\n"); @@ -927,18 +926,19 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci pepext = &sc->sc_hw.devs[index].endp[epno]; - if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS) { - stream_id = 0; - DPRINTF("stream_id=0\n"); - } else if (stream_id >= XHCI_MAX_STREAMS) { - DPRINTF("Invalid stream ID.\n"); - return; - } - /* try to find the USB transfer that generated the event */ - for (i = 0; i != (XHCI_MAX_TRANSFERS - 1); i++) { + for (i = 0;; i++) { struct usb_xfer *xfer; struct xhci_td *td; + + if (i == (XHCI_MAX_TRANSFERS - 1)) { + if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS || + stream_id == (XHCI_MAX_STREAMS - 1)) + break; + stream_id++; + i = 0; + DPRINTFN(5, "stream_id=%u\n", stream_id); + } xfer = pepext->xfer[i + (XHCI_MAX_TRANSFERS * stream_id)]; if (xfer == NULL) From owner-svn-src-all@freebsd.org Mon Jun 10 13:16:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1B7515BEE0A; Mon, 10 Jun 2019 13:16:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 860AF72614; Mon, 10 Jun 2019 13:16:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46C5E1ABC4; Mon, 10 Jun 2019 13:16:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADGole018542; Mon, 10 Jun 2019 13:16:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADGoG6018541; Mon, 10 Jun 2019 13:16:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101316.x5ADGoG6018541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:16: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: r348852 - stable/12/sys/dev/usb/controller X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb/controller X-SVN-Commit-Revision: 348852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 860AF72614 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:16:51 -0000 Author: hselasky Date: Mon Jun 10 13:16:49 2019 New Revision: 348852 URL: https://svnweb.freebsd.org/changeset/base/348852 Log: MFC r348604: In xhci(4) there is no stream ID in the completion TRB. Instead iterate all the stream IDs in stream mode to find the matching USB transfer. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/controller/xhci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/12/sys/dev/usb/controller/xhci.c Mon Jun 10 13:15:49 2019 (r348851) +++ stable/12/sys/dev/usb/controller/xhci.c Mon Jun 10 13:16:49 2019 (r348852) @@ -891,7 +891,7 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci uint64_t td_event; uint32_t temp; uint32_t remainder; - uint16_t stream_id; + uint16_t stream_id = 0; uint16_t i; uint8_t status; uint8_t halted; @@ -904,7 +904,6 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci remainder = XHCI_TRB_2_REM_GET(temp); status = XHCI_TRB_2_ERROR_GET(temp); - stream_id = XHCI_TRB_2_STREAM_GET(temp); temp = le32toh(trb->dwTrb3); epno = XHCI_TRB_3_EP_GET(temp); @@ -914,8 +913,8 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci halted = (status != XHCI_TRB_ERROR_SHORT_PKT && status != XHCI_TRB_ERROR_SUCCESS); - DPRINTF("slot=%u epno=%u stream=%u remainder=%u status=%u\n", - index, epno, stream_id, remainder, status); + DPRINTF("slot=%u epno=%u remainder=%u status=%u\n", + index, epno, remainder, status); if (index > sc->sc_noslot) { DPRINTF("Invalid slot.\n"); @@ -929,18 +928,19 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci pepext = &sc->sc_hw.devs[index].endp[epno]; - if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS) { - stream_id = 0; - DPRINTF("stream_id=0\n"); - } else if (stream_id >= XHCI_MAX_STREAMS) { - DPRINTF("Invalid stream ID.\n"); - return; - } - /* try to find the USB transfer that generated the event */ - for (i = 0; i != (XHCI_MAX_TRANSFERS - 1); i++) { + for (i = 0;; i++) { struct usb_xfer *xfer; struct xhci_td *td; + + if (i == (XHCI_MAX_TRANSFERS - 1)) { + if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS || + stream_id == (XHCI_MAX_STREAMS - 1)) + break; + stream_id++; + i = 0; + DPRINTFN(5, "stream_id=%u\n", stream_id); + } xfer = pepext->xfer[i + (XHCI_MAX_TRANSFERS * stream_id)]; if (xfer == NULL) From owner-svn-src-all@freebsd.org Mon Jun 10 13:17:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2987F15BEE8A; Mon, 10 Jun 2019 13:17:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F66172767; Mon, 10 Jun 2019 13:17:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A6B11ABC5; Mon, 10 Jun 2019 13:17:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADHdOD018639; Mon, 10 Jun 2019 13:17:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADHdrf018638; Mon, 10 Jun 2019 13:17:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101317.x5ADHdrf018638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r348853 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/usb/controller X-SVN-Commit-Revision: 348853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F66172767 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:17:40 -0000 Author: hselasky Date: Mon Jun 10 13:17:39 2019 New Revision: 348853 URL: https://svnweb.freebsd.org/changeset/base/348853 Log: MFC r348604: In xhci(4) there is no stream ID in the completion TRB. Instead iterate all the stream IDs in stream mode to find the matching USB transfer. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Mon Jun 10 13:16:49 2019 (r348852) +++ stable/10/sys/dev/usb/controller/xhci.c Mon Jun 10 13:17:39 2019 (r348853) @@ -895,7 +895,7 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci uint64_t td_event; uint32_t temp; uint32_t remainder; - uint16_t stream_id; + uint16_t stream_id = 0; uint16_t i; uint8_t status; uint8_t halted; @@ -908,7 +908,6 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci remainder = XHCI_TRB_2_REM_GET(temp); status = XHCI_TRB_2_ERROR_GET(temp); - stream_id = XHCI_TRB_2_STREAM_GET(temp); temp = le32toh(trb->dwTrb3); epno = XHCI_TRB_3_EP_GET(temp); @@ -918,8 +917,8 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci halted = (status != XHCI_TRB_ERROR_SHORT_PKT && status != XHCI_TRB_ERROR_SUCCESS); - DPRINTF("slot=%u epno=%u stream=%u remainder=%u status=%u\n", - index, epno, stream_id, remainder, status); + DPRINTF("slot=%u epno=%u remainder=%u status=%u\n", + index, epno, remainder, status); if (index > sc->sc_noslot) { DPRINTF("Invalid slot.\n"); @@ -933,18 +932,19 @@ xhci_check_transfer(struct xhci_softc *sc, struct xhci pepext = &sc->sc_hw.devs[index].endp[epno]; - if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS) { - stream_id = 0; - DPRINTF("stream_id=0\n"); - } else if (stream_id >= XHCI_MAX_STREAMS) { - DPRINTF("Invalid stream ID.\n"); - return; - } - /* try to find the USB transfer that generated the event */ - for (i = 0; i != (XHCI_MAX_TRANSFERS - 1); i++) { + for (i = 0;; i++) { struct usb_xfer *xfer; struct xhci_td *td; + + if (i == (XHCI_MAX_TRANSFERS - 1)) { + if (pepext->trb_ep_mode != USB_EP_MODE_STREAMS || + stream_id == (XHCI_MAX_STREAMS - 1)) + break; + stream_id++; + i = 0; + DPRINTFN(5, "stream_id=%u\n", stream_id); + } xfer = pepext->xfer[i + (XHCI_MAX_TRANSFERS * stream_id)]; if (xfer == NULL) From owner-svn-src-all@freebsd.org Mon Jun 10 13:34:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 157E915BF6D4; Mon, 10 Jun 2019 13:34:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A623B731C7; Mon, 10 Jun 2019 13:34:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02BE11AF18; Mon, 10 Jun 2019 13:34:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADYI6a028641; Mon, 10 Jun 2019 13:34:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADYIud028640; Mon, 10 Jun 2019 13:34:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201906101334.x5ADYIud028640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 10 Jun 2019 13:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348854 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 348854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A623B731C7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:34:20 -0000 Author: cem Date: Mon Jun 10 13:34:18 2019 New Revision: 348854 URL: https://svnweb.freebsd.org/changeset/base/348854 Log: /etc/rc.d/local: Fix typo in description PR: 238448 Submitted by: Marián ÄŒerný Modified: head/libexec/rc/rc.d/local Modified: head/libexec/rc/rc.d/local ============================================================================== --- head/libexec/rc/rc.d/local Mon Jun 10 13:17:39 2019 (r348853) +++ head/libexec/rc/rc.d/local Mon Jun 10 13:34:18 2019 (r348854) @@ -11,7 +11,7 @@ . /etc/rc.subr name="local" -desc="Run /etc/rc.local and /etc/shutdown.local" +desc="Run /etc/rc.local and /etc/rc.shutdown.local" start_cmd="local_start" stop_cmd="local_stop" From owner-svn-src-all@freebsd.org Mon Jun 10 13:36:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4906215BF849; Mon, 10 Jun 2019 13:36:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3874733F4; Mon, 10 Jun 2019 13:36:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B78051AF1A; Mon, 10 Jun 2019 13:36:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADaCXL028777; Mon, 10 Jun 2019 13:36:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADaC5W028776; Mon, 10 Jun 2019 13:36:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101336.x5ADaC5W028776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:36: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: r348855 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 348855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3874733F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:36:13 -0000 Author: hselasky Date: Mon Jun 10 13:36:12 2019 New Revision: 348855 URL: https://svnweb.freebsd.org/changeset/base/348855 Log: MFC r348631: In usb(4) fix a lost completion event issue towards libusb(3). It may happen if a USB transfer is cancelled that we need to fake a completion event. Implement missing support in ugen_fs_copy_out() to handle this. This fixes issues with webcamd(8) and firefox. Approved by: re (gjb) Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/usb_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_generic.c ============================================================================== --- stable/11/sys/dev/usb/usb_generic.c Mon Jun 10 13:34:18 2019 (r348854) +++ stable/11/sys/dev/usb/usb_generic.c Mon Jun 10 13:36:12 2019 (r348855) @@ -1217,6 +1217,40 @@ complete: } static int +ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) +{ + struct usb_fs_endpoint fs_ep; + int error; + + error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + if (error) + return (error); + + fs_ep.status = USB_ERR_CANCELLED; + fs_ep.aFrames = 0; + fs_ep.isoc_time_complete = 0; + + /* update "aFrames" */ + error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, + sizeof(fs_ep.aFrames)); + if (error) + goto done; + + /* update "isoc_time_complete" */ + error = copyout(&fs_ep.isoc_time_complete, + &fs_ep_uptr->isoc_time_complete, + sizeof(fs_ep.isoc_time_complete)); + if (error) + goto done; + + /* update "status" */ + error = copyout(&fs_ep.status, &fs_ep_uptr->status, + sizeof(fs_ep.status)); +done: + return (error); +} + +static int ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) { struct usb_device_request *req; @@ -1241,8 +1275,13 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) return (EINVAL); mtx_lock(f->priv_mtx); - if (usbd_transfer_pending(xfer)) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); + DPRINTF("Returning fake cancel event\n"); + return (ugen_fs_copy_out_cancelled(f->fs_ep_ptr + ep_index)); + } else if (usbd_transfer_pending(xfer)) { + mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ } mtx_unlock(f->priv_mtx); @@ -1362,6 +1401,7 @@ complete: sizeof(fs_ep.isoc_time_complete)); if (error) goto done; + /* update "status" */ error = copyout(&fs_ep.status, &fs_ep_uptr->status, sizeof(fs_ep.status)); @@ -1450,12 +1490,15 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, xfer = f->fs_xfer[u.pstart->ep_index]; if (usbd_transfer_pending(xfer)) { usbd_transfer_stop(xfer); + /* * Check if the USB transfer was stopped - * before it was even started. Else a cancel - * callback will be pending. + * before it was even started and fake a + * cancel event. */ - if (!xfer->flags_int.transferring) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { + DPRINTF("Issuing fake completion event\n"); ugen_fs_set_complete(xfer->priv_sc, USB_P2U(xfer->priv_fifo)); } From owner-svn-src-all@freebsd.org Mon Jun 10 13:36:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0513115BF8D1; Mon, 10 Jun 2019 13:36:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EB2E7352A; Mon, 10 Jun 2019 13:36:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 720B71AF1B; Mon, 10 Jun 2019 13:36:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADar9m028861; Mon, 10 Jun 2019 13:36:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADarEi028860; Mon, 10 Jun 2019 13:36:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101336.x5ADarEi028860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:36:53 +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: r348856 - stable/12/sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb X-SVN-Commit-Revision: 348856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9EB2E7352A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:36:54 -0000 Author: hselasky Date: Mon Jun 10 13:36:53 2019 New Revision: 348856 URL: https://svnweb.freebsd.org/changeset/base/348856 Log: MFC r348631: In usb(4) fix a lost completion event issue towards libusb(3). It may happen if a USB transfer is cancelled that we need to fake a completion event. Implement missing support in ugen_fs_copy_out() to handle this. This fixes issues with webcamd(8) and firefox. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/usb_generic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usb_generic.c ============================================================================== --- stable/12/sys/dev/usb/usb_generic.c Mon Jun 10 13:36:12 2019 (r348855) +++ stable/12/sys/dev/usb/usb_generic.c Mon Jun 10 13:36:53 2019 (r348856) @@ -1219,6 +1219,40 @@ complete: } static int +ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) +{ + struct usb_fs_endpoint fs_ep; + int error; + + error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + if (error) + return (error); + + fs_ep.status = USB_ERR_CANCELLED; + fs_ep.aFrames = 0; + fs_ep.isoc_time_complete = 0; + + /* update "aFrames" */ + error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, + sizeof(fs_ep.aFrames)); + if (error) + goto done; + + /* update "isoc_time_complete" */ + error = copyout(&fs_ep.isoc_time_complete, + &fs_ep_uptr->isoc_time_complete, + sizeof(fs_ep.isoc_time_complete)); + if (error) + goto done; + + /* update "status" */ + error = copyout(&fs_ep.status, &fs_ep_uptr->status, + sizeof(fs_ep.status)); +done: + return (error); +} + +static int ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) { struct usb_device_request *req; @@ -1243,8 +1277,13 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) return (EINVAL); mtx_lock(f->priv_mtx); - if (usbd_transfer_pending(xfer)) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); + DPRINTF("Returning fake cancel event\n"); + return (ugen_fs_copy_out_cancelled(f->fs_ep_ptr + ep_index)); + } else if (usbd_transfer_pending(xfer)) { + mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ } mtx_unlock(f->priv_mtx); @@ -1364,6 +1403,7 @@ complete: sizeof(fs_ep.isoc_time_complete)); if (error) goto done; + /* update "status" */ error = copyout(&fs_ep.status, &fs_ep_uptr->status, sizeof(fs_ep.status)); @@ -1452,12 +1492,15 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, xfer = f->fs_xfer[u.pstart->ep_index]; if (usbd_transfer_pending(xfer)) { usbd_transfer_stop(xfer); + /* * Check if the USB transfer was stopped - * before it was even started. Else a cancel - * callback will be pending. + * before it was even started and fake a + * cancel event. */ - if (!xfer->flags_int.transferring) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { + DPRINTF("Issuing fake completion event\n"); ugen_fs_set_complete(xfer->priv_sc, USB_P2U(xfer->priv_fifo)); } From owner-svn-src-all@freebsd.org Mon Jun 10 13:37:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36A4315BF979; Mon, 10 Jun 2019 13:37:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C938D73670; Mon, 10 Jun 2019 13:37:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A51561AF1C; Mon, 10 Jun 2019 13:37:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADbcgO028952; Mon, 10 Jun 2019 13:37:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADbcmH028951; Mon, 10 Jun 2019 13:37:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101337.x5ADbcmH028951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r348857 - stable/10/sys/dev/usb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/usb X-SVN-Commit-Revision: 348857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C938D73670 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:37:39 -0000 Author: hselasky Date: Mon Jun 10 13:37:38 2019 New Revision: 348857 URL: https://svnweb.freebsd.org/changeset/base/348857 Log: MFC r348631: In usb(4) fix a lost completion event issue towards libusb(3). It may happen if a USB transfer is cancelled that we need to fake a completion event. Implement missing support in ugen_fs_copy_out() to handle this. This fixes issues with webcamd(8) and firefox. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/usb_generic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_generic.c ============================================================================== --- stable/10/sys/dev/usb/usb_generic.c Mon Jun 10 13:36:53 2019 (r348856) +++ stable/10/sys/dev/usb/usb_generic.c Mon Jun 10 13:37:38 2019 (r348857) @@ -1218,6 +1218,40 @@ complete: } static int +ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) +{ + struct usb_fs_endpoint fs_ep; + int error; + + error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + if (error) + return (error); + + fs_ep.status = USB_ERR_CANCELLED; + fs_ep.aFrames = 0; + fs_ep.isoc_time_complete = 0; + + /* update "aFrames" */ + error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, + sizeof(fs_ep.aFrames)); + if (error) + goto done; + + /* update "isoc_time_complete" */ + error = copyout(&fs_ep.isoc_time_complete, + &fs_ep_uptr->isoc_time_complete, + sizeof(fs_ep.isoc_time_complete)); + if (error) + goto done; + + /* update "status" */ + error = copyout(&fs_ep.status, &fs_ep_uptr->status, + sizeof(fs_ep.status)); +done: + return (error); +} + +static int ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) { struct usb_device_request *req; @@ -1242,8 +1276,13 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) return (EINVAL); mtx_lock(f->priv_mtx); - if (usbd_transfer_pending(xfer)) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); + DPRINTF("Returning fake cancel event\n"); + return (ugen_fs_copy_out_cancelled(f->fs_ep_ptr + ep_index)); + } else if (usbd_transfer_pending(xfer)) { + mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ } mtx_unlock(f->priv_mtx); @@ -1363,6 +1402,7 @@ complete: sizeof(fs_ep.isoc_time_complete)); if (error) goto done; + /* update "status" */ error = copyout(&fs_ep.status, &fs_ep_uptr->status, sizeof(fs_ep.status)); @@ -1451,12 +1491,15 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, xfer = f->fs_xfer[u.pstart->ep_index]; if (usbd_transfer_pending(xfer)) { usbd_transfer_stop(xfer); + /* * Check if the USB transfer was stopped - * before it was even started. Else a cancel - * callback will be pending. + * before it was even started and fake a + * cancel event. */ - if (!xfer->flags_int.transferring) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { + DPRINTF("Issuing fake completion event\n"); ugen_fs_set_complete(xfer->priv_sc, USB_P2U(xfer->priv_fifo)); } From owner-svn-src-all@freebsd.org Mon Jun 10 13:38:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BCD515BFA4F; Mon, 10 Jun 2019 13:38:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDAF7737E3; Mon, 10 Jun 2019 13:38:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B34081AF1D; Mon, 10 Jun 2019 13:38:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADcvpn029058; Mon, 10 Jun 2019 13:38:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADcvMr029057; Mon, 10 Jun 2019 13:38:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906101338.x5ADcvMr029057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 10 Jun 2019 13:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r348858 - stable/9/sys/dev/usb X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/dev/usb X-SVN-Commit-Revision: 348858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BDAF7737E3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:38:58 -0000 Author: hselasky Date: Mon Jun 10 13:38:57 2019 New Revision: 348858 URL: https://svnweb.freebsd.org/changeset/base/348858 Log: MFC r348631: In usb(4) fix a lost completion event issue towards libusb(3). It may happen if a USB transfer is cancelled that we need to fake a completion event. Implement missing support in ugen_fs_copy_out() to handle this. This fixes issues with webcamd(8) and firefox. Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/usb/usb_generic.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Mon Jun 10 13:37:38 2019 (r348857) +++ stable/9/sys/dev/usb/usb_generic.c Mon Jun 10 13:38:57 2019 (r348858) @@ -1206,6 +1206,40 @@ complete: } static int +ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) +{ + struct usb_fs_endpoint fs_ep; + int error; + + error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + if (error) + return (error); + + fs_ep.status = USB_ERR_CANCELLED; + fs_ep.aFrames = 0; + fs_ep.isoc_time_complete = 0; + + /* update "aFrames" */ + error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, + sizeof(fs_ep.aFrames)); + if (error) + goto done; + + /* update "isoc_time_complete" */ + error = copyout(&fs_ep.isoc_time_complete, + &fs_ep_uptr->isoc_time_complete, + sizeof(fs_ep.isoc_time_complete)); + if (error) + goto done; + + /* update "status" */ + error = copyout(&fs_ep.status, &fs_ep_uptr->status, + sizeof(fs_ep.status)); +done: + return (error); +} + +static int ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) { struct usb_device_request *req; @@ -1230,8 +1264,13 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) return (EINVAL); mtx_lock(f->priv_mtx); - if (usbd_transfer_pending(xfer)) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); + DPRINTF("Returning fake cancel event\n"); + return (ugen_fs_copy_out_cancelled(f->fs_ep_ptr + ep_index)); + } else if (usbd_transfer_pending(xfer)) { + mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ } mtx_unlock(f->priv_mtx); @@ -1351,6 +1390,7 @@ complete: sizeof(fs_ep.isoc_time_complete)); if (error) goto done; + /* update "status" */ error = copyout(&fs_ep.status, &fs_ep_uptr->status, sizeof(fs_ep.status)); @@ -1438,12 +1478,15 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, xfer = f->fs_xfer[u.pstart->ep_index]; if (usbd_transfer_pending(xfer)) { usbd_transfer_stop(xfer); + /* * Check if the USB transfer was stopped - * before it was even started. Else a cancel - * callback will be pending. + * before it was even started and fake a + * cancel event. */ - if (!xfer->flags_int.transferring) { + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { + DPRINTF("Issuing fake completion event\n"); ugen_fs_set_complete(xfer->priv_sc, USB_P2U(xfer->priv_fifo)); } From owner-svn-src-all@freebsd.org Mon Jun 10 13:43:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D33615BFD96; Mon, 10 Jun 2019 13:43:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f181.google.com (mail-it1-f181.google.com [209.85.166.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABE6C73C25; Mon, 10 Jun 2019 13:43:44 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f181.google.com with SMTP id j194so6343513ite.0; Mon, 10 Jun 2019 06:43:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=NRoExSwodYbCDn41KNgiXw4+PDVRYzZc/7pZwLqLsEk=; b=EeWQ+vmrcLBKIp67OG+nTSP2dkeaCM1wgnbO6ZRWeBgjJAf1G8yP3EurVWryvmGzLG 57SzVE+r4YGxd1ypDpEeV0gTId3sDX9wqmYYyY/Xp2PqZRl2aohKDwT9lcnxkNMYt7QY Z0FPkzQzrkLEG8DBsPR/KPm1qOzj/P7eXAf5Y/3PShzrI0qxPjW4raDiW4GxziRTTsdi 7PCVvIMJL5Trj63bsiXT2Ul9fOZBzjfUBxxlZJGMyNIioKN1C+Ru+5/1HIb6NkCdT4Kg hdTLmLD4AQjIY6TxCyIuImhMWwH/4lXchP1ocaWAha6VDvINiZEIMAR2STUB6X6T8vSu M0Zg== X-Gm-Message-State: APjAAAVTbT6kaw5aOreQsTGN9u1bA08t6KymrBUKaj5HRt/oo1czT3yC 0EvNl+MeX3u2ho6WqYgmNTyZXWnF X-Google-Smtp-Source: APXvYqyPfuhx3RKd3Cq+au5YKR7qQFxd8JtQ9dl1glZ6bHXoOq7XqL/mYbvTIbiCISkaj5SJFEDh+A== X-Received: by 2002:a05:660c:20a:: with SMTP id y10mr13667142itj.148.1560174217484; Mon, 10 Jun 2019 06:43:37 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id l136sm5251757itc.23.2019.06.10.06.43.37 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 06:43:37 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id m24so6908344ioo.2; Mon, 10 Jun 2019 06:43:37 -0700 (PDT) X-Received: by 2002:a5d:8253:: with SMTP id n19mr8887525ioo.80.1560174216837; Mon, 10 Jun 2019 06:43:36 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> In-Reply-To: <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 10 Jun 2019 06:43:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: ABE6C73C25 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:43:45 -0000 On Mon, Jun 10, 2019 at 2:10 AM T=C4=B3l Coosemans wrote= : > On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin > wrote: > > ... > > URL: https://svnweb.freebsd.org/changeset/base/348847 > > Log: > > Use C11 anonymous unions. > > > > Modified: head/sys/sys/ucred.h > ... > > Isn't this a userland header that should work with non-C11 compilers? Hi Tijl, Why would one expect userland headers to work with non-C11 (gnu89) compiler= s? Thanks, Conrad From owner-svn-src-all@freebsd.org Mon Jun 10 13:44:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FDAF15BFE4C; Mon, 10 Jun 2019 13:44:30 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A78357421D; Mon, 10 Jun 2019 13:44:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E4131B0BB; Mon, 10 Jun 2019 13:44:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ADiTxW034437; Mon, 10 Jun 2019 13:44:29 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADiTmX034436; Mon, 10 Jun 2019 13:44:29 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201906101344.x5ADiTmX034436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Mon, 10 Jun 2019 13:44: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: r348859 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 348859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A78357421D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:44:30 -0000 Author: slavash Date: Mon Jun 10 13:44:29 2019 New Revision: 348859 URL: https://svnweb.freebsd.org/changeset/base/348859 Log: MFC r348601: Fix prio vs. nonprio tagged traffic in RDMACM In current RDMACM implementation RDMACM server will not find a GID index when the request was prio-tagged and the sever is non prio-tagged and vise-versa. According to 802.1Q-2014, VLAN tagged packets with VLAN id 0 should be considered as untagged. Treat RDMACM request the same. Reviewed by: hselasky, kib Sponsored by: Mellanox Technologies Approved by: re (gjb@) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Jun 10 13:38:57 2019 (r348858) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Jun 10 13:44:29 2019 (r348859) @@ -414,18 +414,32 @@ struct find_gid_index_context { enum ib_gid_type gid_type; }; + +/* + * This function will return true only if a inspected GID index + * matches the request based on the GID type and VLAN configuration + */ static bool find_gid_index(const union ib_gid *gid, const struct ib_gid_attr *gid_attr, void *context) { + u16 vlan_diff; struct find_gid_index_context *ctx = (struct find_gid_index_context *)context; if (ctx->gid_type != gid_attr->gid_type) return false; - if (rdma_vlan_dev_vlan_id(gid_attr->ndev) != ctx->vlan_id) - return false; - return true; + + /* + * The following will verify: + * 1. VLAN ID matching for VLAN tagged requests. + * 2. prio-tagged/untagged to prio-tagged/untagged matching. + * + * This XOR is valid, since 0x0 < vlan_id < 0x0FFF. + */ + vlan_diff = rdma_vlan_dev_vlan_id(gid_attr->ndev) ^ ctx->vlan_id; + + return (vlan_diff == 0x0000 || vlan_diff == 0xFFFF); } static int get_sgid_index_from_eth(struct ib_device *device, u8 port_num, From owner-svn-src-all@freebsd.org Mon Jun 10 13:46:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBBA815BFF5E; Mon, 10 Jun 2019 13:46:37 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD59743D5; Mon, 10 Jun 2019 13:46:37 +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 633AC1B0BC; Mon, 10 Jun 2019 13:46:37 +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 x5ADkbKS034573; Mon, 10 Jun 2019 13:46:37 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ADkb7S034572; Mon, 10 Jun 2019 13:46:37 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201906101346.x5ADkb7S034572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 10 Jun 2019 13:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348860 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 348860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7AD59743D5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:46:38 -0000 Author: bz Date: Mon Jun 10 13:46:36 2019 New Revision: 348860 URL: https://svnweb.freebsd.org/changeset/base/348860 Log: allwinner mmc: move variable assignment into block "blksz is only used in one of the two blocks, so assign it inside that block rather than outside. MFC after: 2 weeks Modified: head/sys/arm/allwinner/aw_mmc.c Modified: head/sys/arm/allwinner/aw_mmc.c ============================================================================== --- head/sys/arm/allwinner/aw_mmc.c Mon Jun 10 13:44:29 2019 (r348859) +++ head/sys/arm/allwinner/aw_mmc.c Mon Jun 10 13:46:36 2019 (r348860) @@ -1104,7 +1104,6 @@ aw_mmc_request(device_t bus, device_t child, struct mm } if (cmd->data->flags & MMC_DATA_WRITE) cmdreg |= AW_MMC_CMDR_DIR_WRITE; - blksz = min(cmd->data->len, MMC_SECTOR_SIZE); #ifdef MMCCAM if (cmd->data->flags & MMC_DATA_BLOCK_SIZE) { AW_MMC_WRITE_4(sc, AW_MMC_BKSR, cmd->data->block_size); @@ -1112,6 +1111,7 @@ aw_mmc_request(device_t bus, device_t child, struct mm } else #endif { + blksz = min(cmd->data->len, MMC_SECTOR_SIZE); AW_MMC_WRITE_4(sc, AW_MMC_BKSR, blksz); AW_MMC_WRITE_4(sc, AW_MMC_BYCR, cmd->data->len); } From owner-svn-src-all@freebsd.org Mon Jun 10 13:49:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ED4F15C002B for ; Mon, 10 Jun 2019 13:49:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE2CE7456D for ; Mon, 10 Jun 2019 13:49:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id j19so10589595qtr.12 for ; Mon, 10 Jun 2019 06:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n3av1DtxzvrXw8Q/dVEMl9mzyJ4FLuqvxSrTYuXi/kw=; b=MXYhpvg8o/cZ131nb7nnD0BkSWAN1IjLpUX6c/J73LCyn7vqbnDxnGfLjrGj0wLJd/ PH3GVpJNuMZk00ukjTK0WTHb5kHH/62J6SdfYsJQQjqkNYdUymWoYoDibSSGWbSvuUR1 TEm8ONYEbHrZl7E+W4p319r9GHmTw7TfEcmeVnkAIJumjCm+ote/Zrum8WglqvfQYgPs CprVVzMAHI9TZlJEi/04KCZXP+E1KsFdd8JlwYqAcFCZIdN+obwR/GmLy9aXrdBd8UET NX7oOWBC6uPam/q1LPoPy/3SSpNqVOkDHR3aRdzm4k4L3vaVEnrt5dvlWsdLJPcZZHT8 Gy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n3av1DtxzvrXw8Q/dVEMl9mzyJ4FLuqvxSrTYuXi/kw=; b=AFWIz5mIOGcumOqODEEE/G3KH8SjOMnkAmIthhgUKUMhNCRC93S/minfphEbpLf3uq OlxkGTUh764bfdCwZy2d3GspzEkGmrOxTURHU83mG6V3PVjMTjx1uIz3r8lGEX0WL6yD iMMXqzxXCLdUZlyFkwHTY9ohpBHer6p+Pc7BMxsKjPYcXASitFZc0sBMg97WhfhA+yZp TqkMSUwSKZod7qpW6NI60AgQJDZV5hJe/1gxPAReaWD2qNd++zJzU/WS/i+d8cKk5bai ysP3OLGRZCXDwSWNu5FIgimNOPTGqhxJErkXdxQtmcf5n0vHT5BMt8G7+QbUTNsOqwco Pliw== X-Gm-Message-State: APjAAAV+9DoS7DGXNd14nh6yJ9MXuQ1wSfHHbXg9dSVjCWb931cSOhnn BGLNtWp1lj4m1+TP3/5FG5U1GCFKy7xvRmhntZv6KA== X-Google-Smtp-Source: APXvYqzweGueoFODLowkOqbCd3G32HE6+yxX+htK2+5o3SP7gVmnX8FXKcxjv8ncjZ8geW5s08nwbn+LWHONStSPghY= X-Received: by 2002:ac8:431e:: with SMTP id z30mr59662435qtm.291.1560174555070; Mon, 10 Jun 2019 06:49:15 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> In-Reply-To: From: Warner Losh Date: Mon, 10 Jun 2019 07:49:02 -0600 Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: "Conrad E. Meyer" Cc: Tijl Coosemans , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: EE2CE7456D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 13:49:16 -0000 On Mon, Jun 10, 2019, 7:44 AM Conrad Meyer wrote: > On Mon, Jun 10, 2019 at 2:10 AM T=C4=B3l Coosemans wro= te: > > On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin > > wrote: > > > ... > > > URL: https://svnweb.freebsd.org/changeset/base/348847 > > > Log: > > > Use C11 anonymous unions. > > > > > > Modified: head/sys/sys/ucred.h > > ... > > > > Isn't this a userland header that should work with non-C11 compilers? > > Hi Tijl, > > Why would one expect userland headers to work with non-C11 (gnu89) > compilers? > Because those compilers can choose non c11 variants of the language? Warner > From owner-svn-src-all@freebsd.org Mon Jun 10 14:19:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B0E15C0776; Mon, 10 Jun 2019 14:19:59 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D808A754E4; Mon, 10 Jun 2019 14:19:58 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: by mail-oi1-x242.google.com with SMTP id e189so6332250oib.11; Mon, 10 Jun 2019 07:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=7KCGBB0pnkjWRrWFLi5sXN/Z/zEoLBQ5v+E0bTvu05o=; b=bxj+FflYCcVus0PTNDuP658OGW4F1ww2vOYhsWzBrZBITlihypyD4hdWw1MvUakapU 6BLTGI3LtEXA4bJNoMi44q22NHz+gqWVW6sY+aMDzsCPk32GF430ZW4O3MoiDugmbijY 22/tateN6m0P2uLSWsYYWrfBkPtMNMCv/jSaH4d7ABsx4hKgpdoPUEvsPrwR3Ai9jJVx 1IzgcHJwaiyo2gyyTgzi+BHrgBe/fKqNn7R59k/30jgWJNLRrFEyBpBgNWMWHV/znFYc zQ3AV8h/RsUAhOqETXF5b9pMcJc14+kDsCmiGufz/ubrgbmiwUft7VnKL/6e6NXQujCX huGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7KCGBB0pnkjWRrWFLi5sXN/Z/zEoLBQ5v+E0bTvu05o=; b=Fogg+EYM80OgsyB+3+VKzzEdZ6B0DqyLVYL51qGSxi5BKL3Pby89kpYDePBmtjhmLx eO/tcU7O+iq5cIyeWGlVLH+jqAnYZfUnyfq2WNdCHP581QKjyA9dUqNBtNy8pnaUGAwM BLGH4ASaKvejWVLg2Sqkrf8Xm5el3DW4eQMSLij0U9k3oUeeuSiI4KjjpnQM6lzU9/iZ TFfdwQO3h/DiJJEzIHNTbX83m0I6Av5yVKpHczIfG82wPkauS8hZuijcyj3rBKKhY5Cw 7pKGfnZsRu37lYBGg8o92RdtLXsoSOZaxJFSfJ1N1mN0qJXECn6cnsIIbC9CsUddIxg6 aZqw== X-Gm-Message-State: APjAAAUZAYdneOYlWhzLjp4ngUQbI2V4KoL51ToBPRdYhtiINpRkdwpC xmf7V5ym/RGb8gQrJ0S31j80n8bz4Ks= X-Google-Smtp-Source: APXvYqyHuZJvPPkevy2szU9Xo9vDDy3DDzSxzesCeNtCbXhnRSF2/OQhW88lc/9CnnXKmslSFe8gKw== X-Received: by 2002:aca:ab57:: with SMTP id u84mr12441025oie.61.1560176397654; Mon, 10 Jun 2019 07:19:57 -0700 (PDT) Received: from 108-254-203-202.lightspeed.hstntx.sbcglobal.net (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id w17sm1351453oia.24.2019.06.10.07.19.56 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 07:19:57 -0700 (PDT) From: Doug Moore X-Google-Original-From: Doug Moore Subject: Re: svn commit: r348843 - head/sys/vm To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> Message-ID: Date: Mon, 10 Jun 2019 09:19:55 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: D808A754E4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:19:59 -0000 This comment appears in vm_mmap.c:      * Mapping of length 0 is only allowed for old binaries. and my intent was to say, to whoever wrote that comment, that I was not disallowing the mapping of length zero with this change.  I was only intending to affect a case in which the length was transformed to zero, and which was the problem that Peter Holm reported. Doug Moore On 6/10/19 8:00 AM, Shawn Webb wrote: > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: >> Author: dougm >> Date: Mon Jun 10 03:07:10 2019 >> New Revision: 348843 >> URL: https://svnweb.freebsd.org/changeset/base/348843 >> >> Log: >> There are times when a len==0 parameter to mmap is okay. But on a >> 32-bit machine, a len parameter just a few bytes short of 4G, rounded >> up to a page boundary and hitting zero then, is not okay. Return >> failure in that case. >> >> Reported by: pho >> Reviewed by: alc, kib (mentor) >> Tested by: pho >> Differential Revision: https://reviews.freebsd.org/D20580 >> >> Modified: >> head/sys/vm/vm_mmap.c >> >> Modified: head/sys/vm/vm_mmap.c >> ============================================================================== >> --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) >> +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) >> @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s >> >> /* Adjust size for rounding (on both ends). */ >> size += pageoff; /* low end... */ >> - size = (vm_size_t) round_page(size); /* hi end */ >> + /* Check for rounding up to zero. */ >> + if (round_page(size) < size) >> + return (EINVAL); > The mmap(2) manpage says that len==0 results in EINVAL, so the manpage > needs updating. > > I'm curious what "there are times" refers to. Can you or the original > reporter elaborate those cases? > > Thanks a lot! > From owner-svn-src-all@freebsd.org Mon Jun 10 14:27:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BBC115C09D8 for ; Mon, 10 Jun 2019 14:27:17 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04EE9759AA for ; Mon, 10 Jun 2019 14:27:17 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x841.google.com with SMTP id 33so2614379qtr.8 for ; Mon, 10 Jun 2019 07:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kVRUUM0Nz5KP6DmeStNXbEz7R8CCtid8iDOCIJ+JkUQ=; b=KcKaeRUfgHYhkLbdUTRF4k0EcefX4P2mpjo0KfaWmFwt1z3CCbI9SKKh6eozN0EPzO lgVse1mJb2/ez9ulCm89jCb9cvtsrFTKEF2RAhMI20LOqxpotaBaego0f8T4aw9eAcBm ohgyGbxn/i3hcCmyCnG0cek/SSadqmiW5jptffn3WdTI8MOifr5/uMqQQhylnF/G8YKl e5bZbbS7iuarAw9Abo1ROYEAANKqUymC4eGRhPQKWKpiyjED/UR0uAf7hNqQasM0YWH8 kgKoesV2xtT1mv3ZyCO/2rwSwrR3+KZV5WU6StEP0LhSqyDl9lOdpSzfRTx0zPiCJ5+v 9H0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kVRUUM0Nz5KP6DmeStNXbEz7R8CCtid8iDOCIJ+JkUQ=; b=dHRRFwL9AKX/ZP+VdvjfESfwfAR0G/c3tLunTMFqwd7qvLzQMktg0OnwWnMzDozkik Nkte3lJOg6ukB1j4GBOIY35FmudG/2UXycymBw0O4YPMVReqkFTu228abIhexQAiECvd rBT2F9HDHXXiKhKy103RZFrY48wzkQ7Vv3U4/AK7fe81QqIa0IRxRUH7Jbz4St/e2QoS 6fI4YRMG0g5zyBqdyEit+27QKZt674gAOdGasX68LzR3bMUxxE8zdgk522jNi9M8dReG ZG1PQCH+1gI6iL8/lGUOodoFFw8oZSG8736NbTIoWfvDkjxkHfaO2H67b+SQnFwcbMXQ jYyA== X-Gm-Message-State: APjAAAVNoKArjvfbMzaiW34u1Ez4hwnZa9ST8nvTDleEwHGSU/Rnjt2s yPIU8tWPTlHSkHoqXBfC7mUAGg== X-Google-Smtp-Source: APXvYqzJlyZKUbfvbzXUn7gtsxLddpJt9AvvI4+KmT5+gZdQ6+U6Qg7X2DsOMtxHGOB6GzZ9WJLVEw== X-Received: by 2002:ac8:96e:: with SMTP id z43mr59126687qth.55.1560176836328; Mon, 10 Jun 2019 07:27:16 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.108]) by smtp.gmail.com with ESMTPSA id p37sm6449996qtc.35.2019.06.10.07.27.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 07:27:15 -0700 (PDT) Date: Mon, 10 Jun 2019 10:27:15 -0400 From: Shawn Webb To: Doug Moore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm Message-ID: <20190610142715.be254wljfrnetuom@mutt-hbsd> References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qtmrtafjtenr6vop" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 04EE9759AA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:27:17 -0000 --qtmrtafjtenr6vop Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sounds good! I think the manpage still might still need a change to match the current behavior, or perhaps matching something similar to that vm_mmap.c comment. But that comment brings another question: what's the definition of "old binaries"? a.out? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 On Mon, Jun 10, 2019 at 09:19:55AM -0500, Doug Moore wrote: > This comment appears in vm_mmap.c: >=20 > ???? * Mapping of length 0 is only allowed for old binaries. >=20 > and my intent was to say, to whoever wrote that comment, that I was not > disallowing the mapping of length zero with this change.? I was only > intending to affect a case in which the length was transformed to zero, > and which was the problem that Peter Holm reported. >=20 > Doug Moore >=20 > On 6/10/19 8:00 AM, Shawn Webb wrote: > > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: > >> Author: dougm > >> Date: Mon Jun 10 03:07:10 2019 > >> New Revision: 348843 > >> URL: https://svnweb.freebsd.org/changeset/base/348843 > >> > >> Log: > >> There are times when a len=3D=3D0 parameter to mmap is okay. But on a > >> 32-bit machine, a len parameter just a few bytes short of 4G, rounded > >> up to a page boundary and hitting zero then, is not okay. Return > >> failure in that case. > >> =20 > >> Reported by: pho > >> Reviewed by: alc, kib (mentor) > >> Tested by: pho > >> Differential Revision: https://reviews.freebsd.org/D20580 > >> > >> Modified: > >> head/sys/vm/vm_mmap.c > >> > >> Modified: head/sys/vm/vm_mmap.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > >> +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > >> @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, siz= e_t s > >> =20 > >> /* Adjust size for rounding (on both ends). */ > >> size +=3D pageoff; /* low end... */ > >> - size =3D (vm_size_t) round_page(size); /* hi end */ > >> + /* Check for rounding up to zero. */ > >> + if (round_page(size) < size) > >> + return (EINVAL); > > The mmap(2) manpage says that len=3D=3D0 results in EINVAL, so the manp= age > > needs updating. > > > > I'm curious what "there are times" refers to. Can you or the original > > reporter elaborate those cases? > > > > Thanks a lot! > > --qtmrtafjtenr6vop Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAlz+aL4ACgkQ/y5nonf4 4fp98A//SC8qaENnvUk/upV7gKz/oMYmqXIhvHXZMJgiXymtdRZKRW7RMVQrRYmb gbtl9uNLSbLKI88LILJ/0YjXxRieT2e+UaNHkwzitco+fkeUr9LhbqVOuGxPOpWs J9ckPPtZjvVpUXAjt43LC4s2OlM0zs1mpcq/e7Xw7bYHrUO0c6dPGhgCQGvxdWD1 EYnOsNF2n7Us+rpviVTeQVWyESXEkRGhNLKu9/OwVFiUUHGM6vvL5K7A8OEpaU62 8uabKumD3ZnrTJspAXWOBF31EzzzP41wR+yWekdlvdkS5gutBj0XNQ/XBhLQmIBe JCtjKRLHdXAWqfF3kGQs8xCYjlSiF677dDVSrC29lTO98oXcC0Q5HWPkuOxqPQCR ySjfst/6L+R/CnTwFlQpHfaMY5oPJ/qqlDhzvtKmAa/jnoe1Qszc6mRU8hRXmqdn rC4Bk9PnUjxpAu172zJNNP0T6pBi+3bZSbjU6GhPGnifxOy8RV7EEp8ktJ79WJZA cb+SCPGDTjnBElI/kYK54sJy0/t2radwsc/7DxOJiuE7fO/Pu9MkiwoKWFjs4OZw VVZgoFOxXEvb8nWkddEyBGWhYPjU4TgWMv9MBCKHlA+5fNQcXtBroYpg/AcxAUCA I0ZYpeMrqb9fC3XLPtkZMFFUqbQYT6tpT4PQX6KYWYHWTsDoS8g= =Tqvi -----END PGP SIGNATURE----- --qtmrtafjtenr6vop-- From owner-svn-src-all@freebsd.org Mon Jun 10 14:31:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91B8D15C0C09; Mon, 10 Jun 2019 14:31:19 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35B7975D1B; Mon, 10 Jun 2019 14:31:19 +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 0F5B61B7FA; Mon, 10 Jun 2019 14:31:19 +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 x5AEVIL9057401; Mon, 10 Jun 2019 14:31:18 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AEVIre057400; Mon, 10 Jun 2019 14:31:18 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201906101431.x5AEVIre057400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 10 Jun 2019 14:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348861 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 348861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35B7975D1B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:31:19 -0000 Author: bz Date: Mon Jun 10 14:31:18 2019 New Revision: 348861 URL: https://svnweb.freebsd.org/changeset/base/348861 Log: Enhance the comment ieee80211_add_channel() to avoid a misunderstanding that the function does not work additive when repeatedly called for diffferent bands. Reviewed by: avos (a few months ago) MFC after: 2 weeks Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon Jun 10 13:46:36 2019 (r348860) +++ head/sys/net80211/ieee80211.c Mon Jun 10 14:31:18 2019 (r348861) @@ -1386,6 +1386,8 @@ 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. */ /* XXX VHT */ int From owner-svn-src-all@freebsd.org Mon Jun 10 14:35:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F4E15C0CE4; Mon, 10 Jun 2019 14:35:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA4375F88; Mon, 10 Jun 2019 14:35:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC8101B961; Mon, 10 Jun 2019 14:35:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AEZ4uH060697; Mon, 10 Jun 2019 14:35:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AEZ4YH060696; Mon, 10 Jun 2019 14:35:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201906101435.x5AEZ4YH060696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Jun 2019 14:35: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: r348862 - stable/12/sbin/bectl X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/sbin/bectl X-SVN-Commit-Revision: 348862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0AA4375F88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:35:05 -0000 Author: kevans Date: Mon Jun 10 14:35:04 2019 New Revision: 348862 URL: https://svnweb.freebsd.org/changeset/base/348862 Log: MFC r348510: bectl(8): Don't accept jid=0 from jail_getid This will trivially exist, but we don't want it - none of our jailed BEs will have jid=0. Modified: stable/12/sbin/bectl/bectl_jail.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/bectl/bectl_jail.c ============================================================================== --- stable/12/sbin/bectl/bectl_jail.c Mon Jun 10 14:31:18 2019 (r348861) +++ stable/12/sbin/bectl/bectl_jail.c Mon Jun 10 14:35:04 2019 (r348862) @@ -410,7 +410,12 @@ bectl_locate_jail(const char *ident) /* Try the easy-match first */ jid = jail_getid(ident); - if (jid != -1) + /* + * jail_getid(0) will always return 0, because this prison does exist. + * bectl(8) knows that this is not what it wants, so we should fall + * back to mount point search. + */ + if (jid > 0) return (jid); /* Attempt to try it as a BE name, first */ From owner-svn-src-all@freebsd.org Mon Jun 10 14:42:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35F0115C137C; Mon, 10 Jun 2019 14:42:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE44C76692; Mon, 10 Jun 2019 14:42:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f195.google.com with SMTP id m3so13659512itl.1; Mon, 10 Jun 2019 07:42:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=T14frFXjUO8K7L1Jz+ryXYmE3UUCTu8tT9R+uE2TO3I=; b=hdUP+SrvOl1Z0z48IU31+y10KJdl7MJ0VRruV5G68ye3JdEPgBoE3Ek3WoLC4Jq6ff FCNakwLMJLVUNwJwW5cmUhyGggb44PENq24x3P47LxSz4TK8ijnrl76Iss8Jtq1zsxwP 1++NN89aMndzz11eRt7+tmq2lMAlP8ZK7/hdRRwLppX+nYyPqDfnxf9khpKlekksVJUl fIbulHD9FUrny25Pz8VLjxb3uLYNOd2d9CR2Gj1mITHPPn7y/7JMhzeaaJ/ztQeT9FYh 7ryC25peGPMTUuMrwaOZNoPwBvFfHkXFEnaBS8DSYo5RFRQU5yCfmu7r2Yj1TJDEEEWw La1A== X-Gm-Message-State: APjAAAU904wZZo+sVO+G0PYAThFj8e5As0d4ChAEFNthFbF8aKl9P8xA oSqgOBqG05EHc60bmwgNJ1SHwnpG X-Google-Smtp-Source: APXvYqyTG4F6bvYHzjcJQiOtl3+VhivZ7FpEyNwML+DLL/XVlx+jrtJH/BaJQl66fZxZtRPgcTx5Qg== X-Received: by 2002:a24:dd8f:: with SMTP id t137mr14370555itf.35.1560177749943; Mon, 10 Jun 2019 07:42:29 -0700 (PDT) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com. [209.85.166.50]) by smtp.gmail.com with ESMTPSA id g124sm4824765itg.12.2019.06.10.07.42.29 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 07:42:29 -0700 (PDT) Received: by mail-io1-f50.google.com with SMTP id k13so7064634iop.5; Mon, 10 Jun 2019 07:42:29 -0700 (PDT) X-Received: by 2002:a5d:85c3:: with SMTP id e3mr7914054ios.265.1560177749298; Mon, 10 Jun 2019 07:42:29 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 10 Jun 2019 07:42:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: AE44C76692 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:42:37 -0000 Hi Warner, That doesn't seem responsive to the question. On Mon, Jun 10, 2019 at 6:49 AM Warner Losh wrote: > > > > On Mon, Jun 10, 2019, 7:44 AM Conrad Meyer wrote: >> >> On Mon, Jun 10, 2019 at 2:10 AM T=C4=B3l Coosemans wr= ote: >> > On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin >> > wrote: >> > > ... >> > > URL: https://svnweb.freebsd.org/changeset/base/348847 >> > > Log: >> > > Use C11 anonymous unions. >> > > >> > > Modified: head/sys/sys/ucred.h >> > ... >> > >> > Isn't this a userland header that should work with non-C11 compilers? >> >> Hi Tijl, >> >> Why would one expect userland headers to work with non-C11 (gnu89) compi= lers? > > > Because those compilers can choose non c11 variants of the language? > > Warner From owner-svn-src-all@freebsd.org Mon Jun 10 14:47:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 627D515C14C9; Mon, 10 Jun 2019 14:47:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 003697688F; Mon, 10 Jun 2019 14:47:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C38081BB06; Mon, 10 Jun 2019 14:47:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AElumO066261; Mon, 10 Jun 2019 14:47:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AElub3066260; Mon, 10 Jun 2019 14:47:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201906101447.x5AElub3066260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Jun 2019 14:47:56 +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: r348863 - stable/11/sbin/bectl X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sbin/bectl X-SVN-Commit-Revision: 348863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 003697688F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:47:57 -0000 Author: kevans Date: Mon Jun 10 14:47:56 2019 New Revision: 348863 URL: https://svnweb.freebsd.org/changeset/base/348863 Log: MFC r348510: bectl(8): Don't accept jid=0 from jail_getid This will trivially exist, but we don't want it - none of our jailed BEs will have jid=0. Approved by: re (gjb) Modified: stable/11/sbin/bectl/bectl_jail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/bectl/bectl_jail.c ============================================================================== --- stable/11/sbin/bectl/bectl_jail.c Mon Jun 10 14:35:04 2019 (r348862) +++ stable/11/sbin/bectl/bectl_jail.c Mon Jun 10 14:47:56 2019 (r348863) @@ -410,7 +410,12 @@ bectl_locate_jail(const char *ident) /* Try the easy-match first */ jid = jail_getid(ident); - if (jid != -1) + /* + * jail_getid(0) will always return 0, because this prison does exist. + * bectl(8) knows that this is not what it wants, so we should fall + * back to mount point search. + */ + if (jid > 0) return (jid); /* Attempt to try it as a BE name, first */ From owner-svn-src-all@freebsd.org Mon Jun 10 14:57:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 646FB15C1757; Mon, 10 Jun 2019 14:57:59 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA0FE76D4D; Mon, 10 Jun 2019 14:57:58 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: by mail-ot1-x342.google.com with SMTP id r10so8576841otd.4; Mon, 10 Jun 2019 07:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=OV8FWWL8HIgUlN+Zo0fZow/rI+SxGtVYRxTa4qTFQ2Q=; b=Atml7IEPRY0d5EPcb2fdQ+FmT4DpkpiumLvCZgXX3zqqQIIvJyfn0/IelaoolpK2vr ZVKGSTVPGuODWlfbhvhSGfteVvdxjIeUV0ho7d2XQivvd6ZG8B1wlDy4xI+FIfWTjBhr qb4aFmc62E35edIYbOVdt+3iXOq9ODmaRXVYqxdAnaKSdK5wTdPJ26wY0ftObfoCCPG5 hnLLWnJgsEAKr3QFFZxK2SrP4veGp/oc11t6Oz1zOt8Jz39uSy2F8UodBr9uip+J7lN2 /TenLHRuvbi2KIJbNdUU2wou33sUmVNzId6fMu2niv/nX/roQ1dAyxk/UZrZt7iLbLQV jJLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=OV8FWWL8HIgUlN+Zo0fZow/rI+SxGtVYRxTa4qTFQ2Q=; b=CyLKg7o+YBLwjGhomxmUDF7mvyJ6mt9m2VnmEjhIdv3wawQxr0ZaMFeadWD2bTBfLO XKdE3XSPhgHAdmBndeSwSEw8xHVYLtqfexPXB1ynUMO89zbJJO2KN0dkDVJzDlLI6dk6 a4mQiz8ZDiWqDxDOm3XXi8N57cCGbYmQ7aSfYRgGAZhSK03f4H4P5Wsz0ghqC7WNmj6J woQ7WurpDBw7O5EuFDsSTUcJQomiHVPWT5JnrXcx753RGkEHaQbxjzwQ3zUqG+GDqIOV IJ9qaNoLDVc8DO/O1wiEddCmAwzY3b9k6+Y2mUpfiE+RzI+v40gDBZpsi3vQ2z8EP2cY 1K/Q== X-Gm-Message-State: APjAAAXYRXIWblSt14rG+8EcHKhGmIDdUGTQyCVUsjPLjhtwTbHqMhbN bKx9sGF6/ERpwyWYTb6g0aRNAU7nV+U= X-Google-Smtp-Source: APXvYqwtZAyVMim/gUZ2/zlRGJRA3CuobgjOYaNNlU8LbvLmxrZEqDChMAmSu26+rUrrAipr+iIQtw== X-Received: by 2002:a05:6830:148c:: with SMTP id s12mr1920281otq.274.1560178677827; Mon, 10 Jun 2019 07:57:57 -0700 (PDT) Received: from 108-254-203-202.lightspeed.hstntx.sbcglobal.net (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id s64sm4084029oie.40.2019.06.10.07.57.57 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 07:57:57 -0700 (PDT) Subject: Re: svn commit: r348843 - head/sys/vm To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> <20190610142715.be254wljfrnetuom@mutt-hbsd> From: Doug Moore Openpgp: preference=signencrypt Autocrypt: addr=unkadoug@gmail.com; keydata= mQENBFy53VQBCAD2UiGSouAAMcSIax5Sp9JtRSd9dYVuAmSraY7x5yOylq8yJ5IDvHZy5q3a FamaCHMpXxieiD/8yTnHIeHP4bg02oDD3ALs0hMAEz00pZlLdxeXRfDzAlMTqFF6USPjDUI8 J/WH+pciNT68bFVXFYVg+bgp4GIdi2Md8X8zQQnHY0xLyKE9FjVN1MlCk+62B6fFhMQIEvd5 RQdbGd+ljuoORD1ajljwP1waXKBfAN5RnIbAXppokgQvnwNRf1eZ7GnqSiwu0eaTHGBatPgr y2v5N19R5WxP2kiN95xdlJEwdUikAhWO1UncDxvXQoM1e68L/J85JSLLIgzuywKpBBtdABEB AAG0MERvdWcgTW9vcmUgKHd3dy5mcmVlYnNkLm9yZykgPGRvdWdtQGZyZWVic2Qub3JnPokB UgQTAQoAPBYhBHleNTGSVgOuQpfeg+iPIVPTudVuBQJcyljBAhsDBQkFo5qAAwsJCAUVCgkI CwUWAwIBAAIeAQIXgAAKCRDojyFT07nVbs4lB/49oHwi3YR7SQr43+59tBudmf3WdQ1SRi3G vJDufsrtsB7E9bIFXwFGvVDOMn/cfhNlzors3aM6UQr1N3TPqMAK4TaS12qGL3EvFQ0eVAF1 J+vhQCIjZtgFaCIjoPeQVbi2tVsHaCttBRJeHRIPruWlxngSGZ7eMfjlOY9Oupi809QjFO/3 7FHv+/Bw9HvzlUciY3wH6vLe4zE3Bhqz4lrQAAKey4XPwKwUgs7QK0qhHrlxy+mD0r8LYvwE +Y7WVu5bbDPbyWYZeI8rnCCKnoJ7VFxQd2/g3Jxc1alDg5LoHCssP7z8g9OG8GBXk1T5dRrA Vxlc8Rs3gSxg6b3+lt+CuQENBFy53VQBCADbHDoIQCMsyFFaNjzqZbrd8ntaMwpQ6hBL7Rnb LJSHa8jehZYyAdtWWbbttyVf66J3EAF6HyBXExw9fryuLU+yZfANI0D3cmmb51jCG6Bu8Nnk QTOf3N7cw1sYQSHH2PQlhWYc55Jbu/aJrwfVnEchLdbN8p2y4WXRLfhK32iOaQzMM2xHNk28 sXnAV5DRxQjvXY7IG7cT5Pfr2uAhXqPDDCZsMj9ghZ3aQyvr7q7jS1uzvSPsimOW4Hf9fJqi VxF2kMRH1hQNe1I4v79SaFtDXRSuYivEPV6epifWATwY66/U/jO55TqqDyFz/Bg+2CCpHyyZ GM9A+f86VxLEGc7hABEBAAGJATwEGAEIACYWIQR5XjUxklYDrkKX3oPojyFT07nVbgUCXLnd VAIbDAUJBaOagAAKCRDojyFT07nVbkhiB/0SVq6YcYwrz1j1lBUk7DCUPVALoNSiW4iNia52 7pWQdHGtsTVVCiEcB65qZo0DSrMsAvtGCRSzUebIQ6omDSDnWmbveXykr3vO0+pcRqsJPQKc ATRq2XjcBjZMKOD4A2XOS2t3hAM+oY4F9htQIY9gnvK6RdTtyafJonHpeeNkMC7KEwPGS6hz FU0lrfZxXQ1ipj0QOOgZ8ZomMXbSV5f8GwYSULMPOVmB9ak0ZCOoa451h0o3Hjcnrngw7ofF JFPbmPT2zbpXOm9PqshzTA10ngIETm2x4j5iVvCHEbOJCH8UQydNKrGFa3UBzqj1OoxAggqh CFx6S9PsRfm6+86cuQENBFy6y/MBCAC+ULdDmJZVs7GFnpBdKJnSnVIbX1dkGju1jkvg+7pA 82yX+0hZvIOh0x3Py8asbfqxFleVws59mGEAe5YpRyg+kn0fd14ethlIrsf0sG82b7QLyf9p xGuQBlhyHvgDgdeUGlz6kybVJ9e59ebtNYgjuEC/Glf/b55pmmkSXx5F/4l82Er7fhpiOg42 n7CLonP+AxLsR8L6AjCODedyKidSopcdH8dH6RTN9CmIYSPQq8vRiARrDLNvVQH4PQlv3s4C KqP6zSN3hMdLlLtvgd6UMdyuWKxRk0y0WhGa4bZ8oKPCo5Dr6o12OSEvx+Ue2QBQ67nVY5H6 SoCoopHHomeRABEBAAGJAtIEGAEKACYWIQR5XjUxklYDrkKX3oPojyFT07nVbgUCXLrL8wIb AgUJBaOagAGgCRDojyFT07nVbsDUIAQZAQoAfRYhBH6QdtAAogUD++RrUKO0e1Y/oUusBQJc usvzXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9wZW5wZ3AuZmlmdGhob3JzZW1h bi5uZXQ3RTkwNzZEMDAwQTIwNTAzRkJFNDZCNTBBM0I0N0I1NjNGQTE0QkFDAAoJEKO0e1Y/ oUusp/AH/0kmG5bylgh6Crg307jXoCQgZvtThaB9LGmf57ypUvnfrwt1n0Ex7cKcQnvSA+12 809K12QmR5D61AdU8HBaQdoLFj0rDi34raxgAY554+YiGuj9XagPEKMeb+iuvqvhetC6v7K8 eXqpaWIozIpFJCmElxGMSngAj/V6nOnm6XDSyfgaOCmnjOQRqe49uU+6R67gb7UB4J+XJHgP Wla91BTqsv3NLcwXINqP+iiHtgMLmrH1j0eNhxOk9+RLNf0YbZcGZHf7eWjcJbWcB13e0gF6 mR0RcQxClm89EVv2p+CPITpXTALrIb1/EX9O4bz9OuzdZk5FrWAUNHStBE6+McJz9Qf9Hs+Z vDizuv8NOX2YZeKRdBpWSsKRL32DkPrup6vMDVL1LIft3SJXLc+oWvy82fAm0HuGMXHq47Zc bvmHUJfnSrdhjHSB35R3BwzYZ4/lINDR90WgKw+NJNErmiIP3oPzlVNtLsQmAXXjAdysFuq6 VSW0TclJVIiBjLgnKvh0XzakzxdZ5pVpgCHzKggO+53lRhEkQIgLTRU0bVb/BQkqa8iGwUhB dGd4Sgy9sykO8/1C8ApYrsT51iG7956YWG14NOBuHXoBsdynCTAVYwSR7+7f3enNKzEpUKtg ALG/tpjXzp8gsOtBSlComvjQjZHfWe9+fLy2wJ98wi8q0n3xHA== Message-ID: <65cab520-731a-3256-8a71-bb8cfcc93011@gmail.com> Date: Mon, 10 Jun 2019 09:57:56 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190610142715.be254wljfrnetuom@mutt-hbsd> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Queue-Id: BA0FE76D4D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.963,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 14:57:59 -0000 The comment and the code that rejects size=3D=3D0, or doesn't, are copied= below.=A0 Konstantin Belousov is the last person to have touched most of it, and can better explain its meaning than I. Doug Moore =A0=A0=A0 /* =A0=A0=A0 =A0* Enforce the constraints. =A0=A0=A0 =A0* Mapping of length 0 is only allowed for old binaries. =A0=A0=A0 =A0* Anonymous mapping shall specify -1 as filedescriptor and =A0=A0=A0 =A0* zero position for new code. Be nice to ancient a.out =A0=A0=A0 =A0* binaries and correct pos for anonymous mapping, since old =A0=A0=A0 =A0* ld.so sometimes issues anonymous map requests with non-zer= o =A0=A0=A0 =A0* pos. =A0=A0=A0 =A0*/ =A0=A0=A0 if (!SV_CURPROC_FLAG(SV_AOUT)) { =A0=A0=A0 =A0=A0=A0 if ((size =3D=3D 0 && curproc->p_osrel >=3D P_OSREL_M= AP_ANON) || =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 ((flags & MAP_ANON) !=3D 0 && (fd !=3D -1 |= | pos !=3D 0))) =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 return (EINVAL); =A0=A0=A0 } else { =A0=A0=A0 =A0=A0=A0 if ((flags & MAP_ANON) !=3D 0) =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 pos =3D 0; =A0=A0=A0 } On 6/10/19 9:27 AM, Shawn Webb wrote: > Sounds good! I think the manpage still might still need a change > to match the current behavior, or perhaps matching something similar > to that vm_mmap.c comment. But that comment brings another question: > what's the definition of "old binaries"? a.out? > > Thanks, > From owner-svn-src-all@freebsd.org Mon Jun 10 15:03:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4E6A15C196A for ; Mon, 10 Jun 2019 15:03:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21F8E7716B for ; Mon, 10 Jun 2019 15:03:04 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1560178978; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=TvyjMImqQr5aHkcIYsAazDeqKS+bkGZQaISPmpZEIXZdc0UfWxVu8Q6v7jqeKE2qvOEJZ2B+WiP9h 1ZB7gQu8lBA46b+RB9v3P14xhagX2qzV8XR/BO/cEV62W6ZenfhV821whAI48ooAkUvcqmHfUN7NIB qCzByfH3I60I2TjJ3QeEwduZjsj5tY7cCgcFxAcMTFiZhmLNfXJe2ZfLkGXe21ZCLDHPIL2SYx9GnM zJlo6ROT9gfzZN9P4iCp1uC8kwPjU9Q1mcJGPi+x9XqmwLHjys7imXKc6CMeQcSzF0lf7+9d4RkR2H 2NPAYKLKbWDx7YkHbaoLKgTBH05rxsA== 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=R9i3lO7JrqtAhhGre0IpWylWEL5819Ni66n+Kw4olkE=; b=UTznR7oSspH4NqoEI0KYM2TTAAE2y7p5PR8DbSPdfo99NEhIu7wOdMwmo0cju7h6/ahSMLsSw/CO7 FfQBWUK67g0KL/6cm+64g8GuMbUcn3Vczbyoa0RPTrM6DAgJuEWVVaCiIMnypDk1nQoHvhTw+8oeGl NbnHNj2TB4VoUyK+pOLn3N9Hz64jeCKLd4As9uDgZvoHXLzrc9cnOOH0taIBvz52ygxnJ4557d2y8N 5K9iEIL3dya5kbytU2sad6Dg/XSOLAoHEiYnUekpnbvImO5c8LzfliKqjlSw7BMdpMzvVE0Ktm34F3 rHAqzheRhPS4uT220G4cMEZdKXWNtEw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=R9i3lO7JrqtAhhGre0IpWylWEL5819Ni66n+Kw4olkE=; b=pHultbCdbCy2jV0InfACrhHOUlUC58oNqro/AqC8gK4kAcoavvOeaJEw31WObCtBl1+2OP1WYfmNR bEb3jas5G0l41sKySdGL0Z1vrZGqxcktaPgLQHSsvDM9ge1eHU+55zHzJbbEQrq5xs+8ULblNOgqx+ 82ttGRBjodTtyXBiA5cJO3hL9dBt3U5xSXFCVeuT6EZDJ9WCYb+vFOTyBIE7zQdKAkP4WkOlfTN2zn QG8FJwoVEpz6BeK1NWupsKdipApK6NFP5lvlrQZaMzv1WQ4gmyUYH0aAGoN/hDiRHoFVQ7vaL2YO6h fTpU0mhlUpUlArqezGoK1ZKveW8r3Sw== X-MHO-RoutePath: aGlwcGll X-MHO-User: d3b7eddc-8b90-11e9-b39a-9d2c53d3dedb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id d3b7eddc-8b90-11e9-b39a-9d2c53d3dedb; Mon, 10 Jun 2019 15:02:56 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x5AF2tSX084496; Mon, 10 Jun 2019 09:02:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys From: Ian Lepore To: Warner Losh , "Conrad E. Meyer" Cc: Tijl Coosemans , src-committers , svn-src-all , svn-src-head Date: Mon, 10 Jun 2019 09:02:55 -0600 In-Reply-To: References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 21F8E7716B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:03:06 -0000 On Mon, 2019-06-10 at 07:49 -0600, Warner Losh wrote: > On Mon, Jun 10, 2019, 7:44 AM Conrad Meyer wrote: > > > On Mon, Jun 10, 2019 at 2:10 AM Tijl Coosemans > > wrote: > > > On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin > > > wrote: > > > > ... > > > > URL: https://svnweb.freebsd.org/changeset/base/348847 > > > > Log: > > > > Use C11 anonymous unions. > > > > > > > > Modified: head/sys/sys/ucred.h > > > > > > ... > > > > > > Isn't this a userland header that should work with non-C11 > > > compilers? > > > > Hi Tijl, > > > > Why would one expect userland headers to work with non-C11 (gnu89) > > compilers? > > > > Because those compilers can choose non c11 variants of the language? > > Warner > Do we promise that userland will compile with -std=c89? I hope not. Anonymous unions may be a c11 feature, but they're also available with -std=gnu99, which I think is how we compile userland. I think -std=gnu99 is how we should also compile the kernel, and I think Bruce has been trying to say that for several years (but I'm not sure, because the emails that seem to say so are always so full of semi-related extraneous material that it's hard to be sure what they're saying). -- Ian From owner-svn-src-all@freebsd.org Mon Jun 10 15:21:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A45F15C20E9; Mon, 10 Jun 2019 15:21:18 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay118.isp.belgacom.be (mailrelay118.isp.belgacom.be [195.238.20.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CAAE77BC1; Mon, 10 Jun 2019 15:21:17 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BTAABTdP5c/1H1sVtmGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUwMBAQEBCwEBgg9ZEVIgEhQUhBWIe4l3AQGCDDUBigiOIoF?= =?us-ascii?q?7CQEBAgEBAQEBKwwBAYFLgnUCgnMkNgcOAQMBAQUBAQEBBG0cDEIBDAGEewE?= =?us-ascii?q?FIzMjEAsOCgICBSECAg9IBhODI4IOC6dJgTGEMgELAYRdgQoGgQwoAYtzgX+?= =?us-ascii?q?EIz6ERIMKglgEqScJghGGRIxyJ5cbhAqQHJElAy6BWE0wCIMnixOFQT0DMII?= =?us-ascii?q?ajgkBAQ?= X-IPAS-Result: =?us-ascii?q?A2BTAABTdP5c/1H1sVtmGgEBAQEBAgEBAQEHAgEBAQGBU?= =?us-ascii?q?wMBAQEBCwEBgg9ZEVIgEhQUhBWIe4l3AQGCDDUBigiOIoF7CQEBAgEBAQEBK?= =?us-ascii?q?wwBAYFLgnUCgnMkNgcOAQMBAQUBAQEBBG0cDEIBDAGEewEFIzMjEAsOCgICB?= =?us-ascii?q?SECAg9IBhODI4IOC6dJgTGEMgELAYRdgQoGgQwoAYtzgX+EIz6ERIMKglgEq?= =?us-ascii?q?ScJghGGRIxyJ5cbhAqQHJElAy6BWE0wCIMnixOFQT0DMIIajgkBAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 10 Jun 2019 17:20:07 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x5AFK6ot010221; Mon, 10 Jun 2019 17:20:06 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Mon, 10 Jun 2019 17:20:05 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190610172005.18bb0de4@kalimero.tijl.coosemans.org> In-Reply-To: References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 3CAAE77BC1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:21:18 -0000 On Mon, 10 Jun 2019 06:43:26 -0700 Conrad Meyer wrote: > On Mon, Jun 10, 2019 at 2:10 AM T=C4=B3l Coosemans wro= te: >> On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin >> wrote: >>> ... >>> URL: https://svnweb.freebsd.org/changeset/base/348847 >>> Log: >>> Use C11 anonymous unions. >>> >>> Modified: head/sys/sys/ucred.h >> ... >> >> Isn't this a userland header that should work with non-C11 compilers? >=20 > Why would one expect userland headers to work with non-C11 (gnu89) > compilers? I'm thinking of third party software compiled with third party compilers. The system headers need to work with various C and C++ standards. struct xucred is part of a public API documented in unix(4). From owner-svn-src-all@freebsd.org Mon Jun 10 15:33:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F56415C23F8; Mon, 10 Jun 2019 15:33:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7A780266; Mon, 10 Jun 2019 15:33:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 630293DF311; Tue, 11 Jun 2019 01:33:25 +1000 (AEST) Date: Tue, 11 Jun 2019 01:33:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Shawn Webb cc: Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm In-Reply-To: <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> Message-ID: <20190611010531.A3253@besplex.bde.org> References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=49PTKM6K3fi4FU_zURsA:9 a=XhPod9kay0wDu7nv:21 a=zmuFhErOIJZMobcm:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 0E7A780266 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:33:37 -0000 On Mon, 10 Jun 2019, Shawn Webb wrote: > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: >> ... >> Log: >> There are times when a len==0 parameter to mmap is okay. But on a >> 32-bit machine, a len parameter just a few bytes short of 4G, rounded >> up to a page boundary and hitting zero then, is not okay. Return >> failure in that case. >> ... >> /* Adjust size for rounding (on both ends). */ >> size += pageoff; /* low end... */ >> - size = (vm_size_t) round_page(size); /* hi end */ >> + /* Check for rounding up to zero. */ >> + if (round_page(size) < size) >> + return (EINVAL); > > The mmap(2) manpage says that len==0 results in EINVAL, so the manpage > needs updating. The man page doesn't say that only len == 0 results in EINVAL, so it is not incorrect. However, the errno here is incorrect. POSIX specifies that the errno is ENOMEM if MAP_FIXED was specified, and the range [addr,addr+len) exceeds that allowed for the address space of the process; or, if MAP_FIXED was not specified and there is insufficient room in the address space to effect the mapping. There are 2 other meanings for ENOMEM in POSIX.1-2001. The man page documents ENOMEM, but only has a small fraction of the above case, and no other cases. It says that the errno is ENOMEM if MAP_FIXED was specified and the addr argument was not available, or MAP_ANON was specified and insufficient memory was available. Who knows what it means for the addr argument to be no available? The other cases specified by POSIX but not the man page are: (1) under the ML extension, if the mapping could not be locked... (1a) MAP_FIXED or MAP_PRIVATE was specified and the implementation does not support this (but FreeBSD does support this, at least for most file types). (2) under the TYM extension, not enough resources in the typed memory object designated by filedes... > I'm curious what "there are times" refers to. Can you or the original > reporter elaborate those cases? When len == 0 is actually a parameter, and with other parameters specifying that len == 0 is meaningful. The code has various style bugs starting with renaming the len parameter to a size parameter for a layered function. So it is not actually the len parameter that is adjusted, but adjusting it is still a style bug since it reuses a function parameter so the original parameter is harder to describe and to debug. Bruce From owner-svn-src-all@freebsd.org Mon Jun 10 15:39:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4978E15C24B1 for ; Mon, 10 Jun 2019 15:39:17 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3E1780482 for ; Mon, 10 Jun 2019 15:39:16 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-vk1-xa32.google.com with SMTP id p24so1753063vki.5 for ; Mon, 10 Jun 2019 08:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tIo1ypD94PR8SSbexTEUrh16u4xIKaycns7OJHmcnX0=; b=BDWVHY7MMKSEZ8s8n470+e9JZ1zGeWFeUrE8l5jM0JWds10Jo+EE/Xwc7F7ZaF5XZ7 Db9FdqZTGX9x3wkfQdD/PVHg+QhHrFu7/dHuWfCh+17tzYKE9SHRbtT+ztxpN/2bJWK9 XbXaYqlqEmHytCuOU+JQpYnBdzJ1jsaWSgo+ppIEDvxlhjkOpEn+MK/WpSzi5VfI+hx5 aeL8sUfzTmUM7YVIXk8kQuLIQxNHTKn218JwbvG5FemUwaklyTu+WNQ2fRuMk7wuvSqS arBC5ZiSbieSr5JYUziAkH5DuIPp0gnLQk9z78bjb+PDBRLN0fgPVSVXMK/W4fMIx6sc yxAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tIo1ypD94PR8SSbexTEUrh16u4xIKaycns7OJHmcnX0=; b=TRbootAj4R2tZ/O36vjaftP7CGd1uHwBPOTewPzolE59mcAQG65AcJBLV6tWaoUBw9 NbD1okHuqDOcOYeI9PmAWxg/voryxISKntkO46mzW1HEipl2tMiU4NfoR5jE1TUMhSyW pufmlI6gRqozHcvtFmlU3CcBrxawEiy3ptwBOa4qoi2rruJp2qS2RZ7tZ8G/rU75XxND Kb6CKfJCqaTAd7xX3wKAvcH9D4cH/AjUCt2CZ/EdBo/QK+3FueZIYJoCZXZOH+K1MDxO AxFGd2scXNTXL1XeUtMtMlwbcW6e91KQZE0Nc+T4tcL0fdsHcfi5Ny+BrPXmkuSAZ8dk QjRg== X-Gm-Message-State: APjAAAWGBIj+GwOQRblSYgTUs6tyxAhJYw4W/36/WyomudCS30unWreb 0SJ0V90NGXgqPMIxmVT6/CkYeg== X-Google-Smtp-Source: APXvYqzV0e6T0rs2m+MRUpdDoDvQEgMELLCDAbEB1OLJYYp6qcptR/b/IAcWJlL79BFju+yMVVfNpw== X-Received: by 2002:a1f:2dcf:: with SMTP id t198mr9913263vkt.27.1560181155738; Mon, 10 Jun 2019 08:39:15 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.108]) by smtp.gmail.com with ESMTPSA id v185sm2858615vkf.51.2019.06.10.08.39.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 08:39:14 -0700 (PDT) Date: Mon, 10 Jun 2019 11:39:14 -0400 From: Shawn Webb To: Bruce Evans Cc: Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm Message-ID: <20190610153914.o2n5yjgfu3ubzbbt@mutt-hbsd> References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> <20190611010531.A3253@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lbusykrf4wkrwufc" Content-Disposition: inline In-Reply-To: <20190611010531.A3253@besplex.bde.org> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: A3E1780482 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:39:17 -0000 --lbusykrf4wkrwufc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 11, 2019 at 01:33:23AM +1000, Bruce Evans wrote: > On Mon, 10 Jun 2019, Shawn Webb wrote: >=20 > > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: > > > ... > > > Log: > > > There are times when a len=3D=3D0 parameter to mmap is okay. But on= a > > > 32-bit machine, a len parameter just a few bytes short of 4G, round= ed > > > up to a page boundary and hitting zero then, is not okay. Return > > > failure in that case. > > > ... > > > /* Adjust size for rounding (on both ends). */ > > > size +=3D pageoff; /* low end... */ > > > - size =3D (vm_size_t) round_page(size); /* hi end */ > > > + /* Check for rounding up to zero. */ > > > + if (round_page(size) < size) > > > + return (EINVAL); > >=20 > > The mmap(2) manpage says that len=3D=3D0 results in EINVAL, so the manp= age > > needs updating. >=20 > The man page doesn't say that only len =3D=3D 0 results in EINVAL, so it = is > not incorrect. https://github.com/freebsd/freebsd/blob/master/lib/libc/sys/mmap.2#L451-L455 Tons of error conditions listed, one of which is len=3D=3D0. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 --lbusykrf4wkrwufc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAlz+eZ0ACgkQ/y5nonf4 4foGeg//ZvKETORITTUsmr6yvKYO8iaX5VhaH+XVcfGBdNtOUzrTSV7SkkSQHhAc 5GwH9QEjjWC2+auZjzMuaDMhXGsvAmCcEleHjUmrEDJOeshobVAUkAv8knAyCsRR NtBF55dBnI+xceCXZ3X24OUdDPlyod29cDHdcE/oQhogYspegk/IGHJfqNARH7qj 8NlOa0ZvjkpaKxn7PAXecZDqt9Yi6A8bh1pOxdJ1IloVx3KeI7Bb9LaLueS8Vmmj YPh5FYiLyJ53BReYySZyvYdpSor7GwijVFILND3JT4t4tiD3VuAtxLh1WBgrf4mp rWOPNgNH8Phz1/HnGoGE9fv3SArGqmLW/FRQZXH4T4FhHhyztqjok6yT/5DDNLbf WPYtfAGVf/+01HrYn0Zjr+uqSkJHjpQnTJDqih/hRx91YI0rukmmvJ+ab9+51zJV 3fmdBS3mmKP+5IM98dZGsFRuF0T1SyDAkFDJ+qojd3VZscTVCNcIFdIvNyeg4f+0 e1I0CzZJNpGxyX4wVO7Wp76A8Ju7vmBpxYfWk9ZKb6dZbYtOal/im1mqM0ljn7Oe kfNjI07ZJLxbQ3brtB8Gew30j9GWSl54+ZVoM4xLeu6Sr9l8v51dr0XtzYHcYgO8 /pvfAOm31nY+yEGBeUiFchrMTWhFIXvLgMQxq5l1u90kHfCzWso= =yRer -----END PGP SIGNATURE----- --lbusykrf4wkrwufc-- From owner-svn-src-all@freebsd.org Mon Jun 10 15:44:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB91115C26BC; Mon, 10 Jun 2019 15:44:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA2A80885; Mon, 10 Jun 2019 15:44:10 +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 4354E1C4FE; Mon, 10 Jun 2019 15:44:10 +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 x5AFiAEs097350; Mon, 10 Jun 2019 15:44:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AFiA28097349; Mon, 10 Jun 2019 15:44:10 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906101544.x5AFiA28097349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 10 Jun 2019 15:44:10 +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: r348864 - stable/12/share/examples/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/share/examples/bhyve X-SVN-Commit-Revision: 348864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EA2A80885 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:44:11 -0000 Author: markj Date: Mon Jun 10 15:44:09 2019 New Revision: 348864 URL: https://svnweb.freebsd.org/changeset/base/348864 Log: MFC r348782: vmrun: Add a missing close-paren to the usage message. Modified: stable/12/share/examples/bhyve/vmrun.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/12/share/examples/bhyve/vmrun.sh Mon Jun 10 14:47:56 2019 (r348863) +++ stable/12/share/examples/bhyve/vmrun.sh Mon Jun 10 15:44:09 2019 (r348864) @@ -75,7 +75,7 @@ usage() { echo " -E: Use UEFI mode" echo " -f: Use a specific UEFI firmware" echo " -F: Use a custom UEFI GOP framebuffer size" \ - "(default: ${DEFAULT_VNCSIZE}" + "(default: ${DEFAULT_VNCSIZE})" echo " -g: listen for connection from kgdb at " echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" From owner-svn-src-all@freebsd.org Mon Jun 10 15:46:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C78B15C2779; Mon, 10 Jun 2019 15:46:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED00180AAE; Mon, 10 Jun 2019 15:46:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B897F1C500; Mon, 10 Jun 2019 15:46:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AFkJds097625; Mon, 10 Jun 2019 15:46:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AFkJDH097624; Mon, 10 Jun 2019 15:46:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201906101546.x5AFkJDH097624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Jun 2019 15:46:19 +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: r348865 - in stable/12/stand: common i386/zfsboot X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/stand: common i386/zfsboot X-SVN-Commit-Revision: 348865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED00180AAE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:46:20 -0000 Author: kevans Date: Mon Jun 10 15:46:19 2019 New Revision: 348865 URL: https://svnweb.freebsd.org/changeset/base/348865 Log: MFC r348569: [zfsboot] Fix boot env back compat (#190) * Fix boot env back compat zfsboot must try zfsloader before loader in order to remain compatible with boot environments created prior to zfs functionality being rolled into loader proper. * Improve comments in zfsboot Explain the significance of the load path order, and put the comment about looping through the paths in the appropriate scope. Modified: stable/12/stand/common/paths.h stable/12/stand/i386/zfsboot/zfsboot.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/common/paths.h ============================================================================== --- stable/12/stand/common/paths.h Mon Jun 10 15:44:09 2019 (r348864) +++ stable/12/stand/common/paths.h Mon Jun 10 15:46:19 2019 (r348865) @@ -33,6 +33,7 @@ #define PATH_CONFIG "/boot/config" #define PATH_LOADER "/boot/loader" #define PATH_LOADER_EFI "/boot/loader.efi" +#define PATH_LOADER_ZFS "/boot/zfsloader" #define PATH_KERNEL "/boot/kernel/kernel" #endif /* _PATHS_H_ */ Modified: stable/12/stand/i386/zfsboot/zfsboot.c ============================================================================== --- stable/12/stand/i386/zfsboot/zfsboot.c Mon Jun 10 15:44:09 2019 (r348864) +++ stable/12/stand/i386/zfsboot/zfsboot.c Mon Jun 10 15:46:19 2019 (r348865) @@ -87,6 +87,24 @@ static const unsigned char flags[NOPT] = { }; uint32_t opts; +/* + * Paths to try loading before falling back to the boot2 prompt. + * + * /boot/zfsloader must be tried before /boot/loader in order to remain + * backward compatible with ZFS boot environments where /boot/loader exists + * but does not have ZFS support, which was the case before FreeBSD 12. + * + * If no loader is found, try to load a kernel directly instead. + */ +static const struct string { + const char *p; + size_t len; +} loadpath[] = { + { PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS) }, + { PATH_LOADER, sizeof(PATH_LOADER) }, + { PATH_KERNEL, sizeof(PATH_KERNEL) }, +}; + static const unsigned char dev_maj[NDEV] = {30, 4, 2}; static char cmd[512]; @@ -838,16 +856,17 @@ main(void) if (nextboot && !autoboot) reboot(); - /* - * Try to exec /boot/loader. If interrupted by a keypress, - * or in case of failure, try to load a kernel directly instead. - */ - if (autoboot && !*kname) { - memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER)); - if (!keyhit(3)) { + /* + * Iterate through the list of loader and kernel paths, trying to load. + * If interrupted by a keypress, or in case of failure, drop the user + * to the boot2 prompt. + */ + for (i = 0; i < nitems(loadpath); i++) { + memcpy(kname, loadpath[i].p, loadpath[i].len); + if (keyhit(3)) + break; load(); - memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); } } From owner-svn-src-all@freebsd.org Mon Jun 10 15:55:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 110D715C2DFD; Mon, 10 Jun 2019 15:55:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7B548123A; Mon, 10 Jun 2019 15:55:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 673D71C6A4; Mon, 10 Jun 2019 15:55:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AFtdkE003426; Mon, 10 Jun 2019 15:55:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AFtdFi003425; Mon, 10 Jun 2019 15:55:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201906101555.x5AFtdFi003425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Jun 2019 15:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r348866 - in stable/11/stand: common i386/zfsboot X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/stand: common i386/zfsboot X-SVN-Commit-Revision: 348866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7B548123A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 15:55:40 -0000 Author: kevans Date: Mon Jun 10 15:55:38 2019 New Revision: 348866 URL: https://svnweb.freebsd.org/changeset/base/348866 Log: MFC r348569: [zfsboot] Fix boot env back compat (#190) * Fix boot env back compat zfsboot must try zfsloader before loader in order to remain compatible with boot environments created prior to zfs functionality being rolled into loader proper. * Improve comments in zfsboot Explain the significance of the load path order, and put the comment about looping through the paths in the appropriate scope. Approved by: re (gjb) Modified: stable/11/stand/common/paths.h stable/11/stand/i386/zfsboot/zfsboot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/common/paths.h ============================================================================== --- stable/11/stand/common/paths.h Mon Jun 10 15:46:19 2019 (r348865) +++ stable/11/stand/common/paths.h Mon Jun 10 15:55:38 2019 (r348866) @@ -33,6 +33,7 @@ #define PATH_CONFIG "/boot/config" #define PATH_LOADER "/boot/loader" #define PATH_LOADER_EFI "/boot/loader.efi" +#define PATH_LOADER_ZFS "/boot/zfsloader" #define PATH_KERNEL "/boot/kernel/kernel" #endif /* _PATHS_H_ */ Modified: stable/11/stand/i386/zfsboot/zfsboot.c ============================================================================== --- stable/11/stand/i386/zfsboot/zfsboot.c Mon Jun 10 15:46:19 2019 (r348865) +++ stable/11/stand/i386/zfsboot/zfsboot.c Mon Jun 10 15:55:38 2019 (r348866) @@ -87,6 +87,24 @@ static const unsigned char flags[NOPT] = { }; uint32_t opts; +/* + * Paths to try loading before falling back to the boot2 prompt. + * + * /boot/zfsloader must be tried before /boot/loader in order to remain + * backward compatible with ZFS boot environments where /boot/loader exists + * but does not have ZFS support, which was the case before FreeBSD 12. + * + * If no loader is found, try to load a kernel directly instead. + */ +static const struct string { + const char *p; + size_t len; +} loadpath[] = { + { PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS) }, + { PATH_LOADER, sizeof(PATH_LOADER) }, + { PATH_KERNEL, sizeof(PATH_KERNEL) }, +}; + static const unsigned char dev_maj[NDEV] = {30, 4, 2}; static char cmd[512]; @@ -838,16 +856,17 @@ main(void) if (nextboot && !autoboot) reboot(); - /* - * Try to exec /boot/loader. If interrupted by a keypress, - * or in case of failure, try to load a kernel directly instead. - */ - if (autoboot && !*kname) { - memcpy(kname, PATH_LOADER, sizeof(PATH_LOADER)); - if (!keyhit(3)) { + /* + * Iterate through the list of loader and kernel paths, trying to load. + * If interrupted by a keypress, or in case of failure, drop the user + * to the boot2 prompt. + */ + for (i = 0; i < nitems(loadpath); i++) { + memcpy(kname, loadpath[i].p, loadpath[i].len); + if (keyhit(3)) + break; load(); - memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); } } From owner-svn-src-all@freebsd.org Mon Jun 10 16:17:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EE0115C3380; Mon, 10 Jun 2019 16:17:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 73B0581EE1; Mon, 10 Jun 2019 16:17:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 5D1102ADE14; Tue, 11 Jun 2019 02:16:53 +1000 (AEST) Date: Tue, 11 Jun 2019 02:16:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: Warner Losh , "Conrad E. Meyer" , Tijl Coosemans , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348847 - head/sys/sys In-Reply-To: Message-ID: <20190611013853.E3415@besplex.bde.org> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6I5d2MoRAAAA:8 a=8f2riifyOPmppVszzmMA:9 a=45ClL6m2LaAA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 73B0581EE1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 16:17:04 -0000 On Mon, 10 Jun 2019, Ian Lepore wrote: > On Mon, 2019-06-10 at 07:49 -0600, Warner Losh wrote: >> On Mon, Jun 10, 2019, 7:44 AM Conrad Meyer wrote: >> >>> On Mon, Jun 10, 2019 at 2:10 AM T=C4=B3l Coosemans >>> wrote: >>>> On Mon, 10 Jun 2019 05:28:04 +0000 (UTC) Dmitry Chagin >>>> wrote: >>>>> ... >>>>> URL: https://svnweb.freebsd.org/changeset/base/348847 >>>>> Log: >>>>> Use C11 anonymous unions. >>>>> >>>>> Modified: head/sys/sys/ucred.h >>>> >>>> ... >>>> >>>> Isn't this a userland header that should work with non-C11 >>>> compilers? >>> ... >>> Why would one expect userland headers to work with non-C11 (gnu89) >>> compilers? >> ... >> Because those compilers can choose non c11 variants of the language? > > Do we promise that userland will compile with -std=3Dc89? I hope not. Only headers and libraries should support -std=3Dc89. has lots of support for compilers and POSIX versions going back to K&R C, and only the K&R parts are completely broken. FreeBSD also has the c89 and c99 utilities. These require c89 and c99 headers to work under FreeBSD. c89 uses CFLAGS -std=3Diso9899:199409 -pedantic. I don't see how a 1994 standard can be correct for c89, but -pedantic here might avoid the bug that -std=3Dcxx doesn't actually gives standard cxx, especially for clang. c99 uses -std=3Diso9899:1999 -pedantic. So anonymous unions are correctly disallowed by both c89 and c99. At least the following headers still compile with c89: sys/types.h, stdio.h, stdlib.h, the old version of sys/ucred.h. > Anonymous unions may be a c11 feature, but they're also available with > -std=3Dgnu99, which I think is how we compile userland. That is only the default, only for for parts of userland controlled by us. Non-FreeBSD makefiles get at most the POSIX CFLAGS (something like -O) from sys.mk if they use FreeBSD make, and something similar using gmake. > I think -std=3Dgnu99 is how we should also compile the kernel, and I > think Bruce has been trying to say that for several years (but I'm not > sure, because the emails that seem to say so are always so full of > semi-related extraneous material that it's hard to be sure what they're > saying). -std can be forced for kernel builds and other pure FreeBSD builds, but then it should be the correct one. bsd.sys.mk only directly supports the user selecting the following standard= s: - c89 or c90 - c94 or c95 (the c89 utility gives -std=3Dc94, not -std=3Dc89) - c99 - gnu99 (default) Newer and more useful old standards like gnu89 are hard to select. The user must set the undocumented variable CSTD even to change the default to c89/90/94/95. Adding -std=3Dwhatever to CFLAGS only works if it happens to be added after -std=3D${CSTD}. Bruce From owner-svn-src-all@freebsd.org Mon Jun 10 16:36:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EACD15C3AE5; Mon, 10 Jun 2019 16:36:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0232282C86; Mon, 10 Jun 2019 16:36:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8D961CD58; Mon, 10 Jun 2019 16:36:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AGaVoR024720; Mon, 10 Jun 2019 16:36:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AGaVJx024719; Mon, 10 Jun 2019 16:36:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201906101636.x5AGaVJx024719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 10 Jun 2019 16:36:31 +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: r348867 - stable/11/sys/cddl/boot/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/cddl/boot/zfs X-SVN-Commit-Revision: 348867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0232282C86 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 16:36:32 -0000 Author: kevans Date: Mon Jun 10 16:36:31 2019 New Revision: 348867 URL: https://svnweb.freebsd.org/changeset/base/348867 Log: MFC r342747 (mmacy): zfsboot: support newer ZFS versions declare v3 objset size/layout to fix userboot and possibly other loader issues - fix for userboot assertion failure in zfs_dev_close in free due to out of bounds write - fix for zfs_alloc / zfs_free mismatch assertion failure when booting GPT on BIOS Approved by: re (gjb) Modified: stable/11/sys/cddl/boot/zfs/zfsimpl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/11/sys/cddl/boot/zfs/zfsimpl.h Mon Jun 10 15:55:38 2019 (r348866) +++ stable/11/sys/cddl/boot/zfs/zfsimpl.h Mon Jun 10 16:36:31 2019 (r348867) @@ -1121,6 +1121,8 @@ typedef struct sa_hdr_phys { #define SA_PARENT_OFFSET 40 #define SA_SYMLINK_OFFSET 160 +#define ZIO_OBJSET_MAC_LEN 32 + /* * Intent log header - this on disk structure holds fields to manage * the log. All fields are 64 bit to easily handle cross architectures. @@ -1133,17 +1135,24 @@ typedef struct zil_header { uint64_t zh_pad[5]; } zil_header_t; -#define OBJSET_PHYS_SIZE 2048 +#define OBJSET_PHYS_SIZE_V2 2048 +#define OBJSET_PHYS_SIZE_V3 4096 typedef struct objset_phys { dnode_phys_t os_meta_dnode; zil_header_t os_zil_header; uint64_t os_type; uint64_t os_flags; - char os_pad[OBJSET_PHYS_SIZE - sizeof (dnode_phys_t)*3 - - sizeof (zil_header_t) - sizeof (uint64_t)*2]; + uint8_t os_portable_mac[ZIO_OBJSET_MAC_LEN]; + uint8_t os_local_mac[ZIO_OBJSET_MAC_LEN]; + char os_pad0[OBJSET_PHYS_SIZE_V2 - sizeof (dnode_phys_t)*3 - + sizeof (zil_header_t) - sizeof (uint64_t)*2 - + 2*ZIO_OBJSET_MAC_LEN]; dnode_phys_t os_userused_dnode; dnode_phys_t os_groupused_dnode; + dnode_phys_t os_projectused_dnode; + char os_pad1[OBJSET_PHYS_SIZE_V3 - OBJSET_PHYS_SIZE_V2 - + sizeof (dnode_phys_t)]; } objset_phys_t; typedef struct dsl_dir_phys { From owner-svn-src-all@freebsd.org Mon Jun 10 16:51:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 047E315C4189; Mon, 10 Jun 2019 16:51:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com [209.85.166.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9175C83B94; Mon, 10 Jun 2019 16:51:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f169.google.com with SMTP id m3so128092itl.1; Mon, 10 Jun 2019 09:51:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Eu04DSogOqzagCsYJLwY4WcWqS8Pq2SPDwU0n9qEVE0=; b=DIcuyqkeSGVgvbGWYOmwHMG3gGpIu1RfMP3WT7Nryl73ZK7QHOjkhhRNHPCfKCw1KC TIS1NNWvgWmrxZ/sAk7qoabZFD3Ykk4BU6aJFKcQ2sOV/a544dUVoggP5xK5cKJkEQ6p UQPw8fAkJeKKK1N3Asa/o9UJwaEco7rLdHyvXucsNKDwoSHNz2OzZt8uBTXveLzud4jE MLahl1+K9A1Syr2bEmjLnOLbfMJ4Mn2+UC+fLh6rwO2E0h6PjSbFbJHU3qls+/lkdTh7 SivKK9KQDdV5UlDobBqR9PXhrjukJUQtki5owFEzWcK4cVZZf6RAgwGaaNWH7laHUoBD QJzA== X-Gm-Message-State: APjAAAVlFG3Om7+Qyqu7NmHoAcOKNUqoYt2MoccH+XqqPyUEmZwnp7/+ DJGp4Im0wRLOes8iUpHv2rR9+YBg X-Google-Smtp-Source: APXvYqzbWqZ0k+LjgZuFZlidfxe5Ukt5OyteODYkal1Eawig9aR6eZhvC9QqvS2cuB5a+EobbZUiyg== X-Received: by 2002:a05:6638:199:: with SMTP id a25mr135500jaq.18.1560184115751; Mon, 10 Jun 2019 09:28:35 -0700 (PDT) Received: from mail-it1-f171.google.com (mail-it1-f171.google.com. [209.85.166.171]) by smtp.gmail.com with ESMTPSA id z138sm2224328itc.36.2019.06.10.09.28.35 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 09:28:35 -0700 (PDT) Received: by mail-it1-f171.google.com with SMTP id i21so14237933ita.5; Mon, 10 Jun 2019 09:28:35 -0700 (PDT) X-Received: by 2002:a24:4411:: with SMTP id o17mr13966343ita.117.1560184115377; Mon, 10 Jun 2019 09:28:35 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190611013853.E3415@besplex.bde.org> In-Reply-To: <20190611013853.E3415@besplex.bde.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 10 Jun 2019 09:28:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: Bruce Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9175C83B94 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 16:51:14 -0000 On Mon, Jun 10, 2019 at 9:17 AM Bruce Evans wrote: > Only headers and libraries should support -std=c89. has > lots of support for compilers and POSIX versions going back to K&R C, > and only the K&R parts are completely broken. Is this due to specific policy, or just inertia? (No one has bothered to remove the old bits?) The older parts being totally broken suggests sheer inertia. Best, Conrad From owner-svn-src-all@freebsd.org Mon Jun 10 17:30:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3477815C4C2C; Mon, 10 Jun 2019 17:30:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42226853B9; Mon, 10 Jun 2019 17:30:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x5AHURlr089095 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 10 Jun 2019 20:30:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x5AHURlr089095 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x5AHUR8D089094; Mon, 10 Jun 2019 20:30:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 10 Jun 2019 20:30:27 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: Bruce Evans , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190610173027.GZ75280@kib.kiev.ua> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190611013853.E3415@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:30:39 -0000 On Mon, Jun 10, 2019 at 09:28:24AM -0700, Conrad Meyer wrote: > On Mon, Jun 10, 2019 at 9:17 AM Bruce Evans wrote: > > Only headers and libraries should support -std=c89. has > > lots of support for compilers and POSIX versions going back to K&R C, > > and only the K&R parts are completely broken. > > Is this due to specific policy, or just inertia? (No one has bothered > to remove the old bits?) The older parts being totally broken > suggests sheer inertia. This is due to very important compiler, not used by FreeBSD, still only providing c99 features, for instance. So people who have to write portable C might force all compilation environment to the common standard. I personally think that c89 is not very important now, but still should not be broken without serious cause. While c99 must be fully supported. Of course, the statements are limited to user-mode visible portion of /usr/include/* and libs. From owner-svn-src-all@freebsd.org Mon Jun 10 17:36:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 036AB15C4F45; Mon, 10 Jun 2019 17:36:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3552585A78; Mon, 10 Jun 2019 17:36:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B5C21D75A; Mon, 10 Jun 2019 17:36:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AHaEGg057392; Mon, 10 Jun 2019 17:36:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AHaEPs057391; Mon, 10 Jun 2019 17:36:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906101736.x5AHaEPs057391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Jun 2019 17:36:14 +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: r348868 - stable/12/sys/dev/hwpmc X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/hwpmc X-SVN-Commit-Revision: 348868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3552585A78 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:36:16 -0000 Author: kib Date: Mon Jun 10 17:36:14 2019 New Revision: 348868 URL: https://svnweb.freebsd.org/changeset/base/348868 Log: MFC r348544: hwpmc_intel: List all Silvermont ids. Modified: stable/12/sys/dev/hwpmc/hwpmc_intel.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 10 16:36:31 2019 (r348867) +++ stable/12/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 10 17:36:14 2019 (r348868) @@ -195,7 +195,11 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_HASWELL; nclasses = 5; break; + case 0x37: + case 0x4A: case 0x4D: /* Per Intel document 330061-001 01/2014. */ + case 0x5A: + case 0x5D: cputype = PMC_CPU_INTEL_ATOM_SILVERMONT; nclasses = 3; break; From owner-svn-src-all@freebsd.org Mon Jun 10 17:38:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4910415C4FDC; Mon, 10 Jun 2019 17:38:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1FE485C27; Mon, 10 Jun 2019 17:38:47 +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 B67DC1D75B; Mon, 10 Jun 2019 17:38:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AHclqg057568; Mon, 10 Jun 2019 17:38:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AHclnL057567; Mon, 10 Jun 2019 17:38:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906101738.x5AHclnL057567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Jun 2019 17:38: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: r348869 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 348869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E1FE485C27 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:38:48 -0000 Author: kib Date: Mon Jun 10 17:38:47 2019 New Revision: 348869 URL: https://svnweb.freebsd.org/changeset/base/348869 Log: MFC r348536: Remove dead check. Modified: stable/12/sys/kern/link_elf_obj.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/link_elf_obj.c ============================================================================== --- stable/12/sys/kern/link_elf_obj.c Mon Jun 10 17:36:14 2019 (r348868) +++ stable/12/sys/kern/link_elf_obj.c Mon Jun 10 17:38:47 2019 (r348869) @@ -714,11 +714,6 @@ link_elf_load_file(linker_class_t cls, const char *fil goto out; } - if (symstrindex == -1) { - link_elf_error(filename, "lost symbol string index"); - error = ENOEXEC; - goto out; - } /* Allocate space for and load the symbol strings */ ef->ddbstrcnt = shdr[symstrindex].sh_size; ef->ddbstrtab = malloc(shdr[symstrindex].sh_size, M_LINKER, M_WAITOK); From owner-svn-src-all@freebsd.org Mon Jun 10 17:40:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A410815C5085; Mon, 10 Jun 2019 17:40:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4451D85D8E; Mon, 10 Jun 2019 17:40:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D80871D75F; Mon, 10 Jun 2019 17:40:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AHeVfG057726; Mon, 10 Jun 2019 17:40:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AHeVoa057725; Mon, 10 Jun 2019 17:40:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906101740.x5AHeVoa057725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Jun 2019 17:40:31 +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: r348870 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 348870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4451D85D8E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:40:32 -0000 Author: kib Date: Mon Jun 10 17:40:31 2019 New Revision: 348870 URL: https://svnweb.freebsd.org/changeset/base/348870 Log: MFC r348533: Remove dead store. Modified: stable/12/sys/vm/swap_pager.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/swap_pager.c ============================================================================== --- stable/12/sys/vm/swap_pager.c Mon Jun 10 17:38:47 2019 (r348869) +++ stable/12/sys/vm/swap_pager.c Mon Jun 10 17:40:31 2019 (r348870) @@ -2232,7 +2232,6 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sp->sw_vp = vp; sp->sw_id = id; sp->sw_dev = dev; - sp->sw_flags = 0; sp->sw_nblks = nblks; sp->sw_used = 0; sp->sw_strategy = strategy; From owner-svn-src-all@freebsd.org Mon Jun 10 17:43:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D95F15C52A2; Mon, 10 Jun 2019 17:43:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E80FF8615D; Mon, 10 Jun 2019 17:43:34 +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 B182C1D911; Mon, 10 Jun 2019 17:43:34 +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 x5AHhYtG062524; Mon, 10 Jun 2019 17:43:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AHhYS5062521; Mon, 10 Jun 2019 17:43:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906101743.x5AHhYS5062521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Jun 2019 17:43:34 +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: r348871 - in stable/12/sys/amd64: amd64 include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/amd64: amd64 include X-SVN-Commit-Revision: 348871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E80FF8615D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:43:35 -0000 Author: kib Date: Mon Jun 10 17:43:33 2019 New Revision: 348871 URL: https://svnweb.freebsd.org/changeset/base/348871 Log: MFC r348539: amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service. Modified: stable/12/sys/amd64/amd64/efirt_support.S stable/12/sys/amd64/amd64/genassym.c stable/12/sys/amd64/include/efi.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/efirt_support.S ============================================================================== --- stable/12/sys/amd64/amd64/efirt_support.S Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/amd64/efirt_support.S Mon Jun 10 17:43:33 2019 (r348871) @@ -47,6 +47,9 @@ ENTRY(efi_rt_arch_call) movq %r13, EC_R13(%rdi) movq %r14, EC_R14(%rdi) movq %r15, EC_R15(%rdi) + pushfq + popq %rax + movq %rax, EC_RFLAGS(%rdi) movq PCPU(CURTHREAD), %rax movq %rdi, TD_MD+MD_EFIRT_TMP(%rax) movq PCPU(CURPCB), %rsi @@ -98,6 +101,8 @@ efi_rt_arch_call_tail: movq EC_RBP(%rdi), %rbp movq EC_RSP(%rdi), %rsp movq EC_RBX(%rdi), %rbx + pushq EC_RFLAGS(%rdi) + popfq popq %rbp ret Modified: stable/12/sys/amd64/amd64/genassym.c ============================================================================== --- stable/12/sys/amd64/amd64/genassym.c Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/amd64/genassym.c Mon Jun 10 17:43:33 2019 (r348871) @@ -272,3 +272,4 @@ ASSYM(EC_R12, offsetof(struct efirt_callinfo, ec_r12)) ASSYM(EC_R13, offsetof(struct efirt_callinfo, ec_r13)); ASSYM(EC_R14, offsetof(struct efirt_callinfo, ec_r14)); ASSYM(EC_R15, offsetof(struct efirt_callinfo, ec_r15)); +ASSYM(EC_RFLAGS, offsetof(struct efirt_callinfo, ec_rflags)); Modified: stable/12/sys/amd64/include/efi.h ============================================================================== --- stable/12/sys/amd64/include/efi.h Mon Jun 10 17:40:31 2019 (r348870) +++ stable/12/sys/amd64/include/efi.h Mon Jun 10 17:43:33 2019 (r348871) @@ -72,6 +72,7 @@ struct efirt_callinfo { register_t ec_r13; register_t ec_r14; register_t ec_r15; + register_t ec_rflags; }; #endif /* __AMD64_INCLUDE_EFI_H_ */ From owner-svn-src-all@freebsd.org Mon Jun 10 17:44:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68EB515C5313; Mon, 10 Jun 2019 17:44:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0856286291; Mon, 10 Jun 2019 17:44:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2E681D912; Mon, 10 Jun 2019 17:44:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AHioLC062650; Mon, 10 Jun 2019 17:44:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AHioHY062649; Mon, 10 Jun 2019 17:44:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906101744.x5AHioHY062649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 10 Jun 2019 17:44: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: r348872 - stable/12/sys/dev/efidev X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/efidev X-SVN-Commit-Revision: 348872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0856286291 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 17:44:51 -0000 Author: kib Date: Mon Jun 10 17:44:50 2019 New Revision: 348872 URL: https://svnweb.freebsd.org/changeset/base/348872 Log: MFC r348541: efirt efi_enter(): Release acquired locks and restore FPU ownership if efi_arch_enter() returned an error. Modified: stable/12/sys/dev/efidev/efirt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/efidev/efirt.c ============================================================================== --- stable/12/sys/dev/efidev/efirt.c Mon Jun 10 17:43:33 2019 (r348871) +++ stable/12/sys/dev/efidev/efirt.c Mon Jun 10 17:44:50 2019 (r348872) @@ -247,6 +247,7 @@ efi_enter(void) { struct thread *td; pmap_t curpmap; + int error; if (efi_runtime == NULL) return (ENXIO); @@ -255,7 +256,13 @@ efi_enter(void) PMAP_LOCK(curpmap); mtx_lock(&efi_lock); fpu_kern_enter(td, NULL, FPU_KERN_NOCTX); - return (efi_arch_enter()); + error = efi_arch_enter(); + if (error != 0) { + fpu_kern_leave(td, NULL); + mtx_unlock(&efi_lock); + PMAP_UNLOCK(curpmap); + } + return (error); } static void From owner-svn-src-all@freebsd.org Mon Jun 10 18:19:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8348715C5B6A; Mon, 10 Jun 2019 18:19:50 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28DD687245; Mon, 10 Jun 2019 18:19:50 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE62B1DE11; Mon, 10 Jun 2019 18:19:49 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AIJnJi078839; Mon, 10 Jun 2019 18:19:49 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AIJnAX078838; Mon, 10 Jun 2019 18:19:49 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201906101819.x5AIJnAX078838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Mon, 10 Jun 2019 18:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348873 - head/sys/dev/atkbdc X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/sys/dev/atkbdc X-SVN-Commit-Revision: 348873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 28DD687245 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 18:19:50 -0000 Author: zeising (doc,ports committer) Date: Mon Jun 10 18:19:49 2019 New Revision: 348873 URL: https://svnweb.freebsd.org/changeset/base/348873 Log: psm(4): Enable touchpads and trackpads by default Enable synaptics and elantech touchpads, as well as IBM/Lenovo TrackPoints by default, instead of having users find and toggle a loader tunable. This makes things like two finger scroll and other modern features work out of the box with X. By enabling these settings by default, we get a better desktop experience in X, since xserver and evdev can make use of the more advanced synaptics and elantech features. Reviewed by: imp, wulf, 0mp Approved by: imp Sponsored by: B3 Init (zeising) Differential Revision: https://reviews.freebsd.org/D20507 Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Jun 10 17:44:50 2019 (r348872) +++ head/sys/dev/atkbdc/psm.c Mon Jun 10 18:19:49 2019 (r348873) @@ -513,9 +513,9 @@ static devclass_t psm_devclass; /* Tunables */ static int tap_enabled = -1; static int verbose = PSM_DEBUG; -static int synaptics_support = 0; -static int trackpoint_support = 0; -static int elantech_support = 0; +static int synaptics_support = 1; +static int trackpoint_support = 1; +static int elantech_support = 1; /* for backward compatibility */ #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) From owner-svn-src-all@freebsd.org Mon Jun 10 19:01:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58D8915C6885; Mon, 10 Jun 2019 19:01:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1FBB88A30; Mon, 10 Jun 2019 19:01:54 +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 CE5AD1E6AA; Mon, 10 Jun 2019 19:01:54 +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 x5AJ1su1002585; Mon, 10 Jun 2019 19:01:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AJ1ssW002584; Mon, 10 Jun 2019 19:01:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906101901.x5AJ1ssW002584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 10 Jun 2019 19:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348874 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1FBB88A30 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:01:55 -0000 Author: jhb Date: Mon Jun 10 19:01:54 2019 New Revision: 348874 URL: https://svnweb.freebsd.org/changeset/base/348874 Log: Remove an overly-aggressive assertion. While it is true that the new vmspace passed to vmspace_switch_aio will always have a valid reference due to the AIO job or the extra reference on the original vmspace in the worker thread, it is not true that the old vmspace being switched away from will have more than one reference. Specifically, when a process with queued AIO jobs exits, the exit hook in aio_proc_rundown will only ensure that all of the AIO jobs have completed or been cancelled. However, the last AIO job might have completed and woken up the exiting process before the worker thread servicing that job has switched back to its original vmspace. In that case, the process might finish exiting dropping its reference to the vmspace before the worker thread resulting in the worker thread dropping the last reference. Reported by: np Reviewed by: alc, markj, np, imp MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20542 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jun 10 18:19:49 2019 (r348873) +++ head/sys/vm/vm_map.c Mon Jun 10 19:01:54 2019 (r348874) @@ -454,18 +454,17 @@ vmspace_acquire_ref(struct proc *p) /* * Switch between vmspaces in an AIO kernel process. * - * The AIO kernel processes switch to and from a user process's - * vmspace while performing an I/O operation on behalf of a user - * process. The new vmspace is either the vmspace of a user process - * obtained from an active AIO request or the initial vmspace of the - * AIO kernel process (when it is idling). Because user processes - * will block to drain any active AIO requests before proceeding in - * exit() or execve(), the vmspace reference count for these vmspaces - * can never be 0. This allows for a much simpler implementation than - * the loop in vmspace_acquire_ref() above. Similarly, AIO kernel - * processes hold an extra reference on their initial vmspace for the - * life of the process so that this guarantee is true for any vmspace - * passed as 'newvm'. + * The new vmspace is either the vmspace of a user process obtained + * from an active AIO request or the initial vmspace of the AIO kernel + * process (when it is idling). Because user processes will block to + * drain any active AIO requests before proceeding in exit() or + * execve(), the reference count for vmspaces from AIO requests can + * never be 0. Similarly, AIO kernel processes hold an extra + * reference on their initial vmspace for the life of the process. As + * a result, the 'newvm' vmspace always has a non-zero reference + * count. This permits an additional reference on 'newvm' to be + * acquired via a simple atomic increment rather than the loop in + * vmspace_acquire_ref() above. */ void vmspace_switch_aio(struct vmspace *newvm) @@ -490,9 +489,6 @@ vmspace_switch_aio(struct vmspace *newvm) /* Activate the new mapping. */ pmap_activate(curthread); - /* Remove the daemon's reference to the old address space. */ - KASSERT(oldvm->vm_refcnt > 1, - ("vmspace_switch_aio: oldvm dropping last reference")); vmspace_free(oldvm); } From owner-svn-src-all@freebsd.org Mon Jun 10 19:22:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E1B15C72A0; Mon, 10 Jun 2019 19:22:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65F9289889; Mon, 10 Jun 2019 19:22:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 276FF1EA38; Mon, 10 Jun 2019 19:22:37 +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 x5AJMbcD015447; Mon, 10 Jun 2019 19:22:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AJMa3P015444; Mon, 10 Jun 2019 19:22:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906101922.x5AJMa3P015444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 10 Jun 2019 19:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348875 - head/sys/kgssapi/krb5 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kgssapi/krb5 X-SVN-Commit-Revision: 348875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65F9289889 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:22:38 -0000 Author: jhb Date: Mon Jun 10 19:22:36 2019 New Revision: 348875 URL: https://svnweb.freebsd.org/changeset/base/348875 Log: Add warnings for Kerberos GSS algorithms deprecated in RFCs 6649 and 8429. All of these algorithms are explicitly marked SHOULD NOT in one of these RFCs. Specifically, RFC 6649 deprecates all algorithms using DES as well as the "export-friendly" variant of RC4. RFC 8429 deprecates Triple DES and the remaining RC4 algorithms. Reviewed by: cem MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20343 Modified: head/sys/kgssapi/krb5/kcrypto_arcfour.c head/sys/kgssapi/krb5/kcrypto_des.c head/sys/kgssapi/krb5/kcrypto_des3.c Modified: head/sys/kgssapi/krb5/kcrypto_arcfour.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_arcfour.c Mon Jun 10 19:01:54 2019 (r348874) +++ head/sys/kgssapi/krb5/kcrypto_arcfour.c Mon Jun 10 19:22:36 2019 (r348875) @@ -46,8 +46,12 @@ __FBSDID("$FreeBSD$"); static void arcfour_init(struct krb5_key_state *ks) { + static struct timeval lastwarn; + static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; ks->ks_priv = NULL; + if (ratecheck(&lastwarn, &warninterval)) + gone_in(13, "RC4 cipher for Kerberos GSS"); } static void Modified: head/sys/kgssapi/krb5/kcrypto_des.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des.c Mon Jun 10 19:01:54 2019 (r348874) +++ head/sys/kgssapi/krb5/kcrypto_des.c Mon Jun 10 19:22:36 2019 (r348875) @@ -53,11 +53,15 @@ struct des1_state { static void des1_init(struct krb5_key_state *ks) { + static struct timeval lastwarn; + static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; struct des1_state *ds; ds = malloc(sizeof(struct des1_state), M_GSSAPI, M_WAITOK|M_ZERO); mtx_init(&ds->ds_lock, "gss des lock", NULL, MTX_DEF); ks->ks_priv = ds; + if (ratecheck(&lastwarn, &warninterval)) + gone_in(13, "DES cipher for Kerberos GSS"); } static void Modified: head/sys/kgssapi/krb5/kcrypto_des3.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des3.c Mon Jun 10 19:01:54 2019 (r348874) +++ head/sys/kgssapi/krb5/kcrypto_des3.c Mon Jun 10 19:22:36 2019 (r348875) @@ -54,11 +54,15 @@ struct des3_state { static void des3_init(struct krb5_key_state *ks) { + static struct timeval lastwarn; + static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; struct des3_state *ds; ds = malloc(sizeof(struct des3_state), M_GSSAPI, M_WAITOK|M_ZERO); mtx_init(&ds->ds_lock, "gss des3 lock", NULL, MTX_DEF); ks->ks_priv = ds; + if (ratecheck(&lastwarn, &warninterval)) + gone_in(13, "DES3 cipher for Kerberos GSS"); } static void From owner-svn-src-all@freebsd.org Mon Jun 10 19:26:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0162815C7444; Mon, 10 Jun 2019 19:26:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5248289AFB; Mon, 10 Jun 2019 19:26: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 9844C1EA52; Mon, 10 Jun 2019 19:26: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 x5AJQvMk015693; Mon, 10 Jun 2019 19:26:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AJQvoT015692; Mon, 10 Jun 2019 19:26:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906101926.x5AJQvoT015692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 10 Jun 2019 19:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348876 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 348876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5248289AFB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:26:59 -0000 Author: jhb Date: Mon Jun 10 19:26:57 2019 New Revision: 348876 URL: https://svnweb.freebsd.org/changeset/base/348876 Log: Add warnings to /dev/crypto for deprecated algorithms. These algorithms are deprecated algorithms that will have no in-kernel consumers in FreeBSD 13. Specifically, deprecate the following algorithms: - ARC4 - Blowfish - CAST128 - DES - 3DES - MD5-HMAC - Skipjack MFC after: 1 month Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20554 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Mon Jun 10 19:22:36 2019 (r348875) +++ head/sys/opencrypto/cryptodev.c Mon Jun 10 19:26:57 2019 (r348876) @@ -386,6 +386,9 @@ cryptof_ioctl( struct crypt_op copc; struct crypt_kop kopc; #endif + static struct timeval arc4warn, blfwarn, castwarn, deswarn, md5warn; + static struct timeval skipwarn, tdeswarn; + static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; switch (cmd) { case CIOCGSESSION: @@ -406,18 +409,28 @@ cryptof_ioctl( case 0: break; case CRYPTO_DES_CBC: + if (ratecheck(&deswarn, &warninterval)) + gone_in(13, "DES cipher via /dev/crypto"); txform = &enc_xform_des; break; case CRYPTO_3DES_CBC: + if (ratecheck(&tdeswarn, &warninterval)) + gone_in(13, "3DES cipher via /dev/crypto"); txform = &enc_xform_3des; break; case CRYPTO_BLF_CBC: + if (ratecheck(&blfwarn, &warninterval)) + gone_in(13, "Blowfish cipher via /dev/crypto"); txform = &enc_xform_blf; break; case CRYPTO_CAST_CBC: + if (ratecheck(&castwarn, &warninterval)) + gone_in(13, "CAST128 cipher via /dev/crypto"); txform = &enc_xform_cast5; break; case CRYPTO_SKIPJACK_CBC: + if (ratecheck(&skipwarn, &warninterval)) + gone_in(13, "Skipjack cipher via /dev/crypto"); txform = &enc_xform_skipjack; break; case CRYPTO_AES_CBC: @@ -430,6 +443,8 @@ cryptof_ioctl( txform = &enc_xform_null; break; case CRYPTO_ARC4: + if (ratecheck(&arc4warn, &warninterval)) + gone_in(13, "ARC4 cipher via /dev/crypto"); txform = &enc_xform_arc4; break; case CRYPTO_CAMELLIA_CBC: @@ -458,6 +473,9 @@ cryptof_ioctl( case 0: break; case CRYPTO_MD5_HMAC: + if (ratecheck(&md5warn, &warninterval)) + gone_in(13, + "MD5-HMAC authenticator via /dev/crypto"); thash = &auth_hash_hmac_md5; break; case CRYPTO_POLY1305: From owner-svn-src-all@freebsd.org Mon Jun 10 19:28:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D241715C74CC; Mon, 10 Jun 2019 19:28:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7424489C67; Mon, 10 Jun 2019 19:28:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id CF36C19BF5; Mon, 10 Jun 2019 19:28:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348875 - head/sys/kgssapi/krb5 From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906101922.x5AJMa3P015444@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 10 Jun 2019 12:28:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201906101922.x5AJMa3P015444@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 7424489C67 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:28:51 -0000 On 6/10/19 12:22 PM, John Baldwin wrote: > Author: jhb > Date: Mon Jun 10 19:22:36 2019 > New Revision: 348875 > URL: https://svnweb.freebsd.org/changeset/base/348875 > > Log: > Add warnings for Kerberos GSS algorithms deprecated in RFCs 6649 and 8429. > > All of these algorithms are explicitly marked SHOULD NOT in one of these > RFCs. > > Specifically, RFC 6649 deprecates all algorithms using DES as well as > the "export-friendly" variant of RC4. RFC 8429 deprecates Triple DES > and the remaining RC4 algorithms. > > Reviewed by: cem > MFC after: 1 month > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D20343 Bah, missed Relnotes: yes The long MFC timer is because I haven't run-tested this yet as when I sat down to look at what it would take to setup GSSAPI with NFS and Kerberos it seemed a bit of a daunting task. As such, I don't think it makes sense to rush into 11.3. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 10 19:34:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D82815C77DB; Mon, 10 Jun 2019 19:34:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 023BF8A293; Mon, 10 Jun 2019 19:34:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 64FCA19D1B; Mon, 10 Jun 2019 19:34:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348876 - head/sys/opencrypto From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906101926.x5AJQvoT015692@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 10 Jun 2019 12:34:39 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201906101926.x5AJQvoT015692@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 023BF8A293 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:34:41 -0000 On 6/10/19 12:26 PM, John Baldwin wrote: > Author: jhb > Date: Mon Jun 10 19:26:57 2019 > New Revision: 348876 > URL: https://svnweb.freebsd.org/changeset/base/348876 > > Log: > Add warnings to /dev/crypto for deprecated algorithms. > > These algorithms are deprecated algorithms that will have no in-kernel > consumers in FreeBSD 13. Specifically, deprecate the following > algorithms: > - ARC4 > - Blowfish > - CAST128 > - DES > - 3DES > - MD5-HMAC > - Skipjack > > MFC after: 1 month > Relnotes: yes > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D20554 cryptocheck doesn't test any of these. The cryptotest.py tests do test 3DES so cryptotest.py will emit a warning due to that. The /dev/crypto engine for OpenSSL does support several of these, but calling into the kernel just to do software crypto instead of doing the software crypto userland is rather pointless (just adds overhead). -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 10 19:35:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5174915C787A; Mon, 10 Jun 2019 19:35:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAE818A3EE; Mon, 10 Jun 2019 19:35:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 694E119D1C; Mon, 10 Jun 2019 19:35:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r348876 - head/sys/opencrypto From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906101926.x5AJQvoT015692@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <8cafcb98-2cad-77d9-41a3-39a1799576c9@FreeBSD.org> Date: Mon, 10 Jun 2019 12:35:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201906101926.x5AJQvoT015692@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EAE818A3EE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:35:37 -0000 On 6/10/19 12:26 PM, John Baldwin wrote: > Author: jhb > Date: Mon Jun 10 19:26:57 2019 > New Revision: 348876 > URL: https://svnweb.freebsd.org/changeset/base/348876 > > Log: > Add warnings to /dev/crypto for deprecated algorithms. > > These algorithms are deprecated algorithms that will have no in-kernel > consumers in FreeBSD 13. Specifically, deprecate the following > algorithms: > - ARC4 > - Blowfish > - CAST128 > - DES > - 3DES > - MD5-HMAC > - Skipjack > > MFC after: 1 month > Relnotes: yes > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D20554 Also, I missed 'Reviewed by: cem' for this one. :-/ -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 10 19:38:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 601C015C79D6; Mon, 10 Jun 2019 19:38:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 030E08A607; Mon, 10 Jun 2019 19:38:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D12FA1EC23; Mon, 10 Jun 2019 19:38:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AJcZNZ021219; Mon, 10 Jun 2019 19:38:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AJcZGk021218; Mon, 10 Jun 2019 19:38:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906101938.x5AJcZGk021218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 10 Jun 2019 19:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348877 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 348877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 030E08A607 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 19:38:36 -0000 Author: bdrewery Date: Mon Jun 10 19:38:35 2019 New Revision: 348877 URL: https://svnweb.freebsd.org/changeset/base/348877 Log: DPSRCS need to be built before recursing. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Mon Jun 10 19:26:57 2019 (r348876) +++ head/share/mk/bsd.progs.mk Mon Jun 10 19:38:35 2019 (r348877) @@ -95,7 +95,7 @@ $v = # Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. -_PROGS_COMMON_SRCS= +_PROGS_COMMON_SRCS= ${DPSRCS} _PROGS_ALL_SRCS= .for p in ${PROGS} .for s in ${SRCS.${p}} From owner-svn-src-all@freebsd.org Mon Jun 10 20:04:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F1C15C81DE; Mon, 10 Jun 2019 20:04:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63B508B3CB; Mon, 10 Jun 2019 20:04:08 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x5AK46r1079753; Mon, 10 Jun 2019 13:04:06 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x5AK46EI079752; Mon, 10 Jun 2019 13:04:06 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201906102004.x5AK46EI079752@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348873 - head/sys/dev/atkbdc In-Reply-To: <201906101819.x5AIJnAX078838@repo.freebsd.org> To: Niclas Zeising Date: Mon, 10 Jun 2019 13:04:06 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 63B508B3CB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 20:04:09 -0000 > Author: zeising (doc,ports committer) > Date: Mon Jun 10 18:19:49 2019 > New Revision: 348873 > URL: https://svnweb.freebsd.org/changeset/base/348873 > > Log: > psm(4): Enable touchpads and trackpads by default > > Enable synaptics and elantech touchpads, as well as IBM/Lenovo TrackPoints > by default, instead of having users find and toggle a loader tunable. > This makes things like two finger scroll and other modern features work out > of the box with X. By enabling these settings by default, we get a better > desktop experience in X, since xserver and evdev can make use of the more > advanced synaptics and elantech features. > > Reviewed by: imp, wulf, 0mp > Approved by: imp > Sponsored by: B3 Init (zeising) > Differential Revision: https://reviews.freebsd.org/D20507 This should of probably had a Relnotes: Yes as it changes default system behavior. > Modified: > head/sys/dev/atkbdc/psm.c > > Modified: head/sys/dev/atkbdc/psm.c > ============================================================================== > --- head/sys/dev/atkbdc/psm.c Mon Jun 10 17:44:50 2019 (r348872) > +++ head/sys/dev/atkbdc/psm.c Mon Jun 10 18:19:49 2019 (r348873) > @@ -513,9 +513,9 @@ static devclass_t psm_devclass; > /* Tunables */ > static int tap_enabled = -1; > static int verbose = PSM_DEBUG; > -static int synaptics_support = 0; > -static int trackpoint_support = 0; > -static int elantech_support = 0; > +static int synaptics_support = 1; > +static int trackpoint_support = 1; > +static int elantech_support = 1; > > /* for backward compatibility */ > #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jun 10 21:24:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 477DA15C9A9F; Mon, 10 Jun 2019 21:24:39 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D80C78DA9E; Mon, 10 Jun 2019 21:24: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 B10621FF4E; Mon, 10 Jun 2019 21:24: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 x5ALOcLh078410; Mon, 10 Jun 2019 21:24:38 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ALOcWW078409; Mon, 10 Jun 2019 21:24:38 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201906102124.x5ALOcWW078409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 10 Jun 2019 21:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348878 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 348878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D80C78DA9E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 21:24:39 -0000 Author: bz Date: Mon Jun 10 21:24:38 2019 New Revision: 348878 URL: https://svnweb.freebsd.org/changeset/base/348878 Log: Add a bus_add_child device method to bcm2835_sdhci. This allows SDIO (through CAM) to attach to an upstream, e.g., .. sdhci_bcm0 pnpinfo name=mmc@7e300000 compat=brcm,bcm2835-mmc sdiob0 .. Without this, upon trying to load sdio, we would panic with "bus_add_child is not implemented". MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Jun 10 19:38:35 2019 (r348877) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Jun 10 21:24:38 2019 (r348878) @@ -708,6 +708,7 @@ static device_method_t bcm_sdhci_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), + DEVMETHOD(bus_add_child, bus_generic_add_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), From owner-svn-src-all@freebsd.org Mon Jun 10 21:26:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C6F15C9B58; Mon, 10 Jun 2019 21:26:15 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C525B8DC34; Mon, 10 Jun 2019 21:26:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DD961FF4F; Mon, 10 Jun 2019 21:26:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ALQExr078528; Mon, 10 Jun 2019 21:26:14 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ALQEvO078526; Mon, 10 Jun 2019 21:26:14 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906102126.x5ALQEvO078526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Mon, 10 Jun 2019 21:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348879 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 348879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C525B8DC34 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 21:26:15 -0000 Author: dougm Date: Mon Jun 10 21:26:14 2019 New Revision: 348879 URL: https://svnweb.freebsd.org/changeset/base/348879 Log: Change the check for 'size' wrapping around to zero in kern_mmap to account for both the lower and upper bound modifications. Change the error returned to ENOMEM. Rename the parameter size to len and make size a local variable that stores the value of len after it has been modified. This addresses concerns expressed by Bruce Evans after r348843. Reported by: brde@optusnet.com.au Reviewed by: kib, markj (mentors) MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D20592 Modified: head/sys/sys/syscallsubr.h head/sys/vm/vm_mmap.c Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Mon Jun 10 21:24:38 2019 (r348878) +++ head/sys/sys/syscallsubr.h Mon Jun 10 21:26:14 2019 (r348879) @@ -173,7 +173,7 @@ int kern_mknodat(struct thread *td, int fd, const char enum uio_seg pathseg, int mode, dev_t dev); int kern_mlock(struct proc *proc, struct ucred *cred, uintptr_t addr, size_t len); -int kern_mmap(struct thread *td, uintptr_t addr, size_t size, int prot, +int kern_mmap(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos); int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Mon Jun 10 21:24:38 2019 (r348878) +++ head/sys/vm/vm_mmap.c Mon Jun 10 21:26:14 2019 (r348879) @@ -179,13 +179,13 @@ sys_mmap(struct thread *td, struct mmap_args *uap) } int -kern_mmap(struct thread *td, uintptr_t addr0, size_t size, int prot, int flags, +kern_mmap(struct thread *td, uintptr_t addr0, size_t len, int prot, int flags, int fd, off_t pos) { struct vmspace *vms; struct file *fp; vm_offset_t addr; - vm_size_t pageoff; + vm_size_t pageoff, size; vm_prot_t cap_maxprot; int align, error; cap_rights_t rights; @@ -210,7 +210,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s * pos. */ if (!SV_CURPROC_FLAG(SV_AOUT)) { - if ((size == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + if ((len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) return (EINVAL); } else { @@ -255,12 +255,12 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s pageoff = (pos & PAGE_MASK); pos -= pageoff; - /* Adjust size for rounding (on both ends). */ - size += pageoff; /* low end... */ - /* Check for rounding up to zero. */ - if (round_page(size) < size) - return (EINVAL); + /* Compute size from len by rounding (on both ends). */ + size = len + pageoff; /* low end... */ size = round_page(size); /* hi end */ + /* Check for rounding up to zero. */ + if (len < size) + return (ENOMEM); /* Ensure alignment is at least a page and fits in a pointer. */ align = flags & MAP_ALIGNMENT_MASK; @@ -317,7 +317,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s addr = round_page((vm_offset_t)vms->vm_daddr + lim_max(td, RLIMIT_DATA)); } - if (size == 0) { + if (len == 0) { /* * Return success without mapping anything for old * binaries that request a page-aligned mapping of From owner-svn-src-all@freebsd.org Mon Jun 10 21:27:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E85C215C9BE1; Mon, 10 Jun 2019 21:27:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86A8F8DDAB; Mon, 10 Jun 2019 21:27:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F42E1FF55; Mon, 10 Jun 2019 21:27:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ALRMmE078625; Mon, 10 Jun 2019 21:27:22 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ALRLt4078623; Mon, 10 Jun 2019 21:27:21 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201906102127.x5ALRLt4078623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 10 Jun 2019 21:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348880 - in head/sys: arm/mv arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: in head/sys: arm/mv arm64/conf conf X-SVN-Commit-Revision: 348880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 86A8F8DDAB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 21:27:23 -0000 Author: loos Date: Mon Jun 10 21:27:21 2019 New Revision: 348880 URL: https://svnweb.freebsd.org/changeset/base/348880 Log: Add the GPIO driver for the North/South bridge in Marvell Armada 37x0. The A3700 has a different GPIO controller and thus, do not use the old (and shared) code for Marvell. The pinctrl driver, also part of the controller, is not supported yet (but the implementation should be straightforward). Sponsored by: Rubicon Communications, LLC (Netgate) Added: head/sys/arm/mv/a37x0_gpio.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Added: head/sys/arm/mv/a37x0_gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/mv/a37x0_gpio.c Mon Jun 10 21:27:21 2019 (r348880) @@ -0,0 +1,352 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018-2019, Rubicon Communications, LLC (Netgate) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "gpio_if.h" + +static struct resource_spec a37x0_gpio_res_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Pinctl / GPIO */ + { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* Interrupts control */ + { -1, 0, 0 } +}; + +struct a37x0_gpio_softc { + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + device_t sc_busdev; + int sc_type; + uint32_t sc_max_pins; + uint32_t sc_npins; + struct resource *sc_mem_res[nitems(a37x0_gpio_res_spec) - 1]; +}; + +/* Memory regions. */ +#define A37X0_GPIO 0 +#define A37X0_INTR 1 + +/* North Bridge / South Bridge. */ +#define A37X0_NB_GPIO 1 +#define A37X0_SB_GPIO 2 + +#define A37X0_GPIO_WRITE(_sc, _off, _val) \ + bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, (_off), (_val)) +#define A37X0_GPIO_READ(_sc, _off) \ + bus_space_read_4((_sc)->sc_bst, (_sc)->sc_bsh, (_off)) + +#define A37X0_GPIO_BIT(_p) (1U << ((_p) % 32)) +#define A37X0_GPIO_OUT_EN(_p) (0x0 + ((_p) / 32) * 4) +#define A37X0_GPIO_LATCH(_p) (0x8 + ((_p) / 32) * 4) +#define A37X0_GPIO_INPUT(_p) (0x10 + ((_p) / 32) * 4) +#define A37X0_GPIO_OUTPUT(_p) (0x18 + ((_p) / 32) * 4) +#define A37X0_GPIO_SEL 0x30 + + +static struct ofw_compat_data compat_data[] = { + { "marvell,armada3710-nb-pinctrl", A37X0_NB_GPIO }, + { "marvell,armada3710-sb-pinctrl", A37X0_SB_GPIO }, + { NULL, 0 } +}; + +static phandle_t +a37x0_gpio_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + +static device_t +a37x0_gpio_get_bus(device_t dev) +{ + struct a37x0_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->sc_busdev); +} + +static int +a37x0_gpio_pin_max(device_t dev, int *maxpin) +{ + struct a37x0_gpio_softc *sc; + + sc = device_get_softc(dev); + *maxpin = sc->sc_npins - 1; + + return (0); +} + +static int +a37x0_gpio_pin_getname(device_t dev, uint32_t pin, char *name) +{ + struct a37x0_gpio_softc *sc; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + snprintf(name, GPIOMAXNAME, "pin %d", pin); + + return (0); +} + +static int +a37x0_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + struct a37x0_gpio_softc *sc; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; + + return (0); +} + +static int +a37x0_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) +{ + struct a37x0_gpio_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUT_EN(pin)); + if ((reg & A37X0_GPIO_BIT(pin)) != 0) + *flags = GPIO_PIN_OUTPUT; + else + *flags = GPIO_PIN_INPUT; + + return (0); +} + +static int +a37x0_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) +{ + struct a37x0_gpio_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUT_EN(pin)); + if (flags & GPIO_PIN_OUTPUT) + reg |= A37X0_GPIO_BIT(pin); + else + reg &= ~A37X0_GPIO_BIT(pin); + A37X0_GPIO_WRITE(sc, A37X0_GPIO_OUT_EN(pin), reg); + + return (0); +} + +static int +a37x0_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) +{ + struct a37x0_gpio_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUT_EN(pin)); + if ((reg & A37X0_GPIO_BIT(pin)) != 0) + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUTPUT(pin)); + else + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_INPUT(pin)); + *val = ((reg & A37X0_GPIO_BIT(pin)) != 0) ? 1 : 0; + + return (0); +} + +static int +a37x0_gpio_pin_set(device_t dev, uint32_t pin, unsigned int val) +{ + struct a37x0_gpio_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUTPUT(pin)); + if (val != 0) + reg |= A37X0_GPIO_BIT(pin); + else + reg &= ~A37X0_GPIO_BIT(pin); + A37X0_GPIO_WRITE(sc, A37X0_GPIO_OUTPUT(pin), reg); + + return (0); +} + +static int +a37x0_gpio_pin_toggle(device_t dev, uint32_t pin) +{ + struct a37x0_gpio_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + if (pin >= sc->sc_npins) + return (EINVAL); + + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUT_EN(pin)); + if ((reg & A37X0_GPIO_BIT(pin)) == 0) + return (EINVAL); + reg = A37X0_GPIO_READ(sc, A37X0_GPIO_OUTPUT(pin)); + reg ^= A37X0_GPIO_BIT(pin); + A37X0_GPIO_WRITE(sc, A37X0_GPIO_OUTPUT(pin), reg); + + return (0); +} + +static int +a37x0_gpio_probe(device_t dev) +{ + const char *desc; + struct a37x0_gpio_softc *sc; + + if (!OF_hasprop(ofw_bus_get_node(dev), "gpio-controller")) + return (ENXIO); + + sc = device_get_softc(dev); + sc->sc_type = ofw_bus_search_compatible( + device_get_parent(dev), compat_data)->ocd_data; + switch (sc->sc_type) { + case A37X0_NB_GPIO: + sc->sc_max_pins = 36; + desc = "Armada 37x0 North Bridge GPIO Controller"; + break; + case A37X0_SB_GPIO: + sc->sc_max_pins = 30; + desc = "Armada 37x0 South Bridge GPIO Controller"; + break; + default: + return (ENXIO); + } + device_set_desc(dev, desc); + + return (BUS_PROBE_DEFAULT); +} + +static int +a37x0_gpio_attach(device_t dev) +{ + int err, ncells; + pcell_t *ranges; + struct a37x0_gpio_softc *sc; + + sc = device_get_softc(dev); + + /* Read and verify the "gpio-ranges" property. */ + ncells = OF_getencprop_alloc(ofw_bus_get_node(dev), "gpio-ranges", + (void **)&ranges); + if (ncells == -1) + return (ENXIO); + if (ncells != sizeof(*ranges) * 4 || ranges[1] != 0 || ranges[2] != 0) { + OF_prop_free(ranges); + return (ENXIO); + } + sc->sc_npins = ranges[3]; + OF_prop_free(ranges); + + /* Check the number of pins in the DTS vs HW capabilities. */ + if (sc->sc_npins > sc->sc_max_pins) + return (ENXIO); + + err = bus_alloc_resources(dev, a37x0_gpio_res_spec, sc->sc_mem_res); + if (err != 0) { + device_printf(dev, "cannot allocate memory window\n"); + return (ENXIO); + } + sc->sc_bst = rman_get_bustag(sc->sc_mem_res[A37X0_GPIO]); + sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res[A37X0_GPIO]); + + sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) + return (ENXIO); + + return (0); +} + +static int +a37x0_gpio_detach(device_t dev) +{ + + return (EBUSY); +} + +static device_method_t a37x0_gpio_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, a37x0_gpio_probe), + DEVMETHOD(device_attach, a37x0_gpio_attach), + DEVMETHOD(device_detach, a37x0_gpio_detach), + + /* GPIO interface */ + DEVMETHOD(gpio_get_bus, a37x0_gpio_get_bus), + DEVMETHOD(gpio_pin_max, a37x0_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, a37x0_gpio_pin_getname), + DEVMETHOD(gpio_pin_getcaps, a37x0_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_getflags, a37x0_gpio_pin_getflags), + DEVMETHOD(gpio_pin_setflags, a37x0_gpio_pin_setflags), + DEVMETHOD(gpio_pin_get, a37x0_gpio_pin_get), + DEVMETHOD(gpio_pin_set, a37x0_gpio_pin_set), + DEVMETHOD(gpio_pin_toggle, a37x0_gpio_pin_toggle), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, a37x0_gpio_get_node), + + DEVMETHOD_END +}; + +static devclass_t a37x0_gpio_devclass; +static driver_t a37x0_gpio_driver = { + "gpio", + a37x0_gpio_methods, + sizeof(struct a37x0_gpio_softc), +}; + +EARLY_DRIVER_MODULE(a37x0_gpio, simple_mfd, a37x0_gpio_driver, + a37x0_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Mon Jun 10 21:26:14 2019 (r348879) +++ head/sys/arm64/conf/GENERIC Mon Jun 10 21:27:21 2019 (r348880) @@ -223,6 +223,7 @@ device a10_codec device a31_dmac # GPIO / PINCTRL +device a37x0_gpio # Marvell Armada 37x0 GPIO controller device aw_gpio # Allwinner GPIO controller device gpio device gpioled Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Jun 10 21:26:14 2019 (r348879) +++ head/sys/conf/files.arm64 Mon Jun 10 21:27:21 2019 (r348880) @@ -95,6 +95,7 @@ arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 +arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt arm/mv/gpio.c optional mv_gpio fdt arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt arm/mv/mv_cp110_icu.c optional mv_cp110_icu fdt From owner-svn-src-all@freebsd.org Mon Jun 10 21:34:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46E5115C9E5A; Mon, 10 Jun 2019 21:34:08 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E62858E25D; Mon, 10 Jun 2019 21:34:07 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0128200F5; Mon, 10 Jun 2019 21:34:07 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ALY7DY083836; Mon, 10 Jun 2019 21:34:07 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ALY71Y083835; Mon, 10 Jun 2019 21:34:07 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906102134.x5ALY71Y083835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Mon, 10 Jun 2019 21:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348881 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E62858E25D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 21:34:08 -0000 Author: dougm Date: Mon Jun 10 21:34:07 2019 New Revision: 348881 URL: https://svnweb.freebsd.org/changeset/base/348881 Log: The computations of vm_map_splay_split and vm_map_splay_merge touch both children of every entry on the search path as part of updating values of the max_free field. By comparing the max_free values of an entry and its child on the search path, the code can avoid accessing the child off the path in cases where the max_free value decreases along the path. Specifically, this patch changes splay_split so that the max_free field of every entry on the search path is replaced, temporarily, by the max_free field from its child not on the search path or, if the child in that direction is NULL, then a difference between start and end values of two pointers already available in the split code, without following any next or prev pointers. However, to find that max_free value does not require looking toward that other child if either the child on the search path has a lower max_free value, or the current max_free value is zero, because in either case we know that the value of max_free for the other child is the value we already have. So, the changes to vm_entry_splay_split make sure that we know all the off-search-path entries we will need to complete the splay, without looking at all of them. There is an exception at the bottom of the search path where we cannot rely on the max_free value in the direction of the NULL pointer that ends the search, because of the behavior of entry-clipping code. The corresponding change to vm_splay_entry_merge makes it simpler, since it's just reversing pointers and updating running maxima. In a test intended to exercise vigorously the vm_map implementation, the effect of this change was to reduce the data cache miss rate by 10-14% and the running time by 5-7%. Tested by: pho Reviewed by: alc Approved by: kib (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19826 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jun 10 21:27:21 2019 (r348880) +++ head/sys/vm/vm_map.c Mon Jun 10 21:34:07 2019 (r348881) @@ -962,55 +962,92 @@ vm_map_entry_set_behavior(vm_map_entry_t entry, u_char } /* - * vm_map_entry_set_max_free: + * vm_map_entry_max_free_{left,right}: * - * Set the max_free field in a vm_map_entry. + * Compute the size of the largest free gap between two entries, + * one the root of a tree and the other the ancestor of that root + * that is the least or greatest ancestor found on the search path. */ -static inline void -vm_map_entry_set_max_free(vm_map_entry_t entry) +static inline vm_size_t +vm_map_entry_max_free_left(vm_map_entry_t root, vm_map_entry_t left_ancestor) { - vm_map_entry_t child; - vm_size_t max_left, max_right; - child = entry->left; - max_left = (child != NULL) ? child->max_free : - entry->start - entry->prev->end; - child = entry->right; - max_right = (child != NULL) ? child->max_free : - entry->next->start - entry->end; - entry->max_free = MAX(max_left, max_right); + return (root->left != NULL ? + root->left->max_free : root->start - left_ancestor->end); } -#define SPLAY_LEFT_STEP(root, y, rlist, test) do { \ - y = root->left; \ - if (y != NULL && (test)) { \ - /* Rotate right and make y root. */ \ - root->left = y->right; \ - y->right = root; \ - vm_map_entry_set_max_free(root); \ - root = y; \ - y = root->left; \ - } \ - /* Put root on rlist. */ \ - root->left = rlist; \ - rlist = root; \ - root = y; \ +static inline vm_size_t +vm_map_entry_max_free_right(vm_map_entry_t root, vm_map_entry_t right_ancestor) +{ + + return (root->right != NULL ? + root->right->max_free : right_ancestor->start - root->end); +} + +#define SPLAY_LEFT_STEP(root, y, rlist, test) do { \ + vm_size_t max_free; \ + \ + /* \ + * Infer root->right->max_free == root->max_free when \ + * y->max_free < root->max_free || root->max_free == 0. \ + * Otherwise, look right to find it. \ + */ \ + y = root->left; \ + max_free = root->max_free; \ + KASSERT(max_free >= vm_map_entry_max_free_right(root, rlist), \ + ("%s: max_free invariant fails", __func__)); \ + if (y == NULL ? max_free > 0 : max_free - 1 < y->max_free) \ + max_free = vm_map_entry_max_free_right(root, rlist); \ + if (y != NULL && (test)) { \ + /* Rotate right and make y root. */ \ + root->left = y->right; \ + y->right = root; \ + if (max_free < y->max_free) \ + root->max_free = max_free = MAX(max_free, \ + vm_map_entry_max_free_left(root, y)); \ + root = y; \ + y = root->left; \ + } \ + /* Copy right->max_free. Put root on rlist. */ \ + root->max_free = max_free; \ + KASSERT(max_free == vm_map_entry_max_free_right(root, rlist), \ + ("%s: max_free not copied from right", __func__)); \ + root->left = rlist; \ + rlist = root; \ + root = y; \ } while (0) -#define SPLAY_RIGHT_STEP(root, y, llist, test) do { \ - y = root->right; \ - if (y != NULL && (test)) { \ - /* Rotate left and make y root. */ \ - root->right = y->left; \ - y->left = root; \ - vm_map_entry_set_max_free(root); \ - root = y; \ - y = root->right; \ - } \ - /* Put root on llist. */ \ - root->right = llist; \ - llist = root; \ - root = y; \ +#define SPLAY_RIGHT_STEP(root, y, llist, test) do { \ + vm_size_t max_free; \ + \ + /* \ + * Infer root->left->max_free == root->max_free when \ + * y->max_free < root->max_free || root->max_free == 0. \ + * Otherwise, look left to find it. \ + */ \ + y = root->right; \ + max_free = root->max_free; \ + KASSERT(max_free >= vm_map_entry_max_free_left(root, llist), \ + ("%s: max_free invariant fails", __func__)); \ + if (y == NULL ? max_free > 0 : max_free - 1 < y->max_free) \ + max_free = vm_map_entry_max_free_left(root, llist); \ + if (y != NULL && (test)) { \ + /* Rotate left and make y root. */ \ + root->right = y->left; \ + y->left = root; \ + if (max_free < y->max_free) \ + root->max_free = max_free = MAX(max_free, \ + vm_map_entry_max_free_right(root, y)); \ + root = y; \ + y = root->right; \ + } \ + /* Copy left->max_free. Put root on llist. */ \ + root->max_free = max_free; \ + KASSERT(max_free == vm_map_entry_max_free_left(root, llist), \ + ("%s: max_free not copied from left", __func__)); \ + root->right = llist; \ + llist = root; \ + root = y; \ } while (0) /* @@ -1019,18 +1056,21 @@ vm_map_entry_set_max_free(vm_map_entry_t entry) * addr. Treat pointers to nodes with max_free < length as NULL pointers. * llist and rlist are the two sides in reverse order (bottom-up), with llist * linked by the right pointer and rlist linked by the left pointer in the - * vm_map_entry. + * vm_map_entry, and both lists terminated by &map->header. This function, and + * the subsequent call to vm_map_splay_merge, rely on the start and end address + * values in &map->header. */ static vm_map_entry_t -vm_map_splay_split(vm_offset_t addr, vm_size_t length, - vm_map_entry_t root, vm_map_entry_t *out_llist, vm_map_entry_t *out_rlist) +vm_map_splay_split(vm_map_t map, vm_offset_t addr, vm_size_t length, + vm_map_entry_t *out_llist, vm_map_entry_t *out_rlist) { - vm_map_entry_t llist, rlist; - vm_map_entry_t y; + vm_map_entry_t llist, rlist, root, y; - llist = NULL; - rlist = NULL; + llist = rlist = &map->header; + root = map->root; while (root != NULL && root->max_free >= length) { + KASSERT(llist->end <= root->start && root->end <= rlist->start, + ("%s: root not within tree bounds", __func__)); if (addr < root->start) { SPLAY_LEFT_STEP(root, y, rlist, y->max_free >= length && addr < y->start); @@ -1069,44 +1109,65 @@ vm_map_splay_findprev(vm_map_entry_t root, vm_map_entr *iolist = llist; } +static inline void +vm_map_entry_swap(vm_map_entry_t *a, vm_map_entry_t *b) +{ + vm_map_entry_t tmp; + + tmp = *b; + *b = *a; + *a = tmp; +} + /* * Walk back up the two spines, flip the pointers and set max_free. The * subtrees of the root go at the bottom of llist and rlist. */ -static vm_map_entry_t -vm_map_splay_merge(vm_map_entry_t root, - vm_map_entry_t llist, vm_map_entry_t rlist, - vm_map_entry_t ltree, vm_map_entry_t rtree) +static void +vm_map_splay_merge(vm_map_t map, vm_map_entry_t root, + vm_map_entry_t llist, vm_map_entry_t rlist) { - vm_map_entry_t y; + vm_map_entry_t prev; + vm_size_t max_free_left, max_free_right; - while (llist != NULL) { - y = llist->right; - llist->right = ltree; - vm_map_entry_set_max_free(llist); - ltree = llist; - llist = y; + max_free_left = vm_map_entry_max_free_left(root, llist); + if (llist != &map->header) { + prev = root->left; + do { + /* + * The max_free values of the children of llist are in + * llist->max_free and max_free_left. Update with the + * max value. + */ + llist->max_free = max_free_left = + MAX(llist->max_free, max_free_left); + vm_map_entry_swap(&llist->right, &prev); + vm_map_entry_swap(&prev, &llist); + } while (llist != &map->header); + root->left = prev; } - while (rlist != NULL) { - y = rlist->left; - rlist->left = rtree; - vm_map_entry_set_max_free(rlist); - rtree = rlist; - rlist = y; - } - - /* - * Final assembly: add ltree and rtree as subtrees of root. - */ - root->left = ltree; - root->right = rtree; - vm_map_entry_set_max_free(root); - - return (root); + max_free_right = vm_map_entry_max_free_right(root, rlist); + if (rlist != &map->header) { + prev = root->right; + do { + /* + * The max_free values of the children of rlist are in + * rlist->max_free and max_free_right. Update with the + * max value. + */ + rlist->max_free = max_free_right = + MAX(rlist->max_free, max_free_right); + vm_map_entry_swap(&rlist->left, &prev); + vm_map_entry_swap(&prev, &rlist); + } while (rlist != &map->header); + root->right = prev; + } + root->max_free = MAX(max_free_left, max_free_right); + map->root = root; } /* - * vm_map_entry_splay: + * vm_map_splay: * * The Sleator and Tarjan top-down splay algorithm with the * following variation. Max_free must be computed bottom-up, so @@ -1123,14 +1184,14 @@ vm_map_splay_merge(vm_map_entry_t root, * Returns: the new root. */ static vm_map_entry_t -vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t root) +vm_map_splay(vm_map_t map, vm_offset_t addr) { - vm_map_entry_t llist, rlist; + vm_map_entry_t llist, rlist, root; - root = vm_map_splay_split(addr, 0, root, &llist, &rlist); + root = vm_map_splay_split(map, addr, 0, &llist, &rlist); if (root != NULL) { /* do nothing */ - } else if (llist != NULL) { + } else if (llist != &map->header) { /* * Recover the greatest node in the left * subtree and make it the root. @@ -1138,7 +1199,7 @@ vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t ro root = llist; llist = root->right; root->right = NULL; - } else if (rlist != NULL) { + } else if (rlist != &map->header) { /* * Recover the least node in the right * subtree and make it the root. @@ -1150,8 +1211,9 @@ vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t ro /* There is no root. */ return (NULL); } - return (vm_map_splay_merge(root, llist, rlist, - root->left, root->right)); + vm_map_splay_merge(map, root, llist, rlist); + VM_MAP_ASSERT_CONSISTENT(map); + return (root); } /* @@ -1160,8 +1222,7 @@ vm_map_entry_splay(vm_offset_t addr, vm_map_entry_t ro * Insert/remove entries from maps. */ static void -vm_map_entry_link(vm_map_t map, - vm_map_entry_t entry) +vm_map_entry_link(vm_map_t map, vm_map_entry_t entry) { vm_map_entry_t llist, rlist, root; @@ -1170,15 +1231,14 @@ vm_map_entry_link(vm_map_t map, map->nentries, entry); VM_MAP_ASSERT_LOCKED(map); map->nentries++; - root = map->root; - root = vm_map_splay_split(entry->start, 0, root, &llist, &rlist); + root = vm_map_splay_split(map, entry->start, 0, &llist, &rlist); KASSERT(root == NULL, ("vm_map_entry_link: link object already mapped")); - entry->prev = (llist == NULL) ? &map->header : llist; - entry->next = (rlist == NULL) ? &map->header : rlist; - entry->prev->next = entry->next->prev = entry; - root = vm_map_splay_merge(entry, llist, rlist, NULL, NULL); - map->root = entry; + entry->prev = llist; + entry->next = rlist; + llist->next = rlist->prev = entry; + entry->left = entry->right = NULL; + vm_map_splay_merge(map, entry, llist, rlist); VM_MAP_ASSERT_CONSISTENT(map); } @@ -1189,19 +1249,13 @@ enum unlink_merge_type { }; static void -vm_map_entry_unlink(vm_map_t map, - vm_map_entry_t entry, - enum unlink_merge_type op) +vm_map_entry_unlink(vm_map_t map, vm_map_entry_t entry, + enum unlink_merge_type op) { vm_map_entry_t llist, rlist, root, y; VM_MAP_ASSERT_LOCKED(map); - llist = entry->prev; - rlist = entry->next; - llist->next = rlist; - rlist->prev = llist; - root = map->root; - root = vm_map_splay_split(entry->start, 0, root, &llist, &rlist); + root = vm_map_splay_split(map, entry->start, 0, &llist, &rlist); KASSERT(root != NULL, ("vm_map_entry_unlink: unlink object not mapped")); @@ -1226,11 +1280,11 @@ vm_map_entry_unlink(vm_map_t map, case UNLINK_MERGE_NONE: vm_map_splay_findprev(root, &llist); vm_map_splay_findnext(root, &rlist); - if (llist != NULL) { + if (llist != &map->header) { root = llist; llist = root->right; root->right = NULL; - } else if (rlist != NULL) { + } else if (rlist != &map->header) { root = rlist; rlist = root->left; root->left = NULL; @@ -1238,10 +1292,13 @@ vm_map_entry_unlink(vm_map_t map, root = NULL; break; } + y = entry->next; + y->prev = entry->prev; + y->prev->next = y; if (root != NULL) - root = vm_map_splay_merge(root, llist, rlist, - root->left, root->right); - map->root = root; + vm_map_splay_merge(map, root, llist, rlist); + else + map->root = NULL; VM_MAP_ASSERT_CONSISTENT(map); map->nentries--; CTR3(KTR_VM, "vm_map_entry_unlink: map %p, nentries %d, entry %p", map, @@ -1262,15 +1319,13 @@ vm_map_entry_resize(vm_map_t map, vm_map_entry_t entry vm_map_entry_t llist, rlist, root; VM_MAP_ASSERT_LOCKED(map); - root = map->root; - root = vm_map_splay_split(entry->start, 0, root, &llist, &rlist); + root = vm_map_splay_split(map, entry->start, 0, &llist, &rlist); KASSERT(root != NULL, ("%s: resize object not mapped", __func__)); vm_map_splay_findnext(root, &rlist); root->right = NULL; entry->end += grow_amount; - map->root = vm_map_splay_merge(root, llist, rlist, - root->left, root->right); + vm_map_splay_merge(map, root, llist, rlist); VM_MAP_ASSERT_CONSISTENT(map); CTR4(KTR_VM, "%s: map %p, nentries %d, entry %p", __func__, map, map->nentries, entry); @@ -1316,8 +1371,7 @@ vm_map_lookup_entry( * change the map. Thus, the map's timestamp need not change * on a temporary upgrade. */ - map->root = cur = vm_map_entry_splay(address, cur); - VM_MAP_ASSERT_CONSISTENT(map); + cur = vm_map_splay(map, address); if (!locked) sx_downgrade(&map->lock); @@ -1604,11 +1658,10 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s * After splay, if start comes before root node, then there * must be a gap from start to the root. */ - root = vm_map_splay_split(start, length, map->root, - &llist, &rlist); + root = vm_map_splay_split(map, start, length, &llist, &rlist); if (root != NULL) start = root->end; - else if (rlist != NULL) { + else if (rlist != &map->header) { root = rlist; rlist = root->left; root->left = NULL; @@ -1617,8 +1670,7 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s llist = root->right; root->right = NULL; } - map->root = vm_map_splay_merge(root, llist, rlist, - root->left, root->right); + vm_map_splay_merge(map, root, llist, rlist); VM_MAP_ASSERT_CONSISTENT(map); if (start + length <= root->start) return (start); @@ -1639,40 +1691,32 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s /* * Splay for the least large-enough gap in the right subtree. */ - llist = NULL; - rlist = NULL; - for (left_length = 0; ; - left_length = root->left != NULL ? - root->left->max_free : root->start - llist->end) { + llist = rlist = &map->header; + for (left_length = 0;; + left_length = vm_map_entry_max_free_left(root, llist)) { if (length <= left_length) SPLAY_LEFT_STEP(root, y, rlist, - length <= (y->left != NULL ? - y->left->max_free : y->start - llist->end)); + length <= vm_map_entry_max_free_left(y, llist)); else SPLAY_RIGHT_STEP(root, y, llist, - length > (y->left != NULL ? - y->left->max_free : y->start - root->end)); + length > vm_map_entry_max_free_left(y, root)); if (root == NULL) break; } root = llist; llist = root->right; - if ((y = rlist) == NULL) - root->right = NULL; - else { + root->right = NULL; + if (rlist != &map->header) { + y = rlist; rlist = y->left; y->left = NULL; - root->right = y->right; - } - root = vm_map_splay_merge(root, llist, rlist, - root->left, root->right); - if (y != NULL) { - y->right = root->right; - vm_map_entry_set_max_free(y); + vm_map_splay_merge(map, y, &map->header, rlist); + y->max_free = MAX( + vm_map_entry_max_free_left(y, root), + vm_map_entry_max_free_right(y, &map->header)); root->right = y; - vm_map_entry_set_max_free(root); } - map->root = root; + vm_map_splay_merge(map, root, llist, &map->header); VM_MAP_ASSERT_CONSISTENT(map); return (root->end); } From owner-svn-src-all@freebsd.org Mon Jun 10 21:50:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C877F15CA2AD; Mon, 10 Jun 2019 21:50:08 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD678E945; Mon, 10 Jun 2019 21:50:08 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 313F8202A6; Mon, 10 Jun 2019 21:50:08 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ALo8tS089526; Mon, 10 Jun 2019 21:50:08 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ALo8wL089525; Mon, 10 Jun 2019 21:50:08 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201906102150.x5ALo8wL089525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 10 Jun 2019 21:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348882 - head/sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: head/sys/dev/sdhci X-SVN-Commit-Revision: 348882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DD678E945 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 21:50:09 -0000 Author: loos Date: Mon Jun 10 21:50:07 2019 New Revision: 348882 URL: https://svnweb.freebsd.org/changeset/base/348882 Log: Add support for the GPIO SD Card VCC regulator/switch and the GPIO SD Card detection pins to the Marvell Xenon SDHCI controller. These features are enable by 'vqmmc-supply' and 'cd-gpios' properties in the DTS. This fixes the SD Card detection on espressobin. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/sdhci/sdhci_xenon.c Modified: head/sys/dev/sdhci/sdhci_xenon.c ============================================================================== --- head/sys/dev/sdhci/sdhci_xenon.c Mon Jun 10 21:34:07 2019 (r348881) +++ head/sys/dev/sdhci/sdhci_xenon.c Mon Jun 10 21:50:07 2019 (r348882) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "mmcbr_if.h" @@ -84,10 +86,12 @@ struct sdhci_xenon_softc { uint32_t max_clk; /* Max possible freq */ struct resource *irq_res; /* IRQ resource */ void *intrhand; /* Interrupt handle */ + struct sdhci_fdt_gpio *gpio; /* GPIO pins for CD detection. */ struct sdhci_slot *slot; /* SDHCI internal data */ struct resource *mem_res; /* Memory resource */ + regulator_t reg_vqmmc; /* vqmmc-supply regulator */ uint8_t znr; /* PHY ZNR */ uint8_t zpr; /* PHY ZPR */ bool no_18v; /* No 1.8V support */ @@ -188,6 +192,14 @@ sdhci_xenon_get_ro(device_t bus, device_t dev) return (sdhci_generic_get_ro(bus, dev) ^ sc->wp_inverted); } +static bool +sdhci_xenon_get_card_present(device_t dev, struct sdhci_slot *slot) +{ + struct sdhci_xenon_softc *sc = device_get_softc(dev); + + return (sdhci_fdt_gpio_get_present(sc->gpio)); +} + static int sdhci_xenon_phy_init(device_t brdev, struct mmc_ios *ios) { @@ -337,6 +349,25 @@ sdhci_xenon_update_ios(device_t brdev, device_t reqdev slot = device_get_ivars(reqdev); ios = &slot->host.ios; + switch (ios->power_mode) { + case power_on: + break; + case power_off: + if (bootverbose) + device_printf(sc->dev, "Powering down sd/mmc\n"); + + if (sc->reg_vqmmc) + regulator_disable(sc->reg_vqmmc); + break; + case power_up: + if (bootverbose) + device_printf(sc->dev, "Powering up sd/mmc\n"); + + if (sc->reg_vqmmc) + regulator_enable(sc->reg_vqmmc); + break; + }; + /* Update the PHY settings. */ if (ios->clock != 0) sdhci_xenon_phy_set(brdev, ios); @@ -352,6 +383,42 @@ sdhci_xenon_update_ios(device_t brdev, device_t reqdev } static int +sdhci_xenon_switch_vccq(device_t brdev, device_t reqdev) +{ + struct sdhci_xenon_softc *sc; + struct sdhci_slot *slot; + int uvolt, err; + + sc = device_get_softc(brdev); + + if (sc->reg_vqmmc == NULL) + return EOPNOTSUPP; + + slot = device_get_ivars(reqdev); + switch (slot->host.ios.vccq) { + case vccq_180: + uvolt = 1800000; + break; + case vccq_330: + uvolt = 3300000; + break; + default: + return EINVAL; + } + + err = regulator_set_voltage(sc->reg_vqmmc, uvolt, uvolt); + if (err != 0) { + device_printf(sc->dev, + "Cannot set vqmmc to %d<->%d\n", + uvolt, + uvolt); + return (err); + } + + return (0); +} + +static int sdhci_xenon_probe(device_t dev) { struct sdhci_xenon_softc *sc = device_get_softc(dev); @@ -389,6 +456,11 @@ sdhci_xenon_probe(device_t dev) if ((OF_getencprop(sc->node, "marvell,xenon-phy-zpr", &cid, sizeof(cid))) > 0) sc->zpr = cid & XENON_ZPR_MASK; + if (regulator_get_by_ofw_property(dev, 0, "vqmmc-supply", + &sc->reg_vqmmc) == 0 && bootverbose) { + if (bootverbose) + device_printf(dev, "vqmmc-supply regulator found\n"); + } return (0); } @@ -437,6 +509,12 @@ sdhci_xenon_attach(device_t dev) slot->max_clk = sc->max_clk; sc->slot = slot; + /* + * Set up any gpio pin handling described in the FDT data. This cannot + * fail; see comments in sdhci_fdt_gpio.h for details. + */ + sc->gpio = sdhci_fdt_gpio_setup(dev, slot); + if (sdhci_init_slot(dev, sc->slot, 0)) goto fail; @@ -497,6 +575,9 @@ sdhci_xenon_detach(device_t dev) { struct sdhci_xenon_softc *sc = device_get_softc(dev); + if (sc->gpio != NULL) + sdhci_fdt_gpio_teardown(sc->gpio); + bus_generic_detach(dev); bus_teardown_intr(dev, sc->irq_res, sc->intrhand); bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq_res), @@ -526,6 +607,7 @@ static device_method_t sdhci_xenon_methods[] = { DEVMETHOD(mmcbr_get_ro, sdhci_xenon_get_ro), DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), + DEVMETHOD(mmcbr_switch_vccq, sdhci_xenon_switch_vccq), /* SDHCI registers accessors */ DEVMETHOD(sdhci_read_1, sdhci_xenon_read_1), @@ -536,6 +618,7 @@ static device_method_t sdhci_xenon_methods[] = { DEVMETHOD(sdhci_write_2, sdhci_xenon_write_2), DEVMETHOD(sdhci_write_4, sdhci_xenon_write_4), DEVMETHOD(sdhci_write_multi_4, sdhci_xenon_write_multi_4), + DEVMETHOD(sdhci_get_card_present, sdhci_xenon_get_card_present), DEVMETHOD_END }; From owner-svn-src-all@freebsd.org Mon Jun 10 22:06:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AC2315CA71B; Mon, 10 Jun 2019 22:06:41 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB10A8F21D; Mon, 10 Jun 2019 22:06:40 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E9CF20617; Mon, 10 Jun 2019 22:06:40 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5AM6eWJ099775; Mon, 10 Jun 2019 22:06:40 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5AM6e2W099774; Mon, 10 Jun 2019 22:06:40 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906102206.x5AM6e2W099774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Mon, 10 Jun 2019 22:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348883 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CB10A8F21D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 22:06:41 -0000 Author: dougm Date: Mon Jun 10 22:06:40 2019 New Revision: 348883 URL: https://svnweb.freebsd.org/changeset/base/348883 Log: r348879 introduced a wrong-way comparison that broke mmap. This change rights that comparison. Reported by: pho Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20595 Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Mon Jun 10 21:50:07 2019 (r348882) +++ head/sys/vm/vm_mmap.c Mon Jun 10 22:06:40 2019 (r348883) @@ -259,7 +259,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l size = len + pageoff; /* low end... */ size = round_page(size); /* hi end */ /* Check for rounding up to zero. */ - if (len < size) + if (len > size) return (ENOMEM); /* Ensure alignment is at least a page and fits in a pointer. */ From owner-svn-src-all@freebsd.org Mon Jun 10 22:58:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F3D415CB3E7 for ; Mon, 10 Jun 2019 22:58:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2810269D9C for ; Mon, 10 Jun 2019 22:58:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id l128so6489107qke.2 for ; Mon, 10 Jun 2019 15:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W7bom9QnspzaFs71kYZyYiaQGAM9uVchszIKw6Uf4TI=; b=0UOy1V+RTh+O7zxB9moLA9AztxsmVGZnW2gX7jbD05W+sJCMVWKbMakJugJU/1Xaot qfqBmbnvULIVhDqonpKkbtEO2Oh4e/R3k7PnZEALn4Y6kUmPw7ctp0g4a/FH9ux0Spj0 mMx8Qyfd60qpAAQkyhmDwXXusT7jrOhECCYNcKVlCsTFHYsUW4yDb9Soif/nw05yA85D BTYSgMMAS3XoI0cIczs+JKZp1hc48/7TBJU/B/fUKkZRI31co/xQotj7y1Bu6Ry0fRjg oCECoWPDhWcZcRvQ0Z8bqoGNnVl5+6U1RpQpr06cGueQcZGRmZ22q9BCjywFckZDlMeN fSAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W7bom9QnspzaFs71kYZyYiaQGAM9uVchszIKw6Uf4TI=; b=je3/Y9AWIoSY8s5tkrAP46jGjLlLzTssZ6Tx86dPnJwt2U0FokplSynAo5/bMWFCoF ZAIXE8KIYqMmNk3QuXADdPiCPEJIIPCMV6TRFJh4qoFGm+nqua/qhpD2nM3zLFWDSPia 2QpYqA8BkxFV7VrSHy/vXd2KdMccz1jcQ6OpwvK4ONEYYFw9yMgQkQjsWJwuZ2UZrBpt uQe80qvYYylF2SEn03DtyWUWlGg+8nxa0ueUhI2oMDMm59CrQEWzKkG04BTknJnbzr+f jz3zAMZ1eoNEv9acHGLTLdsXkmZUuqm37LgkxQwaUi80b2pDDuv1GXJ7Wyn0W6xg3Rgx eOkQ== X-Gm-Message-State: APjAAAU8DLwsR7i5I8ujyLJVGKMyOgzesmGs6pZthegy0dHkSlKB7e4v WuqfZXwQTJg7ax9rSOiczFImPMN1QQSb7j88uK2sWA== X-Google-Smtp-Source: APXvYqwSgnu6JSMfZ5TkayKWi/RQhQVjRGCc+m7PZrQEUhSbLN+xT3CQuz97tXgwkx+fIgCyA5qzZUAFqWK661u/qIo= X-Received: by 2002:a37:5942:: with SMTP id n63mr44966908qkb.69.1560207518537; Mon, 10 Jun 2019 15:58:38 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190611013853.E3415@besplex.bde.org> In-Reply-To: From: Warner Losh Date: Mon, 10 Jun 2019 16:58:27 -0600 Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: "Conrad E. Meyer" Cc: Bruce Evans , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 2810269D9C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.937,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 22:58:39 -0000 On Mon, Jun 10, 2019 at 10:51 AM Conrad Meyer wrote: > On Mon, Jun 10, 2019 at 9:17 AM Bruce Evans wrote: > > Only headers and libraries should support -std=c89. has > > lots of support for compilers and POSIX versions going back to K&R C, > > and only the K&R parts are completely broken. > > Is this due to specific policy, or just inertia? (No one has bothered > to remove the old bits?) The older parts being totally broken > suggests sheer inertia. > As far as I know, it's been policy because there are a number of ports that compile with -std=c89, or used to be. I accidentally broke that a long time ago and had to fix it to unbreak a few ports (but granted, this was a while ago). Warner From owner-svn-src-all@freebsd.org Mon Jun 10 23:25:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9B6715CB883; Mon, 10 Jun 2019 23:25:41 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5247C6A935; Mon, 10 Jun 2019 23:25:41 +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 268062139B; Mon, 10 Jun 2019 23:25:41 +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 x5ANPf4L041920; Mon, 10 Jun 2019 23:25:41 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ANPeBe041915; Mon, 10 Jun 2019 23:25:40 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201906102325.x5ANPeBe041915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 10 Jun 2019 23:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348885 - in head/sys: arm/allwinner arm/broadcom/bcm2835 arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/broadcom/bcm2835 arm64/rockchip X-SVN-Commit-Revision: 348885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5247C6A935 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 23:25:42 -0000 Author: bz Date: Mon Jun 10 23:25:40 2019 New Revision: 348885 URL: https://svnweb.freebsd.org/changeset/base/348885 Log: A bit of code hygiene (no functional changes). Hide unused code under #ifdef notyet (in one case the only caller is under that same ifdef), or if it is arm (not arm64) specific code under the __arm__ ifdef to not yield -Wunused-function warnings during the arm64 kernel compile. MFC after: 2 weeks Modified: head/sys/arm/allwinner/a10_timer.c head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c head/sys/arm64/rockchip/if_dwc_rk.c Modified: head/sys/arm/allwinner/a10_timer.c ============================================================================== --- head/sys/arm/allwinner/a10_timer.c Mon Jun 10 22:23:37 2019 (r348884) +++ head/sys/arm/allwinner/a10_timer.c Mon Jun 10 23:25:40 2019 (r348885) @@ -108,12 +108,16 @@ struct a10_timer_softc { bus_write_4(sc->res[A10_TIMER_MEMRES], reg, val) static u_int a10_timer_get_timecount(struct timecounter *); +#if defined(__arm__) static int a10_timer_timer_start(struct eventtimer *, sbintime_t first, sbintime_t period); static int a10_timer_timer_stop(struct eventtimer *); +#endif static uint64_t timer_read_counter64(struct a10_timer_softc *sc); +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc); +#endif static void a23_timer_timecounter_setup(struct a10_timer_softc *sc); static u_int a23_timer_get_timecount(struct timecounter *tc); @@ -279,6 +283,7 @@ a10_timer_irq(void *arg) * Event timer function for A10 and A13 */ +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc) { @@ -363,6 +368,7 @@ a10_timer_timer_stop(struct eventtimer *et) return (0); } +#endif /* * Timecounter functions for A23 and above Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Mon Jun 10 22:23:37 2019 (r348884) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Mon Jun 10 23:25:40 2019 (r348885) @@ -251,6 +251,7 @@ WR4(struct bcm_sdhost_softc *sc, bus_size_t off, uint3 bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); } +#ifdef notyet static inline uint16_t RD2(struct bcm_sdhost_softc *sc, bus_size_t off) { @@ -260,6 +261,7 @@ RD2(struct bcm_sdhost_softc *sc, bus_size_t off) return ((val >> (off & 3)*8) & 0xffff); } +#endif static inline uint8_t RD1(struct bcm_sdhost_softc *sc, bus_size_t off) Modified: head/sys/arm64/rockchip/if_dwc_rk.c ============================================================================== --- head/sys/arm64/rockchip/if_dwc_rk.c Mon Jun 10 22:23:37 2019 (r348884) +++ head/sys/arm64/rockchip/if_dwc_rk.c Mon Jun 10 23:25:40 2019 (r348885) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #define RK3328_GRF_MACPHY_CON3 0x0B0C #define RK3328_GRF_MACPHY_STATUS 0x0B10 +#ifdef notyet static void rk3328_set_delays(struct syscon *grf, phandle_t node) { @@ -82,6 +83,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3328_GRF_MAC_CON0, tx | rx | 0xFFFF0000); } +#endif #define RK3399_GRF_SOC_CON6 0xc218 #define RK3399_GRF_SOC_CON6_TX_MASK 0x7F @@ -89,6 +91,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) #define RK3399_GRF_SOC_CON6_RX_MASK 0x7F #define RK3399_GRF_SOC_CON6_RX_SHIFT 8 +#ifdef notyet static void rk3399_set_delays(struct syscon *grf, phandle_t node) { @@ -106,6 +109,7 @@ rk3399_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3399_GRF_SOC_CON6, tx | rx | 0xFFFF0000); } +#endif static int if_dwc_rk_probe(device_t dev) From owner-svn-src-all@freebsd.org Tue Jun 11 00:55:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3242415CCF56; Tue, 11 Jun 2019 00:55:56 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC49A6CEFD; Tue, 11 Jun 2019 00:55:55 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B933E222E8; Tue, 11 Jun 2019 00:55:55 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B0ttxr089235; Tue, 11 Jun 2019 00:55:55 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B0tsOM089231; Tue, 11 Jun 2019 00:55:54 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906110055.x5B0tsOM089231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 11 Jun 2019 00:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348886 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 348886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC49A6CEFD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 00:55:56 -0000 Author: mhorne Date: Tue Jun 11 00:55:54 2019 New Revision: 348886 URL: https://svnweb.freebsd.org/changeset/base/348886 Log: RISC-V: expose extension bits in AT_HWCAP AT_HWCAP is a field in the elf auxiliary vector meant to describe cpu-specific hardware features. For RISC-V we want to use this to indicate the presence of any standard extensions supported by the CPU. This allows userland applications to query the system for supported extensions using elf_aux_info(3). Support for an extension is indicated by the presence of its corresponding bit in AT_HWCAP -- e.g. systems supporting the 'c' extension (compressed instructions) will have the second bit set. Extensions advertised through AT_HWCAP are only those that are supported by all harts in the system. Reviewed by: jhb, markj Approved by: markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20493 Modified: head/sys/riscv/include/elf.h head/sys/riscv/include/md_var.h head/sys/riscv/riscv/elf_machdep.c head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/include/elf.h ============================================================================== --- head/sys/riscv/include/elf.h Mon Jun 10 23:25:40 2019 (r348885) +++ head/sys/riscv/include/elf.h Tue Jun 11 00:55:54 2019 (r348886) @@ -74,4 +74,15 @@ __ElfType(Auxinfo); /* TODO: set correct value */ #define ET_DYN_LOAD_ADDR 0x100000 +/* Flags passed in AT_HWCAP */ +#define HWCAP_ISA_BIT(c) (1 << ((c) - 'A')) +#define HWCAP_ISA_I HWCAP_ISA_BIT('I') +#define HWCAP_ISA_M HWCAP_ISA_BIT('M') +#define HWCAP_ISA_A HWCAP_ISA_BIT('A') +#define HWCAP_ISA_F HWCAP_ISA_BIT('F') +#define HWCAP_ISA_D HWCAP_ISA_BIT('D') +#define HWCAP_ISA_C HWCAP_ISA_BIT('C') +#define HWCAP_ISA_G \ + (HWCAP_ISA_I | HWCAP_ISA_M | HWCAP_ISA_A | HWCAP_ISA_F | HWCAP_ISA_D) + #endif /* !_MACHINE_ELF_H_ */ Modified: head/sys/riscv/include/md_var.h ============================================================================== --- head/sys/riscv/include/md_var.h Mon Jun 10 23:25:40 2019 (r348885) +++ head/sys/riscv/include/md_var.h Tue Jun 11 00:55:54 2019 (r348886) @@ -38,6 +38,7 @@ extern char sigcode[]; extern int szsigcode; extern uint64_t *vm_page_dump; extern int vm_page_dump_size; +extern u_long elf_hwcap; struct dumperinfo; Modified: head/sys/riscv/riscv/elf_machdep.c ============================================================================== --- head/sys/riscv/riscv/elf_machdep.c Mon Jun 10 23:25:40 2019 (r348885) +++ head/sys/riscv/riscv/elf_machdep.c Tue Jun 11 00:55:54 2019 (r348886) @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include +u_long elf_hwcap; + struct sysentvec elf64_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -90,6 +92,7 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, + .sv_hwcap = &elf_hwcap, }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); Modified: head/sys/riscv/riscv/identcpu.c ============================================================================== --- head/sys/riscv/riscv/identcpu.c Mon Jun 10 23:25:40 2019 (r348885) +++ head/sys/riscv/riscv/identcpu.c Tue Jun 11 00:55:54 2019 (r348886) @@ -32,18 +32,28 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); #include +#include +#include #include #include -#include #include #include +#include +#include #include +#ifdef FDT +#include +#include +#endif + char machine[] = "riscv"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, @@ -87,6 +97,84 @@ const struct cpu_implementers cpu_implementers[] = { { CPU_IMPL_UCB_ROCKET, "UC Berkeley Rocket" }, CPU_IMPLEMENTER_NONE, }; + +#ifdef FDT +/* + * The ISA string is made up of a small prefix (e.g. rv64) and up to 26 letters + * indicating the presence of the 26 possible standard extensions. Therefore 32 + * characters will be sufficient. + */ +#define ISA_NAME_MAXLEN 32 +#define ISA_PREFIX ("rv" __XSTRING(__riscv_xlen)) +#define ISA_PREFIX_LEN (sizeof(ISA_PREFIX) - 1) + +static void +fill_elf_hwcap(void *dummy __unused) +{ + u_long caps[256] = {0}; + char isa[ISA_NAME_MAXLEN]; + u_long hwcap; + phandle_t node; + ssize_t len; + int i; + + caps['i'] = caps['I'] = HWCAP_ISA_I; + caps['m'] = caps['M'] = HWCAP_ISA_M; + caps['a'] = caps['A'] = HWCAP_ISA_A; +#ifdef FPE + caps['f'] = caps['F'] = HWCAP_ISA_F; + caps['d'] = caps['D'] = HWCAP_ISA_D; +#endif + caps['c'] = caps['C'] = HWCAP_ISA_C; + + node = OF_finddevice("/cpus"); + if (node == -1) { + if (bootverbose) + printf("fill_elf_hwcap: Can't find cpus node\n"); + return; + } + + /* + * Iterate through the CPUs and examine their ISA string. While we + * could assign elf_hwcap to be whatever the boot CPU supports, to + * handle the (unusual) case of running a system with hetergeneous + * ISAs, keep only the extension bits that are common to all harts. + */ + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if (!fdt_is_compatible_strict(node, "riscv")) { + if (bootverbose) + printf("fill_elf_hwcap: Can't find cpu\n"); + return; + } + + len = OF_getprop(node, "riscv,isa", isa, sizeof(isa)); + KASSERT(len <= ISA_NAME_MAXLEN, ("ISA string truncated")); + if (len == -1) { + if (bootverbose) + printf("fill_elf_hwcap: " + "Can't find riscv,isa property\n"); + return; + } else if (strncmp(isa, ISA_PREFIX, ISA_PREFIX_LEN) != 0) { + if (bootverbose) + printf("fill_elf_hwcap: " + "Unsupported ISA string: %s\n", isa); + return; + } + + hwcap = 0; + for (i = ISA_PREFIX_LEN; i < len; i++) + hwcap |= caps[(unsigned char)isa[i]]; + + if (elf_hwcap != 0) + elf_hwcap &= hwcap; + else + elf_hwcap = hwcap; + + } +} + +SYSINIT(identcpu, SI_SUB_CPU, SI_ORDER_ANY, fill_elf_hwcap, NULL); +#endif void identify_cpu(void) From owner-svn-src-all@freebsd.org Tue Jun 11 00:59:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1522215CD01D; Tue, 11 Jun 2019 00:59:48 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5AB16D0A2; Tue, 11 Jun 2019 00:59:47 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BDA4222EE; Tue, 11 Jun 2019 00:59:47 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B0xlDG089442; Tue, 11 Jun 2019 00:59:47 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B0xlvA089441; Tue, 11 Jun 2019 00:59:47 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906110059.x5B0xlvA089441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 11 Jun 2019 00:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348887 - head/usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/usr.bin/procstat X-SVN-Commit-Revision: 348887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A5AB16D0A2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 00:59:48 -0000 Author: mhorne Date: Tue Jun 11 00:59:46 2019 New Revision: 348887 URL: https://svnweb.freebsd.org/changeset/base/348887 Log: procstat: Recognize HWCAP and HWCAP2 with auxv command The two most recent additions to the elf auxiliary vector are HWCAP and HWCAP2 which describe platform specific cpu capabilities. Make procstat recognize these fields so that they aren't displayed as UNKNOWN. Reviewed by: trociny, markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20582 Modified: head/usr.bin/procstat/procstat_auxv.c Modified: head/usr.bin/procstat/procstat_auxv.c ============================================================================== --- head/usr.bin/procstat/procstat_auxv.c Tue Jun 11 00:55:54 2019 (r348886) +++ head/usr.bin/procstat/procstat_auxv.c Tue Jun 11 00:59:46 2019 (r348887) @@ -185,6 +185,18 @@ procstat_auxv(struct procstat *procstat, struct kinfo_ prefix, "AT_EHDRFLAGS", (u_long)auxv[i].a_un.a_val); break; #endif +#ifdef AT_HWCAP + case AT_HWCAP: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_HWCAP/%#lx}\n", + prefix, "AT_HWCAP", (u_long)auxv[i].a_un.a_val); + break; +#endif +#ifdef AT_HWCAP2 + case AT_HWCAP2: + xo_emit("{dw:/%s}{Lw:/%-16s/%s}{:AT_HWCAP2/%#lx}\n", + prefix, "AT_HWCAP2", (u_long)auxv[i].a_un.a_val); + break; +#endif default: xo_emit("{dw:/%s}{Lw:/%16ld/%ld}{:UNKNOWN/%#lx}\n", prefix, auxv[i].a_type, auxv[i].a_un.a_val); From owner-svn-src-all@freebsd.org Tue Jun 11 01:09:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB4B15CD4F2; Tue, 11 Jun 2019 01:09:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 625626D774; Tue, 11 Jun 2019 01:09:55 +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 3D8872249E; Tue, 11 Jun 2019 01:09:55 +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 x5B19tsX094705; Tue, 11 Jun 2019 01:09:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B19tS6094704; Tue, 11 Jun 2019 01:09:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906110109.x5B19tS6094704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 01:09: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: r348888 - stable/12/sys/dev/oce X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/oce X-SVN-Commit-Revision: 348888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 625626D774 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 01:09:55 -0000 Author: mav Date: Tue Jun 11 01:09:54 2019 New Revision: 348888 URL: https://svnweb.freebsd.org/changeset/base/348888 Log: MFC r348332: Fix array out of bound panic introduced in r306219. As I see, different NICs in different configurations may have different numbers of TX and RX queues. The code was assuming 1:1 mapping between event queues (interrupts) and TX/RX queues. Since number of interrupts is set to maximum of TX and RX queues, when those two are different, the system is doomed. I have no documentation or deep knowledge about this hardware, so this change is based on general observations and code reading. If some of my guesses are wrong, please do better. I just confirmed HP NC550SFP NICs are working now. Modified: stable/12/sys/dev/oce/oce_if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/oce/oce_if.c ============================================================================== --- stable/12/sys/dev/oce/oce_if.c Tue Jun 11 00:59:46 2019 (r348887) +++ stable/12/sys/dev/oce/oce_if.c Tue Jun 11 01:09:54 2019 (r348888) @@ -2394,10 +2394,20 @@ oce_eqd_set_periodic(POCE_SOFTC sc) goto modify_eqd; } - rq = sc->rq[i]; - rxpkts = rq->rx_stats.rx_pkts; - wq = sc->wq[i]; - tx_reqs = wq->tx_stats.tx_reqs; + if (i == 0) { + rq = sc->rq[0]; + rxpkts = rq->rx_stats.rx_pkts; + } else + rxpkts = 0; + if (i + 1 < sc->nrqs) { + rq = sc->rq[i + 1]; + rxpkts += rq->rx_stats.rx_pkts; + } + if (i < sc->nwqs) { + wq = sc->wq[i]; + tx_reqs = wq->tx_stats.tx_reqs; + } else + tx_reqs = 0; now = ticks; if (!aic->ticks || now < aic->ticks || From owner-svn-src-all@freebsd.org Tue Jun 11 01:12:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12E3E15CD834 for ; Tue, 11 Jun 2019 01:12:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79A786DC57 for ; Tue, 11 Jun 2019 01:12:37 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1560215549; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=eWlQyx4hRz20zVmyVCKJP32BEMl8COk0njgrmRynBb4cl5SBC6FAPF7CxH35Z6ihbaPY8kY1+p3Hl XpyzpBkVdoPNtEV+aOMqVEhlVVPn0pUFDDM3EB9OiOe4jpupRVGMYre6J9S4Rl0vqE0ocbHgO2QuYS 2jse4sBW1KU6a3ROK6a9/wwLEPECvFnKLtiQs1w8Eeg66blPNVYR6Eh1isnqY1dS5cnoNIApgWSoHI KVhlPdxoMSmyj/B+Rqzq0enYxXD/b1q5u47OJf9pikKYBk6DxdS1nyYt/M3+8YOgbMS2E5nsM224K/ CVXI77Kp4w9nhwfim7Jtv4oZI6Bfp5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=RsTgiujJ5CDWSP++YXep9SkfpdIK2wm7aIYbDjroQUU=; b=P7326O/1AMp0B/2/RInfEQNJKs29M8CIkV+vx3WDSbVYTJBTU9n51TZx7nJPR7dN5523i0ZExnlHB C2NcZmTQ4mZBPP2OdFNL4ovYbEQJdwWqVmIv6EaOmv5zU71NhAKBIGawUMeJNX/BQfuWDFQ+SDo0mJ MNM8QNwtlPtKAm1F/TCbcm/M2NifEJXxSVpxZ6/939m6yDFfnX0Ae04EmqDn16fRFqMrrgIptvmufn 9X+UBSP0GO6V+hGhptGOZcktcM4AepfZsrBj0up1ceI8i5NPo8ginPdTF3GYz8YndF59rN4/c53+ZF rHIPr0VhwpXXQXY5HdxSrNdfAjbp02g== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=RsTgiujJ5CDWSP++YXep9SkfpdIK2wm7aIYbDjroQUU=; b=Vx4r4fHCrXl7fXwpiVFdy12E8VLDQYovsZ4TZoX88JQ0xrJBOZjeJ1HE+I/S1p1z6SbQVlxzri67F Y/k7H3f6iX8h2OhUhxOIz/IMgj1AmqE/nf1yeeAFv2nTG4uznioELxDSVcGC1hgWhrvq1aOotoFVoT MOJMsSgP+NOEJtJfBGPSpo9qmqwACKWtQroWxOPUh24UBx63dQKCogbDazqM7WuMSH83jUlB15Fkpq A5YObFDCZ62wIv7l5pHM2WqVIxqphKIa5QacLoLg1sQmJDiIPjw4SiQtTxogNEl7gjBGtb6f43p3LT p6NsCSTpgf6Au5VDD9pQoeyV8XvONXw== X-MHO-RoutePath: aGlwcGll X-MHO-User: f8c2858d-8be5-11e9-85c6-c97e5c048ed3 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id f8c2858d-8be5-11e9-85c6-c97e5c048ed3; Tue, 11 Jun 2019 01:12:26 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x5B1COPC086507; Mon, 10 Jun 2019 19:12:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r348886 - in head/sys/riscv: include riscv From: Ian Lepore To: Mitchell Horne , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 10 Jun 2019 19:12:24 -0600 In-Reply-To: <201906110055.x5B0tsOM089231@repo.freebsd.org> References: <201906110055.x5B0tsOM089231@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 79A786DC57 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 01:12:38 -0000 On Tue, 2019-06-11 at 00:55 +0000, Mitchell Horne wrote: > Author: mhorne > Date: Tue Jun 11 00:55:54 2019 > New Revision: 348886 > URL: https://svnweb.freebsd.org/changeset/base/348886 > > Log: > RISC-V: expose extension bits in AT_HWCAP > > AT_HWCAP is a field in the elf auxiliary vector meant to describe > cpu-specific hardware features. For RISC-V we want to use this to > indicate the presence of any standard extensions supported by the > CPU. > This allows userland applications to query the system for supported > extensions using elf_aux_info(3). > > Support for an extension is indicated by the presence of its > corresponding bit in AT_HWCAP -- e.g. systems supporting the 'c' > extension (compressed instructions) will have the second bit set. > > Extensions advertised through AT_HWCAP are only those that are > supported > by all harts in the system. > A word of advice from the arm world (a don't make the mistakes we did kind of thing): If linux has already defined AT_HWCAP values for riscv, life may be better in the long run if our values match theirs as much as possible. It will especially help with ports. -- Ian > Reviewed by: jhb, markj > Approved by: markj (mentor) > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D20493 > > Modified: > head/sys/riscv/include/elf.h > head/sys/riscv/include/md_var.h > head/sys/riscv/riscv/elf_machdep.c > head/sys/riscv/riscv/identcpu.c > > Modified: head/sys/riscv/include/elf.h > ===================================================================== > ========= > --- head/sys/riscv/include/elf.h Mon Jun 10 23:25:40 2019 (r348 > 885) > +++ head/sys/riscv/include/elf.h Tue Jun 11 00:55:54 2019 (r348 > 886) > @@ -74,4 +74,15 @@ __ElfType(Auxinfo); > /* TODO: set correct value */ > #define ET_DYN_LOAD_ADDR 0x100000 > > +/* Flags passed in AT_HWCAP */ > +#define HWCAP_ISA_BIT(c) (1 << ((c) - 'A')) > +#define HWCAP_ISA_I HWCAP_ISA_BIT('I') > +#define HWCAP_ISA_M HWCAP_ISA_BIT('M') > +#define HWCAP_ISA_A HWCAP_ISA_BIT('A') > +#define HWCAP_ISA_F HWCAP_ISA_BIT('F') > +#define HWCAP_ISA_D HWCAP_ISA_BIT('D') > +#define HWCAP_ISA_C HWCAP_ISA_BIT('C') > +#define HWCAP_ISA_G \ > + (HWCAP_ISA_I | HWCAP_ISA_M | HWCAP_ISA_A | HWCAP_ISA_F | > HWCAP_ISA_D) > + > #endif /* !_MACHINE_ELF_H_ */ > > Modified: head/sys/riscv/include/md_var.h > ===================================================================== > ========= > --- head/sys/riscv/include/md_var.h Mon Jun 10 23:25:40 2019 (r348 > 885) > +++ head/sys/riscv/include/md_var.h Tue Jun 11 00:55:54 2019 (r348 > 886) > @@ -38,6 +38,7 @@ extern char sigcode[]; > extern int szsigcode; > extern uint64_t *vm_page_dump; > extern int vm_page_dump_size; > +extern u_long elf_hwcap; > > struct dumperinfo; > > > Modified: head/sys/riscv/riscv/elf_machdep.c > ===================================================================== > ========= > --- head/sys/riscv/riscv/elf_machdep.c Mon Jun 10 23:25:40 > 2019 (r348885) > +++ head/sys/riscv/riscv/elf_machdep.c Tue Jun 11 00:55:54 > 2019 (r348886) > @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +u_long elf_hwcap; > + > struct sysentvec elf64_freebsd_sysvec = { > .sv_size = SYS_MAXSYSCALL, > .sv_table = sysent, > @@ -90,6 +92,7 @@ struct sysentvec elf64_freebsd_sysvec = { > .sv_schedtail = NULL, > .sv_thread_detach = NULL, > .sv_trap = NULL, > + .sv_hwcap = &elf_hwcap, > }; > INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); > > > Modified: head/sys/riscv/riscv/identcpu.c > ===================================================================== > ========= > --- head/sys/riscv/riscv/identcpu.c Mon Jun 10 23:25:40 2019 (r348 > 885) > +++ head/sys/riscv/riscv/identcpu.c Tue Jun 11 00:55:54 2019 (r348 > 886) > @@ -32,18 +32,28 @@ > * SUCH DAMAGE. > */ > > +#include "opt_platform.h" > + > #include > __FBSDID("$FreeBSD$"); > > #include > +#include > +#include > #include > #include > -#include > > #include > #include > +#include > +#include > #include > > +#ifdef FDT > +#include > +#include > +#endif > + > char machine[] = "riscv"; > > SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, > @@ -87,6 +97,84 @@ const struct cpu_implementers cpu_implementers[] = > { > { CPU_IMPL_UCB_ROCKET, "UC Berkeley Rocket" }, > CPU_IMPLEMENTER_NONE, > }; > + > +#ifdef FDT > +/* > + * The ISA string is made up of a small prefix (e.g. rv64) and up to > 26 letters > + * indicating the presence of the 26 possible standard extensions. > Therefore 32 > + * characters will be sufficient. > + */ > +#define ISA_NAME_MAXLEN 32 > +#define ISA_PREFIX ("rv" > __XSTRING(__riscv_xlen)) > +#define ISA_PREFIX_LEN (sizeof(ISA_PREFIX) - 1) > + > +static void > +fill_elf_hwcap(void *dummy __unused) > +{ > + u_long caps[256] = {0}; > + char isa[ISA_NAME_MAXLEN]; > + u_long hwcap; > + phandle_t node; > + ssize_t len; > + int i; > + > + caps['i'] = caps['I'] = HWCAP_ISA_I; > + caps['m'] = caps['M'] = HWCAP_ISA_M; > + caps['a'] = caps['A'] = HWCAP_ISA_A; > +#ifdef FPE > + caps['f'] = caps['F'] = HWCAP_ISA_F; > + caps['d'] = caps['D'] = HWCAP_ISA_D; > +#endif > + caps['c'] = caps['C'] = HWCAP_ISA_C; > + > + node = OF_finddevice("/cpus"); > + if (node == -1) { > + if (bootverbose) > + printf("fill_elf_hwcap: Can't find cpus > node\n"); > + return; > + } > + > + /* > + * Iterate through the CPUs and examine their ISA string. While > we > + * could assign elf_hwcap to be whatever the boot CPU supports, > to > + * handle the (unusual) case of running a system with > hetergeneous > + * ISAs, keep only the extension bits that are common to all > harts. > + */ > + for (node = OF_child(node); node > 0; node = OF_peer(node)) { > + if (!fdt_is_compatible_strict(node, "riscv")) { > + if (bootverbose) > + printf("fill_elf_hwcap: Can't find > cpu\n"); > + return; > + } > + > + len = OF_getprop(node, "riscv,isa", isa, sizeof(isa)); > + KASSERT(len <= ISA_NAME_MAXLEN, ("ISA string > truncated")); > + if (len == -1) { > + if (bootverbose) > + printf("fill_elf_hwcap: " > + "Can't find riscv,isa property\n"); > + return; > + } else if (strncmp(isa, ISA_PREFIX, ISA_PREFIX_LEN) != > 0) { > + if (bootverbose) > + printf("fill_elf_hwcap: " > + "Unsupported ISA string: %s\n", > isa); > + return; > + } > + > + hwcap = 0; > + for (i = ISA_PREFIX_LEN; i < len; i++) > + hwcap |= caps[(unsigned char)isa[i]]; > + > + if (elf_hwcap != 0) > + elf_hwcap &= hwcap; > + else > + elf_hwcap = hwcap; > + > + } > +} > + > +SYSINIT(identcpu, SI_SUB_CPU, SI_ORDER_ANY, fill_elf_hwcap, NULL); > +#endif > > void > identify_cpu(void) > From owner-svn-src-all@freebsd.org Tue Jun 11 03:06:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02DF615A874F; Tue, 11 Jun 2019 03:06:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91840709B1; Tue, 11 Jun 2019 03:06:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6731423935; Tue, 11 Jun 2019 03:06:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B36bn2058708; Tue, 11 Jun 2019 03:06:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B36bW0058706; Tue, 11 Jun 2019 03:06:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906110306.x5B36bW0058706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Jun 2019 03:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348889 - stable/12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91840709B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 03:06:38 -0000 Author: cy Date: Tue Jun 11 03:06:36 2019 New Revision: 348889 URL: https://svnweb.freebsd.org/changeset/base/348889 Log: MFC r348666: Clean up #ifdefs from old unsupported releases of FreeBSD. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/mlfk_ipl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Tue Jun 11 01:09:54 2019 (r348888) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Tue Jun 11 03:06:36 2019 (r348889) @@ -2882,8 +2882,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && (!defined(__FreeBSD_version) || \ - (__FreeBSD_version < 501108)) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) /* * disable delayed checksums. */ Modified: stable/12/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/mlfk_ipl.c Tue Jun 11 01:09:54 2019 (r348888) +++ stable/12/sys/contrib/ipfilter/netinet/mlfk_ipl.c Tue Jun 11 03:06:36 2019 (r348889) @@ -22,19 +22,19 @@ #include #include #include -#if __FreeBSD_version >= 500000 +#ifdef __FreeBSD_version # include # include +# ifdef _KERNEL +# include +# else +# define CURVNET_SET(arg) +# define CURVNET_RESTORE() +# define VNET_DEFINE(_t, _v) _t _v +# define VNET_DECLARE(_t, _v) extern _t _v +# define VNET(arg) arg +# endif #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 800000) && defined(_KERNEL) -#include -#else -#define CURVNET_SET(arg) -#define CURVNET_RESTORE() -#define VNET_DEFINE(_t, _v) _t _v -#define VNET_DECLARE(_t, _v) extern _t _v -#define VNET(arg) arg -#endif #include #include #include @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#if __FreeBSD_version >= 502116 +#ifdef __FreeBSD_version static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,25 +68,17 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#if (__FreeBSD_version >= 500024) -# if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version static int ipfopen __P((struct cdev*, int, int, struct thread *)); static int ipfclose __P((struct cdev*, int, int, struct thread *)); -# else -static int ipfopen __P((dev_t, int, int, struct thread *)); -static int ipfclose __P((dev_t, int, int, struct thread *)); -# endif /* __FreeBSD_version >= 502116 */ -#else -static int ipfopen __P((dev_t, int, int, struct proc *)); -static int ipfclose __P((dev_t, int, int, struct proc *)); -#endif -#if (__FreeBSD_version >= 502116) static int ipfread __P((struct cdev*, struct uio *, int)); static int ipfwrite __P((struct cdev*, struct uio *, int)); #else +static int ipfopen __P((dev_t, int, int, struct proc *)); +static int ipfclose __P((dev_t, int, int, struct proc *)); static int ipfread __P((dev_t, struct uio *, int)); static int ipfwrite __P((dev_t, struct uio *, int)); -#endif /* __FreeBSD_version >= 502116 */ +#endif SYSCTL_DECL(_net_inet); @@ -137,15 +129,13 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG #define CDEV_MAJOR 79 #include -#if __FreeBSD_version >= 500043 +#ifdef __FreeBSD_version # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); static struct cdevsw ipf_cdevsw = { -#if __FreeBSD_version >= 502103 .d_version = D_VERSION, .d_flags = 0, /* D_NEEDGIANT - Should be SMP safe */ -#endif .d_open = ipfopen, .d_close = ipfclose, .d_read = ipfread, @@ -153,9 +143,6 @@ static struct cdevsw ipf_cdevsw = { .d_ioctl = ipfioctl, .d_poll = ipfpoll, .d_name = "ipf", -#if __FreeBSD_version < 600000 - .d_maj = CDEV_MAJOR, -#endif }; #else static int ipfpoll(dev_t dev, int events, struct proc *td); @@ -174,12 +161,6 @@ static struct cdevsw ipf_cdevsw = { /* dump */ nodump, /* psize */ nopsize, /* flags */ 0, -# if (__FreeBSD_version < 500043) - /* bmaj */ -1, -# endif -# if (__FreeBSD_version >= 430000) - /* kqfilter */ NULL -# endif }; #endif @@ -444,7 +425,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#if __FreeBSD_version >= 500043 +#ifdef __FreeBSD_version ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -497,20 +478,13 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#if ((BSD >= 199506) || (__FreeBSD_version >= 220000)) +#ifdef __FreeBSD_version , devtype, p) int devtype; -# if (__FreeBSD_version >= 500024) struct thread *p; -# else - struct proc *p; -# endif /* __FreeBSD_version >= 500024 */ -#else -) -#endif -#if (__FreeBSD_version >= 502116) struct cdev *dev; #else +) dev_t dev; #endif int flags; @@ -544,20 +518,13 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#if ((BSD >= 199506) || (__FreeBSD_version >= 220000)) +#ifdef __FreeBSD_version , devtype, p) int devtype; -# if (__FreeBSD_version >= 500024) struct thread *p; -# else - struct proc *p; -# endif /* __FreeBSD_version >= 500024 */ -#else -) -#endif -#if (__FreeBSD_version >= 502116) struct cdev *dev; #else +) dev_t dev; #endif int flags; @@ -583,7 +550,7 @@ static int ipfread(dev, uio, ioflag) #else static int ipfread(dev, uio) #endif -#if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version struct cdev *dev; #else dev_t dev; @@ -630,7 +597,7 @@ static int ipfwrite(dev, uio, ioflag) #else static int ipfwrite(dev, uio) #endif -#if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version struct cdev *dev; #else dev_t dev; From owner-svn-src-all@freebsd.org Tue Jun 11 03:07:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9693D15A87B4; Tue, 11 Jun 2019 03:07:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CE7570AE0; Tue, 11 Jun 2019 03:07:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1945723937; Tue, 11 Jun 2019 03:07:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B37N8u058787; Tue, 11 Jun 2019 03:07:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B37NDU058786; Tue, 11 Jun 2019 03:07:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906110307.x5B37NDU058786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Jun 2019 03:07: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: r348890 - stable/12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3CE7570AE0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 03:07:24 -0000 Author: cy Date: Tue Jun 11 03:07:23 2019 New Revision: 348890 URL: https://svnweb.freebsd.org/changeset/base/348890 Log: MFC r348667: While working on a PR, more are discovered. Remove more #ifdefs missed in r343701. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jun 11 03:06:36 2019 (r348889) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jun 11 03:07:23 2019 (r348890) @@ -16,11 +16,11 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 400000) && \ +#if defined(__FreeBSD_version) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 440000) && \ +#if defined(__FreeBSD_version) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_random_ip_id.h" #endif @@ -33,7 +33,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include # include -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 800000) +#if defined(__FreeBSD_version) #include #endif # include From owner-svn-src-all@freebsd.org Tue Jun 11 03:39:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D16315AB131; Tue, 11 Jun 2019 03:39:22 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1A49716C2; Tue, 11 Jun 2019 03:39:21 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 977D823E65; Tue, 11 Jun 2019 03:39:21 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B3dLhq074326; Tue, 11 Jun 2019 03:39:21 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B3dLho074324; Tue, 11 Jun 2019 03:39:21 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906110339.x5B3dLho074324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Jun 2019 03:39:21 +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: r348891 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C1A49716C2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 03:39:22 -0000 Author: cy Date: Tue Jun 11 03:39:20 2019 New Revision: 348891 URL: https://svnweb.freebsd.org/changeset/base/348891 Log: MFC r348666: Clean up #ifdefs from old unsupported releases of FreeBSD. Approved by: re (gjb@) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Tue Jun 11 03:07:23 2019 (r348890) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Tue Jun 11 03:39:20 2019 (r348891) @@ -2882,8 +2882,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && (!defined(__FreeBSD_version) || \ - (__FreeBSD_version < 501108)) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) /* * disable delayed checksums. */ Modified: stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Tue Jun 11 03:07:23 2019 (r348890) +++ stable/11/sys/contrib/ipfilter/netinet/mlfk_ipl.c Tue Jun 11 03:39:20 2019 (r348891) @@ -22,19 +22,19 @@ #include #include #include -#if __FreeBSD_version >= 500000 +#ifdef __FreeBSD_version # include # include +# ifdef _KERNEL +# include +# else +# define CURVNET_SET(arg) +# define CURVNET_RESTORE() +# define VNET_DEFINE(_t, _v) _t _v +# define VNET_DECLARE(_t, _v) extern _t _v +# define VNET(arg) arg +# endif #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 800000) && defined(_KERNEL) -#include -#else -#define CURVNET_SET(arg) -#define CURVNET_RESTORE() -#define VNET_DEFINE(_t, _v) _t _v -#define VNET_DECLARE(_t, _v) extern _t _v -#define VNET(arg) arg -#endif #include #include #include @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#if __FreeBSD_version >= 502116 +#ifdef __FreeBSD_version static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,25 +68,17 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#if (__FreeBSD_version >= 500024) -# if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version static int ipfopen __P((struct cdev*, int, int, struct thread *)); static int ipfclose __P((struct cdev*, int, int, struct thread *)); -# else -static int ipfopen __P((dev_t, int, int, struct thread *)); -static int ipfclose __P((dev_t, int, int, struct thread *)); -# endif /* __FreeBSD_version >= 502116 */ -#else -static int ipfopen __P((dev_t, int, int, struct proc *)); -static int ipfclose __P((dev_t, int, int, struct proc *)); -#endif -#if (__FreeBSD_version >= 502116) static int ipfread __P((struct cdev*, struct uio *, int)); static int ipfwrite __P((struct cdev*, struct uio *, int)); #else +static int ipfopen __P((dev_t, int, int, struct proc *)); +static int ipfclose __P((dev_t, int, int, struct proc *)); static int ipfread __P((dev_t, struct uio *, int)); static int ipfwrite __P((dev_t, struct uio *, int)); -#endif /* __FreeBSD_version >= 502116 */ +#endif SYSCTL_DECL(_net_inet); @@ -137,15 +129,13 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG #define CDEV_MAJOR 79 #include -#if __FreeBSD_version >= 500043 +#ifdef __FreeBSD_version # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); static struct cdevsw ipf_cdevsw = { -#if __FreeBSD_version >= 502103 .d_version = D_VERSION, .d_flags = 0, /* D_NEEDGIANT - Should be SMP safe */ -#endif .d_open = ipfopen, .d_close = ipfclose, .d_read = ipfread, @@ -153,9 +143,6 @@ static struct cdevsw ipf_cdevsw = { .d_ioctl = ipfioctl, .d_poll = ipfpoll, .d_name = "ipf", -#if __FreeBSD_version < 600000 - .d_maj = CDEV_MAJOR, -#endif }; #else static int ipfpoll(dev_t dev, int events, struct proc *td); @@ -174,12 +161,6 @@ static struct cdevsw ipf_cdevsw = { /* dump */ nodump, /* psize */ nopsize, /* flags */ 0, -# if (__FreeBSD_version < 500043) - /* bmaj */ -1, -# endif -# if (__FreeBSD_version >= 430000) - /* kqfilter */ NULL -# endif }; #endif @@ -444,7 +425,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#if __FreeBSD_version >= 500043 +#ifdef __FreeBSD_version ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -497,20 +478,13 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#if ((BSD >= 199506) || (__FreeBSD_version >= 220000)) +#ifdef __FreeBSD_version , devtype, p) int devtype; -# if (__FreeBSD_version >= 500024) struct thread *p; -# else - struct proc *p; -# endif /* __FreeBSD_version >= 500024 */ -#else -) -#endif -#if (__FreeBSD_version >= 502116) struct cdev *dev; #else +) dev_t dev; #endif int flags; @@ -544,20 +518,13 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#if ((BSD >= 199506) || (__FreeBSD_version >= 220000)) +#ifdef __FreeBSD_version , devtype, p) int devtype; -# if (__FreeBSD_version >= 500024) struct thread *p; -# else - struct proc *p; -# endif /* __FreeBSD_version >= 500024 */ -#else -) -#endif -#if (__FreeBSD_version >= 502116) struct cdev *dev; #else +) dev_t dev; #endif int flags; @@ -583,7 +550,7 @@ static int ipfread(dev, uio, ioflag) #else static int ipfread(dev, uio) #endif -#if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version struct cdev *dev; #else dev_t dev; @@ -630,7 +597,7 @@ static int ipfwrite(dev, uio, ioflag) #else static int ipfwrite(dev, uio) #endif -#if (__FreeBSD_version >= 502116) +#ifdef __FreeBSD_version struct cdev *dev; #else dev_t dev; From owner-svn-src-all@freebsd.org Tue Jun 11 03:40:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A831615AB1D5; Tue, 11 Jun 2019 03:40:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D47171808; Tue, 11 Jun 2019 03:40:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27A8823E6A; Tue, 11 Jun 2019 03:40:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B3ePfM074439; Tue, 11 Jun 2019 03:40:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B3eP5J074438; Tue, 11 Jun 2019 03:40:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906110340.x5B3eP5J074438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 11 Jun 2019 03:40:25 +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: r348892 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D47171808 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 03:40:26 -0000 Author: cy Date: Tue Jun 11 03:40:25 2019 New Revision: 348892 URL: https://svnweb.freebsd.org/changeset/base/348892 Log: MFC r348667: While working on a PR, more are discovered. Remove more #ifdefs missed in r343701. Approved by: re (gjb@) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jun 11 03:39:20 2019 (r348891) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jun 11 03:40:25 2019 (r348892) @@ -16,11 +16,11 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 400000) && \ +#if defined(__FreeBSD_version) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 440000) && \ +#if defined(__FreeBSD_version) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_random_ip_id.h" #endif @@ -33,7 +33,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include # include -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 800000) +#if defined(__FreeBSD_version) #include #endif # include From owner-svn-src-all@freebsd.org Tue Jun 11 04:03:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A323F15ABAFD; Tue, 11 Jun 2019 04:03:37 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4456B7243E; Tue, 11 Jun 2019 04:03:37 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id B648B1DF00; Tue, 11 Jun 2019 04:03:36 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-oi1-f176.google.com with SMTP id m202so7908694oig.6; Mon, 10 Jun 2019 21:03:36 -0700 (PDT) X-Gm-Message-State: APjAAAVeWdM99amfa58cvVsb/6SGtMyRNylSlAptHKlBFuJlxAMHbFlS 7+QfA1XMHb3mHou1PHC9CcKdxPp2FZcOUL48EkI= X-Google-Smtp-Source: APXvYqxJUGwagK4K3ZUsFmDjVdSp3UO6uaLvzLWyrllLmqON37jbKqEeFnIs1DJxyEHYJ2GetF+kXm+4VViA1/mG+10= X-Received: by 2002:aca:3485:: with SMTP id b127mr13866091oia.86.1560225815585; Mon, 10 Jun 2019 21:03:35 -0700 (PDT) MIME-Version: 1.0 References: <201906110055.x5B0tsOM089231@repo.freebsd.org> In-Reply-To: From: Mitchell Horne Date: Tue, 11 Jun 2019 00:03:24 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r348886 - in head/sys/riscv: include riscv To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4456B7243E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 04:03:37 -0000 On Mon, Jun 10, 2019 at 9:12 PM Ian Lepore wrote: > > On Tue, 2019-06-11 at 00:55 +0000, Mitchell Horne wrote: > > Author: mhorne > > Date: Tue Jun 11 00:55:54 2019 > > New Revision: 348886 > > URL: https://svnweb.freebsd.org/changeset/base/348886 > > > > Log: > > RISC-V: expose extension bits in AT_HWCAP > > > > AT_HWCAP is a field in the elf auxiliary vector meant to describe > > cpu-specific hardware features. For RISC-V we want to use this to > > indicate the presence of any standard extensions supported by the > > CPU. > > This allows userland applications to query the system for supported > > extensions using elf_aux_info(3). > > > > Support for an extension is indicated by the presence of its > > corresponding bit in AT_HWCAP -- e.g. systems supporting the 'c' > > extension (compressed instructions) will have the second bit set. > > > > Extensions advertised through AT_HWCAP are only those that are > > supported > > by all harts in the system. > > > > A word of advice from the arm world (a don't make the mistakes we did > kind of thing): If linux has already defined AT_HWCAP values for > riscv, life may be better in the long run if our values match theirs as > much as possible. It will especially help with ports. > > -- Ian That's good advice. Rest assured that in this case we are mimicking the behaviour that's been implemented in Linux. Mitchell > > > Reviewed by: jhb, markj > > Approved by: markj (mentor) > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D20493 > > > > Modified: > > head/sys/riscv/include/elf.h > > head/sys/riscv/include/md_var.h > > head/sys/riscv/riscv/elf_machdep.c > > head/sys/riscv/riscv/identcpu.c > > > > Modified: head/sys/riscv/include/elf.h > > ===================================================================== > > ========= > > --- head/sys/riscv/include/elf.h Mon Jun 10 23:25:40 2019 (r348 > > 885) > > +++ head/sys/riscv/include/elf.h Tue Jun 11 00:55:54 2019 (r348 > > 886) > > @@ -74,4 +74,15 @@ __ElfType(Auxinfo); > > /* TODO: set correct value */ > > #define ET_DYN_LOAD_ADDR 0x100000 > > > > +/* Flags passed in AT_HWCAP */ > > +#define HWCAP_ISA_BIT(c) (1 << ((c) - 'A')) > > +#define HWCAP_ISA_I HWCAP_ISA_BIT('I') > > +#define HWCAP_ISA_M HWCAP_ISA_BIT('M') > > +#define HWCAP_ISA_A HWCAP_ISA_BIT('A') > > +#define HWCAP_ISA_F HWCAP_ISA_BIT('F') > > +#define HWCAP_ISA_D HWCAP_ISA_BIT('D') > > +#define HWCAP_ISA_C HWCAP_ISA_BIT('C') > > +#define HWCAP_ISA_G \ > > + (HWCAP_ISA_I | HWCAP_ISA_M | HWCAP_ISA_A | HWCAP_ISA_F | > > HWCAP_ISA_D) > > + > > #endif /* !_MACHINE_ELF_H_ */ > > > > Modified: head/sys/riscv/include/md_var.h > > ===================================================================== > > ========= > > --- head/sys/riscv/include/md_var.h Mon Jun 10 23:25:40 2019 (r348 > > 885) > > +++ head/sys/riscv/include/md_var.h Tue Jun 11 00:55:54 2019 (r348 > > 886) > > @@ -38,6 +38,7 @@ extern char sigcode[]; > > extern int szsigcode; > > extern uint64_t *vm_page_dump; > > extern int vm_page_dump_size; > > +extern u_long elf_hwcap; > > > > struct dumperinfo; > > > > > > Modified: head/sys/riscv/riscv/elf_machdep.c > > ===================================================================== > > ========= > > --- head/sys/riscv/riscv/elf_machdep.c Mon Jun 10 23:25:40 > > 2019 (r348885) > > +++ head/sys/riscv/riscv/elf_machdep.c Tue Jun 11 00:55:54 > > 2019 (r348886) > > @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > > > +u_long elf_hwcap; > > + > > struct sysentvec elf64_freebsd_sysvec = { > > .sv_size = SYS_MAXSYSCALL, > > .sv_table = sysent, > > @@ -90,6 +92,7 @@ struct sysentvec elf64_freebsd_sysvec = { > > .sv_schedtail = NULL, > > .sv_thread_detach = NULL, > > .sv_trap = NULL, > > + .sv_hwcap = &elf_hwcap, > > }; > > INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); > > > > > > Modified: head/sys/riscv/riscv/identcpu.c > > ===================================================================== > > ========= > > --- head/sys/riscv/riscv/identcpu.c Mon Jun 10 23:25:40 2019 (r348 > > 885) > > +++ head/sys/riscv/riscv/identcpu.c Tue Jun 11 00:55:54 2019 (r348 > > 886) > > @@ -32,18 +32,28 @@ > > * SUCH DAMAGE. > > */ > > > > +#include "opt_platform.h" > > + > > #include > > __FBSDID("$FreeBSD$"); > > > > #include > > +#include > > +#include > > #include > > #include > > -#include > > > > #include > > #include > > +#include > > +#include > > #include > > > > +#ifdef FDT > > +#include > > +#include > > +#endif > > + > > char machine[] = "riscv"; > > > > SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, > > @@ -87,6 +97,84 @@ const struct cpu_implementers cpu_implementers[] = > > { > > { CPU_IMPL_UCB_ROCKET, "UC Berkeley Rocket" }, > > CPU_IMPLEMENTER_NONE, > > }; > > + > > +#ifdef FDT > > +/* > > + * The ISA string is made up of a small prefix (e.g. rv64) and up to > > 26 letters > > + * indicating the presence of the 26 possible standard extensions. > > Therefore 32 > > + * characters will be sufficient. > > + */ > > +#define ISA_NAME_MAXLEN 32 > > +#define ISA_PREFIX ("rv" > > __XSTRING(__riscv_xlen)) > > +#define ISA_PREFIX_LEN (sizeof(ISA_PREFIX) - 1) > > + > > +static void > > +fill_elf_hwcap(void *dummy __unused) > > +{ > > + u_long caps[256] = {0}; > > + char isa[ISA_NAME_MAXLEN]; > > + u_long hwcap; > > + phandle_t node; > > + ssize_t len; > > + int i; > > + > > + caps['i'] = caps['I'] = HWCAP_ISA_I; > > + caps['m'] = caps['M'] = HWCAP_ISA_M; > > + caps['a'] = caps['A'] = HWCAP_ISA_A; > > +#ifdef FPE > > + caps['f'] = caps['F'] = HWCAP_ISA_F; > > + caps['d'] = caps['D'] = HWCAP_ISA_D; > > +#endif > > + caps['c'] = caps['C'] = HWCAP_ISA_C; > > + > > + node = OF_finddevice("/cpus"); > > + if (node == -1) { > > + if (bootverbose) > > + printf("fill_elf_hwcap: Can't find cpus > > node\n"); > > + return; > > + } > > + > > + /* > > + * Iterate through the CPUs and examine their ISA string. While > > we > > + * could assign elf_hwcap to be whatever the boot CPU supports, > > to > > + * handle the (unusual) case of running a system with > > hetergeneous > > + * ISAs, keep only the extension bits that are common to all > > harts. > > + */ > > + for (node = OF_child(node); node > 0; node = OF_peer(node)) { > > + if (!fdt_is_compatible_strict(node, "riscv")) { > > + if (bootverbose) > > + printf("fill_elf_hwcap: Can't find > > cpu\n"); > > + return; > > + } > > + > > + len = OF_getprop(node, "riscv,isa", isa, sizeof(isa)); > > + KASSERT(len <= ISA_NAME_MAXLEN, ("ISA string > > truncated")); > > + if (len == -1) { > > + if (bootverbose) > > + printf("fill_elf_hwcap: " > > + "Can't find riscv,isa property\n"); > > + return; > > + } else if (strncmp(isa, ISA_PREFIX, ISA_PREFIX_LEN) != > > 0) { > > + if (bootverbose) > > + printf("fill_elf_hwcap: " > > + "Unsupported ISA string: %s\n", > > isa); > > + return; > > + } > > + > > + hwcap = 0; > > + for (i = ISA_PREFIX_LEN; i < len; i++) > > + hwcap |= caps[(unsigned char)isa[i]]; > > + > > + if (elf_hwcap != 0) > > + elf_hwcap &= hwcap; > > + else > > + elf_hwcap = hwcap; > > + > > + } > > +} > > + > > +SYSINIT(identcpu, SI_SUB_CPU, SI_ORDER_ANY, fill_elf_hwcap, NULL); > > +#endif > > > > void > > identify_cpu(void) > > > From owner-svn-src-all@freebsd.org Tue Jun 11 08:20:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4376F15B28F7; Tue, 11 Jun 2019 08:20:19 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [176.58.89.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D8381845; Tue, 11 Jun 2019 08:20:18 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 45NNGg3Gxyz3c7W; Tue, 11 Jun 2019 08:20:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id 83ZYRQggd1LF; Tue, 11 Jun 2019 08:20:10 +0000 (UTC) Received: from garnet.daemonic.se (host-95-192-235-172.mobileonline.telia.com [95.192.235.172]) by mail.daemonic.se (Postfix) with ESMTPSA id 45NNGf4Xwwz3c7V; Tue, 11 Jun 2019 08:20:10 +0000 (UTC) Subject: Re: svn commit: r348873 - head/sys/dev/atkbdc To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906102004.x5AK46EI079752@gndrsh.dnsmgr.net> From: Niclas Zeising Message-ID: <4407062a-002e-f84d-5b18-9b748c9e1f53@freebsd.org> Date: Tue, 11 Jun 2019 10:20:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201906102004.x5AK46EI079752@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C8D8381845 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.961,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 08:20:19 -0000 On 2019-06-10 22:04, Rodney W. Grimes wrote: >> Author: zeising (doc,ports committer) >> Date: Mon Jun 10 18:19:49 2019 >> New Revision: 348873 >> URL: https://svnweb.freebsd.org/changeset/base/348873 >> >> Log: >> psm(4): Enable touchpads and trackpads by default >> >> Enable synaptics and elantech touchpads, as well as IBM/Lenovo TrackPoints >> by default, instead of having users find and toggle a loader tunable. >> This makes things like two finger scroll and other modern features work out >> of the box with X. By enabling these settings by default, we get a better >> desktop experience in X, since xserver and evdev can make use of the more >> advanced synaptics and elantech features. >> >> Reviewed by: imp, wulf, 0mp >> Approved by: imp >> Sponsored by: B3 Init (zeising) >> Differential Revision: https://reviews.freebsd.org/D20507 > > This should of probably had a > Relnotes: Yes > as it changes default system behavior. You are right, sorry for not thinking about that. Regards -- Niclas Zeising From owner-svn-src-all@freebsd.org Tue Jun 11 08:50:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A030315B31B8; Tue, 11 Jun 2019 08:50:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 398B182A5C; Tue, 11 Jun 2019 08:50:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1052427306; Tue, 11 Jun 2019 08:50:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B8oQJq036199; Tue, 11 Jun 2019 08:50:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B8oQLJ036198; Tue, 11 Jun 2019 08:50:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906110850.x5B8oQLJ036198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 11 Jun 2019 08:50:26 +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: r348893 - stable/11/lib/libusb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/lib/libusb X-SVN-Commit-Revision: 348893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 398B182A5C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 08:50:27 -0000 Author: hselasky Date: Tue Jun 11 08:50:26 2019 New Revision: 348893 URL: https://svnweb.freebsd.org/changeset/base/348893 Log: MFC r348797: Fix for reading the configuration descriptor in libusb. Catch invalid configuration descriptor reads early on to avoid issues with devices that don't check for a valid USB configuration read request. Submitted by: takahiro.kurosawa@gmail.com PR: 238412 Approved by: re (kib) Modified: stable/11/lib/libusb/libusb20.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libusb/libusb20.c ============================================================================== --- stable/11/lib/libusb/libusb20.c Tue Jun 11 03:40:25 2019 (r348892) +++ stable/11/lib/libusb/libusb20.c Tue Jun 11 08:50:26 2019 (r348893) @@ -953,6 +953,14 @@ libusb20_dev_alloc_config(struct libusb20_device *pdev uint8_t do_close; int error; + /* + * Catch invalid configuration descriptor reads early on to + * avoid issues with devices that don't check for a valid USB + * configuration read request. + */ + if (configIndex >= pdev->ddesc.bNumConfigurations) + return (NULL); + if (!pdev->is_opened) { error = libusb20_dev_open(pdev, 0); if (error) { From owner-svn-src-all@freebsd.org Tue Jun 11 08:52:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A153D15B3676; Tue, 11 Jun 2019 08:52:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 427FA8301F; Tue, 11 Jun 2019 08:52:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 795A2274B9; Tue, 11 Jun 2019 08:52:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B8qmrL041349; Tue, 11 Jun 2019 08:52:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B8qm9R041348; Tue, 11 Jun 2019 08:52:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906110852.x5B8qm9R041348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 11 Jun 2019 08:52: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: r348894 - stable/12/lib/libusb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/lib/libusb X-SVN-Commit-Revision: 348894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 427FA8301F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 08:52:49 -0000 Author: hselasky Date: Tue Jun 11 08:52:48 2019 New Revision: 348894 URL: https://svnweb.freebsd.org/changeset/base/348894 Log: MFC r348797: Fix for reading the configuration descriptor in libusb. Catch invalid configuration descriptor reads early on to avoid issues with devices that don't check for a valid USB configuration read request. Submitted by: takahiro.kurosawa@gmail.com PR: 238412 Modified: stable/12/lib/libusb/libusb20.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libusb/libusb20.c ============================================================================== --- stable/12/lib/libusb/libusb20.c Tue Jun 11 08:50:26 2019 (r348893) +++ stable/12/lib/libusb/libusb20.c Tue Jun 11 08:52:48 2019 (r348894) @@ -955,6 +955,14 @@ libusb20_dev_alloc_config(struct libusb20_device *pdev uint8_t do_close; int error; + /* + * Catch invalid configuration descriptor reads early on to + * avoid issues with devices that don't check for a valid USB + * configuration read request. + */ + if (configIndex >= pdev->ddesc.bNumConfigurations) + return (NULL); + if (!pdev->is_opened) { error = libusb20_dev_open(pdev, 0); if (error) { From owner-svn-src-all@freebsd.org Tue Jun 11 08:53:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FA5015B3720; Tue, 11 Jun 2019 08:53:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D53678319A; Tue, 11 Jun 2019 08:53:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF82F274BC; Tue, 11 Jun 2019 08:53:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B8rQWf041452; Tue, 11 Jun 2019 08:53:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B8rQun041451; Tue, 11 Jun 2019 08:53:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906110853.x5B8rQun041451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 11 Jun 2019 08:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r348895 - stable/10/lib/libusb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/lib/libusb X-SVN-Commit-Revision: 348895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D53678319A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 08:53:27 -0000 Author: hselasky Date: Tue Jun 11 08:53:26 2019 New Revision: 348895 URL: https://svnweb.freebsd.org/changeset/base/348895 Log: MFC r348797: Fix for reading the configuration descriptor in libusb. Catch invalid configuration descriptor reads early on to avoid issues with devices that don't check for a valid USB configuration read request. Submitted by: takahiro.kurosawa@gmail.com PR: 238412 Modified: stable/10/lib/libusb/libusb20.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb20.c ============================================================================== --- stable/10/lib/libusb/libusb20.c Tue Jun 11 08:52:48 2019 (r348894) +++ stable/10/lib/libusb/libusb20.c Tue Jun 11 08:53:26 2019 (r348895) @@ -935,6 +935,14 @@ libusb20_dev_alloc_config(struct libusb20_device *pdev uint8_t do_close; int error; + /* + * Catch invalid configuration descriptor reads early on to + * avoid issues with devices that don't check for a valid USB + * configuration read request. + */ + if (configIndex >= pdev->ddesc.bNumConfigurations) + return (NULL); + if (!pdev->is_opened) { error = libusb20_dev_open(pdev, 0); if (error) { From owner-svn-src-all@freebsd.org Tue Jun 11 08:54:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01DE315B3820; Tue, 11 Jun 2019 08:54:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A60C83324; Tue, 11 Jun 2019 08:54:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5392F274BE; Tue, 11 Jun 2019 08:54:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5B8sMVj041559; Tue, 11 Jun 2019 08:54:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5B8sM2w041558; Tue, 11 Jun 2019 08:54:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201906110854.x5B8sM2w041558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 11 Jun 2019 08:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r348896 - stable/9/lib/libusb X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/lib/libusb X-SVN-Commit-Revision: 348896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7A60C83324 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 08:54:23 -0000 Author: hselasky Date: Tue Jun 11 08:54:21 2019 New Revision: 348896 URL: https://svnweb.freebsd.org/changeset/base/348896 Log: MFC r348797: Fix for reading the configuration descriptor in libusb. Catch invalid configuration descriptor reads early on to avoid issues with devices that don't check for a valid USB configuration read request. Submitted by: takahiro.kurosawa@gmail.com PR: 238412 Modified: stable/9/lib/libusb/libusb20.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb20.c ============================================================================== --- stable/9/lib/libusb/libusb20.c Tue Jun 11 08:53:26 2019 (r348895) +++ stable/9/lib/libusb/libusb20.c Tue Jun 11 08:54:21 2019 (r348896) @@ -924,6 +924,14 @@ libusb20_dev_alloc_config(struct libusb20_device *pdev uint8_t do_close; int error; + /* + * Catch invalid configuration descriptor reads early on to + * avoid issues with devices that don't check for a valid USB + * configuration read request. + */ + if (configIndex >= pdev->ddesc.bNumConfigurations) + return (NULL); + if (!pdev->is_opened) { error = libusb20_dev_open(pdev, 0); if (error) { From owner-svn-src-all@freebsd.org Tue Jun 11 10:04:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1503E15B4FD9; Tue, 11 Jun 2019 10:04:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC99C853A1; Tue, 11 Jun 2019 10:04:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86162AF; Tue, 11 Jun 2019 10:04:04 +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 x5BA44fj078226; Tue, 11 Jun 2019 10:04:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BA44te078225; Tue, 11 Jun 2019 10:04:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906111004.x5BA44te078225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Jun 2019 10:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348897 - stable/12/sys/amd64/include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/amd64/include X-SVN-Commit-Revision: 348897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC99C853A1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 10:04:05 -0000 Author: kib Date: Tue Jun 11 10:04:04 2019 New Revision: 348897 URL: https://svnweb.freebsd.org/changeset/base/348897 Log: MFC r348815: Correct definition for PGEX_SGX. Modified: stable/12/sys/amd64/include/pmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/include/pmap.h ============================================================================== --- stable/12/sys/amd64/include/pmap.h Tue Jun 11 08:54:21 2019 (r348896) +++ stable/12/sys/amd64/include/pmap.h Tue Jun 11 10:04:04 2019 (r348897) @@ -138,7 +138,7 @@ #define PGEX_RSV 0x08 /* reserved PTE field is non-zero */ #define PGEX_I 0x10 /* during an instruction fetch */ #define PGEX_PK 0x20 /* protection key violation */ -#define PGEX_SGX 0x40 /* SGX-related */ +#define PGEX_SGX 0x8000 /* SGX-related */ /* * undef the PG_xx macros that define bits in the regular x86 PTEs that From owner-svn-src-all@freebsd.org Tue Jun 11 10:41:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91C4315B5AA5; Tue, 11 Jun 2019 10:41:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 337DD865BD; Tue, 11 Jun 2019 10:41:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08AC0753; Tue, 11 Jun 2019 10:41:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BAfdQh096284; Tue, 11 Jun 2019 10:41:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BAfdMn096283; Tue, 11 Jun 2019 10:41:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906111041.x5BAfdMn096283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Jun 2019 10:41:39 +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: r348898 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 348898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 337DD865BD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 10:41:40 -0000 Author: kib Date: Tue Jun 11 10:41:39 2019 New Revision: 348898 URL: https://svnweb.freebsd.org/changeset/base/348898 Log: MFC r348816: Style MAP_ENTRY_ and MAP_ definitions. For this MFC, I am also adding MAP_ENTRY_VN_EXEC MAP_ENTRY and MAP_VN_EXEC, since this route seems to cause less future conflicts. Modified: stable/12/sys/vm/vm_map.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Tue Jun 11 10:04:04 2019 (r348897) +++ stable/12/sys/vm/vm_map.h Tue Jun 11 10:41:39 2019 (r348898) @@ -120,34 +120,38 @@ struct vm_map_entry { struct thread *wiring_thread; }; -#define MAP_ENTRY_NOSYNC 0x0001 -#define MAP_ENTRY_IS_SUB_MAP 0x0002 -#define MAP_ENTRY_COW 0x0004 -#define MAP_ENTRY_NEEDS_COPY 0x0008 -#define MAP_ENTRY_NOFAULT 0x0010 -#define MAP_ENTRY_USER_WIRED 0x0020 +#define MAP_ENTRY_NOSYNC 0x00000001 +#define MAP_ENTRY_IS_SUB_MAP 0x00000002 +#define MAP_ENTRY_COW 0x00000004 +#define MAP_ENTRY_NEEDS_COPY 0x00000008 +#define MAP_ENTRY_NOFAULT 0x00000010 +#define MAP_ENTRY_USER_WIRED 0x00000020 -#define MAP_ENTRY_BEHAV_NORMAL 0x0000 /* default behavior */ -#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x0040 /* expect sequential access */ -#define MAP_ENTRY_BEHAV_RANDOM 0x0080 /* expect random access */ -#define MAP_ENTRY_BEHAV_RESERVED 0x00C0 /* future use */ +#define MAP_ENTRY_BEHAV_NORMAL 0x00000000 /* default behavior */ +#define MAP_ENTRY_BEHAV_SEQUENTIAL 0x00000040 /* expect sequential + access */ +#define MAP_ENTRY_BEHAV_RANDOM 0x00000080 /* expect random + access */ +#define MAP_ENTRY_BEHAV_RESERVED 0x000000c0 /* future use */ +#define MAP_ENTRY_BEHAV_MASK 0x000000c0 +#define MAP_ENTRY_IN_TRANSITION 0x00000100 /* entry being + changed */ +#define MAP_ENTRY_NEEDS_WAKEUP 0x00000200 /* waiters in + transition */ +#define MAP_ENTRY_NOCOREDUMP 0x00000400 /* don't include in + a core */ +#define MAP_ENTRY_VN_EXEC 0x00000800 /* text vnode mapping */ +#define MAP_ENTRY_GROWS_DOWN 0x00001000 /* top-down stacks */ +#define MAP_ENTRY_GROWS_UP 0x00002000 /* bottom-up stacks */ -#define MAP_ENTRY_BEHAV_MASK 0x00C0 +#define MAP_ENTRY_WIRE_SKIPPED 0x00004000 +#define MAP_ENTRY_VN_WRITECNT 0x00008000 /* writeable vnode + mapping */ +#define MAP_ENTRY_GUARD 0x00010000 +#define MAP_ENTRY_STACK_GAP_DN 0x00020000 +#define MAP_ENTRY_STACK_GAP_UP 0x00040000 +#define MAP_ENTRY_HEADER 0x00080000 -#define MAP_ENTRY_IN_TRANSITION 0x0100 /* entry being changed */ -#define MAP_ENTRY_NEEDS_WAKEUP 0x0200 /* waiters in transition */ -#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */ - -#define MAP_ENTRY_GROWS_DOWN 0x1000 /* Top-down stacks */ -#define MAP_ENTRY_GROWS_UP 0x2000 /* Bottom-up stacks */ - -#define MAP_ENTRY_WIRE_SKIPPED 0x4000 -#define MAP_ENTRY_VN_WRITECNT 0x8000 /* writeable vnode mapping */ -#define MAP_ENTRY_GUARD 0x10000 -#define MAP_ENTRY_STACK_GAP_DN 0x20000 -#define MAP_ENTRY_STACK_GAP_UP 0x40000 -#define MAP_ENTRY_HEADER 0x80000 - #ifdef _KERNEL static __inline u_char vm_map_entry_behavior(vm_map_entry_t entry) @@ -335,24 +339,25 @@ long vmspace_resident_count(struct vmspace *vmspace); /* * Copy-on-write flags for vm_map operations */ -#define MAP_INHERIT_SHARE 0x0001 -#define MAP_COPY_ON_WRITE 0x0002 -#define MAP_NOFAULT 0x0004 -#define MAP_PREFAULT 0x0008 -#define MAP_PREFAULT_PARTIAL 0x0010 -#define MAP_DISABLE_SYNCER 0x0020 -#define MAP_CHECK_EXCL 0x0040 -#define MAP_CREATE_GUARD 0x0080 -#define MAP_DISABLE_COREDUMP 0x0100 -#define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ -#define MAP_VN_WRITECOUNT 0x0400 -#define MAP_REMAP 0x0800 -#define MAP_STACK_GROWS_DOWN 0x1000 -#define MAP_STACK_GROWS_UP 0x2000 -#define MAP_ACC_CHARGED 0x4000 -#define MAP_ACC_NO_CHARGE 0x8000 -#define MAP_CREATE_STACK_GAP_UP 0x10000 -#define MAP_CREATE_STACK_GAP_DN 0x20000 +#define MAP_INHERIT_SHARE 0x00000001 +#define MAP_COPY_ON_WRITE 0x00000002 +#define MAP_NOFAULT 0x00000004 +#define MAP_PREFAULT 0x00000008 +#define MAP_PREFAULT_PARTIAL 0x00000010 +#define MAP_DISABLE_SYNCER 0x00000020 +#define MAP_CHECK_EXCL 0x00000040 +#define MAP_CREATE_GUARD 0x00000080 +#define MAP_DISABLE_COREDUMP 0x00000100 +#define MAP_PREFAULT_MADVISE 0x00000200 /* from (user) madvise request */ +#define MAP_VN_WRITECOUNT 0x00000400 +#define MAP_REMAP 0x00000800 +#define MAP_STACK_GROWS_DOWN 0x00001000 +#define MAP_STACK_GROWS_UP 0x00002000 +#define MAP_ACC_CHARGED 0x00004000 +#define MAP_ACC_NO_CHARGE 0x00008000 +#define MAP_CREATE_STACK_GAP_UP 0x00010000 +#define MAP_CREATE_STACK_GAP_DN 0x00020000 +#define MAP_VN_EXEC 0x00040000 /* * vm_fault option flags From owner-svn-src-all@freebsd.org Tue Jun 11 11:16:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB9EF15B7660; Tue, 11 Jun 2019 11:16:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91A99874F0; Tue, 11 Jun 2019 11:16:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69918CA3; Tue, 11 Jun 2019 11:16:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BBGgFQ014835; Tue, 11 Jun 2019 11:16:42 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BBGgtE014834; Tue, 11 Jun 2019 11:16:42 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201906111116.x5BBGgtE014834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Tue, 11 Jun 2019 11:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348899 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 348899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91A99874F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 11:16:43 -0000 Author: luporl Date: Tue Jun 11 11:16:41 2019 New Revision: 348899 URL: https://svnweb.freebsd.org/changeset/base/348899 Log: [PPC64] Fix ofw_initrd Before this change, OFW initrd (as md) handling code was simulating an ofwbus device. But as there isn't really a Device Tree (DT) node representing OFW initrd (it is specified in 2 properties under /chosen), its driver was in fact stealing other driver's DT node. This was noticed after MD_ROOT_MEM became default and QEMU's USB keyboard stopped working under VNC. This change consists in simplifying the process of detection and mapping of initrd memory, turning it into a simple startup step, instead of trying to simulate a device. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20553 Modified: head/sys/powerpc/ofw/ofw_initrd.c Modified: head/sys/powerpc/ofw/ofw_initrd.c ============================================================================== --- head/sys/powerpc/ofw/ofw_initrd.c Tue Jun 11 10:41:39 2019 (r348898) +++ head/sys/powerpc/ofw/ofw_initrd.c Tue Jun 11 11:16:41 2019 (r348899) @@ -43,71 +43,41 @@ __FBSDID("$FreeBSD$"); #include "opt_md.h" -#ifdef MD_ROOT_MEM extern u_char *mfs_root; -extern uint32_t mfs_root_size; -#else -#warning "MD_ROOT_MEM should be set to use ofw initrd as a md device" -#endif +extern int mfs_root_size; -/* bus entry points */ -static int ofw_initrd_probe(device_t dev); -static int ofw_initrd_attach(device_t dev); -static void ofw_initrd_identify(driver_t *driver, device_t parent); +static void ofw_initrd_probe_and_attach(void *junk); -struct ofw_initrd_softc { - device_t sc_dev; - vm_paddr_t start; - vm_paddr_t end; -}; +SYSINIT(ofw_initrd_probe_and_attach, SI_SUB_KMEM, SI_ORDER_ANY, + ofw_initrd_probe_and_attach, NULL); -static int -ofw_initrd_probe(device_t dev) +static void +ofw_initrd_probe_and_attach(void *junk) { phandle_t chosen; - - /* limit this device to one unit */ - if (device_get_unit(dev) != 0) - return (ENXIO); - - chosen = OF_finddevice("/chosen"); - if (chosen <= 0) { - return (ENXIO); - } - - if (!OF_hasprop(chosen, "linux,initrd-start") || - !OF_hasprop(chosen, "linux,initrd-end")) - return (ENXIO); - - device_set_desc(dev, "OFW initrd memregion loader"); - return (BUS_PROBE_DEFAULT); -} - -static int -ofw_initrd_attach(device_t dev) -{ - struct ofw_initrd_softc *sc; vm_paddr_t start, end; - phandle_t chosen; pcell_t cell[2]; ssize_t size; - sc = device_get_softc(dev); + if (!hw_direct_map) + return; chosen = OF_finddevice("/chosen"); - if (chosen <= 0) { - device_printf(dev, "/chosen not found\n"); - return (ENXIO); - } + if (chosen <= 0) + return; + if (!OF_hasprop(chosen, "linux,initrd-start") || + !OF_hasprop(chosen, "linux,initrd-end")) + return; + size = OF_getencprop(chosen, "linux,initrd-start", cell, sizeof(cell)); if (size == 4) start = cell[0]; else if (size == 8) start = (uint64_t)cell[0] << 32 | cell[1]; else { - device_printf(dev, "Wrong linux,initrd-start size\n"); - return (ENXIO); + printf("ofw_initrd: Wrong linux,initrd-start size\n"); + return; } size = OF_getencprop(chosen, "linux,initrd-end", cell, sizeof(cell)); @@ -116,44 +86,15 @@ ofw_initrd_attach(device_t dev) else if (size == 8) end = (uint64_t)cell[0] << 32 | cell[1]; else{ - device_printf(dev, "Wrong linux,initrd-end size\n"); - return (ENXIO); + printf("ofw_initrd: Wrong linux,initrd-end size\n"); + return; } if (end - start > 0) { mfs_root = (u_char *) PHYS_TO_DMAP(start); mfs_root_size = end - start; - - return (0); + printf("ofw_initrd: initrd loaded at 0x%08lx-0x%08lx\n", + start, end); } - - return (ENXIO); } -static void -ofw_initrd_identify(driver_t *driver, device_t parent) -{ - if (device_find_child(parent, "initrd", -1) != NULL) - return; - - if (BUS_ADD_CHILD(parent, 10, "initrd", -1) == NULL) - device_printf(parent, "add ofw_initrd child failed\n"); -} - -static device_method_t ofw_initrd_methods[] = { - DEVMETHOD(device_identify, ofw_initrd_identify), - DEVMETHOD(device_probe, ofw_initrd_probe), - DEVMETHOD(device_attach, ofw_initrd_attach), - DEVMETHOD_END -}; - -static driver_t ofw_initrd_driver = { - "ofw_initrd", - ofw_initrd_methods, - sizeof(struct ofw_initrd_softc) -}; - -static devclass_t ofw_initrd_devclass; - -DRIVER_MODULE(ofw_initrd, ofwbus, ofw_initrd_driver, ofw_initrd_devclass, - NULL, NULL); From owner-svn-src-all@freebsd.org Tue Jun 11 11:23:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E537B15B7978; Tue, 11 Jun 2019 11:23:16 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82B3187B6F; Tue, 11 Jun 2019 11:23:16 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C54AE76; Tue, 11 Jun 2019 11:23:16 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BBNGfB020385; Tue, 11 Jun 2019 11:23:16 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BBNGZv020384; Tue, 11 Jun 2019 11:23:16 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201906111123.x5BBNGZv020384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Tue, 11 Jun 2019 11:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348900 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 348900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82B3187B6F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 11:23:17 -0000 Author: luporl Date: Tue Jun 11 11:23:15 2019 New Revision: 348900 URL: https://svnweb.freebsd.org/changeset/base/348900 Log: [PPC] Fix build error when POWERNV is disabled When building a kernel supporting PSERIES but not POWERNV, the compiler would complain about an error variable being possibly used before being initialized. In practice, however, this should never happen. In any case, it is now initialized to an error value. Modified: head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Tue Jun 11 11:16:41 2019 (r348899) +++ head/sys/powerpc/pseries/xics.c Tue Jun 11 11:23:15 2019 (r348900) @@ -324,7 +324,7 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask, v struct xicp_softc *sc = device_get_softc(dev); struct xicp_intvec *iv; cell_t status, cpu; - int ncpus, i, error; + int ncpus, i, error = -1; /* Ignore IPIs */ if (irq == MAX_XICP_IRQS) From owner-svn-src-all@freebsd.org Tue Jun 11 13:28:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C856D15BAEC5; Tue, 11 Jun 2019 13:28:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65D778BA5B; Tue, 11 Jun 2019 13:28:42 +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 30F5F22E0; Tue, 11 Jun 2019 13:28:42 +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 x5BDSg43083051; Tue, 11 Jun 2019 13:28:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDSg9v083050; Tue, 11 Jun 2019 13:28:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111328.x5BDSg9v083050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348901 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65D778BA5B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:28:43 -0000 Author: mav Date: Tue Jun 11 13:28:41 2019 New Revision: 348901 URL: https://svnweb.freebsd.org/changeset/base/348901 Log: MFC r344314 (by pjd): In the vdev_geom_open_by_path() function we assume that vdev path starts with "/dev/". Make sure this is the case. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 11:23:15 2019 (r348900) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 13:28:41 2019 (r348901) @@ -794,7 +794,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * /* * We must have a pathname, and it must be absolute. */ - if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') { + if (vd->vdev_path == NULL || strncmp(vd->vdev_path, "/dev/", 5) != 0) { vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; return (EINVAL); } From owner-svn-src-all@freebsd.org Tue Jun 11 13:36:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA2D15BB3DB; Tue, 11 Jun 2019 13:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E208C042; Tue, 11 Jun 2019 13:36:16 +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 B141B2481; Tue, 11 Jun 2019 13:36:15 +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 x5BDaFfA088208; Tue, 11 Jun 2019 13:36:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDaFim088207; Tue, 11 Jun 2019 13:36:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111336.x5BDaFim088207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:36: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: r348902 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 00E208C042 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:36:16 -0000 Author: mav Date: Tue Jun 11 13:36:15 2019 New Revision: 348902 URL: https://svnweb.freebsd.org/changeset/base/348902 Log: MFC r344316 (by pjd): The way ZFS searches for its vdevs is the following: first it looks for a vdev that has the same name as the one stored in metadata and that has all VDEV labels in place. If it cannot find a GEOM provider with the given name and all VDEV labels it will scan all GEOM providers for the best match (the most VDEV labels available), but here the name is ignored. In case the ZFS pool is created, eg. using GPT partition label: # zpool create tank /dev/gpt/tank everything works, and on every import ZFS will pick /dev/gpt/tank and not /dev/da0p4. The problem occurs when da0p4 is extended and ZFS is unable to find all VDEV labels in /dev/gpt/tank anymore (the VDEV labels stored at the end of the partition are now somewhere else). In this case it will scan all GEOM providers and will pick the first one with the best match, ie. da0p4. Fix this problem by checking the VDEV/provider name even if we get the same match. If the name is the same as the one we have in pool's metadata, prefer this GEOM provider. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 13:28:41 2019 (r348901) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 13:36:15 2019 (r348902) @@ -692,10 +692,12 @@ vdev_geom_attach_by_guids(vdev_t *vd) struct g_geom *gp; struct g_provider *pp, *best_pp; struct g_consumer *cp; + const char *vdpath; enum match match, best_match; g_topology_assert(); + vdpath = vd->vdev_path + sizeof("/dev/") - 1; cp = NULL; best_pp = NULL; best_match = NO_MATCH; @@ -710,6 +712,10 @@ vdev_geom_attach_by_guids(vdev_t *vd) if (match > best_match) { best_match = match; best_pp = pp; + } else if (match == best_match) { + if (strcmp(pp->name, vdpath) == 0) { + best_pp = pp; + } } if (match == FULL_MATCH) goto out; From owner-svn-src-all@freebsd.org Tue Jun 11 13:40:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58C4E15BB4E2; Tue, 11 Jun 2019 13:40:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F379D8C1E8; Tue, 11 Jun 2019 13:40:27 +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 CA6F52485; Tue, 11 Jun 2019 13:40:27 +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 x5BDeR5L088454; Tue, 11 Jun 2019 13:40:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDeRlT088453; Tue, 11 Jun 2019 13:40:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111340.x5BDeRlT088453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:40: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: r348903 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F379D8C1E8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:40:28 -0000 Author: mav Date: Tue Jun 11 13:40:27 2019 New Revision: 348903 URL: https://svnweb.freebsd.org/changeset/base/348903 Log: MFC r344317 (by pjd): Grabage-collect no longer used variable. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Tue Jun 11 13:36:15 2019 (r348902) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Tue Jun 11 13:40:27 2019 (r348903) @@ -270,7 +270,6 @@ static void vdev_raidz_map_free(raidz_map_t *rm) { int c; - size_t size; for (c = 0; c < rm->rm_firstdatacol; c++) { if (rm->rm_col[c].rc_abd != NULL) @@ -281,11 +280,9 @@ vdev_raidz_map_free(raidz_map_t *rm) rm->rm_col[c].rc_size); } - size = 0; for (c = rm->rm_firstdatacol; c < rm->rm_cols; c++) { if (rm->rm_col[c].rc_abd != NULL) abd_put(rm->rm_col[c].rc_abd); - size += rm->rm_col[c].rc_size; } if (rm->rm_abd_copy != NULL) From owner-svn-src-all@freebsd.org Tue Jun 11 13:44:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 255CA15BB6D3; Tue, 11 Jun 2019 13:44:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B59BF8C613; Tue, 11 Jun 2019 13:44:19 +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 9043C2638; Tue, 11 Jun 2019 13:44:19 +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 x5BDiJ2b093552; Tue, 11 Jun 2019 13:44:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDiJNW093551; Tue, 11 Jun 2019 13:44:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111344.x5BDiJNW093551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:44:19 +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: r348904 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B59BF8C613 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:44:20 -0000 Author: mav Date: Tue Jun 11 13:44:19 2019 New Revision: 348904 URL: https://svnweb.freebsd.org/changeset/base/348904 Log: MFC r344318 (by pjd): Change assertion to log the incorrect io_type we've got. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Tue Jun 11 13:40:27 2019 (r348903) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Tue Jun 11 13:44:19 2019 (r348904) @@ -2020,7 +2020,7 @@ vdev_raidz_io_start(zio_t *zio) return; } - ASSERT(zio->io_type == ZIO_TYPE_READ); + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); /* * Iterate over the columns in reverse order so that we hit the parity From owner-svn-src-all@freebsd.org Tue Jun 11 13:46:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E155E15BB788; Tue, 11 Jun 2019 13:46:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84EE18C857; Tue, 11 Jun 2019 13:46:06 +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 6ABB7263C; Tue, 11 Jun 2019 13:46:06 +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 x5BDk6DP093833; Tue, 11 Jun 2019 13:46:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDk6Dx093832; Tue, 11 Jun 2019 13:46:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111346.x5BDk6Dx093832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348905 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84EE18C857 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:46:07 -0000 Author: mav Date: Tue Jun 11 13:46:05 2019 New Revision: 348905 URL: https://svnweb.freebsd.org/changeset/base/348905 Log: MFC r344320 (by pjd): Simplify the code. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Tue Jun 11 13:44:19 2019 (r348904) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Tue Jun 11 13:46:05 2019 (r348905) @@ -360,16 +360,13 @@ trim_map_write_start(zio_t *zio) return (B_FALSE); } - ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL); - if (ts != NULL) { - /* - * Loop until all overlapping segments are removed. - */ - do { - trim_map_segment_remove(tm, ts, start, end); - ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL); - } while (ts != NULL); + /* + * Loop until all overlapping segments are removed. + */ + while ((ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL)) != NULL) { + trim_map_segment_remove(tm, ts, start, end); } + avl_add(&tm->tm_inflight_writes, zio); mutex_exit(&tm->tm_lock); From owner-svn-src-all@freebsd.org Tue Jun 11 13:49:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF29C15BB847; Tue, 11 Jun 2019 13:49:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85E988C9CF; Tue, 11 Jun 2019 13:49:49 +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 6F733263D; Tue, 11 Jun 2019 13:49:49 +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 x5BDnnxT094043; Tue, 11 Jun 2019 13:49:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BDnnlh094042; Tue, 11 Jun 2019 13:49:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111349.x5BDnnlh094042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 13:49: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: r348906 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 85E988C9CF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 13:49:50 -0000 Author: mav Date: Tue Jun 11 13:49:48 2019 New Revision: 348906 URL: https://svnweb.freebsd.org/changeset/base/348906 Log: MFC r345728 (by pjd): If the autoexpand pool property is turned on and vdev is healthy try to expand the pool automatically when we detect underlying GEOM provider size change. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 13:46:05 2019 (r348905) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Jun 11 13:49:48 2019 (r348906) @@ -158,6 +158,29 @@ vdev_geom_attrchanged(struct g_consumer *cp, const cha } static void +vdev_geom_resize(struct g_consumer *cp) +{ + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + spa_t *spa; + vdev_t *vd; + + priv = (struct consumer_priv_t *)&cp->private; + if (SLIST_EMPTY(priv)) + return; + + SLIST_FOREACH(elem, priv, elems) { + vd = elem->vd; + if (vd->vdev_state != VDEV_STATE_HEALTHY) + continue; + spa = vd->vdev_spa; + if (!spa->spa_autoexpand) + continue; + vdev_online(spa, vd->vdev_guid, ZFS_ONLINE_EXPAND, NULL); + } +} + +static void vdev_geom_orphan(struct g_consumer *cp) { struct consumer_priv_t *priv; @@ -229,6 +252,7 @@ vdev_geom_attach(struct g_provider *pp, vdev_t *vd, bo gp = g_new_geomf(&zfs_vdev_class, "zfs::vdev"); gp->orphan = vdev_geom_orphan; gp->attrchanged = vdev_geom_attrchanged; + gp->resize = vdev_geom_resize; cp = g_new_consumer(gp); error = g_attach(cp, pp); if (error != 0) { From owner-svn-src-all@freebsd.org Tue Jun 11 14:17:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7A8715BC37A; Tue, 11 Jun 2019 14:17:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69F2E8D883; Tue, 11 Jun 2019 14:17:06 +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 3F6F92B32; Tue, 11 Jun 2019 14:17:06 +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 x5BEH6jo009677; Tue, 11 Jun 2019 14:17:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEH6wt009676; Tue, 11 Jun 2019 14:17:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111417.x5BEH6wt009676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348907 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 348907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69F2E8D883 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:17:07 -0000 Author: mav Date: Tue Jun 11 14:17:05 2019 New Revision: 348907 URL: https://svnweb.freebsd.org/changeset/base/348907 Log: MFC r348557: MFV r348534: 9616 Bogus error when attempting to set property on read-only pool illumos/illumos-gate@f62db44dbcda5dd786bb821f1e6fd3ca2e6d4391 Reviewed by: Paul Dagnelie Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Andrew Stormont Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Jun 11 13:49:48 2019 (r348906) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Jun 11 14:17:05 2019 (r348907) @@ -30,7 +30,7 @@ * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. * Copyright 2016 Igor Kozhukhov - * Copyright 2017 RackTop Systems. + * Copyright 2017-2018 RackTop Systems. */ #include @@ -1842,13 +1842,18 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); if (ret != 0) { + if (zc.zc_nvlist_dst_filled == B_FALSE) { + (void) zfs_standard_error(hdl, errno, errbuf); + goto error; + } + /* Get the list of unset properties back and report them. */ nvlist_t *errorprops = NULL; if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0) goto error; - for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + for (nvpair_t *elem = nvlist_next_nvpair(errorprops, NULL); elem != NULL; - elem = nvlist_next_nvpair(nvl, elem)) { + elem = nvlist_next_nvpair(errorprops, elem)) { zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); zfs_setprop_error(hdl, prop, errno, errbuf); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:18:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73A3815BC3E4; Tue, 11 Jun 2019 14:18:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17AC88D9C8; Tue, 11 Jun 2019 14:18:05 +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 CEAC42B33; Tue, 11 Jun 2019 14:18:04 +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 x5BEI47w009772; Tue, 11 Jun 2019 14:18:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEI4Be009771; Tue, 11 Jun 2019 14:18:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111418.x5BEI4Be009771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:18: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: r348908 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17AC88D9C8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:18:05 -0000 Author: mav Date: Tue Jun 11 14:18:04 2019 New Revision: 348908 URL: https://svnweb.freebsd.org/changeset/base/348908 Log: MFC r348558: MFV r348535: 9677 panic from zio_write_gang_block() when creating dump device on fragmented rpool illumos/illumos-gate@7341a7de4f0489193e0cfe11049a7bcf1596a4db Reviewed by: Matt Ahrens Reviewed by: George Wilson Reviewed by: Prashanth Sreenivasa Approved by: Robert Mustacchi Author: Brad Lewis Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 11 14:17:05 2019 (r348907) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 11 14:18:04 2019 (r348908) @@ -2319,7 +2319,13 @@ zio_write_gang_member_ready(zio_t *zio) static void zio_write_gang_done(zio_t *zio) { - abd_put(zio->io_abd); + /* + * The io_abd field will be NULL for a zio with no data. The io_flags + * will initially have the ZIO_FLAG_NODATA bit flag set, but we can't + * check for it here as it is cleared in zio_ready. + */ + if (zio->io_abd != NULL) + abd_put(zio->io_abd); } static zio_t * @@ -2340,11 +2346,12 @@ zio_write_gang_block(zio_t *pio) int gbh_copies = MIN(copies + 1, spa_max_replication(spa)); zio_prop_t zp; int error; + boolean_t has_data = !(pio->io_flags & ZIO_FLAG_NODATA); int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER; if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) { ASSERT(pio->io_priority == ZIO_PRIORITY_ASYNC_WRITE); - ASSERT(!(pio->io_flags & ZIO_FLAG_NODATA)); + ASSERT(has_data); flags |= METASLAB_ASYNC_ALLOC; VERIFY(refcount_held(&mc->mc_alloc_slots[pio->io_allocator], @@ -2368,7 +2375,7 @@ zio_write_gang_block(zio_t *pio) if (error) { if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) { ASSERT(pio->io_priority == ZIO_PRIORITY_ASYNC_WRITE); - ASSERT(!(pio->io_flags & ZIO_FLAG_NODATA)); + ASSERT(has_data); /* * If we failed to allocate the gang block header then @@ -2421,14 +2428,15 @@ zio_write_gang_block(zio_t *pio) zp.zp_nopwrite = B_FALSE; zio_t *cio = zio_write(zio, spa, txg, &gbh->zg_blkptr[g], - abd_get_offset(pio->io_abd, pio->io_size - resid), lsize, - lsize, &zp, zio_write_gang_member_ready, NULL, NULL, + has_data ? abd_get_offset(pio->io_abd, pio->io_size - + resid) : NULL, lsize, lsize, &zp, + zio_write_gang_member_ready, NULL, NULL, zio_write_gang_done, &gn->gn_child[g], pio->io_priority, ZIO_GANG_CHILD_FLAGS(pio), &pio->io_bookmark); if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) { ASSERT(pio->io_priority == ZIO_PRIORITY_ASYNC_WRITE); - ASSERT(!(pio->io_flags & ZIO_FLAG_NODATA)); + ASSERT(has_data); /* * Gang children won't throttle but we should From owner-svn-src-all@freebsd.org Tue Jun 11 14:18:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7935215BC467; Tue, 11 Jun 2019 14:18:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17F328DB08; Tue, 11 Jun 2019 14:18:55 +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 E8E622B34; Tue, 11 Jun 2019 14:18:54 +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 x5BEIsaw009855; Tue, 11 Jun 2019 14:18:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEIsYq009854; Tue, 11 Jun 2019 14:18:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111418.x5BEIsYq009854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:18:54 +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: r348909 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17F328DB08 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:18:55 -0000 Author: mav Date: Tue Jun 11 14:18:54 2019 New Revision: 348909 URL: https://svnweb.freebsd.org/changeset/base/348909 Log: MFC r348559: MFV r348537: 8601 memory leak in get_special_prop() illumos/illumos-gate@e19b450bec203d8be04447ea476d7a86b36d63a1 Reviewed by: Serapheim Dimitropoulos Reviewed by: Sara Hartse Reviewed by: Pavel Zakharov Reviewed by: Matt Ahrens Reviewed by: Robert Mustacchi Approved by: Dan McDonald Author: John Gallagher Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c Tue Jun 11 14:18:04 2019 (r348908) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c Tue Jun 11 14:18:54 2019 (r348909) @@ -14,7 +14,7 @@ */ /* - * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2016, 2017 by Delphix. All rights reserved. */ #include "lua.h" @@ -431,16 +431,21 @@ get_special_prop(lua_State *state, dsl_dataset_t *ds, case ZFS_PROP_INCONSISTENT: numval = dsl_get_inconsistent(ds); break; - case ZFS_PROP_RECEIVE_RESUME_TOKEN: - VERIFY3U(strlcpy(strval, get_receive_resume_stats_impl(ds), - ZAP_MAXVALUELEN), <, ZAP_MAXVALUELEN); + case ZFS_PROP_RECEIVE_RESUME_TOKEN: { + char *token = get_receive_resume_stats_impl(ds); + VERIFY3U(strlcpy(strval, token, ZAP_MAXVALUELEN), <, + ZAP_MAXVALUELEN); + strfree(token); if (strcmp(strval, "") == 0) { - VERIFY3U(strlcpy(strval, get_child_receive_stats(ds), - ZAP_MAXVALUELEN), <, ZAP_MAXVALUELEN); + token = get_child_receive_stats(ds); + VERIFY3U(strlcpy(strval, token, ZAP_MAXVALUELEN), <, + ZAP_MAXVALUELEN); + strfree(token); if (strcmp(strval, "") == 0) error = ENOENT; } break; + } case ZFS_PROP_VOLSIZE: ASSERT(ds_type == ZFS_TYPE_VOLUME); error = dmu_objset_from_ds(ds, &os); From owner-svn-src-all@freebsd.org Tue Jun 11 14:19:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A78715BC4ED; Tue, 11 Jun 2019 14:19:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC678DC51; Tue, 11 Jun 2019 14:19:48 +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 6251B2B35; Tue, 11 Jun 2019 14:19:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BEJmoR009951; Tue, 11 Jun 2019 14:19:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEJlNF009948; Tue, 11 Jun 2019 14:19:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111419.x5BEJlNF009948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:19: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: r348910 - in stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 348910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CC678DC51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:19:49 -0000 Author: mav Date: Tue Jun 11 14:19:47 2019 New Revision: 348910 URL: https://svnweb.freebsd.org/changeset/base/348910 Log: MFC r348561: MFV r348548: 9617 too-frequent TXG sync causes excessive write inflation illumos/illumos-gate@7928f4baf4ab3230557eb6289be68aa7a3003f38 Reviewed by: Serapheim Dimitropoulos Reviewed by: Brad Lewis Reviewed by: George Wilson Reviewed by: Andrew Stormont Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Tue Jun 11 14:18:54 2019 (r348909) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Tue Jun 11 14:19:47 2019 (r348910) @@ -108,9 +108,11 @@ uint64_t zfs_dirty_data_max_max = 4ULL * 1024 * 1024 * int zfs_dirty_data_max_percent = 10; /* - * If there is at least this much dirty data, push out a txg. + * If there's at least this much dirty data (as a percentage of + * zfs_dirty_data_max), push out a txg. This should be less than + * zfs_vdev_async_write_active_min_dirty_percent. */ -uint64_t zfs_dirty_data_sync = 64 * 1024 * 1024; +uint64_t zfs_dirty_data_sync_pct = 20; /* * Once there is this amount of dirty data, the dmu_tx_delay() will kick in @@ -190,9 +192,9 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, dirty_data_max_percent sysctl_zfs_dirty_data_max_percent, "I", "The percent of physical memory used to auto calculate dirty_data_max"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_sync, CTLFLAG_RWTUN, - &zfs_dirty_data_sync, 0, - "Force a txg if the number of dirty buffer bytes exceed this value"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_sync_pct, CTLFLAG_RWTUN, + &zfs_dirty_data_sync_pct, 0, + "Force a txg if the percent of dirty buffer bytes exceed this value"); static int sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS); /* No zfs_delay_min_dirty_percent tunable due to limit requirements */ @@ -926,10 +928,12 @@ dsl_pool_need_dirty_delay(dsl_pool_t *dp) { uint64_t delay_min_bytes = zfs_dirty_data_max * zfs_delay_min_dirty_percent / 100; + uint64_t dirty_min_bytes = + zfs_dirty_data_max * zfs_dirty_data_sync_pct / 100; boolean_t rv; mutex_enter(&dp->dp_lock); - if (dp->dp_dirty_total > zfs_dirty_data_sync) + if (dp->dp_dirty_total > dirty_min_bytes) txg_kick(dp); rv = (dp->dp_dirty_total > delay_min_bytes); mutex_exit(&dp->dp_lock); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Tue Jun 11 14:18:54 2019 (r348909) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h Tue Jun 11 14:19:47 2019 (r348910) @@ -53,7 +53,7 @@ struct dsl_scan; extern uint64_t zfs_dirty_data_max; extern uint64_t zfs_dirty_data_max_max; -extern uint64_t zfs_dirty_data_sync; +extern uint64_t zfs_dirty_data_sync_pct; extern int zfs_dirty_data_max_percent; extern int zfs_delay_min_dirty_percent; extern uint64_t zfs_delay_scale; Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue Jun 11 14:18:54 2019 (r348909) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue Jun 11 14:19:47 2019 (r348910) @@ -490,6 +490,8 @@ txg_sync_thread(void *arg) uint64_t timeout = zfs_txg_timeout * hz; uint64_t timer; uint64_t txg; + uint64_t dirty_min_bytes = + zfs_dirty_data_max * zfs_dirty_data_sync_pct / 100; /* * We sync when we're scanning, there's someone waiting @@ -501,7 +503,7 @@ txg_sync_thread(void *arg) !tx->tx_exiting && timer > 0 && tx->tx_synced_txg >= tx->tx_sync_txg_waiting && !txg_has_quiesced_to_sync(dp) && - dp->dp_dirty_total < zfs_dirty_data_sync) { + dp->dp_dirty_total < dirty_min_bytes) { dprintf("waiting; tx_synced=%llu waiting=%llu dp=%p\n", tx->tx_synced_txg, tx->tx_sync_txg_waiting, dp); txg_thread_wait(tx, &cpr, &tx->tx_sync_more_cv, timer); From owner-svn-src-all@freebsd.org Tue Jun 11 14:20:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B05D515BC59A; Tue, 11 Jun 2019 14:20:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 531578DDD7; Tue, 11 Jun 2019 14:20:34 +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 300E72B39; Tue, 11 Jun 2019 14:20:34 +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 x5BEKYf9010066; Tue, 11 Jun 2019 14:20:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEKYUu010065; Tue, 11 Jun 2019 14:20:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111420.x5BEKYUu010065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:20:34 +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: r348911 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 531578DDD7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:20:34 -0000 Author: mav Date: Tue Jun 11 14:20:33 2019 New Revision: 348911 URL: https://svnweb.freebsd.org/changeset/base/348911 Log: MFC r348562: MFV r348550: 1700 Add SCSI UNMAP support illumos/illumos-gate@047c81d31d0f571d6652e97143cd15281de61e84 Reviewed by: Jerry Jelinek Reviewed by: Garrett D'Amore Reviewed by: Igor Kozhukhov Approved by: Dan McDonald Author: Saso Kiselkov This is irrelevant to FreeBSD, just a diff reduction. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Jun 11 14:19:47 2019 (r348910) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Jun 11 14:20:33 2019 (r348911) @@ -26,7 +26,7 @@ * * Portions Copyright 2010 Robert Milkowski * - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2017 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] @@ -2259,44 +2259,64 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, case DKIOCFREE: { - dkioc_free_t df; + dkioc_free_list_t *dfl; dmu_tx_t *tx; if (!zvol_unmap_enabled) break; - if (ddi_copyin((void *)arg, &df, sizeof (df), flag)) { - error = SET_ERROR(EFAULT); - break; + if (!(flag & FKIOCTL)) { + error = dfl_copyin((void *)arg, &dfl, flag, KM_SLEEP); + if (error != 0) + break; + } else { + dfl = (dkioc_free_list_t *)arg; + ASSERT3U(dfl->dfl_num_exts, <=, DFL_COPYIN_MAX_EXTS); + if (dfl->dfl_num_exts > DFL_COPYIN_MAX_EXTS) { + error = SET_ERROR(EINVAL); + break; + } } - /* - * Apply Postel's Law to length-checking. If they overshoot, - * just blank out until the end, if there's a need to blank - * out anything. - */ - if (df.df_start >= zv->zv_volsize) - break; /* No need to do anything... */ - mutex_exit(&zfsdev_state_lock); - rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, - RL_WRITER); - tx = dmu_tx_create(zv->zv_objset); - dmu_tx_mark_netfree(tx); - error = dmu_tx_assign(tx, TXG_WAIT); - if (error != 0) { - dmu_tx_abort(tx); - } else { - zvol_log_truncate(zv, tx, df.df_start, - df.df_length, B_TRUE); - dmu_tx_commit(tx); - error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, - df.df_start, df.df_length); - } + for (int i = 0; i < dfl->dfl_num_exts; i++) { + uint64_t start = dfl->dfl_exts[i].dfle_start, + length = dfl->dfl_exts[i].dfle_length, + end = start + length; - zfs_range_unlock(rl); + /* + * Apply Postel's Law to length-checking. If they + * overshoot, just blank out until the end, if there's + * a need to blank out anything. + */ + if (start >= zv->zv_volsize) + continue; /* No need to do anything... */ + if (end > zv->zv_volsize) { + end = DMU_OBJECT_END; + length = end - start; + } + rl = zfs_range_lock(&zv->zv_znode, start, length, + RL_WRITER); + tx = dmu_tx_create(zv->zv_objset); + error = dmu_tx_assign(tx, TXG_WAIT); + if (error != 0) { + dmu_tx_abort(tx); + } else { + zvol_log_truncate(zv, tx, start, length, + B_TRUE); + dmu_tx_commit(tx); + error = dmu_free_long_range(zv->zv_objset, + ZVOL_OBJ, start, length); + } + + zfs_range_unlock(rl); + + if (error != 0) + break; + } + /* * If the write-cache is disabled, 'sync' property * is set to 'always', or if the caller is asking for @@ -2308,9 +2328,12 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, if ((error == 0) && zvol_unmap_sync_enabled && (!(zv->zv_flags & ZVOL_WCE) || (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS) || - (df.df_flags & DF_WAIT_SYNC))) { + (dfl->dfl_flags & DF_WAIT_SYNC))) { zil_commit(zv->zv_zilog, ZVOL_OBJ); } + + if (!(flag & FKIOCTL)) + dfl_free(dfl); return (error); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:21:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C13015BC627; Tue, 11 Jun 2019 14:21:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 321AB8DFAC; Tue, 11 Jun 2019 14:21:16 +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 091DC2C77; Tue, 11 Jun 2019 14:21:16 +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 x5BELFuQ011073; Tue, 11 Jun 2019 14:21:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BELF46011072; Tue, 11 Jun 2019 14:21:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111421.x5BELF46011072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:21: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: r348912 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 348912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 321AB8DFAC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:21:16 -0000 Author: mav Date: Tue Jun 11 14:21:15 2019 New Revision: 348912 URL: https://svnweb.freebsd.org/changeset/base/348912 Log: MFC r348563: MFV r348551: 9862 fix typo in comment in vdev_impl.h illumos/illumos-gate@84927f52bd837f6e4882a19e43fd026f1828d910 Reviewed by: Matthew Ahrens Reviewed by: Brian Behlendorf Approved by: Robert Mustacchi Author: Allan Jude Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Tue Jun 11 14:20:33 2019 (r348911) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Tue Jun 11 14:21:15 2019 (r348912) @@ -319,7 +319,7 @@ struct vdev { /* * The queue depth parameters determine how many async writes are - * still pending (i.e. allocated by net yet issued to disk) per + * still pending (i.e. allocated but not yet issued to disk) per * top-level (vdev_async_write_queue_depth) and the maximum allowed * (vdev_max_async_write_queue_depth). These values only apply to * top-level vdevs. From owner-svn-src-all@freebsd.org Tue Jun 11 14:22:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05F5B15BC848; Tue, 11 Jun 2019 14:22:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A42EB8E304; Tue, 11 Jun 2019 14:22:41 +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 822C02CD7; Tue, 11 Jun 2019 14:22:41 +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 x5BEMf4Y015139; Tue, 11 Jun 2019 14:22:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEMfW3015137; Tue, 11 Jun 2019 14:22:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111422.x5BEMfW3015137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:22:41 +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: r348913 - in stable/12: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A42EB8E304 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:22:42 -0000 Author: mav Date: Tue Jun 11 14:22:40 2019 New Revision: 348913 URL: https://svnweb.freebsd.org/changeset/base/348913 Log: MFC r348564: MFV r348552: 9682 page fault in dsl_async_clone_destroy() while opening pool illumos/illumos-gate@ade2c82828f0dca1f46919aa1bd936ea1a5a0047 Reviewed by: Brad Lewis Reviewed by: Matt Ahrens Reviewed by: Sara Hartse Approved by: Robert Mustacchi Author: Serapheim Dimitropoulos Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 11 14:21:15 2019 (r348912) +++ stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 11 14:22:40 2019 (r348913) @@ -2271,10 +2271,11 @@ dump_dir(objset_t *os) dmu_objset_name(os, osname); (void) printf("Dataset %s [%s], ID %llu, cr_txg %llu, " - "%s, %llu objects%s\n", + "%s, %llu objects%s%s\n", osname, type, (u_longlong_t)dmu_objset_id(os), (u_longlong_t)dds.dds_creation_txg, - numbuf, (u_longlong_t)usedobjs, blkbuf); + numbuf, (u_longlong_t)usedobjs, blkbuf, + (dds.dds_inconsistent) ? " (inconsistent)" : ""); if (zopt_objects != 0) { for (i = 0; i < zopt_objects; i++) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jun 11 14:21:15 2019 (r348912) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jun 11 14:22:40 2019 (r348913) @@ -3953,8 +3953,17 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char */ spa_history_log_version(spa, "open"); + spa_restart_removal(spa); + spa_spawn_aux_threads(spa); + /* * Delete any inconsistent datasets. + * + * Note: + * Since we may be issuing deletes for clones here, + * we make sure to do so after we've spawned all the + * auxiliary threads above (from which the livelist + * deletion zthr is part of). */ (void) dmu_objset_find(spa_name(spa), dsl_destroy_inconsistent, NULL, DS_FIND_CHILDREN); @@ -3963,10 +3972,6 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char * Clean up any stale temporary dataset userrefs. */ dsl_pool_clean_tmp_userrefs(spa->spa_dsl_pool); - - spa_restart_removal(spa); - - spa_spawn_aux_threads(spa); spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); vdev_initialize_restart(spa->spa_root_vdev); From owner-svn-src-all@freebsd.org Tue Jun 11 14:23:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D535F15BC8CA; Tue, 11 Jun 2019 14:23:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA728E441; Tue, 11 Jun 2019 14:23:34 +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 543AE2CD8; Tue, 11 Jun 2019 14:23:34 +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 x5BENYNZ015228; Tue, 11 Jun 2019 14:23:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BENX5G015225; Tue, 11 Jun 2019 14:23:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111423.x5BENX5G015225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:23: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: r348914 - in stable/12: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 348914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7AA728E441 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:23:35 -0000 Author: mav Date: Tue Jun 11 14:23:33 2019 New Revision: 348914 URL: https://svnweb.freebsd.org/changeset/base/348914 Log: MFC r348565: MFV r348553: 9681 ztest failure in spa_history_log_internal due to spa_rename() illumos/illumos-gate@6aee0ad76969eb0027131b3a338f2d94ae86f728 Reviewed by: Prakash Surya Reviewed by: Serapheim Dimitropoulos Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 11 14:22:40 2019 (r348913) +++ stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 11 14:23:33 2019 (r348914) @@ -338,7 +338,6 @@ ztest_func_t ztest_spa_create_destroy; ztest_func_t ztest_fault_inject; ztest_func_t ztest_ddt_repair; ztest_func_t ztest_dmu_snapshot_hold; -ztest_func_t ztest_spa_rename; ztest_func_t ztest_scrub; ztest_func_t ztest_dsl_dataset_promote_busy; ztest_func_t ztest_vdev_attach_detach; @@ -384,7 +383,6 @@ ztest_info_t ztest_info[] = { { ztest_ddt_repair, 1, &zopt_sometimes }, { ztest_dmu_snapshot_hold, 1, &zopt_sometimes }, { ztest_reguid, 1, &zopt_rarely }, - { ztest_spa_rename, 1, &zopt_rarely }, { ztest_scrub, 1, &zopt_often }, { ztest_spa_upgrade, 1, &zopt_rarely }, { ztest_dsl_dataset_promote_busy, 1, &zopt_rarely }, @@ -5550,59 +5548,6 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id) VERIFY3U(load, ==, spa_load_guid(spa)); } -/* - * Rename the pool to a different name and then rename it back. - */ -/* ARGSUSED */ -void -ztest_spa_rename(ztest_ds_t *zd, uint64_t id) -{ - char *oldname, *newname; - spa_t *spa; - - rw_enter(&ztest_name_lock, RW_WRITER); - - oldname = ztest_opts.zo_pool; - newname = umem_alloc(strlen(oldname) + 5, UMEM_NOFAIL); - (void) strcpy(newname, oldname); - (void) strcat(newname, "_tmp"); - - /* - * Do the rename - */ - VERIFY3U(0, ==, spa_rename(oldname, newname)); - - /* - * Try to open it under the old name, which shouldn't exist - */ - VERIFY3U(ENOENT, ==, spa_open(oldname, &spa, FTAG)); - - /* - * Open it under the new name and make sure it's still the same spa_t. - */ - VERIFY3U(0, ==, spa_open(newname, &spa, FTAG)); - - ASSERT(spa == ztest_spa); - spa_close(spa, FTAG); - - /* - * Rename it back to the original - */ - VERIFY3U(0, ==, spa_rename(newname, oldname)); - - /* - * Make sure it can still be opened - */ - VERIFY3U(0, ==, spa_open(oldname, &spa, FTAG)); - - ASSERT(spa == ztest_spa); - spa_close(spa, FTAG); - - umem_free(newname, strlen(newname) + 1); - - rw_exit(&ztest_name_lock); -} - static vdev_t * ztest_random_concrete_vdev_leaf(vdev_t *vd) { @@ -6661,7 +6606,6 @@ main(int argc, char **argv) ztest_shared_callstate_t *zc; char timebuf[100]; char numbuf[NN_NUMBUF_SZ]; - spa_t *spa; char *cmd; boolean_t hasalt; char *fd_data_str = getenv("ZTEST_FD_DATA"); @@ -6835,24 +6779,6 @@ main(int argc, char **argv) } (void) printf("\n"); } - - /* - * It's possible that we killed a child during a rename test, - * in which case we'll have a 'ztest_tmp' pool lying around - * instead of 'ztest'. Do a blind rename in case this happened. - */ - kernel_init(FREAD); - if (spa_open(ztest_opts.zo_pool, &spa, FTAG) == 0) { - spa_close(spa, FTAG); - } else { - char tmpname[ZFS_MAX_DATASET_NAME_LEN]; - kernel_fini(); - kernel_init(FREAD | FWRITE); - (void) snprintf(tmpname, sizeof (tmpname), "%s_tmp", - ztest_opts.zo_pool); - (void) spa_rename(tmpname, ztest_opts.zo_pool); - } - kernel_fini(); ztest_run_zdb(ztest_opts.zo_pool); } Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jun 11 14:22:40 2019 (r348913) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jun 11 14:23:33 2019 (r348914) @@ -229,9 +229,6 @@ * vdev state is protected by spa_vdev_state_enter() / spa_vdev_state_exit(). * Like spa_vdev_enter/exit, these are convenience wrappers -- the actual * locking is, always, based on spa_namespace_lock and spa_config_lock[]. - * - * spa_rename() is also implemented within this file since it requires - * manipulation of the namespace. */ static avl_tree_t spa_namespace_avl; @@ -1450,56 +1447,6 @@ spa_deactivate_mos_feature(spa_t *spa, const char *fea { if (nvlist_remove_all(spa->spa_label_features, feature) == 0) vdev_config_dirty(spa->spa_root_vdev); -} - -/* - * Rename a spa_t. - */ -int -spa_rename(const char *name, const char *newname) -{ - spa_t *spa; - int err; - - /* - * Lookup the spa_t and grab the config lock for writing. We need to - * actually open the pool so that we can sync out the necessary labels. - * It's OK to call spa_open() with the namespace lock held because we - * allow recursive calls for other reasons. - */ - mutex_enter(&spa_namespace_lock); - if ((err = spa_open(name, &spa, FTAG)) != 0) { - mutex_exit(&spa_namespace_lock); - return (err); - } - - spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - - avl_remove(&spa_namespace_avl, spa); - (void) strlcpy(spa->spa_name, newname, sizeof (spa->spa_name)); - avl_add(&spa_namespace_avl, spa); - - /* - * Sync all labels to disk with the new names by marking the root vdev - * dirty and waiting for it to sync. It will pick up the new pool name - * during the sync. - */ - vdev_config_dirty(spa->spa_root_vdev); - - spa_config_exit(spa, SCL_ALL, FTAG); - - txg_wait_synced(spa->spa_dsl_pool, 0); - - /* - * Sync the updated config cache. - */ - spa_write_cachefile(spa, B_FALSE, B_TRUE); - - spa_close(spa, FTAG); - - mutex_exit(&spa_namespace_lock); - - return (0); } /* Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Tue Jun 11 14:22:40 2019 (r348913) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Tue Jun 11 14:23:33 2019 (r348914) @@ -841,7 +841,6 @@ extern void spa_load_note(spa_t *spa, const char *fmt, extern void spa_activate_mos_feature(spa_t *spa, const char *feature, dmu_tx_t *tx); extern void spa_deactivate_mos_feature(spa_t *spa, const char *feature); -extern int spa_rename(const char *oldname, const char *newname); extern spa_t *spa_by_guid(uint64_t pool_guid, uint64_t device_guid); extern boolean_t spa_guid_exists(uint64_t pool_guid, uint64_t device_guid); extern char *spa_strdup(const char *); From owner-svn-src-all@freebsd.org Tue Jun 11 14:24:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5CA315BC94A; Tue, 11 Jun 2019 14:24:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD328E574; Tue, 11 Jun 2019 14:24:16 +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 1BD4F2CD9; Tue, 11 Jun 2019 14:24:16 +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 x5BEOFFf015315; Tue, 11 Jun 2019 14:24:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEOF76015314; Tue, 11 Jun 2019 14:24:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111424.x5BEOF76015314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:24: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: r348915 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5CD328E574 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:24:17 -0000 Author: mav Date: Tue Jun 11 14:24:15 2019 New Revision: 348915 URL: https://svnweb.freebsd.org/changeset/base/348915 Log: MFC r348566: MFC r348554: 9688 aggsum_fini leaks memory illumos/illumos-gate@29bf2d68bef208274f5a54a14cc80c4a8cb76f53 Reviewed by: Serapheim Dimitropoulos Reviewed by: Matt Ahrens Reviewed by: Prashanth Sreenivasa Reviewed by: Jorgen Lundman Reviewed by: Igor Kozhukhov Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c Tue Jun 11 14:23:33 2019 (r348914) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c Tue Jun 11 14:24:15 2019 (r348915) @@ -13,7 +13,7 @@ * CDDL HEADER END */ /* - * Copyright (c) 2017 by Delphix. All rights reserved. + * Copyright (c) 2017, 2018 by Delphix. All rights reserved. */ #include @@ -99,6 +99,7 @@ aggsum_fini(aggsum_t *as) { for (int i = 0; i < as->as_numbuckets; i++) mutex_destroy(&as->as_buckets[i].asc_lock); + kmem_free(as->as_buckets, as->as_numbuckets * sizeof (aggsum_bucket_t)); mutex_destroy(&as->as_lock); } Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:23:33 2019 (r348914) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:24:15 2019 (r348915) @@ -7074,6 +7074,16 @@ arc_state_fini(void) multilist_destroy(arc_mru_ghost->arcs_list[ARC_BUFC_DATA]); multilist_destroy(arc_mfu->arcs_list[ARC_BUFC_DATA]); multilist_destroy(arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]); + + aggsum_fini(&arc_meta_used); + aggsum_fini(&arc_size); + aggsum_fini(&astat_data_size); + aggsum_fini(&astat_metadata_size); + aggsum_fini(&astat_hdr_size); + aggsum_fini(&astat_bonus_size); + aggsum_fini(&astat_dnode_size); + aggsum_fini(&astat_dbuf_size); + aggsum_fini(&astat_l2_hdr_size); } uint64_t @@ -7357,8 +7367,13 @@ arc_fini(void) mutex_destroy(&arc_adjust_lock); cv_destroy(&arc_adjust_waiters_cv); - arc_state_fini(); + /* + * buf_fini() must proceed arc_state_fini() because buf_fin() may + * trigger the release of kmem magazines, which can callback to + * arc_space_return() which accesses aggsums freed in act_state_fini(). + */ buf_fini(); + arc_state_fini(); ASSERT0(arc_loaned_bytes); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:25:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D51F15BC9D3; Tue, 11 Jun 2019 14:25:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2DB08E6B7; Tue, 11 Jun 2019 14:25:03 +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 818C12CDA; Tue, 11 Jun 2019 14:25:03 +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 x5BEP3BK015411; Tue, 11 Jun 2019 14:25:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEP3G2015410; Tue, 11 Jun 2019 14:25:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111425.x5BEP3G2015410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:25: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: r348916 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D2DB08E6B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:25:04 -0000 Author: mav Date: Tue Jun 11 14:25:03 2019 New Revision: 348916 URL: https://svnweb.freebsd.org/changeset/base/348916 Log: MFC r348567: MFV r348555: 9690 metaslab of vdev with no space maps was flushed during removal illumos/illumos-gate@4e75ba682600b2bf19d158577d528c3db65050e8 Reviewed by: Matt Ahrens Reviewed by: Brad Lewis Approved by: Robert Mustacchi Author: Serapheim Dimitropoulos Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 11 14:24:15 2019 (r348915) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 11 14:25:03 2019 (r348916) @@ -3031,11 +3031,11 @@ vdev_destroy_spacemaps(vdev_t *vd, dmu_tx_t *tx) } static void -vdev_remove_empty(vdev_t *vd, uint64_t txg) +vdev_remove_empty_log(vdev_t *vd, uint64_t txg) { spa_t *spa = vd->vdev_spa; - dmu_tx_t *tx; + ASSERT(vd->vdev_islog); ASSERT(vd == vd->vdev_top); ASSERT3U(txg, ==, spa_syncing_txg(spa)); @@ -3079,13 +3079,14 @@ vdev_remove_empty(vdev_t *vd, uint64_t txg) ASSERT0(mg->mg_histogram[i]); } - tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg); - vdev_destroy_spacemaps(vd, tx); + dmu_tx_t *tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg); - if (vd->vdev_islog && vd->vdev_top_zap != 0) { + vdev_destroy_spacemaps(vd, tx); + if (vd->vdev_top_zap != 0) { vdev_destroy_unlink_zap(vd, vd->vdev_top_zap, tx); vd->vdev_top_zap = 0; } + dmu_tx_commit(tx); } @@ -3157,14 +3158,11 @@ vdev_sync(vdev_t *vd, uint64_t txg) vdev_dtl_sync(lvd, txg); /* - * Remove the metadata associated with this vdev once it's empty. - * Note that this is typically used for log/cache device removal; - * we don't empty toplevel vdevs when removing them. But if - * a toplevel happens to be emptied, this is not harmful. + * If this is an empty log device being removed, destroy the + * metadata associated with it. */ - if (vd->vdev_stat.vs_alloc == 0 && vd->vdev_removing) { - vdev_remove_empty(vd, txg); - } + if (vd->vdev_islog && vd->vdev_stat.vs_alloc == 0 && vd->vdev_removing) + vdev_remove_empty_log(vd, txg); (void) txg_list_add(&spa->spa_vdev_txg_list, vd, TXG_CLEAN(txg)); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:26:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86A9215BCA75; Tue, 11 Jun 2019 14:26:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20E4A8E81D; Tue, 11 Jun 2019 14:26:15 +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 E982B2CDB; Tue, 11 Jun 2019 14:26:14 +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 x5BEQEvx015515; Tue, 11 Jun 2019 14:26:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEQEmL015511; Tue, 11 Jun 2019 14:26:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111426.x5BEQEmL015511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:26:14 +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: r348917 - stable/12/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/cmd/zfs X-SVN-Commit-Revision: 348917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 20E4A8E81D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:26:15 -0000 Author: mav Date: Tue Jun 11 14:26:14 2019 New Revision: 348917 URL: https://svnweb.freebsd.org/changeset/base/348917 Log: MFC r348570: MFV r348568: 9466 add JSON output support to channel programs illumos/illumos-gate@5267591016146502784860802129b16dab6f135c Reviewed by: Matt Ahrens Reviewed by: Serapheim Dimitropoulos Reviewed by: Sara Hartse Reviewed by: John Kennedy Approved by: Dan McDonald Author: Alek Pinchuk Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Tue Jun 11 14:25:03 2019 (r348916) +++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Tue Jun 11 14:26:14 2019 (r348917) @@ -9,6 +9,7 @@ .\" .\" .\" Copyright (c) 2016, 2017 by Delphix. All rights reserved. +.\" Copyright (c) 2018 Datto Inc. .\" .Dd October 02, 2017 .Dt ZFS-PROGRAM 1M @@ -18,7 +19,7 @@ .Nd executes ZFS channel programs .Sh SYNOPSIS .Cm zfs program -.Op Fl n +.Op Fl jn .Op Fl t Ar instruction-limit .Op Fl m Ar memory-limit .Ar pool @@ -46,6 +47,11 @@ will be run on and any attempts to access or modify other pools will cause an error. .Sh OPTIONS .Bl -tag -width "-t" +.It Fl j +Display channel program output in JSON format. +When this flag is specified and standard output is empty - +channel program encountered an error. +The details of such an error will be printed to standard error in plain text. .It Fl n Executes a read-only channel program, which runs faster. The program cannot change on-disk state by calling functions from the Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jun 11 14:25:03 2019 (r348916) +++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Jun 11 14:26:14 2019 (r348917) @@ -29,6 +29,7 @@ .\" Copyright (c) 2014, Xin LI .\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved. .\" Copyright 2018 Joyent, Inc. +.\" Copyright (c) 2018 Datto Inc. .\" .\" $FreeBSD$ .\" @@ -291,7 +292,7 @@ .Op Ar snapshot Ns | Ns Ar filesystem .Nm .Cm program -.Op Fl n +.Op Fl jn .Op Fl t Ar timeout .Op Fl m Ar memory_limit .Ar pool script @@ -3364,7 +3365,7 @@ Display the path's inode change time as the first colu .It Xo .Nm .Cm program -.Op Fl n +.Op Fl jn .Op Fl t Ar timeout .Op Fl m Ar memory_limit .Ar pool script @@ -3387,6 +3388,11 @@ For full documentation of the ZFS channel program inte page for .Xr zfs-program 8 . .Bl -tag -width indent +.It Fl j +Display channel program output in JSON format. +When this flag is specified and standard output is empty - +channel program encountered an error. +The details of such an error will be printed to standard error in plain text. .It Fl n Executes a read-only channel program, which runs faster. The program cannot change on-disk state by calling functions from Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 11 14:25:03 2019 (r348916) +++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jun 11 14:26:14 2019 (r348917) @@ -30,6 +30,7 @@ * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Igor Kozhukhov . * Copyright 2016 Nexenta Systems, Inc. + * Copyright (c) 2018 Datto Inc. */ #include @@ -351,7 +352,7 @@ get_usage(zfs_help_t idx) case HELP_BOOKMARK: return (gettext("\tbookmark \n")); case HELP_CHANNEL_PROGRAM: - return (gettext("\tprogram [-n] [-t ] " + return (gettext("\tprogram [-jn] [-t ] " "[-m ] " "[lua args...]\n")); } @@ -7238,12 +7239,12 @@ zfs_do_channel_program(int argc, char **argv) nvlist_t *outnvl; uint64_t instrlimit = ZCP_DEFAULT_INSTRLIMIT; uint64_t memlimit = ZCP_DEFAULT_MEMLIMIT; - boolean_t sync_flag = B_TRUE; + boolean_t sync_flag = B_TRUE, json_output = B_FALSE; zpool_handle_t *zhp; /* check options */ while (-1 != - (c = getopt(argc, argv, "nt:(instr-limit)m:(memory-limit)"))) { + (c = getopt(argc, argv, "jnt:(instr-limit)m:(memory-limit)"))) { switch (c) { case 't': case 'm': { @@ -7285,6 +7286,10 @@ zfs_do_channel_program(int argc, char **argv) sync_flag = B_FALSE; break; } + case 'j': { + json_output = B_TRUE; + break; + } case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); @@ -7407,11 +7412,14 @@ zfs_do_channel_program(int argc, char **argv) gettext("Channel program execution failed:\n%s\n"), errstring); } else { - (void) printf("Channel program fully executed "); - if (nvlist_empty(outnvl)) { - (void) printf("with no return value.\n"); + if (json_output) { + (void) nvlist_print_json(stdout, outnvl); + } else if (nvlist_empty(outnvl)) { + (void) fprintf(stdout, gettext("Channel program fully " + "executed and did not produce output.\n")); } else { - (void) printf("with return value:\n"); + (void) fprintf(stdout, gettext("Channel program fully " + "executed and produced output:\n")); dump_nvlist(outnvl, 4); } } From owner-svn-src-all@freebsd.org Tue Jun 11 14:26:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F05F315BCADB; Tue, 11 Jun 2019 14:26:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90E6C8E949; Tue, 11 Jun 2019 14:26:56 +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 679EF2CDC; Tue, 11 Jun 2019 14:26:56 +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 x5BEQuZO015595; Tue, 11 Jun 2019 14:26:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEQuSI015594; Tue, 11 Jun 2019 14:26:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111426.x5BEQuSI015594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:26:56 +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: r348918 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 90E6C8E949 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:26:57 -0000 Author: mav Date: Tue Jun 11 14:26:55 2019 New Revision: 348918 URL: https://svnweb.freebsd.org/changeset/base/348918 Log: MFC r348574: MFV r348573: 9993 zil writes can get delayed in zio pipeline illumos/illumos-gate@2258ad0b755b24a55c6173b1e6bb6188389f72dd Reviewed by: Prakash Surya Reviewed by: Brad Lewis Reviewed by: Matt Ahrens Approved by: Dan McDonald Author: George Wilson Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 11 14:26:14 2019 (r348917) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Jun 11 14:26:55 2019 (r348918) @@ -1614,7 +1614,8 @@ zio_taskq_dispatch(zio_t *zio, zio_taskq_type_t q, boo * If this is a high priority I/O, then use the high priority taskq if * available. */ - if (zio->io_priority == ZIO_PRIORITY_NOW && + if ((zio->io_priority == ZIO_PRIORITY_NOW || + zio->io_priority == ZIO_PRIORITY_SYNC_WRITE) && spa->spa_zio_taskq[t][q + 1].stqs_count != 0) q++; From owner-svn-src-all@freebsd.org Tue Jun 11 14:27:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5194D15BCB53; Tue, 11 Jun 2019 14:27:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E90A78EA83; Tue, 11 Jun 2019 14:27:36 +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 C60E12CDD; Tue, 11 Jun 2019 14:27:36 +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 x5BERahT015678; Tue, 11 Jun 2019 14:27:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BERajh015675; Tue, 11 Jun 2019 14:27:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111427.x5BERajh015675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:27: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: r348919 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E90A78EA83 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:27:37 -0000 Author: mav Date: Tue Jun 11 14:27:35 2019 New Revision: 348919 URL: https://svnweb.freebsd.org/changeset/base/348919 Log: MFC r348577: MFV r348576: 9963 Seperate tunable for disabling ZIL vdev flush illumos/illumos-gate@f8fdf6812567ce1a3b76a6bee2ee3f04bd3fcaca Reviewed by: Matt Ahrens Reviewed by: Brad Lewis Reviewed by: Patrick Mooney Approved by: Dan McDonald Author: Prakash Surya Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 11 14:26:55 2019 (r348918) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue Jun 11 14:27:35 2019 (r348919) @@ -217,6 +217,15 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, standard_sm_blksz, CTLF &vdev_standard_sm_blksz, 0, "Block size for standard space map. Power of 2 and greater than 4096."); +/* + * Tunable parameter for debugging or performance analysis. Setting this + * will cause pool corruption on power loss if a volatile out-of-order + * write cache is enabled. + */ +boolean_t zfs_nocacheflush = B_FALSE; +SYSCTL_INT(_vfs_zfs, OID_AUTO, cache_flush_disable, CTLFLAG_RWTUN, + &zfs_nocacheflush, 0, "Disable cache flush"); + /*PRINTFLIKE2*/ void vdev_dbgmsg(vdev_t *vd, const char *fmt, ...) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Jun 11 14:26:55 2019 (r348918) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Jun 11 14:27:35 2019 (r348919) @@ -239,6 +239,10 @@ vdev_file_io_start(zio_t *zio) switch (zio->io_cmd) { case DKIOCFLUSHWRITECACHE: + + if (zfs_nocacheflush) + break; + zio->io_error = VOP_FSYNC(vf->vf_vnode, FSYNC | FDSYNC, kcred, NULL); break; Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jun 11 14:26:55 2019 (r348918) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jun 11 14:27:35 2019 (r348919) @@ -98,13 +98,15 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, zil_replay_disable, CTL &zil_replay_disable, 0, "Disable intent logging replay"); /* - * Tunable parameter for debugging or performance analysis. Setting - * zfs_nocacheflush will cause corruption on power loss if a volatile - * out-of-order write cache is enabled. + * Disable the DKIOCFLUSHWRITECACHE commands that are normally sent to + * the disk(s) by the ZIL after an LWB write has completed. Setting this + * will cause ZIL corruption on power loss if a volatile out-of-order + * write cache is enabled. */ -boolean_t zfs_nocacheflush = B_FALSE; -SYSCTL_INT(_vfs_zfs, OID_AUTO, cache_flush_disable, CTLFLAG_RWTUN, - &zfs_nocacheflush, 0, "Disable cache flush"); +boolean_t zil_nocacheflush = B_FALSE; +SYSCTL_INT(_vfs_zfs, OID_AUTO, zil_nocacheflush, CTLFLAG_RWTUN, + &zil_nocacheflush, 0, "Disable ZIL cache flush"); + boolean_t zfs_trim_enabled = B_TRUE; SYSCTL_DECL(_vfs_zfs_trim); SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_RDTUN, &zfs_trim_enabled, 0, @@ -989,7 +991,7 @@ zil_lwb_add_block(lwb_t *lwb, const blkptr_t *bp) int ndvas = BP_GET_NDVAS(bp); int i; - if (zfs_nocacheflush) + if (zil_nocacheflush) return; mutex_enter(&lwb->lwb_vdev_lock); @@ -1013,7 +1015,7 @@ zil_lwb_add_txg(lwb_t *lwb, uint64_t txg) /* * This function is a called after all VDEVs associated with a given lwb * write have completed their DKIOCFLUSHWRITECACHE command; or as soon - * as the lwb write completes, if "zfs_nocacheflush" is set. + * as the lwb write completes, if "zil_nocacheflush" is set. * * The intention is for this function to be called as soon as the * contents of an lwb are considered "stable" on disk, and will survive From owner-svn-src-all@freebsd.org Tue Jun 11 14:28:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C93415BCBBA; Tue, 11 Jun 2019 14:28:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C03F18EBBC; Tue, 11 Jun 2019 14:28:17 +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 9C3E52CDE; Tue, 11 Jun 2019 14:28:17 +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 x5BESHdR015767; Tue, 11 Jun 2019 14:28:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BESGI5015761; Tue, 11 Jun 2019 14:28:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111428.x5BESGI5015761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:28:16 +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: r348920 - in stable/12: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 348920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C03F18EBBC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:28:18 -0000 Author: mav Date: Tue Jun 11 14:28:16 2019 New Revision: 348920 URL: https://svnweb.freebsd.org/changeset/base/348920 Log: MFC r348579: MFV r348578: 9962 zil_commit should omit cache thrash illumos/illumos-gate@cab3a55e158118937e07d059c46f1bc14d1f254d Reviewed by: Matt Ahrens Reviewed by: Brad Lewis Reviewed by: Patrick Mooney Reviewed by: Jerry Jelinek Approved by: Joshua M. Clulow Author: Prakash Surya Modified: stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Jun 11 14:28:16 2019 (r348920) @@ -1933,6 +1933,7 @@ zil_replay_func_t *ztest_replay_vector[TX_MAX_TYPE] = * ZIL get_data callbacks */ +/* ARGSUSED */ static void ztest_get_done(zgd_t *zgd, int error) { @@ -1944,9 +1945,6 @@ ztest_get_done(zgd_t *zgd, int error) ztest_range_unlock(zgd->zgd_rl); ztest_object_unlock(zd, object); - - if (error == 0 && zgd->zgd_bp) - zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp); umem_free(zgd, sizeof (*zgd)); } Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Jun 11 14:28:16 2019 (r348920) @@ -1982,7 +1982,16 @@ dmu_sync_done(zio_t *zio, arc_buf_t *buf, void *varg) dmu_sync_arg_t *dsa = varg; dbuf_dirty_record_t *dr = dsa->dsa_dr; dmu_buf_impl_t *db = dr->dr_dbuf; + zgd_t *zgd = dsa->dsa_zgd; + /* + * Record the vdev(s) backing this blkptr so they can be flushed after + * the writes for the lwb have completed. + */ + if (zio->io_error == 0) { + zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp); + } + mutex_enter(&db->db_mtx); ASSERT(dr->dt.dl.dr_override_state == DR_IN_DMU_SYNC); if (zio->io_error == 0) { @@ -2032,13 +2041,22 @@ dmu_sync_late_arrival_done(zio_t *zio) blkptr_t *bp = zio->io_bp; dmu_sync_arg_t *dsa = zio->io_private; blkptr_t *bp_orig = &zio->io_bp_orig; + zgd_t *zgd = dsa->dsa_zgd; - if (zio->io_error == 0 && !BP_IS_HOLE(bp)) { - ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE)); - ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); - ASSERT(zio->io_bp->blk_birth == zio->io_txg); - ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); - zio_free(zio->io_spa, zio->io_txg, zio->io_bp); + if (zio->io_error == 0) { + /* + * Record the vdev(s) backing this blkptr so they can be + * flushed after the writes for the lwb have completed. + */ + zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp); + + if (!BP_IS_HOLE(bp)) { + ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE)); + ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig)); + ASSERT(zio->io_bp->blk_birth == zio->io_txg); + ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa)); + zio_free(zio->io_spa, zio->io_txg, zio->io_bp); + } } dmu_tx_commit(dsa->dsa_tx); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h Tue Jun 11 14:28:16 2019 (r348920) @@ -48,10 +48,11 @@ extern "C" { * via zil_lwb_write_issue(). Again, the zilog's "zl_issuer_lock" must * be held when making this transition. * - * After the lwb's zio completes, and the vdev's are flushed, the lwb - * will transition into the "done" state via zil_lwb_write_done(). When - * transitioning from "issued" to "done", the zilog's "zl_lock" must be - * held, *not* the "zl_issuer_lock". + * After the lwb's write zio completes, it transitions into the "write + * done" state via zil_lwb_write_done(); and then into the "flush done" + * state via zil_lwb_flush_vdevs_done(). When transitioning from + * "issued" to "write done", and then from "write done" to "flush done", + * the zilog's "zl_lock" must be held, *not* the "zl_issuer_lock". * * The zilog's "zl_issuer_lock" can become heavily contended in certain * workloads, so we specifically avoid acquiring that lock when @@ -68,13 +69,14 @@ extern "C" { * "zl_issuer_lock" will prevent a concurrent thread from transitioning * that lwb to the "issued" state. Likewise, if an lwb is already in the * "issued" state, holding the "zl_lock" will prevent a concurrent - * thread from transitioning that lwb to the "done" state. + * thread from transitioning that lwb to the "write done" state. */ typedef enum { LWB_STATE_CLOSED, LWB_STATE_OPENED, LWB_STATE_ISSUED, - LWB_STATE_DONE, + LWB_STATE_WRITE_DONE, + LWB_STATE_FLUSH_DONE, LWB_NUM_STATES } lwb_state_t; Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Jun 11 14:28:16 2019 (r348920) @@ -1244,6 +1244,7 @@ zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t return (0); } +/* ARGSUSED */ void zfs_get_done(zgd_t *zgd, int error) { @@ -1261,9 +1262,6 @@ zfs_get_done(zgd_t *zgd, int error) */ VN_RELE_ASYNC(ZTOV(zp), dsl_pool_vnrele_taskq(dmu_objset_pool(os))); - if (error == 0 && zgd->zgd_bp) - zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp); - kmem_free(zgd, sizeof (zgd_t)); } @@ -1387,11 +1385,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, str * TX_WRITE2 relies on the data previously * written by the TX_WRITE that caused * EALREADY. We zero out the BP because - * it is the old, currently-on-disk BP, - * so there's no need to zio_flush() its - * vdevs (flushing would needlesly hurt - * performance, and doesn't work on - * indirect vdevs). + * it is the old, currently-on-disk BP. */ zgd->zgd_bp = NULL; BP_ZERO(bp); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Jun 11 14:28:16 2019 (r348920) @@ -548,7 +548,7 @@ zil_free_lwb(zilog_t *zilog, lwb_t *lwb) ASSERT3P(lwb->lwb_root_zio, ==, NULL); ASSERT3U(lwb->lwb_max_txg, <=, spa_syncing_txg(zilog->zl_spa)); ASSERT(lwb->lwb_state == LWB_STATE_CLOSED || - lwb->lwb_state == LWB_STATE_DONE); + lwb->lwb_state == LWB_STATE_FLUSH_DONE); /* * Clear the zilog's field to indicate this lwb is no longer @@ -960,7 +960,8 @@ zil_commit_waiter_link_lwb(zil_commit_waiter_t *zcw, l ASSERT3P(zcw->zcw_lwb, ==, NULL); ASSERT3P(lwb, !=, NULL); ASSERT(lwb->lwb_state == LWB_STATE_OPENED || - lwb->lwb_state == LWB_STATE_ISSUED); + lwb->lwb_state == LWB_STATE_ISSUED || + lwb->lwb_state == LWB_STATE_WRITE_DONE); list_insert_tail(&lwb->lwb_waiters, zcw); zcw->zcw_lwb = lwb; @@ -1006,6 +1007,42 @@ zil_lwb_add_block(lwb_t *lwb, const blkptr_t *bp) mutex_exit(&lwb->lwb_vdev_lock); } +static void +zil_lwb_flush_defer(lwb_t *lwb, lwb_t *nlwb) +{ + avl_tree_t *src = &lwb->lwb_vdev_tree; + avl_tree_t *dst = &nlwb->lwb_vdev_tree; + void *cookie = NULL; + zil_vdev_node_t *zv; + + ASSERT3S(lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); + ASSERT3S(nlwb->lwb_state, !=, LWB_STATE_WRITE_DONE); + ASSERT3S(nlwb->lwb_state, !=, LWB_STATE_FLUSH_DONE); + + /* + * While 'lwb' is at a point in its lifetime where lwb_vdev_tree does + * not need the protection of lwb_vdev_lock (it will only be modified + * while holding zilog->zl_lock) as its writes and those of its + * children have all completed. The younger 'nlwb' may be waiting on + * future writes to additional vdevs. + */ + mutex_enter(&nlwb->lwb_vdev_lock); + /* + * Tear down the 'lwb' vdev tree, ensuring that entries which do not + * exist in 'nlwb' are moved to it, freeing any would-be duplicates. + */ + while ((zv = avl_destroy_nodes(src, &cookie)) != NULL) { + avl_index_t where; + + if (avl_find(dst, zv, &where) == NULL) { + avl_insert(dst, zv, where); + } else { + kmem_free(zv, sizeof (*zv)); + } + } + mutex_exit(&nlwb->lwb_vdev_lock); +} + void zil_lwb_add_txg(lwb_t *lwb, uint64_t txg) { @@ -1013,9 +1050,13 @@ zil_lwb_add_txg(lwb_t *lwb, uint64_t txg) } /* - * This function is a called after all VDEVs associated with a given lwb + * This function is a called after all vdevs associated with a given lwb * write have completed their DKIOCFLUSHWRITECACHE command; or as soon - * as the lwb write completes, if "zil_nocacheflush" is set. + * as the lwb write completes, if "zil_nocacheflush" is set. Further, + * all "previous" lwb's will have completed before this function is + * called; i.e. this function is called for all previous lwbs before + * it's called for "this" lwb (enforced via zio the dependencies + * configured in zil_lwb_set_zio_dependency()). * * The intention is for this function to be called as soon as the * contents of an lwb are considered "stable" on disk, and will survive @@ -1052,8 +1093,10 @@ zil_lwb_flush_vdevs_done(zio_t *zio) zilog->zl_last_lwb_latency = gethrtime() - lwb->lwb_issued_timestamp; lwb->lwb_root_zio = NULL; - lwb->lwb_state = LWB_STATE_DONE; + ASSERT3S(lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); + lwb->lwb_state = LWB_STATE_FLUSH_DONE; + if (zilog->zl_last_lwb_opened == lwb) { /* * Remember the highest committed log sequence number @@ -1093,14 +1136,17 @@ zil_lwb_flush_vdevs_done(zio_t *zio) } /* - * This is called when an lwb write completes. This means, this specific - * lwb was written to disk, and all dependent lwb have also been - * written to disk. - * - * At this point, a DKIOCFLUSHWRITECACHE command hasn't been issued to - * the VDEVs involved in writing out this specific lwb. The lwb will be - * "done" once zil_lwb_flush_vdevs_done() is called, which occurs in the - * zio completion callback for the lwb's root zio. + * This is called when an lwb's write zio completes. The callback's + * purpose is to issue the DKIOCFLUSHWRITECACHE commands for the vdevs + * in the lwb's lwb_vdev_tree. The tree will contain the vdevs involved + * in writing out this specific lwb's data, and in the case that cache + * flushes have been deferred, vdevs involved in writing the data for + * previous lwbs. The writes corresponding to all the vdevs in the + * lwb_vdev_tree will have completed by the time this is called, due to + * the zio dependencies configured in zil_lwb_set_zio_dependency(), + * which takes deferred flushes into account. The lwb will be "done" + * once zil_lwb_flush_vdevs_done() is called, which occurs in the zio + * completion callback for the lwb's root zio. */ static void zil_lwb_write_done(zio_t *zio) @@ -1111,6 +1157,7 @@ zil_lwb_write_done(zio_t *zio) avl_tree_t *t = &lwb->lwb_vdev_tree; void *cookie = NULL; zil_vdev_node_t *zv; + lwb_t *nlwb; ASSERT3S(spa_config_held(spa, SCL_STATE, RW_READER), !=, 0); @@ -1124,10 +1171,11 @@ zil_lwb_write_done(zio_t *zio) abd_put(zio->io_abd); - ASSERT3S(lwb->lwb_state, ==, LWB_STATE_ISSUED); - mutex_enter(&zilog->zl_lock); + ASSERT3S(lwb->lwb_state, ==, LWB_STATE_ISSUED); + lwb->lwb_state = LWB_STATE_WRITE_DONE; lwb->lwb_write_zio = NULL; + nlwb = list_next(&zilog->zl_lwb_list, lwb); mutex_exit(&zilog->zl_lock); if (avl_numnodes(t) == 0) @@ -1146,6 +1194,27 @@ zil_lwb_write_done(zio_t *zio) return; } + /* + * If this lwb does not have any threads waiting for it to + * complete, we want to defer issuing the DKIOCFLUSHWRITECACHE + * command to the vdevs written to by "this" lwb, and instead + * rely on the "next" lwb to handle the DKIOCFLUSHWRITECACHE + * command for those vdevs. Thus, we merge the vdev tree of + * "this" lwb with the vdev tree of the "next" lwb in the list, + * and assume the "next" lwb will handle flushing the vdevs (or + * deferring the flush(s) again). + * + * This is a useful performance optimization, especially for + * workloads with lots of async write activity and few sync + * write and/or fsync activity, as it has the potential to + * coalesce multiple flush commands to a vdev into one. + */ + if (list_head(&lwb->lwb_waiters) == NULL && nlwb != NULL) { + zil_lwb_flush_defer(lwb, nlwb); + ASSERT(avl_is_empty(&lwb->lwb_vdev_tree)); + return; + } + while ((zv = avl_destroy_nodes(t, &cookie)) != NULL) { vdev_t *vd = vdev_lookup_top(spa, zv->zv_vdev); if (vd != NULL) @@ -1154,6 +1223,73 @@ zil_lwb_write_done(zio_t *zio) } } +static void +zil_lwb_set_zio_dependency(zilog_t *zilog, lwb_t *lwb) +{ + lwb_t *last_lwb_opened = zilog->zl_last_lwb_opened; + + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_lock)); + + /* + * The zilog's "zl_last_lwb_opened" field is used to build the + * lwb/zio dependency chain, which is used to preserve the + * ordering of lwb completions that is required by the semantics + * of the ZIL. Each new lwb zio becomes a parent of the + * "previous" lwb zio, such that the new lwb's zio cannot + * complete until the "previous" lwb's zio completes. + * + * This is required by the semantics of zil_commit(); the commit + * waiters attached to the lwbs will be woken in the lwb zio's + * completion callback, so this zio dependency graph ensures the + * waiters are woken in the correct order (the same order the + * lwbs were created). + */ + if (last_lwb_opened != NULL && + last_lwb_opened->lwb_state != LWB_STATE_FLUSH_DONE) { + ASSERT(last_lwb_opened->lwb_state == LWB_STATE_OPENED || + last_lwb_opened->lwb_state == LWB_STATE_ISSUED || + last_lwb_opened->lwb_state == LWB_STATE_WRITE_DONE); + + ASSERT3P(last_lwb_opened->lwb_root_zio, !=, NULL); + zio_add_child(lwb->lwb_root_zio, + last_lwb_opened->lwb_root_zio); + + /* + * If the previous lwb's write hasn't already completed, + * we also want to order the completion of the lwb write + * zios (above, we only order the completion of the lwb + * root zios). This is required because of how we can + * defer the DKIOCFLUSHWRITECACHE commands for each lwb. + * + * When the DKIOCFLUSHWRITECACHE commands are defered, + * the previous lwb will rely on this lwb to flush the + * vdevs written to by that previous lwb. Thus, we need + * to ensure this lwb doesn't issue the flush until + * after the previous lwb's write completes. We ensure + * this ordering by setting the zio parent/child + * relationship here. + * + * Without this relationship on the lwb's write zio, + * it's possible for this lwb's write to complete prior + * to the previous lwb's write completing; and thus, the + * vdevs for the previous lwb would be flushed prior to + * that lwb's data being written to those vdevs (the + * vdevs are flushed in the lwb write zio's completion + * handler, zil_lwb_write_done()). + */ + if (last_lwb_opened->lwb_state != LWB_STATE_WRITE_DONE) { + ASSERT(last_lwb_opened->lwb_state == LWB_STATE_OPENED || + last_lwb_opened->lwb_state == LWB_STATE_ISSUED); + + ASSERT3P(last_lwb_opened->lwb_write_zio, !=, NULL); + zio_add_child(lwb->lwb_write_zio, + last_lwb_opened->lwb_write_zio); + } + } +} + + /* * This function's purpose is to "open" an lwb such that it is ready to * accept new itxs being committed to it. To do this, the lwb's zio @@ -1198,33 +1334,8 @@ zil_lwb_write_open(zilog_t *zilog, lwb_t *lwb) lwb->lwb_state = LWB_STATE_OPENED; mutex_enter(&zilog->zl_lock); - - /* - * The zilog's "zl_last_lwb_opened" field is used to - * build the lwb/zio dependency chain, which is used to - * preserve the ordering of lwb completions that is - * required by the semantics of the ZIL. Each new lwb - * zio becomes a parent of the "previous" lwb zio, such - * that the new lwb's zio cannot complete until the - * "previous" lwb's zio completes. - * - * This is required by the semantics of zil_commit(); - * the commit waiters attached to the lwbs will be woken - * in the lwb zio's completion callback, so this zio - * dependency graph ensures the waiters are woken in the - * correct order (the same order the lwbs were created). - */ - lwb_t *last_lwb_opened = zilog->zl_last_lwb_opened; - if (last_lwb_opened != NULL && - last_lwb_opened->lwb_state != LWB_STATE_DONE) { - ASSERT(last_lwb_opened->lwb_state == LWB_STATE_OPENED || - last_lwb_opened->lwb_state == LWB_STATE_ISSUED); - ASSERT3P(last_lwb_opened->lwb_root_zio, !=, NULL); - zio_add_child(lwb->lwb_root_zio, - last_lwb_opened->lwb_root_zio); - } + zil_lwb_set_zio_dependency(zilog, lwb); zilog->zl_last_lwb_opened = lwb; - mutex_exit(&zilog->zl_lock); } @@ -1921,7 +2032,8 @@ zil_prune_commit_list(zilog_t *zilog) mutex_enter(&zilog->zl_lock); lwb_t *last_lwb = zilog->zl_last_lwb_opened; - if (last_lwb == NULL || last_lwb->lwb_state == LWB_STATE_DONE) { + if (last_lwb == NULL || + last_lwb->lwb_state == LWB_STATE_FLUSH_DONE) { /* * All of the itxs this waiter was waiting on * must have already completed (or there were @@ -2002,7 +2114,8 @@ zil_process_commit_list(zilog_t *zilog) lwb = zil_create(zilog); } else { ASSERT3S(lwb->lwb_state, !=, LWB_STATE_ISSUED); - ASSERT3S(lwb->lwb_state, !=, LWB_STATE_DONE); + ASSERT3S(lwb->lwb_state, !=, LWB_STATE_WRITE_DONE); + ASSERT3S(lwb->lwb_state, !=, LWB_STATE_FLUSH_DONE); } while (itx = list_head(&zilog->zl_itx_commit_list)) { @@ -2104,7 +2217,8 @@ zil_process_commit_list(zilog_t *zilog) ASSERT(list_is_empty(&nolwb_waiters)); ASSERT3P(lwb, !=, NULL); ASSERT3S(lwb->lwb_state, !=, LWB_STATE_ISSUED); - ASSERT3S(lwb->lwb_state, !=, LWB_STATE_DONE); + ASSERT3S(lwb->lwb_state, !=, LWB_STATE_WRITE_DONE); + ASSERT3S(lwb->lwb_state, !=, LWB_STATE_FLUSH_DONE); /* * At this point, the ZIL block pointed at by the "lwb" @@ -2225,7 +2339,8 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_w * acquiring it when it's not necessary to do so. */ if (lwb->lwb_state == LWB_STATE_ISSUED || - lwb->lwb_state == LWB_STATE_DONE) + lwb->lwb_state == LWB_STATE_WRITE_DONE || + lwb->lwb_state == LWB_STATE_FLUSH_DONE) return; /* @@ -2273,7 +2388,8 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_w * more details on the lwb states, and locking requirements. */ if (lwb->lwb_state == LWB_STATE_ISSUED || - lwb->lwb_state == LWB_STATE_DONE) + lwb->lwb_state == LWB_STATE_WRITE_DONE || + lwb->lwb_state == LWB_STATE_FLUSH_DONE) goto out; ASSERT3S(lwb->lwb_state, ==, LWB_STATE_OPENED); @@ -2458,7 +2574,8 @@ zil_commit_waiter(zilog_t *zilog, zil_commit_waiter_t IMPLY(lwb != NULL, lwb->lwb_state == LWB_STATE_ISSUED || - lwb->lwb_state == LWB_STATE_DONE); + lwb->lwb_state == LWB_STATE_WRITE_DONE || + lwb->lwb_state == LWB_STATE_FLUSH_DONE); cv_wait(&zcw->zcw_cv, &zcw->zcw_lock); } } @@ -3099,13 +3216,13 @@ zil_suspend(const char *osname, void **cookiep) * to disk before proceeding. If we used zil_commit instead, it * would just call txg_wait_synced(), because zl_suspend is set. * txg_wait_synced() doesn't wait for these lwb's to be - * LWB_STATE_DONE before returning. + * LWB_STATE_FLUSH_DONE before returning. */ zil_commit_impl(zilog, 0); /* - * Now that we've ensured all lwb's are LWB_STATE_DONE, we use - * txg_wait_synced() to ensure the data from the zilog has + * Now that we've ensured all lwb's are LWB_STATE_FLUSH_DONE, we + * use txg_wait_synced() to ensure the data from the zilog has * migrated to the main pool before calling zil_destroy(). */ txg_wait_synced(zilog->zl_dmu_pool, 0); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Jun 11 14:27:35 2019 (r348919) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Jun 11 14:28:16 2019 (r348920) @@ -1321,6 +1321,7 @@ zvol_close(struct g_provider *pp, int flag, int count) return (error); } +/* ARGSUSED */ static void zvol_get_done(zgd_t *zgd, int error) { @@ -1328,9 +1329,6 @@ zvol_get_done(zgd_t *zgd, int error) dmu_buf_rele(zgd->zgd_db, zgd); zfs_range_unlock(zgd->zgd_rl); - - if (error == 0 && zgd->zgd_bp) - zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp); kmem_free(zgd, sizeof (zgd_t)); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:29:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E64E815BCC95; Tue, 11 Jun 2019 14:29:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85FC38ED40; Tue, 11 Jun 2019 14:29:21 +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 7B9F92CDF; Tue, 11 Jun 2019 14:29:21 +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 x5BETLmS015863; Tue, 11 Jun 2019 14:29:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BETLZo015862; Tue, 11 Jun 2019 14:29:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111429.x5BETLZo015862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:29: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: r348921 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 348921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 85FC38ED40 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:29:22 -0000 Author: mav Date: Tue Jun 11 14:29:21 2019 New Revision: 348921 URL: https://svnweb.freebsd.org/changeset/base/348921 Log: MFC r348581: MFV r348580: 9559 zfs diff handles files on delete queue in fromsnap poorly illumos/illumos-gate@20633e304b57bc98f70fdb194081b7023adf527b Reviewed by: Joshua M. Clulow Approved by: Richard Lowe Author: Paul Dagnelie Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Tue Jun 11 14:28:16 2019 (r348920) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Tue Jun 11 14:29:21 2019 (r348921) @@ -22,7 +22,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2015, 2017 by Delphix. All rights reserved. + * Copyright (c) 2015, 2018 by Delphix. All rights reserved. * Copyright 2016 Joyent, Inc. * Copyright 2016 Igor Kozhukhov */ @@ -47,7 +47,7 @@ #include "libzfs_impl.h" #define ZDIFF_SNAPDIR "/.zfs/snapshot/" -#define ZDIFF_SHARESDIR "/.zfs/shares/" +#define ZDIFF_SHARESDIR "/.zfs/shares/" #define ZDIFF_PREFIX "zfs-diff-%d" #define ZDIFF_ADDED '+' @@ -361,12 +361,12 @@ describe_free(FILE *fp, differ_info_t *di, uint64_t ob if (get_stats_for_obj(di, di->fromsnap, object, namebuf, maxlen, &sb) != 0) { - /* Let it slide, if in the delete queue on from side */ - if (di->zerr == ENOENT && sb.zs_links == 0) { - di->zerr = 0; - return (0); - } return (-1); + } + /* Don't print if in the delete queue on from side */ + if (di->zerr == ESTALE) { + di->zerr = 0; + return (0); } print_file(fp, di, ZDIFF_REMOVED, namebuf, &sb); From owner-svn-src-all@freebsd.org Tue Jun 11 14:30:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86B9915BCD23; Tue, 11 Jun 2019 14:30:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 250048EE88; Tue, 11 Jun 2019 14:30:10 +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 F3C192CE3; Tue, 11 Jun 2019 14:30:09 +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 x5BEU9lW015980; Tue, 11 Jun 2019 14:30:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEU9ZU015977; Tue, 11 Jun 2019 14:30:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111430.x5BEU9ZU015977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:30:09 +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: r348922 - in stable/12: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 250048EE88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:30:10 -0000 Author: mav Date: Tue Jun 11 14:30:09 2019 New Revision: 348922 URL: https://svnweb.freebsd.org/changeset/base/348922 Log: MFC r348584: MFV r348583: 9847 leaking dd_clones (DMU_OT_DSL_CLONES) objects illumos/illumos-gate@17fb938fd6cdce3ff1bb47dafda0774f742249a3 Reviewed by: George Wilson Reviewed by: Serapheim Dimitropoulos Reviewed by: Brian Behlendorf Approved by: Richard Lowe Author: Matthew Ahrens Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 11 14:29:21 2019 (r348921) +++ stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jun 11 14:30:09 2019 (r348922) @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #undef verify @@ -111,6 +112,7 @@ static uint64_t max_inflight = 1000; static int leaked_objects = 0; static void snprintf_blkptr_compact(char *, size_t, const blkptr_t *); +static void mos_obj_refd(uint64_t); /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -1592,6 +1594,8 @@ dump_dsl_dir(objset_t *os, uint64_t object, void *data DO(CHILD_RSRV); DO(REFRSRV); #undef DO + (void) printf("\t\tclones = %llu\n", + (u_longlong_t)dd->dd_clones); } /*ARGSUSED*/ @@ -1774,6 +1778,33 @@ dump_full_bpobj(bpobj_t *bpo, const char *name, int in } static void +bpobj_count_refd(bpobj_t *bpo) +{ + mos_obj_refd(bpo->bpo_object); + + if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { + mos_obj_refd(bpo->bpo_phys->bpo_subobjs); + for (uint64_t i = 0; i < bpo->bpo_phys->bpo_num_subobjs; i++) { + uint64_t subobj; + bpobj_t subbpo; + int error; + VERIFY0(dmu_read(bpo->bpo_os, + bpo->bpo_phys->bpo_subobjs, + i * sizeof (subobj), sizeof (subobj), &subobj, 0)); + error = bpobj_open(&subbpo, bpo->bpo_os, subobj); + if (error != 0) { + (void) printf("ERROR %u while trying to open " + "subobj id %llu\n", + error, (u_longlong_t)subobj); + continue; + } + bpobj_count_refd(&subbpo); + bpobj_close(&subbpo); + } + } +} + +static void dump_deadlist(dsl_deadlist_t *dl) { dsl_deadlist_entry_t *dle; @@ -1781,7 +1812,24 @@ dump_deadlist(dsl_deadlist_t *dl) char bytes[32]; char comp[32]; char uncomp[32]; + uint64_t empty_bpobj = + dmu_objset_spa(dl->dl_os)->spa_dsl_pool->dp_empty_bpobj; + /* force the tree to be loaded */ + dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); + + if (dl->dl_oldfmt) { + if (dl->dl_bpobj.bpo_object != empty_bpobj) + bpobj_count_refd(&dl->dl_bpobj); + } else { + mos_obj_refd(dl->dl_object); + for (dle = avl_first(&dl->dl_tree); dle; + dle = AVL_NEXT(&dl->dl_tree, dle)) { + if (dle->dle_bpobj.bpo_object != empty_bpobj) + bpobj_count_refd(&dle->dle_bpobj); + } + } + /* make sure nicenum has enough space */ CTASSERT(sizeof (bytes) >= NN_NUMBUF_SZ); CTASSERT(sizeof (comp) >= NN_NUMBUF_SZ); @@ -1806,9 +1854,6 @@ dump_deadlist(dsl_deadlist_t *dl) (void) printf("\n"); - /* force the tree to be loaded */ - dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); - for (dle = avl_first(&dl->dl_tree); dle; dle = AVL_NEXT(&dl->dl_tree, dle)) { if (dump_opt['d'] >= 5) { @@ -2219,6 +2264,30 @@ dump_object(objset_t *os, uint64_t object, int verbosi dmu_buf_rele(db, FTAG); } +static void +count_dir_mos_objects(dsl_dir_t *dd) +{ + mos_obj_refd(dd->dd_object); + mos_obj_refd(dsl_dir_phys(dd)->dd_child_dir_zapobj); + mos_obj_refd(dsl_dir_phys(dd)->dd_deleg_zapobj); + mos_obj_refd(dsl_dir_phys(dd)->dd_props_zapobj); + mos_obj_refd(dsl_dir_phys(dd)->dd_clones); +} + +static void +count_ds_mos_objects(dsl_dataset_t *ds) +{ + mos_obj_refd(ds->ds_object); + mos_obj_refd(dsl_dataset_phys(ds)->ds_next_clones_obj); + mos_obj_refd(dsl_dataset_phys(ds)->ds_props_obj); + mos_obj_refd(dsl_dataset_phys(ds)->ds_userrefs_obj); + mos_obj_refd(dsl_dataset_phys(ds)->ds_snapnames_zapobj); + + if (!dsl_dataset_is_snapshot(ds)) { + count_dir_mos_objects(ds->ds_dir); + } +} + static const char *objset_types[DMU_OST_NUMTYPES] = { "NONE", "META", "ZPL", "ZVOL", "OTHER", "ANY" }; @@ -2296,6 +2365,7 @@ dump_dir(objset_t *os) (void) printf("ds_remap_deadlist:\n"); dump_deadlist(&ds->ds_remap_deadlist); } + count_ds_mos_objects(ds); } if (verbosity < 2) @@ -4460,7 +4530,162 @@ verify_checkpoint(spa_t *spa) return (error); } +/* ARGSUSED */ static void +mos_leaks_cb(void *arg, uint64_t start, uint64_t size) +{ + for (uint64_t i = start; i < size; i++) { + (void) printf("MOS object %llu referenced but not allocated\n", + (u_longlong_t)i); + } +} + +static range_tree_t *mos_refd_objs; + +static void +mos_obj_refd(uint64_t obj) +{ + if (obj != 0 && mos_refd_objs != NULL) + range_tree_add(mos_refd_objs, obj, 1); +} + +static void +mos_leak_vdev(vdev_t *vd) +{ + mos_obj_refd(vd->vdev_dtl_object); + mos_obj_refd(vd->vdev_ms_array); + mos_obj_refd(vd->vdev_top_zap); + mos_obj_refd(vd->vdev_indirect_config.vic_births_object); + mos_obj_refd(vd->vdev_indirect_config.vic_mapping_object); + mos_obj_refd(vd->vdev_leaf_zap); + if (vd->vdev_checkpoint_sm != NULL) + mos_obj_refd(vd->vdev_checkpoint_sm->sm_object); + if (vd->vdev_indirect_mapping != NULL) { + mos_obj_refd(vd->vdev_indirect_mapping-> + vim_phys->vimp_counts_object); + } + if (vd->vdev_obsolete_sm != NULL) + mos_obj_refd(vd->vdev_obsolete_sm->sm_object); + + for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { + metaslab_t *ms = vd->vdev_ms[m]; + mos_obj_refd(space_map_object(ms->ms_sm)); + } + + for (uint64_t c = 0; c < vd->vdev_children; c++) { + mos_leak_vdev(vd->vdev_child[c]); + } +} + +static int +dump_mos_leaks(spa_t *spa) +{ + int rv = 0; + objset_t *mos = spa->spa_meta_objset; + dsl_pool_t *dp = spa->spa_dsl_pool; + + /* Visit and mark all referenced objects in the MOS */ + + mos_obj_refd(DMU_POOL_DIRECTORY_OBJECT); + mos_obj_refd(spa->spa_pool_props_object); + mos_obj_refd(spa->spa_config_object); + mos_obj_refd(spa->spa_ddt_stat_object); + mos_obj_refd(spa->spa_feat_desc_obj); + mos_obj_refd(spa->spa_feat_enabled_txg_obj); + mos_obj_refd(spa->spa_feat_for_read_obj); + mos_obj_refd(spa->spa_feat_for_write_obj); + mos_obj_refd(spa->spa_history); + mos_obj_refd(spa->spa_errlog_last); + mos_obj_refd(spa->spa_errlog_scrub); + mos_obj_refd(spa->spa_all_vdev_zaps); + mos_obj_refd(spa->spa_dsl_pool->dp_bptree_obj); + mos_obj_refd(spa->spa_dsl_pool->dp_tmp_userrefs_obj); + mos_obj_refd(spa->spa_dsl_pool->dp_scan->scn_phys.scn_queue_obj); + bpobj_count_refd(&spa->spa_deferred_bpobj); + mos_obj_refd(dp->dp_empty_bpobj); + bpobj_count_refd(&dp->dp_obsolete_bpobj); + bpobj_count_refd(&dp->dp_free_bpobj); + mos_obj_refd(spa->spa_l2cache.sav_object); + mos_obj_refd(spa->spa_spares.sav_object); + + mos_obj_refd(spa->spa_condensing_indirect_phys. + scip_next_mapping_object); + mos_obj_refd(spa->spa_condensing_indirect_phys. + scip_prev_obsolete_sm_object); + if (spa->spa_condensing_indirect_phys.scip_next_mapping_object != 0) { + vdev_indirect_mapping_t *vim = + vdev_indirect_mapping_open(mos, + spa->spa_condensing_indirect_phys.scip_next_mapping_object); + mos_obj_refd(vim->vim_phys->vimp_counts_object); + vdev_indirect_mapping_close(vim); + } + + if (dp->dp_origin_snap != NULL) { + dsl_dataset_t *ds; + + dsl_pool_config_enter(dp, FTAG); + VERIFY0(dsl_dataset_hold_obj(dp, + dsl_dataset_phys(dp->dp_origin_snap)->ds_next_snap_obj, + FTAG, &ds)); + count_ds_mos_objects(ds); + dump_deadlist(&ds->ds_deadlist); + dsl_dataset_rele(ds, FTAG); + dsl_pool_config_exit(dp, FTAG); + + count_ds_mos_objects(dp->dp_origin_snap); + dump_deadlist(&dp->dp_origin_snap->ds_deadlist); + } + count_dir_mos_objects(dp->dp_mos_dir); + if (dp->dp_free_dir != NULL) + count_dir_mos_objects(dp->dp_free_dir); + if (dp->dp_leak_dir != NULL) + count_dir_mos_objects(dp->dp_leak_dir); + + mos_leak_vdev(spa->spa_root_vdev); + + for (uint64_t class = 0; class < DDT_CLASSES; class++) { + for (uint64_t type = 0; type < DDT_TYPES; type++) { + for (uint64_t cksum = 0; + cksum < ZIO_CHECKSUM_FUNCTIONS; cksum++) { + ddt_t *ddt = spa->spa_ddt[cksum]; + mos_obj_refd(ddt->ddt_object[type][class]); + } + } + } + + /* + * Visit all allocated objects and make sure they are referenced. + */ + uint64_t object = 0; + while (dmu_object_next(mos, &object, B_FALSE, 0) == 0) { + if (range_tree_contains(mos_refd_objs, object, 1)) { + range_tree_remove(mos_refd_objs, object, 1); + } else { + dmu_object_info_t doi; + const char *name; + dmu_object_info(mos, object, &doi); + if (doi.doi_type & DMU_OT_NEWTYPE) { + dmu_object_byteswap_t bswap = + DMU_OT_BYTESWAP(doi.doi_type); + name = dmu_ot_byteswap[bswap].ob_name; + } else { + name = dmu_ot[doi.doi_type].ot_name; + } + + (void) printf("MOS object %llu (%s) leaked\n", + (u_longlong_t)object, name); + rv = 2; + } + } + (void) range_tree_walk(mos_refd_objs, mos_leaks_cb, NULL); + if (!range_tree_is_empty(mos_refd_objs)) + rv = 2; + range_tree_vacate(mos_refd_objs, NULL, NULL); + range_tree_destroy(mos_refd_objs); + return (rv); +} + +static void dump_zpool(spa_t *spa) { dsl_pool_t *dp = spa_get_dsl(spa); @@ -4491,7 +4716,9 @@ dump_zpool(spa_t *spa) dump_metaslab_groups(spa); if (dump_opt['d'] || dump_opt['i']) { + mos_refd_objs = range_tree_create(NULL, NULL); dump_dir(dp->dp_meta_objset); + if (dump_opt['d'] >= 3) { dsl_pool_t *dp = spa->spa_dsl_pool; dump_full_bpobj(&spa->spa_deferred_bpobj, @@ -4518,6 +4745,9 @@ dump_zpool(spa_t *spa) (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); + if (rc == 0 && !dump_opt['L']) + rc = dump_mos_leaks(spa); + for (spa_feature_t f = 0; f < SPA_FEATURES; f++) { uint64_t refcount; @@ -4547,6 +4777,7 @@ dump_zpool(spa_t *spa) rc = verify_device_removal_feature_counts(spa); } } + if (rc == 0 && (dump_opt['b'] || dump_opt['c'])) rc = dump_block_stats(spa); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jun 11 14:29:21 2019 (r348921) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jun 11 14:30:09 2019 (r348922) @@ -786,6 +786,8 @@ dsl_dir_destroy_sync(uint64_t ddobj, dmu_tx_t *tx) VERIFY0(zap_destroy(mos, dsl_dir_phys(dd)->dd_child_dir_zapobj, tx)); VERIFY0(zap_destroy(mos, dsl_dir_phys(dd)->dd_props_zapobj, tx)); + if (dsl_dir_phys(dd)->dd_clones != 0) + VERIFY0(zap_destroy(mos, dsl_dir_phys(dd)->dd_clones, tx)); VERIFY0(dsl_deleg_destroy(mos, dsl_dir_phys(dd)->dd_deleg_zapobj, tx)); VERIFY0(zap_remove(mos, dsl_dir_phys(dd->dd_parent)->dd_child_dir_zapobj, Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c Tue Jun 11 14:29:21 2019 (r348921) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c Tue Jun 11 14:30:09 2019 (r348922) @@ -279,7 +279,6 @@ vdev_indirect_mapping_entry_for_offset_or_next(vdev_in B_TRUE)); } - void vdev_indirect_mapping_close(vdev_indirect_mapping_t *vim) { From owner-svn-src-all@freebsd.org Tue Jun 11 14:30:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B495F15BCDA7; Tue, 11 Jun 2019 14:30:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 549FD8EFE6; Tue, 11 Jun 2019 14:30:42 +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 18A522CF4; Tue, 11 Jun 2019 14:30:42 +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 x5BEUfXi016056; Tue, 11 Jun 2019 14:30:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEUf8x016055; Tue, 11 Jun 2019 14:30:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111430.x5BEUf8x016055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:30:41 +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: r348923 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 549FD8EFE6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:30:43 -0000 Author: mav Date: Tue Jun 11 14:30:41 2019 New Revision: 348923 URL: https://svnweb.freebsd.org/changeset/base/348923 Log: MFC r348586: MFV r348585: 9683 Allow bypassing devid in vdev_disk_open() illumos/illumos-gate@6fe4f3002ca33af5ab7123ed78d81899dadf2fbb Reviewed by: Sara Hartse Reviewed by: George Wilson Approved by: Dan McDonald Author: Pavel Zakharov This is irrelevant to FreeBSD, just to reduce divergence. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Jun 11 14:30:09 2019 (r348922) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Tue Jun 11 14:30:41 2019 (r348923) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ @@ -50,6 +50,21 @@ typedef struct vdev_disk_ldi_cb { ldi_callback_id_t lcb_id; } vdev_disk_ldi_cb_t; +/* + * Bypass the devid when opening a disk vdev. + * There have been issues where the devids of several devices were shuffled, + * causing pool open failures. Note, that this flag is intended to be used + * for pool recovery only. + * + * Note that if a pool is imported with the devids bypassed, all its vdevs will + * cease storing devid information permanently. In practice, the devid is rarely + * useful as vdev paths do not tend to change unless the hardware is + * reconfigured. That said, if the paths do change and a pool fails to open + * automatically at boot, a simple zpool import should re-scan the paths and fix + * the issue. + */ +boolean_t vdev_disk_bypass_devid = B_FALSE; + static void vdev_disk_alloc(vdev_t *vd) { @@ -306,6 +321,16 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * dvd = vd->vdev_tsd; /* + * Allow bypassing the devid. + */ + if (vd->vdev_devid != NULL && vdev_disk_bypass_devid) { + vdev_dbgmsg(vd, "vdev_disk_open, devid %s bypassed", + vd->vdev_devid); + spa_strfree(vd->vdev_devid); + vd->vdev_devid = NULL; + } + + /* * When opening a disk device, we want to preserve the user's original * intent. We always want to open the device by the path the user gave * us, even if it is one of multiple paths to the save device. But we @@ -367,6 +392,19 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * if (error == 0 && vd->vdev_devid != NULL && ldi_get_devid(dvd->vd_lh, &devid) == 0) { if (ddi_devid_compare(devid, dvd->vd_devid) != 0) { + /* + * A mismatch here is unexpected, log it. + */ + char *devid_str = ddi_devid_str_encode(devid, + dvd->vd_minor); + vdev_dbgmsg(vd, "vdev_disk_open: devid " + "mismatch: %s != %s", vd->vdev_devid, + devid_str); + cmn_err(CE_NOTE, "vdev_disk_open %s: devid " + "mismatch: %s != %s", vd->vdev_path, + vd->vdev_devid, devid_str); + ddi_devid_str_free(devid_str); + error = SET_ERROR(EINVAL); (void) ldi_close(dvd->vd_lh, spa_mode(spa), kcred); @@ -390,6 +428,10 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * if (error != 0 && vd->vdev_devid != NULL) { error = ldi_open_by_devid(dvd->vd_devid, dvd->vd_minor, spa_mode(spa), kcred, &dvd->vd_lh, zfs_li); + if (error != 0) { + vdev_dbgmsg(vd, "Failed to open by devid (%s)", + vd->vdev_devid); + } } /* @@ -436,6 +478,9 @@ vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t * vd_devid = ddi_devid_str_encode(devid, dvd->vd_minor); vdev_dbgmsg(vd, "vdev_disk_open: update devid from " "'%s' to '%s'", vd->vdev_devid, vd_devid); + cmn_err(CE_NOTE, "vdev_disk_open %s: update devid " + "from '%s' to '%s'", vd->vdev_path != NULL ? + vd->vdev_path : "?", vd->vdev_devid, vd_devid); spa_strfree(vd->vdev_devid); vd->vdev_devid = spa_strdup(vd_devid); ddi_devid_str_free(vd_devid); From owner-svn-src-all@freebsd.org Tue Jun 11 14:32:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E014915BCFB8; Tue, 11 Jun 2019 14:32:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82B6F8F367; Tue, 11 Jun 2019 14:32:03 +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 757552E50; Tue, 11 Jun 2019 14:32:03 +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 x5BEW3ck019143; Tue, 11 Jun 2019 14:32:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEW34W019142; Tue, 11 Jun 2019 14:32:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111432.x5BEW34W019142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:32: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: r348924 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82B6F8F367 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:32:04 -0000 Author: mav Date: Tue Jun 11 14:32:03 2019 New Revision: 348924 URL: https://svnweb.freebsd.org/changeset/base/348924 Log: MFC r348788: Explicitly start ARC adjustment on limits change. While formally it is not necessary, but the sooner it start, the sooner it finish, and supposedly less disturbing for workload it will be. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:30:41 2019 (r348923) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:32:03 2019 (r348924) @@ -1233,6 +1233,12 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS) return (EINVAL); arc_meta_limit = val; + + mutex_enter(&arc_adjust_lock); + arc_adjust_needed = B_TRUE; + mutex_exit(&arc_adjust_lock); + zthr_wakeup(arc_adjust_zthr); + return (0); } @@ -1293,6 +1299,11 @@ sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS) arc_c = arc_c / 2; zfs_arc_max = arc_c; + + mutex_enter(&arc_adjust_lock); + arc_adjust_needed = B_TRUE; + mutex_exit(&arc_adjust_lock); + zthr_wakeup(arc_adjust_zthr); return (0); } From owner-svn-src-all@freebsd.org Tue Jun 11 14:32:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3D5615BD005; Tue, 11 Jun 2019 14:32: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5068D8F4DE; Tue, 11 Jun 2019 14:32: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 451FA2E7B; Tue, 11 Jun 2019 14:32:33 +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 x5BEWXFh020983; Tue, 11 Jun 2019 14:32:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BEWXIW020982; Tue, 11 Jun 2019 14:32:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906111432.x5BEWXIW020982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 11 Jun 2019 14:32: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: r348925 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 348925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5068D8F4DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 14:32:33 -0000 Author: mav Date: Tue Jun 11 14:32:32 2019 New Revision: 348925 URL: https://svnweb.freebsd.org/changeset/base/348925 Log: MFC r348790: Fix comparison signedness in arc_is_overflowing(). When ARC size is very small, aggsum_lower_bound(&arc_size) may return negative values, that due to unsigned comparison caused delays, waiting for arc_adjust() to "fix" it by calling aggsum_value(&arc_size). Use of signed comparison there fixes the problem. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:32:03 2019 (r348924) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jun 11 14:32:32 2019 (r348925) @@ -5140,7 +5140,7 @@ static boolean_t arc_is_overflowing(void) { /* Always allow at least one block of overflow */ - uint64_t overflow = MAX(SPA_MAXBLOCKSIZE, + int64_t overflow = MAX(SPA_MAXBLOCKSIZE, arc_c >> zfs_arc_overflow_shift); /* @@ -5152,7 +5152,7 @@ arc_is_overflowing(void) * in the ARC. In practice, that's in the tens of MB, which is low * enough to be safe. */ - return (aggsum_lower_bound(&arc_size) >= arc_c + overflow); + return (aggsum_lower_bound(&arc_size) >= (int64_t)arc_c + overflow); } static abd_t * From owner-svn-src-all@freebsd.org Tue Jun 11 15:18:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83A4B15BE44C; Tue, 11 Jun 2019 15:18:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 295AA6A39D; Tue, 11 Jun 2019 15:18:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F375C36D9; Tue, 11 Jun 2019 15:18:50 +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 x5BFIoLb042129; Tue, 11 Jun 2019 15:18:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BFIoun042128; Tue, 11 Jun 2019 15:18:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906111518.x5BFIoun042128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Jun 2019 15:18: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: r348926 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 348926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 295AA6A39D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 15:18:51 -0000 Author: markj Date: Tue Jun 11 15:18:50 2019 New Revision: 348926 URL: https://svnweb.freebsd.org/changeset/base/348926 Log: MFC r348660: Remove an outdated header comment for vm_page.c. Modified: stable/12/sys/vm/vm_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Tue Jun 11 14:32:32 2019 (r348925) +++ stable/12/sys/vm/vm_page.c Tue Jun 11 15:18:50 2019 (r348926) @@ -63,23 +63,6 @@ */ /* - * GENERAL RULES ON VM_PAGE MANIPULATION - * - * - A page queue lock is required when adding or removing a page from a - * page queue regardless of other locks or the busy state of a page. - * - * * In general, no thread besides the page daemon can acquire or - * hold more than one page queue lock at a time. - * - * * The page daemon can acquire and hold any pair of page queue - * locks in any order. - * - * - The object lock is required when inserting or removing - * pages from an object (vm_page_insert() or vm_page_remove()). - * - */ - -/* * Resident memory management module. */ From owner-svn-src-all@freebsd.org Tue Jun 11 15:19:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E87D615BE4A1; Tue, 11 Jun 2019 15:19:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88A086A572; Tue, 11 Jun 2019 15:19:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 647E036DA; Tue, 11 Jun 2019 15:19:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BFJNlZ042197; Tue, 11 Jun 2019 15:19:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BFJN0L042196; Tue, 11 Jun 2019 15:19:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906111519.x5BFJN0L042196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 11 Jun 2019 15:19: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: r348927 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 348927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 88A086A572 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 15:19:24 -0000 Author: markj Date: Tue Jun 11 15:19:22 2019 New Revision: 348927 URL: https://svnweb.freebsd.org/changeset/base/348927 Log: MFC r348655: libelftc: Fix some minor style bugs. Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Tue Jun 11 15:18:50 2019 (r348926) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Tue Jun 11 15:19:22 2019 (r348927) @@ -167,11 +167,9 @@ elftc_string_table_destroy(Elftc_String_Table *st) for (n = 0; n < st->st_nbuckets; n++) SLIST_FOREACH_SAFE(s, &st->st_buckets[n], ste_next, t) - free(s); + free(s); free(st->st_string_pool); free(st); - - return; } Elftc_String_Table * @@ -318,7 +316,7 @@ elftc_string_table_insert(Elftc_String_Table *st, cons if ((ste = malloc(sizeof(*ste))) == NULL) return (0); if ((ste->ste_idx = elftc_string_table_add_to_pool(st, - string)) == 0) { + string)) == 0) { free(ste); return (0); } Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Tue Jun 11 15:18:50 2019 (r348926) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Tue Jun 11 15:19:22 2019 (r348927) @@ -144,7 +144,7 @@ looks up the string referenced by argument in the string table specified by argument .Ar table , and if found, returns the offset associated with the string. -The returned offset will be valid till the next call to function +The returned offset will be valid until the next call to .Fn elftc_string_table_image . .Pp Function From owner-svn-src-all@freebsd.org Tue Jun 11 15:36:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C071F15BEA19; Tue, 11 Jun 2019 15:36:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65FE16ADDD; Tue, 11 Jun 2019 15:36:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3921E3ACF; Tue, 11 Jun 2019 15:36:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BFabfP052300; Tue, 11 Jun 2019 15:36:37 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BFaaWb052298; Tue, 11 Jun 2019 15:36:36 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201906111536.x5BFaaWb052298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 11 Jun 2019 15:36: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: r348928 - in stable/12: share/misc usr.bin/calendar/calendars X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 348928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65FE16ADDD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 15:36:38 -0000 Author: vmaffione Date: Tue Jun 11 15:36:36 2019 New Revision: 348928 URL: https://svnweb.freebsd.org/changeset/base/348928 Log: MFC r348669 Add myself to committers-src.dot and calendar.freebsd Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D20518 Modified: stable/12/share/misc/committers-src.dot stable/12/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/12/ (props changed) Modified: stable/12/share/misc/committers-src.dot ============================================================================== --- stable/12/share/misc/committers-src.dot Tue Jun 11 15:19:22 2019 (r348927) +++ stable/12/share/misc/committers-src.dot Tue Jun 11 15:36:36 2019 (r348928) @@ -348,6 +348,7 @@ uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2010/01 vangyzen [label="Eric van Gyzen\nvangyzen@FreeBSD.org\n2015/03/08"] vanhu [label="Yvan Vanhullebus\nvanhu@FreeBSD.org\n2008/07/21"] versus [label="Konrad Jankowski\nversus@FreeBSD.org\n2008/10/27"] +vmaffione [label="Vincenzo Maffione\nvmaffione@FreeBSD.org\n2018/03/19"] weongyo [label="Weongyo Jeong\nweongyo@FreeBSD.org\n2007/12/21"] wes [label="Wes Peters\nwes@FreeBSD.org\n1998/11/25"] whu [label="Wei Hu\nwhu@FreeBSD.org\n2015/02/11"] Modified: stable/12/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/12/usr.bin/calendar/calendars/calendar.freebsd Tue Jun 11 15:19:22 2019 (r348927) +++ stable/12/usr.bin/calendar/calendars/calendar.freebsd Tue Jun 11 15:36:36 2019 (r348928) @@ -378,6 +378,7 @@ 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 +10/09 Vincenzo Maffione born in Foggia, Italy, 1988 10/11 Rick Macklem born in Ontario, Canada, 1955 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 From owner-svn-src-all@freebsd.org Tue Jun 11 15:52:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2003215BF46B; Tue, 11 Jun 2019 15:52:43 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA5456B889; Tue, 11 Jun 2019 15:52:42 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9519B3E46; Tue, 11 Jun 2019 15:52:42 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BFqgMZ062536; Tue, 11 Jun 2019 15:52:42 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BFqf3l062530; Tue, 11 Jun 2019 15:52:41 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201906111552.x5BFqf3l062530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 11 Jun 2019 15:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348929 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 348929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BA5456B889 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 15:52:43 -0000 Author: vmaffione Date: Tue Jun 11 15:52:41 2019 New Revision: 348929 URL: https://svnweb.freebsd.org/changeset/base/348929 Log: bhyve: virtio: introduce vq_kick_enable() and vq_kick_disable() The VirtIO standard supports two schemes for notification suppression: a notification enable bit and a more sophisticated one (event_idx) that also supports delayed notifications. Currently bhyve fully supports only the first scheme. This patch hides the notification suppression internals by means of two inline routines, vq_kick_enable() and vq_kick_disable(), and makes the code more readable. Moreover, further improve readability by replacing the call to mb() with a call to atomic_thread_fence_seq_cst(), which is already used in virtio.c Reviewed by: pmooney_pfmooney.com, bryanv MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20581 Modified: head/usr.sbin/bhyve/pci_virtio_console.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/pci_virtio_scsi.c head/usr.sbin/bhyve/virtio.c head/usr.sbin/bhyve/virtio.h Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Tue Jun 11 15:36:36 2019 (r348928) +++ head/usr.sbin/bhyve/pci_virtio_console.c Tue Jun 11 15:52:41 2019 (r348929) @@ -607,7 +607,7 @@ pci_vtcon_notify_rx(void *vsc, struct vqueue_info *vq) if (!port->vsp_rx_ready) { port->vsp_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Tue Jun 11 15:36:36 2019 (r348928) +++ head/usr.sbin/bhyve/pci_virtio_net.c Tue Jun 11 15:52:41 2019 (r348929) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifndef NETMAP_WITH_LIBS #define NETMAP_WITH_LIBS @@ -585,7 +584,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } @@ -631,7 +630,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqueue_info *vq) /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -660,8 +659,7 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ while (sc->resetting || !vq_has_descs(vq)) { - vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; - mb(); + vq_kick_enable(vq); if (!sc->resetting && vq_has_descs(vq)) break; @@ -669,7 +667,7 @@ pci_vtnet_tx_thread(void *param) error = pthread_cond_wait(&sc->tx_cond, &sc->tx_mtx); assert(error == 0); } - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); Modified: head/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_scsi.c Tue Jun 11 15:36:36 2019 (r348928) +++ head/usr.sbin/bhyve/pci_virtio_scsi.c Tue Jun 11 15:52:41 2019 (r348929) @@ -581,7 +581,7 @@ static void pci_vtscsi_eventq_notify(void *vsc, struct vqueue_info *vq) { - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } static void Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Tue Jun 11 15:36:36 2019 (r348928) +++ head/usr.sbin/bhyve/virtio.c Tue Jun 11 15:52:41 2019 (r348929) @@ -428,7 +428,8 @@ vq_relchain(struct vqueue_info *vq, uint16_t idx, uint /* * Ensure the used descriptor is visible before updating the index. - * This is necessary on ISAs with memory ordering less strict than x86. + * This is necessary on ISAs with memory ordering less strict than x86 + * (and even on x86 to act as a compiler barrier). */ atomic_thread_fence_rel(); vuh->vu_idx = uidx; Modified: head/usr.sbin/bhyve/virtio.h ============================================================================== --- head/usr.sbin/bhyve/virtio.h Tue Jun 11 15:36:36 2019 (r348928) +++ head/usr.sbin/bhyve/virtio.h Tue Jun 11 15:52:41 2019 (r348929) @@ -31,6 +31,8 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ +#include + /* * These are derived from several virtio specifications. * @@ -445,6 +447,26 @@ vq_interrupt(struct virtio_softc *vs, struct vqueue_in pci_lintr_assert(vs->vs_pi); VS_UNLOCK(vs); } +} + +static inline void +vq_kick_enable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; + /* + * Full memory barrier to make sure the store to vu_flags + * happens before the load from va_idx, which results from + * a subsequent call to vq_has_descs(). + */ + atomic_thread_fence_seq_cst(); +} + +static inline void +vq_kick_disable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } struct iovec; From owner-svn-src-all@freebsd.org Tue Jun 11 18:16:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B34C615C20B6; Tue, 11 Jun 2019 18:16: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5332A7015B; Tue, 11 Jun 2019 18:16: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 24121568B; Tue, 11 Jun 2019 18:16: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 x5BIGaQo037273; Tue, 11 Jun 2019 18:16:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIGS65037234; Tue, 11 Jun 2019 18:16:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111816.x5BIGS65037234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348932 - in vendor/llvm/dist-release_80: . cmake/modules docs lib/CodeGen lib/DebugInfo/DWARF lib/MC lib/Object lib/Target/AArch64 lib/Target/AMDGPU lib/Target/ARM lib/Target/AVR lib/T... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_80: . cmake/modules docs lib/CodeGen lib/DebugInfo/DWARF lib/MC lib/Object lib/Target/AArch64 lib/Target/AMDGPU lib/Target/ARM lib/Target/AVR lib/Target/Mips lib/Target/Mip... X-SVN-Commit-Revision: 348932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5332A7015B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:16:37 -0000 Author: dim Date: Tue Jun 11 18:16:27 2019 New Revision: 348932 URL: https://svnweb.freebsd.org/changeset/base/348932 Log: Vendor import of llvm release_80 branch r363030: https://llvm.org/svn/llvm-project/llvm/branches/release_80@363030 Added: vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/fold-fi-operand-shrink.mir vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/r600.add.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/r600.sub.ll vendor/llvm/dist-release_80/test/CodeGen/ARM/tail-call-scheduling.ll vendor/llvm/dist-release_80/test/CodeGen/AVR/hardware-mul.ll vendor/llvm/dist-release_80/test/CodeGen/AVR/software-mul.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/Fast-ISel/pr40325.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/llvm-ir/fptosi.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/micromips-pseudo-mtlohi-expand.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/pseudo-jump-fill.ll vendor/llvm/dist-release_80/test/CodeGen/X86/PR40322.ll vendor/llvm/dist-release_80/test/CodeGen/X86/regalloc-copy-hints.mir vendor/llvm/dist-release_80/test/MC/PowerPC/ppc64-localentry-symbols.s vendor/llvm/dist-release_80/test/MC/WebAssembly/null-output.s vendor/llvm/dist-release_80/test/tools/llvm-objdump/PowerPC/ vendor/llvm/dist-release_80/test/tools/llvm-objdump/PowerPC/branch-offset.s vendor/llvm/dist-release_80/test/tools/llvm-objdump/PowerPC/lit.local.cfg vendor/llvm/dist-release_80/test/tools/llvm-objdump/elf-symbol-visibility.test Deleted: vendor/llvm/dist-release_80/test/CodeGen/AVR/mul.ll Modified: vendor/llvm/dist-release_80/CMakeLists.txt vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake vendor/llvm/dist-release_80/cmake/modules/LLVMProcessSources.cmake vendor/llvm/dist-release_80/docs/ReleaseNotes.rst vendor/llvm/dist-release_80/lib/CodeGen/TargetRegisterInfo.cpp vendor/llvm/dist-release_80/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp vendor/llvm/dist-release_80/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist-release_80/lib/MC/MCWin64EH.cpp vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist-release_80/lib/Object/COFFImportFile.cpp vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedExynosM4.td vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredExynos.td vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredicates.td vendor/llvm/dist-release_80/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist-release_80/lib/Target/AMDGPU/VOP2Instructions.td vendor/llvm/dist-release_80/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.cpp vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.h vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.cpp vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.h vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp vendor/llvm/dist-release_80/lib/Target/Mips/MicroMips32r6InstrInfo.td vendor/llvm/dist-release_80/lib/Target/Mips/MicroMipsInstrFPU.td vendor/llvm/dist-release_80/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist-release_80/lib/Target/Mips/MipsDSPInstrInfo.td vendor/llvm/dist-release_80/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist-release_80/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist-release_80/lib/Target/Mips/MipsSEInstrInfo.cpp vendor/llvm/dist-release_80/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp vendor/llvm/dist-release_80/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp vendor/llvm/dist-release_80/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCSubtarget.cpp vendor/llvm/dist-release_80/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp vendor/llvm/dist-release_80/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist-release_80/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/add.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/ds-negative-offset-addressing-mode-loop.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/fence-barrier.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/fold-immediate-operand-shrink.mir vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/salu-to-valu.ll vendor/llvm/dist-release_80/test/CodeGen/AMDGPU/sub.ll vendor/llvm/dist-release_80/test/CodeGen/AVR/smul-with-overflow.ll vendor/llvm/dist-release_80/test/CodeGen/AVR/umul-with-overflow.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/Fast-ISel/icmpbr1.ll vendor/llvm/dist-release_80/test/CodeGen/Mips/abiflags32.ll vendor/llvm/dist-release_80/test/CodeGen/PowerPC/ppc32-pic-large.ll vendor/llvm/dist-release_80/test/CodeGen/SPARC/fp128.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/varargs.ll vendor/llvm/dist-release_80/test/CodeGen/X86/fast-isel-nontemporal.ll vendor/llvm/dist-release_80/test/tools/llvm-dlltool/coff-weak-exports.def vendor/llvm/dist-release_80/test/tools/llvm-objdump/AMDGPU/source-lines.ll vendor/llvm/dist-release_80/test/tools/llvm-objdump/eh_frame-coff.test vendor/llvm/dist-release_80/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist-release_80/utils/git-svn/git-llvm vendor/llvm/dist-release_80/utils/lit/lit/__init__.py vendor/llvm/dist-release_80/utils/release/merge-request.sh Modified: vendor/llvm/dist-release_80/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_80/CMakeLists.txt Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/CMakeLists.txt Tue Jun 11 18:16:27 2019 (r348932) @@ -18,7 +18,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 0) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 0) + set(LLVM_VERSION_PATCH 1) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX "") Modified: vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/cmake/modules/AddLLVM.cmake Tue Jun 11 18:16:27 2019 (r348932) @@ -855,6 +855,7 @@ if(NOT LLVM_TOOLCHAIN_TOOLS) llvm-lib llvm-objdump llvm-rc + llvm-profdata ) endif() Modified: vendor/llvm/dist-release_80/cmake/modules/LLVMProcessSources.cmake ============================================================================== --- vendor/llvm/dist-release_80/cmake/modules/LLVMProcessSources.cmake Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/cmake/modules/LLVMProcessSources.cmake Tue Jun 11 18:16:27 2019 (r348932) @@ -30,7 +30,15 @@ endmacro(add_td_sources) function(add_header_files_for_glob hdrs_out glob) file(GLOB hds ${glob}) - set(${hdrs_out} ${hds} PARENT_SCOPE) + set(filtered) + foreach(file ${hds}) + # Explicit existence check is necessary to filter dangling symlinks + # out. See https://bugs.gentoo.org/674662. + if(EXISTS ${file}) + list(APPEND filtered ${file}) + endif() + endforeach() + set(${hdrs_out} ${filtered} PARENT_SCOPE) endfunction(add_header_files_for_glob) function(find_all_header_files hdrs_out additional_headerdirs) Modified: vendor/llvm/dist-release_80/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Tue Jun 11 18:16:27 2019 (r348932) @@ -110,6 +110,26 @@ updated to use LLJIT. MCJIT and ExecutionEngine continue to be supported, though ORC should be preferred for new projects. +Changes to the C++ APIs +----------------------- + +Three of the IR library methods related to debugging information for +functions and methods have changed their prototypes: + + DIBuilder::createMethod + DIBuilder::createFunction + DIBuilder::createTempFunctionFwdDecl + +In all cases, several individual parameters were removed, and replaced +by a single 'SPFlags' (subprogram flags) parameter. The individual +parameters are: 'isLocalToUnit'; 'isDefinition'; 'isOptimized'; and +for 'createMethod', 'Virtuality'. The new 'SPFlags' parameter has a +default value equivalent to passing 'false' for the three 'bool' +parameters, and zero (non-virtual) to the 'Virtuality' parameter. For +any old-style API call that passed 'true' or a non-zero virtuality to +these methods, you will need to substitute the correct 'SPFlags' value. +The helper method 'DISubprogram::toSPFlags()' might be useful in making +this conversion. Changes to the AArch64 Target ----------------------------- Modified: vendor/llvm/dist-release_80/lib/CodeGen/TargetRegisterInfo.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/CodeGen/TargetRegisterInfo.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/CodeGen/TargetRegisterInfo.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -14,6 +14,7 @@ #include "llvm/CodeGen/TargetRegisterInfo.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/MachineFrameInfo.h" @@ -398,6 +399,7 @@ TargetRegisterInfo::getRegAllocationHints(unsigned Vir const std::pair> &Hints_MRI = MRI.getRegAllocationHints(VirtReg); + SmallSet HintedRegs; // First hint may be a target hint. bool Skip = (Hints_MRI.first != 0); for (auto Reg : Hints_MRI.second) { @@ -411,6 +413,10 @@ TargetRegisterInfo::getRegAllocationHints(unsigned Vir if (VRM && isVirtualRegister(Phys)) Phys = VRM->getPhys(Phys); + // Don't add the same reg twice (Hints_MRI may contain multiple virtual + // registers allocated to the same physreg). + if (!HintedRegs.insert(Phys).second) + continue; // Check that Phys is a valid hint in VirtReg's register class. if (!isPhysicalRegister(Phys)) continue; Modified: vendor/llvm/dist-release_80/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -301,7 +301,7 @@ void CIE::dump(raw_ostream &OS, const MCRegisterInfo * OS << format(" Data alignment factor: %d\n", (int32_t)DataAlignmentFactor); OS << format(" Return address column: %d\n", (int32_t)ReturnAddressRegister); if (Personality) - OS << format(" Personality Address: %08x\n", *Personality); + OS << format(" Personality Address: %016" PRIx64 "\n", *Personality); if (!AugmentationData.empty()) { OS << " Augmentation data: "; for (uint8_t Byte : AugmentationData) @@ -320,7 +320,7 @@ void FDE::dump(raw_ostream &OS, const MCRegisterInfo * (uint32_t)InitialLocation, (uint32_t)InitialLocation + (uint32_t)AddressRange); if (LSDAAddress) - OS << format(" LSDA Address: %08x\n", *LSDAAddress); + OS << format(" LSDA Address: %016" PRIx64 "\n", *LSDAAddress); CFIs.dump(OS, MRI, IsEH); OS << "\n"; } Modified: vendor/llvm/dist-release_80/lib/MC/ELFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/ELFObjectWriter.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/MC/ELFObjectWriter.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -1271,6 +1271,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem // This is the first place we are able to copy this information. Alias->setExternal(Symbol.isExternal()); Alias->setBinding(Symbol.getBinding()); + Alias->setOther(Symbol.getOther()); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; Modified: vendor/llvm/dist-release_80/lib/MC/MCWin64EH.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/MCWin64EH.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/MC/MCWin64EH.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -522,7 +522,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, if (MatchingEpilog) { assert(EpilogInfo.find(MatchingEpilog) != EpilogInfo.end() && "Duplicate epilog not found"); - EpilogInfo[EpilogStart] = EpilogInfo[MatchingEpilog]; + EpilogInfo[EpilogStart] = EpilogInfo.lookup(MatchingEpilog); // Clear the unwind codes in the EpilogMap, so that they don't get output // in the logic below. EpilogInstrs.clear(); Modified: vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -368,7 +368,13 @@ void WasmObjectWriter::startCustomSection(SectionBookk // Now that the section is complete and we know how big it is, patch up the // section size field at the start of the section. void WasmObjectWriter::endSection(SectionBookkeeping &Section) { - uint64_t Size = W.OS.tell() - Section.PayloadOffset; + uint64_t Size = W.OS.tell(); + // /dev/null doesn't support seek/tell and can report offset of 0. + // Simply skip this patching in that case. + if (!Size) + return; + + Size -= Section.PayloadOffset; if (uint32_t(Size) != Size) report_fatal_error("section size does not fit in a uint32_t"); Modified: vendor/llvm/dist-release_80/lib/Object/COFFImportFile.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Object/COFFImportFile.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Object/COFFImportFile.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -496,7 +496,7 @@ NewArchiveMember ObjectFactory::createWeakExternal(Str // COFF Header coff_file_header Header{ - u16(0), + u16(Machine), u16(NumberOfSections), u32(0), u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))), Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedExynosM4.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedExynosM4.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedExynosM4.td Tue Jun 11 18:16:27 2019 (r348932) @@ -239,7 +239,6 @@ def M4WriteNEONK : SchedWriteRes<[M4UnitNSHF, M4UnitS0]> { let Latency = 5; let NumMicroOps = 2; } def M4WriteNEONL : SchedWriteRes<[M4UnitNMUL]> { let Latency = 3; } -def M4WriteNEONM : SchedWriteRes<[M4UnitNMUL]> { let Latency = 3; } def M4WriteNEONN : SchedWriteRes<[M4UnitNMSC, M4UnitNMSC]> { let Latency = 5; let NumMicroOps = 2; } @@ -480,8 +479,6 @@ def M4WriteCOPY : SchedWriteVariant<[SchedVar]>; def M4WriteMOVI : SchedWriteVariant<[SchedVar, SchedVar]>; -def M4WriteMULL : SchedWriteVariant<[SchedVar, - SchedVar]>; // Fast forwarding. def M4ReadAESM1 : SchedReadAdvance<+1, [M4WriteNCRY1]>; @@ -489,8 +486,9 @@ def M4ReadFMACM1 : SchedReadAdvance<+1, [M4WriteFMAC M4WriteFMAC4H, M4WriteFMAC5]>; def M4ReadNMULM1 : SchedReadAdvance<+1, [M4WriteNMUL3]>; -def M4ReadMULLP2 : SchedReadAdvance<-2, [M4WriteNEONM]>; +def M4ReadNMULP2 : SchedReadAdvance<-2, [M4WriteNMUL3]>; + //===----------------------------------------------------------------------===// // Coarse scheduling model. @@ -662,10 +660,8 @@ def : InstRW<[M4WriteNEONK], (instregex "^FMOVDXHighr def : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev1f16")>; def : InstRW<[M4WriteFCVT3], (instregex "^F(RECP|RSQRT)Ev1i(32|64)")>; def : InstRW<[M4WriteNMSC1], (instregex "^FRECPXv1")>; -def : InstRW<[M4WriteFMAC4H, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)S16")>; -def : InstRW<[M4WriteFMAC4, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)S(32|64)")>; +def : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)S16")>; +def : InstRW<[M4WriteFMAC4], (instregex "^F(RECP|RSQRT)S(32|64)")>; // FP load instructions. def : InstRW<[WriteVLD], (instregex "^LDR[SDQ]l")>; @@ -736,14 +732,20 @@ def : InstRW<[M4WriteNALU1], (instregex "^(AND|BIC|EO def : InstRW<[M4WriteNMSC1], (instregex "^[SU](MIN|MAX)v")>; def : InstRW<[M4WriteNMSC2], (instregex "^[SU](MIN|MAX)Pv")>; def : InstRW<[M4WriteNHAD3], (instregex "^[SU](MIN|MAX)Vv")>; -def : InstRW<[M4WriteNMUL3], (instregex "^(SQR?D)?MULH?v")>; def : InstRW<[M4WriteNMUL3, M4ReadNMULM1], (instregex "^ML[AS]v")>; -def : InstRW<[M4WriteNMUL3], (instregex "^SQRDML[AS]H")>; -def : InstRW<[M4WriteMULL, - M4ReadMULLP2], (instregex "^(S|U|SQD)ML[AS]Lv")>; -def : InstRW<[M4WriteMULL, - M4ReadMULLP2], (instregex "^(S|U|SQD)MULLv")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(SQR?D)?MULH?v")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^SQRDML[AS]H")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(S|U|SQD)ML[AS]L(v1(i32|i64)|v2i32|v4i16|v8i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULP2], (instregex "^(S|U|SQD)ML[AS]L(v4i32|v8i16|v16i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(S|U|SQD)MULL(v1(i32|i64)|v2i32|v4i16|v8i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULP2], (instregex "^(S|U|SQD)MULL(v4i32|v8i16|v16i8)")>; def : InstRW<[M4WriteNMUL3], (instregex "^[SU]DOT(lane)?v")>; def : InstRW<[M4WriteNHAD3], (instregex "^[SU]ADALPv")>; def : InstRW<[M4WriteNSHT4A], (instregex "^[SU]R?SRA[dv]")>; @@ -808,10 +810,8 @@ def : InstRW<[M4WriteNALU1], (instregex "^FMOVv.f(32| def : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev[248]f16")>; def : InstRW<[M4WriteFCVT3], (instregex "^F(RECP|RSQRT)Ev[248]f(32|64)")>; def : InstRW<[M4WriteFCVT3], (instregex "^U(RECP|RSQRT)Ev[24]i32")>; -def : InstRW<[M4WriteFMAC4H, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)Sv.f16")>; -def : InstRW<[M4WriteFMAC4, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)Sv.f(32|64)")>; +def : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)Sv.f16")>; +def : InstRW<[M4WriteFMAC4], (instregex "^F(RECP|RSQRT)Sv.f(32|64)")>; def : InstRW<[M4WriteNSHF1], (instregex "^REV(16|32|64)v")>; def : InstRW<[M4WriteNSHFA], (instregex "^TB[LX]v(8|16)i8One")>; def : InstRW<[M4WriteNSHFB], (instregex "^TB[LX]v(8|16)i8Two")>; Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredExynos.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredExynos.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredExynos.td Tue Jun 11 18:16:27 2019 (r348932) @@ -103,17 +103,6 @@ def ExynosScaledIdxPred : MCSchedPredicate>; -// Identify whether an instruction whose result is a long vector -// operates on the upper half of the input registers. -def ExynosLongVectorUpperFn : TIIPredicate< - "isExynosLongVectorUpper", - MCOpcodeSwitchStatement< - [MCOpcodeSwitchCase< - IsLongVectorUpperOp.ValidOpcodes, - MCReturnStatement>], - MCReturnStatement>>; -def ExynosLongVectorUpperPred : MCSchedPredicate; - // Identify 128-bit NEON instructions. def ExynosQFormPred : MCSchedPredicate; Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredicates.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredicates.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64SchedPredicates.td Tue Jun 11 18:16:27 2019 (r348932) @@ -268,59 +268,6 @@ def IsStoreRegOffsetOp : CheckOpcode<[STRBBroW, ST def IsLoadStoreRegOffsetOp : CheckOpcode; -// Identify whether an instruction whose result is a long vector -// operates on the upper half of the input registers. -def IsLongVectorUpperOp : CheckOpcode<[FCVTLv8i16, FCVTLv4i32, - FCVTNv8i16, FCVTNv4i32, - FCVTXNv4f32, - PMULLv16i8, PMULLv2i64, - RADDHNv8i16_v16i8, RADDHNv4i32_v8i16, RADDHNv2i64_v4i32, - RSHRNv16i8_shift, RSHRNv8i16_shift, RSHRNv4i32_shift, - RSUBHNv8i16_v16i8, RSUBHNv4i32_v8i16, RSUBHNv2i64_v4i32, - SABALv16i8_v8i16, SABALv8i16_v4i32, SABALv4i32_v2i64, - SABDLv16i8_v8i16, SABDLv8i16_v4i32, SABDLv4i32_v2i64, - SADDLv16i8_v8i16, SADDLv8i16_v4i32, SADDLv4i32_v2i64, - SADDWv16i8_v8i16, SADDWv8i16_v4i32, SADDWv4i32_v2i64, - SHLLv16i8, SHLLv8i16, SHLLv4i32, - SHRNv16i8_shift, SHRNv8i16_shift, SHRNv4i32_shift, - SMLALv16i8_v8i16, SMLALv8i16_v4i32, SMLALv4i32_v2i64, - SMLALv8i16_indexed, SMLALv4i32_indexed, - SMLSLv16i8_v8i16, SMLSLv8i16_v4i32, SMLSLv4i32_v2i64, - SMLSLv8i16_indexed, SMLSLv4i32_indexed, - SMULLv16i8_v8i16, SMULLv8i16_v4i32, SMULLv4i32_v2i64, - SMULLv8i16_indexed, SMULLv4i32_indexed, - SQDMLALv8i16_v4i32, SQDMLALv4i32_v2i64, - SQDMLALv8i16_indexed, SQDMLALv4i32_indexed, - SQDMLSLv8i16_v4i32, SQDMLSLv4i32_v2i64, - SQDMLSLv8i16_indexed, SQDMLSLv4i32_indexed, - SQDMULLv8i16_v4i32, SQDMULLv4i32_v2i64, - SQDMULLv8i16_indexed, SQDMULLv4i32_indexed, - SQRSHRNv16i8_shift, SQRSHRNv8i16_shift, SQRSHRNv4i32_shift, - SQRSHRUNv16i8_shift, SQRSHRUNv8i16_shift, SQRSHRUNv4i32_shift, - SQSHRNv16i8_shift, SQSHRNv8i16_shift, SQSHRNv4i32_shift, - SQSHRUNv16i8_shift, SQSHRUNv8i16_shift, SQSHRUNv4i32_shift, - SQXTNv16i8, SQXTNv8i16, SQXTNv4i32, - SQXTUNv16i8, SQXTUNv8i16, SQXTUNv4i32, - SSHLLv16i8_shift, SSHLLv8i16_shift, SSHLLv4i32_shift, - SSUBLv16i8_v8i16, SSUBLv8i16_v4i32, SSUBLv4i32_v2i64, - SSUBWv16i8_v8i16, SSUBWv8i16_v4i32, SSUBWv4i32_v2i64, - UABALv16i8_v8i16, UABALv8i16_v4i32, UABALv4i32_v2i64, - UABDLv16i8_v8i16, UABDLv8i16_v4i32, UABDLv4i32_v2i64, - UADDLv16i8_v8i16, UADDLv8i16_v4i32, UADDLv4i32_v2i64, - UADDWv16i8_v8i16, UADDWv8i16_v4i32, UADDWv4i32_v2i64, - UMLALv16i8_v8i16, UMLALv8i16_v4i32, UMLALv4i32_v2i64, - UMLALv8i16_indexed, UMLALv4i32_indexed, - UMLSLv16i8_v8i16, UMLSLv8i16_v4i32, UMLSLv4i32_v2i64, - UMLSLv8i16_indexed, UMLSLv4i32_indexed, - UMULLv16i8_v8i16, UMULLv8i16_v4i32, UMULLv4i32_v2i64, - UMULLv8i16_indexed, UMULLv4i32_indexed, - UQSHRNv16i8_shift, UQSHRNv8i16_shift, UQSHRNv4i32_shift, - UQXTNv16i8, UQXTNv8i16, UQXTNv4i32, - USHLLv16i8_shift, USHLLv8i16_shift, USHLLv4i32_shift, - USUBLv16i8_v8i16, USUBLv8i16_v4i32, USUBLv4i32_v2i64, - USUBWv16i8_v8i16, USUBWv8i16_v4i32, USUBWv4i32_v2i64, - XTNv16i8, XTNv8i16, XTNv4i32]>; - // Target predicates. // Identify an instruction that effectively transfers a register to another. Modified: vendor/llvm/dist-release_80/lib/Target/AMDGPU/SIFoldOperands.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AMDGPU/SIFoldOperands.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AMDGPU/SIFoldOperands.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -201,49 +201,55 @@ static bool updateOperand(FoldCandidate &Fold, Mod.setImm(Mod.getImm() & ~SISrcMods::OP_SEL_1); } } + } - if (Fold.needsShrink()) { - MachineBasicBlock *MBB = MI->getParent(); - auto Liveness = MBB->computeRegisterLiveness(&TRI, AMDGPU::VCC, MI); - if (Liveness != MachineBasicBlock::LQR_Dead) - return false; + if ((Fold.isImm() || Fold.isFI()) && Fold.needsShrink()) { + MachineBasicBlock *MBB = MI->getParent(); + auto Liveness = MBB->computeRegisterLiveness(&TRI, AMDGPU::VCC, MI); + if (Liveness != MachineBasicBlock::LQR_Dead) + return false; - MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo(); - int Op32 = Fold.getShrinkOpcode(); - MachineOperand &Dst0 = MI->getOperand(0); - MachineOperand &Dst1 = MI->getOperand(1); - assert(Dst0.isDef() && Dst1.isDef()); + MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo(); + int Op32 = Fold.getShrinkOpcode(); + MachineOperand &Dst0 = MI->getOperand(0); + MachineOperand &Dst1 = MI->getOperand(1); + assert(Dst0.isDef() && Dst1.isDef()); - bool HaveNonDbgCarryUse = !MRI.use_nodbg_empty(Dst1.getReg()); + bool HaveNonDbgCarryUse = !MRI.use_nodbg_empty(Dst1.getReg()); - const TargetRegisterClass *Dst0RC = MRI.getRegClass(Dst0.getReg()); - unsigned NewReg0 = MRI.createVirtualRegister(Dst0RC); - const TargetRegisterClass *Dst1RC = MRI.getRegClass(Dst1.getReg()); - unsigned NewReg1 = MRI.createVirtualRegister(Dst1RC); + const TargetRegisterClass *Dst0RC = MRI.getRegClass(Dst0.getReg()); + unsigned NewReg0 = MRI.createVirtualRegister(Dst0RC); - MachineInstr *Inst32 = TII.buildShrunkInst(*MI, Op32); + MachineInstr *Inst32 = TII.buildShrunkInst(*MI, Op32); - if (HaveNonDbgCarryUse) { - BuildMI(*MBB, MI, MI->getDebugLoc(), TII.get(AMDGPU::COPY), Dst1.getReg()) - .addReg(AMDGPU::VCC, RegState::Kill); - } - - // Keep the old instruction around to avoid breaking iterators, but - // replace the outputs with dummy registers. - Dst0.setReg(NewReg0); - Dst1.setReg(NewReg1); - - if (Fold.isCommuted()) - TII.commuteInstruction(*Inst32, false); - return true; + if (HaveNonDbgCarryUse) { + BuildMI(*MBB, MI, MI->getDebugLoc(), TII.get(AMDGPU::COPY), Dst1.getReg()) + .addReg(AMDGPU::VCC, RegState::Kill); } - Old.ChangeToImmediate(Fold.ImmToFold); + // Keep the old instruction around to avoid breaking iterators, but + // replace it with a dummy instruction to remove uses. + // + // FIXME: We should not invert how this pass looks at operands to avoid + // this. Should track set of foldable movs instead of looking for uses + // when looking at a use. + Dst0.setReg(NewReg0); + for (unsigned I = MI->getNumOperands() - 1; I > 0; --I) + MI->RemoveOperand(I); + MI->setDesc(TII.get(AMDGPU::IMPLICIT_DEF)); + + if (Fold.isCommuted()) + TII.commuteInstruction(*Inst32, false); return true; } assert(!Fold.needsShrink() && "not handled"); + if (Fold.isImm()) { + Old.ChangeToImmediate(Fold.ImmToFold); + return true; + } + if (Fold.isFI()) { Old.ChangeToFrameIndex(Fold.FrameIndexToFold); return true; @@ -344,7 +350,7 @@ static bool tryAddToFoldList(SmallVectorImplisImm()) { + (OpToFold->isImm() || OpToFold->isFI())) { MachineRegisterInfo &MRI = MI->getParent()->getParent()->getRegInfo(); // Verify the other operand is a VGPR, otherwise we would violate the @@ -357,7 +363,10 @@ static bool tryAddToFoldList(SmallVectorImplgetOperand(1).isDef()); - int Op32 = AMDGPU::getVOPe32(Opc); + // Make sure to get the 32-bit version of the commuted opcode. + unsigned MaybeCommutedOpc = MI->getOpcode(); + int Op32 = AMDGPU::getVOPe32(MaybeCommutedOpc); + FoldList.push_back(FoldCandidate(MI, CommuteOpNo, OpToFold, true, Op32)); return true; Modified: vendor/llvm/dist-release_80/lib/Target/AMDGPU/VOP2Instructions.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AMDGPU/VOP2Instructions.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AMDGPU/VOP2Instructions.td Tue Jun 11 18:16:27 2019 (r348932) @@ -515,18 +515,12 @@ let AddedComplexity = 1 in { } let SubtargetPredicate = HasAddNoCarryInsts in { - def : DivergentBinOp; - def : DivergentBinOp; - def : DivergentBinOp; + def : DivergentBinOp; + def : DivergentBinOp; } - -def : DivergentBinOp; - def : DivergentBinOp; -def : DivergentBinOp; - -def : DivergentBinOp; +def : DivergentBinOp; def : DivergentBinOp; def : DivergentBinOp; Modified: vendor/llvm/dist-release_80/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/ARM/ARMISelLowering.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/ARM/ARMISelLowering.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -1984,32 +1984,10 @@ ARMTargetLowering::LowerCall(TargetLowering::CallLower // Build a sequence of copy-to-reg nodes chained together with token chain // and flag operands which copy the outgoing args into the appropriate regs. SDValue InFlag; - // Tail call byval lowering might overwrite argument registers so in case of - // tail call optimization the copies to registers are lowered later. - if (!isTailCall) - for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { - Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, - RegsToPass[i].second, InFlag); - InFlag = Chain.getValue(1); - } - - // For tail calls lower the arguments to the 'real' stack slot. - if (isTailCall) { - // Force all the incoming stack arguments to be loaded from the stack - // before any new outgoing arguments are stored to the stack, because the - // outgoing stack slots may alias the incoming argument stack slots, and - // the alias isn't otherwise explicit. This is slightly more conservative - // than necessary, because it means that each store effectively depends - // on every argument instead of just those arguments it would clobber. - - // Do not flag preceding copytoreg stuff together with the following stuff. - InFlag = SDValue(); - for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { - Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, - RegsToPass[i].second, InFlag); - InFlag = Chain.getValue(1); - } - InFlag = SDValue(); + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { + Chain = DAG.getCopyToReg(Chain, dl, RegsToPass[i].first, + RegsToPass[i].second, InFlag); + InFlag = Chain.getValue(1); } // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every Modified: vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -26,19 +26,21 @@ #include "AVR.h" #include "AVRMachineFunctionInfo.h" +#include "AVRSubtarget.h" #include "AVRTargetMachine.h" #include "MCTargetDesc/AVRMCTargetDesc.h" namespace llvm { -AVRTargetLowering::AVRTargetLowering(AVRTargetMachine &tm) - : TargetLowering(tm) { +AVRTargetLowering::AVRTargetLowering(const AVRTargetMachine &TM, + const AVRSubtarget &STI) + : TargetLowering(TM), Subtarget(STI) { // Set up the register classes. addRegisterClass(MVT::i8, &AVR::GPR8RegClass); addRegisterClass(MVT::i16, &AVR::DREGSRegClass); // Compute derived properties from the register classes. - computeRegisterProperties(tm.getSubtargetImpl()->getRegisterInfo()); + computeRegisterProperties(Subtarget.getRegisterInfo()); setBooleanContents(ZeroOrOneBooleanContent); setBooleanVectorContents(ZeroOrOneBooleanContent); @@ -163,6 +165,13 @@ AVRTargetLowering::AVRTargetLowering(AVRTargetMachine setOperationAction(ISD::SMUL_LOHI, MVT::i16, Expand); setOperationAction(ISD::UMUL_LOHI, MVT::i16, Expand); + // Expand multiplications to libcalls when there is + // no hardware MUL. + if (!Subtarget.supportsMultiplication()) { + setOperationAction(ISD::SMUL_LOHI, MVT::i8, Expand); + setOperationAction(ISD::UMUL_LOHI, MVT::i8, Expand); + } + for (MVT VT : MVT::integer_valuetypes()) { setOperationAction(ISD::MULHS, VT, Expand); setOperationAction(ISD::MULHU, VT, Expand); @@ -1271,7 +1280,7 @@ SDValue AVRTargetLowering::LowerCall(TargetLowering::C // Add a register mask operand representing the call-preserved registers. const AVRTargetMachine &TM = (const AVRTargetMachine &)getTargetMachine(); - const TargetRegisterInfo *TRI = TM.getSubtargetImpl()->getRegisterInfo(); + const TargetRegisterInfo *TRI = Subtarget.getRegisterInfo(); const uint32_t *Mask = TRI->getCallPreservedMask(DAG.getMachineFunction(), CallConv); assert(Mask && "Missing call preserved mask for calling convention"); @@ -1434,7 +1443,7 @@ MachineBasicBlock *AVRTargetLowering::insertShift(Mach MachineFunction *F = BB->getParent(); MachineRegisterInfo &RI = F->getRegInfo(); const AVRTargetMachine &TM = (const AVRTargetMachine &)getTargetMachine(); - const TargetInstrInfo &TII = *TM.getSubtargetImpl()->getInstrInfo(); + const TargetInstrInfo &TII = *Subtarget.getInstrInfo(); DebugLoc dl = MI.getDebugLoc(); switch (MI.getOpcode()) { @@ -1575,7 +1584,7 @@ static bool isCopyMulResult(MachineBasicBlock::iterato MachineBasicBlock *AVRTargetLowering::insertMul(MachineInstr &MI, MachineBasicBlock *BB) const { const AVRTargetMachine &TM = (const AVRTargetMachine &)getTargetMachine(); - const TargetInstrInfo &TII = *TM.getSubtargetImpl()->getInstrInfo(); + const TargetInstrInfo &TII = *Subtarget.getInstrInfo(); MachineBasicBlock::iterator I(MI); ++I; // in any case insert *after* the mul instruction if (isCopyMulResult(I)) @@ -1838,9 +1847,6 @@ std::pair AVRTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { - auto STI = static_cast(this->getTargetMachine()) - .getSubtargetImpl(); - // We only support i8 and i16. // //:FIXME: remove this assert for now since it gets sometimes executed @@ -1884,8 +1890,8 @@ AVRTargetLowering::getRegForInlineAsmConstraint(const } } - return TargetLowering::getRegForInlineAsmConstraint(STI->getRegisterInfo(), - Constraint, VT); + return TargetLowering::getRegForInlineAsmConstraint( + Subtarget.getRegisterInfo(), Constraint, VT); } void AVRTargetLowering::LowerAsmOperandForConstraint(SDValue Op, Modified: vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.h ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.h Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AVR/AVRISelLowering.h Tue Jun 11 18:16:27 2019 (r348932) @@ -64,12 +64,14 @@ enum NodeType { } // end of namespace AVRISD +class AVRSubtarget; class AVRTargetMachine; /// Performs target lowering for the AVR. class AVRTargetLowering : public TargetLowering { public: - explicit AVRTargetLowering(AVRTargetMachine &TM); + explicit AVRTargetLowering(const AVRTargetMachine &TM, + const AVRSubtarget &STI); public: MVT getScalarShiftAmountTy(const DataLayout &, EVT LHSTy) const override { @@ -163,6 +165,10 @@ class AVRTargetLowering : public TargetLowering { (pri const SmallVectorImpl &Ins, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl &InVals) const; + +protected: + + const AVRSubtarget &Subtarget; private: MachineBasicBlock *insertShift(MachineInstr &MI, MachineBasicBlock *BB) const; Modified: vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -29,9 +29,9 @@ namespace llvm { AVRSubtarget::AVRSubtarget(const Triple &TT, const std::string &CPU, - const std::string &FS, AVRTargetMachine &TM) + const std::string &FS, const AVRTargetMachine &TM) : AVRGenSubtargetInfo(TT, CPU, FS), InstrInfo(), FrameLowering(), - TLInfo(TM), TSInfo(), + TLInfo(TM, initializeSubtargetDependencies(CPU, FS, TM)), TSInfo(), // Subtarget features m_hasSRAM(false), m_hasJMPCALL(false), m_hasIJMPCALL(false), @@ -42,6 +42,14 @@ AVRSubtarget::AVRSubtarget(const Triple &TT, const std m_hasTinyEncoding(false), ELFArch(false), m_FeatureSetDummy(false) { // Parse features string. ParseSubtargetFeatures(CPU, FS); +} + +AVRSubtarget & +AVRSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS, + const TargetMachine &TM) { + // Parse features string. + ParseSubtargetFeatures(CPU, FS); + return *this; } } // end of namespace llvm Modified: vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.h ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.h Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/AVR/AVRSubtarget.h Tue Jun 11 18:16:27 2019 (r348932) @@ -37,7 +37,7 @@ class AVRSubtarget : public AVRGenSubtargetInfo { (pub //! \param FS The feature string. //! \param TM The target machine. AVRSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, - AVRTargetMachine &TM); + const AVRTargetMachine &TM); const AVRInstrInfo *getInstrInfo() const override { return &InstrInfo; } const TargetFrameLowering *getFrameLowering() const override { return &FrameLowering; } @@ -48,6 +48,9 @@ class AVRSubtarget : public AVRGenSubtargetInfo { (pub /// Parses a subtarget feature string, setting appropriate options. /// \note Definition of function is auto generated by `tblgen`. void ParseSubtargetFeatures(StringRef CPU, StringRef FS); + + AVRSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS, + const TargetMachine &TM); // Subtarget feature getters. // See AVR.td for details. Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -700,8 +700,11 @@ void MipsTargetAsmStreamer::emitDirectiveCpreturn(unsi } void MipsTargetAsmStreamer::emitDirectiveModuleFP() { - OS << "\t.module\tfp="; - OS << ABIFlagsSection.getFpABIString(ABIFlagsSection.getFpABI()) << "\n"; + MipsABIFlagsSection::FpABIKind FpABI = ABIFlagsSection.getFpABI(); + if (FpABI == MipsABIFlagsSection::FpABIKind::SOFT) + OS << "\t.module\tsoftfloat\n"; + else + OS << "\t.module\tfp=" << ABIFlagsSection.getFpABIString(FpABI) << "\n"; } void MipsTargetAsmStreamer::emitDirectiveSetFp( Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MicroMips32r6InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MicroMips32r6InstrInfo.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MicroMips32r6InstrInfo.td Tue Jun 11 18:16:27 2019 (r348932) @@ -1040,7 +1040,7 @@ class TRUNC_L_D_MMR6_DESC : ABSS_FT_MMR6_DESC_BASE<"tr class TRUNC_W_S_MMR6_DESC : ABSS_FT_MMR6_DESC_BASE<"trunc.w.s", FGR32Opnd, FGR32Opnd, II_TRUNC>; class TRUNC_W_D_MMR6_DESC : ABSS_FT_MMR6_DESC_BASE<"trunc.w.d", FGR32Opnd, - AFGR64Opnd, II_TRUNC>; + FGR64Opnd, II_TRUNC>; class SQRT_S_MMR6_DESC : ABSS_FT_MMR6_DESC_BASE<"sqrt.s", FGR32Opnd, FGR32Opnd, II_SQRT_S, fsqrt>; class SQRT_D_MMR6_DESC : ABSS_FT_MMR6_DESC_BASE<"sqrt.d", AFGR64Opnd, AFGR64Opnd, @@ -1750,6 +1750,8 @@ def : MipsPat<(f32 fpimm0), (MTC1_MMR6 ZERO)>, ISA_MIC def : MipsPat<(f32 fpimm0neg), (FNEG_S_MMR6 (MTC1_MMR6 ZERO))>, ISA_MICROMIPS32R6; def : MipsPat<(MipsTruncIntFP FGR64Opnd:$src), (TRUNC_W_D_MMR6 FGR64Opnd:$src)>, ISA_MICROMIPS32R6; +def : MipsPat<(MipsTruncIntFP FGR32Opnd:$src), + (TRUNC_W_S_MMR6 FGR32Opnd:$src)>, ISA_MICROMIPS32R6; def : MipsPat<(and GPRMM16:$src, immZExtAndi16:$imm), (ANDI16_MMR6 GPRMM16:$src, immZExtAndi16:$imm)>, Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MicroMipsInstrFPU.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MicroMipsInstrFPU.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MicroMipsInstrFPU.td Tue Jun 11 18:16:27 2019 (r348932) @@ -425,6 +425,11 @@ def : MipsPat<(f64 (fpextend FGR32Opnd:$src)), def : MipsPat<(MipsTruncIntFP AFGR64Opnd:$src), (TRUNC_W_MM AFGR64Opnd:$src)>, ISA_MICROMIPS32_NOT_MIPS32R6, FGR_32; +def : MipsPat<(MipsTruncIntFP FGR64Opnd:$src), + (CVT_W_D64_MM FGR64Opnd:$src)>, ISA_MICROMIPS32_NOT_MIPS32R6, + FGR_64; +def : MipsPat<(MipsTruncIntFP FGR32Opnd:$src), + (TRUNC_W_S_MM FGR32Opnd:$src)>, ISA_MICROMIPS32_NOT_MIPS32R6; // Selects defm : MovzPats0, Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MipsAsmPrinter.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MipsAsmPrinter.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MipsAsmPrinter.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -813,7 +813,8 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) { // We should always emit a '.module fp=...' but binutils 2.24 does not accept // it. We therefore emit it when it contradicts the ABI defaults (-mfpxx or // -mfp64) and omit it otherwise. - if (ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) + if ((ABI.IsO32() && (STI.isABI_FPXX() || STI.isFP64bit())) || + STI.useSoftFloat()) TS.emitDirectiveModuleFP(); // We should always emit a '.module [no]oddspreg' but binutils 2.24 does not Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MipsDSPInstrInfo.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MipsDSPInstrInfo.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MipsDSPInstrInfo.td Tue Jun 11 18:16:27 2019 (r348932) @@ -1314,7 +1314,9 @@ def PseudoCMPU_LE_QB : PseudoCMP; def PseudoPICK_PH : PseudoPICK; def PseudoPICK_QB : PseudoPICK; -def PseudoMTLOHI_DSP : PseudoMTLOHI; +let AdditionalPredicates = [HasDSP] in { + def PseudoMTLOHI_DSP : PseudoMTLOHI; +} // Patterns. class DSPPat : Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MipsDelaySlotFiller.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MipsDelaySlotFiller.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MipsDelaySlotFiller.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -726,6 +726,7 @@ bool MipsDelaySlotFiller::searchRange(MachineBasicBloc // but we don't have enough information to make that decision. if (InMicroMipsMode && TII->getInstSizeInBytes(*CurrI) == 2 && (Opcode == Mips::JR || Opcode == Mips::PseudoIndirectBranch || + Opcode == Mips::PseudoIndirectBranch_MM || Opcode == Mips::PseudoReturn || Opcode == Mips::TAILCALL)) continue; // Instructions LWP/SWP and MOVEP should not be in a delay slot as that Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MipsFastISel.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MipsFastISel.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MipsFastISel.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -954,21 +954,34 @@ bool MipsFastISel::selectBranch(const Instruction *I) // MachineBasicBlock *TBB = FuncInfo.MBBMap[BI->getSuccessor(0)]; MachineBasicBlock *FBB = FuncInfo.MBBMap[BI->getSuccessor(1)]; - // For now, just try the simplest case where it's fed by a compare. + + // Fold the common case of a conditional branch with a comparison + // in the same block. + unsigned ZExtCondReg = 0; if (const CmpInst *CI = dyn_cast(BI->getCondition())) { - MVT CIMVT = - TLI.getValueType(DL, CI->getOperand(0)->getType(), true).getSimpleVT(); - if (CIMVT == MVT::i1) + if (CI->hasOneUse() && CI->getParent() == I->getParent()) { + ZExtCondReg = createResultReg(&Mips::GPR32RegClass); + if (!emitCmp(ZExtCondReg, CI)) + return false; + } + } + + // For the general case, we need to mask with 1. + if (ZExtCondReg == 0) { + unsigned CondReg = getRegForValue(BI->getCondition()); + if (CondReg == 0) return false; - unsigned CondReg = getRegForValue(CI); - BuildMI(*BrBB, FuncInfo.InsertPt, DbgLoc, TII.get(Mips::BGTZ)) - .addReg(CondReg) - .addMBB(TBB); - finishCondBranch(BI->getParent(), TBB, FBB); - return true; + ZExtCondReg = emitIntExt(MVT::i1, CondReg, MVT::i32, true); + if (ZExtCondReg == 0) + return false; } - return false; + + BuildMI(*BrBB, FuncInfo.InsertPt, DbgLoc, TII.get(Mips::BGTZ)) + .addReg(ZExtCondReg) + .addMBB(TBB); + finishCondBranch(BI->getParent(), TBB, FBB); + return true; } bool MipsFastISel::selectCmp(const Instruction *I) { Modified: vendor/llvm/dist-release_80/lib/Target/Mips/MipsSEInstrInfo.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Mips/MipsSEInstrInfo.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Mips/MipsSEInstrInfo.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -447,6 +447,9 @@ bool MipsSEInstrInfo::expandPostRAPseudo(MachineInstr case Mips::PseudoMTLOHI_DSP: expandPseudoMTLoHi(MBB, MI, Mips::MTLO_DSP, Mips::MTHI_DSP, true); break; + case Mips::PseudoMTLOHI_MM: + expandPseudoMTLoHi(MBB, MI, Mips::MTLO_MM, Mips::MTHI_MM, false); + break; case Mips::PseudoCVT_S_W: expandCvtFPInt(MBB, MI, Mips::CVT_S_W, Mips::MTC1, false); break; Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -61,6 +61,14 @@ extern "C" void LLVMInitializePowerPCDisassembler() { createPPCLEDisassembler); } +static DecodeStatus DecodePCRel24BranchTarget(MCInst &Inst, unsigned Imm, + uint64_t Addr, + const void *Decoder) { + int32_t Offset = SignExtend32<24>(Imm); + Inst.addOperand(MCOperand::createImm(Offset)); + return MCDisassembler::Success; +} + // FIXME: These can be generated by TableGen from the existing register // encoding values! Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -382,8 +382,11 @@ void PPCInstPrinter::printBranchOperand(const MCInst * // Branches can take an immediate operand. This is used by the branch // selection pass to print .+8, an eight byte displacement from the PC. - O << ".+"; - printAbsBranchOperand(MI, OpNo, O); + O << "."; + int32_t Imm = SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2); + if (Imm >= 0) + O << "+"; + O << Imm; } void PPCInstPrinter::printAbsBranchOperand(const MCInst *MI, unsigned OpNo, Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -15,6 +15,7 @@ #include "InstPrinter/PPCInstPrinter.h" #include "MCTargetDesc/PPCMCAsmInfo.h" #include "PPCTargetStreamer.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" #include "llvm/BinaryFormat/ELF.h" @@ -182,16 +183,33 @@ class PPCTargetELFStreamer : public PPCTargetStreamer void emitAssignment(MCSymbol *S, const MCExpr *Value) override { auto *Symbol = cast(S); + // When encoding an assignment to set symbol A to symbol B, also copy // the st_other bits encoding the local entry point offset. - if (Value->getKind() != MCExpr::SymbolRef) - return; - const auto &RhsSym = cast( - static_cast(Value)->getSymbol()); - unsigned Other = Symbol->getOther(); + if (copyLocalEntry(Symbol, Value)) + UpdateOther.insert(Symbol); + else + UpdateOther.erase(Symbol); + } + + void finish() override { + for (auto *Sym : UpdateOther) + copyLocalEntry(Sym, Sym->getVariableValue()); + } + +private: + SmallPtrSet UpdateOther; + + bool copyLocalEntry(MCSymbolELF *D, const MCExpr *S) { + auto *Ref = dyn_cast(S); + if (!Ref) + return false; + const auto &RhsSym = cast(Ref->getSymbol()); + unsigned Other = D->getOther(); Other &= ~ELF::STO_PPC64_LOCAL_MASK; Other |= RhsSym.getOther() & ELF::STO_PPC64_LOCAL_MASK; - Symbol->setOther(Other); + D->setOther(Other); + return true; } }; Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCISelDAGToDAG.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -4359,8 +4359,8 @@ void PPCDAGToDAGISel::Select(SDNode *N) { const Module *M = MF->getFunction().getParent(); if (PPCLowering->getPointerTy(CurDAG->getDataLayout()) != MVT::i32 || - !PPCSubTarget->isSecurePlt() || !PPCSubTarget->isTargetELF() || - M->getPICLevel() == PICLevel::SmallPIC) + (!TM.isPositionIndependent() || !PPCSubTarget->isSecurePlt()) || + !PPCSubTarget->isTargetELF() || M->getPICLevel() == PICLevel::SmallPIC) break; SDValue Op = N->getOperand(1); Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCInstrInfo.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 11 18:16:27 2019 (r348932) @@ -737,7 +737,9 @@ def abscondbrtarget : Operand { def calltarget : Operand { let PrintMethod = "printBranchOperand"; let EncoderMethod = "getDirectBrEncoding"; + let DecoderMethod = "DecodePCRel24BranchTarget"; let ParserMatchClass = PPCDirectBrAsmOperand; + let OperandType = "OPERAND_PCREL"; } def abscalltarget : Operand { let PrintMethod = "printAbsBranchOperand"; Modified: vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCSubtarget.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCSubtarget.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/PowerPC/PPCSubtarget.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -138,6 +138,9 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU if (isDarwin()) HasLazyResolverStubs = true; + if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD()) + SecurePlt = true; + if (HasSPE && IsPPC64) report_fatal_error( "SPE is only supported for 32-bit targets.\n", false); if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU)) Modified: vendor/llvm/dist-release_80/lib/Target/Sparc/SparcRegisterInfo.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/Sparc/SparcRegisterInfo.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/Sparc/SparcRegisterInfo.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -189,7 +189,7 @@ SparcRegisterInfo::eliminateFrameIndex(MachineBasicBlo MachineInstr *StMI = BuildMI(*MI.getParent(), II, dl, TII.get(SP::STDFri)) .addReg(FrameReg).addImm(0).addReg(SrcEvenReg); - replaceFI(MF, II, *StMI, dl, 0, Offset, FrameReg); + replaceFI(MF, *StMI, *StMI, dl, 0, Offset, FrameReg); MI.setDesc(TII.get(SP::STDFri)); MI.getOperand(2).setReg(SrcOddReg); Offset += 8; @@ -201,7 +201,7 @@ SparcRegisterInfo::eliminateFrameIndex(MachineBasicBlo MachineInstr *StMI = BuildMI(*MI.getParent(), II, dl, TII.get(SP::LDDFri), DestEvenReg) .addReg(FrameReg).addImm(0); - replaceFI(MF, II, *StMI, dl, 1, Offset, FrameReg); + replaceFI(MF, *StMI, *StMI, dl, 1, Offset, FrameReg); MI.setDesc(TII.get(SP::LDDFri)); MI.getOperand(0).setReg(DestOddReg); Modified: vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -669,13 +669,16 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo if (IsVarArg) { // Outgoing non-fixed arguments are placed in a buffer. First // compute their offsets and the total amount of buffer space needed. - for (SDValue Arg : - make_range(OutVals.begin() + NumFixedArgs, OutVals.end())) { + for (unsigned I = NumFixedArgs; I < Outs.size(); ++I) { + const ISD::OutputArg &Out = Outs[I]; + SDValue &Arg = OutVals[I]; EVT VT = Arg.getValueType(); assert(VT != MVT::iPTR && "Legalized args should be concrete"); Type *Ty = VT.getTypeForEVT(*DAG.getContext()); + unsigned Align = std::max(Out.Flags.getOrigAlign(), + Layout.getABITypeAlignment(Ty)); unsigned Offset = CCInfo.AllocateStack(Layout.getTypeAllocSize(Ty), - Layout.getABITypeAlignment(Ty)); + Align); CCInfo.addLoc(CCValAssign::getMem(ArgLocs.size(), VT.getSimpleVT(), Offset, VT.getSimpleVT(), CCValAssign::Full)); Modified: vendor/llvm/dist-release_80/lib/Target/X86/X86FastISel.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/X86/X86FastISel.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/X86/X86FastISel.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -399,7 +399,7 @@ bool X86FastISel::X86FastEmitLoad(EVT VT, X86AddressMo case MVT::v2i64: case MVT::v8i16: case MVT::v16i8: - if (IsNonTemporal && Alignment >= 16) + if (IsNonTemporal && Alignment >= 16 && HasSSE41) Opc = HasVLX ? X86::VMOVNTDQAZ128rm : HasAVX ? X86::VMOVNTDQArm : X86::MOVNTDQArm; else if (Alignment >= 16) Modified: vendor/llvm/dist-release_80/lib/Target/X86/X86TargetMachine.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/X86/X86TargetMachine.cpp Tue Jun 11 16:32:33 2019 (r348931) +++ vendor/llvm/dist-release_80/lib/Target/X86/X86TargetMachine.cpp Tue Jun 11 18:16:27 2019 (r348932) @@ -38,6 +38,7 @@ #include "llvm/IR/Attributes.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Function.h" +#include "llvm/MC/MCAsmInfo.h" #include "llvm/Pass.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/CommandLine.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 11 18:16:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C417A15C20BC; Tue, 11 Jun 2019 18:16:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 639DA70161; Tue, 11 Jun 2019 18:16:39 +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 20330568C; Tue, 11 Jun 2019 18:16:39 +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 x5BIGcwD037321; Tue, 11 Jun 2019 18:16:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIGcSI037320; Tue, 11 Jun 2019 18:16:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111816.x5BIGcSI037320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348933 - vendor/llvm/llvm-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release80-r363030 X-SVN-Commit-Revision: 348933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 639DA70161 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:16:40 -0000 Author: dim Date: Tue Jun 11 18:16:38 2019 New Revision: 348933 URL: https://svnweb.freebsd.org/changeset/base/348933 Log: Tag llvm release_80 branch r363030. Added: vendor/llvm/llvm-release80-r363030/ - copied from r348932, vendor/llvm/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:16:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4D9F15C2107; Tue, 11 Jun 2019 18:16:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD6F70301; Tue, 11 Jun 2019 18:16:54 +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 E910A568D; Tue, 11 Jun 2019 18:16:52 +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 x5BIGqX9037382; Tue, 11 Jun 2019 18:16:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIGojU037373; Tue, 11 Jun 2019 18:16:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111816.x5BIGojU037373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348934 - in vendor/clang/dist-release_80: lib/Basic lib/CodeGen lib/Driver/ToolChains lib/Sema test/Driver test/OpenMP X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_80: lib/Basic lib/CodeGen lib/Driver/ToolChains lib/Sema test/Driver test/OpenMP X-SVN-Commit-Revision: 348934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0AD6F70301 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:16:55 -0000 Author: dim Date: Tue Jun 11 18:16:50 2019 New Revision: 348934 URL: https://svnweb.freebsd.org/changeset/base/348934 Log: Vendor import of clang release_80 branch r363030: https://llvm.org/svn/llvm-project/cfe/branches/release_80@363030 Modified: vendor/clang/dist-release_80/lib/Basic/Version.cpp vendor/clang/dist-release_80/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist-release_80/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist-release_80/lib/Driver/ToolChains/Linux.cpp vendor/clang/dist-release_80/lib/Sema/SemaOpenMP.cpp vendor/clang/dist-release_80/test/Driver/cl-options.c vendor/clang/dist-release_80/test/Driver/instrprof-ld.c vendor/clang/dist-release_80/test/Driver/linux-ld.c vendor/clang/dist-release_80/test/OpenMP/ordered_doacross_codegen.cpp Modified: vendor/clang/dist-release_80/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/Basic/Version.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/lib/Basic/Version.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_800/final/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_80/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: vendor/clang/dist-release_80/lib/CodeGen/CGStmtOpenMP.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/CodeGen/CGStmtOpenMP.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/lib/CodeGen/CGStmtOpenMP.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -1518,8 +1518,9 @@ void CodeGenFunction::EmitOMPPrivateLoopCounters( I < E; ++I) { const auto *DRE = cast(C->getLoopCounter(I)); const auto *VD = cast(DRE->getDecl()); - // Override only those variables that are really emitted already. - if (LocalDeclMap.count(VD)) { + // Override only those variables that can be captured to avoid re-emission + // of the variables declared within the loops. + if (DRE->refersToEnclosingVariableOrCapture()) { (void)LoopScope.addPrivate(VD, [this, DRE, VD]() { return CreateMemTemp(DRE->getType(), VD->getName()); }); Modified: vendor/clang/dist-release_80/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/Driver/ToolChains/Clang.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/lib/Driver/ToolChains/Clang.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -718,8 +718,9 @@ static void appendUserToPath(SmallVectorImpl &Re Result.append(UID.begin(), UID.end()); } -static void addPGOAndCoverageFlags(Compilation &C, const Driver &D, - const InputInfo &Output, const ArgList &Args, +static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, + const Driver &D, const InputInfo &Output, + const ArgList &Args, ArgStringList &CmdArgs) { auto *PGOGenerateArg = Args.getLastArg(options::OPT_fprofile_generate, @@ -759,6 +760,11 @@ static void addPGOAndCoverageFlags(Compilation &C, con ProfileGenerateArg->getValue())); // The default is to use Clang Instrumentation. CmdArgs.push_back("-fprofile-instrument=clang"); + if (TC.getTriple().isWindowsMSVCEnvironment()) { + // Add dependent lib for clang_rt.profile + CmdArgs.push_back(Args.MakeArgString("--dependent-lib=" + + TC.getCompilerRT(Args, "profile"))); + } } if (PGOGenerateArg) { @@ -4118,7 +4124,7 @@ void Clang::ConstructJob(Compilation &C, const JobActi // sampling, overhead of call arc collection is way too high and there's no // way to collect the output. if (!Triple.isNVPTX()) - addPGOAndCoverageFlags(C, D, Output, Args, CmdArgs); + addPGOAndCoverageFlags(TC, C, D, Output, Args, CmdArgs); if (auto *ABICompatArg = Args.getLastArg(options::OPT_fclang_abi_compat_EQ)) ABICompatArg->render(Args, CmdArgs); Modified: vendor/clang/dist-release_80/lib/Driver/ToolChains/Linux.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/Driver/ToolChains/Linux.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/lib/Driver/ToolChains/Linux.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -45,6 +45,7 @@ static std::string getMultiarchTriple(const Driver &D, TargetTriple.getEnvironment(); bool IsAndroid = TargetTriple.isAndroid(); bool IsMipsR6 = TargetTriple.getSubArch() == llvm::Triple::MipsSubArch_r6; + bool IsMipsN32Abi = TargetTriple.getEnvironment() == llvm::Triple::GNUABIN32; // For most architectures, just use whatever we have rather than trying to be // clever. @@ -103,33 +104,37 @@ static std::string getMultiarchTriple(const Driver &D, return "aarch64_be-linux-gnu"; break; case llvm::Triple::mips: { - std::string Arch = IsMipsR6 ? "mipsisa32r6" : "mips"; - if (D.getVFS().exists(SysRoot + "/lib/" + Arch + "-linux-gnu")) - return Arch + "-linux-gnu"; + std::string MT = IsMipsR6 ? "mipsisa32r6-linux-gnu" : "mips-linux-gnu"; + if (D.getVFS().exists(SysRoot + "/lib/" + MT)) + return MT; break; } case llvm::Triple::mipsel: { if (IsAndroid) return "mipsel-linux-android"; - std::string Arch = IsMipsR6 ? "mipsisa32r6el" : "mipsel"; - if (D.getVFS().exists(SysRoot + "/lib/" + Arch + "-linux-gnu")) - return Arch + "-linux-gnu"; + std::string MT = IsMipsR6 ? "mipsisa32r6el-linux-gnu" : "mipsel-linux-gnu"; + if (D.getVFS().exists(SysRoot + "/lib/" + MT)) + return MT; break; } case llvm::Triple::mips64: { - std::string Arch = IsMipsR6 ? "mipsisa64r6" : "mips64"; - std::string ABI = llvm::Triple::getEnvironmentTypeName(TargetEnvironment); - if (D.getVFS().exists(SysRoot + "/lib/" + Arch + "-linux-" + ABI)) - return Arch + "-linux-" + ABI; + std::string MT = std::string(IsMipsR6 ? "mipsisa64r6" : "mips64") + + "-linux-" + (IsMipsN32Abi ? "gnuabin32" : "gnuabi64"); + if (D.getVFS().exists(SysRoot + "/lib/" + MT)) + return MT; + if (D.getVFS().exists(SysRoot + "/lib/mips64-linux-gnu")) + return "mips64-linux-gnu"; break; } case llvm::Triple::mips64el: { if (IsAndroid) return "mips64el-linux-android"; - std::string Arch = IsMipsR6 ? "mipsisa64r6el" : "mips64el"; - std::string ABI = llvm::Triple::getEnvironmentTypeName(TargetEnvironment); - if (D.getVFS().exists(SysRoot + "/lib/" + Arch + "-linux-" + ABI)) - return Arch + "-linux-" + ABI; + std::string MT = std::string(IsMipsR6 ? "mipsisa64r6el" : "mips64el") + + "-linux-" + (IsMipsN32Abi ? "gnuabin32" : "gnuabi64"); + if (D.getVFS().exists(SysRoot + "/lib/" + MT)) + return MT; + if (D.getVFS().exists(SysRoot + "/lib/mips64el-linux-gnu")) + return "mips64el-linux-gnu"; break; } case llvm::Triple::ppc: Modified: vendor/clang/dist-release_80/lib/Sema/SemaOpenMP.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/Sema/SemaOpenMP.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/lib/Sema/SemaOpenMP.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -4602,8 +4602,7 @@ DeclRefExpr *OpenMPIterationSpaceChecker::buildCounter Captures.insert(std::make_pair(LCRef, Ref)); return Ref; } - return buildDeclRefExpr(SemaRef, VD, VD->getType().getNonReferenceType(), - DefaultLoc); + return cast(LCRef); } Expr *OpenMPIterationSpaceChecker::buildPrivateCounterVar() const { Modified: vendor/clang/dist-release_80/test/Driver/cl-options.c ============================================================================== --- vendor/clang/dist-release_80/test/Driver/cl-options.c Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/test/Driver/cl-options.c Tue Jun 11 18:16:50 2019 (r348934) @@ -66,7 +66,7 @@ // RUN: %clang_cl -### /FA -fprofile-instr-generate=/tmp/somefile.profraw -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s // RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s // RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" +// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.lib" // CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw" // CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' Modified: vendor/clang/dist-release_80/test/Driver/instrprof-ld.c ============================================================================== --- vendor/clang/dist-release_80/test/Driver/instrprof-ld.c Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/test/Driver/instrprof-ld.c Tue Jun 11 18:16:50 2019 (r348934) @@ -121,3 +121,17 @@ // // CHECK-WINDOWS-X86-64: "{{.*}}link{{(.exe)?}}" // CHECK-WINDOWS-X86-64: "{{.*}}clang_rt.profile-x86_64.lib" + +// Test instrumented profiling dependent-lib flags +// +// RUN: %clang %s -### -o %t.o -target x86_64-pc-win32 \ +// RUN: -fprofile-instr-generate 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-WINDOWS-X86-64-DEPENDENT-LIB %s +// +// CHECK-WINDOWS-X86-64-DEPENDENT-LIB: "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.lib" +// +// RUN: %clang %s -### -o %t.o -target x86_64-mingw32 \ +// RUN: -fprofile-instr-generate 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MINGW-X86-64-DEPENDENT-LIB %s +// +// CHECK-MINGW-X86-64-DEPENDENT-LIB-NOT: "--dependent-lib={{[^"]*}}clang_rt.profile-{{[^"]*}}.a" Modified: vendor/clang/dist-release_80/test/Driver/linux-ld.c ============================================================================== --- vendor/clang/dist-release_80/test/Driver/linux-ld.c Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/test/Driver/linux-ld.c Tue Jun 11 18:16:50 2019 (r348934) @@ -1632,6 +1632,11 @@ // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=mips64-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips64-linux-gnuabi64 -mabi=n64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ @@ -1651,6 +1656,11 @@ // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtend.o" // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crtn.o" // +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=mips64el-unknown-linux-gnu \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ +// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips64el-linux-gnuabi64 -mabi=n64 \ // RUN: --gcc-toolchain="" \ Modified: vendor/clang/dist-release_80/test/OpenMP/ordered_doacross_codegen.cpp ============================================================================== --- vendor/clang/dist-release_80/test/OpenMP/ordered_doacross_codegen.cpp Tue Jun 11 18:16:38 2019 (r348933) +++ vendor/clang/dist-release_80/test/OpenMP/ordered_doacross_codegen.cpp Tue Jun 11 18:16:50 2019 (r348934) @@ -16,6 +16,17 @@ extern int n; int a[10], b[10], c[10], d[10]; void foo(); +// CHECK-LABEL:bar +void bar() { + int i,j; +// CHECK: call void @__kmpc_doacross_init( +// CHECK: call void @__kmpc_doacross_fini( +#pragma omp parallel for ordered(2) + for (i = 0; i < n; ++i) + for (j = 0; j < n; ++j) + a[i] = b[i] + 1; +} + // CHECK-LABEL: @main() int main() { int i; @@ -35,7 +46,7 @@ int main() { // CHECK: call void @__kmpc_doacross_init([[IDENT]], i32 [[GTID]], i32 1, i8* [[CAST]]) // CHECK: call void @__kmpc_for_static_init_4( #pragma omp for ordered(1) - for (i = 0; i < n; ++i) { + for (int i = 0; i < n; ++i) { a[i] = b[i] + 1; foo(); // CHECK: invoke void [[FOO:.+]]( From owner-svn-src-all@freebsd.org Tue Jun 11 18:16:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4743A15C210D; Tue, 11 Jun 2019 18:16:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D634570329; Tue, 11 Jun 2019 18:16:55 +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 98C5B568E; Tue, 11 Jun 2019 18:16:55 +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 x5BIGtKr037428; Tue, 11 Jun 2019 18:16:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIGt4N037427; Tue, 11 Jun 2019 18:16:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111816.x5BIGt4N037427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348935 - vendor/clang/clang-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release80-r363030 X-SVN-Commit-Revision: 348935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D634570329 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:16:56 -0000 Author: dim Date: Tue Jun 11 18:16:55 2019 New Revision: 348935 URL: https://svnweb.freebsd.org/changeset/base/348935 Log: Tag clang release_80 branch r363030. Added: vendor/clang/clang-release80-r363030/ - copied from r348934, vendor/clang/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B080515C2156; Tue, 11 Jun 2019 18:17:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41D4170425; Tue, 11 Jun 2019 18:17:05 +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 A6206568F; Tue, 11 Jun 2019 18:17: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 x5BIH0aP037486; Tue, 11 Jun 2019 18:17:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIGxc2037478; Tue, 11 Jun 2019 18:16:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111816.x5BIGxc2037478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348936 - in vendor/compiler-rt/dist-release_80: cmake lib/sanitizer_common lib/xray/tests test/builtins/Unit X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/compiler-rt/dist-release_80: cmake lib/sanitizer_common lib/xray/tests test/builtins/Unit X-SVN-Commit-Revision: 348936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41D4170425 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:06 -0000 Author: dim Date: Tue Jun 11 18:16:59 2019 New Revision: 348936 URL: https://svnweb.freebsd.org/changeset/base/348936 Log: Vendor import of compiler-rt release_80 branch r363030: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@363030 Modified: vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c Modified: vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake Tue Jun 11 18:16:55 2019 (r348935) +++ vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake Tue Jun 11 18:16:59 2019 (r348936) @@ -195,10 +195,10 @@ macro(test_targets) # clang's default CPU's. In the 64-bit case, we must also specify the ABI # since the default ABI differs between gcc and clang. # FIXME: Ideally, we would build the N32 library too. - test_target_arch(mipsel "" "-mips32r2" "-mabi=32") + test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64") test_target_arch(mips64el "" "-mips64r2" "-mabi=64") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips") - test_target_arch(mips "" "-mips32r2" "-mabi=32") + test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64") test_target_arch(mips64 "" "-mips64r2" "-mabi=64") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm") if(WIN32) Modified: vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc ============================================================================== --- vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Tue Jun 11 18:16:55 2019 (r348935) +++ vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Tue Jun 11 18:16:59 2019 (r348936) @@ -124,7 +124,9 @@ #include #include #include +#if 0 #include +#endif #include #include #include Modified: vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt Tue Jun 11 18:16:55 2019 (r348935) +++ vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt Tue Jun 11 18:16:59 2019 (r348936) @@ -48,8 +48,7 @@ endfunction() set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH}) set(XRAY_UNITTEST_LINK_FLAGS - ${CMAKE_THREAD_LIBS_INIT} - -l${SANITIZER_CXX_ABI_LIBRARY}) + ${CMAKE_THREAD_LIBS_INIT}) if (NOT APPLE) # Needed by LLVMSupport. @@ -80,6 +79,8 @@ if (NOT APPLE) append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread XRAY_UNITTEST_LINK_FLAGS) append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS) endif() + +list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY}) macro(add_xray_unittest testname) cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN}) Modified: vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c ============================================================================== --- vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c Tue Jun 11 18:16:55 2019 (r348935) +++ vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c Tue Jun 11 18:16:59 2019 (r348936) @@ -37,6 +37,10 @@ double cases[] = { }; int main() { + // Do not the run the compiler-rt logb test case if using GLIBC version + // < 2.23. Older versions might not compute to the same value as the + // compiler-rt value. +#if !defined(__GLIBC__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23)) const unsigned N = sizeof(cases) / sizeof(cases[0]); unsigned i; for (i = 0; i < N; ++i) { @@ -58,6 +62,9 @@ int main() { if (test__compiler_rt_logb(fromRep(signBit ^ x))) return 1; x >>= 1; } +#else + printf("skipped\n"); +#endif return 0; } From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41DD215C215B; Tue, 11 Jun 2019 18:17:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 589BA70429; Tue, 11 Jun 2019 18:17:05 +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 84A095690; Tue, 11 Jun 2019 18:17:03 +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 x5BIH3kA037532; Tue, 11 Jun 2019 18:17:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIH3Z6037531; Tue, 11 Jun 2019 18:17:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIH3Z6037531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348937 - vendor/compiler-rt/compiler-rt-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release80-r363030 X-SVN-Commit-Revision: 348937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 589BA70429 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:06 -0000 Author: dim Date: Tue Jun 11 18:17:02 2019 New Revision: 348937 URL: https://svnweb.freebsd.org/changeset/base/348937 Log: Tag compiler-rt release_80 branch r363030. Added: vendor/compiler-rt/compiler-rt-release80-r363030/ - copied from r348936, vendor/compiler-rt/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CBDF15C21C6; Tue, 11 Jun 2019 18:17:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA4AA7055E; Tue, 11 Jun 2019 18:17:15 +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 9A70F5691; Tue, 11 Jun 2019 18:17:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BIHBAF037585; Tue, 11 Jun 2019 18:17:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHBtH037584; Tue, 11 Jun 2019 18:17:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHBtH037584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348938 - vendor/libc++/dist-release_80 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/dist-release_80 X-SVN-Commit-Revision: 348938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA4AA7055E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:16 -0000 Author: dim Date: Tue Jun 11 18:17:11 2019 New Revision: 348938 URL: https://svnweb.freebsd.org/changeset/base/348938 Log: Vendor import of libc++ release_80 branch r363030: https://llvm.org/svn/llvm-project/libcxx/branches/release_80@363030 Modified: vendor/libc++/dist-release_80/CMakeLists.txt Modified: vendor/libc++/dist-release_80/CMakeLists.txt ============================================================================== --- vendor/libc++/dist-release_80/CMakeLists.txt Tue Jun 11 18:17:02 2019 (r348937) +++ vendor/libc++/dist-release_80/CMakeLists.txt Tue Jun 11 18:17:11 2019 (r348938) @@ -27,7 +27,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 8.0.0) + set(PACKAGE_VERSION 8.0.1) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 631C115C21ED; Tue, 11 Jun 2019 18:17:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0345E705DE; Tue, 11 Jun 2019 18:17: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 8E8865692; Tue, 11 Jun 2019 18:17:14 +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 x5BIHEUI037635; Tue, 11 Jun 2019 18:17:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHERY037633; Tue, 11 Jun 2019 18:17:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHERY037633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348939 - vendor/libc++/libc++-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release80-r363030 X-SVN-Commit-Revision: 348939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0345E705DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:20 -0000 Author: dim Date: Tue Jun 11 18:17:14 2019 New Revision: 348939 URL: https://svnweb.freebsd.org/changeset/base/348939 Log: Tag libc++ release_80 branch r363030. Added: vendor/libc++/libc++-release80-r363030/ - copied from r348938, vendor/libc++/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C2B15C2235; Tue, 11 Jun 2019 18:17:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10E3C7069F; Tue, 11 Jun 2019 18:17:26 +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 129D85694; Tue, 11 Jun 2019 18:17: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 x5BIHJva037733; Tue, 11 Jun 2019 18:17:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHJpm037732; Tue, 11 Jun 2019 18:17:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHJpm037732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348941 - vendor/llvm-libunwind/libunwind-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/libunwind-release80-r363030 X-SVN-Commit-Revision: 348941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 10E3C7069F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:26 -0000 Author: dim Date: Tue Jun 11 18:17:19 2019 New Revision: 348941 URL: https://svnweb.freebsd.org/changeset/base/348941 Log: Tag LLVM libunwind release_80 branch r363030. Added: vendor/llvm-libunwind/libunwind-release80-r363030/ - copied from r348940, vendor/llvm-libunwind/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E87915C220B; Tue, 11 Jun 2019 18:17:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1CFD70622; Tue, 11 Jun 2019 18:17:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B5D85693; Tue, 11 Jun 2019 18:17:17 +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 x5BIHHgG037687; Tue, 11 Jun 2019 18:17:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHGQa037682; Tue, 11 Jun 2019 18:17:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHGQa037682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348940 - vendor/llvm-libunwind/dist-release_80/src X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/dist-release_80/src X-SVN-Commit-Revision: 348940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1CFD70622 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:22 -0000 Author: dim Date: Tue Jun 11 18:17:16 2019 New Revision: 348940 URL: https://svnweb.freebsd.org/changeset/base/348940 Log: Vendor import of LLVM libunwind release_80 branch r363030: https://llvm.org/svn/llvm-project/libunwind/branches/release_80@363030 Modified: vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersRestore.S vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersSave.S vendor/llvm-libunwind/dist-release_80/src/assembly.h Modified: vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersRestore.S ============================================================================== --- vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersRestore.S Tue Jun 11 18:17:14 2019 (r348939) +++ vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersRestore.S Tue Jun 11 18:17:16 2019 (r348940) @@ -396,119 +396,119 @@ Lnovec: #elif defined(__ppc__) DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) -; -; void libunwind::Registers_ppc::jumpto() -; -; On entry: -; thread_state pointer is in r3 -; +// +// void libunwind::Registers_ppc::jumpto() +// +// On entry: +// thread_state pointer is in r3 +// - ; restore integral registerrs - ; skip r0 for now - ; skip r1 for now - lwz r2, 16(r3) - ; skip r3 for now - ; skip r4 for now - ; skip r5 for now - lwz r6, 32(r3) - lwz r7, 36(r3) - lwz r8, 40(r3) - lwz r9, 44(r3) - lwz r10, 48(r3) - lwz r11, 52(r3) - lwz r12, 56(r3) - lwz r13, 60(r3) - lwz r14, 64(r3) - lwz r15, 68(r3) - lwz r16, 72(r3) - lwz r17, 76(r3) - lwz r18, 80(r3) - lwz r19, 84(r3) - lwz r20, 88(r3) - lwz r21, 92(r3) - lwz r22, 96(r3) - lwz r23,100(r3) - lwz r24,104(r3) - lwz r25,108(r3) - lwz r26,112(r3) - lwz r27,116(r3) - lwz r28,120(r3) - lwz r29,124(r3) - lwz r30,128(r3) - lwz r31,132(r3) + // restore integral registerrs + // skip r0 for now + // skip r1 for now + lwz %r2, 16(%r3) + // skip r3 for now + // skip r4 for now + // skip r5 for now + lwz %r6, 32(%r3) + lwz %r7, 36(%r3) + lwz %r8, 40(%r3) + lwz %r9, 44(%r3) + lwz %r10, 48(%r3) + lwz %r11, 52(%r3) + lwz %r12, 56(%r3) + lwz %r13, 60(%r3) + lwz %r14, 64(%r3) + lwz %r15, 68(%r3) + lwz %r16, 72(%r3) + lwz %r17, 76(%r3) + lwz %r18, 80(%r3) + lwz %r19, 84(%r3) + lwz %r20, 88(%r3) + lwz %r21, 92(%r3) + lwz %r22, 96(%r3) + lwz %r23,100(%r3) + lwz %r24,104(%r3) + lwz %r25,108(%r3) + lwz %r26,112(%r3) + lwz %r27,116(%r3) + lwz %r28,120(%r3) + lwz %r29,124(%r3) + lwz %r30,128(%r3) + lwz %r31,132(%r3) - ; restore float registers - lfd f0, 160(r3) - lfd f1, 168(r3) - lfd f2, 176(r3) - lfd f3, 184(r3) - lfd f4, 192(r3) - lfd f5, 200(r3) - lfd f6, 208(r3) - lfd f7, 216(r3) - lfd f8, 224(r3) - lfd f9, 232(r3) - lfd f10,240(r3) - lfd f11,248(r3) - lfd f12,256(r3) - lfd f13,264(r3) - lfd f14,272(r3) - lfd f15,280(r3) - lfd f16,288(r3) - lfd f17,296(r3) - lfd f18,304(r3) - lfd f19,312(r3) - lfd f20,320(r3) - lfd f21,328(r3) - lfd f22,336(r3) - lfd f23,344(r3) - lfd f24,352(r3) - lfd f25,360(r3) - lfd f26,368(r3) - lfd f27,376(r3) - lfd f28,384(r3) - lfd f29,392(r3) - lfd f30,400(r3) - lfd f31,408(r3) + // restore float registers + lfd %f0, 160(%r3) + lfd %f1, 168(%r3) + lfd %f2, 176(%r3) + lfd %f3, 184(%r3) + lfd %f4, 192(%r3) + lfd %f5, 200(%r3) + lfd %f6, 208(%r3) + lfd %f7, 216(%r3) + lfd %f8, 224(%r3) + lfd %f9, 232(%r3) + lfd %f10,240(%r3) + lfd %f11,248(%r3) + lfd %f12,256(%r3) + lfd %f13,264(%r3) + lfd %f14,272(%r3) + lfd %f15,280(%r3) + lfd %f16,288(%r3) + lfd %f17,296(%r3) + lfd %f18,304(%r3) + lfd %f19,312(%r3) + lfd %f20,320(%r3) + lfd %f21,328(%r3) + lfd %f22,336(%r3) + lfd %f23,344(%r3) + lfd %f24,352(%r3) + lfd %f25,360(%r3) + lfd %f26,368(%r3) + lfd %f27,376(%r3) + lfd %f28,384(%r3) + lfd %f29,392(%r3) + lfd %f30,400(%r3) + lfd %f31,408(%r3) - ; restore vector registers if any are in use - lwz r5,156(r3) ; test VRsave - cmpwi r5,0 - beq Lnovec + // restore vector registers if any are in use + lwz %r5, 156(%r3) // test VRsave + cmpwi %r5, 0 + beq Lnovec - subi r4,r1,16 - rlwinm r4,r4,0,0,27 ; mask low 4-bits - ; r4 is now a 16-byte aligned pointer into the red zone - ; the _vectorRegisters may not be 16-byte aligned so copy via red zone temp buffer + subi %r4, %r1, 16 + rlwinm %r4, %r4, 0, 0, 27 // mask low 4-bits + // r4 is now a 16-byte aligned pointer into the red zone + // the _vectorRegisters may not be 16-byte aligned so copy via red zone temp buffer + - #define LOAD_VECTOR_UNALIGNEDl(_index) \ - andis. r0,r5,(1<<(15-_index)) @\ - beq Ldone ## _index @\ - lwz r0, 424+_index*16(r3) @\ - stw r0, 0(r4) @\ - lwz r0, 424+_index*16+4(r3) @\ - stw r0, 4(r4) @\ - lwz r0, 424+_index*16+8(r3) @\ - stw r0, 8(r4) @\ - lwz r0, 424+_index*16+12(r3)@\ - stw r0, 12(r4) @\ - lvx v ## _index,0,r4 @\ -Ldone ## _index: + andis. %r0, %r5, (1<<(15-_index)) SEPARATOR \ + beq Ldone ## _index SEPARATOR \ + lwz %r0, 424+_index*16(%r3) SEPARATOR \ + stw %r0, 0(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+4(%r3) SEPARATOR \ + stw %r0, 4(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+8(%r3) SEPARATOR \ + stw %r0, 8(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+12(%r3) SEPARATOR \ + stw %r0, 12(%r4) SEPARATOR \ + lvx %v ## _index, 0, %r4 SEPARATOR \ + Ldone ## _index: #define LOAD_VECTOR_UNALIGNEDh(_index) \ - andi. r0,r5,(1<<(31-_index)) @\ - beq Ldone ## _index @\ - lwz r0, 424+_index*16(r3) @\ - stw r0, 0(r4) @\ - lwz r0, 424+_index*16+4(r3) @\ - stw r0, 4(r4) @\ - lwz r0, 424+_index*16+8(r3) @\ - stw r0, 8(r4) @\ - lwz r0, 424+_index*16+12(r3)@\ - stw r0, 12(r4) @\ - lvx v ## _index,0,r4 @\ - Ldone ## _index: + andi. %r0, %r5, (1<<(31-_index)) SEPARATOR \ + beq Ldone ## _index SEPARATOR \ + lwz %r0, 424+_index*16(%r3) SEPARATOR \ + stw %r0, 0(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+4(%r3) SEPARATOR \ + stw %r0, 4(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+8(%r3) SEPARATOR \ + stw %r0, 8(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+12(%r3) SEPARATOR \ + stw %r0, 12(%r4) SEPARATOR \ + lvx %v ## _index, 0, %r4 SEPARATOR \ + Ldone ## _index: LOAD_VECTOR_UNALIGNEDl(0) @@ -545,17 +545,17 @@ Ldone ## _index: LOAD_VECTOR_UNALIGNEDh(31) Lnovec: - lwz r0, 136(r3) ; __cr - mtocrf 255,r0 - lwz r0, 148(r3) ; __ctr - mtctr r0 - lwz r0, 0(r3) ; __ssr0 - mtctr r0 - lwz r0, 8(r3) ; do r0 now - lwz r5,28(r3) ; do r5 now - lwz r4,24(r3) ; do r4 now - lwz r1,12(r3) ; do sp now - lwz r3,20(r3) ; do r3 last + lwz %r0, 136(%r3) // __cr + mtcr %r0 + lwz %r0, 148(%r3) // __ctr + mtctr %r0 + lwz %r0, 0(%r3) // __ssr0 + mtctr %r0 + lwz %r0, 8(%r3) // do r0 now + lwz %r5, 28(%r3) // do r5 now + lwz %r4, 24(%r3) // do r4 now + lwz %r1, 12(%r3) // do sp now + lwz %r3, 20(%r3) // do r3 last bctr #elif defined(__arm64__) || defined(__aarch64__) Modified: vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersSave.S ============================================================================== --- vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersSave.S Tue Jun 11 18:17:14 2019 (r348939) +++ vendor/llvm-libunwind/dist-release_80/src/UnwindRegistersSave.S Tue Jun 11 18:17:16 2019 (r348940) @@ -557,144 +557,144 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) #elif defined(__ppc__) -; -; extern int unw_getcontext(unw_context_t* thread_state) -; -; On entry: -; thread_state pointer is in r3 -; +// +// extern int unw_getcontext(unw_context_t* thread_state) +// +// On entry: +// thread_state pointer is in r3 +// DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) - stw r0, 8(r3) - mflr r0 - stw r0, 0(r3) ; store lr as ssr0 - stw r1, 12(r3) - stw r2, 16(r3) - stw r3, 20(r3) - stw r4, 24(r3) - stw r5, 28(r3) - stw r6, 32(r3) - stw r7, 36(r3) - stw r8, 40(r3) - stw r9, 44(r3) - stw r10, 48(r3) - stw r11, 52(r3) - stw r12, 56(r3) - stw r13, 60(r3) - stw r14, 64(r3) - stw r15, 68(r3) - stw r16, 72(r3) - stw r17, 76(r3) - stw r18, 80(r3) - stw r19, 84(r3) - stw r20, 88(r3) - stw r21, 92(r3) - stw r22, 96(r3) - stw r23,100(r3) - stw r24,104(r3) - stw r25,108(r3) - stw r26,112(r3) - stw r27,116(r3) - stw r28,120(r3) - stw r29,124(r3) - stw r30,128(r3) - stw r31,132(r3) + stw %r0, 8(%r3) + mflr %r0 + stw %r0, 0(%r3) // store lr as ssr0 + stw %r1, 12(%r3) + stw %r2, 16(%r3) + stw %r3, 20(%r3) + stw %r4, 24(%r3) + stw %r5, 28(%r3) + stw %r6, 32(%r3) + stw %r7, 36(%r3) + stw %r8, 40(%r3) + stw %r9, 44(%r3) + stw %r10, 48(%r3) + stw %r11, 52(%r3) + stw %r12, 56(%r3) + stw %r13, 60(%r3) + stw %r14, 64(%r3) + stw %r15, 68(%r3) + stw %r16, 72(%r3) + stw %r17, 76(%r3) + stw %r18, 80(%r3) + stw %r19, 84(%r3) + stw %r20, 88(%r3) + stw %r21, 92(%r3) + stw %r22, 96(%r3) + stw %r23,100(%r3) + stw %r24,104(%r3) + stw %r25,108(%r3) + stw %r26,112(%r3) + stw %r27,116(%r3) + stw %r28,120(%r3) + stw %r29,124(%r3) + stw %r30,128(%r3) + stw %r31,132(%r3) - ; save VRSave register - mfspr r0,256 - stw r0,156(r3) - ; save CR registers - mfcr r0 - stw r0,136(r3) - ; save CTR register - mfctr r0 - stw r0,148(r3) + // save VRSave register + mfspr %r0, 256 + stw %r0, 156(%r3) + // save CR registers + mfcr %r0 + stw %r0, 136(%r3) + // save CTR register + mfctr %r0 + stw %r0, 148(%r3) - ; save float registers - stfd f0, 160(r3) - stfd f1, 168(r3) - stfd f2, 176(r3) - stfd f3, 184(r3) - stfd f4, 192(r3) - stfd f5, 200(r3) - stfd f6, 208(r3) - stfd f7, 216(r3) - stfd f8, 224(r3) - stfd f9, 232(r3) - stfd f10,240(r3) - stfd f11,248(r3) - stfd f12,256(r3) - stfd f13,264(r3) - stfd f14,272(r3) - stfd f15,280(r3) - stfd f16,288(r3) - stfd f17,296(r3) - stfd f18,304(r3) - stfd f19,312(r3) - stfd f20,320(r3) - stfd f21,328(r3) - stfd f22,336(r3) - stfd f23,344(r3) - stfd f24,352(r3) - stfd f25,360(r3) - stfd f26,368(r3) - stfd f27,376(r3) - stfd f28,384(r3) - stfd f29,392(r3) - stfd f30,400(r3) - stfd f31,408(r3) + // save float registers + stfd %f0, 160(%r3) + stfd %f1, 168(%r3) + stfd %f2, 176(%r3) + stfd %f3, 184(%r3) + stfd %f4, 192(%r3) + stfd %f5, 200(%r3) + stfd %f6, 208(%r3) + stfd %f7, 216(%r3) + stfd %f8, 224(%r3) + stfd %f9, 232(%r3) + stfd %f10,240(%r3) + stfd %f11,248(%r3) + stfd %f12,256(%r3) + stfd %f13,264(%r3) + stfd %f14,272(%r3) + stfd %f15,280(%r3) + stfd %f16,288(%r3) + stfd %f17,296(%r3) + stfd %f18,304(%r3) + stfd %f19,312(%r3) + stfd %f20,320(%r3) + stfd %f21,328(%r3) + stfd %f22,336(%r3) + stfd %f23,344(%r3) + stfd %f24,352(%r3) + stfd %f25,360(%r3) + stfd %f26,368(%r3) + stfd %f27,376(%r3) + stfd %f28,384(%r3) + stfd %f29,392(%r3) + stfd %f30,400(%r3) + stfd %f31,408(%r3) - ; save vector registers + // save vector registers - subi r4,r1,16 - rlwinm r4,r4,0,0,27 ; mask low 4-bits - ; r4 is now a 16-byte aligned pointer into the red zone + subi %r4, %r1, 16 + rlwinm %r4, %r4, 0, 0, 27 // mask low 4-bits + // r4 is now a 16-byte aligned pointer into the red zone #define SAVE_VECTOR_UNALIGNED(_vec, _offset) \ - stvx _vec,0,r4 @\ - lwz r5, 0(r4) @\ - stw r5, _offset(r3) @\ - lwz r5, 4(r4) @\ - stw r5, _offset+4(r3) @\ - lwz r5, 8(r4) @\ - stw r5, _offset+8(r3) @\ - lwz r5, 12(r4) @\ - stw r5, _offset+12(r3) + stvx _vec, 0, %r4 SEPARATOR \ + lwz %r5, 0(%r4) SEPARATOR \ + stw %r5, _offset(%r3) SEPARATOR \ + lwz %r5, 4(%r4) SEPARATOR \ + stw %r5, _offset+4(%r3) SEPARATOR \ + lwz %r5, 8(%r4) SEPARATOR \ + stw %r5, _offset+8(%r3) SEPARATOR \ + lwz %r5, 12(%r4) SEPARATOR \ + stw %r5, _offset+12(%r3) - SAVE_VECTOR_UNALIGNED( v0, 424+0x000) - SAVE_VECTOR_UNALIGNED( v1, 424+0x010) - SAVE_VECTOR_UNALIGNED( v2, 424+0x020) - SAVE_VECTOR_UNALIGNED( v3, 424+0x030) - SAVE_VECTOR_UNALIGNED( v4, 424+0x040) - SAVE_VECTOR_UNALIGNED( v5, 424+0x050) - SAVE_VECTOR_UNALIGNED( v6, 424+0x060) - SAVE_VECTOR_UNALIGNED( v7, 424+0x070) - SAVE_VECTOR_UNALIGNED( v8, 424+0x080) - SAVE_VECTOR_UNALIGNED( v9, 424+0x090) - SAVE_VECTOR_UNALIGNED(v10, 424+0x0A0) - SAVE_VECTOR_UNALIGNED(v11, 424+0x0B0) - SAVE_VECTOR_UNALIGNED(v12, 424+0x0C0) - SAVE_VECTOR_UNALIGNED(v13, 424+0x0D0) - SAVE_VECTOR_UNALIGNED(v14, 424+0x0E0) - SAVE_VECTOR_UNALIGNED(v15, 424+0x0F0) - SAVE_VECTOR_UNALIGNED(v16, 424+0x100) - SAVE_VECTOR_UNALIGNED(v17, 424+0x110) - SAVE_VECTOR_UNALIGNED(v18, 424+0x120) - SAVE_VECTOR_UNALIGNED(v19, 424+0x130) - SAVE_VECTOR_UNALIGNED(v20, 424+0x140) - SAVE_VECTOR_UNALIGNED(v21, 424+0x150) - SAVE_VECTOR_UNALIGNED(v22, 424+0x160) - SAVE_VECTOR_UNALIGNED(v23, 424+0x170) - SAVE_VECTOR_UNALIGNED(v24, 424+0x180) - SAVE_VECTOR_UNALIGNED(v25, 424+0x190) - SAVE_VECTOR_UNALIGNED(v26, 424+0x1A0) - SAVE_VECTOR_UNALIGNED(v27, 424+0x1B0) - SAVE_VECTOR_UNALIGNED(v28, 424+0x1C0) - SAVE_VECTOR_UNALIGNED(v29, 424+0x1D0) - SAVE_VECTOR_UNALIGNED(v30, 424+0x1E0) - SAVE_VECTOR_UNALIGNED(v31, 424+0x1F0) + SAVE_VECTOR_UNALIGNED( %v0, 424+0x000) + SAVE_VECTOR_UNALIGNED( %v1, 424+0x010) + SAVE_VECTOR_UNALIGNED( %v2, 424+0x020) + SAVE_VECTOR_UNALIGNED( %v3, 424+0x030) + SAVE_VECTOR_UNALIGNED( %v4, 424+0x040) + SAVE_VECTOR_UNALIGNED( %v5, 424+0x050) + SAVE_VECTOR_UNALIGNED( %v6, 424+0x060) + SAVE_VECTOR_UNALIGNED( %v7, 424+0x070) + SAVE_VECTOR_UNALIGNED( %v8, 424+0x080) + SAVE_VECTOR_UNALIGNED( %v9, 424+0x090) + SAVE_VECTOR_UNALIGNED(%v10, 424+0x0A0) + SAVE_VECTOR_UNALIGNED(%v11, 424+0x0B0) + SAVE_VECTOR_UNALIGNED(%v12, 424+0x0C0) + SAVE_VECTOR_UNALIGNED(%v13, 424+0x0D0) + SAVE_VECTOR_UNALIGNED(%v14, 424+0x0E0) + SAVE_VECTOR_UNALIGNED(%v15, 424+0x0F0) + SAVE_VECTOR_UNALIGNED(%v16, 424+0x100) + SAVE_VECTOR_UNALIGNED(%v17, 424+0x110) + SAVE_VECTOR_UNALIGNED(%v18, 424+0x120) + SAVE_VECTOR_UNALIGNED(%v19, 424+0x130) + SAVE_VECTOR_UNALIGNED(%v20, 424+0x140) + SAVE_VECTOR_UNALIGNED(%v21, 424+0x150) + SAVE_VECTOR_UNALIGNED(%v22, 424+0x160) + SAVE_VECTOR_UNALIGNED(%v23, 424+0x170) + SAVE_VECTOR_UNALIGNED(%v24, 424+0x180) + SAVE_VECTOR_UNALIGNED(%v25, 424+0x190) + SAVE_VECTOR_UNALIGNED(%v26, 424+0x1A0) + SAVE_VECTOR_UNALIGNED(%v27, 424+0x1B0) + SAVE_VECTOR_UNALIGNED(%v28, 424+0x1C0) + SAVE_VECTOR_UNALIGNED(%v29, 424+0x1D0) + SAVE_VECTOR_UNALIGNED(%v30, 424+0x1E0) + SAVE_VECTOR_UNALIGNED(%v31, 424+0x1F0) - li r3, 0 ; return UNW_ESUCCESS + li %r3, 0 // return UNW_ESUCCESS blr Modified: vendor/llvm-libunwind/dist-release_80/src/assembly.h ============================================================================== --- vendor/llvm-libunwind/dist-release_80/src/assembly.h Tue Jun 11 18:17:14 2019 (r348939) +++ vendor/llvm-libunwind/dist-release_80/src/assembly.h Tue Jun 11 18:17:16 2019 (r348940) @@ -29,8 +29,6 @@ #ifdef _ARCH_PWR8 #define PPC64_HAS_VMX #endif -#elif defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) -#define SEPARATOR @ #elif defined(__arm64__) #define SEPARATOR %% #else From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 876AF15C2273; Tue, 11 Jun 2019 18:17:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29F9D7075B; Tue, 11 Jun 2019 18:17:32 +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 E8DB15695; Tue, 11 Jun 2019 18:17: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 x5BIHTjR037813; Tue, 11 Jun 2019 18:17:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHNtO037782; Tue, 11 Jun 2019 18:17:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHNtO037782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348942 - in vendor/lld/dist-release_80: COFF ELF ELF/Arch test/COFF test/ELF wasm X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist-release_80: COFF ELF ELF/Arch test/COFF test/ELF wasm X-SVN-Commit-Revision: 348942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 29F9D7075B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:33 -0000 Author: dim Date: Tue Jun 11 18:17:23 2019 New Revision: 348942 URL: https://svnweb.freebsd.org/changeset/base/348942 Log: Vendor import of lld release_80 branch r363030: https://llvm.org/svn/llvm-project/lld/branches/release_80@363030 Added: vendor/lld/dist-release_80/test/COFF/guardcf-thunk.s vendor/lld/dist-release_80/test/ELF/compressed-input-alignment.test vendor/lld/dist-release_80/test/ELF/emit-relocs-mergeable2.s vendor/lld/dist-release_80/test/ELF/ppc64-local-entry.s vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-init.s Modified: vendor/lld/dist-release_80/COFF/Writer.cpp vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp vendor/lld/dist-release_80/ELF/InputSection.cpp vendor/lld/dist-release_80/ELF/SyntheticSections.cpp vendor/lld/dist-release_80/ELF/Writer.cpp vendor/lld/dist-release_80/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s vendor/lld/dist-release_80/test/ELF/aarch64-tls-gdle.s vendor/lld/dist-release_80/test/ELF/aarch64-tls-iele.s vendor/lld/dist-release_80/test/ELF/aarch64-tls-le.s vendor/lld/dist-release_80/test/ELF/aarch64-tlsld-ldst.s vendor/lld/dist-release_80/test/ELF/arm-tls-le32.s vendor/lld/dist-release_80/test/ELF/arm-tls-norelax-ie-le.s vendor/lld/dist-release_80/test/ELF/eh-frame-hdr-augmentation.s vendor/lld/dist-release_80/test/ELF/gc-sections-metadata-startstop.s vendor/lld/dist-release_80/test/ELF/mips-micro-relocs.s vendor/lld/dist-release_80/test/ELF/mips-micror6-relocs.s vendor/lld/dist-release_80/test/ELF/ppc64-bsymbolic-toc-restore.s vendor/lld/dist-release_80/test/ELF/ppc64-call-reach.s vendor/lld/dist-release_80/test/ELF/ppc64-ifunc.s vendor/lld/dist-release_80/test/ELF/ppc64-local-dynamic.s vendor/lld/dist-release_80/test/ELF/ppc64-plt-stub.s vendor/lld/dist-release_80/test/ELF/ppc64-rel-calls.s vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore-recursive-call.s vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore.s vendor/lld/dist-release_80/wasm/OutputSections.cpp Modified: vendor/lld/dist-release_80/COFF/Writer.cpp ============================================================================== --- vendor/lld/dist-release_80/COFF/Writer.cpp Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/COFF/Writer.cpp Tue Jun 11 18:17:23 2019 (r348942) @@ -1351,19 +1351,47 @@ static void addSymbolToRVASet(SymbolRVASet &RVASet, De // symbol in an executable section. static void maybeAddAddressTakenFunction(SymbolRVASet &AddressTakenSyms, Symbol *S) { - auto *D = dyn_cast_or_null(S); - - // Ignore undefined symbols and references to non-functions (e.g. globals and - // labels). - if (!D || - D->getCOFFSymbol().getComplexType() != COFF::IMAGE_SYM_DTYPE_FUNCTION) + if (!S) return; - // Mark the symbol as address taken if it's in an executable section. - Chunk *RefChunk = D->getChunk(); - OutputSection *OS = RefChunk ? RefChunk->getOutputSection() : nullptr; - if (OS && OS->Header.Characteristics & IMAGE_SCN_MEM_EXECUTE) - addSymbolToRVASet(AddressTakenSyms, D); + switch (S->kind()) { + case Symbol::DefinedLocalImportKind: + case Symbol::DefinedImportDataKind: + // Defines an __imp_ pointer, so it is data, so it is ignored. + break; + case Symbol::DefinedCommonKind: + // Common is always data, so it is ignored. + break; + case Symbol::DefinedAbsoluteKind: + case Symbol::DefinedSyntheticKind: + // Absolute is never code, synthetic generally isn't and usually isn't + // determinable. + break; + case Symbol::LazyKind: + case Symbol::UndefinedKind: + // Undefined symbols resolve to zero, so they don't have an RVA. Lazy + // symbols shouldn't have relocations. + break; + + case Symbol::DefinedImportThunkKind: + // Thunks are always code, include them. + addSymbolToRVASet(AddressTakenSyms, cast(S)); + break; + + case Symbol::DefinedRegularKind: { + // This is a regular, defined, symbol from a COFF file. Mark the symbol as + // address taken if the symbol type is function and it's in an executable + // section. + auto *D = cast(S); + if (D->getCOFFSymbol().getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) { + Chunk *RefChunk = D->getChunk(); + OutputSection *OS = RefChunk ? RefChunk->getOutputSection() : nullptr; + if (OS && OS->Header.Characteristics & IMAGE_SCN_MEM_EXECUTE) + addSymbolToRVASet(AddressTakenSyms, D); + } + break; + } + } } // Visit all relocations from all section contributions of this object file and Modified: vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp ============================================================================== --- vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp Tue Jun 11 18:17:23 2019 (r348942) @@ -113,6 +113,7 @@ class PPC64 final : public TargetInfo { (public) void writeGotHeader(uint8_t *Buf) const override; bool needsThunk(RelExpr Expr, RelType Type, const InputFile *File, uint64_t BranchAddr, const Symbol &S) const override; + uint32_t getThunkSectionSpacing() const override; bool inBranchRange(RelType Type, uint64_t Src, uint64_t Dst) const override; RelExpr adjustRelaxExpr(RelType Type, const uint8_t *Data, RelExpr Expr) const override; @@ -757,6 +758,14 @@ bool PPC64::needsThunk(RelExpr Expr, RelType Type, con // If the offset exceeds the range of the branch type then it will need // a range-extending thunk. return !inBranchRange(Type, BranchAddr, S.getVA()); +} + +uint32_t PPC64::getThunkSectionSpacing() const { + // See comment in Arch/ARM.cpp for a more detailed explanation of + // getThunkSectionSpacing(). For PPC64 we pick the constant here based on + // R_PPC64_REL24, which is used by unconditional branch instructions. + // 0x2000000 = (1 << 24-1) * 4 + return 0x2000000; } bool PPC64::inBranchRange(RelType Type, uint64_t Src, uint64_t Dst) const { Modified: vendor/lld/dist-release_80/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist-release_80/ELF/InputSection.cpp Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/ELF/InputSection.cpp Tue Jun 11 18:17:23 2019 (r348942) @@ -248,6 +248,7 @@ void InputSectionBase::parseCompressedHeader() { } UncompressedSize = Hdr->ch_size; + Alignment = std::max(Hdr->ch_addralign, 1); RawData = RawData.slice(sizeof(*Hdr)); return; } @@ -265,6 +266,7 @@ void InputSectionBase::parseCompressedHeader() { } UncompressedSize = Hdr->ch_size; + Alignment = std::max(Hdr->ch_addralign, 1); RawData = RawData.slice(sizeof(*Hdr)); } @@ -578,10 +580,6 @@ static int64_t getTlsTpOffset() { // Variant 1. The thread pointer points to a TCB with a fixed 2-word size, // followed by a variable amount of alignment padding, followed by the TLS // segment. - // - // NB: While the ARM/AArch64 ABI formally has a 2-word TCB size, lld - // effectively increases the TCB size to 8 words for Android compatibility. - // It accomplishes this by increasing the segment's alignment. return alignTo(Config->Wordsize * 2, Out::TlsPhdr->p_align); case EM_386: case EM_X86_64: Modified: vendor/lld/dist-release_80/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist-release_80/ELF/SyntheticSections.cpp Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/ELF/SyntheticSections.cpp Tue Jun 11 18:17:23 2019 (r348942) @@ -2001,6 +2001,11 @@ template void SymbolTableSection::w ESym->setVisibility(Sym->Visibility); } + // The 3 most significant bits of st_other are used by OpenPOWER ABI. + // See getPPC64GlobalEntryToLocalEntryOffset() for more details. + if (Config->EMachine == EM_PPC64) + ESym->st_other |= Sym->StOther & 0xe0; + ESym->st_name = Ent.StrTabOffset; ESym->st_shndx = getSymSectionIndex(Ent.Sym); Modified: vendor/lld/dist-release_80/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist-release_80/ELF/Writer.cpp Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/ELF/Writer.cpp Tue Jun 11 18:17:23 2019 (r348942) @@ -547,6 +547,11 @@ static bool shouldKeepInSymtab(SectionBase *Sec, Strin if (Config->Discard == DiscardPolicy::None) return true; + // If -emit-reloc is given, all symbols including local ones need to be + // copied because they may be referenced by relocations. + if (Config->EmitRelocs) + return true; + // In ELF assembly .L symbols are normally discarded by the assembler. // If the assembler fails to do so, the linker discards them if // * --discard-locals is used. @@ -2192,17 +2197,6 @@ template void Writer::setPhdrs() { } if (P->p_type == PT_TLS && P->p_memsz) { - if (!Config->Shared && - (Config->EMachine == EM_ARM || Config->EMachine == EM_AARCH64)) { - // On ARM/AArch64, reserve extra space (8 words) between the thread - // pointer and an executable's TLS segment by overaligning the segment. - // This reservation is needed for backwards compatibility with Android's - // TCB, which allocates several slots after the thread pointer (e.g. - // TLS_SLOT_STACK_GUARD==5). For simplicity, this overalignment is also - // done on other operating systems. - P->p_align = std::max(P->p_align, Config->Wordsize * 8); - } - // The TLS pointer goes after PT_TLS for variant 2 targets. At least glibc // will align it, so round up the size to make sure the offsets are // correct. Added: vendor/lld/dist-release_80/test/COFF/guardcf-thunk.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/COFF/guardcf-thunk.s Tue Jun 11 18:17:23 2019 (r348942) @@ -0,0 +1,43 @@ +# REQUIRES: x86 + +# Make a DLL that exports exportfn1. +# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj +# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /implib:%t.lib + +# Make an obj that takes the address of that exported function. +# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %t2.obj +# RUN: lld-link -entry:main -guard:cf %t2.obj %t.lib -nodefaultlib -out:%t.exe +# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s + +# Check that the gfids table contains *exactly* two entries, one for exportfn1 +# and one for main. +# CHECK: GuardFidTable [ +# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}} +# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}} +# CHECK-NEXT: ] + + + .def @feat.00; + .scl 3; + .type 0; + .endef + .globl @feat.00 +@feat.00 = 0x001 + + .section .text,"rx" + .def main; .scl 2; .type 32; .endef + .global main +main: + leaq exportfn1(%rip), %rax + retq + + .section .rdata,"dr" +.globl _load_config_used +_load_config_used: + .long 256 + .fill 124, 1, 0 + .quad __guard_fids_table + .quad __guard_fids_count + .long __guard_flags + .fill 128, 1, 0 + Modified: vendor/lld/dist-release_80/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/aarch64-cortex-a53-843419-tlsrelax.s Tue Jun 11 18:17:23 2019 (r348942) @@ -26,9 +26,9 @@ _start: // CHECK: _start: // CHECK-NEXT: 210ff8: 41 d0 3b d5 mrs x1, TPIDR_EL0 // CHECK-NEXT: 210ffc: 00 00 a0 d2 movz x0, #0, lsl #16 -// CHECK-NEXT: 211000: 01 08 80 f2 movk x1, #64 +// CHECK-NEXT: 211000: 01 02 80 f2 movk x1, #16 // CHECK-NEXT: 211004: 00 00 a0 d2 movz x0, #0, lsl #16 -// CHECK-NEXT: 211008: 01 08 80 f2 movk x1, #64 +// CHECK-NEXT: 211008: 01 02 80 f2 movk x1, #16 // CHECK-NEXT: 21100c: c0 03 5f d6 ret .type v,@object Modified: vendor/lld/dist-release_80/test/ELF/aarch64-tls-gdle.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/aarch64-tls-gdle.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/aarch64-tls-gdle.s Tue Jun 11 18:17:23 2019 (r348942) @@ -9,11 +9,11 @@ #RELOC: Relocations [ #RELOC-NEXT: ] -# TCB size = 64 and foo is first element from TLS register. +# TCB size = 0x16 and foo is first element from TLS register. # CHECK: Disassembly of section .text: # CHECK: _start: # CHECK: 210000: 00 00 a0 d2 movz x0, #0, lsl #16 -# CHECK: 210004: 00 08 80 f2 movk x0, #64 +# CHECK: 210004: 00 02 80 f2 movk x0, #16 # CHECK: 210008: 1f 20 03 d5 nop # CHECK: 21000c: 1f 20 03 d5 nop Modified: vendor/lld/dist-release_80/test/ELF/aarch64-tls-iele.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/aarch64-tls-iele.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/aarch64-tls-iele.s Tue Jun 11 18:17:23 2019 (r348942) @@ -9,13 +9,13 @@ # RELOC: Relocations [ # RELOC-NEXT: ] -# TCB size = 64 and foo is first element from TLS register. +# TCB size = 0x16 and foo is first element from TLS register. # CHECK: Disassembly of section .text: # CHECK: _start: # CHECK-NEXT: 210000: 00 00 a0 d2 movz x0, #0, lsl #16 -# CHECK-NEXT: 210004: 80 08 80 f2 movk x0, #68 +# CHECK-NEXT: 210004: 80 02 80 f2 movk x0, #20 # CHECK-NEXT: 210008: 00 00 a0 d2 movz x0, #0, lsl #16 -# CHECK-NEXT: 21000c: 00 08 80 f2 movk x0, #64 +# CHECK-NEXT: 21000c: 00 02 80 f2 movk x0, #16 .section .tdata .align 2 Modified: vendor/lld/dist-release_80/test/ELF/aarch64-tls-le.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/aarch64-tls-le.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/aarch64-tls-le.s Tue Jun 11 18:17:23 2019 (r348942) @@ -17,12 +17,12 @@ _start: add x0, x0, :tprel_hi12:v2 add x0, x0, :tprel_lo12_nc:v2 -# TCB size = 64 and foo is first element from TLS register. +# TCB size = 0x16 and foo is first element from TLS register. #CHECK: Disassembly of section .text: #CHECK: _start: #CHECK: 210000: 40 d0 3b d5 mrs x0, TPIDR_EL0 #CHECK: 210004: 00 00 40 91 add x0, x0, #0, lsl #12 -#CHECK: 210008: 00 00 01 91 add x0, x0, #64 +#CHECK: 210008: 00 40 00 91 add x0, x0, #16 #CHECK: 21000c: 40 d0 3b d5 mrs x0, TPIDR_EL0 #CHECK: 210010: 00 fc 7f 91 add x0, x0, #4095, lsl #12 #CHECK: 210014: 00 e0 3f 91 add x0, x0, #4088 @@ -36,9 +36,9 @@ v1: .word 0 .size v1, 4 -# The current offset from the thread pointer is 68. Raise it to just below the +# The current offset from the thread pointer is 20. Raise it to just below the # 24-bit limit. -.space (0xfffff8 - 68) +.space (0xfffff8 - 20) .type v2,@object .globl v2 Modified: vendor/lld/dist-release_80/test/ELF/aarch64-tlsld-ldst.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/aarch64-tlsld-ldst.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/aarch64-tlsld-ldst.s Tue Jun 11 18:17:23 2019 (r348942) @@ -26,27 +26,27 @@ _start: mrs x8, TPIDR_EL0 // CHECK: _start: // CHECK-NEXT: 210000: 48 d0 3b d5 mrs x8, TPIDR_EL0 -// 0x0 + c40 = 0xc40 = tcb (64-bytes) + var0 -// CHECK-NEXT: 210004: 08 01 40 91 add x8, x8, #0, lsl #12 -// CHECK-NEXT: 210008: 14 11 c3 3d ldr q20, [x8, #3136] -// 0x1000 + 0x850 = 0x1850 = tcb + var1 -// CHECK-NEXT: 21000c: 08 05 40 91 add x8, x8, #1, lsl #12 -// CHECK-NEXT: 210010: 00 29 44 f9 ldr x0, [x8, #2128] -// 0x2000 + 0x458 = 0x2458 = tcb + var2 -// CHECK-NEXT: 210014: 08 09 40 91 add x8, x8, #2, lsl #12 -// CHECK-NEXT: 210018: 00 59 44 b9 ldr w0, [x8, #1112] -// 0x3000 + 0x5c = 0x305c = tcb + var3 -// CHECK-NEXT: 21001c: 08 0d 40 91 add x8, x8, #3, lsl #12 -// CHECK-NEXT: 210020: 00 b9 40 79 ldrh w0, [x8, #92] -// 0x3000 + 0xc5e = 0x3c5e = tcb + var4 -// CHECK-NEXT: 210024: 08 0d 40 91 add x8, x8, #3, lsl #12 -// CHECK-NEXT: 210028: 00 79 71 39 ldrb w0, [x8, #3166] +// 0x0 + c10 = 0xc10 = tcb (16-bytes) + var0 +// CHECK-NEXT: 210004: 08 01 40 91 add x8, x8, #0, lsl #12 +// CHECK-NEXT: 210008: 14 05 c3 3d ldr q20, [x8, #3088] +// 0x1000 + 0x820 = 0x1820 = tcb + var1 +// CHECK-NEXT: 21000c: 08 05 40 91 add x8, x8, #1, lsl #12 +// CHECK-NEXT: 210010: 00 11 44 f9 ldr x0, [x8, #2080] +// 0x2000 + 0x428 = 0x2428 = tcb + var2 +// CHECK-NEXT: 210014: 08 09 40 91 add x8, x8, #2, lsl #12 +// CHECK-NEXT: 210018: 00 29 44 b9 ldr w0, [x8, #1064] +// 0x3000 + 0x2c = 0x302c = tcb + var3 +// CHECK-NEXT: 21001c: 08 0d 40 91 add x8, x8, #3, lsl #12 +// CHECK-NEXT: 210020: 00 59 40 79 ldrh w0, [x8, #44] +// 0x3000 + 0xc2e = 0x32ce = tcb + var4 +// CHECK-NEXT: 210024: 08 0d 40 91 add x8, x8, #3, lsl #12 +// CHECK-NEXT: 210028: 00 b9 70 39 ldrb w0, [x8, #3118] -// CHECK-SYMS: 0000000000000c00 16 TLS GLOBAL DEFAULT 2 var0 -// CHECK-SYMS-NEXT: 0000000000001810 8 TLS GLOBAL DEFAULT 2 var1 -// CHECK-SYMS-NEXT: 0000000000002418 4 TLS GLOBAL DEFAULT 2 var2 -// CHECK-SYMS-NEXT: 000000000000301c 2 TLS GLOBAL DEFAULT 2 var3 -// CHECK-SYMS-NEXT: 0000000000003c1e 1 TLS GLOBAL DEFAULT 2 var4 +// CHECK-SYMS: 0000000000000c00 0 TLS GLOBAL DEFAULT 2 var0 +// CHECK-SYMS-NEXT: 0000000000001810 4 TLS GLOBAL DEFAULT 2 var1 +// CHECK-SYMS-NEXT: 0000000000002418 2 TLS GLOBAL DEFAULT 2 var2 +// CHECK-SYMS-NEXT: 000000000000301c 1 TLS GLOBAL DEFAULT 2 var3 +// CHECK-SYMS-NEXT: 0000000000003c1e 0 TLS GLOBAL DEFAULT 2 var4 .globl var0 .globl var1 @@ -59,12 +59,12 @@ _start: mrs x8, TPIDR_EL0 .type var3,@object .section .tbss,"awT",@nobits - .balign 64 + .balign 16 .space 1024 * 3 var0: .quad 0 .quad 0 - .size var0, 16 + .size var1, 16 .space 1024 * 3 var1: .quad 0 @@ -72,14 +72,14 @@ var1: .space 1024 * 3 var2: .word 0 - .size var2, 4 + .size var1, 4 .space 1024 * 3 var3: .hword 0 - .size var3, 2 + .size var2, 2 .space 1024 * 3 var4: .byte 0 - .size var4, 1 + .size var3, 1 .space 1024 * 3 Modified: vendor/lld/dist-release_80/test/ELF/arm-tls-le32.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/arm-tls-le32.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/arm-tls-le32.s Tue Jun 11 18:17:23 2019 (r348942) @@ -69,9 +69,9 @@ x: // CHECK: Disassembly of section .text: // CHECK-NEXT: _start: -// offset of x from Thread pointer = (TcbSize + 0x0 = 0x20) -// CHECK-NEXT: 11000: 20 00 00 00 -// offset of z from Thread pointer = (TcbSize + 0x8 = 0x28) -// CHECK-NEXT: 11004: 28 00 00 00 -// offset of y from Thread pointer = (TcbSize + 0x4 = 0x24) -// CHECK-NEXT: 11008: 24 00 00 00 +// offset of x from Thread pointer = (TcbSize + 0x0 = 0x8) +// CHECK-NEXT: 11000: 08 00 00 00 +// offset of z from Thread pointer = (TcbSize + 0x8 = 0x10) +// CHECK-NEXT: 11004: 10 00 00 00 +// offset of y from Thread pointer = (TcbSize + 0x4 = 0xc) +// CHECK-NEXT: 11008: 0c 00 00 00 Modified: vendor/lld/dist-release_80/test/ELF/arm-tls-norelax-ie-le.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/arm-tls-norelax-ie-le.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/arm-tls-norelax-ie-le.s Tue Jun 11 18:17:23 2019 (r348942) @@ -37,5 +37,5 @@ x2: .type x2, %object // CHECK: Contents of section .got: -// x1 at offset 0x20 from TP, x2 at offset 0x24 from TP. Offsets include TCB size of 0x20 -// CHECK-NEXT: 13064 20000000 24000000 +// x1 at offset 8 from TP, x2 at offset 0xc from TP. Offsets include TCB size of 8 +// CHECK-NEXT: 13064 08000000 0c000000 Added: vendor/lld/dist-release_80/test/ELF/compressed-input-alignment.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/ELF/compressed-input-alignment.test Tue Jun 11 18:17:23 2019 (r348942) @@ -0,0 +1,67 @@ +# REQUIRES: zlib, x86 + +# RUN: yaml2obj -docnum=1 %s -o %t.o +# RUN: ld.lld %t.o %t.o -o %t2 +# RUN: llvm-readobj -sections -section-data %t2 | FileCheck %s + +# RUN: yaml2obj -docnum=2 %s -o %t.o +# RUN: ld.lld %t.o %t.o -o %t2 +# RUN: llvm-readobj -sections -section-data %t2 | FileCheck %s + +# CHECK: Name: .debug_info +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0xE8 +# CHECK-NEXT: Size: 108 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: {{.*}} |ABCDEFGHIJKLMNOP| +# CHECK-NEXT: 0010: {{.*}} |QRSTUVWXYZ.ABCDE| +# CHECK-NEXT: 0020: {{.*}} |FGHIJKLMNOPQRSTU| +# CHECK-NEXT: 0030: {{.*}} |VWXYZ.ABCDEFGHIJ| +# CHECK-NEXT: 0040: {{.*}} |KLMNOPQRSTUVWXYZ| +# CHECK-NEXT: 0050: {{.*}} |.ABCDEFGHIJKLMNO| +# CHECK-NEXT: 0060: {{.*}} |PQRSTUVWXYZ.| +# CHECK-NEXT: ) +# CHECK-NEXT: } + +## YAML below is produced from the following code. AddressAlign of .debug_info is 8, +## while compressed header has ch_addralign = 1. LLD had a bug and did not use the +## value of ch_addralign at all. We produced broken section content. +## +## .section .debug_info,"",@progbits +## .string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +## .string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_info + Type: SHT_PROGBITS + Flags: [ SHF_COMPRESSED ] + AddressAlign: 0x0000000000000008 + Content: 010000000000000036000000000000000100000000000000789C73747276717573F7F0F4F2F6F1F5F30F080C0A0E090D0B8F888C6270C42D0500ADA00FBF + +## YAML below is the same as above, with a single change: ch_addralign field of the compressed +## header was set to 0. This is allowed by the standard, we have to support it. +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_info + Type: SHT_PROGBITS + Flags: [ SHF_COMPRESSED ] + AddressAlign: 0x0000000000000008 + Content: 010000000000000036000000000000000000000000000000789C73747276717573F7F0F4F2F6F1F5F30F080C0A0E090D0B8F888C6270C42D0500ADA00FBF Modified: vendor/lld/dist-release_80/test/ELF/eh-frame-hdr-augmentation.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/eh-frame-hdr-augmentation.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/eh-frame-hdr-augmentation.s Tue Jun 11 18:17:23 2019 (r348942) @@ -11,7 +11,7 @@ // CHECK-NEXT: Code alignment factor: 1 // CHECK-NEXT: Data alignment factor: -8 // CHECK-NEXT: Return address column: 16 -// CHECK-NEXT: Personality Address: 00000dad +// CHECK-NEXT: Personality Address: 0000000000000dad // CHECK-NEXT: Augmentation data: // CHECK: DW_CFA_def_cfa: reg7 +8 @@ -20,7 +20,7 @@ // CHECK-NEXT: DW_CFA_nop: // CHECK: 00000020 00000014 00000024 FDE cie=00000024 pc=00000d98...00000d98 -// CHECK-NEXT: LSDA Address: 00000d8f +// CHECK-NEXT: LSDA Address: 0000000000000d8f // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: Added: vendor/lld/dist-release_80/test/ELF/emit-relocs-mergeable2.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/ELF/emit-relocs-mergeable2.s Tue Jun 11 18:17:23 2019 (r348942) @@ -0,0 +1,14 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: ld.lld --emit-relocs %t.o -o %t.exe +# RUN: llvm-readelf --relocations %t.exe | FileCheck %s + +# CHECK: 0000000000201004 000000010000000b R_X86_64_32S 0000000000200120 .Lfoo + 8 + +.globl _start +_start: + movq .Lfoo+8, %rax +.section .rodata.cst16,"aM",@progbits,16 +.Lfoo: + .quad 0 + .quad 0 Modified: vendor/lld/dist-release_80/test/ELF/gc-sections-metadata-startstop.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/gc-sections-metadata-startstop.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/gc-sections-metadata-startstop.s Tue Jun 11 18:17:23 2019 (r348942) @@ -11,7 +11,7 @@ # CHECK-NOT: yy # CHECK: SYMBOL TABLE: -# CHECK: xx 00000000 __start_xx +# CHECK: xx 00000000 .protected __start_xx # CHECK: w *UND* 00000000 __start_yy .weak __start_xx Modified: vendor/lld/dist-release_80/test/ELF/mips-micro-relocs.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/mips-micro-relocs.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/mips-micro-relocs.s Tue Jun 11 18:17:23 2019 (r348942) @@ -39,9 +39,9 @@ # EL-NEXT: 20028: 00 00 00 00 nop # EL-NEXT: 2002c: 00 94 e8 ff b -44 -# SYM: 00037ff0 .got 00000000 .hidden _gp -# SYM: 00020000 g F .text 00000000 foo -# SYM: 00020010 .text 00000000 __start +# SYM: 00037ff0 .got 00000000 .hidden _gp +# SYM: 00020000 g F .text 00000000 0x80 foo +# SYM: 00020010 .text 00000000 0x80 __start .text .set micromips Modified: vendor/lld/dist-release_80/test/ELF/mips-micror6-relocs.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/mips-micror6-relocs.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/mips-micror6-relocs.s Tue Jun 11 18:17:23 2019 (r348942) @@ -26,8 +26,8 @@ # EL-NEXT: 20014: 7f 80 f6 ff beqzc $3, -36 # EL-NEXT: 20018: ff b7 f4 ff balc -24 -# SYM: 00020000 g F .text 00000000 foo -# SYM: 00020010 .text 00000000 __start +# SYM: 00020000 g F .text 00000000 0x80 foo +# SYM: 00020010 .text 00000000 0x80 __start .text .set micromips Modified: vendor/lld/dist-release_80/test/ELF/ppc64-bsymbolic-toc-restore.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-bsymbolic-toc-restore.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-bsymbolic-toc-restore.s Tue Jun 11 18:17:23 2019 (r348942) @@ -53,7 +53,7 @@ caller: # CHECK-LABEL: caller # CHECK: bl .+44 # CHECK-NEXT: mr 31, 3 -# CHECK-NEXT: bl .+67108816 +# CHECK-NEXT: bl .+44 # CHECK-NEXT: ld 2, 24(1) # CHECK-NEXT: add 3, 3, 31 # CHECK-NEXT: addi 1, 1, 32 @@ -63,6 +63,6 @@ caller: # CHECK-EMPTY: # CHECK-NEXT: def: # CHECK-NEXT: addis 2, 12, 2 -# CHECK-NEXT: addi 2, 2, -32636 +# CHECK-NEXT: addi 2, 2, -32616 # CHECK-NEXT: li 3, 55 # CHECK-NEXT: blr Modified: vendor/lld/dist-release_80/test/ELF/ppc64-call-reach.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-call-reach.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-call-reach.s Tue Jun 11 18:17:23 2019 (r348942) @@ -3,16 +3,16 @@ # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o # RUN: ld.lld --defsym callee=0x12010010 --defsym tail_callee=0x12010020 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s # RUN: ld.lld --defsym callee=0x12010010 --defsym tail_callee=0x12010020 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s # RUN: ld.lld --defsym callee=0xE010014 --defsym tail_callee=0xE010024 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck --check-prefix=NEGOFFSET %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=NEGOFFSET %s # RUN: ld.lld --defsym callee=0x12010018 --defsym tail_callee=0x12010028 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck --check-prefix=THUNK %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=THUNK %s # RUN: llvm-readelf --sections %t | FileCheck --check-prefix=BRANCHLT %s # RUN: not ld.lld --defsym callee=0x1001002D --defsym tail_callee=0x1001002F \ # RUN: %t.o -o %t 2>&1 | FileCheck --check-prefix=MISSALIGNED %s @@ -20,16 +20,16 @@ # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o # RUN: ld.lld --defsym callee=0x12010010 --defsym tail_callee=0x12010020 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s # RUN: ld.lld --defsym callee=0x12010010 --defsym tail_callee=0x12010020 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s # RUN: ld.lld --defsym callee=0xE010014 --defsym tail_callee=0xE010024 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck --check-prefix=NEGOFFSET %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=NEGOFFSET %s # RUN: ld.lld --defsym callee=0x12010018 --defsym tail_callee=0x12010028 \ # RUN: %t.o -o %t -# RUN: llvm-objdump -d %t | FileCheck --check-prefix=THUNK %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=THUNK %s # RUN: llvm-readelf --sections %t | FileCheck --check-prefix=BRANCHLT %s # RUN: not ld.lld --defsym callee=0x1001002D --defsym tail_callee=0x1001002F \ # RUN: %t.o -o %t 2>&1 | FileCheck --check-prefix=MISSALIGNED %s @@ -58,37 +58,33 @@ test: # Check that we are branching to the definitions, and not range-extending # thunks. # CHECK-LABEL: test -# CHECK: 10010014: {{.*}} bl .+33554428 -# CHECK: 10010024: {{.*}} b .+33554428 +# CHECK: 10010014: bl .+33554428 +# CHECK: 10010024: b .+33554428 # NEGOFFSET-LABEL: test -# NEGOFFSET: 10010014: {{.*}} bl .+33554432 -# NEGOFFSET: 10010024: {{.*}} b .+33554432 +# NEGOFFSET: 10010014: bl .-33554432 +# NEGOFFSET: 10010024: b .+33554432 +# THUNK-LABEL: test: +# THUNK: 10010014: bl .+20 +# THUNK: 10010024: b .+20 + # .branch_lt[0] # THUNK-LABEL: __long_branch_callee: -# THUNK-NEXT: 10010000: {{.*}} addis 12, 2, -1 +# THUNK-NEXT: 10010028: addis 12, 2, -1 # THUNK-NEXT: ld 12, -32768(12) # THUNK-NEXT: mtctr 12 # THUNK-NEXT: bctr # .branch_lt[1] # THUNK-LABEL: __long_branch_tail_callee: -# THUNK-NEXT: 10010010: {{.*}} addis 12, 2, -1 +# THUNK-NEXT: 10010038: addis 12, 2, -1 # THUNK-NEXT: ld 12, -32760(12) # THUNK-NEXT: mtctr 12 # THUNK-NEXT: bctr -# Each call now branches to a thunk, and although it is printed as positive -# the offset is interpreted as a signed 26 bit value so 67108812 is actually -# -52. -# THUNK-LABEL: test: -# THUNK: 10010034: {{.*}} bl .+67108812 -# THUNK: 10010044: {{.*}} b .+67108812 - # The offset from the TOC to the .branch_lt section is (-1 << 16) - 32768. # Name Type Address Off Size # BRANCHLT: .branch_lt PROGBITS 0000000010020000 020000 000010 # BRANCHLT: .got PROGBITS 0000000010030000 030000 000008 # BRANCHLT-NOT: .plt - Modified: vendor/lld/dist-release_80/test/ELF/ppc64-ifunc.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-ifunc.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-ifunc.s Tue Jun 11 18:17:23 2019 (r348942) @@ -1,87 +1,75 @@ # REQUIRES: ppc # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o -# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o -# RUN: ld.lld -shared %t2.o -o %t2.so -# RUN: ld.lld %t.o %t2.so -o %t -# RUN: llvm-objdump -D %t | FileCheck %s -# RUN: llvm-readelf -dynamic-table %t | FileCheck --check-prefix=DT %s -# RUN: llvm-readelf -dyn-relocations %t | FileCheck --check-prefix=DYNREL %s +# RUN: ld.lld %t.o -o %t +# RUN: llvm-nm %t | FileCheck --check-prefix=NM %s +# RUN: llvm-readelf -S %t | FileCheck --check-prefix=SECTIONS %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s +# RUN: llvm-readelf -r %t | FileCheck --check-prefix=DYNREL %s # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o -# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o -# RUN: ld.lld -shared %t2.o -o %t2.so -# RUN: ld.lld %t.o %t2.so -o %t -# RUN: llvm-objdump -D %t | FileCheck %s -# RUN: llvm-readelf -dynamic-table %t | FileCheck --check-prefix=DT %s -# RUN: llvm-readelf -dyn-relocations %t | FileCheck --check-prefix=DYNREL %s +# RUN: ld.lld %t.o -o %t +# RUN: llvm-nm %t | FileCheck --check-prefix=NM %s +# RUN: llvm-readelf -S %t | FileCheck --check-prefix=SECTIONS %s +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s +# RUN: llvm-readelf -r %t | FileCheck --check-prefix=DYNREL %s -# CHECK: Disassembly of section .text: +# NM-DAG: 0000000010028000 d .TOC. +# NM-DAG: 0000000010010000 T ifunc +# NM-DAG: 0000000010010004 T ifunc2 -# Tocbase + (0 << 16) + 32560 -# 0x100280e0 + 0 + 32560 = 0x10030010 (.plt[2]) -# CHECK: __plt_foo: +# SECTIONS: .plt NOBITS 0000000010030000 + +# __plt_ifunc - . = 0x10010020 - 0x10010010 = 16 +# __plt_ifunc2 - . = 0x10010044 - 0x10010018 = 28 +# CHECK: _start: +# CHECK-NEXT: addis 2, 12, 1 +# CHECK-NEXT: addi 2, 2, 32760 +# CHECK-NEXT: 10010010: bl .+16 +# CHECK-NEXT: ld 2, 24(1) +# CHECK-NEXT: 10010018: bl .+28 +# CHECK-NEXT: ld 2, 24(1) + +# .plt[0] - .TOC. = 0x10030000 - 0x10028000 = (1<<16) - 32768 +# CHECK: __plt_ifunc: # CHECK-NEXT: std 2, 24(1) -# CHECK-NEXT: addis 12, 2, 0 -# CHECK-NEXT: ld 12, 32560(12) +# CHECK-NEXT: addis 12, 2, 1 +# CHECK-NEXT: ld 12, -32768(12) # CHECK-NEXT: mtctr 12 # CHECK-NEXT: bctr -# Tocbase + (0 << 16) + 32568 -# 0x100280e0 + 0 + 32568 = 0x1003018 (.plt[3]) -# CHECK: __plt_ifunc: +# .plt[1] - .TOC. = 0x10030000+8 - 0x10028000 = (1<<16) - 32760 +# CHECK: __plt_ifunc2: # CHECK-NEXT: std 2, 24(1) -# CHECK-NEXT: addis 12, 2, 0 -# CHECK-NEXT: ld 12, 32568(12) +# CHECK-NEXT: addis 12, 2, 1 +# CHECK-NEXT: ld 12, -32760(12) # CHECK-NEXT: mtctr 12 # CHECK-NEXT: bctr -# CHECK: ifunc: -# CHECK-NEXT: 10010028: {{.*}} nop +# Check that we emit 2 R_PPC64_IRELATIVE. +# DYNREL: R_PPC64_IRELATIVE 10010000 +# DYNREL: R_PPC64_IRELATIVE 10010004 -# CHECK: _start: -# CHECK-NEXT: addis 2, 12, 2 -# CHECK-NEXT: addi 2, 2, -32588 -# CHECK-NEXT: bl .+67108812 -# CHECK-NEXT: ld 2, 24(1) -# CHECK-NEXT: bl .+67108824 -# CHECK-NEXT: ld 2, 24(1) - -# Check tocbase -# CHECK: Disassembly of section .got: -# CHECK-NEXT: .got: -# CHECK-NEXT: 100200e0 - -# Check .plt address -# DT_PLTGOT should point to the start of the .plt section. -# DT: 0x0000000000000003 PLTGOT 0x10030000 - -# Check that we emit the correct dynamic relocation type for an ifunc -# DYNREL: 'PLT' relocation section at offset 0x{{[0-9a-f]+}} contains 48 bytes: -# 48 bytes --> 2 Elf64_Rela relocations -# DYNREL-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend -# DYNREL-NEXT: {{[0-9a-f]+}} {{[0-9a-f]+}} R_PPC64_JMP_SLOT {{0+}} foo + 0 -# DYNREL-NEXT: {{[0-9a-f]+}} {{[0-9a-f]+}} R_PPC64_IRELATIVE 10010028 - - - .text - .abiversion 2 - .type ifunc STT_GNU_IFUNC .globl ifunc ifunc: - nop + nop - .global _start - .type _start,@function +.type ifunc2 STT_GNU_IFUNC +.globl ifunc2 +ifunc2: + nop +.global _start +.type _start,@function + _start: .Lfunc_gep0: addis 2, 12, .TOC.-.Lfunc_gep0@ha addi 2, 2, .TOC.-.Lfunc_gep0@l .Lfunc_lep0: .localentry _start, .Lfunc_lep0-.Lfunc_gep0 - bl foo - nop bl ifunc + nop + bl ifunc2 nop Modified: vendor/lld/dist-release_80/test/ELF/ppc64-local-dynamic.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-local-dynamic.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-local-dynamic.s Tue Jun 11 18:17:23 2019 (r348942) @@ -113,7 +113,7 @@ k: // Dis: test: // Dis: addis 3, 2, 0 // Dis-NEXT: addi 3, 3, -32760 -// Dis-NEXT: bl .+67108804 +// Dis-NEXT: bl .+60 // Dis-NEXT: ld 2, 24(1) // Dis-NEXT: addis 3, 3, 0 // Dis-NEXT: lwa 3, -32768(3) Added: vendor/lld/dist-release_80/test/ELF/ppc64-local-entry.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/ELF/ppc64-local-entry.s Tue Jun 11 18:17:23 2019 (r348942) @@ -0,0 +1,47 @@ +# REQUIRES: ppc + +# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t +# RUN: ld.lld -r %t -o %t2 +# RUN: llvm-objdump -s -section=.symtab %t2 | FileCheck %s + +.text +.abiversion 2 +.globl _start +.p2align 2 +.type _start,@function + +_start: +.Lfunc_begin0: +.Lfunc_gep0: + addis 2, 12, .TOC.-.Lfunc_gep0@ha + addi 2, 2, .TOC.-.Lfunc_gep0@l +.Lfunc_lep0: + .localentry _start, .Lfunc_lep0-.Lfunc_gep0 + # The code below is not important, it just needs to access some + # global data or function, in order to use the TOC. + # In this case, it performs the following: + # g += 10; + # Also note that this code is not intended to be run, but only + # to check if the linker will preserve the localentry info. + addis 3, 2, g@toc@ha + addi 3, 3, g@toc@l + lwz 4, 0(3) + addi 4, 4, 10 + stw 4, 0(3) + blr + .long 0 + .quad 0 +.Lfunc_end0: + .size _start, .Lfunc_end0-.Lfunc_begin0 + + .type g,@object # @g + .lcomm g,4,4 + +// We expect the st_other byte to be 0x60: +// localentry = 011 (gep + 2 instructions), reserved = 000, +// visibility = 00 (STV_DEFAULT) +// Currently, llvm-objdump does not support displaying +// st_other's PPC64 specific flags, thus we check the +// result of the hexdump of .symtab section. + +// CHECK: 0070 00000000 00000000 00000009 12600001 Added: vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-init.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-init.s Tue Jun 11 18:17:23 2019 (r348942) @@ -0,0 +1,43 @@ +# REQUIRES: ppc + +# RUN: llvm-mc -filetype=obj -triple=powerpc64-pc-freebsd13.0 %s -o %t.o +# RUN: ld.lld %t.o -o %t +# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s + +## .init consists of sections from several object files. Sections other than the +## last one do not have a terminator. Check we do not create a long branch stub +## in the middle. +## We currently use thunk section spacing to ensure the stub is in the end. This +## is not foolproof but good enough to not break in practice. + +# CHECK: Disassembly of section .init: +# CHECK-LABEL: _init: +# CHECK: blr +# CHECK-EMPTY: +# CHECK-LABEL: __long_branch_foo: + +.globl foo +foo: + .space 0x2000000 + blr + +.section .init,"ax",@progbits,unique,0 +.globl _init +_init: + stdu 1, -48(1) + mflr 0 + std 0, 64(1) + +.section .init,"ax",@progbits,unique,1 + bl foo + nop + +.section .init,"ax",@progbits,unique,2 + bl foo + nop + +.section .init,"ax",@progbits,unique,3 + ld 1, 0(1) + ld 0, 16(1) + mtlr 0 + blr Modified: vendor/lld/dist-release_80/test/ELF/ppc64-plt-stub.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-plt-stub.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-plt-stub.s Tue Jun 11 18:17:23 2019 (r348942) @@ -4,16 +4,19 @@ // RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o // RUN: ld.lld -shared %t2.o -o %t2.so // RUN: ld.lld %t.o %t2.so -o %t -// RUN: llvm-objdump -d %t | FileCheck %s +// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o // RUN: ld.lld -shared %t2.o -o %t2.so // RUN: ld.lld %t.o %t2.so -o %t -// RUN: llvm-objdump -d %t | FileCheck %s +// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s // CHECK: Disassembly of section .text: -// CHECK-NEXT: __plt_foo: +// CHECK-NEXT: _start: +// CHECK: 10010008: bl .+16 + +// CHECK-LABEL: 0000000010010018 __plt_foo: // CHECK-NEXT: std 2, 24(1) // CHECK-NEXT: addis 12, 2, 0 // CHECK-NEXT: ld 12, 32560(12) @@ -21,8 +24,6 @@ // CHECK-NEXT: bctr -// CHECK: _start: -// CHECK: bl .+67108824 .text .abiversion 2 .globl _start Modified: vendor/lld/dist-release_80/test/ELF/ppc64-rel-calls.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-rel-calls.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-rel-calls.s Tue Jun 11 18:17:23 2019 (r348942) @@ -30,9 +30,8 @@ bar: nop blr -# FIXME: The printing here is misleading, the branch offset here is negative. -# CHECK: 1001000c: {{.*}} bl .+67108852 +# CHECK: 1001000c: {{.*}} bl .-12 # CHECK: 10010010: {{.*}} nop -# CHECK: 10010014: {{.*}} bl .+67108844 +# CHECK: 10010014: {{.*}} bl .-20 # CHECK: 10010018: {{.*}} nop # CHECK: 1001001c: {{.*}} blr Modified: vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore-recursive-call.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore-recursive-call.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore-recursive-call.s Tue Jun 11 18:17:23 2019 (r348942) @@ -1,8 +1,8 @@ # REQUIRES: ppc -# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t1.o -# RUN: ld.lld -shared %t1.o -o %t -# RUN: llvm-objdump -d -r %t | FileCheck %s +# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o +# RUN: ld.lld -shared %t.o -o %t.so +# RUN: llvm-objdump -d --no-show-raw-insn -r %t.so | FileCheck %s # For a recursive call that is interposable the linker calls the plt-stub rather # then calling the function directly. Since the call is through a plt stub and @@ -14,12 +14,11 @@ # for recursive calls as well as keeps the logic for recursive calls consistent # with non-recursive calls. -# CHECK-LABEL: __plt_recursive_func: -# CHECK-NEXT: 10000: -# CHECK-LABEL: recursive_func -# CHECK-NEXT: 10014: -# CHECK: 1003c: {{[0-9a-fA-F ]+}} bl .+67108804 -# CHECK-NEXT: ld 2, 24(1) +# CHECK-LABEL: 0000000000010000 recursive_func: +# CHECK: 10028: bl .+32 +# CHECK-NEXT: ld 2, 24(1) + +# CHECK-LABEL: 0000000000010048 __plt_recursive_func: .abiversion 2 .section ".text" Modified: vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore.s ============================================================================== --- vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore.s Tue Jun 11 18:17:19 2019 (r348941) +++ vendor/lld/dist-release_80/test/ELF/ppc64-toc-restore.s Tue Jun 11 18:17:23 2019 (r348942) @@ -5,14 +5,14 @@ // RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/ppc64-func.s -o %t3.o // RUN: ld.lld -shared %t2.o -o %t2.so // RUN: ld.lld %t.o %t2.so %t3.o -o %t -// RUN: llvm-objdump -d %t | FileCheck %s +// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-func.s -o %t3.o // RUN: ld.lld -shared %t2.o -o %t2.so // RUN: ld.lld %t.o %t2.so %t3.o -o %t -// RUN: llvm-objdump -d %t | FileCheck %s +// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s .text .abiversion 2 @@ -28,17 +28,12 @@ _start: bl foo nop bl bar_local +// CHECK-LABEL: _start: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2818C15C228D; Tue, 11 Jun 2019 18:17:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6AFD707E3; Tue, 11 Jun 2019 18:17: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 B63C15696; Tue, 11 Jun 2019 18:17:32 +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 x5BIHWLp037861; Tue, 11 Jun 2019 18:17:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHWfn037860; Tue, 11 Jun 2019 18:17:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHWfn037860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348943 - vendor/lld/lld-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release80-r363030 X-SVN-Commit-Revision: 348943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A6AFD707E3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:37 -0000 Author: dim Date: Tue Jun 11 18:17:32 2019 New Revision: 348943 URL: https://svnweb.freebsd.org/changeset/base/348943 Log: Tag lld release_80 branch r363030. Added: vendor/lld/lld-release80-r363030/ - copied from r348942, vendor/lld/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB46E15C22D7; Tue, 11 Jun 2019 18:17:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B28870897; Tue, 11 Jun 2019 18:17:42 +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 BDC875697; Tue, 11 Jun 2019 18:17:39 +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 x5BIHdOP037917; Tue, 11 Jun 2019 18:17:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHcEA037910; Tue, 11 Jun 2019 18:17:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHcEA037910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348944 - in vendor/lldb/dist-release_80: lit lit/SymbolFile/NativePDB lit/helper lit/tools/lldb-mi source/Plugins/Process/Linux X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist-release_80: lit lit/SymbolFile/NativePDB lit/helper lit/tools/lldb-mi source/Plugins/Process/Linux X-SVN-Commit-Revision: 348944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B28870897 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:43 -0000 Author: dim Date: Tue Jun 11 18:17:38 2019 New Revision: 348944 URL: https://svnweb.freebsd.org/changeset/base/348944 Log: Vendor import of lldb release_80 branch r363030: https://llvm.org/svn/llvm-project/lldb/branches/release_80@363030 Added: vendor/lldb/dist-release_80/lit/tools/lldb-mi/lit.local.cfg Modified: vendor/lldb/dist-release_80/lit/SymbolFile/NativePDB/globals-fundamental.cpp vendor/lldb/dist-release_80/lit/helper/build.py vendor/lldb/dist-release_80/lit/helper/toolchain.py vendor/lldb/dist-release_80/lit/lit.site.cfg.py.in vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Modified: vendor/lldb/dist-release_80/lit/SymbolFile/NativePDB/globals-fundamental.cpp ============================================================================== --- vendor/lldb/dist-release_80/lit/SymbolFile/NativePDB/globals-fundamental.cpp Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/lit/SymbolFile/NativePDB/globals-fundamental.cpp Tue Jun 11 18:17:38 2019 (r348944) @@ -1,5 +1,5 @@ // clang-format off -// REQUIRES: lld +// REQUIRES: lld, python // Test that we can display tag types. // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s Modified: vendor/lldb/dist-release_80/lit/helper/build.py ============================================================================== --- vendor/lldb/dist-release_80/lit/helper/build.py Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/lit/helper/build.py Tue Jun 11 18:17:38 2019 (r348944) @@ -283,19 +283,17 @@ class MsvcBuilder(Builder): print('Using alternate compiler "{0}" to match selected target.'.format(self.compiler)) if self.mode == 'link' or self.mode == 'compile-and-link': - self.linker = self._find_linker('link') if toolchain_type == 'msvc' else self._find_linker('lld-link') + self.linker = self._find_linker('link') if toolchain_type == 'msvc' else self._find_linker('lld-link', args.tools_dir) if not self.linker: raise ValueError('Unable to find an appropriate linker.') self.compile_env, self.link_env = self._get_visual_studio_environment() - def _find_linker(self, name): - if sys.platform == 'win32': - name = name + '.exe' + def _find_linker(self, name, search_paths=[]): compiler_dir = os.path.dirname(self.compiler) - linker_path = os.path.join(compiler_dir, name) - if not os.path.exists(linker_path): - raise ValueError('Could not find \'{}\''.format(linker_path)) + linker_path = find_executable(name, [compiler_dir] + search_paths) + if linker_path is None: + raise ValueError('Could not find \'{}\''.format(name)) return linker_path def _get_vc_install_dir(self): Modified: vendor/lldb/dist-release_80/lit/helper/toolchain.py ============================================================================== --- vendor/lldb/dist-release_80/lit/helper/toolchain.py Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/lit/helper/toolchain.py Tue Jun 11 18:17:38 2019 (r348944) @@ -51,7 +51,8 @@ def use_lldb_substitutions(config): llvm_config.add_tool_substitutions(primary_tools, [config.lldb_tools_dir]) - if lldbmi.was_resolved: + # lldb-mi always fails without Python support + if lldbmi.was_resolved and not config.lldb_disable_python: config.available_features.add('lldb-mi') def _use_msvc_substitutions(config): Modified: vendor/lldb/dist-release_80/lit/lit.site.cfg.py.in ============================================================================== --- vendor/lldb/dist-release_80/lit/lit.site.cfg.py.in Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/lit/lit.site.cfg.py.in Tue Jun 11 18:17:38 2019 (r348944) @@ -17,6 +17,7 @@ config.python_executable = "@PYTHON_EXECUTABLE@" config.have_zlib = @LLVM_ENABLE_ZLIB@ config.host_triple = "@LLVM_HOST_TRIPLE@" config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32 +config.lldb_disable_python = @LLDB_DISABLE_PYTHON@ # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. Added: vendor/lldb/dist-release_80/lit/tools/lldb-mi/lit.local.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist-release_80/lit/tools/lldb-mi/lit.local.cfg Tue Jun 11 18:17:38 2019 (r348944) @@ -0,0 +1,2 @@ +if not "lldb-mi" in config.available_features: + config.unsupported = True Modified: vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp ============================================================================== --- vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Tue Jun 11 18:17:38 2019 (r348944) @@ -19,9 +19,26 @@ #include "Plugins/Process/Utility/RegisterContextLinux_i386.h" #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h" - +#include #include +// Newer toolchains define __get_cpuid_count in cpuid.h, but some +// older-but-still-supported ones (e.g. gcc 5.4.0) don't, so we +// define it locally here, following the definition in clang/lib/Headers. +static inline int get_cpuid_count(unsigned int __leaf, + unsigned int __subleaf, + unsigned int *__eax, unsigned int *__ebx, + unsigned int *__ecx, unsigned int *__edx) +{ + unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0); + + if (__max_leaf == 0 || __max_leaf < __leaf) + return 0; + + __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx); + return 1; +} + using namespace lldb_private; using namespace lldb_private::process_linux; @@ -268,12 +285,29 @@ CreateRegisterInfoInterface(const ArchSpec &target_arc } } +// Return the size of the XSTATE area supported on this cpu. It is necessary to +// allocate the full size of the area even if we do not use/recognise all of it +// because ptrace(PTRACE_SETREGSET, NT_X86_XSTATE) will refuse to write to it if +// we do not pass it a buffer of sufficient size. The size is always at least +// sizeof(FPR) so that the allocated buffer can be safely cast to FPR*. +static std::size_t GetXSTATESize() { + unsigned int eax, ebx, ecx, edx; + // First check whether the XSTATE are is supported at all. + if (!__get_cpuid(1, &eax, &ebx, &ecx, &edx) || !(ecx & bit_XSAVE)) + return sizeof(FPR); + + // Then fetch the maximum size of the area. + if (!get_cpuid_count(0x0d, 0, &eax, &ebx, &ecx, &edx)) + return sizeof(FPR); + return std::max(ecx, sizeof(FPR)); +} + NativeRegisterContextLinux_x86_64::NativeRegisterContextLinux_x86_64( const ArchSpec &target_arch, NativeThreadProtocol &native_thread) : NativeRegisterContextLinux(native_thread, CreateRegisterInfoInterface(target_arch)), - m_xstate_type(XStateType::Invalid), m_fpr(), m_iovec(), m_ymm_set(), - m_mpx_set(), m_reg_info(), m_gpr_x86_64() { + m_xstate_type(XStateType::Invalid), m_ymm_set(), m_mpx_set(), + m_reg_info(), m_gpr_x86_64() { // Set up data about ranges of valid registers. switch (target_arch.GetMachine()) { case llvm::Triple::x86: @@ -329,14 +363,13 @@ NativeRegisterContextLinux_x86_64::NativeRegisterConte break; } - // Initialize m_iovec to point to the buffer and buffer size using the - // conventions of Berkeley style UIO structures, as required by PTRACE - // extensions. - m_iovec.iov_base = &m_fpr; - m_iovec.iov_len = sizeof(m_fpr); + std::size_t xstate_size = GetXSTATESize(); + m_xstate.reset(static_cast(std::malloc(xstate_size))); + m_iovec.iov_base = m_xstate.get(); + m_iovec.iov_len = xstate_size; // Clear out the FPR state. - ::memset(&m_fpr, 0, sizeof(m_fpr)); + ::memset(m_xstate.get(), 0, xstate_size); // Store byte offset of fctrl (i.e. first register of FPR) const RegisterInfo *reg_info_fctrl = GetRegisterInfoByName("fctrl"); @@ -439,14 +472,17 @@ NativeRegisterContextLinux_x86_64::ReadRegister(const if (byte_order != lldb::eByteOrderInvalid) { if (reg >= m_reg_info.first_st && reg <= m_reg_info.last_st) - reg_value.SetBytes(m_fpr.fxsave.stmm[reg - m_reg_info.first_st].bytes, - reg_info->byte_size, byte_order); + reg_value.SetBytes( + m_xstate->fxsave.stmm[reg - m_reg_info.first_st].bytes, + reg_info->byte_size, byte_order); if (reg >= m_reg_info.first_mm && reg <= m_reg_info.last_mm) - reg_value.SetBytes(m_fpr.fxsave.stmm[reg - m_reg_info.first_mm].bytes, - reg_info->byte_size, byte_order); + reg_value.SetBytes( + m_xstate->fxsave.stmm[reg - m_reg_info.first_mm].bytes, + reg_info->byte_size, byte_order); if (reg >= m_reg_info.first_xmm && reg <= m_reg_info.last_xmm) - reg_value.SetBytes(m_fpr.fxsave.xmm[reg - m_reg_info.first_xmm].bytes, - reg_info->byte_size, byte_order); + reg_value.SetBytes( + m_xstate->fxsave.xmm[reg - m_reg_info.first_xmm].bytes, + reg_info->byte_size, byte_order); if (reg >= m_reg_info.first_ymm && reg <= m_reg_info.last_ymm) { // Concatenate ymm using the register halves in xmm.bytes and // ymmh.bytes @@ -488,7 +524,7 @@ NativeRegisterContextLinux_x86_64::ReadRegister(const return error; } - // Get pointer to m_fpr.fxsave variable and set the data from it. + // Get pointer to m_xstate->fxsave variable and set the data from it. // Byte offsets of all registers are calculated wrt 'UserArea' structure. // However, ReadFPR() reads fpu registers {using ptrace(PTRACE_GETFPREGS,..)} @@ -499,9 +535,9 @@ NativeRegisterContextLinux_x86_64::ReadRegister(const // Since, FPR structure is also one of the member of UserArea structure. // byte_offset(fpu wrt FPR) = byte_offset(fpu wrt UserArea) - // byte_offset(fctrl wrt UserArea) - assert((reg_info->byte_offset - m_fctrl_offset_in_userarea) < sizeof(m_fpr)); - uint8_t *src = - (uint8_t *)&m_fpr + reg_info->byte_offset - m_fctrl_offset_in_userarea; + assert((reg_info->byte_offset - m_fctrl_offset_in_userarea) < sizeof(FPR)); + uint8_t *src = (uint8_t *)m_xstate.get() + reg_info->byte_offset - + m_fctrl_offset_in_userarea; switch (reg_info->byte_size) { case 1: reg_value.SetUInt8(*(uint8_t *)src); @@ -527,7 +563,7 @@ NativeRegisterContextLinux_x86_64::ReadRegister(const void NativeRegisterContextLinux_x86_64::UpdateXSTATEforWrite( uint32_t reg_index) { - XSAVE_HDR::XFeature &xstate_bv = m_fpr.xsave.header.xstate_bv; + XSAVE_HDR::XFeature &xstate_bv = m_xstate->xsave.header.xstate_bv; if (IsFPR(reg_index)) { // IsFPR considers both %st and %xmm registers as floating point, but these // map to two features. Set both flags, just in case. @@ -559,15 +595,15 @@ Status NativeRegisterContextLinux_x86_64::WriteRegiste if (IsFPR(reg_index) || IsAVX(reg_index) || IsMPX(reg_index)) { if (reg_info->encoding == lldb::eEncodingVector) { if (reg_index >= m_reg_info.first_st && reg_index <= m_reg_info.last_st) - ::memcpy(m_fpr.fxsave.stmm[reg_index - m_reg_info.first_st].bytes, + ::memcpy(m_xstate->fxsave.stmm[reg_index - m_reg_info.first_st].bytes, reg_value.GetBytes(), reg_value.GetByteSize()); if (reg_index >= m_reg_info.first_mm && reg_index <= m_reg_info.last_mm) - ::memcpy(m_fpr.fxsave.stmm[reg_index - m_reg_info.first_mm].bytes, + ::memcpy(m_xstate->fxsave.stmm[reg_index - m_reg_info.first_mm].bytes, reg_value.GetBytes(), reg_value.GetByteSize()); if (reg_index >= m_reg_info.first_xmm && reg_index <= m_reg_info.last_xmm) - ::memcpy(m_fpr.fxsave.xmm[reg_index - m_reg_info.first_xmm].bytes, + ::memcpy(m_xstate->fxsave.xmm[reg_index - m_reg_info.first_xmm].bytes, reg_value.GetBytes(), reg_value.GetByteSize()); if (reg_index >= m_reg_info.first_ymm && @@ -596,7 +632,7 @@ Status NativeRegisterContextLinux_x86_64::WriteRegiste return Status("CopyMPXtoXSTATE() failed"); } } else { - // Get pointer to m_fpr.fxsave variable and set the data to it. + // Get pointer to m_xstate->fxsave variable and set the data to it. // Byte offsets of all registers are calculated wrt 'UserArea' structure. // However, WriteFPR() takes m_fpr (of type FPR structure) and writes @@ -608,8 +644,8 @@ Status NativeRegisterContextLinux_x86_64::WriteRegiste // byte_offset(fpu wrt FPR) = byte_offset(fpu wrt UserArea) - // byte_offset(fctrl wrt UserArea) assert((reg_info->byte_offset - m_fctrl_offset_in_userarea) < - sizeof(m_fpr)); - uint8_t *dst = (uint8_t *)&m_fpr + reg_info->byte_offset - + sizeof(FPR)); + uint8_t *dst = (uint8_t *)m_xstate.get() + reg_info->byte_offset - m_fctrl_offset_in_userarea; switch (reg_info->byte_size) { case 1: @@ -667,7 +703,7 @@ Status NativeRegisterContextLinux_x86_64::ReadAllRegis ::memcpy(dst, &m_gpr_x86_64, GetRegisterInfoInterface().GetGPRSize()); dst += GetRegisterInfoInterface().GetGPRSize(); if (m_xstate_type == XStateType::FXSAVE) - ::memcpy(dst, &m_fpr.fxsave, sizeof(m_fpr.fxsave)); + ::memcpy(dst, &m_xstate->fxsave, sizeof(m_xstate->fxsave)); else if (m_xstate_type == XStateType::XSAVE) { lldb::ByteOrder byte_order = GetByteOrder(); @@ -700,7 +736,7 @@ Status NativeRegisterContextLinux_x86_64::ReadAllRegis } } // Copy the extended register state including the assembled ymm registers. - ::memcpy(dst, &m_fpr, sizeof(m_fpr)); + ::memcpy(dst, m_xstate.get(), sizeof(FPR)); } else { assert(false && "how do we save the floating point registers?"); error.SetErrorString("unsure how to save the floating point registers"); @@ -758,9 +794,9 @@ Status NativeRegisterContextLinux_x86_64::WriteAllRegi src += GetRegisterInfoInterface().GetGPRSize(); if (m_xstate_type == XStateType::FXSAVE) - ::memcpy(&m_fpr.fxsave, src, sizeof(m_fpr.fxsave)); + ::memcpy(&m_xstate->fxsave, src, sizeof(m_xstate->fxsave)); else if (m_xstate_type == XStateType::XSAVE) - ::memcpy(&m_fpr.xsave, src, sizeof(m_fpr.xsave)); + ::memcpy(&m_xstate->xsave, src, sizeof(m_xstate->xsave)); error = WriteFPR(); if (error.Fail()) @@ -814,12 +850,12 @@ bool NativeRegisterContextLinux_x86_64::IsCPUFeatureAv return true; case RegSet::avx: // Check if CPU has AVX and if there is kernel support, by // reading in the XCR0 area of XSAVE. - if ((m_fpr.xsave.i387.xcr0 & mask_XSTATE_AVX) == mask_XSTATE_AVX) + if ((m_xstate->xsave.i387.xcr0 & mask_XSTATE_AVX) == mask_XSTATE_AVX) return true; break; case RegSet::mpx: // Check if CPU has MPX and if there is kernel support, by // reading in the XCR0 area of XSAVE. - if ((m_fpr.xsave.i387.xcr0 & mask_XSTATE_MPX) == mask_XSTATE_MPX) + if ((m_xstate->xsave.i387.xcr0 & mask_XSTATE_MPX) == mask_XSTATE_MPX) return true; break; } @@ -856,10 +892,10 @@ Status NativeRegisterContextLinux_x86_64::WriteFPR() { switch (m_xstate_type) { case XStateType::FXSAVE: return WriteRegisterSet( - &m_iovec, sizeof(m_fpr.fxsave), + &m_iovec, sizeof(m_xstate->fxsave), fxsr_regset(GetRegisterInfoInterface().GetTargetArchitecture())); case XStateType::XSAVE: - return WriteRegisterSet(&m_iovec, sizeof(m_fpr.xsave), NT_X86_XSTATE); + return WriteRegisterSet(&m_iovec, sizeof(m_xstate->xsave), NT_X86_XSTATE); default: return Status("Unrecognized FPR type."); } @@ -879,11 +915,11 @@ bool NativeRegisterContextLinux_x86_64::CopyXSTATEtoYM if (byte_order == lldb::eByteOrderLittle) { ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes, - m_fpr.fxsave.xmm[reg_index - m_reg_info.first_ymm].bytes, + m_xstate->fxsave.xmm[reg_index - m_reg_info.first_ymm].bytes, sizeof(XMMReg)); ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes + sizeof(XMMReg), - m_fpr.xsave.ymmh[reg_index - m_reg_info.first_ymm].bytes, + m_xstate->xsave.ymmh[reg_index - m_reg_info.first_ymm].bytes, sizeof(YMMHReg)); return true; } @@ -891,10 +927,10 @@ bool NativeRegisterContextLinux_x86_64::CopyXSTATEtoYM if (byte_order == lldb::eByteOrderBig) { ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes + sizeof(XMMReg), - m_fpr.fxsave.xmm[reg_index - m_reg_info.first_ymm].bytes, + m_xstate->fxsave.xmm[reg_index - m_reg_info.first_ymm].bytes, sizeof(XMMReg)); ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes, - m_fpr.xsave.ymmh[reg_index - m_reg_info.first_ymm].bytes, + m_xstate->xsave.ymmh[reg_index - m_reg_info.first_ymm].bytes, sizeof(YMMHReg)); return true; } @@ -907,19 +943,19 @@ bool NativeRegisterContextLinux_x86_64::CopyYMMtoXSTAT return false; if (byte_order == lldb::eByteOrderLittle) { - ::memcpy(m_fpr.fxsave.xmm[reg - m_reg_info.first_ymm].bytes, + ::memcpy(m_xstate->fxsave.xmm[reg - m_reg_info.first_ymm].bytes, m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes, sizeof(XMMReg)); - ::memcpy(m_fpr.xsave.ymmh[reg - m_reg_info.first_ymm].bytes, + ::memcpy(m_xstate->xsave.ymmh[reg - m_reg_info.first_ymm].bytes, m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg), sizeof(YMMHReg)); return true; } if (byte_order == lldb::eByteOrderBig) { - ::memcpy(m_fpr.fxsave.xmm[reg - m_reg_info.first_ymm].bytes, + ::memcpy(m_xstate->fxsave.xmm[reg - m_reg_info.first_ymm].bytes, m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes + sizeof(XMMReg), sizeof(XMMReg)); - ::memcpy(m_fpr.xsave.ymmh[reg - m_reg_info.first_ymm].bytes, + ::memcpy(m_xstate->xsave.ymmh[reg - m_reg_info.first_ymm].bytes, m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes, sizeof(YMMHReg)); return true; } @@ -929,7 +965,7 @@ bool NativeRegisterContextLinux_x86_64::CopyYMMtoXSTAT void *NativeRegisterContextLinux_x86_64::GetFPRBuffer() { switch (m_xstate_type) { case XStateType::FXSAVE: - return &m_fpr.fxsave; + return &m_xstate->fxsave; case XStateType::XSAVE: return &m_iovec; default: @@ -940,7 +976,7 @@ void *NativeRegisterContextLinux_x86_64::GetFPRBuffer( size_t NativeRegisterContextLinux_x86_64::GetFPRSize() { switch (m_xstate_type) { case XStateType::FXSAVE: - return sizeof(m_fpr.fxsave); + return sizeof(m_xstate->fxsave); case XStateType::XSAVE: return sizeof(m_iovec); default: @@ -953,14 +989,14 @@ Status NativeRegisterContextLinux_x86_64::ReadFPR() { // Probe XSAVE and if it is not supported fall back to FXSAVE. if (m_xstate_type != XStateType::FXSAVE) { - error = ReadRegisterSet(&m_iovec, sizeof(m_fpr.xsave), NT_X86_XSTATE); + error = ReadRegisterSet(&m_iovec, sizeof(m_xstate->xsave), NT_X86_XSTATE); if (!error.Fail()) { m_xstate_type = XStateType::XSAVE; return error; } } error = ReadRegisterSet( - &m_iovec, sizeof(m_fpr.xsave), + &m_iovec, sizeof(m_xstate->xsave), fxsr_regset(GetRegisterInfoInterface().GetTargetArchitecture())); if (!error.Fail()) { m_xstate_type = XStateType::FXSAVE; @@ -982,11 +1018,11 @@ bool NativeRegisterContextLinux_x86_64::CopyXSTATEtoMP if (reg >= m_reg_info.first_mpxr && reg <= m_reg_info.last_mpxr) { ::memcpy(m_mpx_set.mpxr[reg - m_reg_info.first_mpxr].bytes, - m_fpr.xsave.mpxr[reg - m_reg_info.first_mpxr].bytes, + m_xstate->xsave.mpxr[reg - m_reg_info.first_mpxr].bytes, sizeof(MPXReg)); } else { ::memcpy(m_mpx_set.mpxc[reg - m_reg_info.first_mpxc].bytes, - m_fpr.xsave.mpxc[reg - m_reg_info.first_mpxc].bytes, + m_xstate->xsave.mpxc[reg - m_reg_info.first_mpxc].bytes, sizeof(MPXCsr)); } return true; @@ -997,10 +1033,10 @@ bool NativeRegisterContextLinux_x86_64::CopyMPXtoXSTAT return false; if (reg >= m_reg_info.first_mpxr && reg <= m_reg_info.last_mpxr) { - ::memcpy(m_fpr.xsave.mpxr[reg - m_reg_info.first_mpxr].bytes, + ::memcpy(m_xstate->xsave.mpxr[reg - m_reg_info.first_mpxr].bytes, m_mpx_set.mpxr[reg - m_reg_info.first_mpxr].bytes, sizeof(MPXReg)); } else { - ::memcpy(m_fpr.xsave.mpxc[reg - m_reg_info.first_mpxc].bytes, + ::memcpy(m_xstate->xsave.mpxc[reg - m_reg_info.first_mpxc].bytes, m_mpx_set.mpxc[reg - m_reg_info.first_mpxc].bytes, sizeof(MPXCsr)); } return true; Modified: vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h ============================================================================== --- vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Tue Jun 11 18:17:32 2019 (r348943) +++ vendor/lldb/dist-release_80/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Tue Jun 11 18:17:38 2019 (r348944) @@ -109,7 +109,8 @@ class NativeRegisterContextLinux_x86_64 : public Nativ // Private member variables. mutable XStateType m_xstate_type; - FPR m_fpr; // Extended States Area, named FPR for historical reasons. + std::unique_ptr + m_xstate; // Extended States Area, named FPR for historical reasons. struct iovec m_iovec; YMM m_ymm_set; MPX m_mpx_set; From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDD4C15C2322; Tue, 11 Jun 2019 18:17:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4657D7095F; Tue, 11 Jun 2019 18:17:48 +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 7969F5699; Tue, 11 Jun 2019 18:17:45 +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 x5BIHjmx038012; Tue, 11 Jun 2019 18:17:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHjKG038011; Tue, 11 Jun 2019 18:17:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHjKG038011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348946 - vendor/llvm-openmp/openmp-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-release80-r363030 X-SVN-Commit-Revision: 348946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4657D7095F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:48 -0000 Author: dim Date: Tue Jun 11 18:17:45 2019 New Revision: 348946 URL: https://svnweb.freebsd.org/changeset/base/348946 Log: Tag LLVM openmp release_80 branch r363030. Added: vendor/llvm-openmp/openmp-release80-r363030/ - copied from r348945, vendor/llvm-openmp/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:17:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50DAB15C231A; Tue, 11 Jun 2019 18:17:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0ACD70952; Tue, 11 Jun 2019 18:17:47 +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 ADEFE5698; Tue, 11 Jun 2019 18:17:42 +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 x5BIHgn5037966; Tue, 11 Jun 2019 18:17:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIHg1U037965; Tue, 11 Jun 2019 18:17:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111817.x5BIHg1U037965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348945 - vendor/lldb/lldb-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release80-r363030 X-SVN-Commit-Revision: 348945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D0ACD70952 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:17:48 -0000 Author: dim Date: Tue Jun 11 18:17:42 2019 New Revision: 348945 URL: https://svnweb.freebsd.org/changeset/base/348945 Log: Tag lldb release_80 branch r363030. Added: vendor/lldb/lldb-release80-r363030/ - copied from r348944, vendor/lldb/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:56:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F39E015C3ACE; Tue, 11 Jun 2019 18:56:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ACE672B09; Tue, 11 Jun 2019 18:56:44 +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 5D9F85D4C; Tue, 11 Jun 2019 18:56:44 +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 x5BIui0c058939; Tue, 11 Jun 2019 18:56:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIuiug058938; Tue, 11 Jun 2019 18:56:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIuiug058938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348947 - vendor/llvm/llvm-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release80-r363030 X-SVN-Commit-Revision: 348947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9ACE672B09 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:56:45 -0000 Author: dim Date: Tue Jun 11 18:56:43 2019 New Revision: 348947 URL: https://svnweb.freebsd.org/changeset/base/348947 Log: Remove misspelled tag llvm-release80-r363030. Deleted: vendor/llvm/llvm-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:56:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F52F15C3AF5; Tue, 11 Jun 2019 18:56:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB56072B1A; Tue, 11 Jun 2019 18:56:47 +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 AFC235D4D; Tue, 11 Jun 2019 18:56:47 +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 x5BIulKX058988; Tue, 11 Jun 2019 18:56:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIulRr058987; Tue, 11 Jun 2019 18:56:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIulRr058987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348948 - vendor/llvm/llvm-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_80-r363030 X-SVN-Commit-Revision: 348948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB56072B1A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:56:48 -0000 Author: dim Date: Tue Jun 11 18:56:47 2019 New Revision: 348948 URL: https://svnweb.freebsd.org/changeset/base/348948 Log: Tag llvm release_80 branch r363030. Added: vendor/llvm/llvm-release_80-r363030/ - copied from r348947, vendor/llvm/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:56:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75A4E15C3B1A; Tue, 11 Jun 2019 18:56:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18EE672BC9; Tue, 11 Jun 2019 18:56:54 +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 2D5625D4E; Tue, 11 Jun 2019 18:56:50 +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 x5BIuo0m059034; Tue, 11 Jun 2019 18:56:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIuo3c059033; Tue, 11 Jun 2019 18:56:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIuo3c059033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348949 - vendor/clang/clang-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release80-r363030 X-SVN-Commit-Revision: 348949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18EE672BC9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:56:54 -0000 Author: dim Date: Tue Jun 11 18:56:49 2019 New Revision: 348949 URL: https://svnweb.freebsd.org/changeset/base/348949 Log: Remove misspelled tag clang-release80-r363030. Deleted: vendor/clang/clang-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1698815C3B3D; Tue, 11 Jun 2019 18:57:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4C172CAB; Tue, 11 Jun 2019 18:57:05 +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 B140A5D50; Tue, 11 Jun 2019 18:56:55 +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 x5BIut3t059129; Tue, 11 Jun 2019 18:56:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIut6l059128; Tue, 11 Jun 2019 18:56:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIut6l059128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348951 - vendor/compiler-rt/compiler-rt-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release80-r363030 X-SVN-Commit-Revision: 348951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2B4C172CAB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:08 -0000 Author: dim Date: Tue Jun 11 18:56:55 2019 New Revision: 348951 URL: https://svnweb.freebsd.org/changeset/base/348951 Log: Remove misspelled tag compiler-rt-release80-r363030. Deleted: vendor/compiler-rt/compiler-rt-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 131D915C3B3C; Tue, 11 Jun 2019 18:57:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD9C472C58; Tue, 11 Jun 2019 18:57:02 +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 150155D4F; Tue, 11 Jun 2019 18:56:53 +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 x5BIuqht059083; Tue, 11 Jun 2019 18:56:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIuqM6059082; Tue, 11 Jun 2019 18:56:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIuqM6059082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348950 - vendor/clang/clang-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_80-r363030 X-SVN-Commit-Revision: 348950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD9C472C58 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:08 -0000 Author: dim Date: Tue Jun 11 18:56:52 2019 New Revision: 348950 URL: https://svnweb.freebsd.org/changeset/base/348950 Log: Tag clang release_80 branch r363030. Added: vendor/clang/clang-release_80-r363030/ - copied from r348949, vendor/clang/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A42F15C3BBB; Tue, 11 Jun 2019 18:57:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A944672D8D; Tue, 11 Jun 2019 18:57:13 +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 DBB6D5D56; Tue, 11 Jun 2019 18:57:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BIvBbV059418; Tue, 11 Jun 2019 18:57:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvBIu059417; Tue, 11 Jun 2019 18:57:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvBIu059417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348957 - vendor/lld/lld-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release80-r363030 X-SVN-Commit-Revision: 348957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A944672D8D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:14 -0000 Author: dim Date: Tue Jun 11 18:57:11 2019 New Revision: 348957 URL: https://svnweb.freebsd.org/changeset/base/348957 Log: Remove misspelled tag lld-release80-r363030. Deleted: vendor/lld/lld-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E05C15C3B68; Tue, 11 Jun 2019 18:57:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BDA272CEC; Tue, 11 Jun 2019 18:57: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 0E2595D53; Tue, 11 Jun 2019 18:57:04 +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 x5BIv3Uj059274; Tue, 11 Jun 2019 18:57:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIv3rO059273; Tue, 11 Jun 2019 18:57:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIv3rO059273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348954 - vendor/libc++/libc++-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_80-r363030 X-SVN-Commit-Revision: 348954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BDA272CEC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:10 -0000 Author: dim Date: Tue Jun 11 18:57:03 2019 New Revision: 348954 URL: https://svnweb.freebsd.org/changeset/base/348954 Log: Tag libc++ release_80 branch r363030. Added: vendor/libc++/libc++-release_80-r363030/ - copied from r348953, vendor/libc++/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FD6215C3B54; Tue, 11 Jun 2019 18:57:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1061972CD9; Tue, 11 Jun 2019 18:57: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 0A8D05D52; Tue, 11 Jun 2019 18:57:01 +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 x5BIv0sT059228; Tue, 11 Jun 2019 18:57:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIv0Hb059227; Tue, 11 Jun 2019 18:57:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIv0Hb059227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348953 - vendor/libc++/libc++-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release80-r363030 X-SVN-Commit-Revision: 348953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1061972CD9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:10 -0000 Author: dim Date: Tue Jun 11 18:57:00 2019 New Revision: 348953 URL: https://svnweb.freebsd.org/changeset/base/348953 Log: Remove misspelled tag libc++-release80-r363030. Deleted: vendor/libc++/libc++-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D58515C3B53; Tue, 11 Jun 2019 18:57:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC1A72CC6; Tue, 11 Jun 2019 18:57:06 +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 60A4F5D51; Tue, 11 Jun 2019 18:56:58 +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 x5BIuwTN059177; Tue, 11 Jun 2019 18:56:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIuwLS059176; Tue, 11 Jun 2019 18:56:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111856.x5BIuwLS059176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348952 - vendor/compiler-rt/compiler-rt-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_80-r363030 X-SVN-Commit-Revision: 348952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CC1A72CC6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:10 -0000 Author: dim Date: Tue Jun 11 18:56:57 2019 New Revision: 348952 URL: https://svnweb.freebsd.org/changeset/base/348952 Log: Tag compiler-rt release_80 branch r363030. Added: vendor/compiler-rt/compiler-rt-release_80-r363030/ - copied from r348951, vendor/compiler-rt/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9716A15C3C22; Tue, 11 Jun 2019 18:57:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12ABA72E51; Tue, 11 Jun 2019 18: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 772CF5D58; Tue, 11 Jun 2019 18:57:17 +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 x5BIvHxe059513; Tue, 11 Jun 2019 18:57:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvHIc059512; Tue, 11 Jun 2019 18:57:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvHIc059512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348959 - vendor/lldb/lldb-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release80-r363030 X-SVN-Commit-Revision: 348959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12ABA72E51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:20 -0000 Author: dim Date: Tue Jun 11 18:57:17 2019 New Revision: 348959 URL: https://svnweb.freebsd.org/changeset/base/348959 Log: Remove misspelled tag lldb-release80-r363030. Deleted: vendor/lldb/lldb-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C96F15C3B87; Tue, 11 Jun 2019 18:57:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9056872D1A; Tue, 11 Jun 2019 18:57:09 +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 469725D55; Tue, 11 Jun 2019 18:57:09 +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 x5BIv9Rc059369; Tue, 11 Jun 2019 18:57:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIv9FY059368; Tue, 11 Jun 2019 18:57:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIv9FY059368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348956 - vendor/llvm-libunwind/libunwind-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/libunwind-release_80-r363030 X-SVN-Commit-Revision: 348956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9056872D1A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:11 -0000 Author: dim Date: Tue Jun 11 18:57:08 2019 New Revision: 348956 URL: https://svnweb.freebsd.org/changeset/base/348956 Log: Tag LLVM libunwind release_80 branch r363030. Added: vendor/llvm-libunwind/libunwind-release_80-r363030/ - copied from r348955, vendor/llvm-libunwind/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E33615C3B69; Tue, 11 Jun 2019 18:57:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A72AA72CED; Tue, 11 Jun 2019 18:57: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 754FA5D54; Tue, 11 Jun 2019 18:57:06 +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 x5BIv6Ra059323; Tue, 11 Jun 2019 18:57:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIv6Gp059322; Tue, 11 Jun 2019 18:57:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIv6Gp059322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348955 - vendor/llvm-libunwind/libunwind-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/libunwind-release80-r363030 X-SVN-Commit-Revision: 348955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A72AA72CED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:10 -0000 Author: dim Date: Tue Jun 11 18:57:06 2019 New Revision: 348955 URL: https://svnweb.freebsd.org/changeset/base/348955 Log: Remove misspelled tag libunwind-release80-r363030. Deleted: vendor/llvm-libunwind/libunwind-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E3BD15C3CAD; Tue, 11 Jun 2019 18:57:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C35DE72EE4; Tue, 11 Jun 2019 18:57:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E628C5D5A; Tue, 11 Jun 2019 18:57:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BIvMKC059608; Tue, 11 Jun 2019 18:57:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvMJE059607; Tue, 11 Jun 2019 18:57:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvMJE059607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348961 - vendor/llvm-openmp/openmp-release80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-release80-r363030 X-SVN-Commit-Revision: 348961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C35DE72EE4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:25 -0000 Author: dim Date: Tue Jun 11 18:57:22 2019 New Revision: 348961 URL: https://svnweb.freebsd.org/changeset/base/348961 Log: Remove misspelled tag openmp-release80-r363030. Deleted: vendor/llvm-openmp/openmp-release80-r363030/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C76DF15C3C7F; Tue, 11 Jun 2019 18:57:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 684C872EB7; Tue, 11 Jun 2019 18:57:23 +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 6961B5D59; Tue, 11 Jun 2019 18: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 x5BIvKXc059559; Tue, 11 Jun 2019 18:57:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvKus059558; Tue, 11 Jun 2019 18:57:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvKus059558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348960 - vendor/lldb/lldb-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_80-r363030 X-SVN-Commit-Revision: 348960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 684C872EB7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:24 -0000 Author: dim Date: Tue Jun 11 18:57:19 2019 New Revision: 348960 URL: https://svnweb.freebsd.org/changeset/base/348960 Log: Tag lldb release_80 branch r363030. Added: vendor/lldb/lldb-release_80-r363030/ - copied from r348959, vendor/lldb/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1190215C3BE6; Tue, 11 Jun 2019 18:57: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A530272DFE; Tue, 11 Jun 2019 18:57:17 +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 C37B85D57; Tue, 11 Jun 2019 18:57:14 +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 x5BIvE42059464; Tue, 11 Jun 2019 18:57:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvEph059463; Tue, 11 Jun 2019 18:57:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvEph059463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348958 - vendor/lld/lld-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_80-r363030 X-SVN-Commit-Revision: 348958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A530272DFE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:18 -0000 Author: dim Date: Tue Jun 11 18:57:14 2019 New Revision: 348958 URL: https://svnweb.freebsd.org/changeset/base/348958 Log: Tag lld release_80 branch r363030. Added: vendor/lld/lld-release_80-r363030/ - copied from r348957, vendor/lld/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 18:57:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8D1515C3CE6; Tue, 11 Jun 2019 18:57:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B87472F52; Tue, 11 Jun 2019 18:57:28 +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 C8FB95D5B; Tue, 11 Jun 2019 18:57:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BIvPfv059654; Tue, 11 Jun 2019 18:57:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BIvPA9059653; Tue, 11 Jun 2019 18:57:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906111857.x5BIvPA9059653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Jun 2019 18:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348962 - vendor/llvm-openmp/openmp-release_80-r363030 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-release_80-r363030 X-SVN-Commit-Revision: 348962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B87472F52 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 18:57:29 -0000 Author: dim Date: Tue Jun 11 18:57:25 2019 New Revision: 348962 URL: https://svnweb.freebsd.org/changeset/base/348962 Log: Tag LLVM openmp release_80 branch r363030. Added: vendor/llvm-openmp/openmp-release_80-r363030/ - copied from r348961, vendor/llvm-openmp/dist-release_80/ From owner-svn-src-all@freebsd.org Tue Jun 11 20:48:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4B7115C6DFD; Tue, 11 Jun 2019 20:48:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86F6577F08; Tue, 11 Jun 2019 20:48:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 540DF6FD9; Tue, 11 Jun 2019 20:48:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BKmKbg018749; Tue, 11 Jun 2019 20:48:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BKmKZq018748; Tue, 11 Jun 2019 20:48:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201906112048.x5BKmKZq018748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 11 Jun 2019 20:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348963 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 348963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 86F6577F08 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 20:48:21 -0000 Author: imp Date: Tue Jun 11 20:48:19 2019 New Revision: 348963 URL: https://svnweb.freebsd.org/changeset/base/348963 Log: Minor white space changes. Remove trailing white space that's crept into this file. Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Tue Jun 11 18:57:25 2019 (r348962) +++ head/sys/cam/scsi/scsi_xpt.c Tue Jun 11 20:48:19 2019 (r348963) @@ -1603,7 +1603,7 @@ probe_device_check: start = strspn(serial_buf->serial_num, " "); slen = serial_buf->length - start; if (slen <= 0) { - /* + /* * SPC5r05 says that an all-space serial * number means no product serial number * is available @@ -2116,7 +2116,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *re CAM_GET_LUN(target->luns, 0, first); if (first == 0 && scan_info->lunindex[target_id] == 0) { scan_info->lunindex[target_id]++; - } + } /* * Skip any LUNs that the HBA can't deal with. @@ -2601,7 +2601,7 @@ scsi_dev_advinfo(union ccb *start_ccb) * We fetch extended inquiry data during probe, if * available. We don't allow changing it. */ - if (cdai->flags & CDAI_FLAG_STORE) + if (cdai->flags & CDAI_FLAG_STORE) return; cdai->provsiz = device->ext_inq_len; if (device->ext_inq_len == 0) @@ -2993,7 +2993,7 @@ scsi_dev_async(u_int32_t async_code, struct cam_eb *bu */ if (async_code == AC_SENT_BDR || async_code == AC_BUS_RESET) { - cam_freeze_devq(&newpath); + cam_freeze_devq(&newpath); cam_release_devq(&newpath, RELSIM_RELEASE_AFTER_TIMEOUT, /*reduction*/0, @@ -3051,7 +3051,7 @@ _scsi_announce_periph(struct cam_periph *periph, u_int cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - /* Report connection speed */ + /* Report connection speed */ *speed = cpi.base_transfer_speed; *freq = 0; From owner-svn-src-all@freebsd.org Tue Jun 11 22:06:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D37E15C8668; Tue, 11 Jun 2019 22:06:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F049B826AF; Tue, 11 Jun 2019 22:06: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 CAD187D86; Tue, 11 Jun 2019 22:06:05 +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 x5BM65xm060452; Tue, 11 Jun 2019 22:06:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BM656n060451; Tue, 11 Jun 2019 22:06:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112206.x5BM656n060451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 22:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348964 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 348964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F049B826AF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:06:06 -0000 Author: jhb Date: Tue Jun 11 22:06:05 2019 New Revision: 348964 URL: https://svnweb.freebsd.org/changeset/base/348964 Log: Trim an extra space. Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Jun 11 20:48:19 2019 (r348963) +++ head/sys/kern/kern_sendfile.c Tue Jun 11 22:06:05 2019 (r348964) @@ -303,7 +303,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i for (int i = 0; i < sfio->npages; i++) m = m_free(m); } else - (void )(so->so_proto->pr_usrreqs->pru_ready)(so, sfio->m, + (void)(so->so_proto->pr_usrreqs->pru_ready)(so, sfio->m, sfio->npages); SOCK_LOCK(so); From owner-svn-src-all@freebsd.org Tue Jun 11 22:06:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 417DF15C86A0; Tue, 11 Jun 2019 22:06:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAC5A827E7; Tue, 11 Jun 2019 22:06:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0C6B7D87; Tue, 11 Jun 2019 22:06:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BM6VUm060511; Tue, 11 Jun 2019 22:06:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BM6VZ9060510; Tue, 11 Jun 2019 22:06:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112206.x5BM6VZ9060510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 22:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348965 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 348965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DAC5A827E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:06:32 -0000 Author: jhb Date: Tue Jun 11 22:06:31 2019 New Revision: 348965 URL: https://svnweb.freebsd.org/changeset/base/348965 Log: Add M_NOFREE to M_FLAG_BITS. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Jun 11 22:06:05 2019 (r348964) +++ head/sys/sys/mbuf.h Tue Jun 11 22:06:31 2019 (r348965) @@ -348,7 +348,7 @@ struct mbuf { */ #define M_FLAG_BITS \ "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ - "\7M_PROMISC\10M_VLANTAG\13M_TSTMP\14M_TSTMP_HPREC" + "\7M_PROMISC\10M_VLANTAG\12M_NOFREE\13M_TSTMP\14M_TSTMP_HPREC" #define M_FLAG_PROTOBITS \ "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ From owner-svn-src-all@freebsd.org Tue Jun 11 22:07:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0BA115C8748; Tue, 11 Jun 2019 22:07:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54A608295F; Tue, 11 Jun 2019 22:07:40 +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 2E4787D88; Tue, 11 Jun 2019 22:07:40 +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 x5BM7erO060599; Tue, 11 Jun 2019 22:07:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BM7dXB060597; Tue, 11 Jun 2019 22:07:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112207.x5BM7dXB060597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 22:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348966 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 348966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 54A608295F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:07:40 -0000 Author: jhb Date: Tue Jun 11 22:07:39 2019 New Revision: 348966 URL: https://svnweb.freebsd.org/changeset/base/348966 Log: Sort opt_foo.h #includes and add a missing blank line in ip_output(). Modified: head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Tue Jun 11 22:06:31 2019 (r348965) +++ head/sys/netinet/ip_output.c Tue Jun 11 22:07:39 2019 (r348966) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" -#include "opt_ratelimit.h" #include "opt_ipsec.h" #include "opt_mbuf_stress_test.h" #include "opt_mpath.h" +#include "opt_ratelimit.h" #include "opt_route.h" -#include "opt_sctp.h" #include "opt_rss.h" +#include "opt_sctp.h" #include #include @@ -283,6 +283,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct rou #if defined(IPSEC) || defined(IPSEC_SUPPORT) int no_route_but_check_spd = 0; #endif + M_ASSERTPKTHDR(m); if (inp != NULL) { Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Jun 11 22:06:31 2019 (r348965) +++ head/sys/netinet6/ip6_output.c Tue Jun 11 22:07:39 2019 (r348966) @@ -67,11 +67,11 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_ratelimit.h" #include "opt_ipsec.h" -#include "opt_sctp.h" +#include "opt_ratelimit.h" #include "opt_route.h" #include "opt_rss.h" +#include "opt_sctp.h" #include #include From owner-svn-src-all@freebsd.org Tue Jun 11 22:21:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B11D115C8C95; Tue, 11 Jun 2019 22:21:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50CF882F06; Tue, 11 Jun 2019 22:21:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BEE180AF; Tue, 11 Jun 2019 22:21:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BMLTV4068336; Tue, 11 Jun 2019 22:21:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BMLTTG068335; Tue, 11 Jun 2019 22:21:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201906112221.x5BMLTTG068335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 11 Jun 2019 22:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348967 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 348967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 50CF882F06 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:21:30 -0000 Author: delphij Date: Tue Jun 11 22:21:29 2019 New Revision: 348967 URL: https://svnweb.freebsd.org/changeset/base/348967 Log: Avoid out of boundary access when checking invalid long filenames. Obtained from: OpenBSD (dir.c,v 1.25) MFC after: 3 days Modified: head/sbin/fsck_msdosfs/dir.c Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Tue Jun 11 22:07:39 2019 (r348966) +++ head/sbin/fsck_msdosfs/dir.c Tue Jun 11 22:21:29 2019 (r348967) @@ -629,6 +629,15 @@ readDosDirSection(int f, struct bootblock *boot, struc vallfn = NULL; } lidx = *p & LRNOMASK; + if (lidx == 0) { + pwarn("invalid long name\n"); + if (!invlfn) { + invlfn = vallfn; + invcl = valcl; + } + vallfn = NULL; + continue; + } t = longName + --lidx * 13; for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { From owner-svn-src-all@freebsd.org Tue Jun 11 22:41:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D78915C916E; Tue, 11 Jun 2019 22:41:40 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CBE4838E5; Tue, 11 Jun 2019 22:41:40 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCFA58418; Tue, 11 Jun 2019 22:41:39 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BMfd2w081248; Tue, 11 Jun 2019 22:41:39 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BMfdvp081247; Tue, 11 Jun 2019 22:41:39 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906112241.x5BMfdvp081247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Tue, 11 Jun 2019 22:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348968 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 348968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CBE4838E5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:41:40 -0000 Author: dougm Date: Tue Jun 11 22:41:39 2019 New Revision: 348968 URL: https://svnweb.freebsd.org/changeset/base/348968 Log: To test to see if a free space is big enough compare the required length to the difference of the two offsets that define the gap, to avoid overflow, rather that adding the length to an offset and comparing that to another offset. This addresses an overflow issue reported by Peter Holm on i386. Reported by: pho Tested by: pho Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20594 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Jun 11 22:21:29 2019 (r348967) +++ head/sys/vm/vm_map.c Tue Jun 11 22:41:39 2019 (r348968) @@ -1641,13 +1641,14 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s { vm_map_entry_t llist, rlist, root, y; vm_size_t left_length; + vm_offset_t gap_end; /* * Request must fit within min/max VM address and must avoid * address wrap. */ start = MAX(start, vm_map_min(map)); - if (start + length > vm_map_max(map) || start + length < start) + if (start >= vm_map_max(map) || length > vm_map_max(map) - start) return (vm_map_max(map) - length + 1); /* Empty tree means wide open address space. */ @@ -1655,13 +1656,19 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s return (start); /* - * After splay, if start comes before root node, then there - * must be a gap from start to the root. + * After splay_split, if start is within an entry, push it to the start + * of the following gap. If rlist is at the end of the gap containing + * start, save the end of that gap in gap_end to see if the gap is big + * enough; otherwise set gap_end to start skip gap-checking and move + * directly to a search of the right subtree. */ root = vm_map_splay_split(map, start, length, &llist, &rlist); - if (root != NULL) + gap_end = rlist->start; + if (root != NULL) { start = root->end; - else if (rlist != &map->header) { + if (root->right != NULL) + gap_end = start; + } else if (rlist != &map->header) { root = rlist; rlist = root->left; root->left = NULL; @@ -1672,18 +1679,9 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s } vm_map_splay_merge(map, root, llist, rlist); VM_MAP_ASSERT_CONSISTENT(map); - if (start + length <= root->start) + if (length <= gap_end - start) return (start); - /* - * Root is the last node that might begin its gap before - * start, and this is the last comparison where address - * wrap might be a problem. - */ - if (root->right == NULL && - start + length <= vm_map_max(map)) - return (start); - /* With max_free, can immediately tell if no solution. */ if (root->right == NULL || length > root->right->max_free) return (vm_map_max(map) - length + 1); @@ -1800,8 +1798,8 @@ vm_map_alignspace(vm_map_t map, vm_object_t object, vm VM_MAP_ASSERT_LOCKED(map); free_addr = *addr; KASSERT(free_addr == vm_map_findspace(map, free_addr, length), - ("caller failed to provide space %d at address %p", - (int)length, (void*)free_addr)); + ("caller failed to provide space %#jx at address %p", + (uintmax_t)length, (void *)free_addr)); for (;;) { /* * At the start of every iteration, the free space at address From owner-svn-src-all@freebsd.org Tue Jun 11 22:57:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A68E15C95B5; Tue, 11 Jun 2019 22:57:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC36F84139; Tue, 11 Jun 2019 22:57:26 +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 86A7C8608; Tue, 11 Jun 2019 22:57:26 +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 x5BMvQvD086691; Tue, 11 Jun 2019 22:57:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BMvQ3f086689; Tue, 11 Jun 2019 22:57:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112257.x5BMvQ3f086689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 22:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348969 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 348969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AC36F84139 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 22:57:27 -0000 Author: jhb Date: Tue Jun 11 22:57:25 2019 New Revision: 348969 URL: https://svnweb.freebsd.org/changeset/base/348969 Log: Document sysctl nodes that translate their values. This documents the behavior of sysctl_msec_to_ticks and SYSCTL_{ADD,}_SBINTIME_[UM]SEC. Reviewed by: cem MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20596 Modified: head/share/man/man9/Makefile head/share/man/man9/sysctl.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jun 11 22:41:39 2019 (r348968) +++ head/share/man/man9/Makefile Tue Jun 11 22:57:25 2019 (r348969) @@ -2011,6 +2011,7 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_INT.9 \ sysctl.9 SYSCTL_INT_WITH_LABEL.9 \ sysctl.9 SYSCTL_LONG.9 \ + sysctl.9 sysctl_msec_to_ticks.9 \ sysctl.9 SYSCTL_NODE.9 \ sysctl.9 SYSCTL_NODE_WITH_LABEL.9 \ sysctl.9 SYSCTL_OPAQUE.9 \ Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Tue Jun 11 22:41:39 2019 (r348968) +++ head/share/man/man9/sysctl.9 Tue Jun 11 22:57:25 2019 (r348969) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2019 +.Dd June 11, 2019 .Dt SYSCTL 9 .Os .Sh NAME @@ -70,6 +70,7 @@ .Nm SYSCTL_INT , .Nm SYSCTL_INT_WITH_LABEL , .Nm SYSCTL_LONG , +.Nm sysctl_msec_to_ticks , .Nm SYSCTL_NODE , .Nm SYSCTL_NODE_WITH_LABEL , .Nm SYSCTL_OPAQUE , @@ -442,6 +443,8 @@ .Fn SYSCTL_INT parent number name ctlflags ptr val descr .Fn SYSCTL_INT_WITH_LABEL parent number name ctlflags ptr val descr label .Fn SYSCTL_LONG parent number name ctlflags ptr val descr +.Ft int +.Fn sysctl_msec_to_ticks SYSCTL_HANDLER_ARGS .Fn SYSCTL_NODE parent number name ctlflags handler descr .Fn SYSCTL_NODE_WITH_LABEL parent number name ctlflags handler descr label .Fn SYSCTL_OPAQUE parent number name ctlflags ptr len format descr @@ -466,6 +469,7 @@ .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr .Fn SYSCTL_UMA_MAX parent number name ctlflags ptr descr .Fn SYSCTL_UMA_CUR parent number name ctlflags ptr descr + .Sh DESCRIPTION The .Nm SYSCTL @@ -596,6 +600,55 @@ Labels should only be applied to siblings that are str and encode the same type of value, as aggregation is of no use otherwise. .El +.Sh NODE VALUE TYPES +Most of the macros and functions used to create sysctl nodes export a +read-only constant or in-kernel variable whose type matches the type +of the node's value. +For example, +.Fn SYSCTL_INT +reports the raw value of an associated variable of type +.Vt int . +However, nodes may also export a value that is a translatation of an internal +representation. +.Pp +The +.Fn sysctl_msec_to_ticks +handler can be used with +.Fn SYSCTL_PROC +or +.Fn SYSCTL_ADD_PROC +to export a millisecond time interval. +When using this handler, +the +.Fa arg2 +parameter points to an in-kernel variable of type +.Vt int +which stores a tick count suitable for use with functions like +.Xr tsleep 9 . +The +.Fn sysctl_msec_to_ticks +function converts this value to milliseconds when reporting the node's value. +Similarly, +.Fn sysctl_msec_to_ticks +accepts new values in milliseconds and stores an equivalent value in ticks to +.Fa *arg2 . +Note that new code should use kernel variables of type +.Vt sbintime_t +instead of tick counts. +.Pp +The +.Fn SYSCTL_ADD_SBINTIME_MSEC +and +.Fn SYSCTL_ADD_SBINTIME_USEC +functions and +.Fn SYSCTL_SBINTIME_MSEC +and +.Fn SYSCTL_SBINTIME_USEC +macros all create nodes which export an in-kernel variable of type +.Vt sbintime_t . +These nodes do not export the raw value of the associated variable. +Instead, they export a 64-bit integer containing a count of either +milliseconds (the MSEC variants) or microseconds (the USEC variants). .Sh CREATING ROOT NODES Sysctl MIBs or OIDs are created in a hierarchical tree. The nodes at the bottom of the tree are called root nodes, and have no From owner-svn-src-all@freebsd.org Tue Jun 11 23:00:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D239215C9699; Tue, 11 Jun 2019 23:00: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84FD38433E; Tue, 11 Jun 2019 23:00: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 6161E8640; Tue, 11 Jun 2019 23:00:58 +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 x5BN0wnv086931; Tue, 11 Jun 2019 23:00:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BN0tIp086917; Tue, 11 Jun 2019 23:00:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112300.x5BN0tIp086917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 23:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348970 - in head: share/man/man9 sys/kern sys/kgssapi/krb5 sys/netipsec sys/opencrypto sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: share/man/man9 sys/kern sys/kgssapi/krb5 sys/netipsec sys/opencrypto sys/sys X-SVN-Commit-Revision: 348970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84FD38433E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:00:59 -0000 Author: jhb Date: Tue Jun 11 23:00:55 2019 New Revision: 348970 URL: https://svnweb.freebsd.org/changeset/base/348970 Log: Make the warning intervals for deprecated crypto algorithms tunable. New sysctl/tunables can now set the interval (in seconds) between rate-limited crypto warnings. The new sysctls are: - kern.cryptodev_warn_interval for /dev/crypto - net.inet.ipsec.crypto_warn_interval for IPsec - kern.kgssapi_warn_interval for KGSSAPI Reviewed by: cem MFC after: 1 month Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20555 Modified: head/share/man/man9/Makefile head/share/man/man9/sysctl.9 head/sys/kern/kern_sysctl.c head/sys/kgssapi/krb5/kcrypto.c head/sys/kgssapi/krb5/kcrypto.h head/sys/kgssapi/krb5/kcrypto_arcfour.c head/sys/kgssapi/krb5/kcrypto_des.c head/sys/kgssapi/krb5/kcrypto_des3.c head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/opencrypto/cryptodev.c head/sys/sys/sysctl.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jun 11 22:57:25 2019 (r348969) +++ head/share/man/man9/Makefile Tue Jun 11 23:00:55 2019 (r348970) @@ -1996,6 +1996,7 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_S64.9 \ sysctl.9 SYSCTL_ADD_STRING.9 \ sysctl.9 SYSCTL_ADD_STRUCT.9 \ + sysctl.9 SYSCTL_ADD_TIMEVAL_SEC.9 \ sysctl.9 SYSCTL_ADD_U8.9 \ sysctl.9 SYSCTL_ADD_U16.9 \ sysctl.9 SYSCTL_ADD_U32.9 \ @@ -2024,6 +2025,7 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_S64.9 \ sysctl.9 SYSCTL_STRING.9 \ sysctl.9 SYSCTL_STRUCT.9 \ + sysctl.9 SYSCTL_TIMEVAL_SEC.9 \ sysctl.9 SYSCTL_U8.9 \ sysctl.9 SYSCTL_U16.9 \ sysctl.9 SYSCTL_U32.9 \ Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Tue Jun 11 22:57:25 2019 (r348969) +++ head/share/man/man9/sysctl.9 Tue Jun 11 23:00:55 2019 (r348970) @@ -50,6 +50,7 @@ .Nm SYSCTL_ADD_STRING , .Nm SYSCTL_ADD_CONST_STRING , .Nm SYSCTL_ADD_STRUCT , +.Nm SYSCTL_ADD_TIMEVAL_SEC , .Nm SYSCTL_ADD_U8 , .Nm SYSCTL_ADD_U16 , .Nm SYSCTL_ADD_U32 , @@ -86,6 +87,7 @@ .Nm SYSCTL_STRING , .Nm SYSCTL_CONST_STRING , .Nm SYSCTL_STRUCT , +.Nm SYSCTL_TIMEVAL_SEC , .Nm SYSCTL_U8 , .Nm SYSCTL_U16 , .Nm SYSCTL_U32 , @@ -315,6 +317,16 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_TIMEVAL_SEC +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "struct timeval *ptr" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_U8 .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" @@ -460,6 +472,7 @@ .Fn SYSCTL_STRING parent number name ctlflags arg len descr .Fn SYSCTL_CONST_STRING parent number name ctlflags arg descr .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr +.Fn SYSCTL_TIMEVAL_SEC parent number name ctlflags ptr descr .Fn SYSCTL_U8 parent number name ctlflags ptr val descr .Fn SYSCTL_U16 parent number name ctlflags ptr val descr .Fn SYSCTL_U32 parent number name ctlflags ptr val descr @@ -649,6 +662,21 @@ macros all create nodes which export an in-kernel vari These nodes do not export the raw value of the associated variable. Instead, they export a 64-bit integer containing a count of either milliseconds (the MSEC variants) or microseconds (the USEC variants). +.Pp +The +.Fn SYSCTL_ADD_TIMEVAL_SEC +function and +.Fn SYSCTL_TIMEVAL_SEC +macro create nodes which export an in-kernel variable of type +.Vt struct timeval . +These nodes do not export full value of the associated structure. +Instead, they export a count in seconds as a simple integer which is +stored in the +.Fa tv_sec +field of the associated variable. +This function and macro are intended to be used with variables which +store a non-negative interval rather than an absolute time. +As a result, they reject attempts to store negative values. .Sh CREATING ROOT NODES Sysctl MIBs or OIDs are created in a hierarchical tree. The nodes at the bottom of the tree are called root nodes, and have no @@ -731,6 +759,7 @@ Static sysctls are declared using one of the .Fn SYSCTL_STRING , .Fn SYSCTL_CONST_STRING , .Fn SYSCTL_STRUCT , +.Fn SYSCTL_TIMEVAL_SEC , .Fn SYSCTL_U8 , .Fn SYSCTL_U16 , .Fn SYSCTL_U32 , @@ -764,6 +793,7 @@ Dynamic nodes are created using one of the .Fn SYSCTL_ADD_STRING , .Fn SYSCTL_ADD_CONST_STRING , .Fn SYSCTL_ADD_STRUCT , +.Fn SYSCTL_ADD_TIMEVAL_SEC , .Fn SYSCTL_ADD_U8 , .Fn SYSCTL_ADD_U16 , .Fn SYSCTL_ADD_U32 , Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kern/kern_sysctl.c Tue Jun 11 23:00:55 2019 (r348970) @@ -1732,6 +1732,29 @@ sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS) return (0); } +/* + * Convert seconds to a struct timeval. Intended for use with + * intervals and thus does not permit negative seconds. + */ +int +sysctl_sec_to_timeval(SYSCTL_HANDLER_ARGS) +{ + struct timeval *tv; + int error, secs; + + tv = arg1; + secs = tv->tv_sec; + + error = sysctl_handle_int(oidp, &secs, 0, req); + if (error || req->newptr == NULL) + return (error); + + if (secs < 0) + return (EINVAL); + tv->tv_sec = secs; + + return (0); +} /* * Transfer functions to/from kernel space. Modified: head/sys/kgssapi/krb5/kcrypto.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kgssapi/krb5/kcrypto.c Tue Jun 11 23:00:55 2019 (r348970) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -49,6 +50,11 @@ static struct krb5_encryption_class *krb5_encryption_c &krb5_arcfour_56_encryption_class, NULL }; + +struct timeval krb5_warn_interval = { .tv_sec = 3600, .tv_usec = 0 }; +SYSCTL_TIMEVAL_SEC(_kern, OID_AUTO, kgssapi_warn_interval, CTLFLAG_RW, + &krb5_warn_interval, + "Delay in seconds between warnings of deprecated KGSSAPI crypto."); struct krb5_encryption_class * krb5_find_encryption_class(int etype) Modified: head/sys/kgssapi/krb5/kcrypto.h ============================================================================== --- head/sys/kgssapi/krb5/kcrypto.h Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kgssapi/krb5/kcrypto.h Tue Jun 11 23:00:55 2019 (r348970) @@ -101,6 +101,7 @@ extern struct krb5_encryption_class krb5_aes128_encryp extern struct krb5_encryption_class krb5_aes256_encryption_class; extern struct krb5_encryption_class krb5_arcfour_encryption_class; extern struct krb5_encryption_class krb5_arcfour_56_encryption_class; +extern struct timeval krb5_warn_interval; static __inline void krb5_set_key(struct krb5_key_state *ks, const void *keydata) Modified: head/sys/kgssapi/krb5/kcrypto_arcfour.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_arcfour.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kgssapi/krb5/kcrypto_arcfour.c Tue Jun 11 23:00:55 2019 (r348970) @@ -47,10 +47,9 @@ static void arcfour_init(struct krb5_key_state *ks) { static struct timeval lastwarn; - static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; ks->ks_priv = NULL; - if (ratecheck(&lastwarn, &warninterval)) + if (ratecheck(&lastwarn, &krb5_warn_interval)) gone_in(13, "RC4 cipher for Kerberos GSS"); } Modified: head/sys/kgssapi/krb5/kcrypto_des.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kgssapi/krb5/kcrypto_des.c Tue Jun 11 23:00:55 2019 (r348970) @@ -54,13 +54,12 @@ static void des1_init(struct krb5_key_state *ks) { static struct timeval lastwarn; - static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; struct des1_state *ds; ds = malloc(sizeof(struct des1_state), M_GSSAPI, M_WAITOK|M_ZERO); mtx_init(&ds->ds_lock, "gss des lock", NULL, MTX_DEF); ks->ks_priv = ds; - if (ratecheck(&lastwarn, &warninterval)) + if (ratecheck(&lastwarn, &krb5_warn_interval)) gone_in(13, "DES cipher for Kerberos GSS"); } Modified: head/sys/kgssapi/krb5/kcrypto_des3.c ============================================================================== --- head/sys/kgssapi/krb5/kcrypto_des3.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/kgssapi/krb5/kcrypto_des3.c Tue Jun 11 23:00:55 2019 (r348970) @@ -55,13 +55,12 @@ static void des3_init(struct krb5_key_state *ks) { static struct timeval lastwarn; - static struct timeval warninterval = { .tv_sec = 3600, .tv_usec = 0 }; struct des3_state *ds; ds = malloc(sizeof(struct des3_state), M_GSSAPI, M_WAITOK|M_ZERO); mtx_init(&ds->ds_lock, "gss des3 lock", NULL, MTX_DEF); ks->ks_priv = ds; - if (ratecheck(&lastwarn, &warninterval)) + if (ratecheck(&lastwarn, &krb5_warn_interval)) gone_in(13, "DES3 cipher for Kerberos GSS"); } Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/netipsec/ipsec.c Tue Jun 11 23:00:55 2019 (r348970) @@ -216,6 +216,11 @@ SYSCTL_INT(_net_inet_ipsec, OID_AUTO, filtertunnel, SYSCTL_VNET_PCPUSTAT(_net_inet_ipsec, OID_AUTO, ipsecstats, struct ipsecstat, ipsec4stat, "IPsec IPv4 statistics."); +struct timeval ipsec_warn_interval = { .tv_sec = 1, .tv_usec = 0 }; +SYSCTL_TIMEVAL_SEC(_net_inet_ipsec, OID_AUTO, crypto_warn_interval, CTLFLAG_RW, + &ipsec_warn_interval, + "Delay in seconds between warnings of deprecated IPsec crypto algorithms."); + #ifdef REGRESSION /* * When set to 1, IPsec will send packets with the same sequence number. Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/netipsec/ipsec.h Tue Jun 11 23:00:55 2019 (r348970) @@ -287,6 +287,8 @@ VNET_DECLARE(int, crypto_support); VNET_DECLARE(int, async_crypto); VNET_DECLARE(int, natt_cksum_policy); +extern struct timeval ipsec_warn_interval; + #define IPSECSTAT_INC(name) \ VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec4stat, name, 1) #define V_ip4_esp_trans_deflev VNET(ip4_esp_trans_deflev) Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/netipsec/xform_ah.c Tue Jun 11 23:00:55 2019 (r348970) @@ -109,7 +109,6 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_ah, IPSECCTL_STATS, sta static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */ static struct timeval md5warn, ripewarn, kpdkmd5warn, kpdksha1warn; -static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; static int ah_input_cb(struct cryptop*); static int ah_output_cb(struct cryptop*); @@ -189,19 +188,19 @@ ah_init0(struct secasvar *sav, struct xformsw *xsp, st switch (sav->alg_auth) { case SADB_AALG_MD5HMAC: - if (ratecheck(&md5warn, &warninterval)) + if (ratecheck(&md5warn, &ipsec_warn_interval)) gone_in(13, "MD5-HMAC authenticator for IPsec"); break; case SADB_X_AALG_RIPEMD160HMAC: - if (ratecheck(&ripewarn, &warninterval)) + if (ratecheck(&ripewarn, &ipsec_warn_interval)) gone_in(13, "RIPEMD160-HMAC authenticator for IPsec"); break; case SADB_X_AALG_MD5: - if (ratecheck(&kpdkmd5warn, &warninterval)) + if (ratecheck(&kpdkmd5warn, &ipsec_warn_interval)) gone_in(13, "Keyed-MD5 authenticator for IPsec"); break; case SADB_X_AALG_SHA: - if (ratecheck(&kpdksha1warn, &warninterval)) + if (ratecheck(&kpdksha1warn, &ipsec_warn_interval)) gone_in(13, "Keyed-SHA1 authenticator for IPsec"); break; } Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/netipsec/xform_esp.c Tue Jun 11 23:00:55 2019 (r348970) @@ -95,7 +95,6 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, st "ESP statistics (struct espstat, netipsec/esp_var.h"); static struct timeval deswarn, blfwarn, castwarn, camelliawarn; -static struct timeval warninterval = { .tv_sec = 1, .tv_usec = 0 }; static int esp_input_cb(struct cryptop *op); static int esp_output_cb(struct cryptop *crp); @@ -162,19 +161,19 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) switch (sav->alg_enc) { case SADB_EALG_DESCBC: - if (ratecheck(&deswarn, &warninterval)) + if (ratecheck(&deswarn, &ipsec_warn_interval)) gone_in(13, "DES cipher for IPsec"); break; case SADB_X_EALG_BLOWFISHCBC: - if (ratecheck(&blfwarn, &warninterval)) + if (ratecheck(&blfwarn, &ipsec_warn_interval)) gone_in(13, "Blowfish cipher for IPsec"); break; case SADB_X_EALG_CAST128CBC: - if (ratecheck(&castwarn, &warninterval)) + if (ratecheck(&castwarn, &ipsec_warn_interval)) gone_in(13, "CAST cipher for IPsec"); break; case SADB_X_EALG_CAMELLIACBC: - if (ratecheck(&camelliawarn, &warninterval)) + if (ratecheck(&camelliawarn, &ipsec_warn_interval)) gone_in(13, "Camellia cipher for IPsec"); break; } Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/opencrypto/cryptodev.c Tue Jun 11 23:00:55 2019 (r348970) @@ -146,6 +146,11 @@ struct cryptostats32 { #define CIOCGSESSION232 _IOWR('c', 106, struct session2_op32) #define CIOCKEY232 _IOWR('c', 107, struct crypt_kop32) +static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; +SYSCTL_TIMEVAL_SEC(_kern, OID_AUTO, cryptodev_warn_interval, CTLFLAG_RW, + &warninterval, + "Delay in seconds between warnings of deprecated /dev/crypto algorithms"); + static void session_op_from_32(const struct session_op32 *from, struct session_op *to) { @@ -388,7 +393,6 @@ cryptof_ioctl( #endif static struct timeval arc4warn, blfwarn, castwarn, deswarn, md5warn; static struct timeval skipwarn, tdeswarn; - static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; switch (cmd) { case CIOCGSESSION: Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Tue Jun 11 22:57:25 2019 (r348969) +++ head/sys/sys/sysctl.h Tue Jun 11 23:00:55 2019 (r348970) @@ -218,6 +218,7 @@ int sysctl_handle_uma_zone_cur(SYSCTL_HANDLER_ARGS); int sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS); int sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS); +int sysctl_sec_to_timeval(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); @@ -854,6 +855,24 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); sysctl_add_oid(ctx, parent, nbr, name, \ CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ __ptr, 0, sysctl_msec_to_sbintime, "Q", __DESCR(descr), \ + NULL); \ +}) + +/* OID expressing a struct timeval as seconds */ +#define SYSCTL_TIMEVAL_SEC(parent, nbr, name, access, ptr, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + (ptr), 0, sysctl_sec_to_timeval, "I", descr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT) +#define SYSCTL_ADD_TIMEVAL_SEC(ctx, parent, nbr, name, access, ptr, descr) \ +({ \ + struct timeval *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_INT); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + __ptr, 0, sysctl_sec_to_timeval, "I", __DESCR(descr), \ NULL); \ }) From owner-svn-src-all@freebsd.org Tue Jun 11 23:16:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCCD915C99E5; Tue, 11 Jun 2019 23:16:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EF5184A38; Tue, 11 Jun 2019 23:16:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54FA08981; Tue, 11 Jun 2019 23:16:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNGHTx097308; Tue, 11 Jun 2019 23:16:17 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNGEcQ097292; Tue, 11 Jun 2019 23:16:14 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201906112316.x5BNGEcQ097292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Jun 2019 23:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348971 - in vendor/libarchive/dist: . build build/ci build/cmake contrib libarchive libarchive_fe tar X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . build build/ci build/cmake contrib libarchive libarchive_fe tar X-SVN-Commit-Revision: 348971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EF5184A38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:16:18 -0000 Author: mm Date: Tue Jun 11 23:16:13 2019 New Revision: 348971 URL: https://svnweb.freebsd.org/changeset/base/348971 Log: Update vendor/libarchive/dist to git 614110e76d9dbb9ed3e159a71cbd75fa3b23efe3 Relevant vendor changes (release 3.4.0): - check_symlinks_fsobj() without chdir() and fchdir() - bsdtar.1 manpage fixes - patches from OpenBSD to libarchive_fe/passphrase.c Modified: vendor/libarchive/dist/.gitignore vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/NEWS vendor/libarchive/dist/README.md vendor/libarchive/dist/build/ci/build.sh vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/version vendor/libarchive/dist/configure.ac vendor/libarchive/dist/contrib/libarchive.spec vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_write_add_filter_b64encode.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive_fe/line_reader.c vendor/libarchive/dist/libarchive_fe/passphrase.c vendor/libarchive/dist/tar/bsdtar.1 Modified: vendor/libarchive/dist/.gitignore ============================================================================== --- vendor/libarchive/dist/.gitignore Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/.gitignore Tue Jun 11 23:16:13 2019 (r348971) @@ -1,19 +1,19 @@ *~ *.o *.exe +*.la *.lo *.cmake +.deps/ .libs/ +.dirstamp Makefile Makefile.in aclocal.m4 autom4te.cache/ bsdcat -bsdcat_test bsdcpio -bsdcpio_test bsdtar -bsdtar_test build/autoconf/compile build/autoconf/config.guess build/autoconf/config.sub @@ -27,50 +27,22 @@ build/autoconf/ltversion.m4 build/autoconf/lt~obsolete.m4 build/autoconf/missing build/pkgconfig/libarchive.pc -cat/.deps/ -cat/.dirstamp -cat/test/.deps/ -cat/test/.dirstamp cat/test/list.h +config.cache config.h config.h.in config.log config.status configure -cpio/.deps/ -cpio/.dirstamp -cpio/test/.deps/ -cpio/test/.dirstamp cpio/test/list.h -libarchive.la -libarchive/.deps/ -libarchive/.dirstamp -libarchive/test/.deps/ -libarchive/test/.dirstamp libarchive/test/list.h -libarchive_fe.la -libarchive_fe/.deps/ -libarchive_fe/.dirstamp -libarchive_test libtool stamp-h1 -tar/.deps/ -tar/.dirstamp -tar/test/.deps/ -tar/test/.dirstamp tar/test/list.h CMakeCache.txt CMakeFiles/ DartConfiguration.tcl cmake.tmp/ -cpio/CMakeFiles/ -cpio/test/CMakeFiles/ -libarchive/CMakeFiles/ -libarchive/test/CMakeFiles/ -tar/CMakeFiles/ -tar/test/CMakeFiles/ -test_utils/.deps/ -test_utils/.dirstamp doc/html/*.html doc/man/*.1 @@ -90,15 +62,10 @@ libarchive/libarchive.so.* .DS_Store -bsdcat_test.log -bsdcat_test.trs -bsdcpio_test.log -bsdcpio_test.trs -bsdtar_test.log -bsdtar_test.trs +/*_test +/*_test.log +/*_test.trs build/autoconf/test-driver -libarchive_test.log -libarchive_test.trs test-suite.log .sw? Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/CMakeLists.txt Tue Jun 11 23:16:13 2019 (r348971) @@ -18,7 +18,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". @@ -1350,6 +1350,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR) CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK) CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM) CHECK_FUNCTION_EXISTS_GLIBC(tzset HAVE_TZSET) +CHECK_FUNCTION_EXISTS_GLIBC(unlinkat HAVE_UNLINKAT) CHECK_FUNCTION_EXISTS_GLIBC(unsetenv HAVE_UNSETENV) CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) Modified: vendor/libarchive/dist/NEWS ============================================================================== --- vendor/libarchive/dist/NEWS Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/NEWS Tue Jun 11 23:16:13 2019 (r348971) @@ -1,3 +1,7 @@ +Jun 11, 2019: libarchive 3.4.0 released + +May 18, 2019: Fixes for reading Android APK and JAR archives + Apr 16, 2019: Support for non-recursive list and extract Apr 14, 2019: New tar option: --exclude-vcs @@ -6,7 +10,7 @@ Mar 27, 2019: Support for file and directory symlinks Mar 12, 2019: Important fixes for storing file attributes and flags -Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 compression in zip archives +Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 decompression in ZIP files Oct 06, 2018: RAR 5.0 reader Modified: vendor/libarchive/dist/README.md ============================================================================== --- vendor/libarchive/dist/README.md Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/README.md Tue Jun 11 23:16:13 2019 (r348971) @@ -81,6 +81,7 @@ Currently, the library automatically detects and reads * Binary cpio (big-endian or little-endian) * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) + * ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries) * GNU and BSD 'ar' archives * 'mtree' format * 7-Zip archives Modified: vendor/libarchive/dist/build/ci/build.sh ============================================================================== --- vendor/libarchive/dist/build/ci/build.sh Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/build/ci/build.sh Tue Jun 11 23:16:13 2019 (r348971) @@ -75,7 +75,7 @@ if [ -n "${DEBUG}" ]; then else export CFLAGS="-g -fsanitize=address" fi - if ["${BS}" = "cmake" ]; then + if [ "${BS}" = "cmake" ]; then CONFIGURE_ARGS="${CONFIGURE_ARGS} -DCMAKE_C_CFLAGS=-g -fsanitize=address" fi fi Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/build/cmake/config.h.in Tue Jun 11 23:16:13 2019 (r348971) @@ -1111,6 +1111,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H 1 +/* Define to 1 if you have the `unlinkat' function. */ +#cmakedefine HAVE_UNLINKAT 1 + /* Define to 1 if you have the `unsetenv' function. */ #cmakedefine HAVE_UNSETENV 1 Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/build/version Tue Jun 11 23:16:13 2019 (r348971) @@ -1 +1 @@ -3003004dev +3004000 Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/configure.ac Tue Jun 11 23:16:13 2019 (r348971) @@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.3.4dev]) -m4_define([LIBARCHIVE_VERSION_N],[3003004]) +m4_define([LIBARCHIVE_VERSION_S],[3.4.0]) +m4_define([LIBARCHIVE_VERSION_N],[3004000]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -636,7 +636,7 @@ AC_CHECK_FUNCS([nl_langinfo openat pipe poll posix_spa AC_CHECK_FUNCS([readpassphrase]) AC_CHECK_FUNCS([select setenv setlocale sigaction statfs statvfs]) AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm]) -AC_CHECK_FUNCS([tzset unsetenv utime utimensat utimes vfork]) +AC_CHECK_FUNCS([tzset unlinkat unsetenv utime utimensat utimes vfork]) AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy wmemmove]) AC_CHECK_FUNCS([_ctime64_s _fseeki64]) AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64]) Modified: vendor/libarchive/dist/contrib/libarchive.spec ============================================================================== --- vendor/libarchive/dist/contrib/libarchive.spec Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/contrib/libarchive.spec Tue Jun 11 23:16:13 2019 (r348971) @@ -1,105 +1,216 @@ -Summary: Library to create and read several different archive formats -Name: libarchive -Version: 3.1.2 -Release: 1 +Name: {{{ git_name }}} +Version: {{{ git_version lead=3 follow=4 }}} +Release: 1%{?dist} +Summary: A library for handling streaming archive formats + License: BSD -Group: Libraries -Source0: http://libarchive.org/downloads/%{name}-%{version}.tar.gz -URL: http:/libarchive.org/ -Requires: glibc -Requires: zlib -Requires: bzip2 +URL: http://www.libarchive.org/ +Source: {{{ git_pack }}} + +VCS: {{{ git_vcs }}} + +BuildRequires: automake +BuildRequires: bison +BuildRequires: bzip2-devel +BuildRequires: e2fsprogs-devel BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: gawk +BuildRequires: libacl-devel +BuildRequires: libattr-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: libzstd-devel +BuildRequires: lz4-devel +BuildRequires: lzo-devel +BuildRequires: openssl-devel +BuildRequires: sharutils +BuildRequires: xz-devel BuildRequires: zlib-devel -BuildRequires: bzip2 -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Libarchive is a programming library that can create and read several -different streaming archive formats, including most popular TAR -variants and several CPIO formats. It can also write SHAR archives. +Libarchive is a programming library that can create and read several different +streaming archive formats, including most popular tar variants, several cpio +formats, and both BSD and GNU ar variants. It can also write shar archives and +read ISO9660 CDROM images and ZIP archives. + %package devel -Summary: Header files for libarchive library -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel -Header files for libarchive library. +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. -%package static -Summary: Static libarchive library -Group: Development/Libraries -Requires: %{name}-devel = %{version}-%{release} -%description static -Static libarchive library. - %package -n bsdtar -Summary: bsdtar - tar(1) implementation based on libarchive -Group: Applications/Archiving -Requires: %{name} = %{version}-%{release} +Summary: Manipulate tape archives +Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsdtar -bsdtar - tar(1) implementation based on libarchive. +The bsdtar package contains standalone bsdtar utility split off regular +libarchive packages. + %package -n bsdcpio -Summary: bsdcpio - cpio(1) implementation based on libarchive -Group: Applications/Archiving -Requires: %{name} = %{version}-%{release} +Summary: Copy files to and from archives +Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsdcpio -bsdcpio - cpio(1) implementation based on libarchive +The bsdcpio package contains standalone bsdcpio utility split off regular +libarchive packages. + +%package -n bsdcat +Summary: Expand files to standard output +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n bsdcat +The bsdcat program typically takes a filename as an argument or reads standard +input when used in a pipe. In both cases decompressed data it written to +standard output. + + %prep -%setup -q +{{{ git_setup_macro }}} +%autosetup -p1 + %build -mkdir -p %{buildroot} -./configure \ ---prefix=%{_prefix} \ ---libexecdir=%{_libexecdir} \ ---libdir=%{_libdir} \ ---mandir=%{_mandir} \ ---infodir=%{_infodir} \ ---enable-shared=yes \ ---enable-static=yes \ -| tee %{buildroot}/config.log -make | tee %{buildroot}/make.log +build/autogen.sh +%configure --disable-static --without-nettle LT_SYS_LIBRARY_PATH=%_libdir +%make_build + %install -[ "%buildroot" != "/" ] && [ -d %buildroot ] && rm -rf %buildroot; -make DESTDIR=%buildroot install +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -%clean -rm -fr %buildroot +# rhbz#1294252 +replace () +{ + filename=$1 + file=`basename "$filename"` + binary=${file%%.*} + pattern=${binary##bsd} -%files -%{_libdir}/libarchive.so* + awk " + # replace the topic + /^.Dt ${pattern^^} 1/ { + print \".Dt ${binary^^} 1\"; + next; + } + # replace the first occurence of \"$pattern\" by \"$binary\" + !stop && /^.Nm $pattern/ { + print \".Nm $binary\" ; + stop = 1 ; + next; + } + # print remaining lines + 1; + " "$filename" > "$filename.new" + mv "$filename".new "$filename" +} -%files static -%{_libdir}/libarchive.a +for manpage in bsdtar.1 bsdcpio.1 +do + installed_manpage=`find "$RPM_BUILD_ROOT" -name "$manpage"` + replace "$installed_manpage" +done + +%check +%if %{with check} +logfiles () +{ + find -name '*_test.log' -or -name test-suite.log +} + +tempdirs () +{ + cat `logfiles` \ + | awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \ + | sort | uniq +} + +cat_logs () +{ + for i in `logfiles` + do + echo "=== $i ===" + cat "$i" + done +} + +run_testsuite () +{ + rc=0 + %make_build check -j1 || { + # error happened - try to extract in koji as much info as possible + cat_logs + + for i in `tempdirs`; do + if test -d "$i" ; then + find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n" + cat $i/*.log + fi + done + return 1 + } + cat_logs +} + +# On a ppc/ppc64 is some race condition causing 'make check' fail on ppc +# when both 32 and 64 builds are done in parallel on the same machine in +# koji. Try to run once again if failed. +%ifarch ppc +run_testsuite || run_testsuite +%else +run_testsuite +%endif +%endif + + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc NEWS README.md +%{_libdir}/libarchive.so.13* +%{_mandir}/*/cpio.* +%{_mandir}/*/mtree.* +%{_mandir}/*/tar.* + %files devel -%{_libdir}/pkgconfig/libarchive.pc -%{_libdir}/libarchive.la %{_includedir}/*.h -%doc %{_mandir}/man3/* -%doc %{_mandir}/man5/* +%{_mandir}/*/archive* +%{_mandir}/*/libarchive* +%{_libdir}/libarchive.so +%{_libdir}/pkgconfig/libarchive.pc %files -n bsdtar -%attr(755,root,root) %{_bindir}/bsdtar -%doc %{_mandir}/man1/bsdtar.1* +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc NEWS README.md +%{_bindir}/bsdtar +%{_mandir}/*/bsdtar* %files -n bsdcpio -%attr(755,root,root) %{_bindir}/bsdcpio -%doc %{_mandir}/man1/bsdcpio.1* +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc NEWS README.md +%{_bindir}/bsdcpio +%{_mandir}/*/bsdcpio* +%files -n bsdcat +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc NEWS README.md +%{_bindir}/bsdcat +%{_mandir}/*/bsdcat* + + + %changelog -* Wed May 01 2013 Nikolai Lifanov - 3.1.2-1 -- Initial package -- contrib/libarchive.spec by PLD team overhaul -- Added "bsdcpio" package -- Fixed build on x86_64 platform +* Thu Mar 28 2019 Pavel Raiskup - 3.3.3-7 +- simplify libtool hacks + +{{ git_changelog }} Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive/archive.h Tue Jun 11 23:16:13 2019 (r348971) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003004 +#define ARCHIVE_VERSION_NUMBER 3004000 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.4dev" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.0" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: vendor/libarchive/dist/libarchive/archive_entry.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.h Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive/archive_entry.h Tue Jun 11 23:16:13 2019 (r348971) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003004 +#define ARCHIVE_VERSION_NUMBER 3004000 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: vendor/libarchive/dist/libarchive/archive_write_add_filter_b64encode.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_add_filter_b64encode.c Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive/archive_write_add_filter_b64encode.c Tue Jun 11 23:16:13 2019 (r348971) @@ -60,7 +60,7 @@ static int archive_filter_b64encode_write(struct archi const void *, size_t); static int archive_filter_b64encode_close(struct archive_write_filter *); static int archive_filter_b64encode_free(struct archive_write_filter *); -static void b64_encode(struct archive_string *, const unsigned char *, size_t); +static void la_b64_encode(struct archive_string *, const unsigned char *, size_t); static int64_t atol8(const char *, size_t); static const char base64[] = { @@ -180,7 +180,7 @@ archive_filter_b64encode_open(struct archive_write_fil } static void -b64_encode(struct archive_string *as, const unsigned char *p, size_t len) +la_b64_encode(struct archive_string *as, const unsigned char *p, size_t len) { int c; @@ -234,12 +234,12 @@ archive_filter_b64encode_write(struct archive_write_fi } if (state->hold_len < LBYTES) return (ret); - b64_encode(&state->encoded_buff, state->hold, LBYTES); + la_b64_encode(&state->encoded_buff, state->hold, LBYTES); state->hold_len = 0; } for (; length >= LBYTES; length -= LBYTES, p += LBYTES) - b64_encode(&state->encoded_buff, p, LBYTES); + la_b64_encode(&state->encoded_buff, p, LBYTES); /* Save remaining bytes. */ if (length > 0) { @@ -270,7 +270,7 @@ archive_filter_b64encode_close(struct archive_write_fi /* Flush remaining bytes. */ if (state->hold_len != 0) - b64_encode(&state->encoded_buff, state->hold, state->hold_len); + la_b64_encode(&state->encoded_buff, state->hold, state->hold_len); archive_string_sprintf(&state->encoded_buff, "====\n"); /* Write the last block */ archive_write_set_bytes_in_last_block(f->archive, 1); Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Tue Jun 11 23:16:13 2019 (r348971) @@ -165,6 +165,10 @@ __FBSDID("$FreeBSD$"); #define O_NOFOLLOW 0 #endif +#ifndef AT_FDCWD +#define AT_FDCWD -100 +#endif + struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; @@ -348,6 +352,8 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) + +static int la_opendirat(int, const char *); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -401,6 +407,37 @@ static ssize_t _archive_write_disk_data_block(struct a size_t, int64_t); static int +la_opendirat(int fd, const char *path) { + const int flags = O_CLOEXEC +#if defined(O_BINARY) + | O_BINARY +#endif +#if defined(O_DIRECTORY) + | O_DIRECTORY +#endif +#if defined(O_PATH) + | O_PATH +#elif defined(O_SEARCH) + | O_SEARCH +#elif defined(O_EXEC) + | O_EXEC +#else + | O_RDONLY +#endif + ; + +#if !defined(HAVE_OPENAT) + if (fd != AT_FDCWD) { + errno = ENOTSUP; + return (-1); + } else + return (open(fd, path, flags)); +#else + return (openat(fd, path, flags)); +#endif +} + +static int lazy_stat(struct archive_write_disk *a) { if (a->pst != NULL) { @@ -1909,7 +1946,7 @@ edit_deep_directories(struct archive_write_disk *a) return; /* Try to record our starting dir. */ - a->restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); + a->restore_pwd = la_opendirat(AT_FDCWD, "."); __archive_ensure_cloexec_flag(a->restore_pwd); if (a->restore_pwd < 0) return; @@ -2342,7 +2379,7 @@ _archive_write_disk_close(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; struct fixup_entry *next, *p; - int ret; + int fd, ret; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2353,21 +2390,33 @@ _archive_write_disk_close(struct archive *_a) p = sort_dir_list(a->fixup_list); while (p != NULL) { + fd = -1; a->pst = NULL; /* Mark stat cache as out-of-date. */ + if (p->fixup & + (TODO_TIMES | TODO_MODE_BASE | TODO_ACLS | TODO_FFLAGS)) { + fd = open(p->name, + O_WRONLY | O_BINARY | O_NOFOLLOW | O_CLOEXEC); + } if (p->fixup & TODO_TIMES) { - set_times(a, -1, p->mode, p->name, + set_times(a, fd, p->mode, p->name, p->atime, p->atime_nanos, p->birthtime, p->birthtime_nanos, p->mtime, p->mtime_nanos, p->ctime, p->ctime_nanos); } - if (p->fixup & TODO_MODE_BASE) + if (p->fixup & TODO_MODE_BASE) { +#ifdef HAVE_FCHMOD + if (fd >= 0) + fchmod(fd, p->mode); + else +#endif chmod(p->name, p->mode); + } if (p->fixup & TODO_ACLS) - archive_write_disk_set_acls(&a->archive, -1, p->name, - &p->acl, p->mode); + archive_write_disk_set_acls(&a->archive, fd, + p->name, &p->acl, p->mode); if (p->fixup & TODO_FFLAGS) - set_fflags_platform(a, -1, p->name, + set_fflags_platform(a, fd, p->name, p->mode, p->fflags_set, 0); if (p->fixup & TODO_MAC_METADATA) set_mac_metadata(a, p->name, p->mac_metadata, @@ -2376,6 +2425,8 @@ _archive_write_disk_close(struct archive *_a) archive_acl_clear(&p->acl); free(p->mac_metadata); free(p->name); + if (fd >= 0) + close(fd); free(p); p = next; } @@ -2540,8 +2591,6 @@ fsobj_error(int *a_eno, struct archive_string *a_estr, * scan the path and both can be optimized by comparing against other * recent paths. */ -/* TODO: Extend this to support symlinks on Windows Vista and later. */ - /* * Checks the given path to see if any elements along it are symlinks. Returns * ARCHIVE_OK if there are none, otherwise puts an error in errmsg. @@ -2550,7 +2599,8 @@ static int check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, int flags) { -#if !defined(HAVE_LSTAT) +#if !defined(HAVE_LSTAT) && \ + !(defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT)) /* Platform doesn't have lstat, so we can't look for symlinks. */ (void)path; /* UNUSED */ (void)error_number; /* UNUSED */ @@ -2565,7 +2615,10 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar char c; int r; struct stat st; - int restore_pwd; + int chdir_fd; +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + int fd; +#endif /* Nothing to do here if name is empty */ if(path[0] == '\0') @@ -2586,9 +2639,9 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * c holds what used to be in *tail * last is 1 if this is the last tail */ - restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); - __archive_ensure_cloexec_flag(restore_pwd); - if (restore_pwd < 0) { + chdir_fd = la_opendirat(AT_FDCWD, "."); + __archive_ensure_cloexec_flag(chdir_fd); + if (chdir_fd < 0) { fsobj_error(a_eno, a_estr, errno, "Could not open ", path); return (ARCHIVE_FATAL); @@ -2621,7 +2674,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar c = tail[0]; tail[0] = '\0'; /* Check that we haven't hit a symlink. */ +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = fstatat(chdir_fd, head, &st, AT_SYMLINK_NOFOLLOW); +#else r = lstat(head, &st); +#endif if (r != 0) { tail[0] = c; /* We've hit a dir that doesn't exist; stop now. */ @@ -2647,7 +2704,19 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar } } else if (S_ISDIR(st.st_mode)) { if (!last) { - if (chdir(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + fd = la_opendirat(chdir_fd, head); + if (fd < 0) + r = -1; + else { + r = 0; + close(chdir_fd); + chdir_fd = fd; + } +#else + r = chdir(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, "Could not chdir ", path); @@ -2664,7 +2733,12 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * so we can overwrite it with the * item being extracted. */ - if (unlink(head)) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = unlinkat(chdir_fd, head, 0); +#else + r = unlink(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, "Could not remove symlink ", @@ -2694,7 +2768,12 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar break; } else if (flags & ARCHIVE_EXTRACT_UNLINK) { /* User asked us to remove problems. */ - if (unlink(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = unlinkat(chdir_fd, head, 0); +#else + r = unlink(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, 0, "Cannot remove intervening " @@ -2712,7 +2791,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * This is needed to extract hardlinks over * symlinks. */ +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = fstatat(chdir_fd, head, &st, 0); +#else r = la_stat(head, &st); +#endif if (r != 0) { tail[0] = c; if (errno == ENOENT) { @@ -2725,7 +2808,19 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar break; } } else if (S_ISDIR(st.st_mode)) { - if (chdir(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + fd = la_opendirat(chdir_fd, head); + if (fd < 0) + r = -1; + else { + r = 0; + close(chdir_fd); + chdir_fd = fd; + } +#else + r = chdir(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, @@ -2761,16 +2856,21 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar } /* Catches loop exits via break */ tail[0] = c; -#ifdef HAVE_FCHDIR +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + /* If we operate with openat(), fstatat() and unlinkat() there was + * no chdir(), so just close the fd */ + if (chdir_fd >= 0) + close(chdir_fd); +#elif HAVE_FCHDIR /* If we changed directory above, restore it here. */ - if (restore_pwd >= 0) { - r = fchdir(restore_pwd); + if (chdir_fd >= 0) { + r = fchdir(chdir_fd); if (r != 0) { fsobj_error(a_eno, a_estr, errno, "chdir() failure", ""); } - close(restore_pwd); - restore_pwd = -1; + close(chdir_fd); + chdir_fd = -1; if (r != 0) { res = (ARCHIVE_FATAL); } @@ -3387,6 +3487,7 @@ static int set_mode(struct archive_write_disk *a, int mode) { int r = ARCHIVE_OK; + int r2; mode &= 07777; /* Strip off file type bits. */ if (a->todo & TODO_SGID_CHECK) { @@ -3443,16 +3544,26 @@ set_mode(struct archive_write_disk *a, int mode) } if (S_ISLNK(a->mode)) { -#ifdef HAVE_LCHMOD /* - * If this is a symlink, use lchmod(). If the + * If this is a symlink, use fchmod() or lchmod(). If the * platform doesn't support lchmod(), just skip it. A * platform that doesn't provide a way to set * permissions on symlinks probably ignores * permissions on symlinks, so a failure here has no * impact. */ - if (lchmod(a->name, mode) != 0) { +#ifdef HAVE_FCHMOD + if (a->fd > 0) + r2 = fchmod(a->fd, mode); + else +#endif +#ifdef HAVE_LCHMOD + r2 = lchmod(a->name, mode); +#else + /* We don't have lchmod() here and a fd is not given */ + r2 = 0; +#endif + if (r2 != 0) { switch (errno) { case ENOTSUP: case ENOSYS: @@ -3471,7 +3582,6 @@ set_mode(struct archive_write_disk *a, int mode) r = ARCHIVE_WARN; } } -#endif } else if (!S_ISDIR(a->mode)) { /* * If it's not a symlink and not a dir, then use @@ -3480,21 +3590,19 @@ set_mode(struct archive_write_disk *a, int mode) * post-extract fixup, which is handled elsewhere. */ #ifdef HAVE_FCHMOD - if (a->fd >= 0) { - if (fchmod(a->fd, mode) != 0) { - archive_set_error(&a->archive, errno, - "Can't set permissions to 0%o", (int)mode); - r = ARCHIVE_WARN; - } - } else + if (a->fd >= 0) + r2 = fchmod(a->fd, mode); + else #endif - /* If this platform lacks fchmod(), then - * we'll just use chmod(). */ - if (chmod(a->name, mode) != 0) { - archive_set_error(&a->archive, errno, - "Can't set permissions to 0%o", (int)mode); - r = ARCHIVE_WARN; - } + /* If this platform lacks fchmod(), then + * we'll just use chmod(). */ + r2 = chmod(a->name, mode); + + if (r2 != 0) { + archive_set_error(&a->archive, errno, + "Can't set permissions to 0%o", (int)mode); + r = ARCHIVE_WARN; + } } return (r); } Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Tue Jun 11 23:16:13 2019 (r348971) @@ -1948,7 +1948,6 @@ current_fixup(struct archive_write_disk *a, const wcha return (a->current_fixup); } -/* TODO: Make this work. */ /* * TODO: The deep-directory support bypasses this; disable deep directory * support if we're doing symlink checks. @@ -1958,7 +1957,6 @@ current_fixup(struct archive_write_disk *a, const wcha * scan the path and both can be optimized by comparing against other * recent paths. */ -/* TODO: Extend this to support symlinks on Windows Vista and later. */ static int check_symlinks(struct archive_write_disk *a) { Modified: vendor/libarchive/dist/libarchive_fe/line_reader.c ============================================================================== --- vendor/libarchive/dist/libarchive_fe/line_reader.c Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive_fe/line_reader.c Tue Jun 11 23:16:13 2019 (r348971) @@ -49,11 +49,10 @@ __FBSDID("$FreeBSD$"); */ struct lafe_line_reader { FILE *f; - char *buff, *buff_end, *line_start, *line_end, *p; + char *buff, *buff_end, *line_start, *line_end; char *pathname; size_t buff_length; int nullSeparator; /* Lines separated by null, not CR/CRLF/etc. */ - int ret; }; struct lafe_line_reader * Modified: vendor/libarchive/dist/libarchive_fe/passphrase.c ============================================================================== --- vendor/libarchive/dist/libarchive_fe/passphrase.c Tue Jun 11 23:00:55 2019 (r348970) +++ vendor/libarchive/dist/libarchive_fe/passphrase.c Tue Jun 11 23:16:13 2019 (r348971) @@ -23,9 +23,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. */ -/* $OpenBSD: readpassphrase.c,v 1.22 2010/01/13 10:20:54 dtucker Exp $ */ +/* $OpenBSD: readpassphrase.c,v 1.27 2019/01/25 00:19:25 millert Exp $ */ + /* - * Copyright (c) 2000-2002, 2007 Todd C. Miller + * Copyright (c) 2000-2002, 2007, 2010 + * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -199,6 +201,27 @@ restart: } /* + * Turn off echo if possible. + * If we are using a tty but are not the foreground pgrp this will + * generate SIGTTOU, so do it *before* installing the signal handlers. + */ + if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) { + memcpy(&term, &oterm, sizeof(term)); + if (!(flags & RPP_ECHO_ON)) + term.c_lflag &= ~(ECHO | ECHONL); +#ifdef VSTATUS + if (term.c_cc[VSTATUS] != _POSIX_VDISABLE) + term.c_cc[VSTATUS] = _POSIX_VDISABLE; +#endif + (void)tcsetattr(input, _T_FLUSH, &term); + } else { + memset(&term, 0, sizeof(term)); + term.c_lflag |= ECHO; + memset(&oterm, 0, sizeof(oterm)); + oterm.c_lflag |= ECHO; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 11 23:18:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C6C515C9A8C; Tue, 11 Jun 2019 23:18:54 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0A9C84BD3; Tue, 11 Jun 2019 23:18:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE3558983; Tue, 11 Jun 2019 23:18:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNIr4V097471; Tue, 11 Jun 2019 23:18:53 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNIrvt097468; Tue, 11 Jun 2019 23:18:53 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201906112318.x5BNIrvt097468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Jun 2019 23:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348972 - in vendor/libarchive/3.4.0: . build build/ci build/cmake contrib libarchive libarchive_fe tar X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/3.4.0: . build build/ci build/cmake contrib libarchive libarchive_fe tar X-SVN-Commit-Revision: 348972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C0A9C84BD3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:18:54 -0000 Author: mm Date: Tue Jun 11 23:18:53 2019 New Revision: 348972 URL: https://svnweb.freebsd.org/changeset/base/348972 Log: Tag vendor/libarchive/3.4.0 Added: vendor/libarchive/3.4.0/ - copied from r347989, vendor/libarchive/dist/ Replaced: vendor/libarchive/3.4.0/.gitignore - copied unchanged from r348971, vendor/libarchive/dist/.gitignore vendor/libarchive/3.4.0/CMakeLists.txt - copied unchanged from r348971, vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/3.4.0/NEWS - copied unchanged from r348971, vendor/libarchive/dist/NEWS vendor/libarchive/3.4.0/README.md - copied unchanged from r348971, vendor/libarchive/dist/README.md vendor/libarchive/3.4.0/build/ci/build.sh - copied unchanged from r348971, vendor/libarchive/dist/build/ci/build.sh vendor/libarchive/3.4.0/build/cmake/config.h.in - copied unchanged from r348971, vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/3.4.0/build/version - copied unchanged from r348971, vendor/libarchive/dist/build/version vendor/libarchive/3.4.0/configure.ac - copied unchanged from r348971, vendor/libarchive/dist/configure.ac vendor/libarchive/3.4.0/contrib/libarchive.spec - copied unchanged from r348971, vendor/libarchive/dist/contrib/libarchive.spec vendor/libarchive/3.4.0/libarchive/archive.h - copied unchanged from r348971, vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/3.4.0/libarchive/archive_entry.h - copied unchanged from r348971, vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/3.4.0/libarchive/archive_write_add_filter_b64encode.c - copied unchanged from r348971, vendor/libarchive/dist/libarchive/archive_write_add_filter_b64encode.c vendor/libarchive/3.4.0/libarchive/archive_write_disk_posix.c - copied unchanged from r348971, vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/3.4.0/libarchive/archive_write_disk_windows.c - copied unchanged from r348971, vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/3.4.0/libarchive_fe/line_reader.c - copied unchanged from r348971, vendor/libarchive/dist/libarchive_fe/line_reader.c vendor/libarchive/3.4.0/libarchive_fe/passphrase.c - copied unchanged from r348971, vendor/libarchive/dist/libarchive_fe/passphrase.c vendor/libarchive/3.4.0/tar/bsdtar.1 - copied unchanged from r348971, vendor/libarchive/dist/tar/bsdtar.1 Copied: vendor/libarchive/3.4.0/.gitignore (from r348971, vendor/libarchive/dist/.gitignore) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/3.4.0/.gitignore Tue Jun 11 23:18:53 2019 (r348972, copy of r348971, vendor/libarchive/dist/.gitignore) @@ -0,0 +1,72 @@ +*~ +*.o +*.exe +*.la +*.lo +*.cmake +.deps/ +.libs/ +.dirstamp +Makefile +Makefile.in +aclocal.m4 +autom4te.cache/ +bsdcat +bsdcpio +bsdtar +build/autoconf/compile +build/autoconf/config.guess +build/autoconf/config.sub +build/autoconf/depcomp +build/autoconf/install-sh +build/autoconf/libtool.m4 +build/autoconf/ltmain.sh +build/autoconf/ltoptions.m4 +build/autoconf/ltsugar.m4 +build/autoconf/ltversion.m4 +build/autoconf/lt~obsolete.m4 +build/autoconf/missing +build/pkgconfig/libarchive.pc +cat/test/list.h +config.cache +config.h +config.h.in +config.log +config.status +configure +cpio/test/list.h +libarchive/test/list.h +libtool +stamp-h1 +tar/test/list.h +CMakeCache.txt +CMakeFiles/ +DartConfiguration.tcl +cmake.tmp/ + +doc/html/*.html +doc/man/*.1 +doc/man/*.3 +doc/man/*.5 +doc/pdf/*.pdf +doc/text/*.txt +doc/wiki/*.wiki + +libarchive-*.tar.gz +libarchive-*.zip + +Testing/ +libarchive/libarchive.a +libarchive/libarchive.so +libarchive/libarchive.so.* + +.DS_Store + +/*_test +/*_test.log +/*_test.trs +build/autoconf/test-driver +test-suite.log + +.sw? +.*.sw? Copied: vendor/libarchive/3.4.0/CMakeLists.txt (from r348971, vendor/libarchive/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/3.4.0/CMakeLists.txt Tue Jun 11 23:18:53 2019 (r348972, copy of r348971, vendor/libarchive/dist/CMakeLists.txt) @@ -0,0 +1,2012 @@ +# +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``_ROOT`` variables. +endif() +# +PROJECT(libarchive C) +# +SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") +if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) +endif() +# +# Set the Build type for make based generators. +# You can choose following types: +# Debug : Debug build +# Release : Release build +# RelWithDebInfo : Release build with Debug Info +# MinSizeRel : Release Min Size build +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) +# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the +# value type is "UNINITIALIZED". +GET_PROPERTY(cached_type CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) +IF("${cached_type}" STREQUAL "UNINITIALIZED") + SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE) +ENDIF("${cached_type}" STREQUAL "UNINITIALIZED") +# Check the Build Type. +IF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") + MESSAGE(FATAL_ERROR + "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n" + "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel") +ENDIF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") + +# On MacOS, prefer MacPorts libraries to system libraries. +# I haven't come up with a compelling argument for this to be conditional. +list(APPEND CMAKE_PREFIX_PATH /opt/local) +# Enable @rpath in the install name. +# detail in "cmake --help-policy CMP0042" +SET(CMAKE_MACOSX_RPATH ON) + +# +# Version - read from 'version' file. +# +FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version) +STRING(REGEX REPLACE + "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]*$" "\\1" _major ${_version}) +STRING(REGEX REPLACE + "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]*$" "\\1" _minor ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]*$" "\\1" _revision ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]*)$" "\\1" _quality ${_version}) +SET(_version_number ${_major}${_minor}${_revision}) +STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_minor ${_minor}) +STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_revision ${_revision}) +# +SET(VERSION "${_major}.${_trimmed_minor}.${_trimmed_revision}${_quality}") +SET(BSDCPIO_VERSION_STRING "${VERSION}") +SET(BSDTAR_VERSION_STRING "${VERSION}") +SET(BSDCAT_VERSION_STRING "${VERSION}") +SET(LIBARCHIVE_VERSION_NUMBER "${_version_number}") +SET(LIBARCHIVE_VERSION_STRING "${VERSION}") + +# INTERFACE_VERSION increments with every release +# libarchive 2.7 == interface version 9 = 2 + 7 +# libarchive 2.8 == interface version 10 = 2 + 8 +# libarchive 2.9 == interface version 11 = 2 + 9 +# libarchive 3.0 == interface version 12 +# libarchive 3.1 == interface version 13 +math(EXPR INTERFACE_VERSION "13 + ${_minor}") + +# Set SOVERSION == Interface version +# ?? Should there be more here ?? +SET(SOVERSION "${INTERFACE_VERSION}") + +# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros +# saving and restoring the state of the variables. +INCLUDE(CMakePushCheckState) + +# Initialize the state of the variables. This initialization is not +# necessary but this shows you what value the variables initially have. +SET(CMAKE_REQUIRED_DEFINITIONS) +SET(CMAKE_REQUIRED_INCLUDES) +SET(CMAKE_REQUIRED_LIBRARIES) +SET(CMAKE_REQUIRED_FLAGS) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." ON) +else () + OPTION(ENABLE_WERROR "Treat warnings as errors - default is ON for Debug, OFF otherwise." OFF) +endif () + +# Especially for early development, we want to be a little +# aggressive about diagnosing build problems; this can get +# relaxed somewhat in final shipping versions. +IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") + SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual") +ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") +IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") + SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual") +ENDIF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") +IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + SET(CMAKE_C_COMPILER "xlc_r") + SET(CMAKE_REQUIRED_FLAGS "-qflag=e:e -qformat=sec") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=e:e -qformat=sec") + if (ENABLE_WERROR) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qhalt=w") + endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qflag=w:w") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use") +ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$") +IF (MSVC) + if (ENABLE_WERROR) + # /WX option is the same as gcc's -Werror option. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + # Enable level 4 C4061: The enumerate has no associated handler in a switch + # statement. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") + # Enable level 4 C4254: A larger bit field was assigned to a smaller bit + # field. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") + # Enable level 4 C4295: An array was initialized but the last character in + # the array is not a null; accessing the array may + # produce unexpected results. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4295") + # Enable level 4 C4296: An unsigned variable was used in a comparison + # operation with zero. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4296") + # Enable level 4 C4389: An operation involved signed and unsigned variables. + # This could result in a loss of data. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4389") + # Enable level 4 C4505: The given function is local and not referenced in + # the body of the module; therefore, the function is + # dead code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4505") + # Enable level 4 C4514: The optimizer removed an inline function that is not + # called. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4514") + # Enable level 4 C4702: Unreachable code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4702") + # Enable level 4 C4706: The test value in a conditional expression was the + # result of an assignment. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") + # /Oi option enables built-in functions. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") + ################################################################# + # Set compile flags for release build. + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi") +ENDIF (MSVC) + +# Enable CTest/CDash support +include(CTest) + +OPTION(ENABLE_NETTLE "Enable use of Nettle" ON) +OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON) +OPTION(ENABLE_LIBB2 "Enable the use of the system LIBB2 library if found" ON) +OPTION(ENABLE_LZ4 "Enable the use of the system LZ4 library if found" ON) +OPTION(ENABLE_LZO "Enable the use of the system LZO library if found" OFF) +OPTION(ENABLE_LZMA "Enable the use of the system LZMA library if found" ON) +OPTION(ENABLE_ZSTD "Enable the use of the system zstd library if found" ON) + +OPTION(ENABLE_ZLIB "Enable the use of the system ZLIB library if found" ON) +OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON) +OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON) +OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON) +OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON) +OPTION(ENABLE_LibGCC "Enable the use of the system LibGCC library if found" ON) +# CNG is used for encrypt/decrypt Zip archives on Windows. +OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON) + +OPTION(ENABLE_TAR "Enable tar building" ON) +OPTION(ENABLE_TAR_SHARED "Enable dynamic build of tar" FALSE) +OPTION(ENABLE_CPIO "Enable cpio building" ON) +OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" FALSE) +OPTION(ENABLE_CAT "Enable cat building" ON) +OPTION(ENABLE_CAT_SHARED "Enable dynamic build of cat" FALSE) +OPTION(ENABLE_XATTR "Enable extended attribute support" ON) +OPTION(ENABLE_ACL "Enable ACL support" ON) +OPTION(ENABLE_ICONV "Enable iconv support" ON) +OPTION(ENABLE_TEST "Enable unit and regression tests" ON) +OPTION(ENABLE_COVERAGE "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)" FALSE) +OPTION(ENABLE_INSTALL "Enable installing of libraries" ON) + +SET(POSIX_REGEX_LIB "AUTO" CACHE STRING "Choose what library should provide POSIX regular expression support") +SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)") +SET(WINDOWS_VERSION "WIN7" CACHE STRING "Set Windows version to use (Windows only)") + +IF(ENABLE_COVERAGE) + include(LibarchiveCodeCoverage) +ENDIF(ENABLE_COVERAGE) + +IF(ENABLE_TEST) + ENABLE_TESTING() +ENDIF(ENABLE_TEST) + +IF(WIN32) + IF(WINDOWS_VERSION STREQUAL "WIN8") + SET(NTDDI_VERSION 0x06020000) + SET(_WIN32_WINNT 0x0602) + SET(WINVER 0x0602) + ELSEIF(WINDOWS_VERSION STREQUAL "WIN7") + SET(NTDDI_VERSION 0x06010000) + SET(_WIN32_WINNT 0x0601) + SET(WINVER 0x0601) + ELSEIF(WINDOWS_VERSION STREQUAL "WS08") + SET(NTDDI_VERSION 0x06000100) + SET(_WIN32_WINNT 0x0600) + SET(WINVER 0x0600) + ELSEIF(WINDOWS_VERSION STREQUAL "VISTA") + SET(NTDDI_VERSION 0x06000000) + SET(_WIN32_WINNT 0x0600) + SET(WINVER 0x0600) + ELSEIF(WINDOWS_VERSION STREQUAL "WS03") + SET(NTDDI_VERSION 0x05020000) + SET(_WIN32_WINNT 0x0502) + SET(WINVER 0x0502) + ELSEIF(WINDOWS_VERSION STREQUAL "WINXP") + SET(NTDDI_VERSION 0x05010000) + SET(_WIN32_WINNT 0x0501) + SET(WINVER 0x0501) + ELSE(WINDOWS_VERSION STREQUAL "WIN8") + # Default to Windows Server 2003 API if we don't recognize the specifier + SET(NTDDI_VERSION 0x05020000) + SET(_WIN32_WINNT 0x0502) + SET(WINVER 0x0502) + ENDIF(WINDOWS_VERSION STREQUAL "WIN8") +ENDIF(WIN32) + +IF(MSVC) + IF(ENABLE_SAFESEH STREQUAL "YES") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH") + SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH") + SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH") + ELSEIF(ENABLE_SAFESEH STREQUAL "NO") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO") + SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO") + SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH:NO") + ENDIF(ENABLE_SAFESEH STREQUAL "YES") +ENDIF(MSVC) + +IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$") + ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t +ENDIF() + +# +INCLUDE(CheckCSourceCompiles) +INCLUDE(CheckCSourceRuns) +INCLUDE(CheckFileOffsetBits) +INCLUDE(CheckFuncs) +INCLUDE(CheckHeaderDirent) +INCLUDE(CheckIncludeFile) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckLibraryExists) +INCLUDE(CheckStructHasMember) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckTypeExists) +INCLUDE(CheckTypeSize) + +# +# Generate list.h +# +MACRO (GENERATE_LIST_H _listfile _cmlist __list_sources) + SET(_argv ${ARGV}) + # Remove _listfile and _cmlist from _argv + LIST(REMOVE_AT _argv 0 1) + IF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") + + MESSAGE(STATUS "Generating ${_listfile}") + FILE(WRITE ${_listfile} "") + FOREACH (testfile ${_argv}) + IF (testfile MATCHES "^test_[^/]+[.]c$") + FILE(STRINGS ${testfile} testvar REGEX "^DEFINE_TEST") + FOREACH (deftest ${testvar}) + FILE(APPEND ${_listfile} "${deftest}\n") + ENDFOREACH (deftest) + ENDIF (testfile MATCHES "^test_[^/]+[.]c$") + ENDFOREACH (testfile) + + ENDIF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") +ENDMACRO (GENERATE_LIST_H) +# +# Generate installation rules for man pages. +# +MACRO (INSTALL_MAN __mans) + FOREACH (_man ${ARGV}) + STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man}) + INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}") + ENDFOREACH (_man) +ENDMACRO (INSTALL_MAN __mans) +# +# Find out what macro is needed to use libraries on Windows. +# +MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES + TRY_TYPE SAMPLE_SOURCE MACRO_LIST) + IF(WIN32 AND NOT CYGWIN) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_INCLUDES ${INCLUDES}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBRARIES}) + FOREACH(VAR ${MACRO_LIST}) + # Clear ${VAR} from CACHE If the libraries which ${VAR} was + # checked with are changed. + SET(VAR_WITH_LIB "${VAR}_WITH_LIB") + GET_PROPERTY(PREV_VAR_WITH_LIB VARIABLE PROPERTY ${VAR_WITH_LIB}) + IF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + UNSET(${VAR} CACHE) + ENDIF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + # Check if the library can be used with the macro. + IF("${TRY_TYPE}" MATCHES "COMPILES") + CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR}) + ELSEIF("${TRY_TYPE}" MATCHES "RUNS") + CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR}) + ELSE("${TRY_TYPE}" MATCHES "COMPILES") + MESSAGE(FATAL_ERROR "UNKNOWN KEYWORD \"${TRY_TYPE}\" FOR TRY_TYPE") + ENDIF("${TRY_TYPE}" MATCHES "COMPILES") + # Save the libraries which ${VAR} is checked with. + SET(${VAR_WITH_LIB} "${LIBRARIES}" CACHE INTERNAL + "Macro ${VAR} is checked with") + ENDFOREACH(VAR) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(WIN32 AND NOT CYGWIN) +ENDMACRO (TRY_MACRO_FOR_LIBRARY) +# +# Check compress/decompress libraries +# +IF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) + # GnuWin32 is only for Win32, not Win64. + SET(__GNUWIN32PATH "C:/Program Files/GnuWin32") +ENDIF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) +IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + # You have to add a path availabel DLL file into PATH environment variable. + # Maybe DLL path is "C:/Program Files/GnuWin32/bin". + # The zlib and the bzip2 Setup program have installed programs and DLLs into + # "C:/Program Files/GnuWin32" by default. + # This is convenience setting for Windows. + SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) + # + # If you didn't use Setup program or installed into nonstandard path, + # cmake cannot find out your zlib or bzip2 libraries and include files, + # you should execute cmake with -DCMAKE_PREFIX_PATH option. + # e.g. + # cmake -DCMAKE_PREFIX_PATH= + # + # If compiling error occurred in zconf.h, You may need patch to zconf.h. + #--- zconf.h.orig 2005-07-21 00:40:26.000000000 + #+++ zconf.h 2009-01-19 11:39:10.093750000 + #@@ -286,7 +286,7 @@ + # + # #if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */ + # # include /* for off_t */ + #-# include /* for SEEK_* and off_t */ + #+# include /* for SEEK_* and off_t */ + # # ifdef VMS + # # include /* for off_t */ + # # endif +ENDIF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + +SET(ADDITIONAL_LIBS "") +# +# Find ZLIB +# +IF(ENABLE_ZLIB) + FIND_PACKAGE(ZLIB) +ELSE() + SET(ZLIB_FOUND FALSE) # Override cached value +ENDIF() +IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + IF(WIN32 AND NOT CYGWIN) + # + # Test if ZLIB_WINAPI macro is needed to use. + # + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + RUNS + "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" + ZLIB_WINAPI) + IF(ZLIB_WINAPI) + ADD_DEFINITIONS(-DZLIB_WINAPI) + ELSE(ZLIB_WINAPI) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + COMPILES + "#include \nint main() {return zlibVersion()?1:0; }" + "ZLIB_DLL;WITHOUT_ZLIB_DLL") + IF(ZLIB_DLL) + ADD_DEFINITIONS(-DZLIB_DLL) + ENDIF(ZLIB_DLL) + ENDIF(ZLIB_WINAPI) + ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(ZLIB_FOUND) +MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY) +# +# Find BZip2 +# +IF(ENABLE_BZip2) + FIND_PACKAGE(BZip2) +ELSE() + SET(BZIP2_FOUND FALSE) # Override cached value +ENDIF() +IF(BZIP2_FOUND) + SET(HAVE_LIBBZ2 1) + SET(HAVE_BZLIB_H 1) + INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${BZIP2_INCLUDE_DIR}" "${BZIP2_LIBRARIES}" + COMPILES + "#include \nint main() {return BZ2_bzlibVersion()?1:0; }" + "USE_BZIP2_DLL;USE_BZIP2_STATIC") + IF(USE_BZIP2_DLL) + ADD_DEFINITIONS(-DUSE_BZIP2_DLL) + ELSEIF(USE_BZIP2_STATIC) + ADD_DEFINITIONS(-DUSE_BZIP2_STATIC) + ENDIF(USE_BZIP2_DLL) +ENDIF(BZIP2_FOUND) +MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES) + + +# +# Find LZMA +# +IF(ENABLE_LZMA) + FIND_PACKAGE(LibLZMA) +ELSE() + SET(LIBLZMA_FOUND FALSE) # Override cached value +ENDIF() + +IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + CMAKE_PUSH_CHECK_STATE() + SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${LIBLZMA_INCLUDE_DIRS}" "${LIBLZMA_LIBRARIES}" + COMPILES + "#include \nint main() {return (int)lzma_version_number(); }" + "WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC") + IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) + ADD_DEFINITIONS(-DLZMA_API_STATIC) + ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) + CMAKE_POP_CHECK_STATE() +ELSE(LIBLZMA_FOUND) +# LZMA not found and will not be used. +ENDIF(LIBLZMA_FOUND) +MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY) + +# +# Find LZO2 +# +IF(ENABLE_LZO) + IF (LZO2_INCLUDE_DIR) + # Already in cache, be silent + SET(LZO2_FIND_QUIETLY TRUE) + ENDIF (LZO2_INCLUDE_DIR) + + FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h) + FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR) +ELSE(ENABLE_LZO) + SET(LZO2_FOUND FALSE) # Override cached value +ENDIF(ENABLE_LZO) +IF(LZO2_FOUND) + SET(HAVE_LIBLZO2 1) + SET(HAVE_LZO_LZOCONF_H 1) + SET(HAVE_LZO_LZO1X_H 1) + INCLUDE_DIRECTORIES(${LZO2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZO2_LIBRARY}) + # + # TODO: test for static library. + # +ENDIF(LZO2_FOUND) +MARK_AS_ADVANCED(CLEAR LZO2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LZO2_LIBRARY) +# +# Find libb2 +# +IF(ENABLE_LIBB2) + IF (LIBB2_INCLUDE_DIR) + # Already in cache, be silent + SET(LIBB2_FIND_QUIETLY TRUE) + ENDIF (LIBB2_INCLUDE_DIR) + + FIND_PATH(LIBB2_INCLUDE_DIR blake2.h) + FIND_LIBRARY(LIBB2_LIBRARY NAMES b2 libb2) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBB2 DEFAULT_MSG LIBB2_LIBRARY LIBB2_INCLUDE_DIR) +ELSE(ENABLE_LIBB2) + SET(LIBB2_FOUND FALSE) # Override cached value +ENDIF(ENABLE_LIBB2) +IF(LIBB2_FOUND) + SET(HAVE_LIBB2 1) + SET(HAVE_BLAKE2_H 1) + SET(ARCHIVE_BLAKE2 FALSE) + LIST(APPEND ADDITIONAL_LIBS ${LIBB2_LIBRARY}) + CMAKE_PUSH_CHECK_STATE() + SET(CMAKE_REQUIRED_LIBRARIES ${LIBB2_LIBRARY}) + SET(CMAKE_REQUIRED_INCLUDES ${LIBB2_INCLUDE_DIR}) + CHECK_FUNCTION_EXISTS(blake2sp_init HAVE_LIBB2) + CMAKE_POP_CHECK_STATE() +ELSE(LIBB2_FOUND) + SET(ARCHIVE_BLAKE2 TRUE) +ENDIF(LIBB2_FOUND) +# +# Find LZ4 +# +IF(ENABLE_LZ4) + IF (LZ4_INCLUDE_DIR) + # Already in cache, be silent + SET(LZ4_FIND_QUIETLY TRUE) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) + FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) +ELSE(ENABLE_LZ4) + SET(LZ4_FOUND FALSE) # Override cached value +ENDIF(ENABLE_LZ4) +IF(LZ4_FOUND) + SET(HAVE_LIBLZ4 1) + SET(HAVE_LZ4_H 1) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIR}) + CHECK_INCLUDE_FILES("lz4hc.h" HAVE_LZ4HC_H) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + INCLUDE_DIRECTORIES(${LZ4_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZ4_LIBRARY}) + # + # TODO: test for static library. + # +ENDIF(LZ4_FOUND) +MARK_AS_ADVANCED(CLEAR LZ4_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LZ4_LIBRARY) +# +# Find Zstd +# +IF(ENABLE_ZSTD) + IF (ZSTD_INCLUDE_DIR) + # Already in cache, be silent + SET(ZSTD_FIND_QUIETLY TRUE) + ENDIF (ZSTD_INCLUDE_DIR) + + FIND_PATH(ZSTD_INCLUDE_DIR zstd.h) + FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR) +ELSE(ENABLE_ZSTD) + SET(ZSTD_FOUND FALSE) # Override cached value +ENDIF(ENABLE_ZSTD) +IF(ZSTD_FOUND) + SET(HAVE_ZSTD_H 1) + INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZSTD_LIBRARY}) + CMAKE_PUSH_CHECK_STATE() + SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY}) + SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR}) + CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD) + # + # TODO: test for static library. + # + CMAKE_POP_CHECK_STATE() +ENDIF(ZSTD_FOUND) +MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY) + + +# +# Check headers +# +CHECK_HEADER_DIRENT() + +SET(INCLUDES "") +MACRO (LA_CHECK_INCLUDE_FILE header var) + CHECK_INCLUDE_FILES("${INCLUDES};${header}" ${var}) + IF (${var}) + SET(INCLUDES ${INCLUDES} ${header}) + ENDIF (${var}) +ENDMACRO (LA_CHECK_INCLUDE_FILE) + +# Some FreeBSD headers assume sys/types.h was already included. +LA_CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) + +# Alphabetize the rest unless there's a compelling reason +LA_CHECK_INCLUDE_FILE("acl/libacl.h" HAVE_ACL_LIBACL_H) +LA_CHECK_INCLUDE_FILE("attr/xattr.h" HAVE_ATTR_XATTR_H) +LA_CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H) +LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H) +LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H) +LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) +LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H) +LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H) + +CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS) + +LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) +LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H) +LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) +LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H) +LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H) +LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H) +LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H) +LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H) +LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H) + +CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return FS_IOC_GETFLAGS; }" HAVE_WORKING_FS_IOC_GETFLAGS) + +LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H) +LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H) +LA_CHECK_INCLUDE_FILE("membership.h" HAVE_MEMBERSHIP_H) +LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) +LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H) +LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H) +LA_CHECK_INCLUDE_FILE("process.h" HAVE_PROCESS_H) +LA_CHECK_INCLUDE_FILE("pthread.h" HAVE_PTHREAD_H) +LA_CHECK_INCLUDE_FILE("pwd.h" HAVE_PWD_H) +LA_CHECK_INCLUDE_FILE("readpassphrase.h" HAVE_READPASSPHRASE_H) +LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) +LA_CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H) +LA_CHECK_INCLUDE_FILE("spawn.h" HAVE_SPAWN_H) +LA_CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H) +LA_CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) +LA_CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H) +LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) +LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) +LA_CHECK_INCLUDE_FILE("sys/acl.h" HAVE_SYS_ACL_H) +LA_CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H) +LA_CHECK_INCLUDE_FILE("sys/extattr.h" HAVE_SYS_EXTATTR_H) +LA_CHECK_INCLUDE_FILE("sys/ioctl.h" HAVE_SYS_IOCTL_H) +LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H) +LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H) +LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H) +LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) +LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H) +LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H) +LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) +LA_CHECK_INCLUDE_FILE("sys/statfs.h" HAVE_SYS_STATFS_H) +LA_CHECK_INCLUDE_FILE("sys/statvfs.h" HAVE_SYS_STATVFS_H) +LA_CHECK_INCLUDE_FILE("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H) +LA_CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H) +LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H) +LA_CHECK_INCLUDE_FILE("sys/utsname.h" HAVE_SYS_UTSNAME_H) +LA_CHECK_INCLUDE_FILE("sys/vfs.h" HAVE_SYS_VFS_H) +LA_CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H) +LA_CHECK_INCLUDE_FILE("sys/xattr.h" HAVE_SYS_XATTR_H) +LA_CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H) +LA_CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) +LA_CHECK_INCLUDE_FILE("utime.h" HAVE_UTIME_H) +LA_CHECK_INCLUDE_FILE("wchar.h" HAVE_WCHAR_H) +LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H) +LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H) +IF(ENABLE_CNG) + LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H) + IF(HAVE_BCRYPT_H) + LIST(APPEND ADDITIONAL_LIBS "Bcrypt") + ENDIF(HAVE_BCRYPT_H) +ELSE(ENABLE_CNG) + UNSET(HAVE_BCRYPT_H CACHE) +ENDIF(ENABLE_CNG) +# Following files need windows.h, so we should test it after windows.h test. +LA_CHECK_INCLUDE_FILE("wincrypt.h" HAVE_WINCRYPT_H) +LA_CHECK_INCLUDE_FILE("winioctl.h" HAVE_WINIOCTL_H) + +# +# Check whether use of __EXTENSIONS__ is safe. +# We need some macro such as _GNU_SOURCE to use extension functions. +# +SET(_INCLUDE_FILES) +FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") +ENDFOREACH (it) + +CHECK_C_SOURCE_COMPILES( + "#define __EXTENSIONS__ 1 + ${_INCLUDE_FILES} + int main() { return 0;}" + SAFE_TO_DEFINE_EXTENSIONS) + +# +# Find Nettle +# +IF(ENABLE_NETTLE) + FIND_PACKAGE(Nettle) + IF(NETTLE_FOUND) + SET(HAVE_LIBNETTLE 1) + LIST(APPEND ADDITIONAL_LIBS ${NETTLE_LIBRARIES}) + INCLUDE_DIRECTORIES(${NETTLE_INCLUDE_DIR}) + + LIST(APPEND CMAKE_REQUIRED_INCLUDES ${NETTLE_INCLUDE_DIR}) + LA_CHECK_INCLUDE_FILE("nettle/aes.h" HAVE_NETTLE_AES_H) + LA_CHECK_INCLUDE_FILE("nettle/hmac.h" HAVE_NETTLE_HMAC_H) + LA_CHECK_INCLUDE_FILE("nettle/md5.h" HAVE_NETTLE_MD5_H) + LA_CHECK_INCLUDE_FILE("nettle/pbkdf2.h" HAVE_NETTLE_PBKDF2_H) + LA_CHECK_INCLUDE_FILE("nettle/ripemd160.h" HAVE_NETTLE_RIPEMD160_H) + LA_CHECK_INCLUDE_FILE("nettle/sha.h" HAVE_NETTLE_SHA_H) + + ENDIF(NETTLE_FOUND) + MARK_AS_ADVANCED(CLEAR NETTLE_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR NETTLE_LIBRARIES) +ENDIF(ENABLE_NETTLE) + +# +# Find OpenSSL +# (Except on Mac, where OpenSSL is deprecated.) +# +IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY}) + ENDIF(OPENSSL_FOUND) +ELSE() + SET(OPENSSL_FOUND FALSE) # Override cached value +ENDIF() + +# FreeBSD libmd +IF(NOT OPENSSL_FOUND) + CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) + IF(LIBMD_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_LIBRARIES "md") + FIND_LIBRARY(LIBMD_LIBRARY NAMES md) + LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(LIBMD_FOUND) +ENDIF(NOT OPENSSL_FOUND) + +# +# How to prove that CRYPTO functions, which have several names on various +# platforms, just see if archive_digest.c can compile and link against +# required libraries. +# +MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + FOREACH(ALGORITHM ${ALGORITHMS}) + IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) + STRING(TOLOWER "${ALGORITHM}" lower_algorithm) + STRING(TOUPPER "${ALGORITHM}" algorithm) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) + SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) + ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NOT NETTLE_FOUND) + SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) + + IF(NOT DEFINED ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + # Probe the local implementation for whether this + # crypto implementation is available on this platform. + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/libarchive;${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp") + SET(TRY_CRYPTO_REQUIRED_LIBS) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NETTLE_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${NETTLE_INCLUDE_DIR}") + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${NETTLE_LIBRARY}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^LIBMD$" AND LIBMD_FOUND) + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${LIBMD_LIBRARY}") + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h) + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h" + CONFDEFS_H) + FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/libarchive/archive_digest.c" + ARCHIVE_CRYPTO_C) + + SET(SOURCE "${CONFDEFS_H} + +#define ARCHIVE_${algorithm}_COMPILE_TEST +#define ARCHIVE_CRYPTO_${algorithm}_${IMPLEMENTATION} +#define PLATFORM_CONFIG_H \"check_crypto_md.h\" + +${ARCHIVE_CRYPTO_C} + +int +main(int argc, char **argv) +{ + archive_${lower_algorithm}_ctx ctx; + archive_${lower_algorithm}_init(&ctx); + archive_${lower_algorithm}_update(&ctx, *argv, argc); + archive_${lower_algorithm}_final(&ctx, NULL); + return 0; +} +") + + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.h" "") + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.c" "${SOURCE}") + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}") + + TRY_COMPILE(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.c + CMAKE_FLAGS + "${TRY_CRYPTO_REQUIRED_LIBS}" + "${TRY_CRYPTO_REQUIRED_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + # Inform user whether or not we found it; if not, log why we didn't. + IF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} -- found") + SET(ARCHIVE_CRYPTO_${ALGORITHM} 1) + ELSE (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} -- not found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT DEFINED ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + + # Add appropriate libs/includes depending on whether the implementation + # was found on this platform. + IF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) + LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) + ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) + ENDFOREACH(ALGORITHM ${ALGORITHMS}) +ENDMACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + +# +# CRYPTO functions on Windows is defined at archive_windows.c, thus we do not +# need the test what the functions can be mapped to archive_{crypto name}_init, +# archive_{crypto name}_update and archive_{crypto name}_final. +# The functions on Windows use CALG_{crypto name} macro to create a crypt object +# and then we need to know what CALG_{crypto name} macros is available to show +# ARCHIVE_CRYPTO_{crypto name}_WIN macros because Windows 2000 and earlier version +# of Windows XP do not support SHA256, SHA384 and SHA512. +# +MACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) + IF(WIN32 AND NOT CYGWIN) + FOREACH(CRYPTO ${CRYPTO_LIST}) + IF(NOT ARCHIVE_CRYPTO_${CRYPTO}) + IF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN) + STRING(TOUPPER "${CRYPTO}" crypto) + SET(ALGID "") + IF ("${CRYPTO}" MATCHES "^MD5$") + SET(ALGID "CALG_MD5") + ENDIF ("${CRYPTO}" MATCHES "^MD5$") + IF ("${CRYPTO}" MATCHES "^SHA1$") + SET(ALGID "CALG_SHA1") + ENDIF ("${CRYPTO}" MATCHES "^SHA1$") + IF ("${CRYPTO}" MATCHES "^SHA256$") + SET(ALGID "CALG_SHA_256") + ENDIF ("${CRYPTO}" MATCHES "^SHA256$") + IF ("${CRYPTO}" MATCHES "^SHA384$") + SET(ALGID "CALG_SHA_384") + ENDIF ("${CRYPTO}" MATCHES "^SHA384$") + IF ("${CRYPTO}" MATCHES "^SHA512$") + SET(ALGID "CALG_SHA_512") + ENDIF ("${CRYPTO}" MATCHES "^SHA512$") *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 11 23:23:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F19D515C9C76; Tue, 11 Jun 2019 23:23:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9167384FE2; Tue, 11 Jun 2019 23:23:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53F808B24; Tue, 11 Jun 2019 23:23:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNN2Fe002326; Tue, 11 Jun 2019 23:23:02 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNN2j1002325; Tue, 11 Jun 2019 23:23:02 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201906112323.x5BNN2j1002325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Jun 2019 23:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348973 - vendor/libarchive/3.4.0 X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: vendor/libarchive/3.4.0 X-SVN-Commit-Revision: 348973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9167384FE2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:23:03 -0000 Author: mm Date: Tue Jun 11 23:23:01 2019 New Revision: 348973 URL: https://svnweb.freebsd.org/changeset/base/348973 Log: Re-tag vendor/libarchive/3.4.0 Replaced: vendor/libarchive/3.4.0/ - copied from r348971, vendor/libarchive/dist/ From owner-svn-src-all@freebsd.org Tue Jun 11 23:28:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AA5515C9D10; Tue, 11 Jun 2019 23:28:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35B3F85166; Tue, 11 Jun 2019 23:28:08 +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 07F318B27; Tue, 11 Jun 2019 23:28:08 +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 x5BNS7xh002573; Tue, 11 Jun 2019 23:28:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNS7NJ002572; Tue, 11 Jun 2019 23:28:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906112328.x5BNS7NJ002572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 11 Jun 2019 23:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348974 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 348974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35B3F85166 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:28:08 -0000 Author: jhb Date: Tue Jun 11 23:28:07 2019 New Revision: 348974 URL: https://svnweb.freebsd.org/changeset/base/348974 Log: Move declaration of warninterval out from under COMPAT_FREEBSD32. This fixes builds of kernels without COMPAT_FREEBSD32. Reported by: tinderbox MFC after: 1 month Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Tue Jun 11 23:23:01 2019 (r348973) +++ head/sys/opencrypto/cryptodev.c Tue Jun 11 23:28:07 2019 (r348974) @@ -146,11 +146,6 @@ struct cryptostats32 { #define CIOCGSESSION232 _IOWR('c', 106, struct session2_op32) #define CIOCKEY232 _IOWR('c', 107, struct crypt_kop32) -static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; -SYSCTL_TIMEVAL_SEC(_kern, OID_AUTO, cryptodev_warn_interval, CTLFLAG_RW, - &warninterval, - "Delay in seconds between warnings of deprecated /dev/crypto algorithms"); - static void session_op_from_32(const struct session_op32 *from, struct session_op *to) { @@ -298,6 +293,11 @@ struct fcrypt { TAILQ_HEAD(csessionlist, csession) csessions; int sesn; }; + +static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; +SYSCTL_TIMEVAL_SEC(_kern, OID_AUTO, cryptodev_warn_interval, CTLFLAG_RW, + &warninterval, + "Delay in seconds between warnings of deprecated /dev/crypto algorithms"); static int cryptof_ioctl(struct file *, u_long, void *, struct ucred *, struct thread *); From owner-svn-src-all@freebsd.org Tue Jun 11 23:35:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B056015CA02E; Tue, 11 Jun 2019 23:35:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C75585643; Tue, 11 Jun 2019 23:35:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 190158CD3; Tue, 11 Jun 2019 23:35:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNZYfx007554; Tue, 11 Jun 2019 23:35:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNZYfe007553; Tue, 11 Jun 2019 23:35:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906112335.x5BNZYfe007553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 11 Jun 2019 23:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348975 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 348975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C75585643 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:35:35 -0000 Author: bdrewery Date: Tue Jun 11 23:35:34 2019 New Revision: 348975 URL: https://svnweb.freebsd.org/changeset/base/348975 Log: Restore genassym.o to CLEANFILES. This was lost in r335910 for some reason. This also fixes a META_MODE rebuild issue in some modules [1]. MFC after: 2 weeks Reported by: npn [1] Sponsored by: DellEMC Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Jun 11 23:28:07 2019 (r348974) +++ head/sys/conf/kmod.mk Tue Jun 11 23:35:34 2019 (r348975) @@ -500,7 +500,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) -CLEANFILES+= assym.inc +CLEANFILES+= assym.inc genassym.o DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif From owner-svn-src-all@freebsd.org Tue Jun 11 23:35:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 251DD15CA05B; Tue, 11 Jun 2019 23:35:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7A4685734; Tue, 11 Jun 2019 23:35:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E7B08CD4; Tue, 11 Jun 2019 23:35:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNZn5J007605; Tue, 11 Jun 2019 23:35:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNZnBd007604; Tue, 11 Jun 2019 23:35:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906112335.x5BNZnBd007604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 11 Jun 2019 23:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348976 - head/sys/modules/efirt X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/modules/efirt X-SVN-Commit-Revision: 348976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7A4685734 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:35:50 -0000 Author: bdrewery Date: Tue Jun 11 23:35:49 2019 New Revision: 348976 URL: https://svnweb.freebsd.org/changeset/base/348976 Log: Add missing DPSRCS entry for assym.inc. This brings in various CLEANFILES/DEPENDOBJS handling. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/sys/modules/efirt/Makefile Modified: head/sys/modules/efirt/Makefile ============================================================================== --- head/sys/modules/efirt/Makefile Tue Jun 11 23:35:34 2019 (r348975) +++ head/sys/modules/efirt/Makefile Tue Jun 11 23:35:49 2019 (r348976) @@ -11,6 +11,7 @@ SRCS+= device_if.h bus_if.h clock_if.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h SRCS+= efirt_support.S +DPSRCS+= assym.inc efirt_support.o: efirt_support.S assym.inc ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} From owner-svn-src-all@freebsd.org Tue Jun 11 23:43:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2865215CA2B3; Tue, 11 Jun 2019 23:43:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCD9085BE0; Tue, 11 Jun 2019 23:43:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91E7C8E77; Tue, 11 Jun 2019 23:43:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5BNhUBG013166; Tue, 11 Jun 2019 23:43:30 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5BNhTV1013157; Tue, 11 Jun 2019 23:43:29 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201906112343.x5BNhTV1013157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 11 Jun 2019 23:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r348977 - in vendor/libarchive/dist: . build libarchive X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . build libarchive X-SVN-Commit-Revision: 348977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BCD9085BE0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2019 23:43:31 -0000 Author: mm Date: Tue Jun 11 23:43:29 2019 New Revision: 348977 URL: https://svnweb.freebsd.org/changeset/base/348977 Log: Update vendor/libarchive/dist to git 91b5c59ada211293bd3d9fd6e803ebfc07085c04 - cosmetic changes only Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/build/version vendor/libarchive/dist/configure.ac vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/CMakeLists.txt Tue Jun 11 23:43:29 2019 (r348977) @@ -18,7 +18,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/build/version Tue Jun 11 23:43:29 2019 (r348977) @@ -1 +1 @@ -3004000 +3004001dev Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/configure.ac Tue Jun 11 23:43:29 2019 (r348977) @@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.4.0]) -m4_define([LIBARCHIVE_VERSION_N],[3004000]) +m4_define([LIBARCHIVE_VERSION_S],[3.4.1dev]) +m4_define([LIBARCHIVE_VERSION_N],[3004001]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/libarchive/archive.h Tue Jun 11 23:43:29 2019 (r348977) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3004000 +#define ARCHIVE_VERSION_NUMBER 3004001 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.1dev" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: vendor/libarchive/dist/libarchive/archive_entry.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.h Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/libarchive/archive_entry.h Tue Jun 11 23:43:29 2019 (r348977) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3004000 +#define ARCHIVE_VERSION_NUMBER 3004001 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Tue Jun 11 23:35:49 2019 (r348976) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Tue Jun 11 23:43:29 2019 (r348977) @@ -3544,26 +3544,16 @@ set_mode(struct archive_write_disk *a, int mode) } if (S_ISLNK(a->mode)) { +#ifdef HAVE_LCHMOD /* - * If this is a symlink, use fchmod() or lchmod(). If the + * If this is a symlink, use lchmod(). If the * platform doesn't support lchmod(), just skip it. A * platform that doesn't provide a way to set * permissions on symlinks probably ignores * permissions on symlinks, so a failure here has no * impact. */ -#ifdef HAVE_FCHMOD - if (a->fd > 0) - r2 = fchmod(a->fd, mode); - else -#endif -#ifdef HAVE_LCHMOD - r2 = lchmod(a->name, mode); -#else - /* We don't have lchmod() here and a fd is not given */ - r2 = 0; -#endif - if (r2 != 0) { + if (lchmod(a->name, mode) != 0) { switch (errno) { case ENOTSUP: case ENOSYS: @@ -3582,6 +3572,7 @@ set_mode(struct archive_write_disk *a, int mode) r = ARCHIVE_WARN; } } +#endif } else if (!S_ISDIR(a->mode)) { /* * If it's not a symlink and not a dir, then use From owner-svn-src-all@freebsd.org Wed Jun 12 00:03:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D948F15CA98B; Wed, 12 Jun 2019 00:03:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 793048648A; Wed, 12 Jun 2019 00:03:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F1C491D9; Wed, 12 Jun 2019 00:03:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5C0321p023179; Wed, 12 Jun 2019 00:03:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5C030G9023172; Wed, 12 Jun 2019 00:03:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906120003.x5C030G9023172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 12 Jun 2019 00:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348979 - in head/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw X-SVN-Commit-Revision: 348979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 793048648A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 00:03:03 -0000 Author: bdrewery Date: Wed Jun 12 00:03:00 2019 New Revision: 348979 URL: https://svnweb.freebsd.org/changeset/base/348979 Log: Stop using .OODATE for extracting firmware. This fixes META_MODE rebuilding since it assumes that it this is a non-consistent build command. These are always unencoded consistently though and do not need to use the .OODATE/$? mechanism. MFC after: 2 weeks Reported by: npn Sponsored by: DellEMC Modified: head/sys/modules/iwmfw/Makefile.inc head/sys/modules/iwnfw/Makefile.inc head/sys/modules/mwlfw/Makefile head/sys/modules/ralfw/Makefile.inc head/sys/modules/rtwnfw/Makefile.inc head/sys/modules/usb/rsufw/Makefile.inc head/sys/modules/usb/runfw/Makefile Modified: head/sys/modules/iwmfw/Makefile.inc ============================================================================== --- head/sys/modules/iwmfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/iwmfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/iwnfw/Makefile.inc ============================================================================== --- head/sys/modules/iwnfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/iwnfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/mwlfw/Makefile ============================================================================== --- head/sys/modules/mwlfw/Makefile Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/mwlfw/Makefile Wed Jun 12 00:03:00 2019 (r348979) @@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot CLEANFILES+= mw88W8363.fw mwlboot.fw mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include Modified: head/sys/modules/ralfw/Makefile.inc ============================================================================== --- head/sys/modules/ralfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/ralfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ CLEANFILES+= ${_FIRM} FIRMWS= ${_FIRM}:${KMOD} ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/rtwnfw/Makefile.inc ============================================================================== --- head/sys/modules/rtwnfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/rtwnfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:111 # FIRMWARE_LICENSE= realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/usb/rsufw/Makefile.inc ============================================================================== --- head/sys/modules/usb/rsufw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/usb/rsufw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:120 # FIRMWARE_LICENSE= realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/usb/runfw/Makefile ============================================================================== --- head/sys/modules/usb/runfw/Makefile Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/usb/runfw/Makefile Wed Jun 12 00:03:00 2019 (r348979) @@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1 CLEANFILES= run.fw run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include From owner-svn-src-all@freebsd.org Wed Jun 12 01:53:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60CCA15CC4CA; Wed, 12 Jun 2019 01:53:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFA6C88F99; Wed, 12 Jun 2019 01:53:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6A9FA423; Wed, 12 Jun 2019 01:53:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5C1rG1v080122; Wed, 12 Jun 2019 01:53:16 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5C1rFlk080113; Wed, 12 Jun 2019 01:53:15 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906120153.x5C1rFlk080113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 12 Jun 2019 01:53:15 +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: r348980 - in stable/11: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpa... X-SVN-Group: stable-11 X-SVN-Commit-Author: des X-SVN-Commit-Paths: in stable/11: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc/man contrib/openpam... X-SVN-Commit-Revision: 348980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EFA6C88F99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 01:53:17 -0000 Author: des Date: Wed Jun 12 01:53:14 2019 New Revision: 348980 URL: https://svnweb.freebsd.org/changeset/base/348980 Log: MFH (r313975, r315909, r317827, r344533): upgrade to latest OpenPAM Approved by: re (gjb) Added: stable/11/contrib/openpam/m4/ - copied from r313975, head/contrib/openpam/m4/ stable/11/contrib/openpam/m4/ax_pkg_config.m4 - copied unchanged from r344533, head/contrib/openpam/m4/ax_pkg_config.m4 stable/11/contrib/openpam/misc/Makefile.am - copied unchanged from r313975, head/contrib/openpam/misc/Makefile.am stable/11/contrib/openpam/misc/Makefile.in - copied, changed from r313975, head/contrib/openpam/misc/Makefile.in stable/11/contrib/openpam/misc/coverage.sh.in - copied unchanged from r313975, head/contrib/openpam/misc/coverage.sh.in stable/11/contrib/openpam/misc/coverity.sh.in - copied unchanged from r313975, head/contrib/openpam/misc/coverity.sh.in stable/11/contrib/openpam/modules/pam_return/ - copied from r313975, head/contrib/openpam/modules/pam_return/ stable/11/contrib/openpam/t/t_openpam_dispatch.c - copied, changed from r313975, head/contrib/openpam/t/t_openpam_dispatch.c stable/11/contrib/openpam/t/t_pam_conv.c - copied, changed from r313975, head/contrib/openpam/t/t_pam_conv.c stable/11/contrib/openpam/t/t_pam_conv.h - copied, changed from r313975, head/contrib/openpam/t/t_pam_conv.h stable/11/contrib/openpam/t/t_pam_env.c - copied unchanged from r344533, head/contrib/openpam/t/t_pam_env.c stable/11/contrib/openpam/t/t_pam_err.c - copied unchanged from r344533, head/contrib/openpam/t/t_pam_err.c stable/11/contrib/openpam/t/t_pam_err.h - copied unchanged from r344533, head/contrib/openpam/t/t_pam_err.h Deleted: stable/11/contrib/openpam/pamgdb.in stable/11/contrib/openpam/t/t.h stable/11/contrib/openpam/t/t_file.c stable/11/contrib/openpam/t/t_main.c stable/11/lib/libpam/libpam/tests/ Modified: stable/11/contrib/openpam/CREDITS stable/11/contrib/openpam/HISTORY stable/11/contrib/openpam/LICENSE stable/11/contrib/openpam/Makefile.am stable/11/contrib/openpam/Makefile.in stable/11/contrib/openpam/README stable/11/contrib/openpam/RELNOTES stable/11/contrib/openpam/TODO stable/11/contrib/openpam/aclocal.m4 stable/11/contrib/openpam/autogen.sh stable/11/contrib/openpam/bin/Makefile.am stable/11/contrib/openpam/bin/Makefile.in stable/11/contrib/openpam/bin/openpam_dump_policy/Makefile.am stable/11/contrib/openpam/bin/openpam_dump_policy/Makefile.in stable/11/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c stable/11/contrib/openpam/bin/pamtest/Makefile.am stable/11/contrib/openpam/bin/pamtest/Makefile.in stable/11/contrib/openpam/bin/pamtest/pamtest.1 stable/11/contrib/openpam/bin/pamtest/pamtest.c stable/11/contrib/openpam/bin/su/Makefile.am stable/11/contrib/openpam/bin/su/Makefile.in stable/11/contrib/openpam/bin/su/su.1 stable/11/contrib/openpam/bin/su/su.c stable/11/contrib/openpam/compile stable/11/contrib/openpam/config.guess stable/11/contrib/openpam/config.h.in stable/11/contrib/openpam/config.sub stable/11/contrib/openpam/configure stable/11/contrib/openpam/configure.ac stable/11/contrib/openpam/depcomp stable/11/contrib/openpam/doc/Makefile.am stable/11/contrib/openpam/doc/Makefile.in stable/11/contrib/openpam/doc/man/Makefile.am stable/11/contrib/openpam/doc/man/Makefile.in stable/11/contrib/openpam/doc/man/openpam.3 stable/11/contrib/openpam/doc/man/openpam.man stable/11/contrib/openpam/doc/man/openpam_borrow_cred.3 stable/11/contrib/openpam/doc/man/openpam_free_data.3 stable/11/contrib/openpam/doc/man/openpam_free_envlist.3 stable/11/contrib/openpam/doc/man/openpam_get_feature.3 stable/11/contrib/openpam/doc/man/openpam_get_option.3 stable/11/contrib/openpam/doc/man/openpam_log.3 stable/11/contrib/openpam/doc/man/openpam_nullconv.3 stable/11/contrib/openpam/doc/man/openpam_readline.3 stable/11/contrib/openpam/doc/man/openpam_readlinev.3 stable/11/contrib/openpam/doc/man/openpam_readword.3 stable/11/contrib/openpam/doc/man/openpam_restore_cred.3 stable/11/contrib/openpam/doc/man/openpam_set_feature.3 stable/11/contrib/openpam/doc/man/openpam_set_option.3 stable/11/contrib/openpam/doc/man/openpam_straddch.3 stable/11/contrib/openpam/doc/man/openpam_subst.3 stable/11/contrib/openpam/doc/man/openpam_ttyconv.3 stable/11/contrib/openpam/doc/man/pam.3 stable/11/contrib/openpam/doc/man/pam.conf.5 stable/11/contrib/openpam/doc/man/pam.man stable/11/contrib/openpam/doc/man/pam_acct_mgmt.3 stable/11/contrib/openpam/doc/man/pam_authenticate.3 stable/11/contrib/openpam/doc/man/pam_chauthtok.3 stable/11/contrib/openpam/doc/man/pam_close_session.3 stable/11/contrib/openpam/doc/man/pam_conv.3 stable/11/contrib/openpam/doc/man/pam_end.3 stable/11/contrib/openpam/doc/man/pam_error.3 stable/11/contrib/openpam/doc/man/pam_get_authtok.3 stable/11/contrib/openpam/doc/man/pam_get_data.3 stable/11/contrib/openpam/doc/man/pam_get_item.3 stable/11/contrib/openpam/doc/man/pam_get_user.3 stable/11/contrib/openpam/doc/man/pam_getenv.3 stable/11/contrib/openpam/doc/man/pam_getenvlist.3 stable/11/contrib/openpam/doc/man/pam_info.3 stable/11/contrib/openpam/doc/man/pam_open_session.3 stable/11/contrib/openpam/doc/man/pam_prompt.3 stable/11/contrib/openpam/doc/man/pam_putenv.3 stable/11/contrib/openpam/doc/man/pam_set_data.3 stable/11/contrib/openpam/doc/man/pam_set_item.3 stable/11/contrib/openpam/doc/man/pam_setcred.3 stable/11/contrib/openpam/doc/man/pam_setenv.3 stable/11/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 stable/11/contrib/openpam/doc/man/pam_sm_authenticate.3 stable/11/contrib/openpam/doc/man/pam_sm_chauthtok.3 stable/11/contrib/openpam/doc/man/pam_sm_close_session.3 stable/11/contrib/openpam/doc/man/pam_sm_open_session.3 stable/11/contrib/openpam/doc/man/pam_sm_setcred.3 stable/11/contrib/openpam/doc/man/pam_start.3 stable/11/contrib/openpam/doc/man/pam_strerror.3 stable/11/contrib/openpam/doc/man/pam_verror.3 stable/11/contrib/openpam/doc/man/pam_vinfo.3 stable/11/contrib/openpam/doc/man/pam_vprompt.3 stable/11/contrib/openpam/include/Makefile.am stable/11/contrib/openpam/include/Makefile.in stable/11/contrib/openpam/include/security/Makefile.am stable/11/contrib/openpam/include/security/Makefile.in stable/11/contrib/openpam/include/security/openpam.h stable/11/contrib/openpam/include/security/openpam_attr.h stable/11/contrib/openpam/include/security/openpam_version.h stable/11/contrib/openpam/include/security/pam_appl.h stable/11/contrib/openpam/include/security/pam_constants.h stable/11/contrib/openpam/include/security/pam_modules.h stable/11/contrib/openpam/include/security/pam_types.h stable/11/contrib/openpam/install-sh stable/11/contrib/openpam/lib/Makefile.am stable/11/contrib/openpam/lib/Makefile.in stable/11/contrib/openpam/lib/libpam/Makefile.am stable/11/contrib/openpam/lib/libpam/Makefile.in stable/11/contrib/openpam/lib/libpam/openpam_asprintf.c stable/11/contrib/openpam/lib/libpam/openpam_asprintf.h stable/11/contrib/openpam/lib/libpam/openpam_borrow_cred.c stable/11/contrib/openpam/lib/libpam/openpam_check_owner_perms.c stable/11/contrib/openpam/lib/libpam/openpam_configure.c stable/11/contrib/openpam/lib/libpam/openpam_constants.c stable/11/contrib/openpam/lib/libpam/openpam_constants.h stable/11/contrib/openpam/lib/libpam/openpam_cred.h stable/11/contrib/openpam/lib/libpam/openpam_ctype.h stable/11/contrib/openpam/lib/libpam/openpam_debug.h stable/11/contrib/openpam/lib/libpam/openpam_dispatch.c stable/11/contrib/openpam/lib/libpam/openpam_dlfunc.h stable/11/contrib/openpam/lib/libpam/openpam_dynamic.c stable/11/contrib/openpam/lib/libpam/openpam_features.c stable/11/contrib/openpam/lib/libpam/openpam_features.h stable/11/contrib/openpam/lib/libpam/openpam_findenv.c stable/11/contrib/openpam/lib/libpam/openpam_free_data.c stable/11/contrib/openpam/lib/libpam/openpam_free_envlist.c stable/11/contrib/openpam/lib/libpam/openpam_get_feature.c stable/11/contrib/openpam/lib/libpam/openpam_get_option.c stable/11/contrib/openpam/lib/libpam/openpam_impl.h stable/11/contrib/openpam/lib/libpam/openpam_load.c stable/11/contrib/openpam/lib/libpam/openpam_log.c stable/11/contrib/openpam/lib/libpam/openpam_nullconv.c stable/11/contrib/openpam/lib/libpam/openpam_readline.c stable/11/contrib/openpam/lib/libpam/openpam_readlinev.c stable/11/contrib/openpam/lib/libpam/openpam_readword.c stable/11/contrib/openpam/lib/libpam/openpam_restore_cred.c stable/11/contrib/openpam/lib/libpam/openpam_set_feature.c stable/11/contrib/openpam/lib/libpam/openpam_set_option.c stable/11/contrib/openpam/lib/libpam/openpam_static.c stable/11/contrib/openpam/lib/libpam/openpam_straddch.c stable/11/contrib/openpam/lib/libpam/openpam_strlcat.c stable/11/contrib/openpam/lib/libpam/openpam_strlcat.h stable/11/contrib/openpam/lib/libpam/openpam_strlcmp.h stable/11/contrib/openpam/lib/libpam/openpam_strlcpy.c stable/11/contrib/openpam/lib/libpam/openpam_strlcpy.h stable/11/contrib/openpam/lib/libpam/openpam_strlset.c stable/11/contrib/openpam/lib/libpam/openpam_strlset.h stable/11/contrib/openpam/lib/libpam/openpam_subst.c stable/11/contrib/openpam/lib/libpam/openpam_ttyconv.c stable/11/contrib/openpam/lib/libpam/openpam_vasprintf.c stable/11/contrib/openpam/lib/libpam/openpam_vasprintf.h stable/11/contrib/openpam/lib/libpam/pam_acct_mgmt.c stable/11/contrib/openpam/lib/libpam/pam_authenticate.c stable/11/contrib/openpam/lib/libpam/pam_authenticate_secondary.c stable/11/contrib/openpam/lib/libpam/pam_chauthtok.c stable/11/contrib/openpam/lib/libpam/pam_close_session.c stable/11/contrib/openpam/lib/libpam/pam_end.c stable/11/contrib/openpam/lib/libpam/pam_error.c stable/11/contrib/openpam/lib/libpam/pam_get_authtok.c stable/11/contrib/openpam/lib/libpam/pam_get_data.c stable/11/contrib/openpam/lib/libpam/pam_get_item.c stable/11/contrib/openpam/lib/libpam/pam_get_mapped_authtok.c stable/11/contrib/openpam/lib/libpam/pam_get_mapped_username.c stable/11/contrib/openpam/lib/libpam/pam_get_user.c stable/11/contrib/openpam/lib/libpam/pam_getenv.c stable/11/contrib/openpam/lib/libpam/pam_getenvlist.c stable/11/contrib/openpam/lib/libpam/pam_info.c stable/11/contrib/openpam/lib/libpam/pam_open_session.c stable/11/contrib/openpam/lib/libpam/pam_prompt.c stable/11/contrib/openpam/lib/libpam/pam_putenv.c stable/11/contrib/openpam/lib/libpam/pam_set_data.c stable/11/contrib/openpam/lib/libpam/pam_set_item.c stable/11/contrib/openpam/lib/libpam/pam_set_mapped_authtok.c stable/11/contrib/openpam/lib/libpam/pam_set_mapped_username.c stable/11/contrib/openpam/lib/libpam/pam_setcred.c stable/11/contrib/openpam/lib/libpam/pam_setenv.c stable/11/contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c stable/11/contrib/openpam/lib/libpam/pam_sm_authenticate.c stable/11/contrib/openpam/lib/libpam/pam_sm_authenticate_secondary.c stable/11/contrib/openpam/lib/libpam/pam_sm_chauthtok.c stable/11/contrib/openpam/lib/libpam/pam_sm_close_session.c stable/11/contrib/openpam/lib/libpam/pam_sm_get_mapped_authtok.c stable/11/contrib/openpam/lib/libpam/pam_sm_get_mapped_username.c stable/11/contrib/openpam/lib/libpam/pam_sm_open_session.c stable/11/contrib/openpam/lib/libpam/pam_sm_set_mapped_authtok.c stable/11/contrib/openpam/lib/libpam/pam_sm_set_mapped_username.c stable/11/contrib/openpam/lib/libpam/pam_sm_setcred.c stable/11/contrib/openpam/lib/libpam/pam_start.c stable/11/contrib/openpam/lib/libpam/pam_strerror.c stable/11/contrib/openpam/lib/libpam/pam_verror.c stable/11/contrib/openpam/lib/libpam/pam_vinfo.c stable/11/contrib/openpam/lib/libpam/pam_vprompt.c stable/11/contrib/openpam/ltmain.sh stable/11/contrib/openpam/misc/gendoc.pl stable/11/contrib/openpam/missing stable/11/contrib/openpam/mkpkgng.in stable/11/contrib/openpam/modules/Makefile.am stable/11/contrib/openpam/modules/Makefile.in stable/11/contrib/openpam/modules/pam_deny/Makefile.am stable/11/contrib/openpam/modules/pam_deny/Makefile.in stable/11/contrib/openpam/modules/pam_deny/pam_deny.c stable/11/contrib/openpam/modules/pam_permit/Makefile.am stable/11/contrib/openpam/modules/pam_permit/Makefile.in stable/11/contrib/openpam/modules/pam_permit/pam_permit.c stable/11/contrib/openpam/modules/pam_return/Makefile.am stable/11/contrib/openpam/modules/pam_return/Makefile.in stable/11/contrib/openpam/modules/pam_return/pam_return.c stable/11/contrib/openpam/modules/pam_unix/Makefile.am stable/11/contrib/openpam/modules/pam_unix/Makefile.in stable/11/contrib/openpam/modules/pam_unix/pam_unix.c stable/11/contrib/openpam/t/Makefile.am stable/11/contrib/openpam/t/Makefile.in stable/11/contrib/openpam/t/t_openpam_ctype.c stable/11/contrib/openpam/t/t_openpam_readlinev.c stable/11/contrib/openpam/t/t_openpam_readword.c stable/11/contrib/openpam/test-driver stable/11/lib/libpam/libpam/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/openpam/CREDITS ============================================================================== --- stable/11/contrib/openpam/CREDITS Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/CREDITS Wed Jun 12 01:53:14 2019 (r348980) @@ -43,10 +43,12 @@ ideas: Mikhail Teterin Mikko Työläjärvi Nick Hibma + Patrick Bihan-Faou Robert Watson Ruslan Ermilov Sebastian Krahmer Solar Designer Takanori Saneto + Tim Creech Wojciech A. Koszek Yar Tikhiy Modified: stable/11/contrib/openpam/HISTORY ============================================================================== --- stable/11/contrib/openpam/HISTORY Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/HISTORY Wed Jun 12 01:53:14 2019 (r348980) @@ -1,3 +1,49 @@ +OpenPAM Tabebuia 2019-02-24 + + - BUGFIX: Fix off-by-one bug in pam_getenv(3) which was introduced in + OpenPAM Radula. + + - ENHANCE: Add unit tests for pam_{get,put,set}env(3). +============================================================================ +OpenPAM Resedacea 2017-04-30 + + - BUGFIX: Reinstore the NULL check in pam_end(3) which was removed in + OpenPAM Radula, as it breaks common error-handling constructs. + + - BUGFIX: Return PAM_SYMBOL_ERR instead of PAM_SYSTEM_ERR from the + dispatcher when the required service function could not be found. + + - ENHANCE: Introduce the PAM_BAD_HANDLE error code for when pamh is + NULL in API functions that have a NULL check. + + - ENHANCE: Introduce the PAM_BAD_ITEM, PAM_BAD_FEATURE and + PAM_BAD_CONSTANT error codes for situations where we previously + incorrectly used PAM_SYMBOL_ERR to denote that an invalid constant + had been passed to an API function. + + - ENHANCE: Improve the RETURN VALUES section in API man pages, + especially for functions that cannot fail, which were incorrectly + documented as returning -1 on failure. +============================================================================ +OpenPAM Radula 2017-02-19 + + - BUGFIX: Fix an inverted test which prevented pam_get_authtok(3) and + pam_get_user(3) from using application-provided custom prompts. + + - BUGFIX: Plug a memory leak in pam_set_item(3). + + - BUGFIX: Plug a potential memory leak in openpam_readlinev(3). + + - BUGFIX: In openpam_readword(3), support line continuations within + whitespace. + + - ENHANCE: Add a feature flag to control fallback to "other" policy. + + - ENHANCE: Add a pam_return(8) module which returns an arbitrary + code specified in the module options. + + - ENHANCE: More and better unit tests. +============================================================================ OpenPAM Ourouparia 2014-09-12 - ENHANCE: When executing a chain, require at least one service Modified: stable/11/contrib/openpam/LICENSE ============================================================================== --- stable/11/contrib/openpam/LICENSE Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/LICENSE Wed Jun 12 01:53:14 2019 (r348980) @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2012 Dag-Erling Smørgrav +Copyright (c) 2004-2019 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and Modified: stable/11/contrib/openpam/Makefile.am ============================================================================== --- stable/11/contrib/openpam/Makefile.am Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/Makefile.am Wed Jun 12 01:53:14 2019 (r348980) @@ -1,8 +1,8 @@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include +SUBDIRS = misc include lib bin modules if WITH_DOC SUBDIRS += doc Modified: stable/11/contrib/openpam/Makefile.in ============================================================================== --- stable/11/contrib/openpam/Makefile.in Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/Makefile.in Wed Jun 12 01:53:14 2019 (r348980) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,9 +14,19 @@ @SET_MAKE@ -# $Id: Makefile.am 816 2014-09-12 07:50:22Z des $ +# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,20 +91,20 @@ build_triplet = @build@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/pamgdb.in $(srcdir)/mkpkgng.in \ - INSTALL README TODO compile config.guess config.sub install-sh \ - missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pkg_config.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = pamgdb mkpkgng +CONFIG_CLEAN_FILES = mkpkgng CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -130,7 +140,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, @@ -152,7 +162,10 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = lib bin modules include doc t +DIST_SUBDIRS = misc include lib bin modules doc t +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \ + config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -208,8 +221,9 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CRYPTO_LIBS = @CRYPTO_LIBS@ -CRYPT_LIBS = @CRYPT_LIBS@ +CRYB_TEST_CFLAGS = @CRYB_TEST_CFLAGS@ +CRYB_TEST_LIBS = @CRYB_TEST_LIBS@ +CRYB_TEST_VERSION = @CRYB_TEST_VERSION@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -238,6 +252,7 @@ LIB_MAJ = @LIB_MAJ@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -256,11 +271,15 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEM_LIBPAM = @SYSTEM_LIBPAM@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -303,6 +322,7 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -315,7 +335,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include $(am__append_1) t +SUBDIRS = misc include lib bin modules $(am__append_1) t EXTRA_DIST = \ CREDITS \ HISTORY \ @@ -345,15 +365,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__c echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -379,8 +398,6 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 -pamgdb: $(top_builddir)/config.status $(srcdir)/pamgdb.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -499,7 +516,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -564,7 +584,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -580,17 +600,17 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -608,7 +628,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -618,22 +638,23 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -809,6 +830,8 @@ uninstall-am: maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. Modified: stable/11/contrib/openpam/README ============================================================================== --- stable/11/contrib/openpam/README Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/README Wed Jun 12 01:53:14 2019 (r348980) @@ -7,19 +7,4 @@ implementations disagree, OpenPAM tries to remain comp Solaris, at the expense of XSSO conformance and Linux-PAM compatibility. -These are some of OpenPAM's features: - - - Implements the complete PAM API as described in the original PAM - paper and in OSF-RFC 86.0; this corresponds to the full XSSO API - except for mappings and secondary authentication. Also - implements some extensions found in Solaris 9. - - - Extends the API with several useful and time-saving functions. - - - Performs strict checking of return values from service modules. - - - Reads configuration from /etc/pam.d/, /etc/pam.conf, - /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; - this will be made configurable in a future release. - Please direct bug reports and inquiries to . Modified: stable/11/contrib/openpam/RELNOTES ============================================================================== --- stable/11/contrib/openpam/RELNOTES Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/RELNOTES Wed Jun 12 01:53:14 2019 (r348980) @@ -1,22 +1,21 @@ - Release notes for OpenPAM Ourouparia - ==================================== + Release notes for OpenPAM Tabebuia + ================================== -This release corresponds to the code used in FreeBSD HEAD as of the -release date, and is also expected to work on almost any POSIX-like -platform that has GNU autotools, GNU make and the GNU compiler suite -installed. +OpenPAM is developed primarily on FreeBSD, but is expected to work on +almost any POSIX-like platform that has GNU autotools, GNU make and +the GNU compiler suite installed. -The distribution consists of the following components: +The OpenPAM distribution consists of the following components: - The PAM library itself, with complete API documentation. - Sample modules (pam_permit, pam_deny and pam_unix) and a sample - application (su) which demonstrate how to use PAM. + application (su) which demonstrate how to use the PAM library. - A test application (pamtest) which can be used to test policies and modules. - - Unit tests for limited portions of the libraries. + - Unit tests for limited portions of the library. Please direct bug reports and inquiries to . Modified: stable/11/contrib/openpam/TODO ============================================================================== --- stable/11/contrib/openpam/TODO Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/TODO Wed Jun 12 01:53:14 2019 (r348980) @@ -1,15 +1,9 @@ -Before the next release: +- Fix try_first_pass / use_first_pass (pam_get_authtok() code & + documentation are slightly incorrect, OpenPAM's pam_unix(8) is + incorrect, all FreeBSD modules are broken) - - Rewrite openpam_ttyconv(3). - - mostly done, needs review. +- Add loop detection to openpam_load_chain(). - - Fix try_first_pass / use_first_pass (pam_get_authtok() code & - documentation are slightly incorrect, OpenPAM's pam_unix(8) is - incorrect, all FreeBSD modules are broken) +- Complete unit tests for openpam_dispatch(). - - Add loop detection to openpam_load_chain(). - - - Look into the possibility of implementing a version of (or a - wrapper for) openpam_log() which respects the PAM_SILENT flag and - the no_warn module option. This would eliminate the need for - FreeBSD's _pam_verbose_error(). +- Stop using PAM_SYMBOL_ERR incorrectly. Modified: stable/11/contrib/openpam/aclocal.m4 ============================================================================== --- stable/11/contrib/openpam/aclocal.m4 Wed Jun 12 00:03:00 2019 (r348979) +++ stable/11/contrib/openpam/aclocal.m4 Wed Jun 12 01:53:14 2019 (r348980) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,8595 +20,8 @@ You have another version of autoconf. It may work, bu If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 12 09:16:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 044E015AEDCF; Wed, 12 Jun 2019 09:16:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83ACE6DA5C; Wed, 12 Jun 2019 09:16:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C6EBF01E; Wed, 12 Jun 2019 09:16:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5C9GhbK009232; Wed, 12 Jun 2019 09:16:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5C9Gh7O009231; Wed, 12 Jun 2019 09:16:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201906120916.x5C9Gh7O009231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Jun 2019 09:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348981 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 348981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 83ACE6DA5C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 09:16:44 -0000 Author: manu Date: Wed Jun 12 09:16:42 2019 New Revision: 348981 URL: https://svnweb.freebsd.org/changeset/base/348981 Log: pkgbase: Set a default package=runtime for var directories This way every directory is at least present in packages. While here tag some directory from being in sendmail or dma Reviewed by: bapt MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20605 Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019 (r348980) +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019 (r348981) @@ -3,7 +3,7 @@ # Please see the file src/etc/mtree/README before making changes to this file. # -/set type=dir uname=root gname=wheel mode=0755 +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime . account .. @@ -32,7 +32,7 @@ .. crash .. - cron tags=package=runtime + cron tabs mode=0700 .. .. @@ -59,21 +59,21 @@ .. .. .. - empty mode=0555 flags=schg tags=package=runtime + empty mode=0555 flags=schg .. games gname=games mode=0775 .. heimdal mode=0700 .. - log tags=package=runtime + log .. - mail gname=mail mode=0775 tags=package=runtime + mail gname=mail mode=0775 .. msgs uname=daemon .. preserve .. - run tags=package=runtime + run dhclient .. ppp gname=network mode=0770 @@ -84,16 +84,18 @@ rwho gname=daemon mode=0775 .. spool - dma uname=root gname=mail mode=0770 + clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail .. - lock uname=uucp gname=dialer mode=0775 + dma uname=root gname=mail mode=0770 tags=package=dma .. + lock uname=uucp gname=dialer + .. /set gname=daemon lpd .. - mqueue + mqueue tags=package=sendmail .. - opielocks mode=0700 + opielocks .. output lpd @@ -101,7 +103,7 @@ .. /set gname=wheel .. - tmp mode=01777 tags=package=runtime + tmp mode=01777 vi.recover mode=01777 .. .. From owner-svn-src-all@freebsd.org Wed Jun 12 09:17:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65B0115AEE44; Wed, 12 Jun 2019 09:17:33 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C416F6DBAE; Wed, 12 Jun 2019 09:17:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7EB7F022; Wed, 12 Jun 2019 09:17:32 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5C9HWEX009308; Wed, 12 Jun 2019 09:17:32 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5C9HWje009307; Wed, 12 Jun 2019 09:17:32 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201906120917.x5C9HWje009307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Jun 2019 09:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348982 - head/etc/sendmail X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc/sendmail X-SVN-Commit-Revision: 348982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C416F6DBAE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 09:17:33 -0000 Author: manu Date: Wed Jun 12 09:17:32 2019 New Revision: 348982 URL: https://svnweb.freebsd.org/changeset/base/348982 Log: pkgbase: Add the correct package for sendmail configuration files Reviewed by: bapt MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20606 Modified: head/etc/sendmail/Makefile Modified: head/etc/sendmail/Makefile ============================================================================== --- head/etc/sendmail/Makefile Wed Jun 12 09:16:42 2019 (r348981) +++ head/etc/sendmail/Makefile Wed Jun 12 09:17:32 2019 (r348982) @@ -64,29 +64,29 @@ ${mc:T:R}.cf: ${mc} all: ${ALL} distribution: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${.CURDIR}/freebsd.submit.mc freebsd.submit.cf ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${SMDIR}/helpfile ${DESTDIR}/etc/mail .if defined(INSTALL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${INSTALL_CF} ${DEST_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ freebsd.cf ${DEST_CF} .endif .if defined(SENDMAIL_ADDITIONAL_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "package=sendmail" \ ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail .endif .if !defined(SENDMAIL_SET_USER_ID) .if defined(INSTALL_SUBMIT_CF) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF} .else - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 -T "package=sendmail" \ freebsd.submit.cf ${DEST_SUBMIT_CF} .endif .endif From owner-svn-src-all@freebsd.org Wed Jun 12 09:18:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 118D815AEEFF; Wed, 12 Jun 2019 09:18:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A57D96DD15; Wed, 12 Jun 2019 09:18:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8081EF026; Wed, 12 Jun 2019 09:18:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5C9INSo009386; Wed, 12 Jun 2019 09:18:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5C9INL1009385; Wed, 12 Jun 2019 09:18:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201906120918.x5C9INL1009385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Jun 2019 09:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348983 - head/etc X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 348983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A57D96DD15 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 09:18:24 -0000 Author: manu Date: Wed Jun 12 09:18:23 2019 New Revision: 348983 URL: https://svnweb.freebsd.org/changeset/base/348983 Log: pkgbase: Add some tags to files installed in distribution target Add the MK_MAIL dependant file to the runtime package as well as the MK_KERBEROS ones the empty locate database, the FreeBSD copyright file and the GENERIC.hints. Tag the unbound link from /etc to /var to belong in the unbound package. Reviewed by: bapt MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20607 Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Jun 12 09:17:32 2019 (r348982) +++ head/etc/Makefile Wed Jun 12 09:18:23 2019 (r348983) @@ -59,7 +59,8 @@ distribution: ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt .if ${MK_UNBOUND} != "no" if [ ! -e ${DESTDIR}/etc/unbound ]; then \ - ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ + ${INSTALL_SYMLINK} -T "package=unbound" \ + ../var/unbound ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" @@ -68,26 +69,29 @@ distribution: .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + -T "package=runtime" \ dot.k5login ${DESTDIR}/root/.k5login; .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - ${ETCMAIL} ${DESTDIR}/etc/mail + -T "package=runtime" ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ + ${INSTALL_SYMLINK} -T "package=runtime" \ + mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif .if ${MK_LOCATE} != "no" - ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ - ${DESTDIR}/var/db/locate.database + ${INSTALL} -o nobody -g ${BINGRP} -m 644 -T "package=runtime"\ + /dev/null ${DESTDIR}/var/db/locate.database .endif cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${FREEBSD} ${DESTDIR}/ + -T "package=runtime" ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + -T "package=runtime" \ ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif From owner-svn-src-all@freebsd.org Wed Jun 12 10:03:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5767F15B02F0; Wed, 12 Jun 2019 10:03:14 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C25586F45B; Wed, 12 Jun 2019 10:03:13 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x5CA3AR6087468; Wed, 12 Jun 2019 03:03:10 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x5CA3AHc087467; Wed, 12 Jun 2019 03:03:10 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201906121003.x5CA3AHc087467@gndrsh.dnsmgr.net> Subject: Re: svn commit: r348981 - head/etc/mtree In-Reply-To: <201906120916.x5C9Gh7O009231@repo.freebsd.org> To: Emmanuel Vadot Date: Wed, 12 Jun 2019 03:03:10 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: C25586F45B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.958,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 10:03:14 -0000 > Author: manu > Date: Wed Jun 12 09:16:42 2019 > New Revision: 348981 > URL: https://svnweb.freebsd.org/changeset/base/348981 > > Log: > pkgbase: Set a default package=runtime for var directories > > This way every directory is at least present in packages. > While here tag some directory from being in sendmail or dma > > Reviewed by: bapt > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D20605 > > Modified: > head/etc/mtree/BSD.var.dist > > Modified: head/etc/mtree/BSD.var.dist > ============================================================================== > --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019 (r348980) > +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019 (r348981) > @@ -3,7 +3,7 @@ > # Please see the file src/etc/mtree/README before making changes to this file. > # > > -/set type=dir uname=root gname=wheel mode=0755 > +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime > . > account > .. > @@ -32,7 +32,7 @@ > .. > crash > .. > - cron tags=package=runtime > + cron > tabs mode=0700 > .. > .. > @@ -59,21 +59,21 @@ > .. > .. > .. > - empty mode=0555 flags=schg tags=package=runtime > + empty mode=0555 flags=schg > .. > games gname=games mode=0775 > .. > heimdal mode=0700 > .. > - log tags=package=runtime > + log > .. > - mail gname=mail mode=0775 tags=package=runtime > + mail gname=mail mode=0775 > .. > msgs uname=daemon > .. > preserve > .. > - run tags=package=runtime > + run > dhclient > .. > ppp gname=network mode=0770 > @@ -84,16 +84,18 @@ > rwho gname=daemon mode=0775 > .. > spool > - dma uname=root gname=mail mode=0770 > + clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail > .. > - lock uname=uucp gname=dialer mode=0775 > + dma uname=root gname=mail mode=0770 tags=package=dma > .. > + lock uname=uucp gname=dialer Is loss of mode=0775 intentional here?? I think that may break cu locks. > + .. > /set gname=daemon > lpd > .. > - mqueue > + mqueue tags=package=sendmail > .. > - opielocks mode=0700 > + opielocks Again, loss of mode??? > .. > output > lpd > @@ -101,7 +103,7 @@ > .. > /set gname=wheel > .. > - tmp mode=01777 tags=package=runtime > + tmp mode=01777 > vi.recover mode=01777 > .. > .. > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Jun 12 10:50:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4CD915B11D0; Wed, 12 Jun 2019 10:50:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D4537053F; Wed, 12 Jun 2019 10:50:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 148FCFF68; Wed, 12 Jun 2019 10:50:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CAoHZ5055718; Wed, 12 Jun 2019 10:50:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CAoHSr055717; Wed, 12 Jun 2019 10:50:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201906121050.x5CAoHSr055717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 12 Jun 2019 10:50: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: r348984 - stable/12/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 348984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D4537053F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 10:50:18 -0000 Author: ae Date: Wed Jun 12 10:50:17 2019 New Revision: 348984 URL: https://svnweb.freebsd.org/changeset/base/348984 Log: MFC r348682: Initialize V_nat64out methods explicitly. It looks like initialization of static variable doesn't work for VIMAGE and this leads to panic. Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Wed Jun 12 09:18:23 2019 (r348983) +++ stable/12/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Wed Jun 12 10:50:17 2019 (r348984) @@ -83,6 +83,8 @@ vnet_ipfw_nat64_init(const void *arg __unused) ch = &V_layer3_chain; first = IS_DEFAULT_VNET(curvnet) ? 1: 0; + /* Initialize V_nat64out methods explicitly. */ + nat64_set_output_method(0); error = nat64stl_init(ch, first); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Wed Jun 12 11:06:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0855615B19E3; Wed, 12 Jun 2019 11:06:53 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7948370EA0; Wed, 12 Jun 2019 11:06:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F573182B5; Wed, 12 Jun 2019 11:06:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CB6qqa066044; Wed, 12 Jun 2019 11:06:52 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CB6qGg066043; Wed, 12 Jun 2019 11:06:52 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906121106.x5CB6qGg066043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 12 Jun 2019 11:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348985 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7948370EA0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:06:53 -0000 Author: cy Date: Wed Jun 12 11:06:51 2019 New Revision: 348985 URL: https://svnweb.freebsd.org/changeset/base/348985 Log: Enclose a long multi-line single conditional statement in braces to improve legibility and aesthetics. MFC after: 1 week Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jun 12 10:50:17 2019 (r348984) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jun 12 11:06:51 2019 (r348985) @@ -211,7 +211,7 @@ vnet_ipf_init(void) else defpass = "no-match -> block"; - if (IS_DEFAULT_VNET(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) { printf("%s initialized. Default = %s all, Logging = %s%s\n", ipfilter_version, defpass, #ifdef IPFILTER_LOG @@ -225,6 +225,7 @@ vnet_ipf_init(void) "" #endif ); + } } VNET_SYSINIT(vnet_ipf_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD, vnet_ipf_init, NULL); From owner-svn-src-all@freebsd.org Wed Jun 12 11:06:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFBC615B1A07; Wed, 12 Jun 2019 11:06:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74CDB70EA1; Wed, 12 Jun 2019 11:06:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E0F2182B6; Wed, 12 Jun 2019 11:06:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CB6ti7066091; Wed, 12 Jun 2019 11:06:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CB6t68066090; Wed, 12 Jun 2019 11:06:55 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906121106.x5CB6t68066090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 12 Jun 2019 11:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348986 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 74CDB70EA1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:06:56 -0000 Author: cy Date: Wed Jun 12 11:06:54 2019 New Revision: 348986 URL: https://svnweb.freebsd.org/changeset/base/348986 Log: Register pfil hooks when VNET != vnet0. r302298, which virtualized ipf, assumed the pfil hook registration performed in ipf_modload() would take care of this. However ipf_modload() is only called when the ipl kld is loaded or when ipfilter is first called when it is statically linked into the kernel at build time. Prior to this, even though r302298 has been in the tree for a while, it has never been used. So, r302298 in reality begins now. PR: 212000 Reported by: ahsanb@ MFC after: 1 month Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jun 12 11:06:51 2019 (r348985) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Jun 12 11:06:54 2019 (r348986) @@ -225,6 +225,9 @@ vnet_ipf_init(void) "" #endif ); + } else { + (void)ipf_pfil_hook(); + ipf_event_reg(); } } VNET_SYSINIT(vnet_ipf_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD, From owner-svn-src-all@freebsd.org Wed Jun 12 11:07:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85E5F15B1A33; Wed, 12 Jun 2019 11:07:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A50B270F3E; Wed, 12 Jun 2019 11:07:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02917182B8; Wed, 12 Jun 2019 11:06:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CB6wXh066154; Wed, 12 Jun 2019 11:06:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CB6wlM066151; Wed, 12 Jun 2019 11:06:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906121106.x5CB6wlM066151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 12 Jun 2019 11:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348987 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A50B270F3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:07:14 -0000 Author: cy Date: Wed Jun 12 11:06:58 2019 New Revision: 348987 URL: https://svnweb.freebsd.org/changeset/base/348987 Log: Resolve IPv6 checksum errors with stateful inspection. According to PR/203585 this appears to have been broken by r235959, which predates the ipfilter 5.1.2 import into FreeBSD. The IPv6 checksum calculation is incorrect. To resolve this we call in6_cksum() to do the the heavy lifting for us, through a new function ipf_pcksum6(). Should we need to revisit this area again, a DTrace probe is added to aid with future debugging. PR: 203275, 203585 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20583 Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Wed Jun 12 11:06:54 2019 (r348986) +++ head/sys/contrib/ipfilter/netinet/fil.c Wed Jun 12 11:06:58 2019 (r348987) @@ -3422,35 +3422,21 @@ fr_cksum(fin, ip, l4proto, l4hdr) sum += *sp++; sum += *sp++; /* ip_dst */ sum += *sp++; + slen = fin->fin_plen - off; + sum += htons(slen); #ifdef USE_INET6 } else if (IP_V(ip) == 6) { + mb_t *m; + + m = fin->fin_m; ip6 = (ip6_t *)ip; - hlen = sizeof(*ip6); - off = ((char *)fin->fin_dp - (char *)fin->fin_ip); - sp = (u_short *)&ip6->ip6_src; - sum += *sp++; /* ip6_src */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - /* This needs to be routing header aware. */ - sum += *sp++; /* ip6_dst */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; + off = ((caddr_t)ip6 - m->m_data) + sizeof(struct ip6_hdr); + int len = ntohs(ip6->ip6_plen) - (off - sizeof(*ip6)); + return(ipf_pcksum6(fin, ip6, off, len)); } else { return 0xffff; } #endif - slen = fin->fin_plen - off; - sum += htons(slen); switch (l4proto) { @@ -6645,6 +6631,12 @@ ipf_checkl4sum(fin) if ((fin->fin_flx & (FI_FRAG|FI_SHORT|FI_BAD)) != 0) return 1; + DT2(l4sumo, int, fin->fin_out, int, (int)fin->fin_p); + if (fin->fin_out == 1) { + fin->fin_cksum = FI_CK_SUMOK; + return 0; + } + csump = NULL; hdrsum = 0; dosum = 0; @@ -6696,7 +6688,11 @@ ipf_checkl4sum(fin) } #endif DT2(l4sums, u_short, hdrsum, u_short, sum); +#ifdef USE_INET6 + if (hdrsum == sum || (sum == 0 && fin->fin_p == IPPROTO_ICMPV6)) { +#else if (hdrsum == sum) { +#endif fin->fin_cksum = FI_CK_SUMOK; return 0; } Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jun 12 11:06:54 2019 (r348986) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jun 12 11:06:58 2019 (r348987) @@ -1836,6 +1836,10 @@ extern int ipf_matchicmpqueryreply __P((int, icmpinfo struct icmp *, int)); extern u_32_t ipf_newisn __P((fr_info_t *)); extern u_int ipf_pcksum __P((fr_info_t *, int, u_int)); +#ifdef USE_INET6 +extern u_int ipf_pcksum6 __P((fr_info_t *, ip6_t *, + u_int32_t, u_int32_t)); +#endif extern void ipf_rule_expire __P((ipf_main_softc_t *)); extern int ipf_scanlist __P((fr_info_t *, u_32_t)); extern frentry_t *ipf_srcgrpmap __P((fr_info_t *, u_32_t *)); Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:06:54 2019 (r348986) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:06:58 2019 (r348987) @@ -1446,3 +1446,56 @@ ipf_pcksum(fin, hlen, sum) sum2 = ~sum & 0xffff; return sum2; } + +#ifdef USE_INET6 +#ifdef _KERNEL +u_int +ipf_pcksum6(fin, ip6, off, len) + fr_info_t *fin; + ip6_t *ip6; + u_int32_t off; + u_int32_t len; +{ + struct mbuf *m; + int sum; + + m = fin->fin_m; + if (m->m_len < sizeof(struct ip6_hdr)) { + return 0xffff; + } + + sum = in6_cksum(m, ip6->ip6_nxt, off, len); + return(sum); +} +#else +u_int +ipf_pcksum6(fin, ip6, off, len) + fr_info_t *fin; + ip6_t *ip6; + u_int32_t off; + u_int32_t len; +{ + u_short *sp; + u_int sum; + + sp = (u_short *)&ip6->ip6_src; + sum = *sp++; /* ip6_src */ + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; /* ip6_dst */ + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + return(ipf_pcksum(fin, off, sum)); +} +#endif +#endif From owner-svn-src-all@freebsd.org Wed Jun 12 11:09:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFB615B1C45; Wed, 12 Jun 2019 11:09:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5506671336; Wed, 12 Jun 2019 11:09:34 +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 2D359182C3; Wed, 12 Jun 2019 11:09:34 +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 x5CB9YeG066329; Wed, 12 Jun 2019 11:09:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CB9XIp066328; Wed, 12 Jun 2019 11:09:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906121109.x5CB9XIp066328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 12 Jun 2019 11:09: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: r348988 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 348988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5506671336 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:09:34 -0000 Author: kib Date: Wed Jun 12 11:09:33 2019 New Revision: 348988 URL: https://svnweb.freebsd.org/changeset/base/348988 Log: MFC r348360: Do not go into sleep in sleepq_catch_signals() when SIGSTOP from PT_ATTACH was consumed. PR: 231445 Modified: stable/12/sys/kern/kern_sig.c stable/12/sys/kern/subr_sleepqueue.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_sig.c ============================================================================== --- stable/12/sys/kern/kern_sig.c Wed Jun 12 11:06:58 2019 (r348987) +++ stable/12/sys/kern/kern_sig.c Wed Jun 12 11:09:33 2019 (r348988) @@ -2577,7 +2577,15 @@ ptracestop(struct thread *td, int sig, ksiginfo_t *si) p->p_xthread == NULL)) { p->p_xsig = sig; p->p_xthread = td; - td->td_dbgflags &= ~TDB_FSTP; + + /* + * If we are on sleepqueue already, + * let sleepqueue code decide if it + * needs to go sleep after attach. + */ + if (td->td_wchan == NULL) + td->td_dbgflags &= ~TDB_FSTP; + p->p_flag2 &= ~P2_PTRACE_FSTP; p->p_flag |= P_STOPPED_SIG | P_STOPPED_TRACE; sig_suspend_threads(td, p, 0); Modified: stable/12/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/12/sys/kern/subr_sleepqueue.c Wed Jun 12 11:06:58 2019 (r348987) +++ stable/12/sys/kern/subr_sleepqueue.c Wed Jun 12 11:09:33 2019 (r348988) @@ -499,6 +499,19 @@ sleepq_catch_signals(void *wchan, int pri) } else { mtx_unlock(&ps->ps_mtx); } + + /* + * Do not go into sleep if this thread was the + * ptrace(2) attach leader. cursig() consumed + * SIGSTOP from PT_ATTACH, but we usually act + * on the signal by interrupting sleep, and + * should do that here as well. + */ + if ((td->td_dbgflags & TDB_FSTP) != 0) { + if (ret == 0) + ret = EINTR; + td->td_dbgflags &= ~TDB_FSTP; + } } /* * Lock the per-process spinlock prior to dropping the PROC_LOCK From owner-svn-src-all@freebsd.org Wed Jun 12 11:18:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D32815B2316; Wed, 12 Jun 2019 11:18:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E433F71938; Wed, 12 Jun 2019 11:18:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4ED218467; Wed, 12 Jun 2019 11:18:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CBIBSQ071475; Wed, 12 Jun 2019 11:18:11 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CBIBNj071474; Wed, 12 Jun 2019 11:18:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906121118.x5CBIBNj071474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 12 Jun 2019 11:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348989 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 348989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E433F71938 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:18:12 -0000 Author: cy Date: Wed Jun 12 11:18:11 2019 New Revision: 348989 URL: https://svnweb.freebsd.org/changeset/base/348989 Log: Whitespace adjustments replacing spaces with tabs. MFC after: 1 month X-MFC with: r348987 Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:09:33 2019 (r348988) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:18:11 2019 (r348989) @@ -1480,21 +1480,21 @@ ipf_pcksum6(fin, ip6, off, len) sp = (u_short *)&ip6->ip6_src; sum = *sp++; /* ip6_src */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; sum += *sp++; /* ip6_dst */ - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; - sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; + sum += *sp++; return(ipf_pcksum(fin, off, sum)); } #endif From owner-svn-src-all@freebsd.org Wed Jun 12 11:29:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F7C515B26B7; Wed, 12 Jun 2019 11:29:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BF6C371E10; Wed, 12 Jun 2019 11:29:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id b1RNhRa2XsAGkb1RQh86XQ; Wed, 12 Jun 2019 05:29:21 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=dq6fvYVFJ5YA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=K2_46mqKuNSSPGngKTgA:9 a=wZHe4CrpH0V6knVJ:21 a=qP5YB1bfD8RQB4mK:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2967D4F7; Wed, 12 Jun 2019 04:29:15 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x5CBTEK5005689; Wed, 12 Jun 2019 04:29:14 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x5CBTEpt005683; Wed, 12 Jun 2019 04:29:14 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201906121129.x5CBTEpt005683@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348989 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Cy Schubert of "Wed, 12 Jun 2019 11:18:11 -0000." <201906121118.x5CBIBNj071474@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 12 Jun 2019 04:29:14 -0700 X-CMAE-Envelope: MS4wfJvADA1BQRfF4YIECcRBek/1dPQR7FILlbNvc+jzLtFWKXAnwmKCFo8aUf+mUY144lvmnz7/EhVsgoiCcoqJVDapN45opzi5XGJiguXnbrt15BnrIt/K m7ETEWFCJ5OpT4w0gcX5TR+whifyjv4WMI2S+NSxnhLgKD78BHG/DmJQMsRpvLXQ7aBOsTaD6CFwsB5m7J2gEy3yaWnQl1MHb+9bwXhbjlCcGVk3uoNUqaYX o4q2CYSXWujKxDzxLCk/RPHB0M7k+EySKcLhPFeTDTogpe8Tvcpcn9HJW3Lp63oI X-Rspamd-Queue-Id: BF6C371E10 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.20 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-2.52)[ip: (-6.71), ipnet: 64.59.128.0/20(-3.26), asn: 6327(-2.52), country: CA(-0.09)]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:29:31 -0000 In message <201906121118.x5CBIBNj071474@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Wed Jun 12 11:18:11 2019 > New Revision: 348989 > URL: https://svnweb.freebsd.org/changeset/base/348989 > > Log: > Whitespace adjustments replacing spaces with tabs. > > MFC after: 1 month > X-MFC with: r348987 > > Modified: > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:0 > 9:33 2019 (r348988) > +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Jun 12 11:1 > 8:11 2019 (r348989) > @@ -1480,21 +1480,21 @@ ipf_pcksum6(fin, ip6, off, len) > > sp = (u_short *)&ip6->ip6_src; > sum = *sp++; /* ip6_src */ > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > sum += *sp++; /* ip6_dst */ > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > - sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > + sum += *sp++; > return(ipf_pcksum(fin, off, sum)); > } > #endif > The reason for this latecomer is this change was in my use-everyday svn tree I boot from while the version with the incorrect whitespace was in my git repo I commit from. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 12 11:34:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59ABC15B2938; Wed, 12 Jun 2019 11:34:17 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE5247223A; Wed, 12 Jun 2019 11:34:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1309187BF; Wed, 12 Jun 2019 11:34:16 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CBYGJE081800; Wed, 12 Jun 2019 11:34:16 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CBYG1Q081799; Wed, 12 Jun 2019 11:34:16 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201906121134.x5CBYG1Q081799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 12 Jun 2019 11:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348990 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 348990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE5247223A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:34:17 -0000 Author: manu Date: Wed Jun 12 11:34:16 2019 New Revision: 348990 URL: https://svnweb.freebsd.org/changeset/base/348990 Log: mtree: Restore mode for /var/spool/lock and opielocks mode was dropped unintentionally in r348981 for those two directories. Reviewed by: rgrimes MFC after: 1 month X-MFC-With: r348981 Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Wed Jun 12 11:18:11 2019 (r348989) +++ head/etc/mtree/BSD.var.dist Wed Jun 12 11:34:16 2019 (r348990) @@ -88,14 +88,14 @@ .. dma uname=root gname=mail mode=0770 tags=package=dma .. - lock uname=uucp gname=dialer + lock uname=uucp gname=dialer mode=0775 .. /set gname=daemon lpd .. mqueue tags=package=sendmail .. - opielocks + opielocks mode=0700 .. output lpd From owner-svn-src-all@freebsd.org Wed Jun 12 11:35:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4398315B29BC; Wed, 12 Jun 2019 11:35:14 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 78B8E7239C; Wed, 12 Jun 2019 11:35:13 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 5fb8504d; Wed, 12 Jun 2019 13:35:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=MXFfYLUhdOgm0t3Ns4TAjCego9k=; b=Nv9aRKj6GsaRB1c/iCmJxyKkDxSw +EHZu67lhR/OOSLYjOQcEs9eTW6Dj10wL1ZfGHPsD7Dp9MFeHgR5kDd6HU7BFE9q I/ofgE8/nHah+dc+XLqdIHYSLO+f6LLgqVvAavOSrcwYYNSmr3u5z2DIER94qYPT NrkzQuLGBe3xiYs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=FmPJCl1fw0giKXh3E3wbSkUWxOR7umbvyLdej+9hfF6COqzCcOKxJEUd 2icYQ8KabuJph3PdvU2nax9QysqIxF/zkXnlII0IOxb+kYX3R0c9hanlyC+t+tQf 9x8WQVB6pHdwTQEy9h19/vwWl2da5doTEsXt7vEd2zlKqLzppoA= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 7f39befb TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 12 Jun 2019 13:35:05 +0200 (CEST) Date: Wed, 12 Jun 2019 13:35:05 +0200 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348981 - head/etc/mtree Message-Id: <20190612133505.aba56f63147c372fecd2d849@bidouilliste.com> In-Reply-To: <201906121003.x5CA3AHc087467@gndrsh.dnsmgr.net> References: <201906120916.x5C9Gh7O009231@repo.freebsd.org> <201906121003.x5CA3AHc087467@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 78B8E7239C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:35:14 -0000 On Wed, 12 Jun 2019 03:03:10 -0700 (PDT) "Rodney W. Grimes" wrote: > > Author: manu > > Date: Wed Jun 12 09:16:42 2019 > > New Revision: 348981 > > URL: https://svnweb.freebsd.org/changeset/base/348981 > > > > Log: > > pkgbase: Set a default package=runtime for var directories > > > > This way every directory is at least present in packages. > > While here tag some directory from being in sendmail or dma > > > > Reviewed by: bapt > > MFC after: 1 month > > Differential Revision: https://reviews.freebsd.org/D20605 > > > > Modified: > > head/etc/mtree/BSD.var.dist > > > > Modified: head/etc/mtree/BSD.var.dist > > ============================================================================== > > --- head/etc/mtree/BSD.var.dist Wed Jun 12 01:53:14 2019 (r348980) > > +++ head/etc/mtree/BSD.var.dist Wed Jun 12 09:16:42 2019 (r348981) > > @@ -3,7 +3,7 @@ > > # Please see the file src/etc/mtree/README before making changes to this file. > > # > > > > -/set type=dir uname=root gname=wheel mode=0755 > > +/set type=dir uname=root gname=wheel mode=0755 tags=package=runtime > > . > > account > > .. > > @@ -32,7 +32,7 @@ > > .. > > crash > > .. > > - cron tags=package=runtime > > + cron > > tabs mode=0700 > > .. > > .. > > @@ -59,21 +59,21 @@ > > .. > > .. > > .. > > - empty mode=0555 flags=schg tags=package=runtime > > + empty mode=0555 flags=schg > > .. > > games gname=games mode=0775 > > .. > > heimdal mode=0700 > > .. > > - log tags=package=runtime > > + log > > .. > > - mail gname=mail mode=0775 tags=package=runtime > > + mail gname=mail mode=0775 > > .. > > msgs uname=daemon > > .. > > preserve > > .. > > - run tags=package=runtime > > + run > > dhclient > > .. > > ppp gname=network mode=0770 > > @@ -84,16 +84,18 @@ > > rwho gname=daemon mode=0775 > > .. > > spool > > - dma uname=root gname=mail mode=0770 > > + clientmqueue uname=smmsp gname=smmsp mode=0770 tags=package=sendmail > > .. > > - lock uname=uucp gname=dialer mode=0775 > > + dma uname=root gname=mail mode=0770 tags=package=dma > > .. > > + lock uname=uucp gname=dialer > > Is loss of mode=0775 intentional here?? I think that may break cu locks. I miss read the mode=0755 above. > > + .. > > /set gname=daemon > > lpd > > .. > > - mqueue > > + mqueue tags=package=sendmail > > .. > > - opielocks mode=0700 > > + opielocks > > Again, loss of mode??? Both mode are restored in 348990, thanks for noticing. > > > .. > > output > > lpd > > @@ -101,7 +103,7 @@ > > .. > > /set gname=wheel > > .. > > - tmp mode=01777 tags=package=runtime > > + tmp mode=01777 > > vi.recover mode=01777 > > .. > > .. > > > > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Wed Jun 12 11:48:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 982CD15B2E91; Wed, 12 Jun 2019 11:48:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 477977294B; Wed, 12 Jun 2019 11:48:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19EF51895F; Wed, 12 Jun 2019 11:48:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CBm81P087171; Wed, 12 Jun 2019 11:48:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CBm4bk087155; Wed, 12 Jun 2019 11:48:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201906121148.x5CBm4bk087155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 12 Jun 2019 11:48: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: r348991 - in stable/12: libexec/rtld-elf sys/compat/linux sys/fs/deadfs sys/fs/nfsclient sys/fs/nullfs sys/fs/tmpfs sys/fs/unionfs sys/kern sys/sys sys/ufs/ufs sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: libexec/rtld-elf sys/compat/linux sys/fs/deadfs sys/fs/nfsclient sys/fs/nullfs sys/fs/tmpfs sys/fs/unionfs sys/kern sys/sys sys/ufs/ufs sys/vm X-SVN-Commit-Revision: 348991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 477977294B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 11:48:09 -0000 Author: kib Date: Wed Jun 12 11:48:04 2019 New Revision: 348991 URL: https://svnweb.freebsd.org/changeset/base/348991 Log: MFC r347151,347181,347968,348421,348698,348701: Switch to use shared vnode locks for text files during image activation. For MFC, VOP_GET_WRITECOUNT was left in the slot for KBI stability, but it is unused. Modified: stable/12/libexec/rtld-elf/rtld.c stable/12/sys/compat/linux/linux_misc.c stable/12/sys/fs/deadfs/dead_vnops.c stable/12/sys/fs/nfsclient/nfs_clbio.c stable/12/sys/fs/nfsclient/nfs_clvnops.c stable/12/sys/fs/nullfs/null_vnops.c stable/12/sys/fs/tmpfs/tmpfs_subr.c stable/12/sys/fs/unionfs/union_subr.c stable/12/sys/kern/imgact_aout.c stable/12/sys/kern/imgact_elf.c stable/12/sys/kern/kern_exec.c stable/12/sys/kern/vfs_default.c stable/12/sys/kern/vfs_subr.c stable/12/sys/kern/vfs_vnops.c stable/12/sys/kern/vnode_if.src stable/12/sys/sys/imgact.h stable/12/sys/sys/vnode.h stable/12/sys/ufs/ufs/ufs_extattr.c stable/12/sys/vm/vm_fault.c stable/12/sys/vm/vm_map.c stable/12/sys/vm/vm_map.h stable/12/sys/vm/vm_mmap.c stable/12/sys/vm/vm_object.c stable/12/sys/vm/vnode_pager.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/libexec/rtld-elf/rtld.c Wed Jun 12 11:48:04 2019 (r348991) @@ -458,7 +458,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr * others x bit is enabled. * mmap(2) does not allow to mmap with PROT_EXEC if * binary' file comes from noexec mount. We cannot - * set VV_TEXT on the binary. + * set a text reference on the binary. */ dir_enable = false; if (st.st_uid == geteuid()) { Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/compat/linux/linux_misc.c Wed Jun 12 11:48:04 2019 (r348991) @@ -258,13 +258,16 @@ linux_uselib(struct thread *td, struct linux_uselib_ar struct nameidata ni; struct vnode *vp; struct exec *a_out; + vm_map_t map; + vm_map_entry_t entry; struct vattr attr; vm_offset_t vmaddr; unsigned long file_offset; unsigned long bss_size; char *library; ssize_t aresid; - int error, locked, writecount; + int error; + bool locked, opened, textset; LCONVPATHEXIST(td, args->library, &library); @@ -274,8 +277,10 @@ linux_uselib(struct thread *td, struct linux_uselib_ar #endif a_out = NULL; - locked = 0; vp = NULL; + locked = false; + textset = false; + opened = false; NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, library, td); @@ -291,17 +296,8 @@ linux_uselib(struct thread *td, struct linux_uselib_ar * From here on down, we have a locked vnode that must be unlocked. * XXX: The code below largely duplicates exec_check_permissions(). */ - locked = 1; + locked = true; - /* Writable? */ - error = VOP_GET_WRITECOUNT(vp, &writecount); - if (error != 0) - goto cleanup; - if (writecount != 0) { - error = ETXTBSY; - goto cleanup; - } - /* Executable? */ error = VOP_GETATTR(vp, &attr, td->td_ucred); if (error) @@ -339,6 +335,7 @@ linux_uselib(struct thread *td, struct linux_uselib_ar error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); if (error) goto cleanup; + opened = true; /* Pull in executable header into exec_map */ error = vm_mmap(exec_map, (vm_offset_t *)&a_out, PAGE_SIZE, @@ -401,15 +398,16 @@ linux_uselib(struct thread *td, struct linux_uselib_ar /* * Prevent more writers. - * XXX: Note that if any of the VM operations fail below we don't - * clear this flag. */ - VOP_SET_TEXT(vp); + error = VOP_SET_TEXT(vp); + if (error != 0) + goto cleanup; + textset = true; /* * Lock no longer needed */ - locked = 0; + locked = false; VOP_UNLOCK(vp, 0); /* @@ -456,11 +454,21 @@ linux_uselib(struct thread *td, struct linux_uselib_ar * Map it all into the process's space as a single * copy-on-write "data" segment. */ - error = vm_mmap(&td->td_proc->p_vmspace->vm_map, &vmaddr, + map = &td->td_proc->p_vmspace->vm_map; + error = vm_mmap(map, &vmaddr, a_out->a_text + a_out->a_data, VM_PROT_ALL, VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED, OBJT_VNODE, vp, file_offset); if (error) goto cleanup; + vm_map_lock(map); + if (!vm_map_lookup_entry(map, vmaddr, &entry)) { + vm_map_unlock(map); + error = EDOOFUS; + goto cleanup; + } + entry->eflags |= MAP_ENTRY_VN_EXEC; + vm_map_unlock(map); + textset = false; } #ifdef DEBUG printf("mem=%08lx = %08lx %08lx\n", (long)vmaddr, ((long *)vmaddr)[0], @@ -480,7 +488,14 @@ linux_uselib(struct thread *td, struct linux_uselib_ar } cleanup: - /* Unlock vnode if needed */ + if (opened) { + if (locked) + VOP_UNLOCK(vp, 0); + locked = false; + VOP_CLOSE(vp, FREAD, td->td_ucred, td); + } + if (textset) + VOP_UNSET_TEXT_CHECKED(vp); if (locked) VOP_UNLOCK(vp, 0); Modified: stable/12/sys/fs/deadfs/dead_vnops.c ============================================================================== --- stable/12/sys/fs/deadfs/dead_vnops.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/deadfs/dead_vnops.c Wed Jun 12 11:48:04 2019 (r348991) @@ -47,6 +47,7 @@ static vop_lookup_t dead_lookup; static vop_open_t dead_open; static vop_getwritemount_t dead_getwritemount; static vop_rename_t dead_rename; +static vop_unset_text_t dead_unset_text; struct vop_vector dead_vnodeops = { .vop_default = &default_vnodeops, @@ -76,6 +77,7 @@ struct vop_vector dead_vnodeops = { .vop_setattr = VOP_EBADF, .vop_symlink = VOP_PANIC, .vop_vptocnp = VOP_EBADF, + .vop_unset_text = dead_unset_text, .vop_write = dead_write, }; @@ -147,4 +149,11 @@ dead_rename(struct vop_rename_args *ap) vop_rename_fail(ap); return (EXDEV); +} + +static int +dead_unset_text(struct vop_unset_text_args *ap) +{ + + return (0); } Modified: stable/12/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/12/sys/fs/nfsclient/nfs_clbio.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/nfsclient/nfs_clbio.c Wed Jun 12 11:48:04 2019 (r348991) @@ -1639,7 +1639,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucre } } /* ASSERT_VOP_LOCKED(vp, "ncl_doio"); */ - if (p && (vp->v_vflag & VV_TEXT)) { + if (p && vp->v_writecount <= -1) { mtx_lock(&np->n_mtx); if (NFS_TIMESPEC_COMPARE(&np->n_mtime, &np->n_vattr.na_mtime)) { mtx_unlock(&np->n_mtx); Modified: stable/12/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/12/sys/fs/nfsclient/nfs_clvnops.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/nfsclient/nfs_clvnops.c Wed Jun 12 11:48:04 2019 (r348991) @@ -142,7 +142,6 @@ static vop_advlock_t nfs_advlock; static vop_advlockasync_t nfs_advlockasync; static vop_getacl_t nfs_getacl; static vop_setacl_t nfs_setacl; -static vop_set_text_t nfs_set_text; /* * Global vfs data structures for nfs @@ -179,7 +178,6 @@ struct vop_vector newnfs_vnodeops = { .vop_write = ncl_write, .vop_getacl = nfs_getacl, .vop_setacl = nfs_setacl, - .vop_set_text = nfs_set_text, }; struct vop_vector newnfs_fifoops = { @@ -498,6 +496,7 @@ nfs_open(struct vop_open_args *ap) int error; int fmode = ap->a_mode; struct ucred *cred; + vm_object_t obj; if (vp->v_type != VREG && vp->v_type != VDIR && vp->v_type != VLNK) return (EOPNOTSUPP); @@ -611,6 +610,32 @@ nfs_open(struct vop_open_args *ap) if (cred != NULL) crfree(cred); vnode_create_vobject(vp, vattr.va_size, ap->a_td); + + /* + * If the text file has been mmap'd, flush any dirty pages to the + * buffer cache and then... + * Make sure all writes are pushed to the NFS server. If this is not + * done, the modify time of the file can change while the text + * file is being executed. This will cause the process that is + * executing the text file to be terminated. + */ + if (vp->v_writecount <= -1) { + if ((obj = vp->v_object) != NULL && + (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { + VM_OBJECT_WLOCK(obj); + vm_object_page_clean(obj, 0, 0, OBJPC_SYNC); + VM_OBJECT_WUNLOCK(obj); + } + + /* Now, flush the buffer cache. */ + ncl_flush(vp, MNT_WAIT, curthread, 0, 0); + + /* And, finally, make sure that n_mtime is up to date. */ + np = VTONFS(vp); + mtx_lock(&np->n_mtx); + np->n_mtime = np->n_vattr.na_mtime; + mtx_unlock(&np->n_mtx); + } return (0); } @@ -3385,39 +3410,6 @@ nfs_setacl(struct vop_setacl_args *ap) error = EPERM; } return (error); -} - -static int -nfs_set_text(struct vop_set_text_args *ap) -{ - struct vnode *vp = ap->a_vp; - struct nfsnode *np; - - /* - * If the text file has been mmap'd, flush any dirty pages to the - * buffer cache and then... - * Make sure all writes are pushed to the NFS server. If this is not - * done, the modify time of the file can change while the text - * file is being executed. This will cause the process that is - * executing the text file to be terminated. - */ - if (vp->v_object != NULL) { - VM_OBJECT_WLOCK(vp->v_object); - vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_WUNLOCK(vp->v_object); - } - - /* Now, flush the buffer cache. */ - ncl_flush(vp, MNT_WAIT, curthread, 0, 0); - - /* And, finally, make sure that n_mtime is up to date. */ - np = VTONFS(vp); - mtx_lock(&np->n_mtx); - np->n_mtime = np->n_vattr.na_mtime; - mtx_unlock(&np->n_mtx); - - vp->v_vflag |= VV_TEXT; - return (0); } /* Modified: stable/12/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/12/sys/fs/nullfs/null_vnops.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/nullfs/null_vnops.c Wed Jun 12 11:48:04 2019 (r348991) @@ -339,15 +339,15 @@ null_add_writecount(struct vop_add_writecount_args *ap vp = ap->a_vp; lvp = NULLVPTOLOWERVP(vp); - KASSERT(vp->v_writecount + ap->a_inc >= 0, ("wrong writecount inc")); - if (vp->v_writecount > 0 && vp->v_writecount + ap->a_inc == 0) - error = VOP_ADD_WRITECOUNT(lvp, -1); - else if (vp->v_writecount == 0 && vp->v_writecount + ap->a_inc > 0) - error = VOP_ADD_WRITECOUNT(lvp, 1); - else - error = 0; + VI_LOCK(vp); + /* text refs are bypassed to lowervp */ + VNASSERT(vp->v_writecount >= 0, vp, ("wrong null writecount")); + VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, + ("wrong writecount inc %d", ap->a_inc)); + error = VOP_ADD_WRITECOUNT(lvp, ap->a_inc); if (error == 0) vp->v_writecount += ap->a_inc; + VI_UNLOCK(vp); return (error); } @@ -802,15 +802,19 @@ null_reclaim(struct vop_reclaim_args *ap) vp->v_data = NULL; vp->v_object = NULL; vp->v_vnlock = &vp->v_lock; - VI_UNLOCK(vp); /* - * If we were opened for write, we leased one write reference + * If we were opened for write, we leased the write reference * to the lower vnode. If this is a reclamation due to the * forced unmount, undo the reference now. */ if (vp->v_writecount > 0) - VOP_ADD_WRITECOUNT(lowervp, -1); + VOP_ADD_WRITECOUNT(lowervp, -vp->v_writecount); + else if (vp->v_writecount < 0) + vp->v_writecount = 0; + + VI_UNLOCK(vp); + if ((xp->null_flags & NULLV_NOUNLOCK) != 0) vunref(lowervp); else Modified: stable/12/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_subr.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/tmpfs/tmpfs_subr.c Wed Jun 12 11:48:04 2019 (r348991) @@ -488,6 +488,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t ob VI_LOCK(vp); vm_object_clear_flag(obj, OBJ_TMPFS); obj->un_pager.swp.swp_tmpfs = NULL; + if (vp->v_writecount < 0) + vp->v_writecount = 0; VI_UNLOCK(vp); VM_OBJECT_WUNLOCK(obj); } Modified: stable/12/sys/fs/unionfs/union_subr.c ============================================================================== --- stable/12/sys/fs/unionfs/union_subr.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/fs/unionfs/union_subr.c Wed Jun 12 11:48:04 2019 (r348991) @@ -941,10 +941,14 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vput(vp); goto unionfs_vn_create_on_upper_free_out1; } - VOP_ADD_WRITECOUNT(vp, 1); + error = VOP_ADD_WRITECOUNT(vp, 1); CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, vp->v_writecount); - *vpp = vp; + if (error == 0) { + *vpp = vp; + } else { + VOP_CLOSE(vp, fmode, cred, td); + } unionfs_vn_create_on_upper_free_out1: VOP_UNLOCK(udvp, LK_RELEASE); @@ -1078,7 +1082,7 @@ unionfs_copyfile(struct unionfs_node *unp, int docopy, } } VOP_CLOSE(uvp, FWRITE, cred, td); - VOP_ADD_WRITECOUNT(uvp, -1); + VOP_ADD_WRITECOUNT_CHECKED(uvp, -1); CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", __func__, uvp, uvp->v_writecount); Modified: stable/12/sys/kern/imgact_aout.c ============================================================================== --- stable/12/sys/kern/imgact_aout.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/imgact_aout.c Wed Jun 12 11:48:04 2019 (r348991) @@ -249,8 +249,8 @@ exec_aout_imgact(struct image_params *imgp) /* data + bss can't exceed rlimit */ a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { - PROC_UNLOCK(imgp->proc); - return (ENOMEM); + PROC_UNLOCK(imgp->proc); + return (ENOMEM); } PROC_UNLOCK(imgp->proc); @@ -269,7 +269,7 @@ exec_aout_imgact(struct image_params *imgp) */ error = exec_new_vmspace(imgp, &aout_sysvec); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error) return (error); @@ -288,12 +288,13 @@ exec_aout_imgact(struct image_params *imgp) file_offset, virtual_offset, text_end, VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, - MAP_COPY_ON_WRITE | MAP_PREFAULT); + MAP_COPY_ON_WRITE | MAP_PREFAULT | MAP_VN_EXEC); if (error) { vm_map_unlock(map); vm_object_deallocate(object); return (error); } + VOP_SET_TEXT_CHECKED(imgp->vp); data_end = text_end + a_out->a_data; if (a_out->a_data) { vm_object_reference(object); @@ -301,12 +302,13 @@ exec_aout_imgact(struct image_params *imgp) file_offset + a_out->a_text, text_end, data_end, VM_PROT_ALL, VM_PROT_ALL, - MAP_COPY_ON_WRITE | MAP_PREFAULT); + MAP_COPY_ON_WRITE | MAP_PREFAULT | MAP_VN_EXEC); if (error) { vm_map_unlock(map); vm_object_deallocate(object); return (error); } + VOP_SET_TEXT_CHECKED(imgp->vp); } if (bss_size) { Modified: stable/12/sys/kern/imgact_elf.c ============================================================================== --- stable/12/sys/kern/imgact_elf.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/imgact_elf.c Wed Jun 12 11:48:04 2019 (r348991) @@ -527,13 +527,17 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t } else { vm_object_reference(object); rv = vm_map_fixed(map, object, offset, start, end - start, - prot, VM_PROT_ALL, cow | MAP_CHECK_EXCL); + prot, VM_PROT_ALL, cow | MAP_CHECK_EXCL | + (object != NULL ? MAP_VN_EXEC : 0)); if (rv != KERN_SUCCESS) { locked = VOP_ISLOCKED(imgp->vp); VOP_UNLOCK(imgp->vp, 0); vm_object_deallocate(object); vn_lock(imgp->vp, locked | LK_RETRY); return (rv); + } else if (object != NULL) { + MPASS(imgp->vp->v_object == object); + VOP_SET_TEXT_CHECKED(imgp->vp); } } return (KERN_SUCCESS); @@ -590,13 +594,8 @@ __elfN(load_section)(struct image_params *imgp, vm_oof cow = MAP_COPY_ON_WRITE | MAP_PREFAULT | (prot & VM_PROT_WRITE ? 0 : MAP_DISABLE_COREDUMP); - rv = __elfN(map_insert)(imgp, map, - object, - file_addr, /* file offset */ - map_addr, /* virtual start */ - map_addr + map_len,/* virtual end */ - prot, - cow); + rv = __elfN(map_insert)(imgp, map, object, file_addr, + map_addr, map_addr + map_len, prot, cow); if (rv != KERN_SUCCESS) return (EINVAL); @@ -717,7 +716,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_ struct nameidata *nd; struct vattr *attr; struct image_params *imgp; - u_long flags, rbase; + u_long rbase; u_long base_addr = 0; int error; @@ -745,10 +744,8 @@ __elfN(load_file)(struct proc *p, const char *file, u_ imgp->object = NULL; imgp->execlabel = NULL; - flags = FOLLOW | LOCKSHARED | LOCKLEAF; - -again: - NDINIT(nd, LOOKUP, flags, UIO_SYSSPACE, file, curthread); + NDINIT(nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, file, + curthread); if ((error = namei(nd)) != 0) { nd->ni_vp = NULL; goto fail; @@ -763,27 +760,6 @@ again: if (error) goto fail; - /* - * Also make certain that the interpreter stays the same, - * so set its VV_TEXT flag, too. Since this function is only - * used to load the interpreter, the VV_TEXT is almost always - * already set. - */ - if (VOP_IS_TEXT(nd->ni_vp) == 0) { - if (VOP_ISLOCKED(nd->ni_vp) != LK_EXCLUSIVE) { - /* - * LK_UPGRADE could have resulted in dropping - * the lock. Just try again from the start, - * this time with exclusive vnode lock. - */ - vput(nd->ni_vp); - flags &= ~LOCKSHARED; - goto again; - } - - VOP_SET_TEXT(nd->ni_vp); - } - error = exec_map_first_page(imgp); if (error) goto fail; @@ -826,9 +802,11 @@ fail: if (imgp->firstpage) exec_unmap_first_page(imgp); - if (nd->ni_vp) + if (nd->ni_vp) { + if (imgp->textset) + VOP_UNSET_TEXT_CHECKED(nd->ni_vp); vput(nd->ni_vp); - + } free(tempdata, M_TEMP); return (error); @@ -971,7 +949,7 @@ __elfN(get_interp)(struct image_params *imgp, const El if (interp == NULL) { VOP_UNLOCK(imgp->vp, 0); interp = malloc(interp_name_len + 1, M_TEMP, M_WAITOK); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } error = vn_rdwr(UIO_READ, imgp->vp, interp, @@ -1239,7 +1217,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i maxv / 2, 1UL << flsl(maxalign)); } - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error != 0) goto ret; @@ -1283,7 +1261,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i } error = __elfN(load_interp)(imgp, brand_info, interp, &addr, &imgp->entry_addr); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error != 0) goto ret; } else @@ -1296,7 +1274,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i if (elf_auxargs == NULL) { VOP_UNLOCK(imgp->vp, 0); elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, M_WAITOK); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } elf_auxargs->execfd = -1; elf_auxargs->phdr = proghdr + et_dyn_addr; @@ -2581,7 +2559,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Not if (buf == NULL) { VOP_UNLOCK(imgp->vp, 0); buf = malloc(pnote->p_filesz, M_TEMP, M_WAITOK); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } error = vn_rdwr(UIO_READ, imgp->vp, buf, pnote->p_filesz, pnote->p_offset, UIO_SYSSPACE, IO_NODELOCKED, Modified: stable/12/sys/kern/kern_exec.c ============================================================================== --- stable/12/sys/kern/kern_exec.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/kern_exec.c Wed Jun 12 11:48:04 2019 (r348991) @@ -375,7 +375,6 @@ do_execve(struct thread *td, struct image_args *args, #endif struct vnode *oldtextvp = NULL, *newtextvp; int credential_changing; - int textset; #ifdef MAC struct label *interpvplabel = NULL; int will_transition; @@ -423,8 +422,8 @@ do_execve(struct thread *td, struct image_args *args, * interpreter if this is an interpreted binary. */ if (args->fname != NULL) { - NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME - | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); + NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | LOCKSHARED | FOLLOW | + SAVENAME | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); } SDT_PROBE1(proc, , , exec, args->fname); @@ -457,13 +456,14 @@ interpret: error = fgetvp_exec(td, args->fd, &cap_fexecve_rights, &newtextvp); if (error) goto exec_fail; - vn_lock(newtextvp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(newtextvp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(newtextvp); imgp->vp = newtextvp; } /* - * Check file permissions (also 'opens' file) + * Check file permissions. Also 'opens' file and sets its vnode to + * text mode. */ error = exec_check_permissions(imgp); if (error) @@ -473,16 +473,6 @@ interpret: if (imgp->object != NULL) vm_object_reference(imgp->object); - /* - * Set VV_TEXT now so no one can write to the executable while we're - * activating it. - * - * Remember if this was set before and unset it in case this is not - * actually an executable image. - */ - textset = VOP_IS_TEXT(imgp->vp); - VOP_SET_TEXT(imgp->vp); - error = exec_map_first_page(imgp); if (error) goto exec_fail_dealloc; @@ -610,11 +600,8 @@ interpret: } if (error) { - if (error == -1) { - if (textset == 0) - VOP_UNSET_TEXT(imgp->vp); + if (error == -1) error = ENOEXEC; - } goto exec_fail_dealloc; } @@ -625,12 +612,13 @@ interpret: if (imgp->interpreted) { exec_unmap_first_page(imgp); /* - * VV_TEXT needs to be unset for scripts. There is a short - * period before we determine that something is a script where - * VV_TEXT will be set. The vnode lock is held over this - * entire period so nothing should illegitimately be blocked. + * The text reference needs to be removed for scripts. + * There is a short period before we determine that + * something is a script where text reference is active. + * The vnode lock is held over this entire period + * so nothing should illegitimately be blocked. */ - VOP_UNSET_TEXT(imgp->vp); + VOP_UNSET_TEXT_CHECKED(imgp->vp); /* free name buffer and old vnode */ if (args->fname != NULL) NDFREE(&nd, NDF_ONLY_PNBUF); @@ -899,6 +887,8 @@ exec_fail_dealloc: NDFREE(&nd, NDF_ONLY_PNBUF); if (imgp->opened) VOP_CLOSE(imgp->vp, FREAD, td->td_ucred, td); + if (imgp->textset) + VOP_UNSET_TEXT_CHECKED(imgp->vp); if (error != 0) vput(imgp->vp); else @@ -1626,7 +1616,7 @@ exec_check_permissions(struct image_params *imgp) struct vnode *vp = imgp->vp; struct vattr *attr = imgp->attr; struct thread *td; - int error, writecount; + int error; td = curthread; @@ -1670,12 +1660,17 @@ exec_check_permissions(struct image_params *imgp) /* * Check number of open-for-writes on the file and deny execution * if there are any. + * + * Add a text reference now so no one can write to the + * executable while we're activating it. + * + * Remember if this was set before and unset it in case this is not + * actually an executable image. */ - error = VOP_GET_WRITECOUNT(vp, &writecount); + error = VOP_SET_TEXT(vp); if (error != 0) return (error); - if (writecount != 0) - return (ETXTBSY); + imgp->textset = true; /* * Call filesystem specific open routine (which does nothing in the Modified: stable/12/sys/kern/vfs_default.c ============================================================================== --- stable/12/sys/kern/vfs_default.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/vfs_default.c Wed Jun 12 11:48:04 2019 (r348991) @@ -81,9 +81,7 @@ static int dirent_exists(struct vnode *vp, const char #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) static int vop_stdis_text(struct vop_is_text_args *ap); -static int vop_stdset_text(struct vop_set_text_args *ap); static int vop_stdunset_text(struct vop_unset_text_args *ap); -static int vop_stdget_writecount(struct vop_get_writecount_args *ap); static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); static int vop_stdfdatasync(struct vop_fdatasync_args *ap); static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); @@ -141,7 +139,6 @@ struct vop_vector default_vnodeops = { .vop_is_text = vop_stdis_text, .vop_set_text = vop_stdset_text, .vop_unset_text = vop_stdunset_text, - .vop_get_writecount = vop_stdget_writecount, .vop_add_writecount = vop_stdadd_writecount, }; @@ -1058,39 +1055,63 @@ static int vop_stdis_text(struct vop_is_text_args *ap) { - return ((ap->a_vp->v_vflag & VV_TEXT) != 0); + return (ap->a_vp->v_writecount < 0); } -static int +int vop_stdset_text(struct vop_set_text_args *ap) { + struct vnode *vp; + int error; - ap->a_vp->v_vflag |= VV_TEXT; - return (0); + vp = ap->a_vp; + VI_LOCK(vp); + if (vp->v_writecount > 0) { + error = ETXTBSY; + } else { + vp->v_writecount--; + error = 0; + } + VI_UNLOCK(vp); + return (error); } static int vop_stdunset_text(struct vop_unset_text_args *ap) { + struct vnode *vp; + int error; - ap->a_vp->v_vflag &= ~VV_TEXT; - return (0); + vp = ap->a_vp; + VI_LOCK(vp); + if (vp->v_writecount < 0) { + vp->v_writecount++; + error = 0; + } else { + error = EINVAL; + } + VI_UNLOCK(vp); + return (error); } static int -vop_stdget_writecount(struct vop_get_writecount_args *ap) -{ - - *ap->a_writecount = ap->a_vp->v_writecount; - return (0); -} - -static int vop_stdadd_writecount(struct vop_add_writecount_args *ap) { + struct vnode *vp; + int error; - ap->a_vp->v_writecount += ap->a_inc; - return (0); + vp = ap->a_vp; + VI_LOCK_FLAGS(vp, MTX_DUPOK); + if (vp->v_writecount < 0) { + error = ETXTBSY; + } else { + VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, + ("neg writecount increment %d", ap->a_inc)); + vp->v_writecount += ap->a_inc; + error = 0; + } + VI_UNLOCK(vp); + return (error); } /* Modified: stable/12/sys/kern/vfs_subr.c ============================================================================== --- stable/12/sys/kern/vfs_subr.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/vfs_subr.c Wed Jun 12 11:48:04 2019 (r348991) @@ -3138,7 +3138,7 @@ loop: if ((vp->v_type == VNON || (error == 0 && vattr.va_nlink > 0)) && - (vp->v_writecount == 0 || vp->v_type != VREG)) { + (vp->v_writecount <= 0 || vp->v_type != VREG)) { VOP_UNLOCK(vp, 0); vdropl(vp); continue; @@ -3483,8 +3483,6 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VV_ETERNALDEV", sizeof(buf)); if (vp->v_vflag & VV_CACHEDLABEL) strlcat(buf, "|VV_CACHEDLABEL", sizeof(buf)); - if (vp->v_vflag & VV_TEXT) - strlcat(buf, "|VV_TEXT", sizeof(buf)); if (vp->v_vflag & VV_COPYONWRITE) strlcat(buf, "|VV_COPYONWRITE", sizeof(buf)); if (vp->v_vflag & VV_SYSTEM) @@ -3500,7 +3498,7 @@ vn_printf(struct vnode *vp, const char *fmt, ...) if (vp->v_vflag & VV_FORCEINSMQ) strlcat(buf, "|VV_FORCEINSMQ", sizeof(buf)); flags = vp->v_vflag & ~(VV_ROOT | VV_ISTTY | VV_NOSYNC | VV_ETERNALDEV | - VV_CACHEDLABEL | VV_TEXT | VV_COPYONWRITE | VV_SYSTEM | VV_PROCDEP | + VV_CACHEDLABEL | VV_COPYONWRITE | VV_SYSTEM | VV_PROCDEP | VV_NOKNOTE | VV_DELETED | VV_MD | VV_FORCEINSMQ); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VV(0x%lx)", flags); Modified: stable/12/sys/kern/vfs_vnops.c ============================================================================== --- stable/12/sys/kern/vfs_vnops.c Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/vfs_vnops.c Wed Jun 12 11:48:04 2019 (r348991) @@ -290,6 +290,39 @@ bad: return (error); } +static int +vn_open_vnode_advlock(struct vnode *vp, int fmode, struct file *fp) +{ + struct flock lf; + int error, lock_flags, type; + + ASSERT_VOP_LOCKED(vp, "vn_open_vnode_advlock"); + if ((fmode & (O_EXLOCK | O_SHLOCK)) == 0) + return (0); + KASSERT(fp != NULL, ("open with flock requires fp")); + if (fp->f_type != DTYPE_NONE && fp->f_type != DTYPE_VNODE) + return (EOPNOTSUPP); + + lock_flags = VOP_ISLOCKED(vp); + VOP_UNLOCK(vp, 0); + + lf.l_whence = SEEK_SET; + lf.l_start = 0; + lf.l_len = 0; + lf.l_type = (fmode & O_EXLOCK) != 0 ? F_WRLCK : F_RDLCK; + type = F_FLOCK; + if ((fmode & FNONBLOCK) == 0) + type |= F_WAIT; + error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type); + if (error == 0) + fp->f_flag |= FHASLOCK; + + vn_lock(vp, lock_flags | LK_RETRY); + if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) + error = ENOENT; + return (error); +} + /* * Common code for vnode open operations once a vnode is located. * Check permissions, and call the VOP_OPEN routine. @@ -299,8 +332,7 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucre struct thread *td, struct file *fp) { accmode_t accmode; - struct flock lf; - int error, lock_flags, type; + int error; if (vp->v_type == VLNK) return (EMLINK); @@ -331,63 +363,31 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucre accmode &= ~(VCREAT | VVERIFY); #endif - if ((fmode & O_CREAT) == 0) { - if (accmode & VWRITE) { - error = vn_writechk(vp); - if (error) - return (error); - } - if (accmode) { - error = VOP_ACCESS(vp, accmode, cred, td); - if (error) - return (error); - } + if ((fmode & O_CREAT) == 0 && accmode != 0) { + error = VOP_ACCESS(vp, accmode, cred, td); + if (error != 0) + return (error); } if (vp->v_type == VFIFO && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) vn_lock(vp, LK_UPGRADE | LK_RETRY); - if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) + error = VOP_OPEN(vp, fmode, cred, td, fp); + if (error != 0) return (error); - while ((fmode & (O_EXLOCK | O_SHLOCK)) != 0) { - KASSERT(fp != NULL, ("open with flock requires fp")); - if (fp->f_type != DTYPE_NONE && fp->f_type != DTYPE_VNODE) { - error = EOPNOTSUPP; - break; + error = vn_open_vnode_advlock(vp, fmode, fp); + if (error == 0 && (fmode & FWRITE) != 0) { + error = VOP_ADD_WRITECOUNT(vp, 1); + if (error == 0) { + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", + __func__, vp, vp->v_writecount); } - lock_flags = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); - lf.l_whence = SEEK_SET; - lf.l_start = 0; - lf.l_len = 0; - if (fmode & O_EXLOCK) - lf.l_type = F_WRLCK; - else - lf.l_type = F_RDLCK; - type = F_FLOCK; - if ((fmode & FNONBLOCK) == 0) - type |= F_WAIT; - error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type); - if (error == 0) - fp->f_flag |= FHASLOCK; - vn_lock(vp, lock_flags | LK_RETRY); - if (error != 0) - break; - if ((vp->v_iflag & VI_DOOMED) != 0) { - error = ENOENT; - break; - } - - /* - * Another thread might have used this vnode as an - * executable while the vnode lock was dropped. - * Ensure the vnode is still able to be opened for - * writing after the lock has been obtained. - */ - if ((accmode & VWRITE) != 0) - error = vn_writechk(vp); - break; } + /* + * Error from advlock or VOP_ADD_WRITECOUNT() still requires + * calling VOP_CLOSE() to pair with earlier VOP_OPEN(). + * Arrange for that by having fdrop() to use vn_closefile(). + */ if (error != 0) { fp->f_flag |= FOPENFAILED; fp->f_vnode = vp; @@ -396,18 +396,17 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucre fp->f_ops = &vnops; } vref(vp); - } else if ((fmode & FWRITE) != 0) { - VOP_ADD_WRITECOUNT(vp, 1); - CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", - __func__, vp, vp->v_writecount); } + ASSERT_VOP_LOCKED(vp, "vn_open_vnode"); return (error); + } /* * Check for write permissions on the specified vnode. * Prototype text segments cannot be written. + * It is racy. */ int vn_writechk(struct vnode *vp) @@ -445,9 +444,7 @@ vn_close1(struct vnode *vp, int flags, struct ucred *f vn_lock(vp, lock_flags | LK_RETRY); AUDIT_ARG_VNODE1(vp); if ((flags & (FWRITE | FOPENFAILED)) == FWRITE) { - VNASSERT(vp->v_writecount > 0, vp, - ("vn_close: negative writecount")); - VOP_ADD_WRITECOUNT(vp, -1); + VOP_ADD_WRITECOUNT_CHECKED(vp, -1); CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", __func__, vp, vp->v_writecount); } @@ -1315,13 +1312,14 @@ vn_truncate(struct file *fp, off_t length, struct ucre if (error) goto out; #endif - error = vn_writechk(vp); + error = VOP_ADD_WRITECOUNT(vp, 1); if (error == 0) { VATTR_NULL(&vattr); vattr.va_size = length; if ((fp->f_flag & O_FSYNC) != 0) vattr.va_vaflags |= VA_SYNC; error = VOP_SETATTR(vp, &vattr, fp->f_cred); + VOP_ADD_WRITECOUNT_CHECKED(vp, -1); } out: VOP_UNLOCK(vp, 0); Modified: stable/12/sys/kern/vnode_if.src ============================================================================== --- stable/12/sys/kern/vnode_if.src Wed Jun 12 11:34:16 2019 (r348990) +++ stable/12/sys/kern/vnode_if.src Wed Jun 12 11:48:04 2019 (r348991) @@ -688,20 +688,21 @@ vop_is_text { }; -%% set_text vp E E E +%% set_text vp = = = *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 12 13:34:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C6DE15B720D; Wed, 12 Jun 2019 13:34:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 170FE76296; Wed, 12 Jun 2019 13:34:15 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2D7D19BD3; Wed, 12 Jun 2019 13:34:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CDYEMx043825; Wed, 12 Jun 2019 13:34:14 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CDYCdU043813; Wed, 12 Jun 2019 13:34:12 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201906121334.x5CDYCdU043813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Wed, 12 Jun 2019 13:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348993 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive_fe contrib/libarchive/tar lib/libarchive usr.bin/bsdcat usr.bin/cpio usr.bin/tar X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive_fe contrib/libarchive/tar lib/libarchive usr.bin/bsdcat usr.bin/cpio usr.bin/tar X-SVN-Commit-Revision: 348993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 170FE76296 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 13:34:15 -0000 Author: mm Date: Wed Jun 12 13:34:12 2019 New Revision: 348993 URL: https://svnweb.freebsd.org/changeset/base/348993 Log: MFV r348971,r348977: Sync libarchive with vendor. Relevant vendor changes: - check_symlinks_fsobj() without chdir() and fchdir() - bsdtar.1 manpage fixes - patches from OpenBSD to libarchive_fe/passphrase.c - version bumped to 3.4.0 MFC after: 2 weeks Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/README.md head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive_fe/line_reader.c head/contrib/libarchive/libarchive_fe/passphrase.c head/contrib/libarchive/tar/bsdtar.1 head/lib/libarchive/config_freebsd.h head/usr.bin/bsdcat/Makefile head/usr.bin/cpio/Makefile head/usr.bin/tar/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/NEWS ============================================================================== --- head/contrib/libarchive/NEWS Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/NEWS Wed Jun 12 13:34:12 2019 (r348993) @@ -1,3 +1,7 @@ +Jun 11, 2019: libarchive 3.4.0 released + +May 18, 2019: Fixes for reading Android APK and JAR archives + Apr 16, 2019: Support for non-recursive list and extract Apr 14, 2019: New tar option: --exclude-vcs @@ -6,7 +10,7 @@ Mar 27, 2019: Support for file and directory symlinks Mar 12, 2019: Important fixes for storing file attributes and flags -Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 compression in zip archives +Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 decompression in ZIP files Oct 06, 2018: RAR 5.0 reader Modified: head/contrib/libarchive/README.md ============================================================================== --- head/contrib/libarchive/README.md Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/README.md Wed Jun 12 13:34:12 2019 (r348993) @@ -81,6 +81,7 @@ Currently, the library automatically detects and reads * Binary cpio (big-endian or little-endian) * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) + * ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries) * GNU and BSD 'ar' archives * 'mtree' format * 7-Zip archives Modified: head/contrib/libarchive/libarchive/archive.h ============================================================================== --- head/contrib/libarchive/libarchive/archive.h Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive/archive.h Wed Jun 12 13:34:12 2019 (r348993) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003003 +#define ARCHIVE_VERSION_NUMBER 3004000 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.3" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.0" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: head/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.h Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive/archive_entry.h Wed Jun 12 13:34:12 2019 (r348993) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003003 +#define ARCHIVE_VERSION_NUMBER 3004000 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c Wed Jun 12 13:34:12 2019 (r348993) @@ -60,7 +60,7 @@ static int archive_filter_b64encode_write(struct archi const void *, size_t); static int archive_filter_b64encode_close(struct archive_write_filter *); static int archive_filter_b64encode_free(struct archive_write_filter *); -static void b64_encode(struct archive_string *, const unsigned char *, size_t); +static void la_b64_encode(struct archive_string *, const unsigned char *, size_t); static int64_t atol8(const char *, size_t); static const char base64[] = { @@ -180,7 +180,7 @@ archive_filter_b64encode_open(struct archive_write_fil } static void -b64_encode(struct archive_string *as, const unsigned char *p, size_t len) +la_b64_encode(struct archive_string *as, const unsigned char *p, size_t len) { int c; @@ -234,12 +234,12 @@ archive_filter_b64encode_write(struct archive_write_fi } if (state->hold_len < LBYTES) return (ret); - b64_encode(&state->encoded_buff, state->hold, LBYTES); + la_b64_encode(&state->encoded_buff, state->hold, LBYTES); state->hold_len = 0; } for (; length >= LBYTES; length -= LBYTES, p += LBYTES) - b64_encode(&state->encoded_buff, p, LBYTES); + la_b64_encode(&state->encoded_buff, p, LBYTES); /* Save remaining bytes. */ if (length > 0) { @@ -270,7 +270,7 @@ archive_filter_b64encode_close(struct archive_write_fi /* Flush remaining bytes. */ if (state->hold_len != 0) - b64_encode(&state->encoded_buff, state->hold, state->hold_len); + la_b64_encode(&state->encoded_buff, state->hold, state->hold_len); archive_string_sprintf(&state->encoded_buff, "====\n"); /* Write the last block */ archive_write_set_bytes_in_last_block(f->archive, 1); Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Wed Jun 12 13:34:12 2019 (r348993) @@ -165,6 +165,10 @@ __FBSDID("$FreeBSD$"); #define O_NOFOLLOW 0 #endif +#ifndef AT_FDCWD +#define AT_FDCWD -100 +#endif + struct fixup_entry { struct fixup_entry *next; struct archive_acl acl; @@ -348,6 +352,8 @@ struct archive_write_disk { #define HFS_BLOCKS(s) ((s) >> 12) + +static int la_opendirat(int, const char *); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -401,6 +407,37 @@ static ssize_t _archive_write_disk_data_block(struct a size_t, int64_t); static int +la_opendirat(int fd, const char *path) { + const int flags = O_CLOEXEC +#if defined(O_BINARY) + | O_BINARY +#endif +#if defined(O_DIRECTORY) + | O_DIRECTORY +#endif +#if defined(O_PATH) + | O_PATH +#elif defined(O_SEARCH) + | O_SEARCH +#elif defined(O_EXEC) + | O_EXEC +#else + | O_RDONLY +#endif + ; + +#if !defined(HAVE_OPENAT) + if (fd != AT_FDCWD) { + errno = ENOTSUP; + return (-1); + } else + return (open(fd, path, flags)); +#else + return (openat(fd, path, flags)); +#endif +} + +static int lazy_stat(struct archive_write_disk *a) { if (a->pst != NULL) { @@ -1909,7 +1946,7 @@ edit_deep_directories(struct archive_write_disk *a) return; /* Try to record our starting dir. */ - a->restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); + a->restore_pwd = la_opendirat(AT_FDCWD, "."); __archive_ensure_cloexec_flag(a->restore_pwd); if (a->restore_pwd < 0) return; @@ -2342,7 +2379,7 @@ _archive_write_disk_close(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; struct fixup_entry *next, *p; - int ret; + int fd, ret; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -2353,21 +2390,33 @@ _archive_write_disk_close(struct archive *_a) p = sort_dir_list(a->fixup_list); while (p != NULL) { + fd = -1; a->pst = NULL; /* Mark stat cache as out-of-date. */ + if (p->fixup & + (TODO_TIMES | TODO_MODE_BASE | TODO_ACLS | TODO_FFLAGS)) { + fd = open(p->name, + O_WRONLY | O_BINARY | O_NOFOLLOW | O_CLOEXEC); + } if (p->fixup & TODO_TIMES) { - set_times(a, -1, p->mode, p->name, + set_times(a, fd, p->mode, p->name, p->atime, p->atime_nanos, p->birthtime, p->birthtime_nanos, p->mtime, p->mtime_nanos, p->ctime, p->ctime_nanos); } - if (p->fixup & TODO_MODE_BASE) + if (p->fixup & TODO_MODE_BASE) { +#ifdef HAVE_FCHMOD + if (fd >= 0) + fchmod(fd, p->mode); + else +#endif chmod(p->name, p->mode); + } if (p->fixup & TODO_ACLS) - archive_write_disk_set_acls(&a->archive, -1, p->name, - &p->acl, p->mode); + archive_write_disk_set_acls(&a->archive, fd, + p->name, &p->acl, p->mode); if (p->fixup & TODO_FFLAGS) - set_fflags_platform(a, -1, p->name, + set_fflags_platform(a, fd, p->name, p->mode, p->fflags_set, 0); if (p->fixup & TODO_MAC_METADATA) set_mac_metadata(a, p->name, p->mac_metadata, @@ -2376,6 +2425,8 @@ _archive_write_disk_close(struct archive *_a) archive_acl_clear(&p->acl); free(p->mac_metadata); free(p->name); + if (fd >= 0) + close(fd); free(p); p = next; } @@ -2540,8 +2591,6 @@ fsobj_error(int *a_eno, struct archive_string *a_estr, * scan the path and both can be optimized by comparing against other * recent paths. */ -/* TODO: Extend this to support symlinks on Windows Vista and later. */ - /* * Checks the given path to see if any elements along it are symlinks. Returns * ARCHIVE_OK if there are none, otherwise puts an error in errmsg. @@ -2550,7 +2599,8 @@ static int check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, int flags) { -#if !defined(HAVE_LSTAT) +#if !defined(HAVE_LSTAT) && \ + !(defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT)) /* Platform doesn't have lstat, so we can't look for symlinks. */ (void)path; /* UNUSED */ (void)error_number; /* UNUSED */ @@ -2565,7 +2615,10 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar char c; int r; struct stat st; - int restore_pwd; + int chdir_fd; +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + int fd; +#endif /* Nothing to do here if name is empty */ if(path[0] == '\0') @@ -2586,9 +2639,9 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * c holds what used to be in *tail * last is 1 if this is the last tail */ - restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC); - __archive_ensure_cloexec_flag(restore_pwd); - if (restore_pwd < 0) { + chdir_fd = la_opendirat(AT_FDCWD, "."); + __archive_ensure_cloexec_flag(chdir_fd); + if (chdir_fd < 0) { fsobj_error(a_eno, a_estr, errno, "Could not open ", path); return (ARCHIVE_FATAL); @@ -2621,7 +2674,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar c = tail[0]; tail[0] = '\0'; /* Check that we haven't hit a symlink. */ +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = fstatat(chdir_fd, head, &st, AT_SYMLINK_NOFOLLOW); +#else r = lstat(head, &st); +#endif if (r != 0) { tail[0] = c; /* We've hit a dir that doesn't exist; stop now. */ @@ -2647,7 +2704,19 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar } } else if (S_ISDIR(st.st_mode)) { if (!last) { - if (chdir(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + fd = la_opendirat(chdir_fd, head); + if (fd < 0) + r = -1; + else { + r = 0; + close(chdir_fd); + chdir_fd = fd; + } +#else + r = chdir(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, "Could not chdir ", path); @@ -2664,7 +2733,12 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * so we can overwrite it with the * item being extracted. */ - if (unlink(head)) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = unlinkat(chdir_fd, head, 0); +#else + r = unlink(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, "Could not remove symlink ", @@ -2694,7 +2768,12 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar break; } else if (flags & ARCHIVE_EXTRACT_UNLINK) { /* User asked us to remove problems. */ - if (unlink(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = unlinkat(chdir_fd, head, 0); +#else + r = unlink(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, 0, "Cannot remove intervening " @@ -2712,7 +2791,11 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar * This is needed to extract hardlinks over * symlinks. */ +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + r = fstatat(chdir_fd, head, &st, 0); +#else r = la_stat(head, &st); +#endif if (r != 0) { tail[0] = c; if (errno == ENOENT) { @@ -2725,7 +2808,19 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar break; } } else if (S_ISDIR(st.st_mode)) { - if (chdir(head) != 0) { +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + fd = la_opendirat(chdir_fd, head); + if (fd < 0) + r = -1; + else { + r = 0; + close(chdir_fd); + chdir_fd = fd; + } +#else + r = chdir(head); +#endif + if (r != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, @@ -2761,16 +2856,21 @@ check_symlinks_fsobj(char *path, int *a_eno, struct ar } /* Catches loop exits via break */ tail[0] = c; -#ifdef HAVE_FCHDIR +#if defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT) + /* If we operate with openat(), fstatat() and unlinkat() there was + * no chdir(), so just close the fd */ + if (chdir_fd >= 0) + close(chdir_fd); +#elif HAVE_FCHDIR /* If we changed directory above, restore it here. */ - if (restore_pwd >= 0) { - r = fchdir(restore_pwd); + if (chdir_fd >= 0) { + r = fchdir(chdir_fd); if (r != 0) { fsobj_error(a_eno, a_estr, errno, "chdir() failure", ""); } - close(restore_pwd); - restore_pwd = -1; + close(chdir_fd); + chdir_fd = -1; if (r != 0) { res = (ARCHIVE_FATAL); } @@ -3387,6 +3487,7 @@ static int set_mode(struct archive_write_disk *a, int mode) { int r = ARCHIVE_OK; + int r2; mode &= 07777; /* Strip off file type bits. */ if (a->todo & TODO_SGID_CHECK) { @@ -3480,21 +3581,19 @@ set_mode(struct archive_write_disk *a, int mode) * post-extract fixup, which is handled elsewhere. */ #ifdef HAVE_FCHMOD - if (a->fd >= 0) { - if (fchmod(a->fd, mode) != 0) { - archive_set_error(&a->archive, errno, - "Can't set permissions to 0%o", (int)mode); - r = ARCHIVE_WARN; - } - } else + if (a->fd >= 0) + r2 = fchmod(a->fd, mode); + else #endif - /* If this platform lacks fchmod(), then - * we'll just use chmod(). */ - if (chmod(a->name, mode) != 0) { - archive_set_error(&a->archive, errno, - "Can't set permissions to 0%o", (int)mode); - r = ARCHIVE_WARN; - } + /* If this platform lacks fchmod(), then + * we'll just use chmod(). */ + r2 = chmod(a->name, mode); + + if (r2 != 0) { + archive_set_error(&a->archive, errno, + "Can't set permissions to 0%o", (int)mode); + r = ARCHIVE_WARN; + } } return (r); } Modified: head/contrib/libarchive/libarchive_fe/line_reader.c ============================================================================== --- head/contrib/libarchive/libarchive_fe/line_reader.c Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive_fe/line_reader.c Wed Jun 12 13:34:12 2019 (r348993) @@ -49,11 +49,10 @@ __FBSDID("$FreeBSD$"); */ struct lafe_line_reader { FILE *f; - char *buff, *buff_end, *line_start, *line_end, *p; + char *buff, *buff_end, *line_start, *line_end; char *pathname; size_t buff_length; int nullSeparator; /* Lines separated by null, not CR/CRLF/etc. */ - int ret; }; struct lafe_line_reader * Modified: head/contrib/libarchive/libarchive_fe/passphrase.c ============================================================================== --- head/contrib/libarchive/libarchive_fe/passphrase.c Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/libarchive_fe/passphrase.c Wed Jun 12 13:34:12 2019 (r348993) @@ -23,9 +23,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. */ -/* $OpenBSD: readpassphrase.c,v 1.22 2010/01/13 10:20:54 dtucker Exp $ */ +/* $OpenBSD: readpassphrase.c,v 1.27 2019/01/25 00:19:25 millert Exp $ */ + /* - * Copyright (c) 2000-2002, 2007 Todd C. Miller + * Copyright (c) 2000-2002, 2007, 2010 + * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -199,6 +201,27 @@ restart: } /* + * Turn off echo if possible. + * If we are using a tty but are not the foreground pgrp this will + * generate SIGTTOU, so do it *before* installing the signal handlers. + */ + if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) { + memcpy(&term, &oterm, sizeof(term)); + if (!(flags & RPP_ECHO_ON)) + term.c_lflag &= ~(ECHO | ECHONL); +#ifdef VSTATUS + if (term.c_cc[VSTATUS] != _POSIX_VDISABLE) + term.c_cc[VSTATUS] = _POSIX_VDISABLE; +#endif + (void)tcsetattr(input, _T_FLUSH, &term); + } else { + memset(&term, 0, sizeof(term)); + term.c_lflag |= ECHO; + memset(&oterm, 0, sizeof(oterm)); + oterm.c_lflag |= ECHO; + } + + /* * Catch signals that would otherwise cause the user to end * up with echo turned off in the shell. Don't worry about * things like SIGXCPU and SIGVTALRM for now. @@ -217,57 +240,41 @@ restart: (void)sigaction(SIGTTIN, &sa, &savettin); (void)sigaction(SIGTTOU, &sa, &savettou); - /* Turn off echo if possible. */ - if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) { - memcpy(&term, &oterm, sizeof(term)); - if (!(flags & RPP_ECHO_ON)) - term.c_lflag &= ~(ECHO | ECHONL); -#ifdef VSTATUS - if (term.c_cc[VSTATUS] != _POSIX_VDISABLE) - term.c_cc[VSTATUS] = _POSIX_VDISABLE; -#endif - (void)tcsetattr(input, _T_FLUSH, &term); - } else { - memset(&term, 0, sizeof(term)); - term.c_lflag |= ECHO; - memset(&oterm, 0, sizeof(oterm)); - oterm.c_lflag |= ECHO; + if (!(flags & RPP_STDIN)) { + int r = write(output, prompt, strlen(prompt)); + (void)r; } - - /* No I/O if we are already backgrounded. */ - if (signo[SIGTTOU] != 1 && signo[SIGTTIN] != 1) { - if (!(flags & RPP_STDIN)) { - int r = write(output, prompt, strlen(prompt)); - (void)r; - } - end = buf + bufsiz - 1; - p = buf; - while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') { - if (p < end) { - if ((flags & RPP_SEVENBIT)) - ch &= 0x7f; - if (isalpha((unsigned char)ch)) { - if ((flags & RPP_FORCELOWER)) - ch = (char)tolower((unsigned char)ch); - if ((flags & RPP_FORCEUPPER)) - ch = (char)toupper((unsigned char)ch); - } - *p++ = ch; + end = buf + bufsiz - 1; + p = buf; + while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') { + if (p < end) { + if ((flags & RPP_SEVENBIT)) + ch &= 0x7f; + if (isalpha((unsigned char)ch)) { + if ((flags & RPP_FORCELOWER)) + ch = (char)tolower((unsigned char)ch); + if ((flags & RPP_FORCEUPPER)) + ch = (char)toupper((unsigned char)ch); } + *p++ = ch; } - *p = '\0'; - save_errno = errno; - if (!(term.c_lflag & ECHO)) { - int r = write(output, "\n", 1); - (void)r; - } } + *p = '\0'; + save_errno = errno; + if (!(term.c_lflag & ECHO)) { + int r = write(output, "\n", 1); + (void)r; + } /* Restore old terminal settings and signals. */ if (memcmp(&term, &oterm, sizeof(term)) != 0) { + const int sigttou = signo[SIGTTOU]; + + /* Ignore SIGTTOU generated when we are not the fg pgrp. */ while (tcsetattr(input, _T_FLUSH, &oterm) == -1 && - errno == EINTR) + errno == EINTR && !signo[SIGTTOU]) continue; + signo[SIGTTOU] = sigttou; } (void)sigaction(SIGALRM, &savealrm, NULL); (void)sigaction(SIGHUP, &savehup, NULL); Modified: head/contrib/libarchive/tar/bsdtar.1 ============================================================================== --- head/contrib/libarchive/tar/bsdtar.1 Wed Jun 12 12:19:34 2019 (r348992) +++ head/contrib/libarchive/tar/bsdtar.1 Wed Jun 12 13:34:12 2019 (r348993) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2017 +.Dd June 3, 2019 .Dt TAR 1 .Os .Sh NAME @@ -198,7 +198,7 @@ options and before extracting any files. .It Fl Fl clear-nochange-fflags (x mode only) Before removing file system objects to replace them, clear platform-specific -file flags that might prevent removal. +file attributes or file flags that might prevent removal. .It Fl Fl exclude Ar pattern Do not process files or directories that match the specified pattern. @@ -218,7 +218,8 @@ and .Sq Darcs . .It Fl Fl fflags (c, r, u, x modes only) -Archive or extract file flags. This is the reverse of +Archive or extract platform-specific file attributes or file flags. +This is the reverse of .Fl Fl no-fflags and the default behavior in c, r, and u modes or if .Nm @@ -389,8 +390,8 @@ Do not extract modification time. By default, the modification time is set to the time stored in the archive. .It Fl Fl mac-metadata (c, r, u and x mode only) -Mac OS X specific. Archive or extract extended ACLs and extended attributes -using +Mac OS X specific. Archive or extract extended ACLs and extended file +attributes using .Xr copyfile 3 in AppleDouble format. This is the reverse of .Fl Fl no-mac-metadata . @@ -445,21 +446,21 @@ and the default behavior if is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). .It Fl Fl no-fflags (c, r, u, x modes only) -Do not archive or extract file flags. This is the reverse of +Do not archive or extract file attributes or file flags. This is the reverse of .Fl Fl fflags and the default behavior if .Nm is run as non-root in x mode. .It Fl Fl no-mac-metadata (x mode only) -Mac OS X specific. Do not archive or extract ACLs and extended attributes using +Mac OS X specific. Do not archive or extract ACLs and extended file attributes +using .Xr copyfile 3 in AppleDouble format. This is the reverse of .Fl Fl mac-metadata . and the default behavior if .Nm is run as non-root in x mode. -.It Fl n , Fl Fl norecurse , Fl Fl no-recursion .It Fl Fl no-same-owner (x mode only) Do not extract owner and group IDs. @@ -470,8 +471,8 @@ and the default behavior if is run as non-root. .It Fl Fl no-same-permissions (x mode only) -Do not extract full permissions (SGID, SUID, sticky bit, ACLs, -extended attributes or extended file flags). +Do not extract full permissions (SGID, SUID, sticky bit, +file attributes or file flags, extended file attributes and ACLs). This is the reverse of .Fl p and the default behavior if @@ -479,7 +480,7 @@ and the default behavior if is run as non-root. .It Fl Fl no-xattrs (c, r, u, x modes only) -Do not archive or extract extended attributes. This is the reverse of +Do not archive or extract extended file attributes. This is the reverse of .Fl Fl xattrs and the default behavior if .Nm @@ -667,13 +668,13 @@ This option suppresses these behaviors. .It Fl p , Fl Fl insecure , Fl Fl preserve-permissions (x mode only) Preserve file permissions. -Attempt to restore the full permissions, including owner, file modes, ACLs, -extended attributes and extended file flags, if available, for each item -extracted from the archive. This is te reverse of +Attempt to restore the full permissions, including file modes, file attributes +or file flags, extended file attributes and ACLs, if available, for each item +extracted from the archive. This is the reverse of .Fl Fl no-same-permissions and the default if .Nm -is being run by root and can be partially overridden by also specifying +is being run as root. It can be partially overridden by also specifying .Fl Fl no-acls , .Fl Fl no-fflags , .Fl Fl no-mac-metadata @@ -844,7 +845,7 @@ See for more information about the handling of exclusions. .It Fl Fl xattrs (c, r, u, x modes only) -Archive or extract extended attributes. This is the reverse of +Archive or extract extended file attributes. This is the reverse of .Fl Fl no-xattrs and the default behavior in c, r, and u modes or if .Nm Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Wed Jun 12 12:19:34 2019 (r348992) +++ head/lib/libarchive/config_freebsd.h Wed Jun 12 13:34:12 2019 (r348993) @@ -209,6 +209,7 @@ #define HAVE_TZSET 1 #define HAVE_UINTMAX_T 1 #define HAVE_UNISTD_H 1 +#define HAVE_UNLINKAT 1 #define HAVE_UNSETENV 1 #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 Modified: head/usr.bin/bsdcat/Makefile ============================================================================== --- head/usr.bin/bsdcat/Makefile Wed Jun 12 12:19:34 2019 (r348992) +++ head/usr.bin/bsdcat/Makefile Wed Jun 12 13:34:12 2019 (r348993) @@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.3.3 +BSDCAT_VERSION_STRING= 3.4.0 .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Wed Jun 12 12:19:34 2019 (r348992) +++ head/usr.bin/cpio/Makefile Wed Jun 12 13:34:12 2019 (r348993) @@ -6,7 +6,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.3.3 +BSDCPIO_VERSION_STRING= 3.4.0 .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Wed Jun 12 12:19:34 2019 (r348992) +++ head/usr.bin/tar/Makefile Wed Jun 12 13:34:12 2019 (r348993) @@ -4,7 +4,7 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar -BSDTAR_VERSION_STRING= 3.3.3 +BSDTAR_VERSION_STRING= 3.4.0 .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ From owner-svn-src-all@freebsd.org Wed Jun 12 15:58:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B66C15BACC4; Wed, 12 Jun 2019 15:58:12 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4003831F9; Wed, 12 Jun 2019 15:58:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B571B319; Wed, 12 Jun 2019 15:58:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CFwBHw017293; Wed, 12 Jun 2019 15:58:11 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CFwB5V017292; Wed, 12 Jun 2019 15:58:11 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <201906121558.x5CFwB5V017292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 12 Jun 2019 15:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348994 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 348994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4003831F9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 15:58:12 -0000 Author: bdragon Date: Wed Jun 12 15:58:11 2019 New Revision: 348994 URL: https://svnweb.freebsd.org/changeset/base/348994 Log: Fix PPC970 boot after r348783 r348783 changed the behavior of the kernel mappings and broke booting on G5. - Split the kernel mapping logic out so that the case where we are running from the wrong memory space is handled using identity mappings, and the case where we are not using a DMAP is handled by forcibly mapping the kernel into the dmap range as intended by r348783. Reported by: Mikael Urankar Reviewed by: luporl Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D20608 Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Jun 12 13:34:12 2019 (r348993) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Jun 12 15:58:11 2019 (r348994) @@ -684,8 +684,16 @@ moea64_setup_direct_map(mmu_t mmup, vm_offset_t kernel * without a direct map or on which the kernel is not already executing * out of the direct-mapped region. */ - - if (!hw_direct_map || kernelstart < DMAP_BASE_ADDRESS) { + if (kernelstart < DMAP_BASE_ADDRESS) { + /* + * For pre-dmap execution, we need to use identity mapping + * because we will be operating with the mmu on but in the + * wrong address configuration until we __restartkernel(). + */ + for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; + pa += PAGE_SIZE) + moea64_kenter(mmup, pa, pa); + } else if (!hw_direct_map) { pkernelstart = kernelstart & ~DMAP_BASE_ADDRESS; pkernelend = kernelend & ~DMAP_BASE_ADDRESS; for (pa = pkernelstart & ~PAGE_MASK; pa < pkernelend; From owner-svn-src-all@freebsd.org Wed Jun 12 16:05:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C13515BAF44; Wed, 12 Jun 2019 16:05:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3D8A836D5; Wed, 12 Jun 2019 16:05:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A1D41B4D6; Wed, 12 Jun 2019 16:05:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CG5LMu022495; Wed, 12 Jun 2019 16:05:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CG5LvN022494; Wed, 12 Jun 2019 16:05:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906121605.x5CG5LvN022494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 12 Jun 2019 16:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348995 - head/sys/modules/hwpmc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/modules/hwpmc X-SVN-Commit-Revision: 348995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A3D8A836D5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 16:05:22 -0000 Author: ian Date: Wed Jun 12 16:05:20 2019 New Revision: 348995 URL: https://svnweb.freebsd.org/changeset/base/348995 Log: Don't attempt to include hwpmc support for armv6, we're missing some of the necessary support functions in cpu-v6.h, and it may be that the only armv6 platform we support (RPi, the bcm2835 SOC) is incapable of supporting hwpmc. Reported by: dim@ Modified: head/sys/modules/hwpmc/Makefile Modified: head/sys/modules/hwpmc/Makefile ============================================================================== --- head/sys/modules/hwpmc/Makefile Wed Jun 12 15:58:11 2019 (r348994) +++ head/sys/modules/hwpmc/Makefile Wed Jun 12 16:05:20 2019 (r348995) @@ -22,7 +22,7 @@ SRCS+= hwpmc_x86.c hwpmc_uncore.c SRCS+= hwpmc_arm.c .endif -.if ${MACHINE_ARCH:Marmv[67]*} != "" +.if ${MACHINE_ARCH} == "armv7" SRCS+= hwpmc_armv7.c .endif From owner-svn-src-all@freebsd.org Wed Jun 12 16:06:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F0715BAFE8; Wed, 12 Jun 2019 16:06:32 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E6EA83833; Wed, 12 Jun 2019 16:06:32 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD3241B4D8; Wed, 12 Jun 2019 16:06:31 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CG6VOd022583; Wed, 12 Jun 2019 16:06:31 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CG6VjG022582; Wed, 12 Jun 2019 16:06:31 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201906121606.x5CG6VjG022582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Wed, 12 Jun 2019 16:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348996 - head/sys/dev/ipmi X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/dev/ipmi X-SVN-Commit-Revision: 348996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0E6EA83833 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.934,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 16:06:32 -0000 Author: jtl Date: Wed Jun 12 16:06:31 2019 New Revision: 348996 URL: https://svnweb.freebsd.org/changeset/base/348996 Log: The current IPMI KCS code is waiting 100us for all transitions (roughly between each byte either sent or received). However, most transitions actually complete in 2-3 microseconds. By polling the status register with a delay of 4us with exponential backoff, the performance of most IPMI operations is significantly improved: - A BMC update on a Supermicro x9 or x11 motherboard goes from ~1 hour to ~6-8 minutes. - An ipmitool sensor list time improves by a factor of 4. Testing showed no significant improvements on a modern server by using a lower delay. The changes should also generally reduce the total amount of CPU or I/O bandwidth used for a given IPMI operation. Submitted by: Loic Prylli Reviewed by: jhb MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20527 Modified: head/sys/dev/ipmi/ipmi_kcs.c Modified: head/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- head/sys/dev/ipmi/ipmi_kcs.c Wed Jun 12 16:05:20 2019 (r348995) +++ head/sys/dev/ipmi/ipmi_kcs.c Wed Jun 12 16:06:31 2019 (r348996) @@ -48,55 +48,46 @@ __FBSDID("$FreeBSD$"); #include #endif +#define POLLING_DELAY_MIN 4 /* Waits are 2-3 usecs on typical systems */ +#define POLLING_DELAY_MAX 256 + static void kcs_clear_obf(struct ipmi_softc *, int); static void kcs_error(struct ipmi_softc *); -static int kcs_wait_for_ibf(struct ipmi_softc *, int); -static int kcs_wait_for_obf(struct ipmi_softc *, int); +static int kcs_wait_for_ibf(struct ipmi_softc *, bool); +static int kcs_wait_for_obf(struct ipmi_softc *, bool); static int -kcs_wait_for_ibf(struct ipmi_softc *sc, int state) +kcs_wait(struct ipmi_softc *sc, int value, int mask) { int status, start = ticks; + int delay_usec = POLLING_DELAY_MIN; status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR IBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_IBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR IBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_IBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } + while (ticks - start < MAX_TIMEOUT && (status & mask) != value) { + /* + * The wait delay is increased exponentially to avoid putting + * significant load on I/O bus. + */ + DELAY(delay_usec); + status = INB(sc, KCS_CTL_STS); + if (delay_usec < POLLING_DELAY_MAX) + delay_usec *= 2; } return (status); } static int -kcs_wait_for_obf(struct ipmi_softc *sc, int state) +kcs_wait_for_ibf(struct ipmi_softc *sc, bool level) { - int status, start = ticks; - status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR OBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_OBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR OBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_OBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } - return (status); + return (kcs_wait(sc, level ? KCS_STATUS_IBF : 0, KCS_STATUS_IBF)); +} + +static int +kcs_wait_for_obf(struct ipmi_softc *sc, bool level) +{ + + return (kcs_wait(sc, level ? KCS_STATUS_OBF : 0, KCS_STATUS_OBF)); } static void From owner-svn-src-all@freebsd.org Wed Jun 12 16:34:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02AF615BBB46; Wed, 12 Jun 2019 16:34:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9511B84B2A; Wed, 12 Jun 2019 16:34:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DF261B9C9; Wed, 12 Jun 2019 16:34:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CGY3kJ038721; Wed, 12 Jun 2019 16:34:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CGY3Hb038720; Wed, 12 Jun 2019 16:34:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201906121634.x5CGY3Hb038720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 12 Jun 2019 16:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r348997 - stable/11/sys/netpfil/ipfw/nat64 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw/nat64 X-SVN-Commit-Revision: 348997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9511B84B2A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 16:34:04 -0000 Author: ae Date: Wed Jun 12 16:34:02 2019 New Revision: 348997 URL: https://svnweb.freebsd.org/changeset/base/348997 Log: MFC r348682: Initialize V_nat64out methods explicitly. It looks like initialization of static variable doesn't work for VIMAGE and this leads to panic. Approved by: re (gjb) Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c ============================================================================== --- stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Wed Jun 12 16:06:31 2019 (r348996) +++ stable/11/sys/netpfil/ipfw/nat64/ip_fw_nat64.c Wed Jun 12 16:34:02 2019 (r348997) @@ -83,6 +83,8 @@ vnet_ipfw_nat64_init(const void *arg __unused) ch = &V_layer3_chain; first = IS_DEFAULT_VNET(curvnet) ? 1: 0; + /* Initialize V_nat64out methods explicitly. */ + nat64_set_output_method(0); error = nat64stl_init(ch, first); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Wed Jun 12 16:49:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12A5415BC213; Wed, 12 Jun 2019 16:49:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9BE285271; Wed, 12 Jun 2019 16:49:01 +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 80FAF1BB8B; Wed, 12 Jun 2019 16:49:01 +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 x5CGn1mh044235; Wed, 12 Jun 2019 16:49:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CGn1Zb044234; Wed, 12 Jun 2019 16:49:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201906121649.x5CGn1Zb044234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 12 Jun 2019 16:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348998 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 348998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9BE285271 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 16:49:02 -0000 Author: jhb Date: Wed Jun 12 16:49:01 2019 New Revision: 348998 URL: https://svnweb.freebsd.org/changeset/base/348998 Log: Remove a spurious break when setting up a 64-bit memory BAR. This was causing 'enbit' to not be initialized in this case. CID: 1401924 Reported by: Coverity MFC after: 1 week Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Jun 12 16:34:02 2019 (r348997) +++ head/usr.sbin/bhyve/pci_emul.c Wed Jun 12 16:49:01 2019 (r348998) @@ -634,7 +634,6 @@ pci_emul_alloc_pbar(struct pci_devinst *pdi, int idx, mask = PCIM_BAR_MEM_BASE; lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 | PCIM_BAR_MEM_PREFETCH; - break; } else { baseptr = &pci_emul_membase32; limit = PCI_EMUL_MEMLIMIT32; From owner-svn-src-all@freebsd.org Wed Jun 12 18:07:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67D3615BDE89; Wed, 12 Jun 2019 18:07:07 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D9EF87D77; Wed, 12 Jun 2019 18:07:07 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDB301C97F; Wed, 12 Jun 2019 18:07:06 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CI76lZ085941; Wed, 12 Jun 2019 18:07:06 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CI75jY085932; Wed, 12 Jun 2019 18:07:05 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201906121807.x5CI75jY085932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 12 Jun 2019 18:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348999 - in head: bin/stty share/man/man4 sys/dev/uart sys/dev/usb/serial sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head: bin/stty share/man/man4 sys/dev/uart sys/dev/usb/serial sys/kern sys/sys X-SVN-Commit-Revision: 348999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D9EF87D77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 18:07:07 -0000 Author: shurd Date: Wed Jun 12 18:07:04 2019 New Revision: 348999 URL: https://svnweb.freebsd.org/changeset/base/348999 Log: Some devices take undesired actions when RTS and DTR are asserted. Some development boards for example will reset on DTR, and some radio interfaces will transmit on RTS. This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent RTS and DTR from being asserted on open(), allowing these devices to be used without problems. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20031 Modified: head/bin/stty/modes.c head/bin/stty/print.c head/bin/stty/stty.1 head/share/man/man4/termios.4 head/sys/dev/uart/uart_tty.c head/sys/dev/usb/serial/umcs.c head/sys/dev/usb/serial/usb_serial.c head/sys/kern/tty.c head/sys/sys/_termios.h Modified: head/bin/stty/modes.c ============================================================================== --- head/bin/stty/modes.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/bin/stty/modes.c Wed Jun 12 18:07:04 2019 (r348999) @@ -91,6 +91,8 @@ static const struct modes cmodes[] = { { "-rtsflow", 0, CRTS_IFLOW }, { "mdmbuf", MDMBUF, 0 }, { "-mdmbuf", 0, MDMBUF }, + { "rtsdtr", 0, CNO_RTSDTR }, + { "-rtsdtr", CNO_RTSDTR, 0 }, { NULL, 0, 0 }, }; Modified: head/bin/stty/print.c ============================================================================== --- head/bin/stty/print.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/bin/stty/print.c Wed Jun 12 18:07:04 2019 (r348999) @@ -184,6 +184,12 @@ print(struct termios *tp, struct winsize *wp, int ldis put("-dsrflow", CDSR_OFLOW, 0); put("-dtrflow", CDTR_IFLOW, 0); put("-mdmbuf", MDMBUF, 0); /* XXX mdmbuf == dtrflow */ + if (on(CNO_RTSDTR)) + bput("-rtsdtr"); + else { + if (fmt >= BSD) + bput("rtsdtr"); + } /* special control characters */ cc = tp->c_cc; Modified: head/bin/stty/stty.1 ============================================================================== --- head/bin/stty/stty.1 Wed Jun 12 16:49:01 2019 (r348998) +++ head/bin/stty/stty.1 Wed Jun 12 18:07:04 2019 (r348999) @@ -145,6 +145,8 @@ Assume a line without (with) modem control. .It Cm crtscts Pq Fl crtscts Enable (disable) RTS/CTS flow control. +.It Cm rtsdtr Pq Fl -rtsdtr +Enable (disable) asserting RTS/DTR on open. .El .Ss Input Modes: This corresponds to the c_iflag in the termios structure. Modified: head/share/man/man4/termios.4 ============================================================================== --- head/share/man/man4/termios.4 Wed Jun 12 16:49:01 2019 (r348998) +++ head/share/man/man4/termios.4 Wed Jun 12 18:07:04 2019 (r348999) @@ -1185,6 +1185,8 @@ flow control of output */ /* RTS flow control of input */ .It Dv MDMBUF /* flow control output via Carrier */ +.It Dv CNO_RTSDTR +/* Do not assert RTS or DTR automatically */ .El .Pp The @@ -1266,6 +1268,12 @@ If .Dv MDMBUF is set then output flow control is controlled by the state of Carrier Detect. +.Pp +If +.Dv CNO_RTSDTR +is set then the RTS and DTR lines will not be asserted when the device +is opened. +As a result, this flag is only useful on initial-state devices. .Pp If the object for which the control modes are set is not an asynchronous serial connection, some of the modes may be ignored; for example, if an Modified: head/sys/dev/uart/uart_tty.c ============================================================================== --- head/sys/dev/uart/uart_tty.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/sys/dev/uart/uart_tty.c Wed Jun 12 18:07:04 2019 (r348999) @@ -285,13 +285,16 @@ uart_tty_param(struct tty *tp, struct termios *t) parity = UART_PARITY_NONE; if (UART_PARAM(sc, t->c_ospeed, databits, stopbits, parity) != 0) return (EINVAL); - UART_SETSIG(sc, SER_DDTR | SER_DTR); + if ((t->c_cflag & CNO_RTSDTR) == 0) + UART_SETSIG(sc, SER_DDTR | SER_DTR); /* Set input flow control state. */ if (!sc->sc_hwiflow) { if ((t->c_cflag & CRTS_IFLOW) && sc->sc_isquelch) UART_SETSIG(sc, SER_DRTS); - else - UART_SETSIG(sc, SER_DRTS | SER_RTS); + else { + if ((t->c_cflag & CNO_RTSDTR) == 0) + UART_SETSIG(sc, SER_DRTS | SER_RTS); + } } else UART_IOCTL(sc, UART_IOCTL_IFLOW, (t->c_cflag & CRTS_IFLOW)); /* Set output flow control state. */ Modified: head/sys/dev/usb/serial/umcs.c ============================================================================== --- head/sys/dev/usb/serial/umcs.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/sys/dev/usb/serial/umcs.c Wed Jun 12 18:07:04 2019 (r348999) @@ -499,7 +499,9 @@ umcs7840_cfg_open(struct ucom_softc *ucom) * Enable DTR/RTS on modem control, enable modem interrupts -- * documented */ - sc->sc_ports[pn].sc_mcr = MCS7840_UART_MCR_DTR | MCS7840_UART_MCR_RTS | MCS7840_UART_MCR_IE; + sc->sc_ports[pn].sc_mcr = MCS7840_UART_MCR_IE; + if (ucom->sc_tty == NULL || (ucom->sc_tty->t_termios.c_cflag & CNO_RTSDTR) == 0) + sc->sc_ports[pn].sc_mcr |= MCS7840_UART_MCR_DTR | MCS7840_UART_MCR_RTS; if (umcs7840_set_UART_reg_sync(sc, pn, MCS7840_UART_REG_MCR, sc->sc_ports[pn].sc_mcr)) return; Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/sys/dev/usb/serial/usb_serial.c Wed Jun 12 18:07:04 2019 (r348999) @@ -796,7 +796,8 @@ ucom_open(struct tty *tp) &sc->sc_start_task[0].hdr, &sc->sc_start_task[1].hdr); - ucom_modem(tp, SER_DTR | SER_RTS, 0); + if (sc->sc_tty == NULL || (sc->sc_tty->t_termios.c_cflag & CNO_RTSDTR) == 0) + ucom_modem(tp, SER_DTR | SER_RTS, 0); ucom_ring(sc, 0); Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Wed Jun 12 16:49:01 2019 (r348998) +++ head/sys/kern/tty.c Wed Jun 12 18:07:04 2019 (r348999) @@ -93,7 +93,7 @@ static const char *dev_console_filename; FLUSHO|NOKERNINFO|NOFLSH) #define TTYSUP_CFLAG (CIGNORE|CSIZE|CSTOPB|CREAD|PARENB|PARODD|\ HUPCL|CLOCAL|CCTS_OFLOW|CRTS_IFLOW|CDTR_IFLOW|\ - CDSR_OFLOW|CCAR_OFLOW) + CDSR_OFLOW|CCAR_OFLOW|CNO_RTSDTR) #define TTY_CALLOUT(tp,d) (dev2unit(d) & TTYUNIT_CALLOUT) @@ -332,7 +332,8 @@ ttydev_open(struct cdev *dev, int oflags, int devtype if (TTY_CALLOUT(tp, dev) || dev == dev_console) tp->t_termios.c_cflag |= CLOCAL; - ttydevsw_modem(tp, SER_DTR|SER_RTS, 0); + if ((tp->t_termios.c_cflag & CNO_RTSDTR) == 0) + ttydevsw_modem(tp, SER_DTR|SER_RTS, 0); error = ttydevsw_open(tp); if (error != 0) Modified: head/sys/sys/_termios.h ============================================================================== --- head/sys/sys/_termios.h Wed Jun 12 16:49:01 2019 (r348998) +++ head/sys/sys/_termios.h Wed Jun 12 18:07:04 2019 (r348999) @@ -143,6 +143,7 @@ #define CDTR_IFLOW 0x00040000 /* DTR flow control of input */ #define CDSR_OFLOW 0x00080000 /* DSR flow control of output */ #define CCAR_OFLOW 0x00100000 /* DCD flow control of output */ +#define CNO_RTSDTR 0x00200000 /* Do not assert RTS or DTR automatically */ #endif From owner-svn-src-all@freebsd.org Wed Jun 12 19:29:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D31D15BFFC2; Wed, 12 Jun 2019 19:29:14 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF3C88A748; Wed, 12 Jun 2019 19:29:13 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DA131D713; Wed, 12 Jun 2019 19:29:13 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CJTDb2027583; Wed, 12 Jun 2019 19:29:13 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CJTCKQ027579; Wed, 12 Jun 2019 19:29:12 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906121929.x5CJTCKQ027579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 12 Jun 2019 19:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349000 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 349000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF3C88A748 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 19:29:14 -0000 Author: oshogbo Date: Wed Jun 12 19:29:12 2019 New Revision: 349000 URL: https://svnweb.freebsd.org/changeset/base/349000 Log: geli: partially revert r348709 Let's change the unsigned arguments to the signed one, but let's don't change pointers to the array notation. Requested by: pjd Modified: head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_hmac.c head/sys/geom/eli/pkcs5v2.c head/sys/geom/eli/pkcs5v2.h Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Wed Jun 12 18:07:04 2019 (r348999) +++ head/sys/geom/eli/g_eli.h Wed Jun 12 19:29:12 2019 (r349000) @@ -721,12 +721,12 @@ struct hmac_ctx { SHA512_CTX outerctx; }; -void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], +void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, size_t hkeylen); void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data, size_t datasize); void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize); -void g_eli_crypto_hmac(const char hkey[], size_t hkeysize, +void g_eli_crypto_hmac(const char *hkey, size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize); void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, Modified: head/sys/geom/eli/g_eli_hmac.c ============================================================================== --- head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 18:07:04 2019 (r348999) +++ head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:12 2019 (r349000) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include void -g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], +g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, size_t hkeylen) { u_char k_ipad[128], k_opad[128], key[128]; @@ -110,7 +110,7 @@ g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t } void -g_eli_crypto_hmac(const char hkey[], size_t hkeysize, const uint8_t *data, +g_eli_crypto_hmac(const char *hkey, size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize) { struct hmac_ctx ctx; Modified: head/sys/geom/eli/pkcs5v2.c ============================================================================== --- head/sys/geom/eli/pkcs5v2.c Wed Jun 12 18:07:04 2019 (r348999) +++ head/sys/geom/eli/pkcs5v2.c Wed Jun 12 19:29:12 2019 (r349000) @@ -52,7 +52,7 @@ xor(uint8_t *dst, const uint8_t *src, size_t size) void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, - size_t saltsize, const char passphrase[], u_int iterations) + size_t saltsize, const char *passphrase, u_int iterations) { uint8_t md[SHA512_MDLEN], saltcount[saltsize + sizeof(uint32_t)]; uint8_t *counter, *keyp; Modified: head/sys/geom/eli/pkcs5v2.h ============================================================================== --- head/sys/geom/eli/pkcs5v2.h Wed Jun 12 18:07:04 2019 (r348999) +++ head/sys/geom/eli/pkcs5v2.h Wed Jun 12 19:29:12 2019 (r349000) @@ -31,7 +31,7 @@ #ifndef _PKCS5V2_H_ #define _PKCS5V2_H_ void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, - size_t saltsize, const char passphrase[], u_int iterations); + size_t saltsize, const char *passphrase, u_int iterations); #ifndef _KERNEL int pkcs5v2_calculate(int usecs); #endif From owner-svn-src-all@freebsd.org Wed Jun 12 19:29:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DF2715C0002; Wed, 12 Jun 2019 19:29:49 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 041138A862; Wed, 12 Jun 2019 19:29:49 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D101B1D714; Wed, 12 Jun 2019 19:29:48 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CJTmXt027648; Wed, 12 Jun 2019 19:29:48 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CJTmwt027647; Wed, 12 Jun 2019 19:29:48 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906121929.x5CJTmwt027647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 12 Jun 2019 19:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349001 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 349001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 041138A862 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 19:29:49 -0000 Author: oshogbo Date: Wed Jun 12 19:29:48 2019 New Revision: 349001 URL: https://svnweb.freebsd.org/changeset/base/349001 Log: geli: style nits Modified: head/sys/geom/eli/g_eli_hmac.c Modified: head/sys/geom/eli/g_eli_hmac.c ============================================================================== --- head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:12 2019 (r349000) +++ head/sys/geom/eli/g_eli_hmac.c Wed Jun 12 19:29:48 2019 (r349001) @@ -96,11 +96,11 @@ g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t /* Complete inner hash */ SHA512_Final(digest, &ctx->innerctx); - + /* Complete outer hash */ SHA512_Update(&ctx->outerctx, digest, sizeof(digest)); SHA512_Final(digest, &ctx->outerctx); - + explicit_bzero(ctx, sizeof(*ctx)); /* mdsize == 0 means "Give me the whole hash!" */ if (mdsize == 0) From owner-svn-src-all@freebsd.org Wed Jun 12 19:31:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B8BF15C00BC; Wed, 12 Jun 2019 19:31:28 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2F768AABD; Wed, 12 Jun 2019 19:31:27 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C7A71D865; Wed, 12 Jun 2019 19:31:27 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CJVRDf031781; Wed, 12 Jun 2019 19:31:27 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CJVRha031779; Wed, 12 Jun 2019 19:31:27 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906121931.x5CJVRha031779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 12 Jun 2019 19:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349002 - head/lib/libcasper/services/cap_fileargs X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcasper/services/cap_fileargs X-SVN-Commit-Revision: 349002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B2F768AABD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 19:31:28 -0000 Author: oshogbo Date: Wed Jun 12 19:31:26 2019 New Revision: 349002 URL: https://svnweb.freebsd.org/changeset/base/349002 Log: fileargs: add wrapping/unwrapping functions Those function may be useful to pass fileargs connections around. Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Jun 12 19:29:48 2019 (r349001) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Wed Jun 12 19:31:26 2019 (r349002) @@ -424,6 +424,39 @@ fileargs_free(fileargs_t *fa) free(fa); } +cap_channel_t * +fileargs_unwrap(fileargs_t *fa, int *flags) +{ + cap_channel_t *chan; + + if (fa == NULL) + return (NULL); + + assert(fa->fa_magic == FILEARGS_MAGIC); + + chan = fa->fa_chann; + if (flags != NULL) { + *flags = fa->fa_fdflags; + } + + nvlist_destroy(fa->fa_cache); + explicit_bzero(&fa->fa_magic, sizeof(fa->fa_magic)); + free(fa); + + return (chan); +} + +fileargs_t * +fileargs_wrap(cap_channel_t *chan, int fdflags) +{ + + if (chan == NULL) { + return (NULL); + } + + return (fileargs_create(chan, fdflags)); +} + /* * Service functions. */ Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h ============================================================================== --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Jun 12 19:29:48 2019 (r349001) +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Jun 12 19:31:26 2019 (r349002) @@ -54,6 +54,9 @@ int fileargs_lstat(fileargs_t *fa, const char *name, s int fileargs_open(fileargs_t *fa, const char *name); void fileargs_free(fileargs_t *fa); FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode); + +fileargs_t *fileargs_wrap(cap_channel_t *chan, int fdflags); +cap_channel_t *fileargs_unwrap(fileargs_t *fa, int *fdflags); #else typedef struct fileargs { int fa_flags; @@ -114,7 +117,27 @@ FILE *fileargs_fopen(fileargs_t *fa, const char *name, (void) fa; return (fopen(name, mode)); } -#define fileargs_free(fa) (free(fa)) +#define fileargs_free(fa) (free(fa)) + +static inline fileargs_t * +fileargs_wrap(cap_channel_t *chan, int fdflags) +{ + + cap_close(chan); + return (fileargs_init(0, NULL, fdflags, 0, NULL, 0)); +} + +static inline cap_channel_t * +fileargs_unwrap(fileargs_t *fa, int *fdflags) +{ + + if (fdflags != NULL) { + *fdflags = fa->fa_flags; + } + fileargs_free(fa); + return (cap_init()); +} + #endif #endif /* !_FILEARGS_H_ */ From owner-svn-src-all@freebsd.org Wed Jun 12 20:38:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BE0A15C1714; Wed, 12 Jun 2019 20:38:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2F258CD80; Wed, 12 Jun 2019 20:38:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A69561E303; Wed, 12 Jun 2019 20:38:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CKcnFu065003; Wed, 12 Jun 2019 20:38:49 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CKcnix065002; Wed, 12 Jun 2019 20:38:49 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906122038.x5CKcnix065002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 12 Jun 2019 20:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349003 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2F258CD80 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 20:38:50 -0000 Author: alc Date: Wed Jun 12 20:38:49 2019 New Revision: 349003 URL: https://svnweb.freebsd.org/changeset/base/349003 Log: Change pmap_demote_l2_locked() so that it removes the superpage mapping on a demotion failure. Otherwise, some callers to pmap_demote_l2_locked(), such as pmap_protect(), may leave an incorrect mapping in place on a demotion failure. Change pmap_demote_l2_locked() so that it handles addresses that are not superpage aligned. Some callers to pmap_demote_l2_locked(), such as pmap_protect(), may not pass a superpage aligned address. Change pmap_enter_l2() so that it correctly calls vm_page_free_pages_toq(). The arm64 pmap is updating the count of wired pages when freeing page table pages, so pmap_enter_l2() should pass false to vm_page_free_pages_toq(). Optimize TLB invalidation in pmap_remove_l2(). Reviewed by: kib, markj (an earlier version) Discussed with: andrew MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D20585 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Jun 12 19:31:26 2019 (r349002) +++ head/sys/arm64/arm64/pmap.c Wed Jun 12 20:38:49 2019 (r349003) @@ -2267,6 +2267,8 @@ pmap_pv_demote_l2(pmap_t pmap, vm_offset_t va, vm_padd int bit, field; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((va & L2_OFFSET) == 0, + ("pmap_pv_demote_l2: va is not 2mpage aligned")); KASSERT((pa & L2_OFFSET) == 0, ("pmap_pv_demote_l2: pa is not 2mpage aligned")); CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); @@ -2277,7 +2279,6 @@ pmap_pv_demote_l2(pmap_t pmap, vm_offset_t va, vm_padd * must not be released until the last pv entry is reinstantiated. */ pvh = pa_to_pvh(pa); - va = va & ~L2_OFFSET; pv = pmap_pvh_remove(pvh, pmap, va); KASSERT(pv != NULL, ("pmap_pv_demote_l2: pv not found")); m = PHYS_TO_VM_PAGE(pa); @@ -2433,7 +2434,13 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ old_l2 = pmap_load_clear(l2); KASSERT((old_l2 & ATTR_DESCR_MASK) == L2_BLOCK, ("pmap_remove_l2: L2e %lx is not a block mapping", old_l2)); - pmap_invalidate_range(pmap, sva, sva + L2_SIZE); + + /* + * Since a promotion must break the 4KB page mappings before making + * the 2MB page mapping, a pmap_invalidate_page() suffices. + */ + pmap_invalidate_page(pmap, sva); + if (old_l2 & ATTR_SW_WIRED) pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE; pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE); @@ -2571,8 +2578,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t pmap_remove_l2(pmap, l2, sva, pmap_load(l1), &free, &lock); continue; - } else if (pmap_demote_l2_locked(pmap, l2, - sva &~L2_OFFSET, &lock) == NULL) + } else if (pmap_demote_l2_locked(pmap, l2, sva, + &lock) == NULL) continue; l3_paddr = pmap_load(l2); } @@ -3052,8 +3059,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v if (pde != NULL && lvl == 1) { l2 = pmap_l1_to_l2(pde, va); if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK && - (l3 = pmap_demote_l2_locked(pmap, l2, va & ~L2_OFFSET, - &lock)) != NULL) { + (l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) { l3 = &l3[pmap_l3_index(va)]; if (va < VM_MAXUSER_ADDRESS) { mpte = PHYS_TO_VM_PAGE( @@ -3391,7 +3397,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t lockp) != 0) break; } - vm_page_free_pages_toq(&free, true); + vm_page_free_pages_toq(&free, false); if (va >= VM_MAXUSER_ADDRESS) { /* * Both pmap_remove_l2() and pmap_remove_l3() will @@ -3419,7 +3425,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Invalidate those entries. */ pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(&free, true); + vm_page_free_pages_toq(&free, false); } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", @@ -4331,8 +4337,7 @@ retry_pv_loop: va = pv->pv_va; pte = pmap_pte(pmap, pv->pv_va, &lvl); if ((pmap_load(pte) & ATTR_AP_RW_BIT) == ATTR_AP(ATTR_AP_RW)) - pmap_demote_l2_locked(pmap, pte, va & ~L2_OFFSET, - &lock); + (void)pmap_demote_l2_locked(pmap, pte, va, &lock); KASSERT(lock == VM_PAGE_TO_PV_LIST_LOCK(m), ("inconsistent pv lock %p %p for page %p", lock, VM_PAGE_TO_PV_LIST_LOCK(m), m)); @@ -4906,7 +4911,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size pte = pmap_l1_to_l2(pte, tmpva); case 2: newpte = pmap_demote_l2(kernel_pmap, pte, - tmpva & ~L2_OFFSET); + tmpva); if (newpte == NULL) return (EINVAL); pte = pmap_l2_to_l3(pte, tmpva); @@ -5005,6 +5010,18 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_ return (l2); } +static void +pmap_demote_l2_abort(pmap_t pmap, vm_offset_t va, pt_entry_t *l2, + struct rwlock **lockp) +{ + struct spglist free; + + SLIST_INIT(&free); + (void)pmap_remove_l2(pmap, l2, va, pmap_load(pmap_l1(pmap, va)), &free, + lockp); + vm_page_free_pages_toq(&free, false); +} + /* * Create an L3 table to map all addresses within an L2 mapping. */ @@ -5023,8 +5040,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ oldl2 = pmap_load(l2); KASSERT((oldl2 & ATTR_DESCR_MASK) == L2_BLOCK, ("pmap_demote_l2: Demoting a non-block entry")); - KASSERT((va & L2_OFFSET) == 0, - ("pmap_demote_l2: Invalid virtual address %#lx", va)); + va &= ~L2_OFFSET; tmpl2 = 0; if (va <= (vm_offset_t)l2 && va + L2_SIZE > (vm_offset_t)l2) { @@ -5033,15 +5049,57 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ return (NULL); } + /* + * Invalidate the 2MB page mapping and return "failure" if the + * mapping was never accessed. + */ + if ((oldl2 & ATTR_AF) == 0) { + KASSERT((oldl2 & ATTR_SW_WIRED) == 0, + ("pmap_demote_l2: a wired mapping is missing ATTR_AF")); + pmap_demote_l2_abort(pmap, va, l2, lockp); + CTR2(KTR_PMAP, "pmap_demote_l2: failure for va %#lx in pmap %p", + va, pmap); + goto fail; + } + if ((ml3 = pmap_remove_pt_page(pmap, va)) == NULL) { + KASSERT((oldl2 & ATTR_SW_WIRED) == 0, + ("pmap_demote_l2: page table page for a wired mapping" + " is missing")); + + /* + * If the page table page is missing and the mapping + * is for a kernel address, the mapping must belong to + * the direct map. Page table pages are preallocated + * for every other part of the kernel address space, + * so the direct map region is the only part of the + * kernel address space that must be handled here. + */ + KASSERT(va < VM_MAXUSER_ADDRESS || VIRT_IN_DMAP(va), + ("pmap_demote_l2: No saved mpte for va %#lx", va)); + + /* + * If the 2MB page mapping belongs to the direct map + * region of the kernel's address space, then the page + * allocation request specifies the highest possible + * priority (VM_ALLOC_INTERRUPT). Otherwise, the + * priority is normal. + */ ml3 = vm_page_alloc(NULL, pmap_l2_pindex(va), (VIRT_IN_DMAP(va) ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); + + /* + * If the allocation of the new page table page fails, + * invalidate the 2MB page mapping and return "failure". + */ if (ml3 == NULL) { + pmap_demote_l2_abort(pmap, va, l2, lockp); CTR2(KTR_PMAP, "pmap_demote_l2: failure for va %#lx" " in pmap %p", va, pmap); goto fail; } + if (va < VM_MAXUSER_ADDRESS) { ml3->wire_count = NL3PG; pmap_resident_count_inc(pmap, 1); @@ -5090,6 +5148,10 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_ if ((oldl2 & ATTR_SW_MANAGED) != 0) reserve_pv_entries(pmap, Ln_ENTRIES - 1, lockp); + /* + * Pass PAGE_SIZE so that a single TLB invalidation is performed on + * the 2MB page mapping. + */ pmap_update_entry(pmap, l2, l3phys | L2_TABLE, va, PAGE_SIZE); /* From owner-svn-src-all@freebsd.org Wed Jun 12 21:09:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC4ED15C1DCF; Wed, 12 Jun 2019 21:09:33 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E468D8CC; Wed, 12 Jun 2019 21:09:32 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id C646C3C0182; Wed, 12 Jun 2019 21:09:30 +0000 (UTC) Date: Wed, 12 Jun 2019 21:09:30 +0000 From: Brooks Davis To: Shawn Webb Cc: Doug Moore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, pho@freebsd.org Subject: Re: svn commit: r348843 - head/sys/vm Message-ID: <20190612210930.GK64641@spindle.one-eyed-alien.net> References: <201906100307.x5A37BFt099669@repo.freebsd.org> <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mhOzvPhkurUs4vA9" Content-Disposition: inline In-Reply-To: <20190610130034.k2nzitvaxvpj5lzx@mutt-hbsd> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 65E468D8CC X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.33 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spindle.one-eyed-alien.net]; NEURAL_HAM_SHORT(-0.84)[-0.844,0]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; IP_SCORE(-3.58)[ip: (-9.31), ipnet: 199.48.128.0/22(-4.63), asn: 36236(-3.88), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 21:09:34 -0000 --mhOzvPhkurUs4vA9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2019 at 09:00:34AM -0400, Shawn Webb wrote: > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: > > Author: dougm > > Date: Mon Jun 10 03:07:10 2019 > > New Revision: 348843 > > URL: https://svnweb.freebsd.org/changeset/base/348843 > >=20 > > Log: > > There are times when a len=3D=3D0 parameter to mmap is okay. But on a > > 32-bit machine, a len parameter just a few bytes short of 4G, rounded > > up to a page boundary and hitting zero then, is not okay. Return > > failure in that case. > > =20 > > Reported by: pho > > Reviewed by: alc, kib (mentor) > > Tested by: pho > > Differential Revision: https://reviews.freebsd.org/D20580 > >=20 > > Modified: > > head/sys/vm/vm_mmap.c > >=20 > > Modified: head/sys/vm/vm_mmap.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/vm/vm_mmap.c Sun Jun 9 22:55:21 2019 (r348842) > > +++ head/sys/vm/vm_mmap.c Mon Jun 10 03:07:10 2019 (r348843) > > @@ -257,7 +257,10 @@ kern_mmap(struct thread *td, uintptr_t addr0, size= _t s > > =20 > > /* Adjust size for rounding (on both ends). */ > > size +=3D pageoff; /* low end... */ > > - size =3D (vm_size_t) round_page(size); /* hi end */ > > + /* Check for rounding up to zero. */ > > + if (round_page(size) < size) > > + return (EINVAL); >=20 > The mmap(2) manpage says that len=3D=3D0 results in EINVAL, so the manpage > needs updating. The manpage is correct for ABIs people are actually writing code for (ELF). I suppose it could document the exception for a.out (see the conditional containing SV_CURPROC_FLAG(SV_AOUT) in kern_mmap()), but it should be in BUGS, HISTORY, or some such. -- Brooks --mhOzvPhkurUs4vA9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJdAWoKAAoJEKzQXbSebgfAd5wIAJ8q1Nv3uNJSB2JZkCfk8rSr 7D8CpRyHqrzP1+ew7QrW8r53gqExbnwki01IloB9v27TuCmTALmDMpQFQalAHXsi yrFlO/YuyhMW+Zfnrv6ym6PoYV6KzyoHN7W2r30ObKkJG4mqfjU6PWrKp8A1eIoh VJYzlcbcXWooDTG5l1MIAeEVaxziUN61+WtXBsj5mBQd3ionbpJP9kMZxoMCbbqb 0iI+YJUETCLIF/BS6EcnIOJpVTChobJ5hk1LIOqRfU/I4uo+d1ThRbX+pYJy/TkS 03X5pcxKd5f6MPxvPZp2N2RB5rWizWj/HHzgLMoEyg1J34TR0/d5GmQk7h9DLaU= =kkOR -----END PGP SIGNATURE----- --mhOzvPhkurUs4vA9-- From owner-svn-src-all@freebsd.org Wed Jun 12 21:10:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E5515C1E56; Wed, 12 Jun 2019 21:10:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FAB08DA53; Wed, 12 Jun 2019 21:10:40 +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 67B571E827; Wed, 12 Jun 2019 21:10:40 +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 x5CLAewe080597; Wed, 12 Jun 2019 21:10:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CLAbm3080581; Wed, 12 Jun 2019 21:10:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201906122110.x5CLAbm3080581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 12 Jun 2019 21:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349004 - in head: . contrib/compiler-rt/lib/sanitizer_common contrib/libunwind/src contrib/llvm/lib/DebugInfo/DWARF contrib/llvm/lib/MC contrib/llvm/lib/Object contrib/llvm/lib/Target/... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: . contrib/compiler-rt/lib/sanitizer_common contrib/libunwind/src contrib/llvm/lib/DebugInfo/DWARF contrib/llvm/lib/MC contrib/llvm/lib/Object contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/... X-SVN-Commit-Revision: 349004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FAB08DA53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 21:10:41 -0000 Author: dim Date: Wed Jun 12 21:10:37 2019 New Revision: 349004 URL: https://svnweb.freebsd.org/changeset/base/349004 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp to the upstream release_80 branch r363030 (effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a week or so. MFC after: 2 weeks Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc head/contrib/libunwind/src/UnwindRegistersRestore.S head/contrib/libunwind/src/UnwindRegistersSave.S head/contrib/libunwind/src/assembly.h head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/WasmObjectWriter.cpp head/contrib/llvm/lib/Object/COFFImportFile.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp head/contrib/llvm/lib/Target/AMDGPU/VOP2Instructions.td head/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp head/contrib/llvm/lib/Target/AVR/AVRISelLowering.h head/contrib/llvm/lib/Target/AVR/AVRSubtarget.cpp head/contrib/llvm/lib/Target/AVR/AVRSubtarget.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Linux.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/lld/COFF/Writer.cpp head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp head/contrib/llvm/tools/lld/ELF/InputSection.cpp head/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp head/contrib/llvm/tools/lld/ELF/Writer.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/freebsd_cc_version.h head/lib/clang/headers/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libunwind/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/openmp/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jun 12 20:38:49 2019 (r349003) +++ head/ObsoleteFiles.inc Wed Jun 12 21:10:37 2019 (r349004) @@ -38,6 +38,157 @@ # xargs -n1 | sort | uniq -d; # done +# 20190612: new clang import which bumps version from 8.0.0 to 8.0.1. +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/netbsd_syscall_hooks.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/8.0.0/include/sanitizer +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_device_functions.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_libdevice_declares.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/8.0.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/8.0.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/altivec.h +OLD_FILES+=usr/lib/clang/8.0.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/arm64intr.h +OLD_FILES+=usr/lib/clang/8.0.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/8.0.0/include/arm_fp16.h +OLD_FILES+=usr/lib/clang/8.0.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/8.0.0/include/armintr.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/cetintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/cldemoteintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/8.0.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/invpcidintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/8.0.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/8.0.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/8.0.0/include/movdirintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/msa.h +OLD_FILES+=usr/lib/clang/8.0.0/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/opencl-c.h +OLD_FILES+=usr/lib/clang/8.0.0/include/pconfigintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/ptwriteintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/sgxintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/8.0.0/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/waitpkgintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/wbnoinvdintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/8.0.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/8.0.0/include +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.msan-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.msan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/8.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/8.0.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/8.0.0/lib +OLD_DIRS+=usr/lib/clang/8.0.0 + # 20190523: Remove obsolete kgzip and support files OLD_FILES+=usr/sbin/kgzip OLD_FILES+=usr/lib/kgzldr.o Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jun 12 20:38:49 2019 (r349003) +++ head/UPDATING Wed Jun 12 21:10:37 2019 (r349004) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190612: + Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have + been upgraded to 8.0.1. Please see the 20141231 entry below for + information about prerequisites and upgrading, if you are not already + using clang 3.5.0 or higher. + 20190608: A fix was applied to i386 kernel modules to avoid panics with dpcpu or vnet. Users need to recompile i386 kernel modules Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Wed Jun 12 21:10:37 2019 (r349004) @@ -124,7 +124,9 @@ #include #include #include +#if 0 #include +#endif #include #include #include Modified: head/contrib/libunwind/src/UnwindRegistersRestore.S ============================================================================== --- head/contrib/libunwind/src/UnwindRegistersRestore.S Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/libunwind/src/UnwindRegistersRestore.S Wed Jun 12 21:10:37 2019 (r349004) @@ -396,119 +396,119 @@ Lnovec: #elif defined(__ppc__) DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv) -; -; void libunwind::Registers_ppc::jumpto() -; -; On entry: -; thread_state pointer is in r3 -; +// +// void libunwind::Registers_ppc::jumpto() +// +// On entry: +// thread_state pointer is in r3 +// - ; restore integral registerrs - ; skip r0 for now - ; skip r1 for now - lwz r2, 16(r3) - ; skip r3 for now - ; skip r4 for now - ; skip r5 for now - lwz r6, 32(r3) - lwz r7, 36(r3) - lwz r8, 40(r3) - lwz r9, 44(r3) - lwz r10, 48(r3) - lwz r11, 52(r3) - lwz r12, 56(r3) - lwz r13, 60(r3) - lwz r14, 64(r3) - lwz r15, 68(r3) - lwz r16, 72(r3) - lwz r17, 76(r3) - lwz r18, 80(r3) - lwz r19, 84(r3) - lwz r20, 88(r3) - lwz r21, 92(r3) - lwz r22, 96(r3) - lwz r23,100(r3) - lwz r24,104(r3) - lwz r25,108(r3) - lwz r26,112(r3) - lwz r27,116(r3) - lwz r28,120(r3) - lwz r29,124(r3) - lwz r30,128(r3) - lwz r31,132(r3) + // restore integral registerrs + // skip r0 for now + // skip r1 for now + lwz %r2, 16(%r3) + // skip r3 for now + // skip r4 for now + // skip r5 for now + lwz %r6, 32(%r3) + lwz %r7, 36(%r3) + lwz %r8, 40(%r3) + lwz %r9, 44(%r3) + lwz %r10, 48(%r3) + lwz %r11, 52(%r3) + lwz %r12, 56(%r3) + lwz %r13, 60(%r3) + lwz %r14, 64(%r3) + lwz %r15, 68(%r3) + lwz %r16, 72(%r3) + lwz %r17, 76(%r3) + lwz %r18, 80(%r3) + lwz %r19, 84(%r3) + lwz %r20, 88(%r3) + lwz %r21, 92(%r3) + lwz %r22, 96(%r3) + lwz %r23,100(%r3) + lwz %r24,104(%r3) + lwz %r25,108(%r3) + lwz %r26,112(%r3) + lwz %r27,116(%r3) + lwz %r28,120(%r3) + lwz %r29,124(%r3) + lwz %r30,128(%r3) + lwz %r31,132(%r3) - ; restore float registers - lfd f0, 160(r3) - lfd f1, 168(r3) - lfd f2, 176(r3) - lfd f3, 184(r3) - lfd f4, 192(r3) - lfd f5, 200(r3) - lfd f6, 208(r3) - lfd f7, 216(r3) - lfd f8, 224(r3) - lfd f9, 232(r3) - lfd f10,240(r3) - lfd f11,248(r3) - lfd f12,256(r3) - lfd f13,264(r3) - lfd f14,272(r3) - lfd f15,280(r3) - lfd f16,288(r3) - lfd f17,296(r3) - lfd f18,304(r3) - lfd f19,312(r3) - lfd f20,320(r3) - lfd f21,328(r3) - lfd f22,336(r3) - lfd f23,344(r3) - lfd f24,352(r3) - lfd f25,360(r3) - lfd f26,368(r3) - lfd f27,376(r3) - lfd f28,384(r3) - lfd f29,392(r3) - lfd f30,400(r3) - lfd f31,408(r3) + // restore float registers + lfd %f0, 160(%r3) + lfd %f1, 168(%r3) + lfd %f2, 176(%r3) + lfd %f3, 184(%r3) + lfd %f4, 192(%r3) + lfd %f5, 200(%r3) + lfd %f6, 208(%r3) + lfd %f7, 216(%r3) + lfd %f8, 224(%r3) + lfd %f9, 232(%r3) + lfd %f10,240(%r3) + lfd %f11,248(%r3) + lfd %f12,256(%r3) + lfd %f13,264(%r3) + lfd %f14,272(%r3) + lfd %f15,280(%r3) + lfd %f16,288(%r3) + lfd %f17,296(%r3) + lfd %f18,304(%r3) + lfd %f19,312(%r3) + lfd %f20,320(%r3) + lfd %f21,328(%r3) + lfd %f22,336(%r3) + lfd %f23,344(%r3) + lfd %f24,352(%r3) + lfd %f25,360(%r3) + lfd %f26,368(%r3) + lfd %f27,376(%r3) + lfd %f28,384(%r3) + lfd %f29,392(%r3) + lfd %f30,400(%r3) + lfd %f31,408(%r3) - ; restore vector registers if any are in use - lwz r5,156(r3) ; test VRsave - cmpwi r5,0 - beq Lnovec + // restore vector registers if any are in use + lwz %r5, 156(%r3) // test VRsave + cmpwi %r5, 0 + beq Lnovec - subi r4,r1,16 - rlwinm r4,r4,0,0,27 ; mask low 4-bits - ; r4 is now a 16-byte aligned pointer into the red zone - ; the _vectorRegisters may not be 16-byte aligned so copy via red zone temp buffer + subi %r4, %r1, 16 + rlwinm %r4, %r4, 0, 0, 27 // mask low 4-bits + // r4 is now a 16-byte aligned pointer into the red zone + // the _vectorRegisters may not be 16-byte aligned so copy via red zone temp buffer + - #define LOAD_VECTOR_UNALIGNEDl(_index) \ - andis. r0,r5,(1<<(15-_index)) @\ - beq Ldone ## _index @\ - lwz r0, 424+_index*16(r3) @\ - stw r0, 0(r4) @\ - lwz r0, 424+_index*16+4(r3) @\ - stw r0, 4(r4) @\ - lwz r0, 424+_index*16+8(r3) @\ - stw r0, 8(r4) @\ - lwz r0, 424+_index*16+12(r3)@\ - stw r0, 12(r4) @\ - lvx v ## _index,0,r4 @\ -Ldone ## _index: + andis. %r0, %r5, (1<<(15-_index)) SEPARATOR \ + beq Ldone ## _index SEPARATOR \ + lwz %r0, 424+_index*16(%r3) SEPARATOR \ + stw %r0, 0(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+4(%r3) SEPARATOR \ + stw %r0, 4(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+8(%r3) SEPARATOR \ + stw %r0, 8(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+12(%r3) SEPARATOR \ + stw %r0, 12(%r4) SEPARATOR \ + lvx %v ## _index, 0, %r4 SEPARATOR \ + Ldone ## _index: #define LOAD_VECTOR_UNALIGNEDh(_index) \ - andi. r0,r5,(1<<(31-_index)) @\ - beq Ldone ## _index @\ - lwz r0, 424+_index*16(r3) @\ - stw r0, 0(r4) @\ - lwz r0, 424+_index*16+4(r3) @\ - stw r0, 4(r4) @\ - lwz r0, 424+_index*16+8(r3) @\ - stw r0, 8(r4) @\ - lwz r0, 424+_index*16+12(r3)@\ - stw r0, 12(r4) @\ - lvx v ## _index,0,r4 @\ - Ldone ## _index: + andi. %r0, %r5, (1<<(31-_index)) SEPARATOR \ + beq Ldone ## _index SEPARATOR \ + lwz %r0, 424+_index*16(%r3) SEPARATOR \ + stw %r0, 0(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+4(%r3) SEPARATOR \ + stw %r0, 4(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+8(%r3) SEPARATOR \ + stw %r0, 8(%r4) SEPARATOR \ + lwz %r0, 424+_index*16+12(%r3) SEPARATOR \ + stw %r0, 12(%r4) SEPARATOR \ + lvx %v ## _index, 0, %r4 SEPARATOR \ + Ldone ## _index: LOAD_VECTOR_UNALIGNEDl(0) @@ -545,17 +545,17 @@ Ldone ## _index: LOAD_VECTOR_UNALIGNEDh(31) Lnovec: - lwz r0, 136(r3) ; __cr - mtocrf 255,r0 - lwz r0, 148(r3) ; __ctr - mtctr r0 - lwz r0, 0(r3) ; __ssr0 - mtctr r0 - lwz r0, 8(r3) ; do r0 now - lwz r5,28(r3) ; do r5 now - lwz r4,24(r3) ; do r4 now - lwz r1,12(r3) ; do sp now - lwz r3,20(r3) ; do r3 last + lwz %r0, 136(%r3) // __cr + mtcr %r0 + lwz %r0, 148(%r3) // __ctr + mtctr %r0 + lwz %r0, 0(%r3) // __ssr0 + mtctr %r0 + lwz %r0, 8(%r3) // do r0 now + lwz %r5, 28(%r3) // do r5 now + lwz %r4, 24(%r3) // do r4 now + lwz %r1, 12(%r3) // do sp now + lwz %r3, 20(%r3) // do r3 last bctr #elif defined(__arm64__) || defined(__aarch64__) Modified: head/contrib/libunwind/src/UnwindRegistersSave.S ============================================================================== --- head/contrib/libunwind/src/UnwindRegistersSave.S Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/libunwind/src/UnwindRegistersSave.S Wed Jun 12 21:10:37 2019 (r349004) @@ -557,144 +557,144 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) #elif defined(__ppc__) -; -; extern int unw_getcontext(unw_context_t* thread_state) -; -; On entry: -; thread_state pointer is in r3 -; +// +// extern int unw_getcontext(unw_context_t* thread_state) +// +// On entry: +// thread_state pointer is in r3 +// DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) - stw r0, 8(r3) - mflr r0 - stw r0, 0(r3) ; store lr as ssr0 - stw r1, 12(r3) - stw r2, 16(r3) - stw r3, 20(r3) - stw r4, 24(r3) - stw r5, 28(r3) - stw r6, 32(r3) - stw r7, 36(r3) - stw r8, 40(r3) - stw r9, 44(r3) - stw r10, 48(r3) - stw r11, 52(r3) - stw r12, 56(r3) - stw r13, 60(r3) - stw r14, 64(r3) - stw r15, 68(r3) - stw r16, 72(r3) - stw r17, 76(r3) - stw r18, 80(r3) - stw r19, 84(r3) - stw r20, 88(r3) - stw r21, 92(r3) - stw r22, 96(r3) - stw r23,100(r3) - stw r24,104(r3) - stw r25,108(r3) - stw r26,112(r3) - stw r27,116(r3) - stw r28,120(r3) - stw r29,124(r3) - stw r30,128(r3) - stw r31,132(r3) + stw %r0, 8(%r3) + mflr %r0 + stw %r0, 0(%r3) // store lr as ssr0 + stw %r1, 12(%r3) + stw %r2, 16(%r3) + stw %r3, 20(%r3) + stw %r4, 24(%r3) + stw %r5, 28(%r3) + stw %r6, 32(%r3) + stw %r7, 36(%r3) + stw %r8, 40(%r3) + stw %r9, 44(%r3) + stw %r10, 48(%r3) + stw %r11, 52(%r3) + stw %r12, 56(%r3) + stw %r13, 60(%r3) + stw %r14, 64(%r3) + stw %r15, 68(%r3) + stw %r16, 72(%r3) + stw %r17, 76(%r3) + stw %r18, 80(%r3) + stw %r19, 84(%r3) + stw %r20, 88(%r3) + stw %r21, 92(%r3) + stw %r22, 96(%r3) + stw %r23,100(%r3) + stw %r24,104(%r3) + stw %r25,108(%r3) + stw %r26,112(%r3) + stw %r27,116(%r3) + stw %r28,120(%r3) + stw %r29,124(%r3) + stw %r30,128(%r3) + stw %r31,132(%r3) - ; save VRSave register - mfspr r0,256 - stw r0,156(r3) - ; save CR registers - mfcr r0 - stw r0,136(r3) - ; save CTR register - mfctr r0 - stw r0,148(r3) + // save VRSave register + mfspr %r0, 256 + stw %r0, 156(%r3) + // save CR registers + mfcr %r0 + stw %r0, 136(%r3) + // save CTR register + mfctr %r0 + stw %r0, 148(%r3) - ; save float registers - stfd f0, 160(r3) - stfd f1, 168(r3) - stfd f2, 176(r3) - stfd f3, 184(r3) - stfd f4, 192(r3) - stfd f5, 200(r3) - stfd f6, 208(r3) - stfd f7, 216(r3) - stfd f8, 224(r3) - stfd f9, 232(r3) - stfd f10,240(r3) - stfd f11,248(r3) - stfd f12,256(r3) - stfd f13,264(r3) - stfd f14,272(r3) - stfd f15,280(r3) - stfd f16,288(r3) - stfd f17,296(r3) - stfd f18,304(r3) - stfd f19,312(r3) - stfd f20,320(r3) - stfd f21,328(r3) - stfd f22,336(r3) - stfd f23,344(r3) - stfd f24,352(r3) - stfd f25,360(r3) - stfd f26,368(r3) - stfd f27,376(r3) - stfd f28,384(r3) - stfd f29,392(r3) - stfd f30,400(r3) - stfd f31,408(r3) + // save float registers + stfd %f0, 160(%r3) + stfd %f1, 168(%r3) + stfd %f2, 176(%r3) + stfd %f3, 184(%r3) + stfd %f4, 192(%r3) + stfd %f5, 200(%r3) + stfd %f6, 208(%r3) + stfd %f7, 216(%r3) + stfd %f8, 224(%r3) + stfd %f9, 232(%r3) + stfd %f10,240(%r3) + stfd %f11,248(%r3) + stfd %f12,256(%r3) + stfd %f13,264(%r3) + stfd %f14,272(%r3) + stfd %f15,280(%r3) + stfd %f16,288(%r3) + stfd %f17,296(%r3) + stfd %f18,304(%r3) + stfd %f19,312(%r3) + stfd %f20,320(%r3) + stfd %f21,328(%r3) + stfd %f22,336(%r3) + stfd %f23,344(%r3) + stfd %f24,352(%r3) + stfd %f25,360(%r3) + stfd %f26,368(%r3) + stfd %f27,376(%r3) + stfd %f28,384(%r3) + stfd %f29,392(%r3) + stfd %f30,400(%r3) + stfd %f31,408(%r3) - ; save vector registers + // save vector registers - subi r4,r1,16 - rlwinm r4,r4,0,0,27 ; mask low 4-bits - ; r4 is now a 16-byte aligned pointer into the red zone + subi %r4, %r1, 16 + rlwinm %r4, %r4, 0, 0, 27 // mask low 4-bits + // r4 is now a 16-byte aligned pointer into the red zone #define SAVE_VECTOR_UNALIGNED(_vec, _offset) \ - stvx _vec,0,r4 @\ - lwz r5, 0(r4) @\ - stw r5, _offset(r3) @\ - lwz r5, 4(r4) @\ - stw r5, _offset+4(r3) @\ - lwz r5, 8(r4) @\ - stw r5, _offset+8(r3) @\ - lwz r5, 12(r4) @\ - stw r5, _offset+12(r3) + stvx _vec, 0, %r4 SEPARATOR \ + lwz %r5, 0(%r4) SEPARATOR \ + stw %r5, _offset(%r3) SEPARATOR \ + lwz %r5, 4(%r4) SEPARATOR \ + stw %r5, _offset+4(%r3) SEPARATOR \ + lwz %r5, 8(%r4) SEPARATOR \ + stw %r5, _offset+8(%r3) SEPARATOR \ + lwz %r5, 12(%r4) SEPARATOR \ + stw %r5, _offset+12(%r3) - SAVE_VECTOR_UNALIGNED( v0, 424+0x000) - SAVE_VECTOR_UNALIGNED( v1, 424+0x010) - SAVE_VECTOR_UNALIGNED( v2, 424+0x020) - SAVE_VECTOR_UNALIGNED( v3, 424+0x030) - SAVE_VECTOR_UNALIGNED( v4, 424+0x040) - SAVE_VECTOR_UNALIGNED( v5, 424+0x050) - SAVE_VECTOR_UNALIGNED( v6, 424+0x060) - SAVE_VECTOR_UNALIGNED( v7, 424+0x070) - SAVE_VECTOR_UNALIGNED( v8, 424+0x080) - SAVE_VECTOR_UNALIGNED( v9, 424+0x090) - SAVE_VECTOR_UNALIGNED(v10, 424+0x0A0) - SAVE_VECTOR_UNALIGNED(v11, 424+0x0B0) - SAVE_VECTOR_UNALIGNED(v12, 424+0x0C0) - SAVE_VECTOR_UNALIGNED(v13, 424+0x0D0) - SAVE_VECTOR_UNALIGNED(v14, 424+0x0E0) - SAVE_VECTOR_UNALIGNED(v15, 424+0x0F0) - SAVE_VECTOR_UNALIGNED(v16, 424+0x100) - SAVE_VECTOR_UNALIGNED(v17, 424+0x110) - SAVE_VECTOR_UNALIGNED(v18, 424+0x120) - SAVE_VECTOR_UNALIGNED(v19, 424+0x130) - SAVE_VECTOR_UNALIGNED(v20, 424+0x140) - SAVE_VECTOR_UNALIGNED(v21, 424+0x150) - SAVE_VECTOR_UNALIGNED(v22, 424+0x160) - SAVE_VECTOR_UNALIGNED(v23, 424+0x170) - SAVE_VECTOR_UNALIGNED(v24, 424+0x180) - SAVE_VECTOR_UNALIGNED(v25, 424+0x190) - SAVE_VECTOR_UNALIGNED(v26, 424+0x1A0) - SAVE_VECTOR_UNALIGNED(v27, 424+0x1B0) - SAVE_VECTOR_UNALIGNED(v28, 424+0x1C0) - SAVE_VECTOR_UNALIGNED(v29, 424+0x1D0) - SAVE_VECTOR_UNALIGNED(v30, 424+0x1E0) - SAVE_VECTOR_UNALIGNED(v31, 424+0x1F0) + SAVE_VECTOR_UNALIGNED( %v0, 424+0x000) + SAVE_VECTOR_UNALIGNED( %v1, 424+0x010) + SAVE_VECTOR_UNALIGNED( %v2, 424+0x020) + SAVE_VECTOR_UNALIGNED( %v3, 424+0x030) + SAVE_VECTOR_UNALIGNED( %v4, 424+0x040) + SAVE_VECTOR_UNALIGNED( %v5, 424+0x050) + SAVE_VECTOR_UNALIGNED( %v6, 424+0x060) + SAVE_VECTOR_UNALIGNED( %v7, 424+0x070) + SAVE_VECTOR_UNALIGNED( %v8, 424+0x080) + SAVE_VECTOR_UNALIGNED( %v9, 424+0x090) + SAVE_VECTOR_UNALIGNED(%v10, 424+0x0A0) + SAVE_VECTOR_UNALIGNED(%v11, 424+0x0B0) + SAVE_VECTOR_UNALIGNED(%v12, 424+0x0C0) + SAVE_VECTOR_UNALIGNED(%v13, 424+0x0D0) + SAVE_VECTOR_UNALIGNED(%v14, 424+0x0E0) + SAVE_VECTOR_UNALIGNED(%v15, 424+0x0F0) + SAVE_VECTOR_UNALIGNED(%v16, 424+0x100) + SAVE_VECTOR_UNALIGNED(%v17, 424+0x110) + SAVE_VECTOR_UNALIGNED(%v18, 424+0x120) + SAVE_VECTOR_UNALIGNED(%v19, 424+0x130) + SAVE_VECTOR_UNALIGNED(%v20, 424+0x140) + SAVE_VECTOR_UNALIGNED(%v21, 424+0x150) + SAVE_VECTOR_UNALIGNED(%v22, 424+0x160) + SAVE_VECTOR_UNALIGNED(%v23, 424+0x170) + SAVE_VECTOR_UNALIGNED(%v24, 424+0x180) + SAVE_VECTOR_UNALIGNED(%v25, 424+0x190) + SAVE_VECTOR_UNALIGNED(%v26, 424+0x1A0) + SAVE_VECTOR_UNALIGNED(%v27, 424+0x1B0) + SAVE_VECTOR_UNALIGNED(%v28, 424+0x1C0) + SAVE_VECTOR_UNALIGNED(%v29, 424+0x1D0) + SAVE_VECTOR_UNALIGNED(%v30, 424+0x1E0) + SAVE_VECTOR_UNALIGNED(%v31, 424+0x1F0) - li r3, 0 ; return UNW_ESUCCESS + li %r3, 0 // return UNW_ESUCCESS blr Modified: head/contrib/libunwind/src/assembly.h ============================================================================== --- head/contrib/libunwind/src/assembly.h Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/libunwind/src/assembly.h Wed Jun 12 21:10:37 2019 (r349004) @@ -29,8 +29,6 @@ #ifdef _ARCH_PWR8 #define PPC64_HAS_VMX #endif -#elif defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) -#define SEPARATOR @ #elif defined(__arm64__) #define SEPARATOR %% #else Modified: head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp ============================================================================== --- head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -301,7 +301,7 @@ void CIE::dump(raw_ostream &OS, const MCRegisterInfo * OS << format(" Data alignment factor: %d\n", (int32_t)DataAlignmentFactor); OS << format(" Return address column: %d\n", (int32_t)ReturnAddressRegister); if (Personality) - OS << format(" Personality Address: %08x\n", *Personality); + OS << format(" Personality Address: %016" PRIx64 "\n", *Personality); if (!AugmentationData.empty()) { OS << " Augmentation data: "; for (uint8_t Byte : AugmentationData) @@ -320,7 +320,7 @@ void FDE::dump(raw_ostream &OS, const MCRegisterInfo * (uint32_t)InitialLocation, (uint32_t)InitialLocation + (uint32_t)AddressRange); if (LSDAAddress) - OS << format(" LSDA Address: %08x\n", *LSDAAddress); + OS << format(" LSDA Address: %016" PRIx64 "\n", *LSDAAddress); CFIs.dump(OS, MRI, IsEH); OS << "\n"; } Modified: head/contrib/llvm/lib/MC/ELFObjectWriter.cpp ============================================================================== --- head/contrib/llvm/lib/MC/ELFObjectWriter.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/MC/ELFObjectWriter.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -1271,6 +1271,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem // This is the first place we are able to copy this information. Alias->setExternal(Symbol.isExternal()); Alias->setBinding(Symbol.getBinding()); + Alias->setOther(Symbol.getOther()); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; Modified: head/contrib/llvm/lib/MC/MCWin64EH.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCWin64EH.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/MC/MCWin64EH.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -522,7 +522,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, if (MatchingEpilog) { assert(EpilogInfo.find(MatchingEpilog) != EpilogInfo.end() && "Duplicate epilog not found"); - EpilogInfo[EpilogStart] = EpilogInfo[MatchingEpilog]; + EpilogInfo[EpilogStart] = EpilogInfo.lookup(MatchingEpilog); // Clear the unwind codes in the EpilogMap, so that they don't get output // in the logic below. EpilogInstrs.clear(); Modified: head/contrib/llvm/lib/MC/WasmObjectWriter.cpp ============================================================================== --- head/contrib/llvm/lib/MC/WasmObjectWriter.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/MC/WasmObjectWriter.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -368,7 +368,13 @@ void WasmObjectWriter::startCustomSection(SectionBookk // Now that the section is complete and we know how big it is, patch up the // section size field at the start of the section. void WasmObjectWriter::endSection(SectionBookkeeping &Section) { - uint64_t Size = W.OS.tell() - Section.PayloadOffset; + uint64_t Size = W.OS.tell(); + // /dev/null doesn't support seek/tell and can report offset of 0. + // Simply skip this patching in that case. + if (!Size) + return; + + Size -= Section.PayloadOffset; if (uint32_t(Size) != Size) report_fatal_error("section size does not fit in a uint32_t"); Modified: head/contrib/llvm/lib/Object/COFFImportFile.cpp ============================================================================== --- head/contrib/llvm/lib/Object/COFFImportFile.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/Object/COFFImportFile.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -496,7 +496,7 @@ NewArchiveMember ObjectFactory::createWeakExternal(Str // COFF Header coff_file_header Header{ - u16(0), + u16(Machine), u16(NumberOfSections), u32(0), u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))), Modified: head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td Wed Jun 12 21:10:37 2019 (r349004) @@ -239,7 +239,6 @@ def M4WriteNEONK : SchedWriteRes<[M4UnitNSHF, M4UnitS0]> { let Latency = 5; let NumMicroOps = 2; } def M4WriteNEONL : SchedWriteRes<[M4UnitNMUL]> { let Latency = 3; } -def M4WriteNEONM : SchedWriteRes<[M4UnitNMUL]> { let Latency = 3; } def M4WriteNEONN : SchedWriteRes<[M4UnitNMSC, M4UnitNMSC]> { let Latency = 5; let NumMicroOps = 2; } @@ -480,8 +479,6 @@ def M4WriteCOPY : SchedWriteVariant<[SchedVar]>; def M4WriteMOVI : SchedWriteVariant<[SchedVar, SchedVar]>; -def M4WriteMULL : SchedWriteVariant<[SchedVar, - SchedVar]>; // Fast forwarding. def M4ReadAESM1 : SchedReadAdvance<+1, [M4WriteNCRY1]>; @@ -489,8 +486,9 @@ def M4ReadFMACM1 : SchedReadAdvance<+1, [M4WriteFMAC M4WriteFMAC4H, M4WriteFMAC5]>; def M4ReadNMULM1 : SchedReadAdvance<+1, [M4WriteNMUL3]>; -def M4ReadMULLP2 : SchedReadAdvance<-2, [M4WriteNEONM]>; +def M4ReadNMULP2 : SchedReadAdvance<-2, [M4WriteNMUL3]>; + //===----------------------------------------------------------------------===// // Coarse scheduling model. @@ -662,10 +660,8 @@ def : InstRW<[M4WriteNEONK], (instregex "^FMOVDXHighr def : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev1f16")>; def : InstRW<[M4WriteFCVT3], (instregex "^F(RECP|RSQRT)Ev1i(32|64)")>; def : InstRW<[M4WriteNMSC1], (instregex "^FRECPXv1")>; -def : InstRW<[M4WriteFMAC4H, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)S16")>; -def : InstRW<[M4WriteFMAC4, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)S(32|64)")>; +def : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)S16")>; +def : InstRW<[M4WriteFMAC4], (instregex "^F(RECP|RSQRT)S(32|64)")>; // FP load instructions. def : InstRW<[WriteVLD], (instregex "^LDR[SDQ]l")>; @@ -736,14 +732,20 @@ def : InstRW<[M4WriteNALU1], (instregex "^(AND|BIC|EO def : InstRW<[M4WriteNMSC1], (instregex "^[SU](MIN|MAX)v")>; def : InstRW<[M4WriteNMSC2], (instregex "^[SU](MIN|MAX)Pv")>; def : InstRW<[M4WriteNHAD3], (instregex "^[SU](MIN|MAX)Vv")>; -def : InstRW<[M4WriteNMUL3], (instregex "^(SQR?D)?MULH?v")>; def : InstRW<[M4WriteNMUL3, M4ReadNMULM1], (instregex "^ML[AS]v")>; -def : InstRW<[M4WriteNMUL3], (instregex "^SQRDML[AS]H")>; -def : InstRW<[M4WriteMULL, - M4ReadMULLP2], (instregex "^(S|U|SQD)ML[AS]Lv")>; -def : InstRW<[M4WriteMULL, - M4ReadMULLP2], (instregex "^(S|U|SQD)MULLv")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(SQR?D)?MULH?v")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^SQRDML[AS]H")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(S|U|SQD)ML[AS]L(v1(i32|i64)|v2i32|v4i16|v8i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULP2], (instregex "^(S|U|SQD)ML[AS]L(v4i32|v8i16|v16i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULM1], (instregex "^(S|U|SQD)MULL(v1(i32|i64)|v2i32|v4i16|v8i8)")>; +def : InstRW<[M4WriteNMUL3, + M4ReadNMULP2], (instregex "^(S|U|SQD)MULL(v4i32|v8i16|v16i8)")>; def : InstRW<[M4WriteNMUL3], (instregex "^[SU]DOT(lane)?v")>; def : InstRW<[M4WriteNHAD3], (instregex "^[SU]ADALPv")>; def : InstRW<[M4WriteNSHT4A], (instregex "^[SU]R?SRA[dv]")>; @@ -808,10 +810,8 @@ def : InstRW<[M4WriteNALU1], (instregex "^FMOVv.f(32| def : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev[248]f16")>; def : InstRW<[M4WriteFCVT3], (instregex "^F(RECP|RSQRT)Ev[248]f(32|64)")>; def : InstRW<[M4WriteFCVT3], (instregex "^U(RECP|RSQRT)Ev[24]i32")>; -def : InstRW<[M4WriteFMAC4H, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)Sv.f16")>; -def : InstRW<[M4WriteFMAC4, - M4ReadFMACM1], (instregex "^F(RECP|RSQRT)Sv.f(32|64)")>; +def : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)Sv.f16")>; +def : InstRW<[M4WriteFMAC4], (instregex "^F(RECP|RSQRT)Sv.f(32|64)")>; def : InstRW<[M4WriteNSHF1], (instregex "^REV(16|32|64)v")>; def : InstRW<[M4WriteNSHFA], (instregex "^TB[LX]v(8|16)i8One")>; def : InstRW<[M4WriteNSHFB], (instregex "^TB[LX]v(8|16)i8Two")>; Modified: head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredExynos.td Wed Jun 12 21:10:37 2019 (r349004) @@ -103,17 +103,6 @@ def ExynosScaledIdxPred : MCSchedPredicate>; -// Identify whether an instruction whose result is a long vector -// operates on the upper half of the input registers. -def ExynosLongVectorUpperFn : TIIPredicate< - "isExynosLongVectorUpper", - MCOpcodeSwitchStatement< - [MCOpcodeSwitchCase< - IsLongVectorUpperOp.ValidOpcodes, - MCReturnStatement>], - MCReturnStatement>>; -def ExynosLongVectorUpperPred : MCSchedPredicate; - // Identify 128-bit NEON instructions. def ExynosQFormPred : MCSchedPredicate; Modified: head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/Target/AArch64/AArch64SchedPredicates.td Wed Jun 12 21:10:37 2019 (r349004) @@ -268,59 +268,6 @@ def IsStoreRegOffsetOp : CheckOpcode<[STRBBroW, ST def IsLoadStoreRegOffsetOp : CheckOpcode; -// Identify whether an instruction whose result is a long vector -// operates on the upper half of the input registers. -def IsLongVectorUpperOp : CheckOpcode<[FCVTLv8i16, FCVTLv4i32, - FCVTNv8i16, FCVTNv4i32, - FCVTXNv4f32, - PMULLv16i8, PMULLv2i64, - RADDHNv8i16_v16i8, RADDHNv4i32_v8i16, RADDHNv2i64_v4i32, - RSHRNv16i8_shift, RSHRNv8i16_shift, RSHRNv4i32_shift, - RSUBHNv8i16_v16i8, RSUBHNv4i32_v8i16, RSUBHNv2i64_v4i32, - SABALv16i8_v8i16, SABALv8i16_v4i32, SABALv4i32_v2i64, - SABDLv16i8_v8i16, SABDLv8i16_v4i32, SABDLv4i32_v2i64, - SADDLv16i8_v8i16, SADDLv8i16_v4i32, SADDLv4i32_v2i64, - SADDWv16i8_v8i16, SADDWv8i16_v4i32, SADDWv4i32_v2i64, - SHLLv16i8, SHLLv8i16, SHLLv4i32, - SHRNv16i8_shift, SHRNv8i16_shift, SHRNv4i32_shift, - SMLALv16i8_v8i16, SMLALv8i16_v4i32, SMLALv4i32_v2i64, - SMLALv8i16_indexed, SMLALv4i32_indexed, - SMLSLv16i8_v8i16, SMLSLv8i16_v4i32, SMLSLv4i32_v2i64, - SMLSLv8i16_indexed, SMLSLv4i32_indexed, - SMULLv16i8_v8i16, SMULLv8i16_v4i32, SMULLv4i32_v2i64, - SMULLv8i16_indexed, SMULLv4i32_indexed, - SQDMLALv8i16_v4i32, SQDMLALv4i32_v2i64, - SQDMLALv8i16_indexed, SQDMLALv4i32_indexed, - SQDMLSLv8i16_v4i32, SQDMLSLv4i32_v2i64, - SQDMLSLv8i16_indexed, SQDMLSLv4i32_indexed, - SQDMULLv8i16_v4i32, SQDMULLv4i32_v2i64, - SQDMULLv8i16_indexed, SQDMULLv4i32_indexed, - SQRSHRNv16i8_shift, SQRSHRNv8i16_shift, SQRSHRNv4i32_shift, - SQRSHRUNv16i8_shift, SQRSHRUNv8i16_shift, SQRSHRUNv4i32_shift, - SQSHRNv16i8_shift, SQSHRNv8i16_shift, SQSHRNv4i32_shift, - SQSHRUNv16i8_shift, SQSHRUNv8i16_shift, SQSHRUNv4i32_shift, - SQXTNv16i8, SQXTNv8i16, SQXTNv4i32, - SQXTUNv16i8, SQXTUNv8i16, SQXTUNv4i32, - SSHLLv16i8_shift, SSHLLv8i16_shift, SSHLLv4i32_shift, - SSUBLv16i8_v8i16, SSUBLv8i16_v4i32, SSUBLv4i32_v2i64, - SSUBWv16i8_v8i16, SSUBWv8i16_v4i32, SSUBWv4i32_v2i64, - UABALv16i8_v8i16, UABALv8i16_v4i32, UABALv4i32_v2i64, - UABDLv16i8_v8i16, UABDLv8i16_v4i32, UABDLv4i32_v2i64, - UADDLv16i8_v8i16, UADDLv8i16_v4i32, UADDLv4i32_v2i64, - UADDWv16i8_v8i16, UADDWv8i16_v4i32, UADDWv4i32_v2i64, - UMLALv16i8_v8i16, UMLALv8i16_v4i32, UMLALv4i32_v2i64, - UMLALv8i16_indexed, UMLALv4i32_indexed, - UMLSLv16i8_v8i16, UMLSLv8i16_v4i32, UMLSLv4i32_v2i64, - UMLSLv8i16_indexed, UMLSLv4i32_indexed, - UMULLv16i8_v8i16, UMULLv8i16_v4i32, UMULLv4i32_v2i64, - UMULLv8i16_indexed, UMULLv4i32_indexed, - UQSHRNv16i8_shift, UQSHRNv8i16_shift, UQSHRNv4i32_shift, - UQXTNv16i8, UQXTNv8i16, UQXTNv4i32, - USHLLv16i8_shift, USHLLv8i16_shift, USHLLv4i32_shift, - USUBLv16i8_v8i16, USUBLv8i16_v4i32, USUBLv4i32_v2i64, - USUBWv16i8_v8i16, USUBWv8i16_v4i32, USUBWv4i32_v2i64, - XTNv16i8, XTNv8i16, XTNv4i32]>; - // Target predicates. // Identify an instruction that effectively transfers a register to another. Modified: head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp Wed Jun 12 20:38:49 2019 (r349003) +++ head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp Wed Jun 12 21:10:37 2019 (r349004) @@ -201,49 +201,55 @@ static bool updateOperand(FoldCandidate &Fold, Mod.setImm(Mod.getImm() & ~SISrcMods::OP_SEL_1); } } + } - if (Fold.needsShrink()) { - MachineBasicBlock *MBB = MI->getParent(); - auto Liveness = MBB->computeRegisterLiveness(&TRI, AMDGPU::VCC, MI); - if (Liveness != MachineBasicBlock::LQR_Dead) - return false; + if ((Fold.isImm() || Fold.isFI()) && Fold.needsShrink()) { + MachineBasicBlock *MBB = MI->getParent(); + auto Liveness = MBB->computeRegisterLiveness(&TRI, AMDGPU::VCC, MI); + if (Liveness != MachineBasicBlock::LQR_Dead) + return false; - MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo(); - int Op32 = Fold.getShrinkOpcode(); - MachineOperand &Dst0 = MI->getOperand(0); - MachineOperand &Dst1 = MI->getOperand(1); - assert(Dst0.isDef() && Dst1.isDef()); + MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo(); + int Op32 = Fold.getShrinkOpcode(); + MachineOperand &Dst0 = MI->getOperand(0); + MachineOperand &Dst1 = MI->getOperand(1); + assert(Dst0.isDef() && Dst1.isDef()); - bool HaveNonDbgCarryUse = !MRI.use_nodbg_empty(Dst1.getReg()); + bool HaveNonDbgCarryUse = !MRI.use_nodbg_empty(Dst1.getReg()); - const TargetRegisterClass *Dst0RC = MRI.getRegClass(Dst0.getReg()); - unsigned NewReg0 = MRI.createVirtualRegister(Dst0RC); - const TargetRegisterClass *Dst1RC = MRI.getRegClass(Dst1.getReg()); - unsigned NewReg1 = MRI.createVirtualRegister(Dst1RC); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 12 22:49:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B0DD15C3E71; Wed, 12 Jun 2019 22:49:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 36D7190447; Wed, 12 Jun 2019 22:49:09 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x5CMgt5O009440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 12 Jun 2019 15:42:55 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x5CMgtrB009439; Wed, 12 Jun 2019 15:42:55 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 12 Jun 2019 15:42:55 -0700 From: Gleb Smirnoff To: =?utf-8?Q?T=C4=B3l?= Coosemans Cc: Dmitry Chagin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190612224255.GA67242@FreeBSD.org> References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 36D7190447 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 22:49:11 -0000 On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: T> > Date: Mon Jun 10 05:28:03 2019 T> > New Revision: 348847 T> > URL: https://svnweb.freebsd.org/changeset/base/348847 T> > T> > Log: T> > Use C11 anonymous unions. T> > T> > PR: 215202 T> > Reported by: glebius T> > MFC after: 2 weeks T> > T> > Modified: T> > head/sys/sys/ucred.h T> > T> > Modified: head/sys/sys/ucred.h T> > ============================================================================== T> > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) T> > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) T> > @@ -89,12 +89,11 @@ struct xucred { T> > gid_t cr_groups[XU_NGROUPS]; /* groups */ T> > union { T> > void *_cr_unused1; /* compatibility with old ucred */ T> > - pid_t _pid; T> > - } _cr; T> > + pid_t cr_pid; T> > + }; T> > }; T> > #define XUCRED_VERSION 0 T> > T> > -#define cr_pid _cr._pid T> > /* This can be used for both ucred and xucred structures. */ T> > #define cr_gid cr_groups[0] T> T> Isn't this a userland header that should work with non-C11 compilers? It could make sense to keep such low bar for standard headers, but ucred.h is BSD-specific header and struct xucred is FreeBSD specific. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Wed Jun 12 22:51:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57B2115C40A8 for ; Wed, 12 Jun 2019 22:51:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E47DD906D7 for ; Wed, 12 Jun 2019 22:51:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id i34so20374035qta.6 for ; Wed, 12 Jun 2019 15:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ns7coK6JkAwcU5C7oi+MY95bnPZICmtLkTU9ajcbyoo=; b=RxYzrPztegrv2mRWzIV02LENptVHdOcfGYxDbm26r/GlbcoQjllqAEOomujpU/IjV7 QYjn9zcAmV3yuUcLSZvpRgp11Somep1T0X2EC8kEOzywFRjnMtxuxrVtfy+7Bw6Oy3K4 53q8oFVLEukkfqmJoW1iJcwB15dsMUu5VK+VBXRbt22dQGmzxJyIqEQROQMMQ5zNFbBS hm3HVFTezE+8wQaNqs8hMbEVUctf62BdctNZNDWOswvZqeV9rcIXb3FJThyVagenncs1 75YypzKUtBqrvBfg7Eb3Ptl9E4ScghvjfpzX+3LEUiKi9fhhqRbOHTRPx22qOnnjIJOb 7osw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ns7coK6JkAwcU5C7oi+MY95bnPZICmtLkTU9ajcbyoo=; b=ZUF+/m4OrclDpsrFjzHiZiH8jfklft5dWpcs0wVlbDS//gG4/nBGs4t9aGKC/rI0Lg kRmuoxlFwccMeEjdrUM+ks/PRPdjXYTwW9F0/NUMtbRGWMnDQFyydPxWuuBOXEUaiKpf e7hlbyCo8WQj2Q+J2S1prZacv0nXUOlvuaNW0WA0J1WSrBc9Q79s8a8UzJW2ye30Uj7o 4BLIuAuPrzf0UhGTnI64qMgK+Q73/JvaIUG6G/WNqqquVtc7e8q2n727quOPqrFFDeIv 1IK1M5w1YqMVRvsO1pWdkg/xXa9mdJAqwZSa+rcgz6QOhOgIKFa4zyQ3K9h+wQCtCHeT kgbg== X-Gm-Message-State: APjAAAWWGv9ZuCpzjmFvV10pdI583BnzMsxit/EuSvWT0hr1hA205WbO iiProQpgXaQR5CTN9+IsxssGizW6bSxNYcPDPgqB/w== X-Google-Smtp-Source: APXvYqyInDhnGD7plV2w2zZKzq9aY3As+r+ZzN7trQI4xsUwReyRSQHcnh1EGDYYEfqKAS+8a5xejh7YTQOajidCiW8= X-Received: by 2002:a0c:9230:: with SMTP id a45mr795455qva.188.1560379874921; Wed, 12 Jun 2019 15:51:14 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190612224255.GA67242@FreeBSD.org> In-Reply-To: <20190612224255.GA67242@FreeBSD.org> From: Warner Losh Date: Wed, 12 Jun 2019 16:51:03 -0600 Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: Gleb Smirnoff Cc: =?UTF-8?Q?T=C4=B3l_Coosemans?= , Dmitry Chagin , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: E47DD906D7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 22:51:16 -0000 On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff wrote: > On Mon, Jun 10, 2019 at 11:09:09AM +0200, T=C4=B3l Coosemans wrote: > T> > Date: Mon Jun 10 05:28:03 2019 > T> > New Revision: 348847 > T> > URL: https://svnweb.freebsd.org/changeset/base/348847 > T> > > T> > Log: > T> > Use C11 anonymous unions. > T> > > T> > PR: 215202 > T> > Reported by: glebius > T> > MFC after: 2 weeks > T> > > T> > Modified: > T> > head/sys/sys/ucred.h > T> > > T> > Modified: head/sys/sys/ucred.h > T> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > T> > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) > T> > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) > T> > @@ -89,12 +89,11 @@ struct xucred { > T> > gid_t cr_groups[XU_NGROUPS]; /* groups */ > T> > union { > T> > void *_cr_unused1; /* compatibility with old ucred *= / > T> > - pid_t _pid; > T> > - } _cr; > T> > + pid_t cr_pid; > T> > + }; > T> > }; > T> > #define XUCRED_VERSION 0 > T> > > T> > -#define cr_pid _cr._pid > T> > /* This can be used for both ucred and xucred structures. */ > T> > #define cr_gid cr_groups[0] > T> > T> Isn't this a userland header that should work with non-C11 compilers? > > It could make sense to keep such low bar for standard headers, but ucred.= h > is BSD-specific header and struct xucred is FreeBSD specific. > This is solvable with proper visibility, I'd think.. Warner From owner-svn-src-all@freebsd.org Wed Jun 12 23:09:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C613515C464D; Wed, 12 Jun 2019 23:09:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5223D90E48; Wed, 12 Jun 2019 23:09:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29B351FC3D; Wed, 12 Jun 2019 23:09:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5CN9Bgs043060; Wed, 12 Jun 2019 23:09:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5CN9BIq043059; Wed, 12 Jun 2019 23:09:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906122309.x5CN9BIq043059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 12 Jun 2019 23:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349005 - head/sys/modules/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/modules/ocs_fc X-SVN-Commit-Revision: 349005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5223D90E48 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2019 23:09:12 -0000 Author: bdrewery Date: Wed Jun 12 23:09:10 2019 New Revision: 349005 URL: https://svnweb.freebsd.org/changeset/base/349005 Log: Don't delete .depend files outside of cleandepend. Sponsored by: DellEMC Modified: head/sys/modules/ocs_fc/Makefile Modified: head/sys/modules/ocs_fc/Makefile ============================================================================== --- head/sys/modules/ocs_fc/Makefile Wed Jun 12 21:10:37 2019 (r349004) +++ head/sys/modules/ocs_fc/Makefile Wed Jun 12 23:09:10 2019 (r349005) @@ -41,6 +41,6 @@ SRCS += ocs_cam.c CINCS = -I. -CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.* +CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .include From owner-svn-src-all@freebsd.org Thu Jun 13 01:21:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B574E15C7091; Thu, 13 Jun 2019 01:21: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57F18943EE; Thu, 13 Jun 2019 01:21: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 29BE321373; Thu, 13 Jun 2019 01:21:33 +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 x5D1LXRo011501; Thu, 13 Jun 2019 01:21:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D1LXLB011500; Thu, 13 Jun 2019 01:21:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906130121.x5D1LXLB011500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 13 Jun 2019 01:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349006 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 349006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 57F18943EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 01:21:34 -0000 Author: mav Date: Thu Jun 13 01:21:32 2019 New Revision: 349006 URL: https://svnweb.freebsd.org/changeset/base/349006 Log: Move write aggregation memory copy out of vq_lock. Memory copy is too heavy operation to do under the congested lock. Moving it out reduces congestion by many times to almost invisible. Since the original zio removed from the queue, and the child zio is not executed yet, I don't see why would the copy need protection. My guess it just remained like this from the time when lock was not dropped here, which was added later to fix lock ordering issue. Multi-threaded sequential write tests with both HDD and SSD pools with ZVOL block sizes of 4KB, 16KB, 64KB and 128KB all show major reduction of lock congestion, saving from 15% to 35% of CPU time and increasing throughput from 10% to 40%. Reviewed by: ahrens, behlendorf, ryao MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Wed Jun 12 23:09:10 2019 (r349005) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Thu Jun 13 01:21:32 2019 (r349006) @@ -815,6 +815,18 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) do { dio = nio; nio = AVL_NEXT(t, dio); + zio_add_child(dio, aio); + vdev_queue_io_remove(vq, dio); + } while (dio != last); + + /* + * We need to drop the vdev queue's lock during zio_execute() to + * avoid a deadlock that we could encounter due to lock order + * reversal between vq_lock and io_lock in zio_change_priority(). + * Use the dropped lock to do memory copy without congestion. + */ + mutex_exit(&vq->vq_lock); + while ((dio = zio_walk_parents(aio, &zl)) != NULL) { ASSERT3U(dio->io_type, ==, aio->io_type); if (dio->io_flags & ZIO_FLAG_NODATA) { @@ -826,16 +838,6 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) dio->io_offset - aio->io_offset, 0, dio->io_size); } - zio_add_child(dio, aio); - vdev_queue_io_remove(vq, dio); - } while (dio != last); - - /* - * We need to drop the vdev queue's lock to avoid a deadlock that we - * could encounter since this I/O will complete immediately. - */ - mutex_exit(&vq->vq_lock); - while ((dio = zio_walk_parents(aio, &zl)) != NULL) { zio_vdev_io_bypass(dio); zio_execute(dio); } From owner-svn-src-all@freebsd.org Thu Jun 13 01:23:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B7BE15C714A; Thu, 13 Jun 2019 01:23:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 095B694603; Thu, 13 Jun 2019 01:23:04 +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 C8F4E213C7; Thu, 13 Jun 2019 01:23:03 +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 x5D1N3mo015975; Thu, 13 Jun 2019 01:23:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D1N3oX015974; Thu, 13 Jun 2019 01:23:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906130123.x5D1N3oX015974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 13 Jun 2019 01:23: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: r349007 - stable/12/usr.sbin/mpsutil X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/mpsutil X-SVN-Commit-Revision: 349007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 095B694603 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 01:23:04 -0000 Author: mav Date: Thu Jun 13 01:23:03 2019 New Revision: 349007 URL: https://svnweb.freebsd.org/changeset/base/349007 Log: MFC r348422: Pass data pointers to the driver in way in expects. Probably due to historical reasons the driver uses In/Out arguments in odd way. While this tool still never uses Out arguments to see that, make the code to not trigger EINVAL in possible future uses. Modified: stable/12/usr.sbin/mpsutil/mps_cmd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mpsutil/mps_cmd.c ============================================================================== --- stable/12/usr.sbin/mpsutil/mps_cmd.c Thu Jun 13 01:21:32 2019 (r349006) +++ stable/12/usr.sbin/mpsutil/mps_cmd.c Thu Jun 13 01:23:03 2019 (r349007) @@ -652,27 +652,32 @@ mps_pass_command(int fd, void *req, uint32_t req_len, { struct mprs_pass_thru pass; + bzero(&pass, sizeof(pass)); pass.PtrRequest = (uint64_t)(uintptr_t)req; pass.PtrReply = (uint64_t)(uintptr_t)reply; - pass.PtrData = (uint64_t)(uintptr_t)data_in; - pass.PtrDataOut = (uint64_t)(uintptr_t)data_out; pass.RequestSize = req_len; pass.ReplySize = reply_len; - pass.DataSize = datain_len; - pass.DataOutSize = dataout_len; if (datain_len && dataout_len) { + pass.PtrData = (uint64_t)(uintptr_t)data_in; + pass.PtrDataOut = (uint64_t)(uintptr_t)data_out; + pass.DataSize = datain_len; + pass.DataOutSize = dataout_len; if (is_mps) { pass.DataDirection = MPS_PASS_THRU_DIRECTION_BOTH; } else { pass.DataDirection = MPR_PASS_THRU_DIRECTION_BOTH; } } else if (datain_len) { + pass.PtrData = (uint64_t)(uintptr_t)data_in; + pass.DataSize = datain_len; if (is_mps) { pass.DataDirection = MPS_PASS_THRU_DIRECTION_READ; } else { pass.DataDirection = MPR_PASS_THRU_DIRECTION_READ; } } else if (dataout_len) { + pass.PtrData = (uint64_t)(uintptr_t)data_out; + pass.DataSize = dataout_len; if (is_mps) { pass.DataDirection = MPS_PASS_THRU_DIRECTION_WRITE; } else { From owner-svn-src-all@freebsd.org Thu Jun 13 03:48:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E6D15CA517; Thu, 13 Jun 2019 03:48:37 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A07AF68375; Thu, 13 Jun 2019 03:48:36 +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 7A0AF22C01; Thu, 13 Jun 2019 03:48:36 +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 x5D3maPR089163; Thu, 13 Jun 2019 03:48:36 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D3malC089162; Thu, 13 Jun 2019 03:48:36 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201906130348.x5D3malC089162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 13 Jun 2019 03:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349008 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 349008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A07AF68375 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.913,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 03:48:37 -0000 Author: lwhsu Date: Thu Jun 13 03:48:36 2019 New Revision: 349008 URL: https://svnweb.freebsd.org/changeset/base/349008 Log: Fix gcc build by removing redeclaration Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20622 Modified: head/stand/efi/boot1/boot_module.h Modified: head/stand/efi/boot1/boot_module.h ============================================================================== --- head/stand/efi/boot1/boot_module.h Thu Jun 13 01:23:03 2019 (r349007) +++ head/stand/efi/boot1/boot_module.h Thu Jun 13 03:48:36 2019 (r349008) @@ -109,5 +109,4 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); #endif From owner-svn-src-all@freebsd.org Thu Jun 13 05:05:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F95415CBCB2; Thu, 13 Jun 2019 05:05:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35E466BCB7; Thu, 13 Jun 2019 05:05:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F64F23989; Thu, 13 Jun 2019 05:05:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5D55wLm030532; Thu, 13 Jun 2019 05:05:58 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D55w6W030531; Thu, 13 Jun 2019 05:05:58 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201906130505.x5D55w6W030531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Jun 2019 05:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349009 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 349009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35E466BCB7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 05:05:59 -0000 Author: asomers Date: Thu Jun 13 05:05:58 2019 New Revision: 349009 URL: https://svnweb.freebsd.org/changeset/base/349009 Log: Add test cases for epair Implements the missing test cases for epair in a similar fashion to the existing tests. Fixes shared abstractions to work with epair tests. Submitted by: Ryan Moeller Reviewed by: asomers MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D20498 Modified: head/tests/sys/net/if_clone_test.sh Modified: head/tests/sys/net/if_clone_test.sh ============================================================================== --- head/tests/sys/net/if_clone_test.sh Thu Jun 13 03:48:36 2019 (r349008) +++ head/tests/sys/net/if_clone_test.sh Thu Jun 13 05:05:58 2019 (r349009) @@ -39,6 +39,52 @@ TESTLEN=10 # seconds +atf_test_case epair_stress cleanup +epair_stress_head() +{ + atf_set "descr" "Simultaneously create and destroy an epair(4)" + atf_set "require.user" "root" +} +epair_stress_body() +{ + do_stress "epair" +} +epair_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_up_stress cleanup +epair_up_stress_head() +{ + atf_set "descr" "Simultaneously up and detroy an epair(4)" + atf_set "require.user" "root" +} +epair_up_stress_body() +{ + do_up_stress "epair" "" "" +} +epair_up_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_ipv6_up_stress cleanup +epair_ipv6_up_stress_head() +{ + atf_set "descr" "Simultaneously up and destroy an epair(4) with IPv6" + atf_set "require.user" "root" +} +epair_ipv6_up_stress_body() +{ + atf_skip "Quickly panics: page fault in in6_unlink_ifa (PR 225438)" + do_up_stress "epair" "6" "" +} +epair_ipv6_up_stress_cleanup() +{ + cleanup_ifaces +} + atf_test_case faith_stress cleanup faith_stress_head() { @@ -369,7 +415,9 @@ vmnet_ipv6_up_stress_cleanup() atf_init_test_cases() { - # TODO: add epair(4) tests, which need a different syntax + atf_add_test_case epair_ipv6_up_stress + atf_add_test_case epair_stress + atf_add_test_case epair_up_stress atf_add_test_case faith_ipv6_up_stress atf_add_test_case faith_stress atf_add_test_case faith_up_stress @@ -396,13 +444,13 @@ atf_init_test_cases() do_stress() { - local IFACE + local IFACE CREATOR_PID DESTROYER_PID IFACE=`get_iface $1` # First thread: create the interface while true; do - ifconfig $IFACE create 2>/dev/null && \ + ifconfig ${IFACE%a} create 2>/dev/null && \ echo -n . >> creator_count.txt done & CREATOR_PID=$! @@ -417,7 +465,7 @@ do_stress() sleep ${TESTLEN} kill $CREATOR_PID kill $DESTROYER_PID - echo "Created $IFACE `stat -f %z creator_count.txt` times." + echo "Created ${IFACE%a} `stat -f %z creator_count.txt` times." echo "Destroyed it `stat -f %z destroyer_count.txt` times." } @@ -428,7 +476,8 @@ do_stress() # $3 p2p for point to point interfaces, anything else for normal interfaces do_up_stress() { - local IFACE IPv6 MAC P2P SRCDIR + local ADDR DSTADDR MASK MEAN_SLEEP_SECONDS MAX_SLEEP_USECS \ + IFACE IPV6 P2P SRCDIR LOOP_PID ipv6_cmd up_cmd # Configure the interface to use an RFC5737 nonrouteable addresses ADDR="192.0.2.2" @@ -464,7 +513,7 @@ do_up_stress() ifconfig $IFACE destroy && echo -n . >> destroy_count.txt ; } & wait - ifconfig $IFACE create + ifconfig ${IFACE%a} create done & LOOP_PID=$! @@ -489,7 +538,11 @@ get_iface() N=$(($N + 1)) fi done - local DEV=${CLASS}${N} + if [ ${CLASS} = "epair" ]; then + DEV=${CLASS}${N}a + else + DEV=${CLASS}${N} + fi # Record the device so we can clean it up later echo ${DEV} >> "devices_to_cleanup" echo ${DEV} @@ -501,11 +554,7 @@ cleanup_ifaces() local DEV for DEV in `cat "devices_to_cleanup"`; do - if [ ${DEV%%[0-9]*a} = "epair" ]; then - ifconfig ${DEV}a destroy - else - ifconfig ${DEV} destroy - fi + ifconfig ${DEV} destroy done true } From owner-svn-src-all@freebsd.org Thu Jun 13 05:19:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6DFB15CC086; Thu, 13 Jun 2019 05:19:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7990C6C20D; Thu, 13 Jun 2019 05:19:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F35123B5C; Thu, 13 Jun 2019 05:19:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5D5JbDd036192; Thu, 13 Jun 2019 05:19:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D5JbLa036191; Thu, 13 Jun 2019 05:19:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201906130519.x5D5JbLa036191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Jun 2019 05:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349010 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 349010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7990C6C20D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 05:19:38 -0000 Author: imp Date: Thu Jun 13 05:19:36 2019 New Revision: 349010 URL: https://svnweb.freebsd.org/changeset/base/349010 Log: Increase the timeout for READ NATIVE MAX READ NATIVE MAX can take longer than a second if the queued NCQ I/Os take longer than a second to drain. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:05:58 2019 (r349009) +++ head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:19:36 2019 (r349010) @@ -2059,7 +2059,7 @@ ata_read_native_max(struct cam_device *device, int ret /*sector_count*/0, /*data_ptr*/NULL, /*dxfer_len*/0, - timeout ? timeout : 1000, + timeout ? timeout : 5000, is48bit); if (error) From owner-svn-src-all@freebsd.org Thu Jun 13 05:19:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F23015CC0C6; Thu, 13 Jun 2019 05:19:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D317C6C2A3; Thu, 13 Jun 2019 05:19:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4333823B5D; Thu, 13 Jun 2019 05:19:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5D5JhuU036246; Thu, 13 Jun 2019 05:19:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D5Jhwv036245; Thu, 13 Jun 2019 05:19:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201906130519.x5D5Jhwv036245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Jun 2019 05:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349011 - head/sys/dev/ciss X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/ciss X-SVN-Commit-Revision: 349011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D317C6C2A3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 05:19:50 -0000 Author: imp Date: Thu Jun 13 05:19:42 2019 New Revision: 349011 URL: https://svnweb.freebsd.org/changeset/base/349011 Log: Don't print the request we may be aborting in ciss_notify_abort as part of ciss_detach. It's a left-over debug that isn't needed and also discloses a kernel address. Only root could provoke as part of a devctl or kldunload. Submitted by: Fuqian Huang MFC After: 1 week Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Jun 13 05:19:36 2019 (r349010) +++ head/sys/dev/ciss/ciss.c Thu Jun 13 05:19:42 2019 (r349011) @@ -107,6 +107,10 @@ #include #include +#ifdef CISS_DEBUG +#include "opt_ddb.h" +#endif + static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", "ciss internal data buffers"); @@ -197,7 +201,9 @@ static void ciss_notify_logical(struct ciss_softc *sc, static void ciss_notify_physical(struct ciss_softc *sc, struct ciss_notify *cn); /* debugging output */ +#ifdef DDB static void ciss_print_request(struct ciss_request *cr); +#endif static void ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld); static const char *ciss_name_ldrive_status(int status); static int ciss_decode_ldrive_status(int status); @@ -3811,8 +3817,9 @@ ciss_notify_abort(struct ciss_softc *sc) cnc->opcode = CISS_OPCODE_WRITE; cnc->command = CISS_COMMAND_ABORT_NOTIFY; cnc->length = htonl(CISS_NOTIFY_DATA_SIZE); - +#if 0 ciss_print_request(cr); +#endif /* * Submit the request and wait for it to complete. @@ -4237,6 +4244,7 @@ ciss_kill_notify_thread(struct ciss_softc *sc) /************************************************************************ * Print a request. */ +#ifdef DDB static void ciss_print_request(struct ciss_request *cr) { @@ -4290,6 +4298,7 @@ ciss_print_request(struct ciss_request *cr) } } } +#endif /************************************************************************ * Print information about the status of a logical drive. @@ -4353,8 +4362,6 @@ ciss_print_ldrive(struct ciss_softc *sc, struct ciss_l } } -#ifdef CISS_DEBUG -#include "opt_ddb.h" #ifdef DDB #include /************************************************************************ @@ -4408,7 +4415,6 @@ DB_COMMAND(ciss_prt, db_ciss_prt) ciss_print_adapter(sc); } } -#endif #endif /************************************************************************ From owner-svn-src-all@freebsd.org Thu Jun 13 05:42:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA23115CC8DC for ; Thu, 13 Jun 2019 05:42:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D4DE6CE63 for ; Thu, 13 Jun 2019 05:42:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x841.google.com with SMTP id y57so21238061qtk.4 for ; Wed, 12 Jun 2019 22:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=emq+F9t67KCdzWzxxSI0OWN7+ojfpr9ZBDTB15TYib0=; b=AWfLqRnDKvWIQlHvMiqtdxDVO9NfvZGE/0IXlpymDW3B0v6PpWnYoIYpx7CpsWdTFC D814TkmSrJTb3x/r4YkYSmjaMJf/p0/owy6uqk9fFSDsCehNd9MIK81aTcGbXzQ4o6sz nezk0zuonvivJASMCbE125iBuatKpqYVLXwkCfwQpaegv1esRBOn7EhBXWPNuqg6yKhF 4FjlESz3WAEau4PrAVRQWsFjlVaP50e2b2JgvjSU7cSTr1w/RhpcyfQlKxG37MP19qUC k6EwEl2rbVdxw6on6K35XXfENhOxkboHvBy7771+QhUF3ES51AI20ynPzOxjdqIXJltE O9iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=emq+F9t67KCdzWzxxSI0OWN7+ojfpr9ZBDTB15TYib0=; b=GoU0e4+FoXZ6NZnSdVBjuNvRsAXx47eAFI+kj7aewZr4vZYH0WZOVS/ZGlLD0zPP09 l3B4sh07POlKhrptLc+sXUWnUog0TS4Kntwob4bXSMp49zyxnjj1E30vPj9A4JEAwsYF Q59FjaN7sA3jxNWHYbbqzZZ789NjhRaWz/i6RzfO+FYGj9k4Y26hPeKmiq1d6YAE3ECg EkT4bBm1rURS/Cg6aBzxhoVfQJyd3gwbixKhyZGm6hS7lrmKo5ogH6dhF8wL644s7BG9 QdRuVNuEefE8l/0wslM7HuNedggDZxGrH90UJTqY8VXHTW2njyXN2waGcOK1C+MPtu/p na7w== X-Gm-Message-State: APjAAAW7dMRP4W/ZlJae4mOJG+YiTqKJID7PW9fMmaNSLmmiD8eyEhDV olPHz3TuKiZ7PhMK99R7Tm3LFN3eeufy0vO8fOvsgA== X-Google-Smtp-Source: APXvYqzuauJTTjbWwJJ9YgeNHMM64TAJL6HcdDV0PKzu8L3YnLBAVGGDuqcBP57nb9BpINvoPbPFOAa7xFr1Fl4H+eg= X-Received: by 2002:ac8:488f:: with SMTP id i15mr50335830qtq.32.1560404530919; Wed, 12 Jun 2019 22:42:10 -0700 (PDT) MIME-Version: 1.0 References: <201906130519.x5D5JbLa036191@repo.freebsd.org> In-Reply-To: <201906130519.x5D5JbLa036191@repo.freebsd.org> From: Warner Losh Date: Wed, 12 Jun 2019 23:41:59 -0600 Message-ID: Subject: Re: svn commit: r349010 - head/sbin/camcontrol To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 8D4DE6CE63 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 05:42:12 -0000 On Wed, Jun 12, 2019, 11:19 PM Warner Losh wrote: > Author: imp > Date: Thu Jun 13 05:19:36 2019 > New Revision: 349010 > URL: https://svnweb.freebsd.org/changeset/base/349010 > > Log: > Increase the timeout for READ NATIVE MAX > > READ NATIVE MAX can take longer than a second if the queued NCQ I/Os > take longer than a second to drain. > I didn't mean to commit this with such a short commit message and was planning on getting it reviewed first. So this may change again. Warner Modified: > head/sbin/camcontrol/camcontrol.c > > Modified: head/sbin/camcontrol/camcontrol.c > > ============================================================================== > --- head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:05:58 2019 > (r349009) > +++ head/sbin/camcontrol/camcontrol.c Thu Jun 13 05:19:36 2019 > (r349010) > @@ -2059,7 +2059,7 @@ ata_read_native_max(struct cam_device *device, int > ret > /*sector_count*/0, > /*data_ptr*/NULL, > /*dxfer_len*/0, > - timeout ? timeout : 1000, > + timeout ? timeout : 5000, > is48bit); > > if (error) > > From owner-svn-src-all@freebsd.org Thu Jun 13 08:00:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EDB315CF2DA; Thu, 13 Jun 2019 08:00:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36AF270962; Thu, 13 Jun 2019 08:00:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0779325653; Thu, 13 Jun 2019 08:00:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5D80Z6f019916; Thu, 13 Jun 2019 08:00:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5D80XXc019906; Thu, 13 Jun 2019 08:00:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201906130800.x5D80XXc019906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 13 Jun 2019 08:00: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: r349013 - in stable/12: contrib/mandoc usr.bin/mandoc X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/12: contrib/mandoc usr.bin/mandoc X-SVN-Commit-Revision: 349013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36AF270962 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 08:00:36 -0000 Author: bapt Date: Thu Jun 13 08:00:32 2019 New Revision: 349013 URL: https://svnweb.freebsd.org/changeset/base/349013 Log: MFC r346149: Update mandoc to 1.14.5 Relnotes: yes Added: stable/12/contrib/mandoc/arch.c - copied unchanged from r346149, head/contrib/mandoc/arch.c stable/12/contrib/mandoc/eqn.h - copied unchanged from r346149, head/contrib/mandoc/eqn.h stable/12/contrib/mandoc/eqn_parse.h - copied unchanged from r346149, head/contrib/mandoc/eqn_parse.h stable/12/contrib/mandoc/mandoc_msg.c - copied unchanged from r346149, head/contrib/mandoc/mandoc_msg.c stable/12/contrib/mandoc/mandoc_parse.h - copied unchanged from r346149, head/contrib/mandoc/mandoc_parse.h stable/12/contrib/mandoc/tbl.h - copied unchanged from r346149, head/contrib/mandoc/tbl.h stable/12/contrib/mandoc/tbl_int.h - copied unchanged from r346149, head/contrib/mandoc/tbl_int.h stable/12/contrib/mandoc/tbl_parse.h - copied unchanged from r346149, head/contrib/mandoc/tbl_parse.h Deleted: stable/12/contrib/mandoc/st.in Modified: stable/12/contrib/mandoc/INSTALL stable/12/contrib/mandoc/LICENSE stable/12/contrib/mandoc/Makefile stable/12/contrib/mandoc/Makefile.depend stable/12/contrib/mandoc/NEWS stable/12/contrib/mandoc/TODO stable/12/contrib/mandoc/apropos.1 stable/12/contrib/mandoc/att.c stable/12/contrib/mandoc/cgi.c stable/12/contrib/mandoc/chars.c stable/12/contrib/mandoc/config.h stable/12/contrib/mandoc/configure stable/12/contrib/mandoc/configure.local.example stable/12/contrib/mandoc/dbm.c stable/12/contrib/mandoc/demandoc.c stable/12/contrib/mandoc/eqn.c stable/12/contrib/mandoc/eqn_html.c stable/12/contrib/mandoc/eqn_term.c stable/12/contrib/mandoc/gmdiff stable/12/contrib/mandoc/html.c stable/12/contrib/mandoc/html.h stable/12/contrib/mandoc/lib.c stable/12/contrib/mandoc/lib.in stable/12/contrib/mandoc/libman.h stable/12/contrib/mandoc/libmandoc.h stable/12/contrib/mandoc/libmdoc.h stable/12/contrib/mandoc/main.c stable/12/contrib/mandoc/main.h stable/12/contrib/mandoc/man.1 stable/12/contrib/mandoc/man.7 stable/12/contrib/mandoc/man.c stable/12/contrib/mandoc/man.conf.5 stable/12/contrib/mandoc/man.h stable/12/contrib/mandoc/man_html.c stable/12/contrib/mandoc/man_macro.c stable/12/contrib/mandoc/man_term.c stable/12/contrib/mandoc/man_validate.c stable/12/contrib/mandoc/manconf.h stable/12/contrib/mandoc/mandoc.1 stable/12/contrib/mandoc/mandoc.3 stable/12/contrib/mandoc/mandoc.c stable/12/contrib/mandoc/mandoc.css stable/12/contrib/mandoc/mandoc.h stable/12/contrib/mandoc/mandoc_char.7 stable/12/contrib/mandoc/mandoc_headers.3 stable/12/contrib/mandoc/mandoc_html.3 stable/12/contrib/mandoc/mandocd.c stable/12/contrib/mandoc/mandocdb.c stable/12/contrib/mandoc/manpath.c stable/12/contrib/mandoc/mansearch.c stable/12/contrib/mandoc/mansearch.h stable/12/contrib/mandoc/mdoc.7 stable/12/contrib/mandoc/mdoc.c stable/12/contrib/mandoc/mdoc.h stable/12/contrib/mandoc/mdoc_argv.c stable/12/contrib/mandoc/mdoc_html.c stable/12/contrib/mandoc/mdoc_macro.c stable/12/contrib/mandoc/mdoc_man.c stable/12/contrib/mandoc/mdoc_markdown.c stable/12/contrib/mandoc/mdoc_state.c stable/12/contrib/mandoc/mdoc_term.c stable/12/contrib/mandoc/mdoc_validate.c stable/12/contrib/mandoc/msec.c stable/12/contrib/mandoc/out.c stable/12/contrib/mandoc/out.h stable/12/contrib/mandoc/preconv.c stable/12/contrib/mandoc/read.c stable/12/contrib/mandoc/roff.7 stable/12/contrib/mandoc/roff.c stable/12/contrib/mandoc/roff.h stable/12/contrib/mandoc/roff_html.c stable/12/contrib/mandoc/roff_int.h stable/12/contrib/mandoc/roff_term.c stable/12/contrib/mandoc/roff_validate.c stable/12/contrib/mandoc/st.c stable/12/contrib/mandoc/tag.c stable/12/contrib/mandoc/tag.h stable/12/contrib/mandoc/tbl.3 stable/12/contrib/mandoc/tbl.7 stable/12/contrib/mandoc/tbl.c stable/12/contrib/mandoc/tbl_data.c stable/12/contrib/mandoc/tbl_html.c stable/12/contrib/mandoc/tbl_layout.c stable/12/contrib/mandoc/tbl_opts.c stable/12/contrib/mandoc/tbl_term.c stable/12/contrib/mandoc/term.c stable/12/contrib/mandoc/term.h stable/12/contrib/mandoc/term_ascii.c stable/12/contrib/mandoc/term_tab.c stable/12/contrib/mandoc/test-getsubopt.c stable/12/contrib/mandoc/test-strcasestr.c stable/12/contrib/mandoc/test-stringlist.c stable/12/contrib/mandoc/test-strptime.c stable/12/contrib/mandoc/test-vasprintf.c stable/12/contrib/mandoc/test-wchar.c stable/12/contrib/mandoc/tree.c stable/12/usr.bin/mandoc/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/mandoc/INSTALL ============================================================================== --- stable/12/contrib/mandoc/INSTALL Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/INSTALL Thu Jun 13 08:00:32 2019 (r349013) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.22 2018/07/31 15:34:00 schwarze Exp $ +$Id: INSTALL,v 1.23 2019/03/06 15:58:10 schwarze Exp $ About the portable mandoc distribution -------------------------------------- @@ -18,7 +18,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, August 2018 +Ingo Schwarze, Karlsruhe, March 2019 Installation @@ -67,7 +67,8 @@ variables into "configure.local" and go back to step 4 7. Optionally run the regression suite. Basically, that amounts to "cd regress && ./regress.pl". But you should probably look at "./mandoc -l regress/regress.pl.1" -first. +first. In particular, regarding Solaris systems, look at the BUGS +section of that manual page. 8. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a Modified: stable/12/contrib/mandoc/LICENSE ============================================================================== --- stable/12/contrib/mandoc/LICENSE Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/LICENSE Thu Jun 13 08:00:32 2019 (r349013) @@ -1,8 +1,8 @@ -$Id: LICENSE,v 1.19 2018/07/31 10:18:15 schwarze Exp $ +$Id: LICENSE,v 1.21 2018/11/26 17:11:11 schwarze Exp $ -With the exceptions noted below, all code and documentation -contained in the mandoc toolkit is protected by the Copyright -of the following developers: +With the exceptions noted below, all non-trivial files contained +in the mandoc toolkit are protected by the Copyright of the following +developers: Copyright (c) 2008-2012, 2014 Kristaps Dzonsons Copyright (c) 2010-2018 Ingo Schwarze @@ -12,13 +12,14 @@ Copyright (c) 2013 Franco Fichtner Copyright (c) 2016 Ed Maste Copyright (c) 2017 Michael Stapelberg +Copyright (c) 2017 Anthony Bentley Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008, 2017 Otto Moerbeek Copyright (c) 2004 Ted Unangst Copyright (c) 1994 Christos Zoulas Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre -See the individual source files for information about who contributed +See the individual files for information about who contributed to which file during which years. Modified: stable/12/contrib/mandoc/Makefile ============================================================================== --- stable/12/contrib/mandoc/Makefile Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/Makefile Thu Jun 13 08:00:32 2019 (r349013) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp $ +# $Id: Makefile,v 1.530 2019/03/06 16:08:41 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013-2018 Ingo Schwarze +# Copyright (c) 2011, 2013-2019 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.4 +VERSION = 1.14.5 # === LIST OF FILES ==================================================== @@ -37,9 +37,9 @@ TESTSRCS = test-be32toh.c \ test-PATH_MAX.c \ test-pledge.c \ test-progname.c \ - test-recvmsg.c \ test-reallocarray.c \ test-recallocarray.c \ + test-recvmsg.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ test-sandbox_init.c \ @@ -54,7 +54,8 @@ TESTSRCS = test-be32toh.c \ test-vasprintf.c \ test-wchar.c -SRCS = att.c \ +SRCS = arch.c \ + att.c \ catman.c \ cgi.c \ chars.c \ @@ -96,6 +97,7 @@ SRCS = att.c \ man_validate.c \ mandoc.c \ mandoc_aux.c \ + mandoc_msg.c \ mandoc_ohash.c \ mandoc_xr.c \ mandocd.c \ @@ -155,13 +157,14 @@ DISTFILES = INSTALL \ dbm_map.h \ demandoc.1 \ eqn.7 \ + eqn.h \ + eqn_parse.h \ gmdiff \ html.h \ lib.in \ libman.h \ libmandoc.h \ libmdoc.h \ - libroff.h \ main.h \ makewhatis.8 \ man.1 \ @@ -184,6 +187,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandoc_parse.h \ mandoc_xr.h \ mandocd.8 \ mansearch.3 \ @@ -198,10 +202,12 @@ DISTFILES = INSTALL \ roff.h \ roff_int.h \ soelim.1 \ - st.in \ tag.h \ tbl.3 \ tbl.7 \ + tbl.h \ + tbl_int.h \ + tbl_parse.h \ term.h \ $(SRCS) \ $(TESTSRCS) @@ -230,9 +236,11 @@ LIBROFF_OBJS = eqn.o \ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ $(LIBMDOC_OBJS) \ $(LIBROFF_OBJS) \ + arch.o \ chars.o \ mandoc.o \ mandoc_aux.o \ + mandoc_msg.o \ mandoc_ohash.o \ mandoc_xr.o \ msec.o \ @@ -320,6 +328,7 @@ SOELIM_OBJS = soelim.o \ WWW_MANS = apropos.1.html \ demandoc.1.html \ man.1.html \ + man.options.1.html \ mandoc.1.html \ soelim.1.html \ man.cgi.3.html \ @@ -336,20 +345,27 @@ WWW_MANS = apropos.1.html \ eqn.7.html \ man.7.html \ mandoc_char.7.html \ - mandocd.8.html \ mdoc.7.html \ roff.7.html \ tbl.7.html \ catman.8.html \ makewhatis.8.html \ man.cgi.8.html \ + mandocd.8.html + +WWW_INCS = eqn.h.html \ + html.h.html \ man.h.html \ manconf.h.html \ mandoc.h.html \ mandoc_aux.h.html \ + mandoc_parse.h.html \ mansearch.h.html \ mdoc.h.html \ - roff.h.html + roff.h.html \ + tbl.h.html \ + tbl_int.h.html \ + tbl_parse.h.html # === USER CONFIGURATION =============================================== @@ -361,9 +377,9 @@ all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile. install: base-install $(INSTALL_TARGETS) -www: $(WWW_MANS) +www: $(WWW_MANS) $(WWW_INCS) -$(WWW_MANS): mandoc +$(WWW_MANS) $(WWW_INCS): mandoc .PHONY: base-install cgi-install install www-install .PHONY: clean distclean depend @@ -382,7 +398,7 @@ clean: rm -f mandocd catman catman.o $(MANDOCD_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) - rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256 + rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256 rm -rf *.dSYM base-install: mandoc demandoc soelim @@ -420,8 +436,8 @@ lib-install: libmandoc.a mkdir -p $(DESTDIR)$(INCLUDEDIR) mkdir -p $(DESTDIR)$(MANDIR)/man3 $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) - $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \ - $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \ + mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR) $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 @@ -475,11 +491,14 @@ uninstall: rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h rm -f $(DESTDIR)$(INCLUDEDIR)/man.h rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) regress: all @@ -516,7 +535,9 @@ soelim: $(SOELIM_OBJS) # --- maintainer targets --- www-install: www - $(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes depend: config.h mkdep -f Makefile.depend $(CFLAGS) $(SRCS) @@ -564,6 +585,10 @@ mandoc-$(VERSION).tar.gz: $(DISTFILES) ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) rm -rf .dist/ +dist-install: dist + $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \ + $(HTDOCDIR)/snapshots + # === SUFFIX RULES ===================================================== .SUFFIXES: .1 .3 .5 .7 .8 .h @@ -573,5 +598,6 @@ mandoc-$(VERSION).tar.gz: $(DISTFILES) highlight -I $< > $@ .1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc - ./mandoc -Thtml -Wall,stop \ - -Ostyle=mandoc.css,man=%N.%S.html,includes=%I.html $< > $@ + mandoc -Thtml -Wwarning,stop \ + -O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \ + $< > $@ Modified: stable/12/contrib/mandoc/Makefile.depend ============================================================================== --- stable/12/contrib/mandoc/Makefile.depend Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/Makefile.depend Thu Jun 13 08:00:32 2019 (r349013) @@ -1,6 +1,7 @@ -att.o: att.c config.h mandoc.h roff.h mdoc.h libmdoc.h +arch.o: arch.c config.h roff.h +att.o: att.c config.h roff.h libmdoc.h catman.o: catman.c config.h compat_fts.h -cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h +cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h mandoc_parse.h main.h manconf.h mansearch.h cgi.h chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h compat_err.o: compat_err.c config.h compat_fts.o: compat_fts.c config.h compat_fts.h @@ -26,54 +27,55 @@ dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_ar dba_write.o: dba_write.c config.h dba_write.h dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h -demandoc.o: demandoc.c config.h mandoc.h roff.h man.h mdoc.h -eqn.o: eqn.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h libroff.h -eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h -eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +demandoc.o: demandoc.c config.h mandoc.h roff.h man.h mdoc.h mandoc_parse.h +eqn.o: eqn.c config.h mandoc_aux.h mandoc.h roff.h eqn.h libmandoc.h eqn_parse.h +eqn_html.o: eqn_html.c config.h mandoc.h eqn.h out.h html.h +eqn_term.o: eqn_term.c config.h eqn.h out.h term.h html.o: html.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h out.h html.h manconf.h main.h -lib.o: lib.c config.h mandoc.h roff.h mdoc.h libmdoc.h lib.in -main.o: main.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h +lib.o: lib.c config.h roff.h libmdoc.h lib.in +main.o: main.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h man.h mandoc_parse.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h man_html.o: man_html.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h +man_term.o: man_term.c config.h mandoc_aux.h roff.h man.h out.h term.h main.h man_validate.o: man_validate.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -mandoc.o: mandoc.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h +mandoc.o: mandoc.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h roff_int.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandoc_msg.o: mandoc_msg.c mandoc.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc_xr.o: mandoc_xr.c mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc_xr.h -mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h -mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h +mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h mandoc_parse.h main.h manconf.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h mandoc_parse.h manconf.h mansearch.h dba_array.h dba.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h -mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h +mansearch.o: mansearch.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h mdoc_markdown.o: mdoc_markdown.c mandoc_aux.h mandoc.h roff.h mdoc.h main.h -mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h -mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h +mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_term.o: mdoc_term.c config.h mandoc_aux.h roff.h mdoc.h out.h term.h tag.h main.h mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h msec.o: msec.c config.h mandoc.h libmandoc.h msec.in -out.o: out.c config.h mandoc_aux.h mandoc.h out.h -preconv.o: preconv.c config.h mandoc.h libmandoc.h -read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h -roff.o: roff.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h roff.h libmandoc.h roff_int.h libroff.h predefs.in +out.o: out.c config.h mandoc_aux.h tbl.h out.h +preconv.o: preconv.c config.h mandoc.h roff.h mandoc_parse.h libmandoc.h +read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h mandoc_parse.h libmandoc.h roff_int.h +roff.o: roff.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mandoc_parse.h libmandoc.h roff_int.h tbl_parse.h eqn_parse.h predefs.in roff_html.o: roff_html.c mandoc.h roff.h out.h html.h roff_term.o: roff_term.c mandoc.h roff.h out.h term.h roff_validate.o: roff_validate.c mandoc.h roff.h libmandoc.h roff_int.h soelim.o: soelim.c config.h compat_stringlist.h -st.o: st.c config.h mandoc.h roff.h mdoc.h libmdoc.h st.in +st.o: st.c config.h mandoc.h roff.h libmdoc.h tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h -tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h -tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h -tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h -tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h -tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h -tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +tbl.o: tbl.c config.h mandoc_aux.h mandoc.h tbl.h libmandoc.h tbl_parse.h tbl_int.h +tbl_data.o: tbl_data.c config.h mandoc_aux.h mandoc.h tbl.h libmandoc.h tbl_int.h +tbl_html.o: tbl_html.c config.h mandoc.h tbl.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc_aux.h mandoc.h tbl.h libmandoc.h tbl_int.h +tbl_opts.o: tbl_opts.c config.h mandoc.h tbl.h libmandoc.h tbl_int.h +tbl_term.o: tbl_term.c config.h mandoc.h tbl.h out.h term.h term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h term_tab.o: term_tab.c mandoc_aux.h out.h term.h -tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h +tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h tbl.h eqn.h main.h Modified: stable/12/contrib/mandoc/NEWS ============================================================================== --- stable/12/contrib/mandoc/NEWS Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/NEWS Thu Jun 13 08:00:32 2019 (r349013) @@ -1,6 +1,80 @@ -$Id: NEWS,v 1.32 2018/08/08 14:47:38 schwarze Exp $ +$Id: NEWS,v 1.34 2019/03/10 09:32:00 schwarze Exp $ This file lists the most important changes in the mandoc.bsd.lv distribution. + +Changes in version 1.14.5, released on March 10, 2019 + + --- MAJOR NEW FEATURES --- + * apropos(1): improve POSIX compliance by accepting case-insensitive + extended regular expressions by default + * new -O tag[=term] output option (open a page at the definition of a term) + * tbl(7) -T html: spanning and horizontal and vertical alignment of cells + * tbl(7) -T html: draw lines on the edges of table cells + * tbl(7) -T utf8: render lines with the Unicode box drawing characters + * mandoc is now able to handle the manual pages of the groff package. + --- MINOR NEW FEATURES --- + * -T html: new option -O toc (table of contents) + * -T html: second argument to -O man to support local and remote links + * mdoc(7) .Bd -centered now fills the text contained in it + * man-ext .SY and .YS macros (synopsis block) + * man-ext .TQ macro (tagged paragraph without vertical space before it) + * tbl(7) \& explicit alignment indicator + * roff(7) .shift, .while, and .return requests + * roff(7) .char request (output glyph definition) + * roff(7) .nop request (no operation) + * roff(7) .ft request: handle the CB, CI, and CR fonts + * roff(7) .if c conditional (character available) + * roff(7) \\$@ escape sequence (insert all macro arguments, quoted) + * roff(7) \*(.T predefined string (interpolate output device name) + * roff(7) \[charNNN] escape sequence (for printable ASCII characters) + * roff(7) \# escape sequence (line continuation with comment) + --- HTML OUTPUT SYNTAX CORRECTIONS --- + * Render .br and \p as
, not as an empty
. + * Render .Pp and .PP as

and automatically close it when needed. + * Stop writing empty list elements for non-compact .Bl -tag lists. + * Do not put

inside if .UR or .MT contain .PP. + * Implement tooltips purely in CSS rather than abusing title= attributes. + --- MINOR FUNCTIONAL IMPROVEMENTS --- + * many improvements to the handling of fill and no-fill mode + * tbl(7): better column widths in the presence of horizontal spans + * several minor improvements to escape sequence handling + * several minor improvements to manual font handling + * portability: autodetect need for _GNU_SOURCE or _OPENBSD_SOURCE + * portability: autodetect whether less(1) supports the -T option + * large numbers of bugfixes of diverse kinds + --- STRUCTURAL IMPROVEMENTS --- + * Disentangle eqn(7) and tbl(7) from other parser header files, + and clean up some parser data structures. + * Substantially simplify error and warning message infrastructure. + --- THANKS TO --- + * John Gardner for crucial help implementing tooltips in CSS. + * Alexander Bluhm, Raphael Graf, Ted Unangst (OpenBSD) + and Daniel Sabogal (Alpine Linux) for patches. + * Anthony Bentley and Jason McIntyre (OpenBSD) for documentation patches, + suggesting new features, bug reports, and useful discussions. + * Kyle Evans and Baptiste Daroussin (FreeBSD) for minor patches. + * Pali Rohar for suggesting multiple new features and for reporting + several bugs and missing features. + * Klemens Nanni (OpenBSD) for suggesting multiple new features. + * Kristaps Dzonsons (bsd.lv), Marc Espie (OpenBSD), Adam Kalisz, + and Laura Morales for suggesting new features. + * Wolfram Schneider and Yuri Pankov (FreeBSD) for reporting missing features. + * Edward Tomasz Napierala (FreeBSD) for suggesting a feature improvement. + * Thomas Klausner (NetBSD) and Sevan Janiyan (SmartOS) + for bug reports and release testing. + * Bryan Steele, Janne Johansson, Kurt Mosiejczuk, Mike Belopuhov, Theo + Buehler, Todd Miller (OpenBSD), Andreas Gustafsson, Christos Zoulas, + Robert Elz (NetBSD), Kurt Jaeger (FreeBSD), Fabio Scotoni, Kelvin + Sherlock, Mark Harris, Orestis Ioannou, Raf Czlonka, and Sean Farrell + for bug reports. + * Ulrich Spoerlein (FreeBSD), Leah Neukirchen (Void Linux), + Matej Cepl (openSUSE), and Jan Stary (MacOS X) for release testing. + * Brian Callahan and Stuart Henderson (OpenBSD) for help + with the OpenBSD groff port. + * Bertrand Garrigues, Branden Robinson, Ralph Corderoy, and Werner + Lemberg (GNU troff) for checking groff patches. + * Scott Cheloha, Theo de Raadt (OpenBSD) + and Natanael Copa (Alpine Linux) for useful discussions. Changes in version 1.14.4, released on August 8, 2018 Modified: stable/12/contrib/mandoc/TODO ============================================================================== --- stable/12/contrib/mandoc/TODO Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/TODO Thu Jun 13 08:00:32 2019 (r349013) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.258 2018/08/06 14:16:30 schwarze Exp $ +* $Id: TODO,v 1.289 2019/03/04 13:01:57 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -38,18 +38,6 @@ are mere guesses, and some may be wrong. --- missing roff features ---------------------------------------------- -- .nop prints its arguments as text, - see groff(7) for an example - -- .ft CB selects constant-width bold font - see groff_out(7) for examples - -- \*(.T prints the device being used, - see groff_char(7) for an example - -- \[charNN], \[charNNN] prints a single-byte codepoint - see groff_char(7) for examples - - .ad (adjust margins) .ad l -- adjust left margin only (flush left) .ad r -- adjust right margin only (flush right) @@ -69,34 +57,11 @@ are mere guesses, and some may be wrong. reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 loc *** exist *** algo *** size ** imp * -- .while and .shift - found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 - loc * exist ** algo ** size ** imp ** - - \w'' improve width measurements would not be very useful without an expression parser, see below needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 loc ** exist *** algo *** size * imp *** -- \\ in high-level macro arguments - Currently, \\ is expanded in two situations: - 1) macro and string definition (roff.c setstrn()) - 2) macro argument parsing (mandoc.c mandoc_getarg()) - For user defined macros, the second happens in time because of ROFF_REPARSE. - But for standard high-level macros, it only happens after entering the - high level parsers, which is too late because the code doesn't get - back to roff.c roff_res() from that point. Because this requires - distinguishing requests, user-defined macros and standard macros - on the roff_res() level, it is hard to solve without the parser reorg. - Found by naddy@ in devel/cutils cobfusc(1) Mon, 16 Feb 2015 19:10:52 +0100 - loc *** exist *** algo *** size ** imp * - -- check for missing roff escape sequences, implement those that are - trivial even if not usually appearing in manual pages, gracefully - ignore the non-trivial ones, document what they are supposed to do - and what mandoc does instead - loc * exist ** algo * size * imp * - --- missing mdoc features ---------------------------------------------- - .Bl -column .Xo support is missing @@ -112,13 +77,6 @@ are mere guesses, and some may be wrong. from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 loc * exist *** algo *** size ** imp ** -- .Bd -centered implies -filled, not -unfilled, which is not - easy to implement; it requires code similar to .ce, which - we don't have either. - Besides, groff has bug causing text right *before* .Bd -centered - to be centered as well. - loc *** exist *** algo ** size ** imp ** (parser reorg would help) - - .Bd -filled should not be the same as .Bd -ragged, but align both the left and right margin. In groff, it is implemented in terms of .ad b, which we don't have either. Found in cksum(1). @@ -174,15 +132,6 @@ are mere guesses, and some may be wrong. --- missing man features ----------------------------------------------- -- .SY and .YS, - used by many groff manual pages - -- preserve punctuation following .ME, - see ditroff(7) for an example - -- .TQ tagged paragraph continuation, - see groff_diff(7) for examples - - groff_www(7) .MTO and .URL These macros were used by the GNU grep(1) man page. The groff_www(7) manual page itself uses them, too. @@ -193,18 +142,10 @@ are mere guesses, and some may be wrong. --- missing tbl features ----------------------------------------------- -- the "s" layout column specifier is used for placement of data - into columns, but ignored during column width calculations - synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 - loc * exist ** algo *** size * imp ** - - vertical centering in cells vertically spanned with ^ pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 loc * exist *** algo *** size ** imp * -- support .ds requests inside tbl(7) code, - see tbl(1) for an example - - support mdoc(7) and man(7) macros inside tbl(7) code; probably requires the parser reorg and letting tbl(7) use roff_node such that macro sets can mix; @@ -212,35 +153,24 @@ are mere guesses, and some may be wrong. loc *** exist ** algo *** size ** imp *** - look at the POSIX manuals in the books/man-pages-posix port, - they use some unsupported tbl(7) features. + they use some unsupported tbl(7) features, mostly macros in tbl(7). loc * exist ** algo ** size ** imp *** - look what Joerg Schilling manual pages use Thu, 19 Mar 2015 18:31:48 +0100 -- use Unicode U+2500 to U+256C for table borders - in tbl(7) -Tutf-8 output - suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 - loc * exist ** algo * size * imp ** - -- implement horizontal and vertical alignment in HTML output - pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 - loc * exist * algo * size * imp *** - -- implement cell spanning in HTML output - pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 - loc * exist * algo ** size ** imp ** - -- implement table borders in HTML output - pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 - loc * exist * algo ** size ** imp ** - --- missing eqn features ----------------------------------------------- - In a matrix, break the output line after each matrix line. - Found in the discussion at CDBUG 2015. - Suggested by Avi Weinstock. - loc * exist * algo * size * imp ** + Found in the discussion at CDBUG 2015. Suggested by Avi Weinstock. + This may not be the ideal solution after all: eqn(7) matrices + are lists of columns, so Avi's proposal would show each *column* + on its own *line*, which is likely to cause confusion. + A better solution, but much harder to implement, would be to + actually show the coordinates of column vectors on different + terminal output lines, using the clumnated output facilities + developed for .Bl -tag, .Bl -column, and also used for tbl(7). + loc * exist * algo ** size ** imp ** - The "size" keyword is parsed, but ignored by the formatter. loc * exist * algo * size * imp * @@ -341,9 +271,6 @@ are mere guesses, and some may be wrong. * formatting issues: ugly output ************************************************************************ -- .UR can nest inside .TP, - see roff(7) for examples - - revisit empty in-line macros look at the difference between "Em x Em ." and "Sq x Em ." Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 @@ -400,6 +327,8 @@ are mere guesses, and some may be wrong. - a line starting with "\fB something" counts as starting with whitespace and triggers a line break; found in audio/normalize-mp3(1) + This will become easier once escape sequences are represented + by syntax tree nodes. loc ** exist * algo ** size * imp ** - formatting /usr/local/man/man1/latex2man.1 with groff and mandoc @@ -421,17 +350,6 @@ are mere guesses, and some may be wrong. --- HTML issues -------------------------------------------------------- -- wrap Sh and Ss content into

- Laura Morales 21 Apr 2018 18:10:48 +0200 - (Evaluate whether this is really useful and has no adverse - side effects before implementing; if it is possible, - it does seem cleaner.) - loc ** exist ** algo * size * imp *** - -- format ".IP *" etc. as
    rather than
    - https://github.com/Debian/debiman/issues/67 - loc ** exist ** algo ** size * imp *** - - .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal space, see for example random(3). Introduced in http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92 @@ -558,18 +476,11 @@ are mere guesses, and some may be wrong. all over mdoc_macro.c and all subtly different. loc ** exist ** algo ** size ** imp ** -- style message about suspicious uses of - vs. \- vs. \(mi - e.g. -1 is likely wrong (from the mdoclint TODO) - - warn about punctuation - e.g. ',' and ';' - at the beginning of a text line, if it is likely intended to follow the preceding output without intervening whitespace, in particular after a macro line (from the mdoclint TODO) -- mandoc_special does not really check the escape sequence, - but just the overall format - loc ** exist ** algo *** size ** imp ** - - makewhatis -p complains about language subdirectories: /usr/local/man//ru: Unknown directory part @@ -578,9 +489,6 @@ are mere guesses, and some may be wrong. * documentation issues ************************************************************************ -- dashes, hyphens, and minus signs in manual pages - jmc@ Fri, 28 Mar 2014 07:19:27 +0000 - - mark macros as: page structure domain, manual domain, general text domain is this useful? @@ -606,10 +514,6 @@ are mere guesses, and some may be wrong. Found by Aaron M. Ucko in the GNU Hurd via Bdale Garbee, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624 -- We use the input line number at several places to distinguish - same-line from different-line input. That plainly doesn't work - with user-defined macros, leading to random breakage. - - Is it possible to further simplify ENDBODY_SPACE? - Find better ways to prevent endless loops @@ -629,8 +533,6 @@ are mere guesses, and some may be wrong. output through libz. - Privilege separation (see OpenSSH). - Enable caching support via HTTP 304 and If-Modified-Since. - - Have Mac OSX systems automatically disable -static compilation of the - CGI: -static isn't supported. ************************************************************************ * to improve in the groff_mdoc(7) macros Modified: stable/12/contrib/mandoc/apropos.1 ============================================================================== --- stable/12/contrib/mandoc/apropos.1 Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/apropos.1 Thu Jun 13 08:00:32 2019 (r349013) @@ -1,7 +1,7 @@ -.\" $Id: apropos.1,v 1.47 2018/02/23 18:54:02 schwarze Exp $ +.\" $Id: apropos.1,v 1.49 2018/11/22 12:33:52 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons -.\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze +.\" Copyright (c) 2011,2012,2014,2017,2018 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: February 23 2018 $ +.Dd $Mdocdate: November 22 2018 $ .Dt APROPOS 1 .Os .Sh NAME @@ -51,8 +51,7 @@ searches for .Xr makewhatis 8 databases in the default paths stipulated by .Xr man 1 -and uses case-insensitive substring matching -.Pq the Cm = No operator +and uses case-insensitive extended regular expression matching over manual names and descriptions .Pq the Li \&Nm No and Li \&Nd No macro keys . Multiple terms imply pairwise @@ -93,7 +92,7 @@ format. Search for all words in .Ar expression in manual page names only. -The search is case insensitive and matches whole words only. +The search is case-insensitive and matches whole words only. In this mode, macro keys, comparison operators, and logical operators are not available. .It Fl k @@ -123,7 +122,7 @@ Restrict the search to pages for the specified .Xr machine 1 architecture. .Ar arch -is case insensitive. +is case-insensitive. By default, pages for all architectures are shown. .It Fl s Ar section Restrict the search to the specified section of the manual. @@ -199,7 +198,7 @@ Operator .Cm = evaluates a substring, while .Cm \(ti -evaluates a regular expression. +evaluates a case-sensitive extended regular expression. .It Fl i Ar term If .Ar term @@ -208,26 +207,10 @@ is evaluated case-insensitively. Has no effect on substring terms. .El .Pp -Results are sorted according to the following criteria: -.Bl -enum -.It -The manpath directory tree the page is found in, according to the -order specified with -.Fl M , -.Fl m , -the -.Ev MANPATH -environment variable, the -.Xr man.conf 5 -configuration file, or the default documented in -.Xr man.conf 5 . -.It -The section number in ascending numerical order. -.It -The page name in ascending +Results are sorted first according to the section number in ascending +numerical order, then by the page name in ascending .Xr ascii 7 alphabetical order, case-insensitive. -.El .Pp Each output line is formatted as .Pp @@ -339,7 +322,7 @@ function arguments appearing on .Ic \&Fn lines .It Li \&Fn -fuction names marked up with +function names marked up with .Ic \&Fo macros .It Li \&In @@ -407,7 +390,7 @@ Search for .Qq .cf as a substring of manual names and descriptions: .Pp -.Dl $ apropos .cf +.Dl $ apropos =.cf .Pp Include matches for .Qq .cnf @@ -415,9 +398,9 @@ and .Qq .conf as well: .Pp -.Dl $ apropos .cf .cnf .conf +.Dl $ apropos =.cf =.cnf =.conf .Pp -Search in names and descriptions using a regular expression: +Search in names and descriptions using a case-sensitive regular expression: .Pp .Dl $ apropos \(aq\(tiset.?[ug]id\(aq .Pp @@ -448,6 +431,24 @@ The following two invocations are equivalent: .Xr man 1 , .Xr re_format 7 , .Xr makewhatis 8 +.Sh STANDARDS +The +.Nm +utility is compliant with the +.St -p1003.1-2008 +specification of +.Xr man 1 +.Fl k . +.Pp +All options, the +.Nm whatis +command, support for logical operators, macro keys, +substring matching, sorting of results, the environment variables +.Ev MANPAGER +and +.Ev MANPATH , +the database format, and the configuration file +are extensions to that specification. .Sh HISTORY Part of the functionality of .Nm whatis Copied: stable/12/contrib/mandoc/arch.c (from r346149, head/contrib/mandoc/arch.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/mandoc/arch.c Thu Jun 13 08:00:32 2019 (r349013, copy of r346149, head/contrib/mandoc/arch.c) @@ -0,0 +1,54 @@ +/* $Id: arch.c,v 1.14 2019/03/04 13:01:57 schwarze Exp $ */ +/* + * Copyright (c) 2017, 2019 Ingo Schwarze + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, 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 THIS SOFTWARE. + */ +#include "config.h" + +#include + +#include "roff.h" + +int +arch_valid(const char *arch, enum mandoc_os os) +{ + const char *openbsd_arch[] = { + "alpha", "amd64", "arm64", "armv7", "hppa", "i386", + "landisk", "loongson", "luna88k", "macppc", "mips64", + "octeon", "sgi", "socppc", "sparc64", NULL + }; + const char *netbsd_arch[] = { + "acorn26", "acorn32", "algor", "alpha", "amiga", + "arc", "atari", + "bebox", "cats", "cesfic", "cobalt", "dreamcast", + "emips", "evbarm", "evbmips", "evbppc", "evbsh3", "evbsh5", + "hp300", "hpcarm", "hpcmips", "hpcsh", "hppa", + "i386", "ibmnws", "luna68k", + "mac68k", "macppc", "mipsco", "mmeye", "mvme68k", "mvmeppc", + "netwinder", "news68k", "newsmips", "next68k", + "pc532", "playstation2", "pmax", "pmppc", "prep", + "sandpoint", "sbmips", "sgimips", "shark", + "sparc", "sparc64", "sun2", "sun3", + "vax", "walnut", "x68k", "x86", "x86_64", "xen", NULL + }; + const char **arches[] = { NULL, netbsd_arch, openbsd_arch }; + const char **arch_p; + + if ((arch_p = arches[os]) == NULL) + return 1; + for (; *arch_p != NULL; arch_p++) + if (strcmp(*arch_p, arch) == 0) + return 1; + return 0; +} Modified: stable/12/contrib/mandoc/att.c ============================================================================== --- stable/12/contrib/mandoc/att.c Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/att.c Thu Jun 13 08:00:32 2019 (r349013) @@ -1,4 +1,4 @@ -/* $Id: att.c,v 1.16 2017/06/24 14:38:32 schwarze Exp $ */ +/* $Id: att.c,v 1.18 2018/12/13 11:55:46 schwarze Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -19,9 +19,7 @@ #include #include -#include "mandoc.h" #include "roff.h" -#include "mdoc.h" #include "libmdoc.h" #define LINE(x, y) \ Modified: stable/12/contrib/mandoc/cgi.c ============================================================================== --- stable/12/contrib/mandoc/cgi.c Thu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/cgi.c Thu Jun 13 08:00:32 2019 (r349013) @@ -1,7 +1,7 @@ -/* $Id: cgi.c,v 1.158 2018/05/29 20:32:45 schwarze Exp $ */ +/* $Id: cgi.c,v 1.166 2019/03/06 12:32:41 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons - * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze + * Copyright (c) 2014, 2015, 2016, 2017, 2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -38,6 +38,7 @@ #include "roff.h" #include "mdoc.h" #include "man.h" +#include "mandoc_parse.h" #include "main.h" #include "manconf.h" #include "mansearch.h" @@ -69,6 +70,7 @@ enum focus { static void html_print(const char *); static void html_putchar(char); static int http_decode(char *); +static void http_encode(const char *p); static void parse_manpath_conf(struct req *); static void parse_path_info(struct req *req, const char *path); static void parse_query_string(struct req *, const char *); @@ -90,6 +92,7 @@ static void resp_format(const struct req *, const ch static void resp_searchform(const struct req *, enum focus); static void resp_show(const struct req *, const char *); static void set_query_attr(char **, char **); +static int validate_arch(const char *); static int validate_filename(const char *); static int validate_manpath(const struct req *, const char *); static int validate_urifrag(const char *); @@ -316,6 +319,18 @@ http_decode(char *p) } static void +http_encode(const char *p) +{ + for (; *p != '\0'; p++) { + if (isalnum((unsigned char)*p) == 0 && + strchr("-._~", *p) == NULL) + printf("%%%2.2X", (unsigned char)*p); + else + putchar(*p); + } +} + +static void resp_begin_http(int code, const char *msg) { @@ -490,6 +505,18 @@ validate_manpath(const struct req *req, const char* ma } static int +validate_arch(const char *arch) +{ + int i; + + for (i = 0; i < arch_MAX; i++) + if (strcmp(arch, arch_names[i]) == 0) + return 1; + + return 0; +} + +static int validate_filename(const char *file) { @@ -562,9 +589,11 @@ pg_redirect(const struct req *req, const char *name) printf("%s/", req->q.manpath); if (req->q.arch != NULL) printf("%s/", req->q.arch); - printf("%s", name); - if (req->q.sec != NULL) - printf(".%s", req->q.sec); + http_encode(name); + if (req->q.sec != NULL) { + putchar('.'); + http_encode(req->q.sec); + } printf("\r\nContent-Type: text/html; charset=utf-8\r\n\r\n"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 13 08:43:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C28F15D06D6; Thu, 13 Jun 2019 08:43:20 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay118.isp.belgacom.be (mailrelay118.isp.belgacom.be [195.238.20.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB1417224A; Thu, 13 Jun 2019 08:43:19 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AzAACoCwJd/1H1sVtmGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBUQYBAQELAQGCD0cSEVIgEiiEFogcX4l4AQGCDDUBigiOI4F7CQE?= =?us-ascii?q?BAgEBAQEBKwwBAYRAAoJFJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBSMzIxA?= =?us-ascii?q?LDgYEAgIFIQICD0gGE4Mjgg4LqguBMYQyAQsBhGOBCgaBDCgBi3OBf4QjPoR?= =?us-ascii?q?EgwqCWASOA5tGCYIShkeMeCeXKYQLkCiRLTiBWE0wCIMnghsXiGGFQT0DMIQ?= =?us-ascii?q?PjDkBAQ?= X-IPAS-Result: =?us-ascii?q?A2AzAACoCwJd/1H1sVtmGwEBAQEDAQEBBwMBAQGBUQYBA?= =?us-ascii?q?QELAQGCD0cSEVIgEiiEFogcX4l4AQGCDDUBigiOI4F7CQEBAgEBAQEBKwwBA?= =?us-ascii?q?YRAAoJFJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBSMzIxALDgYEAgIFIQICD?= =?us-ascii?q?0gGE4Mjgg4LqguBMYQyAQsBhGOBCgaBDCgBi3OBf4QjPoREgwqCWASOA5tGC?= =?us-ascii?q?YIShkeMeCeXKYQLkCiRLTiBWE0wCIMnghsXiGGFQT0DMIQPjDkBAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 13 Jun 2019 10:43:12 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x5D8hBxm024159; Thu, 13 Jun 2019 10:43:11 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 13 Jun 2019 10:43:10 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Warner Losh Cc: Gleb Smirnoff , Dmitry Chagin , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org> In-Reply-To: References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190612224255.GA67242@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: AB1417224A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 08:43:20 -0000 On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh wrote: > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff wrote: >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, T=C4=B3l Coosemans wrote: =20 >>>> Date: Mon Jun 10 05:28:03 2019 >>>> New Revision: 348847 >>>> URL: https://svnweb.freebsd.org/changeset/base/348847 >>>> >>>> Log: >>>> Use C11 anonymous unions. >>>> >>>> PR: 215202 >>>> Reported by: glebius >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/sys/sys/ucred.h >>>> >>>> Modified: head/sys/sys/ucred.h >>>> =20 >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 >>>> --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) >>>> +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) >>>> @@ -89,12 +89,11 @@ struct xucred { >>>> gid_t cr_groups[XU_NGROUPS]; /* groups */ >>>> union { >>>> void *_cr_unused1; /* compatibility with old ucred */ >>>> - pid_t _pid; >>>> - } _cr; >>>> + pid_t cr_pid; >>>> + }; >>>> }; >>>> #define XUCRED_VERSION 0 >>>> >>>> -#define cr_pid _cr._pid >>>> /* This can be used for both ucred and xucred structures. */ >>>> #define cr_gid cr_groups[0] =20 >>> >>> Isn't this a userland header that should work with non-C11 compilers? = =20 >> >> It could make sense to keep such low bar for standard headers, but ucred= .h >> is BSD-specific header and struct xucred is FreeBSD specific. >=20 > This is solvable with proper visibility, I'd think.. I think "union {" should be replaced with "__extension__ union {". That seems to kill this warning: /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11 extension [-Wc11-extensions] union { ^ 1 warning generated. From owner-svn-src-all@freebsd.org Thu Jun 13 16:32:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DE7015B762D; Thu, 13 Jun 2019 16:32:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCAF38C61F; Thu, 13 Jun 2019 16:32:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 920E02DBB; Thu, 13 Jun 2019 16:32:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DGW4Z6002625; Thu, 13 Jun 2019 16:32:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DGW4SB002624; Thu, 13 Jun 2019 16:32:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906131632.x5DGW4SB002624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Jun 2019 16:32: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: r349014 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 349014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BCAF38C61F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 16:32:05 -0000 Author: markj Date: Thu Jun 13 16:32:03 2019 New Revision: 349014 URL: https://svnweb.freebsd.org/changeset/base/349014 Log: MFC r348743: Make the linuxkpi's alloc_pages() consistently return wired pages. Modified: stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h stable/12/sys/compat/linuxkpi/common/src/linux_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h Thu Jun 13 08:00:32 2019 (r349013) +++ stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h Thu Jun 13 16:32:03 2019 (r349014) @@ -52,12 +52,15 @@ #define __GFP_RETRY_MAYFAIL 0 #define __GFP_MOVABLE 0 #define __GFP_COMP 0 -#define __GFP_KSWAPD_RECLAIM 0 +#define __GFP_KSWAPD_RECLAIM 0 #define __GFP_IO 0 #define __GFP_NO_KSWAPD 0 #define __GFP_WAIT M_WAITOK #define __GFP_DMA32 (1U << 24) /* LinuxKPI only */ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION == 50000 +#define __GFP_NOTWIRED (1U << 25) +#endif #define __GFP_BITS_SHIFT 25 #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) #define __GFP_NOFAIL M_WAITOK @@ -74,7 +77,7 @@ #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) #define GFP_TRANSHUGE 0 -#define GFP_TRANSHUGE_LIGHT 0 +#define GFP_TRANSHUGE_LIGHT 0 CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0); CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK); @@ -98,6 +101,9 @@ static inline struct page * alloc_page(gfp_t flags) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, 0)); } @@ -105,6 +111,9 @@ static inline struct page * alloc_pages(gfp_t flags, unsigned int order) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, order)); } @@ -112,6 +121,9 @@ static inline struct page * alloc_pages_node(int node_id, gfp_t flags, unsigned int order) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, order)); } Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_page.c Thu Jun 13 08:00:32 2019 (r349013) +++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c Thu Jun 13 16:32:03 2019 (r349014) @@ -91,9 +91,14 @@ linux_alloc_pages(gfp_t flags, unsigned int order) if (PMAP_HAS_DMAP) { unsigned long npages = 1UL << order; - int req = (flags & M_ZERO) ? (VM_ALLOC_ZERO | VM_ALLOC_NOOBJ | - VM_ALLOC_NORMAL) : (VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL); + int req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_NORMAL; +#ifdef __GFP_NOTWIRED + if ((flags & __GFP_NOTWIRED) != 0) + req &= ~VM_ALLOC_WIRED; +#endif + if ((flags & M_ZERO) != 0) + req |= VM_ALLOC_ZERO; if (order == 0 && (flags & GFP_DMA32) == 0) { page = vm_page_alloc(NULL, 0, req); if (page == NULL) @@ -154,7 +159,8 @@ linux_free_pages(vm_page_t page, unsigned int order) vm_page_t pgo = page + x; vm_page_lock(pgo); - vm_page_free(pgo); + if (vm_page_unwire_noq(pgo)) + vm_page_free(pgo); vm_page_unlock(pgo); } } else { From owner-svn-src-all@freebsd.org Thu Jun 13 16:33:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 001D515B76BD; Thu, 13 Jun 2019 16:33:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97AD18C7C4; Thu, 13 Jun 2019 16:33:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2073B2EFE; Thu, 13 Jun 2019 16:33:02 +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 x5DGX2Hr002729; Thu, 13 Jun 2019 16:33:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DGX2Fr002727; Thu, 13 Jun 2019 16:33:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906131633.x5DGX2Fr002727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Jun 2019 16:33:02 +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: r349015 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 349015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97AD18C7C4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 16:33:03 -0000 Author: markj Date: Thu Jun 13 16:33:01 2019 New Revision: 349015 URL: https://svnweb.freebsd.org/changeset/base/349015 Log: MFC r348745, r348751: Conditionalize an in_epoch() call on INVARIANTS. Modified: stable/12/sys/net/if_lagg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_lagg.c ============================================================================== --- stable/12/sys/net/if_lagg.c Thu Jun 13 16:32:03 2019 (r349014) +++ stable/12/sys/net/if_lagg.c Thu Jun 13 16:33:01 2019 (r349015) @@ -1857,12 +1857,14 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_po * Search a port which reports an active link state. */ +#ifdef INVARIANTS /* * This is called with either LAGG_RLOCK() held or * LAGG_XLOCK(sc) held. */ if (!in_epoch(net_epoch_preempt)) LAGG_XLOCK_ASSERT(sc); +#endif if (lp == NULL) goto search; From owner-svn-src-all@freebsd.org Thu Jun 13 16:33:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2F5515B7741; Thu, 13 Jun 2019 16:33:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63C698C937; Thu, 13 Jun 2019 16:33:56 +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 227552F00; Thu, 13 Jun 2019 16:33:56 +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 x5DGXunR002812; Thu, 13 Jun 2019 16:33:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DGXtI3002809; Thu, 13 Jun 2019 16:33:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906131633.x5DGXtI3002809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Jun 2019 16:33: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: r349016 - in stable/12/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/dtrace i386/i386 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/dtrace i386/i386 X-SVN-Commit-Revision: 349016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 63C698C937 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 16:33:57 -0000 Author: markj Date: Thu Jun 13 16:33:55 2019 New Revision: 349016 URL: https://svnweb.freebsd.org/changeset/base/349016 Log: MFC r348742: Fix a race between fasttrap and the user breakpoint handler. Modified: stable/12/sys/amd64/amd64/trap.c stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/12/sys/i386/i386/trap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/trap.c ============================================================================== --- stable/12/sys/amd64/amd64/trap.c Thu Jun 13 16:33:01 2019 (r349015) +++ stable/12/sys/amd64/amd64/trap.c Thu Jun 13 16:33:55 2019 (r349016) @@ -113,6 +113,10 @@ void dblfault_handler(struct trapframe *frame); static int trap_pfault(struct trapframe *, int); static void trap_fatal(struct trapframe *, vm_offset_t); +#ifdef KDTRACE_HOOKS +static bool trap_user_dtrace(struct trapframe *, + int (**hook)(struct trapframe *)); +#endif #define MAX_TRAP_MSG 32 static char *trap_msg[] = { @@ -284,11 +288,11 @@ trap(struct trapframe *frame) break; case T_BPTFLT: /* bpt instruction fault */ - enable_intr(); #ifdef KDTRACE_HOOKS - if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(frame) == 0) + if (trap_user_dtrace(frame, &dtrace_pid_probe_ptr)) return; +#else + enable_intr(); #endif signo = SIGTRAP; ucode = TRAP_BRKPT; @@ -425,9 +429,7 @@ trap(struct trapframe *frame) break; #ifdef KDTRACE_HOOKS case T_DTRACE_RET: - enable_intr(); - if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(frame); + (void)trap_user_dtrace(frame, &dtrace_return_probe_ptr); return; #endif } @@ -947,6 +949,25 @@ trap_fatal(frame, eva) else panic("unknown/reserved trap"); } + +#ifdef KDTRACE_HOOKS +/* + * Invoke a userspace DTrace hook. The hook pointer is cleared when no + * userspace probes are enabled, so we must synchronize with DTrace to ensure + * that a trapping thread is able to call the hook before it is cleared. + */ +static bool +trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *)) +{ + int (*hook)(struct trapframe *); + + hook = (int (*)(struct trapframe *))atomic_load_ptr(hookp); + enable_intr(); + if (hook != NULL) + return ((hook)(frame) == 0); + return (false); +} +#endif /* * Double fault handler. Called when a fault occurs while writing Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Thu Jun 13 16:33:01 2019 (r349015) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Thu Jun 13 16:33:55 2019 (r349016) @@ -1125,31 +1125,17 @@ fasttrap_enable_callbacks(void) static void fasttrap_disable_callbacks(void) { -#ifdef illumos - ASSERT(MUTEX_HELD(&cpu_lock)); -#endif - - mutex_enter(&fasttrap_count_mtx); ASSERT(fasttrap_pid_count > 0); fasttrap_pid_count--; if (fasttrap_pid_count == 0) { -#ifdef illumos - cpu_t *cur, *cpu = CPU; - - for (cur = cpu->cpu_next_onln; cur != cpu; - cur = cur->cpu_next_onln) { - rw_enter(&cur->cpu_ft_lock, RW_WRITER); - } -#endif + /* + * Synchronize with the breakpoint handler, which is careful to + * enable interrupts only after loading the hook pointer. + */ + dtrace_sync(); dtrace_pid_probe_ptr = NULL; dtrace_return_probe_ptr = NULL; -#ifdef illumos - for (cur = cpu->cpu_next_onln; cur != cpu; - cur = cur->cpu_next_onln) { - rw_exit(&cur->cpu_ft_lock); - } -#endif } mutex_exit(&fasttrap_count_mtx); } Modified: stable/12/sys/i386/i386/trap.c ============================================================================== --- stable/12/sys/i386/i386/trap.c Thu Jun 13 16:33:01 2019 (r349015) +++ stable/12/sys/i386/i386/trap.c Thu Jun 13 16:33:55 2019 (r349016) @@ -116,6 +116,10 @@ void syscall(struct trapframe *frame); static int trap_pfault(struct trapframe *, int, vm_offset_t); static void trap_fatal(struct trapframe *, vm_offset_t); +#ifdef KDTRACE_HOOKS +static bool trap_user_dtrace(struct trapframe *, + int (**hook)(struct trapframe *)); +#endif void dblfault_handler(void); extern inthand_t IDTVEC(bpt), IDTVEC(dbg), IDTVEC(int0x80_syscall); @@ -321,11 +325,11 @@ trap(struct trapframe *frame) break; case T_BPTFLT: /* bpt instruction fault */ - enable_intr(); #ifdef KDTRACE_HOOKS - if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(frame) == 0) + if (trap_user_dtrace(frame, &dtrace_pid_probe_ptr)) return; +#else + enable_intr(); #endif signo = SIGTRAP; ucode = TRAP_BRKPT; @@ -503,9 +507,7 @@ user_trctrap_out: break; #ifdef KDTRACE_HOOKS case T_DTRACE_RET: - enable_intr(); - if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(frame); + (void)trap_user_dtrace(frame, &dtrace_return_probe_ptr); return; #endif } @@ -993,6 +995,25 @@ trap_fatal(frame, eva) else panic("unknown/reserved trap"); } + +#ifdef KDTRACE_HOOKS +/* + * Invoke a userspace DTrace hook. The hook pointer is cleared when no + * userspace probes are enabled, so we must synchronize with DTrace to ensure + * that a trapping thread is able to call the hook before it is cleared. + */ +static bool +trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *)) +{ + int (*hook)(struct trapframe *); + + hook = (int (*)(struct trapframe *))atomic_load_ptr(hookp); + enable_intr(); + if (hook != NULL) + return ((hook)(frame) == 0); + return (false); +} +#endif /* * Double fault handler. Called when a fault occurs while writing From owner-svn-src-all@freebsd.org Thu Jun 13 16:34:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C36415B7795; Thu, 13 Jun 2019 16:34: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A254A8CA65; Thu, 13 Jun 2019 16:34:25 +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 6DC9B2F01; Thu, 13 Jun 2019 16:34:25 +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 x5DGYPfc002878; Thu, 13 Jun 2019 16:34:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DGYPbf002877; Thu, 13 Jun 2019 16:34:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906131634.x5DGYPbf002877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Jun 2019 16:34: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: r349017 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 349017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A254A8CA65 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 16:34:26 -0000 Author: markj Date: Thu Jun 13 16:34:25 2019 New Revision: 349017 URL: https://svnweb.freebsd.org/changeset/base/349017 Log: MFC r348746: Remove the volatile qualifer from uma_kmem_total. Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c ============================================================================== --- stable/12/sys/vm/uma_core.c Thu Jun 13 16:33:55 2019 (r349016) +++ stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:25 2019 (r349017) @@ -146,7 +146,7 @@ static struct sx uma_drain_lock; /* kmem soft limit. */ static unsigned long uma_kmem_limit = LONG_MAX; -static volatile unsigned long uma_kmem_total; +static unsigned long uma_kmem_total; /* Is the VM done starting up? */ static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS, @@ -3857,14 +3857,14 @@ unsigned long uma_size(void) { - return (uma_kmem_total); + return (atomic_load_long(&uma_kmem_total)); } long uma_avail(void) { - return (uma_kmem_limit - uma_kmem_total); + return (uma_kmem_limit - uma_size()); } void From owner-svn-src-all@freebsd.org Thu Jun 13 16:34:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35D9A15B781E; Thu, 13 Jun 2019 16:34:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA0C78CBB0; Thu, 13 Jun 2019 16:34: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 BABE42F02; Thu, 13 Jun 2019 16:34: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 x5DGYtGY002948; Thu, 13 Jun 2019 16:34:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DGYt6t002947; Thu, 13 Jun 2019 16:34:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906131634.x5DGYt6t002947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 13 Jun 2019 16:34: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: r349018 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 349018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CA0C78CBB0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 16:34:56 -0000 Author: markj Date: Thu Jun 13 16:34:55 2019 New Revision: 349018 URL: https://svnweb.freebsd.org/changeset/base/349018 Log: MFC r348747: Add sysctls for uma_kmem_{limit,total}. Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c ============================================================================== --- stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:25 2019 (r349017) +++ stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:55 2019 (r349018) @@ -144,9 +144,16 @@ static int boot_pages; static struct sx uma_drain_lock; -/* kmem soft limit. */ +/* + * kmem soft limit, initialized by uma_set_limit(). Ensure that early + * allocations don't trigger a wakeup of the reclaim thread. + */ static unsigned long uma_kmem_limit = LONG_MAX; +SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_limit, CTLFLAG_RD, &uma_kmem_limit, 0, + "UMA kernel memory soft limit"); static unsigned long uma_kmem_total; +SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_total, CTLFLAG_RD, &uma_kmem_total, 0, + "UMA kernel memory usage"); /* Is the VM done starting up? */ static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS, From owner-svn-src-all@freebsd.org Thu Jun 13 17:39:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76FD615B896B; Thu, 13 Jun 2019 17:39:35 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 069508EADC; Thu, 13 Jun 2019 17:39:35 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E1593B73; Thu, 13 Jun 2019 17:39:34 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DHdYxn034133; Thu, 13 Jun 2019 17:39:34 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DHdX93034129; Thu, 13 Jun 2019 17:39:33 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201906131739.x5DHdX93034129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 13 Jun 2019 17:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349019 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 349019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 069508EADC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 17:39:35 -0000 Author: vmaffione Date: Thu Jun 13 17:39:32 2019 New Revision: 349019 URL: https://svnweb.freebsd.org/changeset/base/349019 Log: bhyve: move common code to net_utils.c Both virtio_net and e82545 network frontends have code to validate and generate MAC addresses. These functionalities are replicated in the two files, so we move them in a separate compilation unit. Reviewed by: rgrimes, bryanv, imp, kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20626 Added: head/usr.sbin/bhyve/net_utils.c (contents, props changed) head/usr.sbin/bhyve/net_utils.h (contents, props changed) Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/pci_e82545.c head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Thu Jun 13 16:34:55 2019 (r349018) +++ head/usr.sbin/bhyve/Makefile Thu Jun 13 17:39:32 2019 (r349019) @@ -32,6 +32,7 @@ SRCS= \ mem.c \ mevent.c \ mptbl.c \ + net_utils.c \ pci_ahci.c \ pci_e82545.c \ pci_emul.c \ Added: head/usr.sbin/bhyve/net_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/net_utils.c Thu Jun 13 17:39:32 2019 (r349019) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * + * 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$ + */ + +#include "net_utils.h" +#include "bhyverun.h" +#include +#include +#include +#include +#include + +int +net_parsemac(char *mac_str, uint8_t *mac_addr) +{ + struct ether_addr *ea; + char *tmpstr; + char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; + + tmpstr = strsep(&mac_str,"="); + + if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { + ea = ether_aton(mac_str); + + if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || + memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { + fprintf(stderr, "Invalid MAC %s\n", mac_str); + return (EINVAL); + } else + memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); + } + + return (0); +} + +void +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) +{ + /* + * The default MAC address is the standard NetApp OUI of 00-a0-98, + * followed by an MD5 of the PCI slot/func number and dev name + */ + MD5_CTX mdctx; + unsigned char digest[16]; + char nstr[80]; + + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, + pi->pi_func, vmname); + + MD5Init(&mdctx); + MD5Update(&mdctx, nstr, (unsigned int)strlen(nstr)); + MD5Final(digest, &mdctx); + + macaddr[0] = 0x00; + macaddr[1] = 0xa0; + macaddr[2] = 0x98; + macaddr[3] = digest[0]; + macaddr[4] = digest[1]; + macaddr[5] = digest[2]; +} Added: head/usr.sbin/bhyve/net_utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/net_utils.h Thu Jun 13 17:39:32 2019 (r349019) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2019 Vincenzo Maffione + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NET_UTILS_H_ +#define _NET_UTILS_H_ + +#include +#include "pci_emul.h" + +void net_genmac(struct pci_devinst *pi, uint8_t *macaddr); +int net_parsemac(char *mac_str, uint8_t *mac_addr); + +#endif /* _NET_UTILS_H_ */ Modified: head/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- head/usr.sbin/bhyve/pci_e82545.c Thu Jun 13 16:34:55 2019 (r349018) +++ head/usr.sbin/bhyve/pci_e82545.c Thu Jun 13 17:39:32 2019 (r349019) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "pci_emul.h" #include "mevent.h" +#include "net_utils.h" /* Hardware/register definitions XXX: move some to common code. */ #define E82545_VENDOR_ID_INTEL 0x8086 @@ -2259,38 +2260,16 @@ e82545_open_tap(struct e82545_softc *sc, char *opts) } static int -e82545_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (1); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - return (0); -} - -static int e82545_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - DPRINTF("Loading with options: %s\r\n", opts); - - MD5_CTX mdctx; - unsigned char digest[16]; char nstr[80]; struct e82545_softc *sc; char *devname; char *vtopts; int mac_provided; + DPRINTF("Loading with options: %s\r\n", opts); + /* Setup our softc */ sc = calloc(1, sizeof(*sc)); @@ -2340,7 +2319,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = e82545_parsemac(vtopts, sc->esc_mac.octet); + err = net_parsemac(vtopts, sc->esc_mac.octet); if (err != 0) { free(devname); return (err); @@ -2355,24 +2334,8 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->esc_mac.octet[0] = 0x00; - sc->esc_mac.octet[1] = 0xa0; - sc->esc_mac.octet[2] = 0x98; - sc->esc_mac.octet[3] = digest[0]; - sc->esc_mac.octet[4] = digest[1]; - sc->esc_mac.octet[5] = digest[2]; + net_genmac(pi, sc->esc_mac.octet); } /* H/w initiated reset */ Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 13 16:34:55 2019 (r349018) +++ head/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 13 17:39:32 2019 (r349019) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" #include "mevent.h" #include "virtio.h" +#include "net_utils.h" #define VTNET_RINGSZ 1024 @@ -698,29 +699,6 @@ pci_vtnet_ping_ctlq(void *vsc, struct vqueue_info *vq) } #endif -static int -pci_vtnet_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (EINVAL); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - - return (0); -} - static void pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char *devname) { @@ -795,9 +773,6 @@ pci_vtnet_netmap_setup(struct pci_vtnet_softc *sc, cha static int pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - MD5_CTX mdctx; - unsigned char digest[16]; - char nstr[80]; char tname[MAXCOMLEN + 1]; struct pci_vtnet_softc *sc; char *devname; @@ -834,7 +809,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = pci_vtnet_parsemac(vtopts, sc->vsc_config.mac); + err = net_parsemac(vtopts, sc->vsc_config.mac); if (err != 0) { free(devname); return (err); @@ -851,24 +826,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->vsc_config.mac[0] = 0x00; - sc->vsc_config.mac[1] = 0xa0; - sc->vsc_config.mac[2] = 0x98; - sc->vsc_config.mac[3] = digest[0]; - sc->vsc_config.mac[4] = digest[1]; - sc->vsc_config.mac[5] = digest[2]; + net_genmac(pi, sc->vsc_config.mac); } /* initialize config space */ From owner-svn-src-all@freebsd.org Thu Jun 13 17:46:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8000315B8C40; Thu, 13 Jun 2019 17:46:39 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF6EE8EFF0; Thu, 13 Jun 2019 17:46:38 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x5DHkUsY093160; Thu, 13 Jun 2019 10:46:30 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x5DHkUgr093159; Thu, 13 Jun 2019 10:46:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201906131746.x5DHkUgr093159@gndrsh.dnsmgr.net> Subject: Re: svn commit: r349019 - head/usr.sbin/bhyve In-Reply-To: <201906131739.x5DHdX93034129@repo.freebsd.org> To: Vincenzo Maffione Date: Thu, 13 Jun 2019 10:46:30 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: CF6EE8EFF0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 17:46:39 -0000 > Author: vmaffione > Date: Thu Jun 13 17:39:32 2019 > New Revision: 349019 > URL: https://svnweb.freebsd.org/changeset/base/349019 > > Log: > bhyve: move common code to net_utils.c > > Both virtio_net and e82545 network frontends have code to validate and > generate MAC addresses. These functionalities are replicated in the two > files, so we move them in a separate compilation unit. > > Reviewed by: rgrimes, bryanv, imp, kevans > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D20626 You should of waited for a bit longer for additional comments based on the fact you made changes based on other comments. > Added: > head/usr.sbin/bhyve/net_utils.c (contents, props changed) > head/usr.sbin/bhyve/net_utils.h (contents, props changed) > Modified: > head/usr.sbin/bhyve/Makefile > head/usr.sbin/bhyve/pci_e82545.c > head/usr.sbin/bhyve/pci_virtio_net.c > > Modified: head/usr.sbin/bhyve/Makefile > ============================================================================== > --- head/usr.sbin/bhyve/Makefile Thu Jun 13 16:34:55 2019 (r349018) > +++ head/usr.sbin/bhyve/Makefile Thu Jun 13 17:39:32 2019 (r349019) > @@ -32,6 +32,7 @@ SRCS= \ > mem.c \ > mevent.c \ > mptbl.c \ > + net_utils.c \ > pci_ahci.c \ > pci_e82545.c \ > pci_emul.c \ > > Added: head/usr.sbin/bhyve/net_utils.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bhyve/net_utils.c Thu Jun 13 17:39:32 2019 (r349019) > @@ -0,0 +1,83 @@ > +/*- > + * Copyright (c) 2011 NetApp, Inc. The all rights reserved clause must be restored here, please see the review for the reason. Thanks, Rod > + * > + * 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$ > + */ > + > +#include "net_utils.h" > +#include "bhyverun.h" > +#include > +#include > +#include > +#include > +#include > + > +int > +net_parsemac(char *mac_str, uint8_t *mac_addr) > +{ > + struct ether_addr *ea; > + char *tmpstr; > + char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; > + > + tmpstr = strsep(&mac_str,"="); > + > + if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { > + ea = ether_aton(mac_str); > + > + if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || > + memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { > + fprintf(stderr, "Invalid MAC %s\n", mac_str); > + return (EINVAL); > + } else > + memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); > + } > + > + return (0); > +} > + > +void > +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) > +{ > + /* > + * The default MAC address is the standard NetApp OUI of 00-a0-98, > + * followed by an MD5 of the PCI slot/func number and dev name > + */ > + MD5_CTX mdctx; > + unsigned char digest[16]; > + char nstr[80]; > + > + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, > + pi->pi_func, vmname); > + > + MD5Init(&mdctx); > + MD5Update(&mdctx, nstr, (unsigned int)strlen(nstr)); > + MD5Final(digest, &mdctx); > + > + macaddr[0] = 0x00; > + macaddr[1] = 0xa0; > + macaddr[2] = 0x98; > + macaddr[3] = digest[0]; > + macaddr[4] = digest[1]; > + macaddr[5] = digest[2]; > +} > > Added: head/usr.sbin/bhyve/net_utils.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bhyve/net_utils.h Thu Jun 13 17:39:32 2019 (r349019) > @@ -0,0 +1,37 @@ > +/*- > + * Copyright (c) 2019 Vincenzo Maffione This one is fine, thank you for fixing this. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, > + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT > + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR > + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE > + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, > + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _NET_UTILS_H_ > +#define _NET_UTILS_H_ > + > +#include > +#include "pci_emul.h" > + > +void net_genmac(struct pci_devinst *pi, uint8_t *macaddr); > +int net_parsemac(char *mac_str, uint8_t *mac_addr); > + > +#endif /* _NET_UTILS_H_ */ > > Modified: head/usr.sbin/bhyve/pci_e82545.c > ============================================================================== > --- head/usr.sbin/bhyve/pci_e82545.c Thu Jun 13 16:34:55 2019 (r349018) > +++ head/usr.sbin/bhyve/pci_e82545.c Thu Jun 13 17:39:32 2019 (r349019) > @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); > #include "bhyverun.h" > #include "pci_emul.h" > #include "mevent.h" > +#include "net_utils.h" > > /* Hardware/register definitions XXX: move some to common code. */ > #define E82545_VENDOR_ID_INTEL 0x8086 > @@ -2259,38 +2260,16 @@ e82545_open_tap(struct e82545_softc *sc, char *opts) > } > > static int > -e82545_parsemac(char *mac_str, uint8_t *mac_addr) > -{ > - struct ether_addr *ea; > - char *tmpstr; > - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; > - > - tmpstr = strsep(&mac_str,"="); > - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { > - ea = ether_aton(mac_str); > - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || > - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { > - fprintf(stderr, "Invalid MAC %s\n", mac_str); > - return (1); > - } else > - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); > - } > - return (0); > -} > - > -static int > e82545_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) > { > - DPRINTF("Loading with options: %s\r\n", opts); > - > - MD5_CTX mdctx; > - unsigned char digest[16]; > char nstr[80]; > struct e82545_softc *sc; > char *devname; > char *vtopts; > int mac_provided; > > + DPRINTF("Loading with options: %s\r\n", opts); > + > /* Setup our softc */ > sc = calloc(1, sizeof(*sc)); > > @@ -2340,7 +2319,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, > (void) strsep(&vtopts, ","); > > if (vtopts != NULL) { > - err = e82545_parsemac(vtopts, sc->esc_mac.octet); > + err = net_parsemac(vtopts, sc->esc_mac.octet); > if (err != 0) { > free(devname); > return (err); > @@ -2355,24 +2334,8 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, > free(devname); > } > > - /* > - * The default MAC address is the standard NetApp OUI of 00-a0-98, > - * followed by an MD5 of the PCI slot/func number and dev name > - */ > if (!mac_provided) { > - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, > - pi->pi_func, vmname); > - > - MD5Init(&mdctx); > - MD5Update(&mdctx, nstr, strlen(nstr)); > - MD5Final(digest, &mdctx); > - > - sc->esc_mac.octet[0] = 0x00; > - sc->esc_mac.octet[1] = 0xa0; > - sc->esc_mac.octet[2] = 0x98; > - sc->esc_mac.octet[3] = digest[0]; > - sc->esc_mac.octet[4] = digest[1]; > - sc->esc_mac.octet[5] = digest[2]; > + net_genmac(pi, sc->esc_mac.octet); > } > > /* H/w initiated reset */ > > Modified: head/usr.sbin/bhyve/pci_virtio_net.c > ============================================================================== > --- head/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 13 16:34:55 2019 (r349018) > +++ head/usr.sbin/bhyve/pci_virtio_net.c Thu Jun 13 17:39:32 2019 (r349019) > @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); > #include "pci_emul.h" > #include "mevent.h" > #include "virtio.h" > +#include "net_utils.h" > > #define VTNET_RINGSZ 1024 > > @@ -698,29 +699,6 @@ pci_vtnet_ping_ctlq(void *vsc, struct vqueue_info *vq) > } > #endif > > -static int > -pci_vtnet_parsemac(char *mac_str, uint8_t *mac_addr) > -{ > - struct ether_addr *ea; > - char *tmpstr; > - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; > - > - tmpstr = strsep(&mac_str,"="); > - > - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { > - ea = ether_aton(mac_str); > - > - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || > - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { > - fprintf(stderr, "Invalid MAC %s\n", mac_str); > - return (EINVAL); > - } else > - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); > - } > - > - return (0); > -} > - > static void > pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char *devname) > { > @@ -795,9 +773,6 @@ pci_vtnet_netmap_setup(struct pci_vtnet_softc *sc, cha > static int > pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) > { > - MD5_CTX mdctx; > - unsigned char digest[16]; > - char nstr[80]; > char tname[MAXCOMLEN + 1]; > struct pci_vtnet_softc *sc; > char *devname; > @@ -834,7 +809,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * > (void) strsep(&vtopts, ","); > > if (vtopts != NULL) { > - err = pci_vtnet_parsemac(vtopts, sc->vsc_config.mac); > + err = net_parsemac(vtopts, sc->vsc_config.mac); > if (err != 0) { > free(devname); > return (err); > @@ -851,24 +826,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * > free(devname); > } > > - /* > - * The default MAC address is the standard NetApp OUI of 00-a0-98, > - * followed by an MD5 of the PCI slot/func number and dev name > - */ > if (!mac_provided) { > - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, > - pi->pi_func, vmname); > - > - MD5Init(&mdctx); > - MD5Update(&mdctx, nstr, strlen(nstr)); > - MD5Final(digest, &mdctx); > - > - sc->vsc_config.mac[0] = 0x00; > - sc->vsc_config.mac[1] = 0xa0; > - sc->vsc_config.mac[2] = 0x98; > - sc->vsc_config.mac[3] = digest[0]; > - sc->vsc_config.mac[4] = digest[1]; > - sc->vsc_config.mac[5] = digest[2]; > + net_genmac(pi, sc->vsc_config.mac); > } > > /* initialize config space */ > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Jun 13 19:04:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A223D15BA2D1; Thu, 13 Jun 2019 19:04:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37A2C6ABF3; Thu, 13 Jun 2019 19:04:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A1504B11; Thu, 13 Jun 2019 19:04:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DJ4nBA081634; Thu, 13 Jun 2019 19:04:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DJ4nHL081633; Thu, 13 Jun 2019 19:04:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906131904.x5DJ4nHL081633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 13 Jun 2019 19:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r349020 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 349020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 37A2C6ABF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 19:04:50 -0000 Author: gjb Date: Thu Jun 13 19:04:49 2019 New Revision: 349020 URL: https://svnweb.freebsd.org/changeset/base/349020 Log: Preemptively add releng/11.3 to the approvers file. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Thu Jun 13 17:39:32 2019 (r349019) +++ svnadmin/conf/approvers Thu Jun 13 19:04:49 2019 (r349020) @@ -21,6 +21,7 @@ ^stable/11/ re ^release/ re ^releng/12.0/ (security-officer|so) +^releng/11.3/ re ^releng/11.[0-2]/ (security-officer|so) ^releng/10.[0-4]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) From owner-svn-src-all@freebsd.org Thu Jun 13 19:51:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54FE215BB5DD; Thu, 13 Jun 2019 19:51:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0AD96C2E3; Thu, 13 Jun 2019 19:51:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9E595353; Thu, 13 Jun 2019 19:51:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DJpmVt003364; Thu, 13 Jun 2019 19:51:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DJpmc5003363; Thu, 13 Jun 2019 19:51:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906131951.x5DJpmc5003363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 13 Jun 2019 19:51:48 +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: r349022 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 349022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F0AD96C2E3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 19:51:49 -0000 Author: gjb Date: Thu Jun 13 19:51:48 2019 New Revision: 349022 URL: https://svnweb.freebsd.org/changeset/base/349022 Log: Release notes documentation: - r346296, clang (and friends) 8.0.0. - r346981, WPA 2.8. - r348343, OpenSSL 1.0.2s. - r348607, libarchive(3) updates. - r348980, OpenPAM updates. - r346855, cxgbe(4) hash filters, NAT offloading, SMAC/DMAC swapping filtering. - r346940, cxgbe(4) T4/5/6 firmware update. - r348588, geli(8) weak algorithm deprecation warnings. - r346690, ZFS parallel mounting. - r348753, deprecation warnings enabled. - r346212, NAT64 CLAT support. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 13 19:07:03 2019 (r349021) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 13 19:51:48 2019 (r349022) @@ -261,9 +261,6 @@ The &man.xz.1; utility has been updated to version 5.2.4. - The WPA - utilities have been updated to version 2.6. - The &man.file.1; utility has been updated to version 5.34. @@ -271,10 +268,6 @@ ELF Tool Chain has been updated to version r3614. - The &man.libarchive.3; library has been - updated to version 3.3.3, with additional fixes from - upstream. - The lld utility has been updated to add -z interpose, marking the object file as @@ -284,25 +277,35 @@ updated to fix incorrect date reporting for &man.dump.8; files. - The clang, + The LUA + &man.loader.8; has been merged. + + The &man.ntpd.8; utilities have been + updated to version 4.2.8p13. + + Timezone data files have been updated to + version 2019a. + + The clang, llvm, lld, lldb, and compiler-rt utilities as well as libc++ have been updated to - upstream version 7.0.1. + upstream version 8.0.0. - The LUA - &man.loader.8; has been merged. + The WPA + utilities have been updated to version 2.8. - OpenSSL has - been updated to version 1.0.2r. + OpenSSL has + been updated to version 1.0.2s. - The &man.ntpd.8; utilities have been - updated to version 4.2.8p13. + The &man.libarchive.3; library has been + updated to version 3.3.3, with additional fixes from + upstream. - Timezone data files have been updated to - version 2019a. + OpenPAM has + been updated to the latest upstream version. @@ -405,6 +408,10 @@ ID when logging a process exit. The &man.jail.8; ID 0 represents processes that are not jailed. + + Warnings for features deprecated in + future releases will now be printed on all &os; + versions. @@ -473,6 +480,17 @@ sponsor="&chelsio;">The &man.ccr.4; driver has been added, providing support for Chelsio® T6™ cryptography accelerators. + + The &man.cxgbe.4; driver has been updated + to include support for hash filters, NAT + offloading, and + SMAC/DMAC swapping + filters. + + The &man.cxgbe.4; T4, T5, and T6 firmware + has been updated to version 1.23.0.0. @@ -517,7 +535,8 @@ General Storage -   + Deprecation warnings have been added for + weaker algorithms when creating &man.geli.8; providers. @@ -533,6 +552,10 @@ issue that could result in a system hang during ZFS vnode reclamation has been fixed. + + The + ZFS filesystem has been updated to + implement parallel mounting. @@ -588,6 +611,11 @@ updated to include new rule options, record-state, set-limit, and defer-action. + + Support for NAT64 + CLAT has been added, as defined in + RFC6877. From owner-svn-src-all@freebsd.org Thu Jun 13 20:09:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E769B15BBB8A; Thu, 13 Jun 2019 20:09:08 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 856EC6CAC0; Thu, 13 Jun 2019 20:09:08 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 732975557; Thu, 13 Jun 2019 20:09:08 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DK98OB012684; Thu, 13 Jun 2019 20:09:08 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DK98T1012683; Thu, 13 Jun 2019 20:09:08 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906132009.x5DK98T1012683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 13 Jun 2019 20:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349023 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 856EC6CAC0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 20:09:09 -0000 Author: dougm Date: Thu Jun 13 20:09:07 2019 New Revision: 349023 URL: https://svnweb.freebsd.org/changeset/base/349023 Log: Create a function for creating objects to back map entries, and one for giving cred to a map entry backed by an object, and use them instead of the code duplicated inline now. Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20370 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jun 13 19:51:48 2019 (r349022) +++ head/sys/vm/vm_map.c Thu Jun 13 20:09:07 2019 (r349023) @@ -2109,6 +2109,60 @@ vm_map_simplify_entry(vm_map_t map, vm_map_entry_t ent } /* + * vm_map_entry_back: + * + * Allocate an object to back a map entry. + */ +static inline void +vm_map_entry_back(vm_map_entry_t entry) +{ + vm_object_t object; + + KASSERT(entry->object.vm_object == NULL, + ("map entry %p has backing object", entry)); + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("map entry %p is a submap", entry)); + object = vm_object_allocate(OBJT_DEFAULT, + atop(entry->end - entry->start)); + entry->object.vm_object = object; + entry->offset = 0; + if (entry->cred != NULL) { + object->cred = entry->cred; + object->charge = entry->end - entry->start; + entry->cred = NULL; + } +} + +/* + * vm_map_entry_charge_object + * + * If there is no object backing this entry, create one. Otherwise, if + * the entry has cred, give it to the backing object. + */ +static inline void +vm_map_entry_charge_object(vm_map_t map, vm_map_entry_t entry) +{ + + VM_MAP_ASSERT_LOCKED(map); + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("map entry %p is a submap", entry)); + if (entry->object.vm_object == NULL && !map->system_map && + (entry->eflags & MAP_ENTRY_GUARD) == 0) + vm_map_entry_back(entry); + else if (entry->object.vm_object != NULL && + ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) && + entry->cred != NULL) { + VM_OBJECT_WLOCK(entry->object.vm_object); + KASSERT(entry->object.vm_object->cred == NULL, + ("OVERCOMMIT: %s: both cred e %p", __func__, entry)); + entry->object.vm_object->cred = entry->cred; + entry->object.vm_object->charge = entry->end - entry->start; + VM_OBJECT_WUNLOCK(entry->object.vm_object); + entry->cred = NULL; + } +} + +/* * vm_map_clip_start: [ internal use only ] * * Asserts that the given entry begins at or after @@ -2140,38 +2194,7 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, * starting address. */ vm_map_simplify_entry(map, entry); - - /* - * If there is no object backing this entry, we might as well create - * one now. If we defer it, an object can get created after the map - * is clipped, and individual objects will be created for the split-up - * map. This is a bit of a hack, but is also about the best place to - * put this improvement. - */ - if (entry->object.vm_object == NULL && !map->system_map && - (entry->eflags & MAP_ENTRY_GUARD) == 0) { - vm_object_t object; - object = vm_object_allocate(OBJT_DEFAULT, - atop(entry->end - entry->start)); - entry->object.vm_object = object; - entry->offset = 0; - if (entry->cred != NULL) { - object->cred = entry->cred; - object->charge = entry->end - entry->start; - entry->cred = NULL; - } - } else if (entry->object.vm_object != NULL && - ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) && - entry->cred != NULL) { - VM_OBJECT_WLOCK(entry->object.vm_object); - KASSERT(entry->object.vm_object->cred == NULL, - ("OVERCOMMIT: vm_entry_clip_start: both cred e %p", entry)); - entry->object.vm_object->cred = entry->cred; - entry->object.vm_object->charge = entry->end - entry->start; - VM_OBJECT_WUNLOCK(entry->object.vm_object); - entry->cred = NULL; - } - + vm_map_entry_charge_object(map, entry); new_entry = vm_map_entry_create(map); *new_entry = *entry; @@ -2222,40 +2245,11 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v KASSERT(entry->start < end && entry->end > end, ("_vm_map_clip_end: invalid clip of entry %p", entry)); - /* - * If there is no object backing this entry, we might as well create - * one now. If we defer it, an object can get created after the map - * is clipped, and individual objects will be created for the split-up - * map. This is a bit of a hack, but is also about the best place to - * put this improvement. - */ - if (entry->object.vm_object == NULL && !map->system_map && - (entry->eflags & MAP_ENTRY_GUARD) == 0) { - vm_object_t object; - object = vm_object_allocate(OBJT_DEFAULT, - atop(entry->end - entry->start)); - entry->object.vm_object = object; - entry->offset = 0; - if (entry->cred != NULL) { - object->cred = entry->cred; - object->charge = entry->end - entry->start; - entry->cred = NULL; - } - } else if (entry->object.vm_object != NULL && - ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) && - entry->cred != NULL) { - VM_OBJECT_WLOCK(entry->object.vm_object); - KASSERT(entry->object.vm_object->cred == NULL, - ("OVERCOMMIT: vm_entry_clip_end: both cred e %p", entry)); - entry->object.vm_object->cred = entry->cred; - entry->object.vm_object->charge = entry->end - entry->start; - VM_OBJECT_WUNLOCK(entry->object.vm_object); - entry->cred = NULL; - } /* * Create a new entry and insert it AFTER the specified entry */ + vm_map_entry_charge_object(map, entry); new_entry = vm_map_entry_create(map); *new_entry = *entry; @@ -3935,16 +3929,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c */ object = old_entry->object.vm_object; if (object == NULL) { - object = vm_object_allocate(OBJT_DEFAULT, - atop(old_entry->end - old_entry->start)); - old_entry->object.vm_object = object; - old_entry->offset = 0; - if (old_entry->cred != NULL) { - object->cred = old_entry->cred; - object->charge = old_entry->end - - old_entry->start; - old_entry->cred = NULL; - } + vm_map_entry_back(old_entry); + object = old_entry->object.vm_object; } /* From owner-svn-src-all@freebsd.org Thu Jun 13 20:16:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC3E315BBE90; Thu, 13 Jun 2019 20:16:27 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1956CF6D; Thu, 13 Jun 2019 20:16:27 +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 236BA56FE; Thu, 13 Jun 2019 20:16:27 +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 x5DKGRZF018118; Thu, 13 Jun 2019 20:16:27 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DKGRu7018117; Thu, 13 Jun 2019 20:16:27 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201906132016.x5DKGRu7018117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Thu, 13 Jun 2019 20:16: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: r349024 - stable/12/usr.bin/mandoc X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/usr.bin/mandoc X-SVN-Commit-Revision: 349024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4B1956CF6D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 20:16:27 -0000 Author: lwhsu Date: Thu Jun 13 20:16:26 2019 New Revision: 349024 URL: https://svnweb.freebsd.org/changeset/base/349024 Log: MFC r346160: Suppress old gcc warning about null format string This is workaround to make head build on gcc using architectures Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.bin/mandoc/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mandoc/Makefile ============================================================================== --- stable/12/usr.bin/mandoc/Makefile Thu Jun 13 20:09:07 2019 (r349023) +++ stable/12/usr.bin/mandoc/Makefile Thu Jun 13 20:16:26 2019 (r349024) @@ -97,6 +97,8 @@ SRCS= ${LIB_SRCS} \ WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ -I${SRCTOP}/lib/libopenbsd/ +# This can be removed after swtiching to newer gcc +CFLAGS.gcc+= -Wno-format LIBADD= openbsd z .include From owner-svn-src-all@freebsd.org Thu Jun 13 22:03:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDC4915BE7CD; Thu, 13 Jun 2019 22:03:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79BAD7042F; Thu, 13 Jun 2019 22:03:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B0B569FF; Thu, 13 Jun 2019 22:03:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5DM3smx075057; Thu, 13 Jun 2019 22:03:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5DM3sjp075056; Thu, 13 Jun 2019 22:03:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201906132203.x5DM3sjp075056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 13 Jun 2019 22:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349025 - head/sys/modules/sdio X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/sdio X-SVN-Commit-Revision: 349025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 79BAD7042F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 22:03:55 -0000 Author: imp Date: Thu Jun 13 22:03:53 2019 New Revision: 349025 URL: https://svnweb.freebsd.org/changeset/base/349025 Log: Add opt_cam.h so we can build this outside of a kernel build. Modified: head/sys/modules/sdio/Makefile Modified: head/sys/modules/sdio/Makefile ============================================================================== --- head/sys/modules/sdio/Makefile Thu Jun 13 20:16:26 2019 (r349024) +++ head/sys/modules/sdio/Makefile Thu Jun 13 22:03:53 2019 (r349025) @@ -5,6 +5,6 @@ KMOD= sdio SRCS= sdiob.c sdio_subr.c SRCS+= sdio_if.c -SRCS+= device_if.h bus_if.h sdio_if.h +SRCS+= device_if.h bus_if.h sdio_if.h opt_cam.h .include From owner-svn-src-all@freebsd.org Fri Jun 14 00:03:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19ABB15C0D6F; Fri, 14 Jun 2019 00:03:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACC9B737F0; Fri, 14 Jun 2019 00:03:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DE407E47; Fri, 14 Jun 2019 00:03:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E03nHF041626; Fri, 14 Jun 2019 00:03:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E03m2c041623; Fri, 14 Jun 2019 00:03:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906140003.x5E03m2c041623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 14 Jun 2019 00:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349026 - in releng/11.3: release/pkg_repos sys/conf sys/sys X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in releng/11.3: release/pkg_repos sys/conf sys/sys X-SVN-Commit-Revision: 349026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACC9B737F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 00:03:50 -0000 Author: gjb Date: Fri Jun 14 00:03:48 2019 New Revision: 349026 URL: https://svnweb.freebsd.org/changeset/base/349026 Log: Copy stable/11@r349022 to releng/11.3 as part of the 11.3-RELEASE cycle. Update releng/11.3 from BETA3 to RC1. Switch the default dvd1.iso pkg(8) repository from latest to quarterly. Bump __FreeBSD_version. Prune vestigial svn:mergeinfo from the new branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: - copied from r349022, stable/11/ Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/release/pkg_repos/release-dvd.conf releng/11.3/sys/conf/newvers.sh releng/11.3/sys/sys/param.h Modified: releng/11.3/release/pkg_repos/release-dvd.conf ============================================================================== --- stable/11/release/pkg_repos/release-dvd.conf Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/release/pkg_repos/release-dvd.conf Fri Jun 14 00:03:48 2019 (r349026) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/sys/conf/newvers.sh Fri Jun 14 00:03:48 2019 (r349026) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.3/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/sys/sys/param.h Fri Jun 14 00:03:48 2019 (r349026) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Jun 14 00:09:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D2AD15C0F57; Fri, 14 Jun 2019 00:09:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B38073B3A; Fri, 14 Jun 2019 00:09:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7EE37E4E; Fri, 14 Jun 2019 00:09:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E09CY8042141; Fri, 14 Jun 2019 00:09:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E09CHf042139; Fri, 14 Jun 2019 00:09:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906140009.x5E09CHf042139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 14 Jun 2019 00:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349027 - in stable/11/sys: conf sys X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11/sys: conf sys X-SVN-Commit-Revision: 349027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B38073B3A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 00:09:13 -0000 Author: gjb Date: Fri Jun 14 00:09:12 2019 New Revision: 349027 URL: https://svnweb.freebsd.org/changeset/base/349027 Log: Rename stable/11 from BETA3 to PRERELEASE as releng/11.3 has branched. Bump __FreeBSD_version. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh stable/11/sys/sys/param.h Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Fri Jun 14 00:03:48 2019 (r349026) +++ stable/11/sys/conf/newvers.sh Fri Jun 14 00:09:12 2019 (r349027) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="BETA3" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Fri Jun 14 00:03:48 2019 (r349026) +++ stable/11/sys/sys/param.h Fri Jun 14 00:09:12 2019 (r349027) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Jun 14 00:30:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3084B15C163A; Fri, 14 Jun 2019 00:30:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5C7874C11; Fri, 14 Jun 2019 00:30:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9829781BD; Fri, 14 Jun 2019 00:30:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E0UriE059352; Fri, 14 Jun 2019 00:30:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E0UquG059342; Fri, 14 Jun 2019 00:30:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906140030.x5E0UquG059342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 14 Jun 2019 00:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349028 - in releng/11.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/installation en_US.ISO8859-1/readme share/xml X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in releng/11.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/installation en_US.ISO8859-1/readme share/xml X-SVN-Commit-Revision: 349028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C5C7874C11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 00:30:54 -0000 Author: gjb Date: Fri Jun 14 00:30:52 2019 New Revision: 349028 URL: https://svnweb.freebsd.org/changeset/base/349028 Log: Post-branch updates to release-related documentation: - Bump copyright years. - Note in parenthesis 11.3 may be the last 11.x release. - Prune stale errata items from 11.2-RELEASE. - Fix mailing list in the readme page. - Bump version numbers accordingly. This has no effect or impact on the in-progress 11.3-RC1 build. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml releng/11.3/release/doc/share/xml/release.ent Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -24,7 +24,7 @@ $FreeBSD$ - 2018 + 2019 The &os; Documentation Project @@ -49,7 +49,8 @@ &os;. This errata document for &os; &release; will be maintained - until the release of &os; &release.next;. + until the release of &os; &release.next; (if + applicable). @@ -96,157 +97,7 @@ - &os;/&arch.i386; installed on ZFS may crash during boot - when the ZFS pool mount is attempted while booting an - unmodified GENERIC kernel. - - A system tunable has been added as of revision - r286584 to make the - kern.kstack_pages tunable configurable - without recompiling the kernel. - - To mitigate system crashes with such configurations, - choose Escape to loader prompt in the - boot menu and enter the following lines from &man.loader.8; - prompt, after an OK: - - set kern.kstack_pages=4 -boot - - Add this line to - /boot/loader.conf for the change to - persist across reboots: - - kern.kstack_pages=4 - - - - [2017-07-25] &os;/&arch.arm64; currently lacks - EFI real-time clock - (RTC) support, which may cause the system - to boot with the wrong time set. - - As a workaround, either enable &man.ntpdate.8; or - include ntpd_sync_on_start="YES" in - &man.rc.conf.5;. - - - - [2017-07-25] A late issue was discovered with - &os;/&arch.arm64; and "root on - ZFS" installations where the root - ZFS pool would fail to be located. - - There currently is no workaround. - - - - [2017-11-06] An issue with &os; virtual machines with - vagrant was discovered that - affects the VirtualBox where the - virtual machine will not start on the initial boot invoked - with vagrant up. - - The issue is due to the virtual machine - MAC being unset, as &os; does not provide - a default Vagrantfile. - - It has been observed, however, that a subsequent - invocation of vagrant up will allow the - virtual machine to successfully boot, allowing access via - vagrant ssh. - - - - [2018-06-21] An issue had been discovered late in the - release cycle where removing ZFS vdevs - from a pool under certain conditions would cause a system - crash when &man.zfsd.8; is enabled in - &man.rc.conf.5;. - - At present, it is believed to be limited to removal of - a mirror vdev from a pool consisting of - multiple mirror vdevs. - - See PR 228750 - for more information and updates as the issue is - investigated. - - - - [2018-06-26] An issue had been discovered late in the - release cycle where a system crash could occur after - installing emulators/virtualbox-ose-kmod - from upstream package mirrors via &man.pkg.8;. - - Building emulators/virtualbox-ose-kmod - from the &man.ports.7; collection has been observed to work - around the crash. - - See PR 228535 - for more information. - - - - [2018-06-26] It was discovered after the releng/11.2 branch was tagged - for &os; 11.2-RELEASE that a few device drivers were - missing from the hardware - page. The missing drivers, &man.alc.4;, &man.cxgbev.4;, - &man.liquidio.4;, and &man.mos.4; were added to the - 11-STABLE hardware - page. - - - - [2018-06-26] The URL to the - instructions for source-based upgrades in - UPDATING incorrectly points to a page - that no longer exists. The correct URL is . - - - - [2018-06-27] The announcement email for &os; 11.2 - incorrectly states the ocs_fw(4) driver - had been added; this should have stated - &man.ocs.fc.4;. - - - - [2018-06-28] An issue had been reported after the - release of &os; 11.2 with x11/nvidia-driver installed from - the upstream package mirrors via &man.pkg.8;. - - Building x11/nvidia-driver from - the &man.ports.7; collection has been reported to resolve - the issue. - - See PR 228536 - for more information. - - - - [2018-10-18] A &os; system with a custom kernel - configuration excluding NFS on 10.x did - not explicitly require the krpc option to - be included when booting via ZFS-on-root - and, for example, setting - MODULES_OVERRIDE="zfs opensolaris" in the - kernel configuration. - - In 11.x, however, krpc is explicitly - required if the kernel configuration excludes - NFS. + No open issues at this time. Modified: releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -40,6 +40,7 @@ 2016 2017 2018 + 2019 The &os; Documentation Project Modified: releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -22,7 +22,7 @@ $FreeBSD$ - 2018 + 2019 The &os; Documentation Project Modified: releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -44,6 +44,7 @@ 2016 2017 2018 + 2019 The &os; Documentation Project @@ -231,7 +232,7 @@ please send mail to the &a.questions;. If you are tracking the &release.branch; development - efforts, you must join the &a.current;, + efforts, you must join the &a.stable;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the system. Modified: releng/11.3/release/doc/share/xml/release.ent ============================================================================== --- releng/11.3/release/doc/share/xml/release.ent Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/share/xml/release.ent Fri Jun 14 00:30:52 2019 (r349028) @@ -6,7 +6,7 @@ - + - + - + - + - + @@ -37,10 +37,10 @@ or "release" --> - + - - + + From owner-svn-src-all@freebsd.org Fri Jun 14 01:09:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EBA815C2269; Fri, 14 Jun 2019 01:09:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16BD275BD0; Fri, 14 Jun 2019 01:09:11 +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 DFF7A8857; Fri, 14 Jun 2019 01:09:10 +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 x5E19APV087900; Fri, 14 Jun 2019 01:09:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E19Aj9087899; Fri, 14 Jun 2019 01:09:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906140109.x5E19Aj9087899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Jun 2019 01:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349029 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16BD275BD0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 01:09:11 -0000 Author: mav Date: Fri Jun 14 01:09:10 2019 New Revision: 349029 URL: https://svnweb.freebsd.org/changeset/base/349029 Log: Update td_runtime of running thread on each statclock(). Normally td_runtime is updated on context switch, but there are some kernel threads that due to high absolute priority may run for many seconds without context switches (yes, that is bad, but that is true), which means their td_runtime was not updated all that time, that made them invisible for top other then as some general CPU usage. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Fri Jun 14 00:30:52 2019 (r349028) +++ head/sys/kern/kern_clock.c Fri Jun 14 01:09:10 2019 (r349029) @@ -644,6 +644,7 @@ statclock(int cnt, int usermode) struct proc *p; long rss; long *cp_time; + uint64_t runtime, new_switchtime; td = curthread; p = td->td_proc; @@ -699,6 +700,17 @@ statclock(int cnt, int usermode) "prio:%d", td->td_priority, "stathz:%d", (stathz)?stathz:hz); SDT_PROBE2(sched, , , tick, td, td->td_proc); thread_lock_flags(td, MTX_QUIET); + + /* + * Compute the amount of time during which the current + * thread was running, and add that to its total so far. + */ + new_switchtime = cpu_ticks(); + runtime = new_switchtime - PCPU_GET(switchtime); + td->td_runtime += runtime; + td->td_incruntime += runtime; + PCPU_SET(switchtime, new_switchtime); + for ( ; cnt > 0; cnt--) sched_clock(td); thread_unlock(td); From owner-svn-src-all@freebsd.org Fri Jun 14 01:26:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD8715C277D; Fri, 14 Jun 2019 01:26:24 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26F2E76387; Fri, 14 Jun 2019 01:26:24 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by mail-io1-f46.google.com with SMTP id e3so2111507ioc.12; Thu, 13 Jun 2019 18:26:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/iElz/kjuib3F+c36X9dLvxLJ8zEu0veIQfqzL/Ko0Q=; b=bYxx1tQnpq8Z7Kwub21CgwOhMmgZ1WqtPospEvMKi8pphnrN+0XnS24BHg7dtfbfR7 aXVxOuf8wcUQFk6PiCeFYOsDFV75/gOZIz7lkkK3xExElM3d9jwzVPkZtScrJYHbnQZE TbC9zCSLdeg80ImwvL1MITGGXhe1hokBaX8g7CztFkFjuY7n09Az+VVaDG53XFLK8uGQ 1w4ttxf4TLuG1LbA6hUtkK0osito9hSkaTqTphVYafqwpxUGiMi5NUa0pa2E5BxyAE5x G9VDSeuu3ezMouVV/7Fb3o5Fac5Bb7G2OORULu9PiNq6vWqwgOdz3Ijrq9DfTO8Jndwt ZVDA== X-Gm-Message-State: APjAAAX88zTM36p2ko4xFEhUTsQpY4XetsXvVGXBYhSbCX4pjozJ+/Ck 7QfnWhlpzU+nDlxQZ7GPu1QwIEbe6q9vxLkMlXzAVe+W X-Google-Smtp-Source: APXvYqzqGZdR3edRu/oLl0B62bbYaOu0sL8IXVxPeoihOTt0GyaIq2hZzZ41sq2m3a/GEtqfr6UZ1h7HTlGsNKLvOwQ= X-Received: by 2002:a5e:a712:: with SMTP id b18mr2701992iod.220.1560446174837; Thu, 13 Jun 2019 10:16:14 -0700 (PDT) MIME-Version: 1.0 References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190612224255.GA67242@FreeBSD.org> <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org> In-Reply-To: <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org> From: Dmitry Chagin Date: Thu, 13 Jun 2019 20:16:04 +0300 Message-ID: Subject: Re: svn commit: r348847 - head/sys/sys To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: Dmitry Chagin , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 26F2E76387 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 01:26:24 -0000 Hi, All! thanks for reply, I will be back in a week and fix it, I am rafting in Eastern Siberia)) =D1=87=D1=82, 13 =D0=B8=D1=8E=D0=BD=D1=8F 2019 =D0=B3. =D0=B2 11:43, T=C4= =B3l Coosemans : > On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh wrote: > > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff > wrote: > >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, T=C4=B3l Coosemans wrote: > >>>> Date: Mon Jun 10 05:28:03 2019 > >>>> New Revision: 348847 > >>>> URL: https://svnweb.freebsd.org/changeset/base/348847 > >>>> > >>>> Log: > >>>> Use C11 anonymous unions. > >>>> > >>>> PR: 215202 > >>>> Reported by: glebius > >>>> MFC after: 2 weeks > >>>> > >>>> Modified: > >>>> head/sys/sys/ucred.h > >>>> > >>>> Modified: head/sys/sys/ucred.h > >>>> > >>>> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > >>>> --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) > >>>> +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) > >>>> @@ -89,12 +89,11 @@ struct xucred { > >>>> gid_t cr_groups[XU_NGROUPS]; /* groups */ > >>>> union { > >>>> void *_cr_unused1; /* compatibility with old ucred *= / > >>>> - pid_t _pid; > >>>> - } _cr; > >>>> + pid_t cr_pid; > >>>> + }; > >>>> }; > >>>> #define XUCRED_VERSION 0 > >>>> > >>>> -#define cr_pid _cr._pid > >>>> /* This can be used for both ucred and xucred structures. */ > >>>> #define cr_gid cr_groups[0] > >>> > >>> Isn't this a userland header that should work with non-C11 compilers? > >> > >> It could make sense to keep such low bar for standard headers, but > ucred.h > >> is BSD-specific header and struct xucred is FreeBSD specific. > > > > This is solvable with proper visibility, I'd think.. > > I think "union {" should be replaced with "__extension__ union {". That > seems to kill this warning: > > /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11 > extension > [-Wc11-extensions] > union { > ^ > 1 warning generated. > From owner-svn-src-all@freebsd.org Fri Jun 14 03:15:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5299215C4282; Fri, 14 Jun 2019 03:15:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E75C680BC3; Fri, 14 Jun 2019 03:15:54 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B95E59E6A; Fri, 14 Jun 2019 03:15:54 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E3Fs8L055751; Fri, 14 Jun 2019 03:15:54 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E3FsGg055750; Fri, 14 Jun 2019 03:15:54 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906140315.x5E3FsGg055750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Fri, 14 Jun 2019 03:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349030 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E75C680BC3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 03:15:55 -0000 Author: dougm Date: Fri Jun 14 03:15:54 2019 New Revision: 349030 URL: https://svnweb.freebsd.org/changeset/base/349030 Log: Avoid using the prev field of vm_map_entry_t in two functions that iterate over consecutive vm_map entries, and that can easily just 'remember' the prev value instead of looking it up. Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20628 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Fri Jun 14 01:09:10 2019 (r349029) +++ head/sys/vm/vm_map.c Fri Jun 14 03:15:54 2019 (r349030) @@ -734,18 +734,17 @@ SYSCTL_INT(_debug, OID_AUTO, vmmap_check, CTLFLAG_RWTU static void _vm_map_assert_consistent(vm_map_t map) { - vm_map_entry_t entry; - vm_map_entry_t child; + vm_map_entry_t child, entry, prev; vm_size_t max_left, max_right; if (!enable_vmmap_check) return; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { - KASSERT(entry->prev->end <= entry->start, + for (prev = &map->header; (entry = prev->next) != &map->header; + prev = entry) { + KASSERT(prev->end <= entry->start, ("map %p prev->end = %jx, start = %jx", map, - (uintmax_t)entry->prev->end, (uintmax_t)entry->start)); + (uintmax_t)prev->end, (uintmax_t)entry->start)); KASSERT(entry->start < entry->end, ("map %p start = %jx, end = %jx", map, (uintmax_t)entry->start, (uintmax_t)entry->end)); @@ -762,7 +761,7 @@ _vm_map_assert_consistent(vm_map_t map) (uintmax_t)entry->start, (uintmax_t)entry->right->start)); child = entry->left; max_left = (child != NULL) ? child->max_free : - entry->start - entry->prev->end; + entry->start - prev->end; child = entry->right; max_right = (child != NULL) ? child->max_free : entry->next->start - entry->end; @@ -4811,15 +4810,15 @@ vm_map_pmap_KBI(vm_map_t map) static void vm_map_print(vm_map_t map) { - vm_map_entry_t entry; + vm_map_entry_t entry, prev; db_iprintf("Task map %p: pmap=%p, nentries=%d, version=%u\n", (void *)map, (void *)map->pmap, map->nentries, map->timestamp); db_indent += 2; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { + for (prev = &map->header; (entry = prev->next) != &map->header; + prev = entry) { db_iprintf("map entry %p: start=%p, end=%p, eflags=%#x, \n", (void *)entry, (void *)entry->start, (void *)entry->end, entry->eflags); @@ -4830,7 +4829,8 @@ vm_map_print(vm_map_t map) db_iprintf(" prot=%x/%x/%s", entry->protection, entry->max_protection, - inheritance_name[(int)(unsigned char)entry->inheritance]); + inheritance_name[(int)(unsigned char) + entry->inheritance]); if (entry->wired_count != 0) db_printf(", wired"); } @@ -4838,9 +4838,9 @@ vm_map_print(vm_map_t map) db_printf(", share=%p, offset=0x%jx\n", (void *)entry->object.sub_map, (uintmax_t)entry->offset); - if ((entry->prev == &map->header) || - (entry->prev->object.sub_map != - entry->object.sub_map)) { + if (prev == &map->header || + prev->object.sub_map != + entry->object.sub_map) { db_indent += 2; vm_map_print((vm_map_t)entry->object.sub_map); db_indent -= 2; @@ -4860,9 +4860,9 @@ vm_map_print(vm_map_t map) (entry->eflags & MAP_ENTRY_NEEDS_COPY) ? "needed" : "done"); db_printf("\n"); - if ((entry->prev == &map->header) || - (entry->prev->object.vm_object != - entry->object.vm_object)) { + if (prev == &map->header || + prev->object.vm_object != + entry->object.vm_object) { db_indent += 2; vm_object_print((db_expr_t)(intptr_t) entry->object.vm_object, From owner-svn-src-all@freebsd.org Fri Jun 14 04:01:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 914E315C4DD2; Fri, 14 Jun 2019 04:01:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3563081E02; Fri, 14 Jun 2019 04:01:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F8B6A57E; Fri, 14 Jun 2019 04:01:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E41884079470; Fri, 14 Jun 2019 04:01:08 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E418w6079469; Fri, 14 Jun 2019 04:01:08 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906140401.x5E418w6079469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 14 Jun 2019 04:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349031 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3563081E02 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 04:01:09 -0000 Author: alc Date: Fri Jun 14 04:01:08 2019 New Revision: 349031 URL: https://svnweb.freebsd.org/changeset/base/349031 Log: Change the arm64 pmap so that updates to the global count of wired pages are not performed directly by the pmap. Instead, they are performed by vm_page_free_pages_toq(). (This is the same approach that we use on x86.) Reviewed by: kib, markj MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D20627 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Jun 14 03:15:54 2019 (r349030) +++ head/sys/arm64/arm64/pmap.c Fri Jun 14 04:01:08 2019 (r349031) @@ -1410,8 +1410,6 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t } pmap_invalidate_page(pmap, va); - vm_wire_sub(1); - /* * Put page on a list so that it is released after * *ALL* TLB shootdown is done @@ -2030,9 +2028,8 @@ next_chunk: SLIST_REMOVE_HEAD(&free, plinks.s.ss); /* Recycle a freed page table page. */ m_pc->wire_count = 1; - vm_wire_add(1); } - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); return (m_pc); } @@ -2470,8 +2467,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ pmap_resident_count_dec(pmap, 1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_l2: l3 page wire count error")); - ml3->wire_count = 1; - vm_page_unwire_noq(ml3); + ml3->wire_count = 0; pmap_add_delayed_free_list(ml3, free, FALSE); } } @@ -2624,7 +2620,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } /* @@ -2729,7 +2725,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(lock); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } /* @@ -3397,7 +3393,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t lockp) != 0) break; } - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); if (va >= VM_MAXUSER_ADDRESS) { /* * Both pmap_remove_l2() and pmap_remove_l3() will @@ -3425,7 +3421,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Invalidate those entries. */ pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", @@ -3614,7 +3610,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(&free); if (pmap_unwire_l3(pmap, va, mpte, &free)) { pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } mpte = NULL; } @@ -4097,8 +4093,7 @@ pmap_remove_pages(pmap_t pmap) pmap_resident_count_dec(pmap,1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_pages: l3 page wire count error")); - ml3->wire_count = 1; - vm_page_unwire_noq(ml3); + ml3->wire_count = 0; pmap_add_delayed_free_list(ml3, &free, FALSE); } @@ -4136,7 +4131,7 @@ pmap_remove_pages(pmap_t pmap) if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } /* @@ -4596,7 +4591,7 @@ small_mappings: not_cleared < PMAP_TS_REFERENCED_MAX); out: rw_wunlock(lock); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); return (cleared + not_cleared); } @@ -5019,7 +5014,7 @@ pmap_demote_l2_abort(pmap_t pmap, vm_offset_t va, pt_e SLIST_INIT(&free); (void)pmap_remove_l2(pmap, l2, va, pmap_load(pmap_l1(pmap, va)), &free, lockp); - vm_page_free_pages_toq(&free, false); + vm_page_free_pages_toq(&free, true); } /* From owner-svn-src-all@freebsd.org Fri Jun 14 06:10:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F2A515C72F0; Fri, 14 Jun 2019 06:10:16 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EED1684E5E; Fri, 14 Jun 2019 06:10:15 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4249BCA8; Fri, 14 Jun 2019 06:10:15 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E6AFku044494; Fri, 14 Jun 2019 06:10:15 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E6AF51044493; Fri, 14 Jun 2019 06:10:15 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201906140610.x5E6AF51044493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 14 Jun 2019 06:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349032 - head/sbin/dump X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/dump X-SVN-Commit-Revision: 349032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EED1684E5E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.920,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 06:10:16 -0000 Author: mckusick Date: Fri Jun 14 06:10:15 2019 New Revision: 349032 URL: https://svnweb.freebsd.org/changeset/base/349032 Log: Clarify that the -r and -R options can be used only to create level 0 dumps. Suggested by: phk MFC after: 3 days Modified: head/sbin/dump/dump.8 Modified: head/sbin/dump/dump.8 ============================================================================== --- head/sbin/dump/dump.8 Fri Jun 14 04:01:08 2019 (r349031) +++ head/sbin/dump/dump.8 Fri Jun 14 06:10:15 2019 (r349032) @@ -29,7 +29,7 @@ .\" @(#)dump.8 8.3 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd June 11, 2018 +.Dd June 13, 2019 .Dt DUMP 8 .Os .Sh NAME @@ -266,6 +266,12 @@ used to update a remote copy of a level 0 dump, since the date changes for each dump. This option sets both dates to the epoch, permitting rsync to be much more efficient when transferring a dump file. +The +.Fl r +option can be used only to create level 0 dumps. +A dump using the +.Fl r +option cannot be used as the basis for a later incremental dump. .It Fl R Be even more rsync-friendly. This option disables the storage of the actual inode access time @@ -277,6 +283,12 @@ The .Fl R option also sets .Fl r . +The +.Fl R +option can be used only to create level 0 dumps. +A dump using the +.Fl R +option cannot be used as the basis for a later incremental dump. .It Fl S Display an estimate of the backup size and the number of tapes required, and exit without actually performing the dump. From owner-svn-src-all@freebsd.org Fri Jun 14 08:24:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CB9D15CA38F; Fri, 14 Jun 2019 08:24:50 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37AFA894F7; Fri, 14 Jun 2019 08:24:49 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D87308D4A154; Fri, 14 Jun 2019 08:24:46 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A1CCFE707B0; Fri, 14 Jun 2019 08:24:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id iEBeZ712i_Mr; Fri, 14 Jun 2019 08:24:44 +0000 (UTC) Received: from [192.168.2.110] (unknown [IPv6:fde9:577b:c1a9:31:2ef0:eeff:fe03:ee34]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 47343E707AE; Fri, 14 Jun 2019 08:24:43 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Luiz Otavio O Souza" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348882 - head/sys/dev/sdhci Date: Fri, 14 Jun 2019 08:24:43 +0000 X-Mailer: MailMate (2.0BETAr6137) Message-ID: In-Reply-To: <201906102150.x5ALo8wL089525@repo.freebsd.org> References: <201906102150.x5ALo8wL089525@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Rspamd-Queue-Id: 37AFA894F7 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-5.72 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zabbadoz.net]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-2.43)[ip: (-8.32), ipnet: 2a01:4f8::/29(-2.06), asn: 24940(-1.76), country: DE(-0.01)]; MX_GOOD(-0.01)[cross.sbone.de]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 08:24:50 -0000 On 10 Jun 2019, at 21:50, Luiz Otavio O Souza wrote: > Author: loos > Date: Mon Jun 10 21:50:07 2019 > New Revision: 348882 > URL: https://svnweb.freebsd.org/changeset/base/348882 > > Log: > Add support for the GPIO SD Card VCC regulator/switch and the GPIO > SD Card > detection pins to the Marvell Xenon SDHCI controller. > > These features are enable by 'vqmmc-supply' and 'cd-gpios' > properties in the > DTS. > > This fixes the SD Card detection on espressobin. Do you have a copy or a reference to such a (working) dts file? Thanks, Bjoern From owner-svn-src-all@freebsd.org Fri Jun 14 10:39:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D24315CCAD7; Fri, 14 Jun 2019 10:39:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E70258CD64; Fri, 14 Jun 2019 10:39:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE25DE9EB; Fri, 14 Jun 2019 10:39:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5EAd5hq081105; Fri, 14 Jun 2019 10:39:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EAd5Y3081104; Fri, 14 Jun 2019 10:39:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201906141039.x5EAd5Y3081104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 14 Jun 2019 10:39: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: r349033 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 349033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E70258CD64 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 10:39:06 -0000 Author: ae Date: Fri Jun 14 10:39:05 2019 New Revision: 349033 URL: https://svnweb.freebsd.org/changeset/base/349033 Log: MFC r348774: Use underscores for internal variable name to avoid conflicts. Modified: stable/12/sys/sys/counter.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/counter.h ============================================================================== --- stable/12/sys/sys/counter.h Fri Jun 14 06:10:15 2019 (r349032) +++ stable/12/sys/sys/counter.h Fri Jun 14 10:39:05 2019 (r349033) @@ -43,23 +43,23 @@ void counter_u64_zero(counter_u64_t); uint64_t counter_u64_fetch(counter_u64_t); #define COUNTER_ARRAY_ALLOC(a, n, wait) do { \ - for (int i = 0; i < (n); i++) \ - (a)[i] = counter_u64_alloc(wait); \ + for (int _i = 0; _i < (n); _i++) \ + (a)[_i] = counter_u64_alloc(wait); \ } while (0) #define COUNTER_ARRAY_FREE(a, n) do { \ - for (int i = 0; i < (n); i++) \ - counter_u64_free((a)[i]); \ + for (int _i = 0; _i < (n); _i++) \ + counter_u64_free((a)[_i]); \ } while (0) #define COUNTER_ARRAY_COPY(a, dstp, n) do { \ - for (int i = 0; i < (n); i++) \ - ((uint64_t *)(dstp))[i] = counter_u64_fetch((a)[i]);\ + for (int _i = 0; _i < (n); _i++) \ + ((uint64_t *)(dstp))[_i] = counter_u64_fetch((a)[_i]);\ } while (0) #define COUNTER_ARRAY_ZERO(a, n) do { \ - for (int i = 0; i < (n); i++) \ - counter_u64_zero((a)[i]); \ + for (int _i = 0; _i < (n); _i++) \ + counter_u64_zero((a)[_i]); \ } while (0) /* From owner-svn-src-all@freebsd.org Fri Jun 14 12:58:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5547815CF6F6; Fri, 14 Jun 2019 12:58:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5906A7B2; Fri, 14 Jun 2019 12:58:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id C1DB93DC6B6; Fri, 14 Jun 2019 22:58:35 +1000 (AEST) Date: Fri, 14 Jun 2019 22:58:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349029 - head/sys/kern In-Reply-To: <201906140109.x5E19Aj9087899@repo.freebsd.org> Message-ID: <20190614214154.I1201@besplex.bde.org> References: <201906140109.x5E19Aj9087899@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=D+Q3ErZj c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=xxwpQsxGIUx3GmqBR10A:9 a=Jt7mtkJ1TXbLOZa2:21 a=2KJrtirBv4LqabpG:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 4A5906A7B2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.988,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 12:58:46 -0000 On Fri, 14 Jun 2019, Alexander Motin wrote: > Log: > Update td_runtime of running thread on each statclock(). > > Normally td_runtime is updated on context switch, but there are some kernel > threads that due to high absolute priority may run for many seconds without > context switches (yes, that is bad, but that is true), which means their > td_runtime was not updated all that time, that made them invisible for top > other then as some general CPU usage. > > MFC after: 1 week > Sponsored by: iXsystems, Inc. This and more is supposed to be done in calcru(). It is also necessary to adjust for the current timeslice. I thought that calcru() was fixed, but the fix seems to be only in my version of FreeBSD-5.2. The bug seems to be in fill_kinfo_proc_only(). calcru() should update td_runtime for all threads in the proc (and sum into rux_rutime), but fill_kinfo_proc_only() uses rux_runtime to initialize ki_runtime before calling calcru(), so sees a stale value. This was broken in r132855 (the initialization of ki_runtime was moved too early as part of a fix for zombies). Using calcru() for its side effect is a bit magic. get_thread_cputime() does this less hackishly for curthread (by adding the timeslice without updating td_runtime), but is broken for other threads (by using the stale td_runtime). td_runtime is unavailable in userland. top and ps can only see ki_runtime which is per-process. Actually, calcru() seems to have the same bug as get_thread_cputime(). This is fixed in my version of FreeBSD-5-2, but is clearly broken in plain FreeBSD-FreeBSD-5.2, and -current seems to be even more broken than plain 5.2 -- it is missing the large comment about this bug that I added in r130858. -current first updates td_runtime for curthread. Then it loops over all threads in the process, but does nothing unless td_incruntime != 0, and when td_incruntime != 0 it updates rux_runtime using the value in td_incruntime, and this value is stale except for curthread. td_runtime is updated in one other place: in rufetchtd(), but this function has the same bug eas everywhere else -- it only updates the runtimes for curthread. Here is my fix for this in FreeBSD-5.2: XX Index: kern_resource.c XX =================================================================== XX RCS file: /home/ncvs/src/sys/kern/kern_resource.c,v XX retrieving revision 1.140 XX diff -u -2 -r1.140 kern_resource.c XX --- kern_resource.c 21 Jun 2004 17:46:27 -0000 1.140 XX @@ -702,18 +720,80 @@ XX struct timeval *ip; XX { XX - struct bintime bt, rt; XX - struct timeval tv; XX + struct bintime bt; XX + struct rusage_ext rux; -current already has most of the infrastructure for this -- I invented rusage_ext partly to fix this problem, and -current has a more sophisticated version of rusage_ext. -current also uses cputicks instead of bintimes. XX struct thread *td; XX - /* {user, system, interrupt, total} {ticks, usec}; previous tu: */ XX - u_int64_t ut, uu, st, su, it, iu, tt, tu, ptu; XX - int problemcase; XX + int bt_valid, proc_locked, sched_locked; XX XX - mtx_assert(&sched_lock, MA_OWNED); XX - /* XXX: why spl-protect ? worst case is an off-by-one report */ XX + proc_locked = mtx_owned(&p->p_mtx); XX + sched_locked = mtx_owned(&sched_lock); XX + if (!proc_locked && !sched_locked) XX + PROC_LOCK(p); XX + if (!sched_locked) XX + mtx_lock_spin(&sched_lock); This also has some restructuring that -current already has in a more sophisticated way. XX + rux = p->p_rux; XX + bt_valid = 0; XX + FOREACH_THREAD_IN_PROC(p, td) { XX + if (TD_IS_RUNNING(td)) { XX + /* XX + * Adjust for the current time slice. This is XX + * important since the adjustment is on the order XX + * of a time quantum, which is much greater than XX + * the precision of binuptime(). XX + */ XX + KASSERT(td->td_oncpu != NOCPU, XX + ("calcru: running thread has no CPU")); XX + if (!bt_valid) { XX + binuptime(&bt); XX + bt_valid = 1; XX + } XX + bintime_sub(&bt, XX + &pcpu_find(td->td_oncpu)->pc_switchtime); XX + if (bt.sec < 0) { XX + printf( XX + "calcru: negative delta-runtime of %jd sec + %jd wsec for pid %d (%s)\n", XX + (intmax_t)bt.sec, bt.frac, XX + p->p_pid, p->p_comm); XX + bt.sec = 0; XX + bt.frac = 0; XX + } XX + bintime_add(&rux.rux_runtime, &bt); XX + } XX + } XX + if (!sched_locked) XX + mtx_unlock_spin(&sched_lock); That is the main part of the fix. It is necessary to loop over all threads in the process. XX + calcru1(p, &rux, up, sp, ip); XX + p->p_rux.rux_uu = rux.rux_uu; XX + p->p_rux.rux_su = rux.rux_su; XX + p->p_rux.rux_iu = rux.rux_iu; XX + if (!proc_locked && !sched_locked) XX + PROC_UNLOCK(p); XX +} XX + XX +void XX +calccru(p, up, sp) XX + struct proc *p; XX + struct timeval *up; XX + struct timeval *sp; XX +{ XX XX - ut = p->p_uticks; XX - st = p->p_sticks; XX - it = p->p_iticks; XX + PROC_LOCK_ASSERT(p, MA_OWNED); XX + calcru1(p, &p->p_crux, up, sp, NULL); XX +} XX XX +static void XX +calcru1(p, ruxp, up, sp, ip) XX + struct proc *p; XX + struct rusage_ext *ruxp; XX + struct timeval *up; XX + struct timeval *sp; XX + struct timeval *ip; XX +{ XX + struct timeval tv; XX + /* {user, system, interrupt, total} {ticks, usec}; previous tu: */ XX + u_int64_t ut, uu, st, su, it, iu, tt, tu, ptu; XX + XX + ut = ruxp->rux_uticks; XX + st = ruxp->rux_sticks; XX + it = ruxp->rux_iticks; XX tt = ut + st + it; XX if (tt == 0) { XX @@ -721,42 +801,20 @@ XX tt = 1; XX } XX - rt = p->p_runtime; XX - problemcase = 0; XX - FOREACH_THREAD_IN_PROC(p, td) { XX - /* XX - * Adjust for the current time slice. This is actually fairly XX - * important since the error here is on the order of a time XX - * quantum, which is much greater than the sampling error. XX - */ XX - if (td == curthread) { XX - binuptime(&bt); XX - bintime_sub(&bt, PCPU_PTR(switchtime)); XX - bintime_add(&rt, &bt); XX - } else if (TD_IS_RUNNING(td)) { XX - /* XX - * XXX: this case should add the difference between XX - * the current time and the switch time as above, XX - * but the switch time is inaccessible, so we can't XX - * do the adjustment and will end up with a wrong XX - * runtime. A previous call with a different XX - * curthread may have obtained a (right or wrong) XX - * runtime that is in advance of ours. Just set a XX - * flag to avoid warning about this known problem. XX - */ XX - problemcase = 1; This is the large comment about the bug. It was broken by removing it in r136152. r136152 was mostly by me to introduce rusage_ext, but it seems to have been incomplete -- it even removed the adjustment of td_runtime for curthread. The latter wasn't restored until 7 years later in r244188. XX - } XX - } XX - bintime2timeval(&rt, &tv); XX + bintime2timeval(&ruxp->rux_runtime, &tv); XX tu = (u_int64_t)tv.tv_sec * 1000000 + tv.tv_usec; XX - ptu = p->p_uu + p->p_su + p->p_iu; XX + ptu = ruxp->rux_uu + ruxp->rux_su + ruxp->rux_iu; XX if (tu < ptu) { XX - if (!problemcase) XX - printf( XX -"calcru: runtime went backwards from %ju usec to %ju usec for pid %d (%s)\n", XX - (uintmax_t)ptu, (uintmax_t)tu, p->p_pid, p->p_comm); XX + printf( XX +"calcru1: runtime went backwards from %ju usec (uu = %ju, su = %ju, iu = %ju) to %ju usec for pid %d (%s)\n", XX + (uintmax_t)ptu, XX + (uintmax_t)ruxp->rux_uu, (uintmax_t)ruxp->rux_su, XX + (uintmax_t)ruxp->rux_iu, XX + (uintmax_t)tu, p->p_pid, p->p_comm); XX tu = ptu; XX } XX if ((int64_t)tu < 0) { XX - printf("calcru: negative runtime of %jd usec for pid %d (%s)\n", XX + /* XXX p is only needed to print these diagnostics. */ XX + printf( XX + "calcru1: negative runtime of %jd usec for pid %d (%s)\n", XX (intmax_t)tu, p->p_pid, p->p_comm); XX tu = ptu; -current still has many bugs that let the times go backwards. I don't remember if 'problemcase' gave negative times, but it still occurs and gives garbage times. Userland could do a related negative times check: assert(ki_runtime >= sum of user, sys and interrupt times) often fails because ki_runtime uses a stale rux_runtime time while the sum equals the non-stale rux_runtime (after scaling). Bruce From owner-svn-src-all@freebsd.org Fri Jun 14 13:46:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48DAF15D043C; Fri, 14 Jun 2019 13:46:28 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-xc32.google.com (mail-yw1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCB486BFBE; Fri, 14 Jun 2019 13:46:27 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw1-xc32.google.com with SMTP id k128so1128932ywf.2; Fri, 14 Jun 2019 06:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Cz9AULQQIkEWfSLw7ckiL50Vng161AsoGU5KIkEZ2pE=; b=e/Om5VgARnfq5EnYQbYtJykZ104gIOmHogEJC/F5e9hmxXZ+3W1ZS0x+x51CbI1O9M h89NbAyBbg2mgaEEM00Jt8pFWy/crriMJQHXfuABGBfXmwgsBuFZ/QkrCUW6yET7HfU2 BFakGzJfcHiKu82gv+G0RapnZDT06rU1V8iYm38iMEzrX9liQPPJdxv6n4iz1qMWfVv9 S0VIZ1WVYTiMH+9FQ2IPwt0J8Lhz8tbRQ/FPxpMeTN1x/ewGNBRf5zx29aikTcTabqWh Mehyzvtzou+BDAsoigxmuuWGov1G4hqrEUd+kDZ5TZGyEu4jnwWYEpDBfE87Lh5VK4Om b9eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Cz9AULQQIkEWfSLw7ckiL50Vng161AsoGU5KIkEZ2pE=; b=Cqlq+XrLEk29fFCbTB/jBChG5BrK4K/tHDdlTd4vpAnHd+aCGR1E/wYqqze8+oeTIm H2X/ICMvyoMiTnw4tmdYnhr6/sSrgw3WWhq8rIjbNYAG+1q++QdYWMOpUFNGx2O7WlI1 y2e/+N199c87zp+qLONbIPkQJtyuLDgRmKOoWuZaPCK7TWqkvVzfwpK9DHQXyKXlVlDY MljfYAldqL3OSE2/Q8dUiX7BYqjnFaO5mRWZI+6UEFDBsEkELxgMtrE+GQcJ8BsQ5vrZ m5vkcPJjNdUprn7eRfxBaMTRLH7nLBtauRz+Uti63xVqouCmuyrHelpD+i16rasLW9kJ lrpA== X-Gm-Message-State: APjAAAWUKzwl7WZphezmzkMQBfva0hUgYvMwF0N9zmPd4wDvnvs3+zbb H/ldl9OcBA75/tYhQcQyAeBLntPFvZs= X-Google-Smtp-Source: APXvYqzURJykRZjWZcubkiAHE8rjg3RtRkEJrPWQmZiqM2d9gquHfTgDQYZrtgrJGlkCho6RNHWLUQ== X-Received: by 2002:a81:2fca:: with SMTP id v193mr49508918ywv.296.1560519986798; Fri, 14 Jun 2019 06:46:26 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id r63sm777464ywr.53.2019.06.14.06.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 06:46:26 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r349029 - head/sys/kern To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906140109.x5E19Aj9087899@repo.freebsd.org> <20190614214154.I1201@besplex.bde.org> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp/Z+lpoPM/1cDYLn8Flv mI/c40MhUZh345DA4jYWWaZNjQHUWVQ1fPf595vdVVMPT/abE8E5DaF6fSkRmqFTmfYRkfbt 3ytU8NdUapDcJVY7cEP2nJBVNZPnOIObR/ZIgSxjjrG5o34yXoqeup8JvwEv+/NylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <399ec4d3-6548-1145-4dea-f0b7850f8381@FreeBSD.org> Date: Fri, 14 Jun 2019 09:46:25 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190614214154.I1201@besplex.bde.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CCB486BFBE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 13:46:28 -0000 Hi Bruce, On 14.06.2019 08:58, Bruce Evans wrote: > On Fri, 14 Jun 2019, Alexander Motin wrote: > >> Log: >>  Update td_runtime of running thread on each statclock(). >> >>  Normally td_runtime is updated on context switch, but there are some >> kernel >>  threads that due to high absolute priority may run for many seconds >> without >>  context switches (yes, that is bad, but that is true), which means their >>  td_runtime was not updated all that time, that made them invisible >> for top >>  other then as some general CPU usage. >> >>  MFC after:    1 week >>  Sponsored by:    iXsystems, Inc. > > This and more is supposed to be done in calcru().  It is also necessary to > adjust for the current timeslice. > > I thought that calcru() was fixed, but the fix seems to be only in my > version of FreeBSD-5.2. > > The bug seems to be in fill_kinfo_proc_only().  calcru() should update > td_runtime for all threads in the proc (and sum into rux_rutime), ... > td_runtime is updated in one other place: in rufetchtd(), but this function > has the same bug eas everywhere else -- it only updates the runtimes for > curthread. I think it has very simple reason -- now each CPU measures CPU time in its own time units, since cpu_ticks() are not synchronized and can not be compared between different CPUs, so to update td_runtime of another running thread you would need to switch to that CPU, or somehow else get the value (cache it periodically?). I see in your code you are using binuptime() calls instead of cpu_ticks(). I suppose it fixes many problems, since it is globally synchronous, but there was a reason why cpu_ticks() exists -- it is cheaper on system non-synchronized TSC. May be we could reconsider that, giving up on old platforms, expecting all new one to not have this problem, but for right now I think my patch is good enough to make top sane again, that annoyed me for years. -- Alexander Motin From owner-svn-src-all@freebsd.org Fri Jun 14 14:25:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3475215D0D88; Fri, 14 Jun 2019 14:25:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3A7996D4AE; Fri, 14 Jun 2019 14:25:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 301333DBD9D; Sat, 15 Jun 2019 00:25:05 +1000 (AEST) Date: Sat, 15 Jun 2019 00:25:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349029 - head/sys/kern In-Reply-To: <399ec4d3-6548-1145-4dea-f0b7850f8381@FreeBSD.org> Message-ID: <20190614235433.H1624@besplex.bde.org> References: <201906140109.x5E19Aj9087899@repo.freebsd.org> <20190614214154.I1201@besplex.bde.org> <399ec4d3-6548-1145-4dea-f0b7850f8381@FreeBSD.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=nlC_4_pT8q9DhB4Ho9EA:9 a=-xne-0-MPzg3U2qvO0wA:9 a=45ClL6m2LaAA:10 X-Rspamd-Queue-Id: 3A7996D4AE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0] Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 14:25:10 -0000 On Fri, 14 Jun 2019, Alexander Motin wrote: > On 14.06.2019 08:58, Bruce Evans wrote: >> On Fri, 14 Jun 2019, Alexander Motin wrote: >> >>> Log: >>> =C2=A0Update td_runtime of running thread on each statclock(). >>> >>> =C2=A0Normally td_runtime is updated on context switch, but there are s= ome >>> kernel >>> =C2=A0threads that due to high absolute priority may run for many secon= ds >>> without >>> =C2=A0context switches (yes, that is bad, but that is true), which mean= s their >>> =C2=A0td_runtime was not updated all that time, that made them invisibl= e >>> for top >>> =C2=A0other then as some general CPU usage. >>> >>> =C2=A0MFC after:=C2=A0=C2=A0=C2=A0 1 week >>> =C2=A0Sponsored by:=C2=A0=C2=A0=C2=A0 iXsystems, Inc. >> >> This and more is supposed to be done in calcru().=C2=A0 It is also neces= sary to >> adjust for the current timeslice. >> >> I thought that calcru() was fixed, but the fix seems to be only in my >> version of FreeBSD-5.2. >> >> The bug seems to be in fill_kinfo_proc_only().=C2=A0 calcru() should upd= ate >> td_runtime for all threads in the proc (and sum into rux_rutime), > > ... > >> td_runtime is updated in one other place: in rufetchtd(), but this funct= ion >> has the same bug eas everywhere else -- it only updates the runtimes for >> curthread. > > I think it has very simple reason -- now each CPU measures CPU time in > its own time units, since cpu_ticks() are not synchronized and can not > be compared between different CPUs, so to update td_runtime of another > running thread you would need to switch to that CPU, or somehow else get > the value (cache it periodically?). I forgot about that bugfeature in the cpu ticker. > I see in your code you are using binuptime() calls instead of > cpu_ticks(). I suppose it fixes many problems, since it is globally > synchronous, but there was a reason why cpu_ticks() exists -- it is > cheaper on system non-synchronized TSC. May be we could reconsider > that, giving up on old platforms, expecting all new one to not have this > problem, but for right now I think my patch is good enough to make top > sane again, that annoyed me for years. It was written before the cpu ticker existed. cpu_ticks() exists because bintime() is too slow if the timecounter hardwar= e is too slow. i8254 timecounter hardware takes about 5 usec, ACPI timer about 1 usec, and HPET many hundreds of nsec. And of course, non-synchronized TSCs make the TSC unusable as a timecounter, so require use of a slow timecounter. Some systems don't have a TSC, so they use a timecounter for the cpu ticker anyway. There are many other bugs in the cpu ticker which only became not too bad when P-state invariant TSCs became common. The largest one is that all ticks are scaled at the current cpu ticker frequency. If synchronized P-state invariant TSCs are available, then the cpu ticker reduces to a micro-optimization. My code is used mainly on UP systems with TSC timecounters. I don't have any systems without a TSC, and UP avoids the problems of synchronization, and not throttling the CPU avoids the problem of the frequency changing, and I never noticed the micro-pessimization of using bintime() for the cpu ticker. I never noticed the problem in -current either, though I use my version of SCHED_4BSD with lots of tuning to reduce context switches. The tuning ofte= n results in threads running for a full quantum (100 msec) before switching, but I never noticed threads not switching for several seconds. Bruce From owner-svn-src-all@freebsd.org Fri Jun 14 15:09:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C614015D17BA; Fri, 14 Jun 2019 15:09:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 684E36E7F8; Fri, 14 Jun 2019 15:09:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 415BE1974F; Fri, 14 Jun 2019 15:09:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5EF99gY018395; Fri, 14 Jun 2019 15:09:09 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EF99Ye018394; Fri, 14 Jun 2019 15:09:09 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201906141509.x5EF99Ye018394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 14 Jun 2019 15:09:09 +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: r349034 - stable/12/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-12 X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/cmd/zpool X-SVN-Commit-Revision: 349034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 684E36E7F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 15:09:10 -0000 Author: allanjude Date: Fri Jun 14 15:09:08 2019 New Revision: 349034 URL: https://svnweb.freebsd.org/changeset/base/349034 Log: MFC r348714: zpool.8: the comment property is not read-only The comment property was listed in the man page twice, once under the list of read-only properties, and again (correctly), under the list of user editable properties. PR: 238355 Reported by: Michael Zuo Sponsored by: Klara Systems Modified: stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jun 14 10:39:05 2019 (r349033) +++ stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Jun 14 15:09:08 2019 (r349034) @@ -604,10 +604,6 @@ Amount of storage space within the pool that has been .It Sy capacity Percentage of pool space used. This property can also be referred to by its shortened column name, "cap". -.It Sy comment -A text string consisting of printable ASCII characters that will be stored -such that it is available even if the pool becomes faulted. An administrator -can provide additional information about a pool using this property. .It Sy dedupratio The deduplication ratio specified for a pool, expressed as a multiplier. For example, a From owner-svn-src-all@freebsd.org Fri Jun 14 17:09:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F29DC15ABE0F; Fri, 14 Jun 2019 17:09:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9539471DBC; Fri, 14 Jun 2019 17:09: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 6783B1AB96; Fri, 14 Jun 2019 17:09: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 x5EH9eWa079445; Fri, 14 Jun 2019 17:09:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EH9eka079444; Fri, 14 Jun 2019 17:09:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906141709.x5EH9eka079444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Jun 2019 17:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349035 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 349035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9539471DBC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 17:09:41 -0000 Author: mav Date: Fri Jun 14 17:09:39 2019 New Revision: 349035 URL: https://svnweb.freebsd.org/changeset/base/349035 Log: Properly align struct multilist_sublist to cache line. Manual Illumos alignment does not fit us due to different kmutex_t size. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Fri Jun 14 15:09:08 2019 (r349034) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h Fri Jun 14 17:09:39 2019 (r349035) @@ -44,11 +44,10 @@ struct multilist_sublist { */ list_t mls_list; /* - * Pad to cache line (64 bytes), in an effort to try and prevent - * cache line contention. + * Pad to cache line, in an effort to try and prevent cache line + * contention. */ - uint8_t mls_pad[24]; -}; +} __aligned(CACHE_LINE_SIZE); struct multilist { /* From owner-svn-src-all@freebsd.org Fri Jun 14 19:57:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 200CC15B001E; Fri, 14 Jun 2019 19:57:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3AEC76CA8; Fri, 14 Jun 2019 19:57: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 5BB3F1C7EF; Fri, 14 Jun 2019 19:57:33 +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 x5EJvXVe065278; Fri, 14 Jun 2019 19:57:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EJvXC7065277; Fri, 14 Jun 2019 19:57:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906141957.x5EJvXC7065277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Jun 2019 19:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349039 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 349039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B3AEC76CA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 19:57:34 -0000 Author: mav Date: Fri Jun 14 19:57:32 2019 New Revision: 349039 URL: https://svnweb.freebsd.org/changeset/base/349039 Log: Alike to ZoL disable metaslab allocation tracing code. It is too generous to collect in production debug traces that can only be read with kernel debugger. Illumos includes special code in their mdb debugger to read it, we don't. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Jun 14 19:47:48 2019 (r349038) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Jun 14 19:57:32 2019 (r349039) @@ -259,7 +259,9 @@ int zfs_metaslab_switch_threshold = 2; * Internal switch to enable/disable the metaslab allocation tracing * facility. */ +#ifdef _METASLAB_TRACING boolean_t metaslab_trace_enabled = B_TRUE; +#endif /* * Maximum entries that the metaslab allocation tracing facility will keep @@ -269,7 +271,9 @@ boolean_t metaslab_trace_enabled = B_TRUE; * to every exceed this value. In debug mode, the system will panic if this * limit is ever reached allowing for further investigation. */ +#ifdef _METASLAB_TRACING uint64_t metaslab_trace_max_entries = 5000; +#endif static uint64_t metaslab_weight(metaslab_t *); static void metaslab_set_fragmentation(metaslab_t *); @@ -277,8 +281,9 @@ static void metaslab_free_impl(vdev_t *, uint64_t, uin static void metaslab_check_free_impl(vdev_t *, uint64_t, uint64_t); static void metaslab_passivate(metaslab_t *msp, uint64_t weight); static uint64_t metaslab_weight_from_range_tree(metaslab_t *msp); - +#ifdef _METASLAB_TRACING kmem_cache_t *metaslab_alloc_trace_cache; +#endif /* * ========================================================================== @@ -2797,6 +2802,7 @@ metaslab_distance(metaslab_t *msp, dva_t *dva) * Metaslab allocation tracing facility * ========================================================================== */ +#ifdef _METASLAB_TRACING kstat_t *metaslab_trace_ksp; kstat_named_t metaslab_trace_over_limit; @@ -2900,6 +2906,32 @@ metaslab_trace_fini(zio_alloc_list_t *zal) list_destroy(&zal->zal_list); zal->zal_size = 0; } + +#else + +#define metaslab_trace_add(zal, mg, msp, psize, id, off, alloc) + +void +metaslab_alloc_trace_init(void) +{ +} + +void +metaslab_alloc_trace_fini(void) +{ +} + +void +metaslab_trace_init(zio_alloc_list_t *zal) +{ +} + +void +metaslab_trace_fini(zio_alloc_list_t *zal) +{ +} + +#endif /* _METASLAB_TRACING */ /* * ========================================================================== From owner-svn-src-all@freebsd.org Fri Jun 14 20:04:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E16215B0264; Fri, 14 Jun 2019 20:04:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04AE4770E5; Fri, 14 Jun 2019 20:04:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D04231C99D; Fri, 14 Jun 2019 20:04:28 +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 x5EK4S3F070486; Fri, 14 Jun 2019 20:04:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EK4SeW070485; Fri, 14 Jun 2019 20:04:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201906142004.x5EK4SeW070485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 14 Jun 2019 20:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349040 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 349040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 04AE4770E5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 20:04:29 -0000 Author: mav Date: Fri Jun 14 20:04:28 2019 New Revision: 349040 URL: https://svnweb.freebsd.org/changeset/base/349040 Log: Minimize aggsum_compare(&arc_size, arc_c) calls. For busy ARC situation when arc_size close to arc_c is desired. But then it is quite likely that aggsum_compare(&arc_size, arc_c) will need to flush per-CPU buckets to find exact comparison result. Doing that often in a hot path penalizes whole idea of aggsum usage there, since it replaces few simple atomic additions with dozens of lock acquisitions. Replacing aggsum_compare() with aggsum_upper_bound() in code increasing arc_p when ARC is growing (arc_size < arc_c) according to PMC profiles allows to save ~5% of CPU time in aggsum code during sequential write to 12 ZVOLs with 16KB block size on large dual-socket system. I suppose there some minor arc_p behavior change due to lower precision of the new code, but I don't think it is a big deal, since it should affect only very small window in time (aggsum buckets are flushed every second) and in ARC size (buckets are limited to 10 average ARC blocks per CPU). MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 14 19:57:32 2019 (r349039) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 14 20:04:28 2019 (r349040) @@ -5269,7 +5269,7 @@ arc_get_data_impl(arc_buf_hdr_t *hdr, uint64_t size, v * If we are growing the cache, and we are adding anonymous * data, and we have outgrown arc_p, update arc_p */ - if (aggsum_compare(&arc_size, arc_c) < 0 && + if (aggsum_upper_bound(&arc_size) < arc_c && hdr->b_l1hdr.b_state == arc_anon && (refcount_count(&arc_anon->arcs_size) + refcount_count(&arc_mru->arcs_size) > arc_p)) From owner-svn-src-all@freebsd.org Fri Jun 14 20:35:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB9815B0D8C; Fri, 14 Jun 2019 20:35:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9265F80543; Fri, 14 Jun 2019 20:35:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B8C31CEAB; Fri, 14 Jun 2019 20:35:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5EKZcVA086343; Fri, 14 Jun 2019 20:35:38 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EKZcwY086342; Fri, 14 Jun 2019 20:35:38 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201906142035.x5EKZcwY086342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 14 Jun 2019 20:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349041 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 349041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9265F80543 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 20:35:39 -0000 Author: asomers Date: Fri Jun 14 20:35:37 2019 New Revision: 349041 URL: https://svnweb.freebsd.org/changeset/base/349041 Log: open(2): fix the description of O_FSYNC The man page claims that with O_FSYNC (aka O_SYNC) the kernel will not cache written data. However, that's not true. Nor does POSIX require it. Perhaps it was true when that section of the man page was written in r69336 (I haven't checked). But it's not true now. Now the effect is simply that writes are sent to disk immediately and synchronously, but they're still cached. See also: https://pubs.opengroup.org/onlinepubs/9699919799/ See also: ffs_write in sys/ufs/ffs/ffs_vnops.c Reviewed by: cem MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20641 Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Fri Jun 14 20:04:28 2019 (r349040) +++ head/lib/libc/sys/open.2 Fri Jun 14 20:35:37 2019 (r349041) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd June 14, 2019 .Dt OPEN 2 .Os .Sh NAME @@ -224,10 +224,7 @@ The descriptor remains in non-blocking mode for subseq If .Dv O_FSYNC is used in the mask, all writes will -immediately be written to disk, -the kernel will not cache written data -and all writes on the descriptor will not return until -the data to be written completes. +immediately and synchronously be written to disk. .Pp .Dv O_SYNC is a synonym for From owner-svn-src-all@freebsd.org Fri Jun 14 22:06:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD7F415B2A7E; Fri, 14 Jun 2019 22:06:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 616C182E3E; Fri, 14 Jun 2019 22:06:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3492C1DDE6; Fri, 14 Jun 2019 22:06:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5EM6i2i031199; Fri, 14 Jun 2019 22:06:44 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5EM6i9W031198; Fri, 14 Jun 2019 22:06:44 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906142206.x5EM6i9W031198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 14 Jun 2019 22:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349042 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 616C182E3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 22:06:44 -0000 Author: alc Date: Fri Jun 14 22:06:43 2019 New Revision: 349042 URL: https://svnweb.freebsd.org/changeset/base/349042 Log: Batch the TLB invalidations that are performed by pmap_protect() rather than performing them one at a time. MFC after: 10 days Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Jun 14 20:35:37 2019 (r349041) +++ head/sys/arm64/arm64/pmap.c Fri Jun 14 22:06:43 2019 (r349042) @@ -2791,8 +2791,15 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t for (l3p = pmap_l2_to_l3(l2, sva); sva != va_next; l3p++, sva += L3_SIZE) { l3 = pmap_load(l3p); - if (!pmap_l3_valid(l3)) + if (!pmap_l3_valid(l3)) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } continue; + } + if (va == va_next) + va = sva; nbits = 0; if ((prot & VM_PROT_WRITE) == 0) { @@ -2807,9 +2814,9 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t nbits |= ATTR_XN; pmap_set(l3p, nbits); - /* XXX: Use pmap_invalidate_range */ - pmap_invalidate_page(pmap, sva); } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } PMAP_UNLOCK(pmap); } From owner-svn-src-all@freebsd.org Fri Jun 14 23:53:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E32615B47C3; Fri, 14 Jun 2019 23:53:20 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBC6E85783; Fri, 14 Jun 2019 23:53:19 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0BA91F03C; Fri, 14 Jun 2019 23:53:19 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5ENrJYp088580; Fri, 14 Jun 2019 23:53:19 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5ENrJhF088579; Fri, 14 Jun 2019 23:53:19 GMT (envelope-from grog@FreeBSD.org) Message-Id: <201906142353.x5ENrJhF088579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Fri, 14 Jun 2019 23:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349043 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 349043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DBC6E85783 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 23:53:20 -0000 Author: grog Date: Fri Jun 14 23:53:19 2019 New Revision: 349043 URL: https://svnweb.freebsd.org/changeset/base/349043 Log: Edvard Hagerup Grieg parses as given name, mother's maiden name, surname Modified: head/usr.bin/calendar/calendars/calendar.birthday Modified: head/usr.bin/calendar/calendars/calendar.birthday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.birthday Fri Jun 14 22:06:43 2019 (r349042) +++ head/usr.bin/calendar/calendars/calendar.birthday Fri Jun 14 23:53:19 2019 (r349043) @@ -161,7 +161,7 @@ 06/07 Alan Mathison Turing died, 1954 06/08 Frank Lloyd Wright born in Richland Center, Wisconsin, 1867 06/13 Alexander the Great dies (323BC) -06/15 Edward (Edvard Hagerup) Grieg born in Bergen, Norway, 1843 +06/15 Edvard Hagerup Grieg born in Bergen, Norway, 1843 06/16 Hammurabi the Great dies, Babylon, 1686 BC 06/18 M.C. Escher born, 1898 06/19 FreeBSD project born, 1993 From owner-svn-src-all@freebsd.org Sat Jun 15 00:47:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F3F015B5972; Sat, 15 Jun 2019 00:47:40 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A20A386B85; Sat, 15 Jun 2019 00:47:39 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 778341F8A3; Sat, 15 Jun 2019 00:47:39 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F0ldnP014740; Sat, 15 Jun 2019 00:47:39 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F0ld3V014739; Sat, 15 Jun 2019 00:47:39 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201906150047.x5F0ld3V014739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Sat, 15 Jun 2019 00:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349044 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: julian X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 349044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A20A386B85 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 00:47:40 -0000 Author: julian Date: Sat Jun 15 00:47:39 2019 New Revision: 349044 URL: https://svnweb.freebsd.org/changeset/base/349044 Log: Lightly hide the 'var' inside the macros to read the arm special registers. I just happenned to have 3rd party code using 'var' as the output variable which drew my attention to this. variables defined inside macros should be prefixed to avoid getting shadowed varable wanrings from clang. Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Jun 14 23:53:19 2019 (r349043) +++ head/sys/arm64/include/armreg.h Sat Jun 15 00:47:39 2019 (r349044) @@ -36,12 +36,12 @@ #define INSN_SIZE 4 #define READ_SPECIALREG(reg) \ -({ uint64_t val; \ - __asm __volatile("mrs %0, " __STRING(reg) : "=&r" (val)); \ - val; \ +({ uint64_t _val; \ + __asm __volatile("mrs %0, " __STRING(reg) : "=&r" (_val)); \ + _val; \ }) -#define WRITE_SPECIALREG(reg, val) \ - __asm __volatile("msr " __STRING(reg) ", %0" : : "r"((uint64_t)val)) +#define WRITE_SPECIALREG(reg, _val) \ + __asm __volatile("msr " __STRING(reg) ", %0" : : "r"((uint64_t)_val)) /* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ #define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ From owner-svn-src-all@freebsd.org Sat Jun 15 01:27:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F53D15B7BE3; Sat, 15 Jun 2019 01:27:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D775F882CE; Sat, 15 Jun 2019 01:27:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1F8D1FF84; Sat, 15 Jun 2019 01:27:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F1RnTo036011; Sat, 15 Jun 2019 01:27:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F1Rnrk036010; Sat, 15 Jun 2019 01:27:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906150127.x5F1Rnrk036010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 15 Jun 2019 01:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r349045 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 349045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D775F882CE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 01:27:50 -0000 Author: gjb Date: Sat Jun 15 01:27:49 2019 New Revision: 349045 URL: https://svnweb.freebsd.org/changeset/base/349045 Log: Thaw stable/11 after releng/11.3 has branched. Committers are requested to excercise caution for the duration of the 11.3-RELEASE cycle, especially regarding changes that are eligible (or proposed) for MFC to releng/11.3. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Jun 15 00:47:39 2019 (r349044) +++ svnadmin/conf/approvers Sat Jun 15 01:27:49 2019 (r349045) @@ -18,7 +18,7 @@ # #^head/ re #^stable/12/ re -^stable/11/ re +#^stable/11/ re ^release/ re ^releng/12.0/ (security-officer|so) ^releng/11.3/ re From owner-svn-src-all@freebsd.org Sat Jun 15 04:30:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 188B615BB488; Sat, 15 Jun 2019 04:30:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A561E8D057; Sat, 15 Jun 2019 04:30:13 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B34521F04; Sat, 15 Jun 2019 04:30:13 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F4UDOD031216; Sat, 15 Jun 2019 04:30:13 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F4UDVX031215; Sat, 15 Jun 2019 04:30:13 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906150430.x5F4UDVX031215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sat, 15 Jun 2019 04:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349046 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A561E8D057 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 04:30:14 -0000 Author: dougm Date: Sat Jun 15 04:30:13 2019 New Revision: 349046 URL: https://svnweb.freebsd.org/changeset/base/349046 Log: Critical comments were lost in r349203. This patch seeks to restore the lost information in new comments. Reported by: alc Reviewed by: alc Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20632 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jun 15 01:27:49 2019 (r349045) +++ head/sys/vm/vm_map.c Sat Jun 15 04:30:13 2019 (r349046) @@ -2186,17 +2186,22 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, VM_MAP_ASSERT_LOCKED(map); KASSERT(entry->end > start && entry->start < start, ("_vm_map_clip_start: invalid clip of entry %p", entry)); + vm_map_simplify_entry(map, entry); /* - * Split off the front portion -- note that we must insert the new - * entry BEFORE this one, so that this entry has the specified - * starting address. + * Create a backing object now, if none exists, so that more individual + * objects won't be created after the map entry is split. */ - vm_map_simplify_entry(map, entry); vm_map_entry_charge_object(map, entry); + + /* Clone the entry. */ new_entry = vm_map_entry_create(map); *new_entry = *entry; + /* + * Split off the front portion. Insert the new entry BEFORE this one, + * so that this entry has the specified starting address. + */ new_entry->end = start; entry->offset += (start - entry->start); entry->start = start; @@ -2244,14 +2249,20 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v KASSERT(entry->start < end && entry->end > end, ("_vm_map_clip_end: invalid clip of entry %p", entry)); - /* - * Create a new entry and insert it AFTER the specified entry + * Create a backing object now, if none exists, so that more individual + * objects won't be created after the map entry is split. */ vm_map_entry_charge_object(map, entry); + + /* Clone the entry. */ new_entry = vm_map_entry_create(map); *new_entry = *entry; + /* + * Split off the back portion. Insert the new entry AFTER this one, + * so that this entry has the specified ending address. + */ new_entry->start = entry->end = end; new_entry->offset += (end - entry->start); if (new_entry->cred != NULL) From owner-svn-src-all@freebsd.org Sat Jun 15 05:30:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5BEC15BC78A for ; Sat, 15 Jun 2019 05:30:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw1-xc2a.google.com (mail-yw1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 448D68EA9B for ; Sat, 15 Jun 2019 05:30:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw1-xc2a.google.com with SMTP id a11so2083506ywc.1 for ; Fri, 14 Jun 2019 22:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RZOG7jW1CErgGwaGRMSLroVshSPVet3qOk+9l7YUpf0=; b=TI+4R/WWptlrRVkmvGM2WQcF4yBwPtMosuWXK4SH1ItLh+WArmiCWAoC3E5tfvF8rd T4sM4c/+D8w1zu1ExPfs8j1J1Mzc5XAtSDQC+ymizChgJmCoXp28yS9+FEN3C+jyaWuj TnkJpii6cjBiujxMgkGUOXfOhNKhlokxh3b/Np2T9/50Ct58AS1p6tbcG0n0soT5q5kY FwIqaBFn0ourMGDno6hfZsqUxV0cOo/3dgHunqaH4EChwLrrh5wQkiWCZcgJxC9u4HP4 con805YEb1ueKtgGey2FodiODGEBKrp3KKeDZ9KA4OuEuxvrS+ItaHDuFeULbh88KYVc mCjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RZOG7jW1CErgGwaGRMSLroVshSPVet3qOk+9l7YUpf0=; b=Ai/QXutSpwAxfWsLvU1TMm8CZ80Tq4zfUpt87dcGA939Xp5BFiPDn19rt5dxFWqNcv sb/Lg7u/zAsl2ieVZKQO3DMK3MFTjUKESL1C0Z/a0ZZktzTFdZBhiEW/uu1HiqpoD87j yco5uymXQPGDUYqB8b5SMLOOsxi3XXf2BuDmBE9CWiUSDmFdnNWQBim9rJDKEvzWxHuQ u4VUQyjeNES57Yffk3DB85LdCQgh2vVlkZjv/aMnB6vQf45azxBOgKK7lO0mzwTTdsMA PM1TCC4/tREv4f5BHTg5N3vfJHowO6lUQXGGmP5Q5OQS6YH0cus5Sy7MDcac2JNaHFrF I5PQ== X-Gm-Message-State: APjAAAUqMcN67im0pDPdnMGicd2Zi2w8MUFGcYe6BBxfaeHDlDR0/6Um qdl2PMiGuEsMhB+x6oASNkmutzAbB4J7k3TU6b3mq6PJtJ0= X-Google-Smtp-Source: APXvYqzzJtQnCybgWGZCKITg6hALyGeUhS4Si5eXXiRneK1KoX/7W0be9mNO3HB3S49N2BjjkwQ9iPj7sf2+IS9WxRs= X-Received: by 2002:a81:7d07:: with SMTP id y7mr6938813ywc.377.1560576658426; Fri, 14 Jun 2019 22:30:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:4a86:0:0:0:0:0 with HTTP; Fri, 14 Jun 2019 22:30:57 -0700 (PDT) In-Reply-To: <201906150430.x5F4UDVX031215@repo.freebsd.org> References: <201906150430.x5F4UDVX031215@repo.freebsd.org> From: Oliver Pinter Date: Sat, 15 Jun 2019 07:30:57 +0200 Message-ID: Subject: Re: svn commit: r349046 - head/sys/vm To: Doug Moore Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 448D68EA9B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 05:31:00 -0000 On Saturday, June 15, 2019, Doug Moore wrote: > Author: dougm > Date: Sat Jun 15 04:30:13 2019 > New Revision: 349046 > URL: https://svnweb.freebsd.org/changeset/base/349046 > > Log: > Critical comments were lost in r349203. This patch seeks to restore > the lost information in new comments. > > Reported by: alc > Reviewed by: alc > Approved by: kib (mentor) > Differential Revision: https://reviews.freebsd.org/D20632 > > Modified: > head/sys/vm/vm_map.c > > Modified: head/sys/vm/vm_map.c > ============================================================ > ================== > --- head/sys/vm/vm_map.c Sat Jun 15 01:27:49 2019 (r349045) > +++ head/sys/vm/vm_map.c Sat Jun 15 04:30:13 2019 (r349046) > @@ -2186,17 +2186,22 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t > entry, > VM_MAP_ASSERT_LOCKED(map); > KASSERT(entry->end > start && entry->start < start, > ("_vm_map_clip_start: invalid clip of entry %p", entry)); > + vm_map_simplify_entry(map, entry); Hi! This isn't just comment. > > /* > - * Split off the front portion -- note that we must insert the new > - * entry BEFORE this one, so that this entry has the specified > - * starting address. > + * Create a backing object now, if none exists, so that more > individual > + * objects won't be created after the map entry is split. > */ > - vm_map_simplify_entry(map, entry); > vm_map_entry_charge_object(map, entry); > + > + /* Clone the entry. */ > new_entry = vm_map_entry_create(map); > *new_entry = *entry; > > + /* > + * Split off the front portion. Insert the new entry BEFORE this > one, > + * so that this entry has the specified starting address. > + */ > new_entry->end = start; > entry->offset += (start - entry->start); > entry->start = start; > @@ -2244,14 +2249,20 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t > entry, v > KASSERT(entry->start < end && entry->end > end, > ("_vm_map_clip_end: invalid clip of entry %p", entry)); > > - > /* > - * Create a new entry and insert it AFTER the specified entry > + * Create a backing object now, if none exists, so that more > individual > + * objects won't be created after the map entry is split. > */ > vm_map_entry_charge_object(map, entry); > + > + /* Clone the entry. */ > new_entry = vm_map_entry_create(map); > *new_entry = *entry; > > + /* > + * Split off the back portion. Insert the new entry AFTER this > one, > + * so that this entry has the specified ending address. > + */ > new_entry->start = entry->end = end; > new_entry->offset += (end - entry->start); > if (new_entry->cred != NULL) > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Sat Jun 15 05:44:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0821115BCC5B; Sat, 15 Jun 2019 05:44:54 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFCB8F17F; Sat, 15 Jun 2019 05:44:53 +0000 (UTC) (envelope-from unkadoug@gmail.com) Received: by mail-oi1-x236.google.com with SMTP id g7so3517598oia.8; Fri, 14 Jun 2019 22:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=X+Wojb+5EQe9Hu8Aykaa6blD1gyJPIkWCeCPNX6DwCE=; b=ozD1KyKlKrW3hW26fAkwaR/fEKUfDwTRNn6LzIWyenKYDUft1QNExSIgo0MsgU0Bsu dat1jUI/kyUO6jL6Qpt+vjYg65elsBEKmienZhQJZyqYheQER5YsXQBAD3YLfTZrA4WD P4A+dQ2H3KMqv6uYWSugVnsivl+HcXvK6JYHBAC4kiRp8gC+oXstYSVwFfDBZlLalvql TDWLJhCkSlR7jKvF5FnvlNY0xZBGlbzzCXrdH0c4xd82PA4t72Lk2E3B5MNPfNsetHbd 0OK50APgiGvPgX78jz8GXqomiqPDzk+mayEaKXxQRKi4lobjJosoA0L+22k7Y2bcBgkA 3aJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=X+Wojb+5EQe9Hu8Aykaa6blD1gyJPIkWCeCPNX6DwCE=; b=ruzBSSRMDReh8KAZ9ZsM7a6bUthhjC4kk6d/ouWPzDnxJeR+ml5QcskUT/KqBM0vl7 TF8b0ICJA9J4RO5oL+aNTqUuQ4Ja7KOs20e48eYRLi25nrTHIgdiG8XgjsfEPqSY3Q7c pQVAfRL9fGckP3bqvZ6CK2uYpaUyNd4uTLIGVtZDKqJvnvRE5dlPS4NW9AI9p4k07Cv6 LSEZNgsNSPVmi2kGwNwt+fcdY2Uc+O4nmnUuIEXCBUQYuvWg6q5TuLoDhbvDVJ93FaB2 v8zf22Tc8txtiq7+niR6OHBeqpJMnizkKfd//iWUgjbK4Vd4ok15eE3Ssacpox4oEHCW SdHA== X-Gm-Message-State: APjAAAXGlwt3nzgxwRJ/gH9N0Blv5fa6HzITB75/Z2lslnHVlughh9kC 8mqbyH1ydDHVDaUytjZfqRQdpIxV X-Google-Smtp-Source: APXvYqyWQGAYC6HEzbFJjKtXz9/R1lM+JxR6+nMsM8rW3losYXeFSQRpQH9VpGkmMIDOi4nf5vO3Gw== X-Received: by 2002:aca:b40b:: with SMTP id d11mr4164684oif.56.1560577492407; Fri, 14 Jun 2019 22:44:52 -0700 (PDT) Received: from 108-254-203-202.lightspeed.hstntx.sbcglobal.net (108-254-203-202.lightspeed.hstntx.sbcglobal.net. [108.254.203.202]) by smtp.gmail.com with ESMTPSA id m72sm97791oig.14.2019.06.14.22.44.51 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 22:44:51 -0700 (PDT) From: Doug Moore X-Google-Original-From: Doug Moore Subject: Re: svn commit: r349046 - head/sys/vm To: Oliver Pinter Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201906150430.x5F4UDVX031215@repo.freebsd.org> Message-ID: Date: Sat, 15 Jun 2019 00:44:50 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 8DFCB8F17F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.968,0] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 05:44:54 -0000 The patch makes it appear that a call to vm_map_simplify_entry has been removed, and that another has been added.  They are the same call, just moved from after a comment to before it. Doug Moore On 6/15/19 12:30 AM, Oliver Pinter wrote: > > > On Saturday, June 15, 2019, Doug Moore > wrote: > > Author: dougm > Date: Sat Jun 15 04:30:13 2019 > New Revision: 349046 > URL: https://svnweb.freebsd.org/changeset/base/349046 > > > Log: >   Critical comments were lost in r349203. This patch seeks to restore >   the lost information in new comments. > >   Reported by: alc >   Reviewed by: alc >   Approved by: kib (mentor) >   Differential Revision: https://reviews.freebsd.org/D20632 > > > Modified: >   head/sys/vm/vm_map.c > > Modified: head/sys/vm/vm_map.c > ============================================================================== > --- head/sys/vm/vm_map.c        Sat Jun 15 01:27:49 2019        > (r349045) > +++ head/sys/vm/vm_map.c        Sat Jun 15 04:30:13 2019        > (r349046) > @@ -2186,17 +2186,22 @@ _vm_map_clip_start(vm_map_t map, > vm_map_entry_t entry, >         VM_MAP_ASSERT_LOCKED(map); >         KASSERT(entry->end > start && entry->start < start, >             ("_vm_map_clip_start: invalid clip of entry %p", entry)); > +       vm_map_simplify_entry(map, entry); > > > Hi!  > > This isn't just comment.  >   > > >         /* > -        * Split off the front portion -- note that we must insert > the new > -        * entry BEFORE this one, so that this entry has the specified > -        * starting address. > +        * Create a backing object now, if none exists, so that > more individual > +        * objects won't be created after the map entry is split. >          */ > -       vm_map_simplify_entry(map, entry); >         vm_map_entry_charge_object(map, entry); > + > +       /* Clone the entry. */ >         new_entry = vm_map_entry_create(map); >         *new_entry = *entry; > > +       /* > +        * Split off the front portion.  Insert the new entry > BEFORE this one, > +        * so that this entry has the specified starting address. > +        */ >         new_entry->end = start; >         entry->offset += (start - entry->start); >         entry->start = start; > @@ -2244,14 +2249,20 @@ _vm_map_clip_end(vm_map_t map, > vm_map_entry_t entry, v >         KASSERT(entry->start < end && entry->end > end, >             ("_vm_map_clip_end: invalid clip of entry %p", entry)); > > - >         /* > -        * Create a new entry and insert it AFTER the specified entry > +        * Create a backing object now, if none exists, so that > more individual > +        * objects won't be created after the map entry is split. >          */ >         vm_map_entry_charge_object(map, entry); > + > +       /* Clone the entry. */ >         new_entry = vm_map_entry_create(map); >         *new_entry = *entry; > > +       /* > +        * Split off the back portion.  Insert the new entry AFTER > this one, > +        * so that this entry has the specified ending address. > +        */ >         new_entry->start = entry->end = end; >         new_entry->offset += (end - entry->start); >         if (new_entry->cred != NULL) > _______________________________________________ > svn-src-head@freebsd.org  mailing > list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org > " > From owner-svn-src-all@freebsd.org Sat Jun 15 06:51:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 518B515BE3BA; Sat, 15 Jun 2019 06:51:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E823B6A0E0; Sat, 15 Jun 2019 06:51:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1B4F236FC; Sat, 15 Jun 2019 06:51:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F6pkdR005862; Sat, 15 Jun 2019 06:51:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F6pklf005861; Sat, 15 Jun 2019 06:51:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201906150651.x5F6pklf005861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 15 Jun 2019 06:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349047 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 349047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E823B6A0E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 06:51:47 -0000 Author: delphij Date: Sat Jun 15 06:51:46 2019 New Revision: 349047 URL: https://svnweb.freebsd.org/changeset/base/349047 Log: Blankspace. No actual code change. MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sat Jun 15 04:30:13 2019 (r349046) +++ head/sbin/fsck_msdosfs/boot.c Sat Jun 15 06:51:46 2019 (r349047) @@ -49,7 +49,7 @@ readboot(int dosfs, struct bootblock *boot) u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; int i; - + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perr("could not read boot block"); return FSFATAL; @@ -219,7 +219,7 @@ readboot(int dosfs, struct bootblock *boot) boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; - if (boot->flags&FAT32) + if (boot->flags & FAT32) boot->ClustMask = CLUST32_MASK; else if (boot->NumClusters < (CLUST_RSRVD&CLUST12_MASK)) boot->ClustMask = CLUST12_MASK; From owner-svn-src-all@freebsd.org Sat Jun 15 07:23:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1444715BECA8; Sat, 15 Jun 2019 07:23:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF5256AD26; Sat, 15 Jun 2019 07:23:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8774D23D45; Sat, 15 Jun 2019 07:23:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F7N6eW024309; Sat, 15 Jun 2019 07:23:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F7N6ZY024308; Sat, 15 Jun 2019 07:23:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201906150723.x5F7N6ZY024308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 15 Jun 2019 07:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349048 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 349048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF5256AD26 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 07:23:07 -0000 Author: delphij Date: Sat Jun 15 07:23:06 2019 New Revision: 349048 URL: https://svnweb.freebsd.org/changeset/base/349048 Log: In ask(): override default option if any of alwaysyes/alwaysno/rdonly is set. MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/main.c Modified: head/sbin/fsck_msdosfs/main.c ============================================================================== --- head/sbin/fsck_msdosfs/main.c Sat Jun 15 06:51:46 2019 (r349047) +++ head/sbin/fsck_msdosfs/main.c Sat Jun 15 07:23:06 2019 (r349048) @@ -129,9 +129,10 @@ ask(int def, const char *fmt, ...) char prompt[256]; int c; + if (alwaysyes || alwaysno || rdonly) + def = (alwaysyes && !rdonly && !alwaysno); + if (preen) { - if (rdonly) - def = 0; if (def) printf("FIXED\n"); return def; @@ -140,9 +141,9 @@ ask(int def, const char *fmt, ...) va_start(ap, fmt); vsnprintf(prompt, sizeof(prompt), fmt, ap); va_end(ap); - if (alwaysyes || rdonly) { - printf("%s? %s\n", prompt, rdonly ? "no" : "yes"); - return !rdonly; + if (alwaysyes || alwaysno || rdonly) { + printf("%s? %s\n", prompt, def ? "yes" : "no"); + return def; } do { printf("%s? [yn] ", prompt); From owner-svn-src-all@freebsd.org Sat Jun 15 09:15:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 611C115C195C; Sat, 15 Jun 2019 09:15:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 058A36E246; Sat, 15 Jun 2019 09:15:59 +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 D4E2124FC9; Sat, 15 Jun 2019 09:15:58 +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 x5F9FwIh082541; Sat, 15 Jun 2019 09:15:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9FwN6082540; Sat, 15 Jun 2019 09:15:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201906150915.x5F9FwN6082540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 15 Jun 2019 09:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349049 - head/usr.bin/vtfontcvt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/vtfontcvt X-SVN-Commit-Revision: 349049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 058A36E246 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:15:59 -0000 Author: emaste Date: Sat Jun 15 09:15:58 2019 New Revision: 349049 URL: https://svnweb.freebsd.org/changeset/base/349049 Log: vtfontcvt: add comments in add_glyph During review for PR 205707. Event: Berlin Devsummit 2019 Modified: head/usr.bin/vtfontcvt/vtfontcvt.c Modified: head/usr.bin/vtfontcvt/vtfontcvt.c ============================================================================== --- head/usr.bin/vtfontcvt/vtfontcvt.c Sat Jun 15 07:23:06 2019 (r349048) +++ head/usr.bin/vtfontcvt/vtfontcvt.c Sat Jun 15 09:15:58 2019 (r349049) @@ -176,6 +176,7 @@ add_glyph(const uint8_t *bytes, unsigned int map_idx, glyph_total++; glyph_count[map_idx]++; + /* Return existing glyph if we have an identical one. */ hash = fnv_32_buf(bytes, wbytes * height, FNV1_32_INIT) % FONTCVT_NHASH; SLIST_FOREACH(gl, &glyph_hash[hash], g_hash) { if (memcmp(gl->g_data, bytes, wbytes * height) == 0) { @@ -184,6 +185,7 @@ add_glyph(const uint8_t *bytes, unsigned int map_idx, } } + /* Allocate new glyph. */ gl = xmalloc(sizeof *gl); gl->g_data = xmalloc(wbytes * height); memcpy(gl->g_data, bytes, wbytes * height); From owner-svn-src-all@freebsd.org Sat Jun 15 09:25:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5E115C1C51; Sat, 15 Jun 2019 09:25:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 419186E6CA; Sat, 15 Jun 2019 09:25:41 +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 2623C25184; Sat, 15 Jun 2019 09:25:41 +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 x5F9Pexh088016; Sat, 15 Jun 2019 09:25:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9PeMp088015; Sat, 15 Jun 2019 09:25:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201906150925.x5F9PeMp088015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 15 Jun 2019 09:25: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: r349050 - stable/12/sys/mips/cavium/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/mips/cavium/usb X-SVN-Commit-Revision: 349050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 419186E6CA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:25:41 -0000 Author: emaste Date: Sat Jun 15 09:25:40 2019 New Revision: 349050 URL: https://svnweb.freebsd.org/changeset/base/349050 Log: MFC r348497: octusb: fix detach loop over USB ports Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/mips/cavium/usb/octusb_octeon.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/12/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 15 09:15:58 2019 (r349049) +++ stable/12/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 15 09:25:40 2019 (r349050) @@ -179,12 +179,12 @@ octusb_octeon_detach(device_t dev) if (nports > OCTUSB_MAX_PORTS) panic("octusb: too many USB ports %d", nports); for (i = 0; i < nports; i++) { - if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0]) { + if (sc->sc_dci.sc_irq_res[i] && sc->sc_dci.sc_intr_hdl[i]) { err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res[i], sc->sc_dci.sc_intr_hdl[i]); sc->sc_dci.sc_intr_hdl[i] = NULL; } - if (sc->sc_dci.sc_irq_res) { + if (sc->sc_dci.sc_irq_res[i]) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_dci.sc_irq_res[i]); sc->sc_dci.sc_irq_res[i] = NULL; From owner-svn-src-all@freebsd.org Sat Jun 15 09:26:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76AEE15C1CC2; Sat, 15 Jun 2019 09:26:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14A606E7FA; Sat, 15 Jun 2019 09:26:49 +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 E113925185; Sat, 15 Jun 2019 09:26:48 +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 x5F9QmuH088112; Sat, 15 Jun 2019 09:26:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9QmgK088111; Sat, 15 Jun 2019 09:26:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201906150926.x5F9QmgK088111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 15 Jun 2019 09:26:48 +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: r349051 - stable/11/sys/mips/cavium/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/mips/cavium/usb X-SVN-Commit-Revision: 349051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 14A606E7FA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:26:49 -0000 Author: emaste Date: Sat Jun 15 09:26:48 2019 New Revision: 349051 URL: https://svnweb.freebsd.org/changeset/base/349051 Log: MFC r348497: octusb: fix detach loop over USB ports Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/mips/cavium/usb/octusb_octeon.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/11/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 15 09:25:40 2019 (r349050) +++ stable/11/sys/mips/cavium/usb/octusb_octeon.c Sat Jun 15 09:26:48 2019 (r349051) @@ -177,12 +177,12 @@ octusb_octeon_detach(device_t dev) if (nports > OCTUSB_MAX_PORTS) panic("octusb: too many USB ports %d", nports); for (i = 0; i < nports; i++) { - if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0]) { + if (sc->sc_dci.sc_irq_res[i] && sc->sc_dci.sc_intr_hdl[i]) { err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res[i], sc->sc_dci.sc_intr_hdl[i]); sc->sc_dci.sc_intr_hdl[i] = NULL; } - if (sc->sc_dci.sc_irq_res) { + if (sc->sc_dci.sc_irq_res[i]) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_dci.sc_irq_res[i]); sc->sc_dci.sc_irq_res[i] = NULL; From owner-svn-src-all@freebsd.org Sat Jun 15 09:28:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 255E215C1D6D; Sat, 15 Jun 2019 09:28:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD4FF6E93B; Sat, 15 Jun 2019 09:28:48 +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 8F05225186; Sat, 15 Jun 2019 09:28:48 +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 x5F9SmoM088247; Sat, 15 Jun 2019 09:28:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9SmUs088246; Sat, 15 Jun 2019 09:28:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201906150928.x5F9SmUs088246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 15 Jun 2019 09:28: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: r349052 - stable/12/lib/atf/libatf-c/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/atf/libatf-c/tests X-SVN-Commit-Revision: 349052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD4FF6E93B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:28:49 -0000 Author: emaste Date: Sat Jun 15 09:28:48 2019 New Revision: 349052 URL: https://svnweb.freebsd.org/changeset/base/349052 Log: MFC r348498: libatf: remove workaround not required after atf >= 0.18 update lib/atf/libatf-c/tests/Makefile added the -Wno-duplicate-decl-specifier due to an issue with an old version of ATF. ATF has long since been updated to a version with the fix so the workaround is no longer necessary. Found during review for PR 236889. PR: 236889 Modified: stable/12/lib/atf/libatf-c/tests/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/12/lib/atf/libatf-c/tests/Makefile Sat Jun 15 09:26:48 2019 (r349051) +++ stable/12/lib/atf/libatf-c/tests/Makefile Sat Jun 15 09:28:48 2019 (r349052) @@ -13,11 +13,6 @@ ATF= ${SRCTOP}/contrib/atf CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' CFLAGS+= -I${ATF} -# macros_test.c contains a double 'const const' which will be gone with -# the import of atf-0.18. -# TODO(jmmv): Remove this workaround once we do that update. -CFLAGS.clang+= -Wno-duplicate-decl-specifier - ${PACKAGE}FILES+= macros_h_test.c ${PACKAGE}FILES+= unused_test.c From owner-svn-src-all@freebsd.org Sat Jun 15 09:30:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3549A15C1E47; Sat, 15 Jun 2019 09:30:12 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB4F96EAB9; Sat, 15 Jun 2019 09:30:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAE602518B; Sat, 15 Jun 2019 09:30:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F9UBId088401; Sat, 15 Jun 2019 09:30:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9UBSc088400; Sat, 15 Jun 2019 09:30:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201906150930.x5F9UBSc088400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 15 Jun 2019 09:30:11 +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: r349053 - stable/11/lib/atf/libatf-c/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/lib/atf/libatf-c/tests X-SVN-Commit-Revision: 349053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CB4F96EAB9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:30:12 -0000 Author: emaste Date: Sat Jun 15 09:30:11 2019 New Revision: 349053 URL: https://svnweb.freebsd.org/changeset/base/349053 Log: MFC r348498: libatf: remove workaround not required after atf >= 0.18 update lib/atf/libatf-c/tests/Makefile added the -Wno-duplicate-decl-specifier due to an issue with an old version of ATF. ATF has long since been updated to a version with the fix so the workaround is no longer necessary. Found during review for PR 236889. PR: 236889 Modified: stable/11/lib/atf/libatf-c/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/11/lib/atf/libatf-c/tests/Makefile Sat Jun 15 09:28:48 2019 (r349052) +++ stable/11/lib/atf/libatf-c/tests/Makefile Sat Jun 15 09:30:11 2019 (r349053) @@ -13,11 +13,6 @@ ATF= ${SRCTOP}/contrib/atf CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' CFLAGS+= -I${ATF} -# macros_test.c contains a double 'const const' which will be gone with -# the import of atf-0.18. -# TODO(jmmv): Remove this workaround once we do that update. -CFLAGS.clang+= -Wno-duplicate-decl-specifier - ${PACKAGE}FILES+= macros_h_test.c ${PACKAGE}FILES+= unused_test.c From owner-svn-src-all@freebsd.org Sat Jun 15 09:45:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68CBF15C267E; Sat, 15 Jun 2019 09:45:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E84BD6F49A; Sat, 15 Jun 2019 09:45:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAF53254CE; Sat, 15 Jun 2019 09:45:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F9j0Bg098446; Sat, 15 Jun 2019 09:45:00 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F9j0TT098445; Sat, 15 Jun 2019 09:45:00 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201906150945.x5F9j0TT098445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 15 Jun 2019 09:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349054 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 349054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E84BD6F49A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 09:45:01 -0000 Author: marius Date: Sat Jun 15 09:45:00 2019 New Revision: 349054 URL: https://svnweb.freebsd.org/changeset/base/349054 Log: Add required for libnv to SYSINCS, too, apparently missed in r336335. Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Sat Jun 15 09:30:11 2019 (r349053) +++ head/tools/build/Makefile Sat Jun 15 09:45:00 2019 (r349054) @@ -70,7 +70,8 @@ SUBDIR= cross-build .endif # Needed to build config (since it uses libnv) -SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h +SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h \ + ${SRCTOP}/sys/sys/dnv.h # We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't # accidentally run tools that are incompatible but happen to be in $PATH. From owner-svn-src-all@freebsd.org Sat Jun 15 11:07:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B9D315C4296; Sat, 15 Jun 2019 11:07:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2083671743; Sat, 15 Jun 2019 11:07:42 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E999E26225; Sat, 15 Jun 2019 11:07:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FB7f64039971; Sat, 15 Jun 2019 11:07:41 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FB7f6N039968; Sat, 15 Jun 2019 11:07:41 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201906151107.x5FB7f6N039968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 15 Jun 2019 11:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349055 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 349055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2083671743 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 11:07:42 -0000 Author: marius Date: Sat Jun 15 11:07:41 2019 New Revision: 349055 URL: https://svnweb.freebsd.org/changeset/base/349055 Log: - Replace unused and only ever written to members of public iflib(9) structs with placeholders (in the latter case, IFLIB_MAX_TX_BYTES etc. are also only ever used for these write-only members if at all, so both these macros and members can just go). Using these spares may render it possible to merge certain iflib(9) fixes to stable/12. Otherwise, changes extending struct if_irq or struct if_shared_ctx in any way would break KBI as instances of these are allocated by the driver front-ends (by contrast, struct if_pkt_info as well as struct if_softc_ctx instances are provided by iflib(9) and, thus, may grow at least at the end without breaking KBI). - Make the pvi_name in struct pci_vendor_info const char * as device identifiers in hardware lookup tables aren't to be expected to ever change at runtime. - Similarly, make the pci_vendor_info_t of struct if_shared_ctx which is used to point to the struct pci_vendor_info arrays provided by the driver front-ends const. - Remove the ETH_ADDR_LEN macro from iflib.h; this was duplicating ETHER_ADDR_LEN of with iflib(9) actually only consuming the latter macro. - Make the name argument of iflib_io_tqg_attach(9) const, matching the taskqgroup_attach_cpu(9) this function wraps as well as e. g. iflib_config_gtask_init(9). - Remove the orphaned iflib_qset_lock_get() prototype. - Remove some extraneous empty lines. Modified: head/sys/net/iflib.c head/sys/net/iflib.h head/sys/net/iflib_private.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Jun 15 09:45:00 2019 (r349054) +++ head/sys/net/iflib.c Sat Jun 15 11:07:41 2019 (r349055) @@ -376,7 +376,6 @@ struct iflib_fl { uint64_t ifl_cl_dequeued; #endif /* implicit pad */ - bitstr_t *ifl_rx_bitmap; qidx_t ifl_fragidx; /* constant */ @@ -1250,7 +1249,6 @@ iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t tx #define netmap_rx_irq(ifp, qid, budget) (0) #define netmap_tx_irq(ifp, qid) do {} while (0) #define iflib_netmap_timer_adjust(ctx, txq, reset_on) - #endif #if defined(__i386__) || defined(__amd64__) @@ -1537,17 +1535,17 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, driver_filter_t filter, driver_intr_t handler, void *arg, const char *name) { - int rc, flags; struct resource *res; void *tag = NULL; device_t dev = ctx->ifc_dev; + int flags, i, rc; flags = RF_ACTIVE; if (ctx->ifc_flags & IFC_LEGACY) flags |= RF_SHAREABLE; MPASS(rid < 512); - irq->ii_rid = rid; - res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq->ii_rid, flags); + i = rid; + res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, flags); if (res == NULL) { device_printf(dev, "failed to allocate IRQ for rid %d, name %s.\n", rid, name); @@ -1569,7 +1567,6 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, return (0); } - /********************************************************************* * * Allocate DMA resources for TX buffers as well as memory for the TX @@ -4332,12 +4329,10 @@ iflib_led_func(void *arg, int onoff) int iflib_device_probe(device_t dev) { - pci_vendor_info_t *ent; - - uint16_t pci_vendor_id, pci_device_id; - uint16_t pci_subvendor_id, pci_subdevice_id; - uint16_t pci_rev_id; + const pci_vendor_info_t *ent; if_shared_ctx_t sctx; + uint16_t pci_device_id, pci_rev_id, pci_subdevice_id, pci_subvendor_id; + uint16_t pci_vendor_id; if ((sctx = DEVICE_REGISTER(dev)) == NULL || sctx->isc_magic != IFLIB_MAGIC) return (ENOTSUP); @@ -4397,8 +4392,6 @@ iflib_reset_qvalues(if_ctx_t ctx) device_t dev = ctx->ifc_dev; int i; - scctx->isc_txrx_budget_bytes_max = IFLIB_MAX_TX_BYTES; - scctx->isc_tx_qdepth = IFLIB_DEFAULT_TX_QDEPTH; if (ctx->ifc_sysctl_ntxqs != 0) scctx->isc_ntxqsets = ctx->ifc_sysctl_ntxqs; if (ctx->ifc_sysctl_nrxqs != 0) @@ -6037,15 +6030,14 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filte struct resource *res; struct taskqgroup *tqg; gtask_fn_t *fn; - int tqrid; void *q; - int err; + int err, tqrid; q = &ctx->ifc_rxqs[0]; info = &rxq[0].ifr_filter_info; gtask = &rxq[0].ifr_task; tqg = qgroup_if_io_tqg; - tqrid = irq->ii_rid = *rid; + tqrid = *rid; fn = _task_fn_rx; ctx->ifc_flags |= IFC_LEGACY; @@ -6112,7 +6104,7 @@ iflib_iov_intr_deferred(if_ctx_t ctx) } void -iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name) +iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, const char *name) { taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, NULL, NULL, Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sat Jun 15 09:45:00 2019 (r349054) +++ head/sys/net/iflib.h Sat Jun 15 11:07:41 2019 (r349055) @@ -132,12 +132,12 @@ typedef struct if_pkt_info { uint8_t ipi_mflags; /* packet mbuf flags */ uint32_t ipi_tcp_seq; /* tcp seqno */ - uint32_t ipi_tcp_sum; /* tcp csum */ + uint32_t __spare0__; } *if_pkt_info_t; typedef struct if_irq { struct resource *ii_res; - int ii_rid; + int __spare0__; void *ii_tag; } *if_irq_t; @@ -166,7 +166,7 @@ typedef struct pci_vendor_info { uint32_t pvi_subdevice_id; uint32_t pvi_rev_id; uint32_t pvi_class_mask; - caddr_t pvi_name; + const char *pvi_name; } pci_vendor_info_t; #define PVID(vendor, devid, name) {vendor, devid, 0, 0, 0, 0, name} @@ -194,9 +194,8 @@ typedef struct if_softc_ctx { int isc_vectors; int isc_nrxqsets; int isc_ntxqsets; - uint8_t isc_min_tx_latency; /* disable doorbell update batching */ - uint8_t isc_rx_mvec_enable; /* generate mvecs on rx */ - uint32_t isc_txrx_budget_bytes_max; + uint16_t __spare0__; + uint32_t __spare1__; int isc_msix_bar; /* can be model specific - initialize in attach_pre */ int isc_tx_nsegments; /* can be model specific - initialize in attach_pre */ int isc_ntxd[8]; @@ -218,20 +217,25 @@ typedef struct if_softc_ctx { int isc_rss_table_mask; int isc_nrxqsets_max; int isc_ntxqsets_max; - uint32_t isc_tx_qdepth; + uint32_t __spare2__; iflib_intr_mode_t isc_intr; uint16_t isc_max_frame_size; /* set at init time by driver */ uint16_t isc_min_frame_size; /* set at init time by driver, only used if IFLIB_NEED_ETHER_PAD is set. */ uint32_t isc_pause_frames; /* set by driver for iflib_timer to detect */ - pci_vendor_info_t isc_vendor_info; /* set by iflib prior to attach_pre */ + uint32_t __spare3__; + uint32_t __spare4__; + uint32_t __spare5__; + uint32_t __spare6__; + uint32_t __spare7__; + uint32_t __spare8__; + caddr_t __spare9__; int isc_disable_msix; if_txrx_t isc_txrx; struct ifmedia *isc_media; } *if_softc_ctx_t; - /* * Initialization values for device */ @@ -249,7 +253,7 @@ struct if_shared_ctx { int isc_admin_intrcnt; /* # of admin/link interrupts */ /* fields necessary for probe */ - pci_vendor_info_t *isc_vendor_info; + const pci_vendor_info_t *isc_vendor_info; const char *isc_driver_version; /* optional function to transform the read values to match the table*/ void (*isc_parse_devinfo) (uint16_t *device_id, uint16_t *subvendor_id, @@ -265,7 +269,7 @@ struct if_shared_ctx { int isc_nfl __aligned(CACHE_LINE_SIZE); int isc_ntxqs; /* # of tx queues per tx qset - usually 1 */ int isc_nrxqs; /* # of rx queues per rx qset - intel 1, chelsio 2, broadcom 3 */ - int isc_rx_process_limit; + int __spare0__; int isc_tx_reclaim_thresh; int isc_flags; const char *isc_name; @@ -289,11 +293,6 @@ typedef enum { IFLIB_INTR_IOV, } iflib_intr_type_t; -#ifndef ETH_ADDR_LEN -#define ETH_ADDR_LEN 6 -#endif - - /* * Interface has a separate command queue for RX */ @@ -368,7 +367,6 @@ typedef enum { */ #define IFLIB_DRIVER_MEDIA 0x20000 - /* * field accessors */ @@ -406,7 +404,6 @@ int iflib_device_shutdown(device_t); */ int iflib_device_probe_vendor(device_t); - int iflib_device_iov_init(device_t, uint16_t, const nvlist_t *); void iflib_device_iov_uninit(device_t); int iflib_device_iov_add_vf(device_t, uint16_t, const nvlist_t *); @@ -418,8 +415,6 @@ int iflib_device_iov_add_vf(device_t, uint16_t, const int iflib_device_register(device_t dev, void *softc, if_shared_ctx_t sctx, if_ctx_t *ctxp); int iflib_device_deregister(if_ctx_t); - - int iflib_irq_alloc(if_ctx_t, if_irq_t, int, driver_filter_t, void *filter_arg, driver_intr_t, void *arg, const char *name); int iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, iflib_intr_type_t type, driver_filter_t *filter, @@ -428,34 +423,28 @@ void iflib_softirq_alloc_generic(if_ctx_t ctx, if_irq_ void iflib_irq_free(if_ctx_t ctx, if_irq_t irq); -void iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name); +void iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, + const char *name); void iflib_config_gtask_init(void *ctx, struct grouptask *gtask, gtask_fn_t *fn, const char *name); - void iflib_config_gtask_deinit(struct grouptask *gtask); - - void iflib_tx_intr_deferred(if_ctx_t ctx, int txqid); void iflib_rx_intr_deferred(if_ctx_t ctx, int rxqid); void iflib_admin_intr_deferred(if_ctx_t ctx); void iflib_iov_intr_deferred(if_ctx_t ctx); - void iflib_link_state_change(if_ctx_t ctx, int linkstate, uint64_t baudrate); int iflib_dma_alloc(if_ctx_t ctx, int size, iflib_dma_info_t dma, int mapflags); int iflib_dma_alloc_align(if_ctx_t ctx, int size, int align, iflib_dma_info_t dma, int mapflags); void iflib_dma_free(iflib_dma_info_t dma); - int iflib_dma_alloc_multi(if_ctx_t ctx, int *sizes, iflib_dma_info_t *dmalist, int mapflags, int count); void iflib_dma_free_multi(iflib_dma_info_t *dmalist, int count); - struct sx *iflib_ctx_lock_get(if_ctx_t); -struct mtx *iflib_qset_lock_get(if_ctx_t, uint16_t); void iflib_led_create(if_ctx_t ctx); @@ -467,4 +456,5 @@ void iflib_add_int_delay_sysctl(if_ctx_t, const char * */ if_pseudo_t iflib_clone_register(if_shared_ctx_t); void iflib_clone_deregister(if_pseudo_t); + #endif /* __IFLIB_H_ */ Modified: head/sys/net/iflib_private.h ============================================================================== --- head/sys/net/iflib_private.h Sat Jun 15 09:45:00 2019 (r349054) +++ head/sys/net/iflib_private.h Sat Jun 15 11:07:41 2019 (r349055) @@ -28,9 +28,8 @@ */ #ifndef __NET_IFLIB_PRIVATE_H_ -#define __NET_IFLIB_PRIVATE_H_ +#define __NET_IFLIB_PRIVATE_H_ - #define IFC_LEGACY 0x001 #define IFC_QFLUSH 0x002 #define IFC_MULTISEG 0x004 @@ -40,18 +39,13 @@ #define IFC_PREFETCH 0x040 #define IFC_DO_RESET 0x080 #define IFC_DO_WATCHDOG 0x100 -#define IFC_CHECK_HUNG 0x200 +#define IFC_SPARE0 0x200 #define IFC_PSEUDO 0x400 #define IFC_IN_DETACH 0x800 -#define IFC_NETMAP_TX_IRQ 0x80000000 +#define IFC_NETMAP_TX_IRQ 0x80000000 MALLOC_DECLARE(M_IFLIB); - -#define IFLIB_MAX_TX_BYTES (2*1024*1024) -#define IFLIB_MIN_TX_BYTES (8*1024) -#define IFLIB_DEFAULT_TX_QDEPTH 2048 - struct iflib_cloneattach_ctx { struct if_clone *cc_ifc; From owner-svn-src-all@freebsd.org Sat Jun 15 12:09:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35DA415C5BA3; Sat, 15 Jun 2019 12:09:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC34B72F77; Sat, 15 Jun 2019 12:09: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 A23C926C15; Sat, 15 Jun 2019 12:09: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 x5FC9MBk072708; Sat, 15 Jun 2019 12:09:22 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FC9MCL072707; Sat, 15 Jun 2019 12:09:22 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201906151209.x5FC9MCL072707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 15 Jun 2019 12:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349056 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 349056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC34B72F77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 12:09:23 -0000 Author: 0mp (ports committer) Date: Sat Jun 15 12:09:22 2019 New Revision: 349056 URL: https://svnweb.freebsd.org/changeset/base/349056 Log: netmap.4: Fix a typo as FreeBSD Linux is not a thing Approved by: src (emaste) Event: Berlin Devsummit 2019 Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sat Jun 15 11:07:41 2019 (r349055) +++ head/share/man/man4/netmap.4 Sat Jun 15 12:09:22 2019 (r349056) @@ -40,7 +40,7 @@ is a framework for extremely fast and efficient packet I/O for userspace and kernel clients, and for Virtual Machines. It runs on -.Fx +.Fx , Linux and some versions of Windows, and supports a variety of .Nm netmap ports , including From owner-svn-src-all@freebsd.org Sat Jun 15 13:08:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73D8F15C6F18; Sat, 15 Jun 2019 13:08:13 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0916F74C91; Sat, 15 Jun 2019 13:08:13 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id A4B782700090; Sat, 15 Jun 2019 09:08:05 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu A4B782700090 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1560604085; bh=0k02xZwPZx8AWXXHCETebKWjpPjwH2rUUp2kJeqW4+c=; h=Subject:To:From:Date:From; b=kG6nOArCpoJi6XZ6hCoNHsXU85X8mM5/SlQeV2semWGTVgAKtweUPeMYiuVNtPd25 9qBwZztVRdWKLFfBp0YvkIMXUuNOBffVloKjpUJQNo/uSRdlDVd7a9PamUC3I7NVMC mWqGiZBYitpwHhyy4rKds+ZqjMTDknTqGBdp/qS0OnB2VqOEFBsSdOj0HOXr8WToyC m9QQ+avnEiuiW+fmFXXoUVbSJDfpnj9TPolnhEwpxGFfUAxVWRiieIHo3bEZPWyAdn 16Z1qkTYOSCkbqbz+k8r5FYA3okGQv1F1hbTuYdPgHg6F4veMQ+V7XIN3RlMseq+Wr mGeTffR05vFiQ== Subject: Re: svn commit: r349055 - head/sys/net To: Marius Strobl , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906151107.x5FB7f6N039968@repo.freebsd.org> From: Andrew Gallatin Message-ID: <154077cb-14b1-1dbc-cb65-3233045963c0@cs.duke.edu> Date: Sat, 15 Jun 2019 09:08:05 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201906151107.x5FB7f6N039968@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0916F74C91 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 13:08:13 -0000 On 2019-06-15 07:07, Marius Strobl wrote: > Author: marius > Date: Sat Jun 15 11:07:41 2019 > New Revision: 349055 > Log: > - Replace unused and only ever written to members of public iflib(9) > structs with placeholders (in the latter case, IFLIB_MAX_TX_BYTES > etc. are also only ever used for these write-only members if at all, > so both these macros and members can just go). Using these spares > may render it possible to merge certain iflib(9) fixes to stable/12. > Otherwise, changes extending struct if_irq or struct if_shared_ctx > in any way would break KBI as instances of these are allocated by > the driver front-ends (by contrast, struct if_pkt_info as well as > struct if_softc_ctx instances are provided by iflib(9) and, thus, > may grow at least at the end without breaking KBI). Given the above, why replace ipi_tcp_sum in if_pkt_info with a spare? Given that if_pkt_info can grow, I would also expect it to be able to shrink. So I don't quite see why the spare is needed here. I also worry about carrying the other spares around forever. Drew From owner-svn-src-all@freebsd.org Sat Jun 15 15:59:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D1915CA5EE; Sat, 15 Jun 2019 15:59:46 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B62AE8181F; Sat, 15 Jun 2019 15:59:45 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id x5FFxexk032360 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 Jun 2019 17:59:40 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id x5FFxedV032359; Sat, 15 Jun 2019 17:59:40 +0200 (CEST) (envelope-from marius) Date: Sat, 15 Jun 2019 17:59:40 +0200 From: Marius Strobl To: Andrew Gallatin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349055 - head/sys/net Message-ID: <20190615155940.GM6782@alchemy.franken.de> References: <201906151107.x5FB7f6N039968@repo.freebsd.org> <154077cb-14b1-1dbc-cb65-3233045963c0@cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154077cb-14b1-1dbc-cb65-3233045963c0@cs.duke.edu> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Sat, 15 Jun 2019 17:59:40 +0200 (CEST) X-Rspamd-Queue-Id: B62AE8181F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.964,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 15:59:46 -0000 On Sat, Jun 15, 2019 at 09:08:05AM -0400, Andrew Gallatin wrote: > On 2019-06-15 07:07, Marius Strobl wrote: > > Author: marius > > Date: Sat Jun 15 11:07:41 2019 > > New Revision: 349055 > > > Log: > > - Replace unused and only ever written to members of public iflib(9) > > structs with placeholders (in the latter case, IFLIB_MAX_TX_BYTES > > etc. are also only ever used for these write-only members if at all, > > so both these macros and members can just go). Using these spares > > may render it possible to merge certain iflib(9) fixes to stable/12. > > Otherwise, changes extending struct if_irq or struct if_shared_ctx > > in any way would break KBI as instances of these are allocated by > > the driver front-ends (by contrast, struct if_pkt_info as well as > > struct if_softc_ctx instances are provided by iflib(9) and, thus, > > may grow at least at the end without breaking KBI). > > Given the above, why replace ipi_tcp_sum in if_pkt_info with a spare? > Given that if_pkt_info can grow, I would also expect it to be able to > shrink. So I don't quite see why the spare is needed here. > > I also worry about carrying the other spares around forever. Yes, KBI-wise it should be also safe for instances of structures allocated by iflib(9) to shrink at the end (though shrinking structures usually isn't a concern when MFCing as such parts may just be omitted); changes altering the offsets of members would be a problem regarding KBI. Still, I don't like changing the size of publicly visible structures in stable branches without a real good reason even if such a change doesn't strictly break the KBI. So the plan is to MFC the spares but then to get rid of the ones whose removal doesn't break KBI in head. Marius From owner-svn-src-all@freebsd.org Sat Jun 15 16:16:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9CAB15CAA13; Sat, 15 Jun 2019 16:16:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8079F82219; Sat, 15 Jun 2019 16:16:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59CD21829; Sat, 15 Jun 2019 16:16:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FGGUNd004240; Sat, 15 Jun 2019 16:16:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FGGUAl004239; Sat, 15 Jun 2019 16:16:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151616.x5FGGUAl004239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 16:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349057 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 349057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8079F82219 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 16:16:31 -0000 Author: ian Date: Sat Jun 15 16:16:29 2019 New Revision: 349057 URL: https://svnweb.freebsd.org/changeset/base/349057 Log: Allow pwm(9) components to be selected individually, while 'device pwm' still includes it all. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jun 15 12:09:22 2019 (r349056) +++ head/sys/conf/files Sat Jun 15 16:16:29 2019 (r349057) @@ -2700,11 +2700,11 @@ dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci -dev/pwm/pwmc.c optional pwm -dev/pwm/pwmbus.c optional pwm -dev/pwm/pwm_if.m optional pwm -dev/pwm/pwmbus_if.m optional pwm -dev/pwm/ofw_pwm.c optional pwm fdt +dev/pwm/pwmc.c optional pwm | pwmc +dev/pwm/pwmbus.c optional pwm | pwmbus +dev/pwm/pwm_if.m optional pwm | pwmbus +dev/pwm/pwmbus_if.m optional pwm | pwmbus +dev/pwm/ofw_pwm.c optional pwm fdt | pwmbus fdt dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral From owner-svn-src-all@freebsd.org Sat Jun 15 16:36:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A8CC15CAE23; Sat, 15 Jun 2019 16:36:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96A5482A14; Sat, 15 Jun 2019 16:36:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B4601B84; Sat, 15 Jun 2019 16:36:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FGaTA0014760; Sat, 15 Jun 2019 16:36:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FGaTNY014759; Sat, 15 Jun 2019 16:36:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151636.x5FGaTNY014759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 16:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349058 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 349058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 96A5482A14 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 16:36:30 -0000 Author: ian Date: Sat Jun 15 16:36:29 2019 New Revision: 349058 URL: https://svnweb.freebsd.org/changeset/base/349058 Log: In detach(), check for failure of bus_generic_detach(), only release resources if they got allocated (because detach() gets called from attach() to handle various failures), and delete the pwmbus child if it got created. Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:16:29 2019 (r349057) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:36:29 2019 (r349058) @@ -192,12 +192,20 @@ static int aw_pwm_detach(device_t dev) { struct aw_pwm_softc *sc; + int error; sc = device_get_softc(dev); - bus_generic_detach(sc->dev); + if (((error = bus_generic_detach(sc->dev)) != 0) { + device_printf(sc->dev, "cannot detach child devices\n"); + return (error); + } - bus_release_resources(dev, aw_pwm_spec, &sc->res); + if (sc->busdev != NULL) + device_delete_child(dev, sc->busdev); + + if (sc->res != NULL) + bus_release_resources(dev, aw_pwm_spec, &sc->res); return (0); } From owner-svn-src-all@freebsd.org Sat Jun 15 16:56:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6736B15CB1F7; Sat, 15 Jun 2019 16:56:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6D1831D4; Sat, 15 Jun 2019 16:56:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2DFA1ECA; Sat, 15 Jun 2019 16:56:00 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FGu083024984; Sat, 15 Jun 2019 16:56:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FGu0TZ024983; Sat, 15 Jun 2019 16:56:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151656.x5FGu0TZ024983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 16:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349059 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 349059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B6D1831D4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 16:56:01 -0000 Author: ian Date: Sat Jun 15 16:56:00 2019 New Revision: 349059 URL: https://svnweb.freebsd.org/changeset/base/349059 Log: Don't call pwmbus_attach_bus(), because it may not be present if this driver is compiled into the kernel but pwmbus will be loaded as a module when needed (and because of that, pwmbus_attach_bus() is going away in the near future). Instead, just directly do what that function did: register the fdt xfef handle, and attach the pwmbus. Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:36:29 2019 (r349058) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:56:00 2019 (r349059) @@ -138,6 +138,7 @@ aw_pwm_attach(device_t dev) struct aw_pwm_softc *sc; uint64_t clk_freq; uint32_t reg; + phandle_t node; int error; sc = device_get_softc(dev); @@ -158,9 +159,6 @@ aw_pwm_attach(device_t dev) goto fail; } - if ((sc->busdev = pwmbus_attach_bus(dev)) == NULL) - device_printf(dev, "Cannot attach pwm bus\n"); - /* Read the configuration left by U-Boot */ reg = AW_PWM_READ(sc, AW_PWM_CTRL); if (reg & (AW_PWM_CTRL_GATE | AW_PWM_CTRL_EN)) @@ -170,7 +168,7 @@ aw_pwm_attach(device_t dev) reg &= AW_PWM_CTRL_PRESCALE_MASK; if (reg > nitems(aw_pwm_clk_prescaler)) { device_printf(dev, "Bad prescaler %x, cannot guess current settings\n", reg); - goto out; + goto skipcfg; } clk_freq = sc->clk_freq / aw_pwm_clk_prescaler[reg]; @@ -180,9 +178,18 @@ aw_pwm_attach(device_t dev) sc->duty = NS_PER_SEC / (clk_freq / ((reg >> AW_PWM_PERIOD_ACTIVE_SHIFT) & AW_PWM_PERIOD_ACTIVE_MASK)); -out: - return (0); +skipcfg: + /* + * Note that we don't check for failure to attach pwmbus -- even without + * it we can still service clients who connect via fdt xref data. + */ + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + sc->busdev = device_add_child(dev, "pwmbus", -1); + + return (bus_generic_attach(dev)); + fail: aw_pwm_detach(dev); return (error); @@ -196,7 +203,7 @@ aw_pwm_detach(device_t dev) sc = device_get_softc(dev); - if (((error = bus_generic_detach(sc->dev)) != 0) { + if ((error = bus_generic_detach(sc->dev)) != 0) { device_printf(sc->dev, "cannot detach child devices\n"); return (error); } From owner-svn-src-all@freebsd.org Sat Jun 15 16:59:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55CF115CB2C0; Sat, 15 Jun 2019 16:59:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED88983347; Sat, 15 Jun 2019 16:59:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4D671ECC; Sat, 15 Jun 2019 16:59:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FGx3lg025142; Sat, 15 Jun 2019 16:59:03 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FGx3IB025141; Sat, 15 Jun 2019 16:59:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151659.x5FGx3IB025141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 16:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349060 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 349060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ED88983347 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 16:59:04 -0000 Author: ian Date: Sat Jun 15 16:59:03 2019 New Revision: 349060 URL: https://svnweb.freebsd.org/changeset/base/349060 Log: Handle failure to enable the clock or obtain its frequency. Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:56:00 2019 (r349059) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 16:59:03 2019 (r349060) @@ -150,8 +150,16 @@ aw_pwm_attach(device_t dev) goto fail; } error = clk_enable(sc->clk); + if (error != 0) { + device_printf(dev, "cannot enable clock\n"); + goto fail; + } error = clk_get_freq(sc->clk, &sc->clk_freq); + if (error != 0) { + device_printf(dev, "cannot get clock frequency\n"); + goto fail; + } if (bus_alloc_resources(dev, aw_pwm_spec, &sc->res) != 0) { device_printf(dev, "cannot allocate resources for device\n"); From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A76FF15CB782; Sat, 15 Jun 2019 17:08:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AB52838AE; Sat, 15 Jun 2019 17:08:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12AA22083; Sat, 15 Jun 2019 17:08:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH82cf030570; Sat, 15 Jun 2019 17:08:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH82J6030569; Sat, 15 Jun 2019 17:08:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH82J6030569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349061 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4AB52838AE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:03 -0000 Author: bdrewery Date: Sat Jun 15 17:08:02 2019 New Revision: 349061 URL: https://svnweb.freebsd.org/changeset/base/349061 Log: Don't force OBJS_DEPEND_GUESS headers onto all objects. This is in the case of not having any .depend.foo.o yet. Don't force add *.h as a dependency for those. They are built in beforebuild already when in SRCS/DPSRCS. This change allows custom rules, like in bin/sh/Makefile for mksyntax, to not have cyclic dependency problems when connected to the .depend.* handling. This is purposely not copied to sys/conf/kern.post.mk as it handles generating headers slightly differently. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Jun 15 16:59:03 2019 (r349060) +++ head/share/mk/bsd.dep.mk Sat Jun 15 17:08:02 2019 (r349061) @@ -251,18 +251,17 @@ _depfile= ${.OBJDIR}/${_meta_obj} .else _depfile= ${.OBJDIR}/${_dep_obj} .endif -.if !exists(${_depfile}) -${__obj}: ${OBJS_DEPEND_GUESS} -${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.elif defined(_meta_filemon) -# For meta mode we still need to know which file to depend on to avoid -# ambiguous suffix transformation rules from .PATH. Meta mode does not -# use .depend files. We really only need source files, not headers since -# they are typically in SRCS/beforebuild already. For target-specific -# guesses do include headers though since they may not be in SRCS. +.if !exists(${_depfile}) || defined(_meta_filemon) +# - Headers are normally built in beforebuild when included in DPSRCS or SRCS. +# So we don't need it as a guessed dependency (it may lead to cyclic problems +# if custom rules are defined). The only time this causes a problem is when +# 'make foo.o' is ran. +# - For meta mode we still need to know which file to depend on to avoid +# ambiguous suffix transformation rules from .PATH. Meta mode does not +# use .depend files when filemon is in use. ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.endif # !exists(${_depfile}) +.endif # !exists(${_depfile}) || defined(_meta_filemon) .endfor # Always run 'make depend' to generate dependencies early and to avoid the From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE76715CB7B0; Sat, 15 Jun 2019 17:08:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05734839B1; Sat, 15 Jun 2019 17:08:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA39B2084; Sat, 15 Jun 2019 17:08:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8FFY030627; Sat, 15 Jun 2019 17:08:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8EVx030620; Sat, 15 Jun 2019 17:08:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8EVx030620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349062 - in head: bin/csh bin/sh lib/libmagic lib/ncurses/ncurses share/syscons/scrnmaps usr.bin/awk usr.bin/vi/catalog X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: bin/csh bin/sh lib/libmagic lib/ncurses/ncurses share/syscons/scrnmaps usr.bin/awk usr.bin/vi/catalog X-SVN-Commit-Revision: 349062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 05734839B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:17 -0000 Author: bdrewery Date: Sat Jun 15 17:08:13 2019 New Revision: 349062 URL: https://svnweb.freebsd.org/changeset/base/349062 Log: Fix .depend files to work for build tools. This is somewhat of a follow-up to r335746. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/bin/csh/Makefile head/bin/sh/Makefile head/lib/libmagic/Makefile head/lib/ncurses/ncurses/Makefile head/share/syscons/scrnmaps/Makefile head/usr.bin/awk/Makefile head/usr.bin/vi/catalog/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/bin/csh/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -117,6 +117,7 @@ csh.1: tcsh.man build-tools: gethost +DEPENDOBJS+= gethost gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/bin/sh/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -48,6 +48,7 @@ builtins.h: .NOMETA builtins.c builtins.h: mkbuiltins builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} +DEPENDOBJS+= mknodes mksyntax mknodes mksyntax: ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/lib/libmagic/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -41,10 +41,11 @@ magic.mgc: mkmagic magic ${BTOOLSPATH:U.}/mkmagic magic CLEANFILES+= mkmagic +DEPENDOBJS+= mkmagic build-tools: mkmagic mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META} - ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \ - ${LDADD} + ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \ + ${.ALLSRC:N*.h:O:u} ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/ncurses/ncurses/Makefile ============================================================================== --- head/lib/ncurses/ncurses/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/lib/ncurses/ncurses/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -389,6 +389,7 @@ keys.list: MKkeys_list.sh Caps ${NCURSES_DIR}/include/Caps | LC_ALL=C sort > keys.list # Build tools +DEPENDOBJS+= make_hash make_keys build-tools: make_hash make_keys make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} Modified: head/share/syscons/scrnmaps/Makefile ============================================================================== --- head/share/syscons/scrnmaps/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/share/syscons/scrnmaps/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -12,6 +12,7 @@ CLEANFILES+= ${SCRMAPS_MK} ${SCRMAPS} FILES= ${SCRMAPS} FILESDIR= ${SHAREDIR}/syscons/scrnmaps +DEPENDOBJS+= ${SCRMAPS_MK} build-tools: ${SCRMAPS_MK} ${SCRMAPS}: ${.TARGET:R}.mk Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/usr.bin/awk/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -27,6 +27,7 @@ ytab.h: awkgram.c awkgram.h .NOMETA proctab.c: maketab ${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c +DEPENDOBJS+= maketab build-tools: maketab maketab: ytab.h maketab.c ${BUILD_TOOLS_META} Modified: head/usr.bin/vi/catalog/Makefile ============================================================================== --- head/usr.bin/vi/catalog/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/usr.bin/vi/catalog/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -105,8 +105,8 @@ english.base: dump ${SCAN} #Makefile sort -nu > $@ -dump: dump.c ${BUILD_TOOLS_META} - ${CC:N${CCACHE_BIN}} -o ${.TARGET} ${.ALLSRC} +DEPENDOBJS+= dump +dump: ${BUILD_TOOLS_META} CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2 From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD58315CB7D5; Sat, 15 Jun 2019 17:08:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 617A9839D5; Sat, 15 Jun 2019 17:08:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F33562085; Sat, 15 Jun 2019 17:08:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8Itm030675; Sat, 15 Jun 2019 17:08:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8Ifq030674; Sat, 15 Jun 2019 17:08:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8Ifq030674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349063 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 617A9839D5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:19 -0000 Author: bdrewery Date: Sat Jun 15 17:08:18 2019 New Revision: 349063 URL: https://svnweb.freebsd.org/changeset/base/349063 Log: Similar to r335710 avoid ccache when linking a .cc file directly. Sponsored by: DellEMC Modified: head/share/mk/bsd.suffixes.mk Modified: head/share/mk/bsd.suffixes.mk ============================================================================== --- head/share/mk/bsd.suffixes.mk Sat Jun 15 17:08:13 2019 (r349062) +++ head/share/mk/bsd.suffixes.mk Sat Jun 15 17:08:18 2019 (r349063) @@ -19,7 +19,7 @@ ${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET} .cc .cpp .cxx .C: - ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CXX:N${CCACHE_BIN}} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .cc.o .cpp.o .cxx.o .C.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E5615CB7F7; Sat, 15 Jun 2019 17:08:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FD0083A4D; Sat, 15 Jun 2019 17:08:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28CC12086; Sat, 15 Jun 2019 17:08:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8MnU030720; Sat, 15 Jun 2019 17:08:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8Me0030719; Sat, 15 Jun 2019 17:08:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8Me0030719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349064 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FD0083A4D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:25 -0000 Author: bdrewery Date: Sat Jun 15 17:08:21 2019 New Revision: 349064 URL: https://svnweb.freebsd.org/changeset/base/349064 Log: Avoid generating DEPENDFILES='.depend.' when there's no DEPENDOBJS. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Jun 15 17:08:18 2019 (r349063) +++ head/share/mk/bsd.dep.mk Sat Jun 15 17:08:21 2019 (r349064) @@ -186,7 +186,9 @@ DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS: .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif +.if !empty(DEPENDOBJS) DEPENDFILES+= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} +.endif .if defined(_SKIP_DEPEND) # Don't bother statting any .meta files for .depend* ${DEPENDOBJS}: .NOMETA From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7663A15CB818; Sat, 15 Jun 2019 17:08:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18C8483AC0; Sat, 15 Jun 2019 17:08:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EC3B2087; Sat, 15 Jun 2019 17:08:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8PEA030767; Sat, 15 Jun 2019 17:08:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8Pen030766; Sat, 15 Jun 2019 17:08:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8Pen030766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349065 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18C8483AC0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:29 -0000 Author: bdrewery Date: Sat Jun 15 17:08:24 2019 New Revision: 349065 URL: https://svnweb.freebsd.org/changeset/base/349065 Log: Add various CFLAGS/LDADD overrides for the output target file. Sponsored by: DellEMC Modified: head/share/mk/bsd.README head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sat Jun 15 17:08:21 2019 (r349064) +++ head/share/mk/bsd.README Sat Jun 15 17:08:24 2019 (r349065) @@ -125,10 +125,16 @@ The following variables are common: AFLAGS.${SRC} Flags dependent on source file name. +AFLAGS.${TARGET} + Flags dependent on output file name. ACFLAGS.${SRC} Flags dependent on source file name. +ACFLAGS.${TARGET} + Flags dependent on output file name. CFLAGS.${SRC} Flags dependent on source file name. +CFLAGS.${TARGET} + Flags dependent on output file name. CFLAGS.${COMPILER_TYPE} Flags dependent on compiler added to CFLAGS. CFLAGS.${MACHINE_ARCH} @@ -142,6 +148,8 @@ CXXFLAGS.${MACHINE_ARCH} Architectural flags added to CXXFLAGS. CXXFLAGS.${SRC} Flags dependent on source file name. +CXXFLAGS.${TARGET} + Flags dependent on output file name. COMPILER_FEATURES A list of features that the compiler supports. Zero or more of: @@ -336,13 +344,22 @@ LDADD Additional loader objects. Usually used for li LDADD=-lutil -lcompat +LDADD.${TAREGT} + Loader objects dependent on output file name. + LDFLAGS Additional loader flags. Passed to the loader via CC, since that's used to link programs as well, so loader specific flags need to be prefixed with -Wl, to work. +LDFLAGS.${TARGET} + Flags dependent on output file name. + LIBADD Additional libraries. This is for base system libraries and is only valid inside of the /usr/src tree. Use LIBADD=name instead of LDADD=-lname. + +LIBADD.${TARGET} + Libraries dependent on output file name. LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Jun 15 17:08:21 2019 (r349064) +++ head/share/mk/bsd.sys.mk Sat Jun 15 17:08:24 2019 (r349065) @@ -234,17 +234,25 @@ DEBUG_FILES_CFLAGS?= -g .if ${MK_WARNS} != "no" CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} .endif CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} AFLAGS+= ${AFLAGS.${.IMPSRC:T}} +AFLAGS+= ${AFLAGS.${.TARGET:T}} ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} +ACFLAGS+= ${ACFLAGS.${.TARGET:T}} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CFLAGS.${.TARGET:T}} CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} +CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} +LDFLAGS+= ${LDFLAGS.${.TARGET:T}} +LDADD+= ${LDADD.${.TARGET:T}} +LIBADD+= ${LIBADD.${.TARGET:T}} .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 406F315CB837; Sat, 15 Jun 2019 17:08:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D173983B0C; Sat, 15 Jun 2019 17:08:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA88E2088; Sat, 15 Jun 2019 17:08:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8SvY030814; Sat, 15 Jun 2019 17:08:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8Smq030813; Sat, 15 Jun 2019 17:08:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8Smq030813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349066 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D173983B0C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:32 -0000 Author: bdrewery Date: Sat Jun 15 17:08:28 2019 New Revision: 349066 URL: https://svnweb.freebsd.org/changeset/base/349066 Log: META_MODE: Delete build targets that fail. If a meta mode change is triggered but then the build fails then the next build will not retrigger meta mode. This only prevented by removing the target on rebuild or on the failure to rebuild. Sponsored by: DellEMC Modified: head/share/mk/local.sys.mk Modified: head/share/mk/local.sys.mk ============================================================================== --- head/share/mk/local.sys.mk Sat Jun 15 17:08:24 2019 (r349065) +++ head/share/mk/local.sys.mk Sat Jun 15 17:08:28 2019 (r349066) @@ -33,6 +33,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \ OBJTOP \ ${MAKE_PRINT_VAR_ON_ERROR_XTRAS} +# Meta mode may rebuild targets that then fail. The next build won't detect +# the meta mode change. Not all targets have a 'rm ${.TARGET}' in them +# so force it. +.DELETE_ON_ERROR: + .if ${.MAKE.LEVEL} > 0 MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH .endif From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E41C15CB86F; Sat, 15 Jun 2019 17:08:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAAD583BB6; Sat, 15 Jun 2019 17:08:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 279CB2089; Sat, 15 Jun 2019 17:08:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8XqG030863; Sat, 15 Jun 2019 17:08:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8WQQ030858; Sat, 15 Jun 2019 17:08:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8WQQ030858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349067 - in head: gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov lib/csu X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov lib/csu X-SVN-Commit-Revision: 349067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAAD583BB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:39 -0000 Author: bdrewery Date: Sat Jun 15 17:08:32 2019 New Revision: 349067 URL: https://svnweb.freebsd.org/changeset/base/349067 Log: Support reading in .depend files. This is for an upcoming change that fixes .depend handling in here. It will cause some duplicate sources which need to be trimmed out. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/gnu/lib/csu/Makefile head/gnu/lib/libgcc/Makefile head/gnu/lib/libgcov/Makefile head/lib/csu/Makefile.inc Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Sat Jun 15 17:08:28 2019 (r349066) +++ head/gnu/lib/csu/Makefile Sat Jun 15 17:08:32 2019 (r349067) @@ -49,23 +49,23 @@ CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS} crtbegin.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginT.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginS.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtend.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtendS.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} COMMONHDRS+= tm.h tconfig.h options.h CLEANFILES+= ${COMMONHDRS} optionlist cs-tconfig.h cs-tm.h Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Sat Jun 15 17:08:28 2019 (r349066) +++ head/gnu/lib/libgcc/Makefile Sat Jun 15 17:08:32 2019 (r349067) @@ -224,11 +224,11 @@ ${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/} SOBJS += ${${T}_FUNCS:S/$/.pico/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endfor #----------------------------------------------------------------------- @@ -249,9 +249,9 @@ STAT_OBJS_P = ${SYMS_ST:S/$/.po/} STATICOBJS = ${SYMS_ST:S/$/.o/} ${STAT_OBJS_T}: ${STD_CFILE} ${COMMONHDRS} - ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDRS} - ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} #----------------------------------------------------------------------- # Modified: head/gnu/lib/libgcov/Makefile ============================================================================== --- head/gnu/lib/libgcov/Makefile Sat Jun 15 17:08:28 2019 (r349066) +++ head/gnu/lib/libgcov/Makefile Sat Jun 15 17:08:32 2019 (r349067) @@ -51,16 +51,16 @@ CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h option ${OBJS} beforedepend: ${COMMONHDRS} ${OBJS_T}: libgcov.c - ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .if !defined(NO_PIC) ${OBJS_S}: libgcov.c - ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endif .if ${MK_PROFILE} != "no" ${OBJS_P}: libgcov.c - ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endif .include Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Sat Jun 15 17:08:28 2019 (r349066) +++ head/lib/csu/Makefile.inc Sat Jun 15 17:08:32 2019 (r349067) @@ -22,10 +22,11 @@ crtend.o: crtend.c crtendS.o: crtend.c crtbegin.o crtend.o crtbeginT.o: - ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginS.o crtendS.o: - ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \ + ${.ALLSRC:N*.h:[1]} .endif From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0697B15CB8AE; Sat, 15 Jun 2019 17:08:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F20A83C1A; Sat, 15 Jun 2019 17:08:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6430D208A; Sat, 15 Jun 2019 17:08:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8apa030910; Sat, 15 Jun 2019 17:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8aSg030909; Sat, 15 Jun 2019 17:08:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8aSg030909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349068 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F20A83C1A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:43 -0000 Author: bdrewery Date: Sat Jun 15 17:08:35 2019 New Revision: 349068 URL: https://svnweb.freebsd.org/changeset/base/349068 Log: Allow DEPENDOBJS/DEPENDSRCS to work with only OBJS set and no SRCS. Default to tracking .depend.* for OBJS rather than SRCS. This helps cover some special case builds like gnu/lib/csu which do more of a PROGS-like thing with bsd.prog.mk. It is possible this causes out-of-tree Makefiles to have problems if they use this pattern: foo.o: foo.c ${CC} -o ${.TARGET} ${.ALLSRC} This may cause multiple source files to be compiled due to finding the 'foo.o: foo.c' dependency both in the Makefile at the .depend file. Or it may try compiling headers. This can be worked around by either of these: foo.o: foo.c ${CC} -o ${.TARGET} ${.ALLSRC:N*.h:[1]} Or foo.o: foo.c ${CC} -o ${.TARGET} ${.CURDIR}/foo.c In the latter case the ${.CURDIR} may need to be a different path. The first case covers automatically using .PATH. Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Jun 15 17:08:32 2019 (r349067) +++ head/share/mk/bsd.dep.mk Sat Jun 15 17:08:35 2019 (r349068) @@ -173,19 +173,23 @@ ${_D}.nossppico: ${_DSRC} ${SOBJS:S/^${_D}.nossppico$/ .endif .endfor .endfor +.endif # defined(SRCS) - .if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP .endif # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g +.if !empty(OBJS) +DEPENDOBJS+= ${OBJS} +.else DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif +.endif # !empty(OBJS) .if !empty(DEPENDOBJS) DEPENDFILES+= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} .endif @@ -215,7 +219,6 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS .endif .endfor .endif # !defined(_meta_filemon) -.endif # defined(SRCS) .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.DEPENDFILE} != "/dev/null" # Prevent meta.autodep.mk from tracking "local dependencies". From owner-svn-src-all@freebsd.org Sat Jun 15 17:08:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E92B415CB8ED; Sat, 15 Jun 2019 17:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AAD383CA3; Sat, 15 Jun 2019 17:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B916D208B; Sat, 15 Jun 2019 17:08:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FH8dUO030955; Sat, 15 Jun 2019 17:08:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FH8d25030954; Sat, 15 Jun 2019 17:08:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201906151708.x5FH8d25030954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349069 - head/gnu/lib/csu X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/gnu/lib/csu X-SVN-Commit-Revision: 349069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6AAD383CA3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:08:48 -0000 Author: bdrewery Date: Sat Jun 15 17:08:39 2019 New Revision: 349069 URL: https://svnweb.freebsd.org/changeset/base/349069 Log: csu: Add proper .depend tracking for each object. This doesn't appear to have ever worked. After a .depend is generated there will be duplicate .c dependencies so only use the first one. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/gnu/lib/csu/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Sat Jun 15 17:08:35 2019 (r349068) +++ head/gnu/lib/csu/Makefile Sat Jun 15 17:08:39 2019 (r349069) @@ -14,6 +14,7 @@ CCDIR= ${SRCTOP}/gnu/usr.bin/cc SRCS= crtstuff.c ${COMMONHDRS} OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o +DEPENDOBJS+= ${OBJS} ${SOBJS} CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder From owner-svn-src-all@freebsd.org Sat Jun 15 17:18:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C7CE15CBDA3; Sat, 15 Jun 2019 17:18:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACE8D8475B; Sat, 15 Jun 2019 17:17:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 7CF5ABA13; Sat, 15 Jun 2019 17:17:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 454F47FE0; Sat, 15 Jun 2019 17:17:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id l2atEkUDhntY; Sat, 15 Jun 2019 17:17:55 +0000 (UTC) Subject: Re: svn commit: r349069 - head/gnu/lib/csu DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 559057FD2 From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906151708.x5FH8d25030954@repo.freebsd.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=https://zx.xk42.net/bryan.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAG0JEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPokBVwQTAQoAQQIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hLu BQkNPvODAAoJEDXXcbtuRpfP9rMH/3f7cfX5rzyEV5QNfV/wS4jFukLoPZ4+nCM/TKxH3pEX 2bLbeQbkk6La8cueQ5Lpoht5XFZ18Y5TbMittngltrlNzoDD0h9are24OkDFGim3afJU7tkj IGQa1if+re+vI5BhzYwRhj0oKXzBi39M5oePd3L1dXfx83rg2FPyZBdIejsz6fR74T3JVkbd 6k2l5/3Zk2uiNMy+eBfDRgYE1E6CP28kV0nCeGKZgSVso0kGUUHud7voKqGVpMvbd0mE4pp4 PE5YJaFPjrll9miaDAvdU8LGIq5n6+aXPLKoQ/QNl6mg6ifgI6FfKILOkTizLW8E5PBSNnCm NapQ55yjm125AQ0EUmmGawEIAKJUU9+Q19oW1RK5jTf3m56j+szIc8Y9DaLC8REUKl4UZJBK BqCl6c0cukVApOD92XoU6hJPm2rLEyp/IcYcPPNTnVu8D8h9oag2L8EiFN7+2hk0xG+lwjc8 uOIZycme7AIJsBU4AZ1v63lxm2k104hwpiatgbe71GIGl7p1MX6ousP/wGzXCOF25Dx9w02C eRe7zEMfhnFjSUhzdCC9han2+KaVB7qIqNR3b8NfbwRNlwPmHqlhXffUow9OsQjSnTK8WKNR lx7xzVccXIvWP2wECFrmqmzMmXpSrmIuiWEpFwZ9x2a0Pva8dCNRiCVTK51IlRXKjaAxiN1u IUrMm6UAEQEAAYkBPAQYAQoAJgIbDBYhBPkXPLLDqup6XIofCTXXcbtuRpfPBQJb5hL4BQkN PvONAAoJEDXXcbtuRpfPCjcH/ivBsOpdpebpgLizSNU5/X4yWN5Aixsc9VBnQhGKAKnMINJQ VMpA55sD2JSPwloXYM/B3qyPJRS/9cwIuX5LDNKKOZU3Qp+TzleynM15/xea14orWYRGRict YHBM3Cnqp7OD8K6Q1uhs0fTxyJP7PZ/G0+7Corlf1DlHhDt6C2HldRPFvAvAgl6sR9Wzgcb7 rzub2HVtbJgl6YHbgyAG7x9NpXFqzx1JLAMdpt2DIYwoi+oMdRQlBIwNuKjQjCGzuXHandd3 kGvBAsyJpQ+coEep9UzwANaV28cXrFr2R4FSOcR50rBA2Nh/vqUYfpsvBvJlwuKAoV1djVHa ihNeL5E= Organization: FreeBSD Message-ID: <365d54ca-2091-7a9a-1f0c-f55452d30449@FreeBSD.org> Date: Sat, 15 Jun 2019 10:17:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <201906151708.x5FH8d25030954@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: ACE8D8475B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.982,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:18:00 -0000 On 6/15/2019 10:08 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Jun 15 17:08:39 2019 > New Revision: 349069 > URL: https://svnweb.freebsd.org/changeset/base/349069 > > Log: > csu: Add proper .depend tracking for each object. > > This doesn't appear to have ever worked. After a .depend is generated > there will be duplicate .c dependencies so only use the first one. > Oops. This 2nd paragraph was really from r349067 before some rebasing. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Sat Jun 15 17:26:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D20A715CBFD6; Sat, 15 Jun 2019 17:26:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7480884B5F; Sat, 15 Jun 2019 17:26:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C2D023CC; Sat, 15 Jun 2019 17:26:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FHQhI3041021; Sat, 15 Jun 2019 17:26:43 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FHQhjF041020; Sat, 15 Jun 2019 17:26:43 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201906151726.x5FHQhjF041020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 15 Jun 2019 17:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349070 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7480884B5F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 17:26:44 -0000 Author: alc Date: Sat Jun 15 17:26:42 2019 New Revision: 349070 URL: https://svnweb.freebsd.org/changeset/base/349070 Log: Previously, when pmap_remove_pages() destroyed a dirty superpage mapping, it only called vm_page_dirty() on the first of the superpage's constituent 4KB pages. This revision corrects that error, calling vm_page_dirty() on all of superpage's constituent 4KB pages. MFC after: 3 days Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sat Jun 15 17:08:39 2019 (r349069) +++ head/sys/arm64/arm64/pmap.c Sat Jun 15 17:26:42 2019 (r349070) @@ -4067,7 +4067,7 @@ pmap_remove_pages(pmap_t pmap) switch (lvl) { case 1: for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) - vm_page_dirty(m); + vm_page_dirty(mt); break; case 2: vm_page_dirty(m); From owner-svn-src-all@freebsd.org Sat Jun 15 18:48:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2088815CD3B6; Sat, 15 Jun 2019 18:48:33 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AACA586E5F; Sat, 15 Jun 2019 18:48:32 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 14A5627001FF; Sat, 15 Jun 2019 14:48:31 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 14A5627001FF DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1560624511; bh=iFmvzU9PDa2Z9sIzoffU+qbsdYrSyPaOyOBigNENRN4=; h=Subject:To:From:Date:From; b=sisc4FBGcTiPo3tzX1ZuRan223PAXl8g5ev8KoDF8Gw6N7WvY6/Bw1CIqHS/ztxI+ ouj5mHWWy0yx6cy3UcOzNS5e8nph75iz1WaX3XlsyHp49cbC0eNQbO0rxL+ZIi86Bv mXB/U03wuZFEt20yy9pYqs7HSc2oSwwPfUQOhEDmcKroXeRBvlmkjagNkDWWUrVa+i TUlQwizzNoLI/Pk3ObNcGxy+cqzAy+gdYlqxicPUvYd0PkM81WlYmpTwZMdVN9VfRm 5ptX665cwgNFIVe8hlVabGX/wrrPZ6OQVS1B4L4d4AtmikQGF2qHv4wGx2reFwyTZh liYOzAvgONY/w== Subject: Re: svn commit: r349055 - head/sys/net To: Marius Strobl Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906151107.x5FB7f6N039968@repo.freebsd.org> <154077cb-14b1-1dbc-cb65-3233045963c0@cs.duke.edu> <20190615155940.GM6782@alchemy.franken.de> From: Andrew Gallatin Message-ID: <178554f8-27f4-d09c-0d6f-0f53febbf601@cs.duke.edu> Date: Sat, 15 Jun 2019 14:48:30 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190615155940.GM6782@alchemy.franken.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AACA586E5F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.970,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 18:48:33 -0000 On 2019-06-15 11:59, Marius Strobl wrote: > On Sat, Jun 15, 2019 at 09:08:05AM -0400, Andrew Gallatin wrote: >> On 2019-06-15 07:07, Marius Strobl wrote: >>> Author: marius >>> Date: Sat Jun 15 11:07:41 2019 >>> New Revision: 349055 >> >>> Log: >>> - Replace unused and only ever written to members of public iflib(9) >>> structs with placeholders (in the latter case, IFLIB_MAX_TX_BYTES >>> etc. are also only ever used for these write-only members if at all, >>> so both these macros and members can just go). Using these spares >>> may render it possible to merge certain iflib(9) fixes to stable/12. >>> Otherwise, changes extending struct if_irq or struct if_shared_ctx >>> in any way would break KBI as instances of these are allocated by >>> the driver front-ends (by contrast, struct if_pkt_info as well as >>> struct if_softc_ctx instances are provided by iflib(9) and, thus, >>> may grow at least at the end without breaking KBI). >> >> Given the above, why replace ipi_tcp_sum in if_pkt_info with a spare? >> Given that if_pkt_info can grow, I would also expect it to be able to >> shrink. So I don't quite see why the spare is needed here. >> >> I also worry about carrying the other spares around forever. > > Yes, KBI-wise it should be also safe for instances of structures allocated > by iflib(9) to shrink at the end (though shrinking structures usually isn't > a concern when MFCing as such parts may just be omitted); changes altering > the offsets of members would be a problem regarding KBI. > Still, I don't like changing the size of publicly visible structures in > stable branches without a real good reason even if such a change doesn't > strictly break the KBI. So the plan is to MFC the spares but then to get > rid of the ones whose removal doesn't break KBI in head. > > Marius > Thanks, that makes sense Drew From owner-svn-src-all@freebsd.org Sat Jun 15 19:07:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13C8815CD808; Sat, 15 Jun 2019 19:07:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9DBC87752; Sat, 15 Jun 2019 19:07:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75BEE3458; Sat, 15 Jun 2019 19:07:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FJ743d092965; Sat, 15 Jun 2019 19:07:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FJ74c5092964; Sat, 15 Jun 2019 19:07:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201906151907.x5FJ74c5092964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 15 Jun 2019 19:07:04 +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: r349071 - stable/11/etc/pkg X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/etc/pkg X-SVN-Commit-Revision: 349071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9DBC87752 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 19:07:05 -0000 Author: gjb Date: Sat Jun 15 19:07:03 2019 New Revision: 349071 URL: https://svnweb.freebsd.org/changeset/base/349071 Log: Set the stable/11 default pkg(8) repository from quarterly to latest now that releng/11.3 has branched. This change was originally committed in r347034 with express intent to revert it after the branch. This is a direct commit to stable/11. Sponsored by: The FreeBSD Foundation Modified: stable/11/etc/pkg/FreeBSD.conf Modified: stable/11/etc/pkg/FreeBSD.conf ============================================================================== --- stable/11/etc/pkg/FreeBSD.conf Sat Jun 15 17:26:42 2019 (r349070) +++ stable/11/etc/pkg/FreeBSD.conf Sat Jun 15 19:07:03 2019 (r349071) @@ -8,7 +8,7 @@ # FreeBSD: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From owner-svn-src-all@freebsd.org Sat Jun 15 19:16:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A13215CDAF6; Sat, 15 Jun 2019 19:16:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A014187F67; Sat, 15 Jun 2019 19:16:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87BC937B0; Sat, 15 Jun 2019 19:16:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FJG2vY098626; Sat, 15 Jun 2019 19:16:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FJG2YQ098625; Sat, 15 Jun 2019 19:16:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151916.x5FJG2YQ098625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 19:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349072 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 349072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A014187F67 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 19:16:03 -0000 Author: ian Date: Sat Jun 15 19:16:02 2019 New Revision: 349072 URL: https://svnweb.freebsd.org/changeset/base/349072 Log: Remove pcf8563reg.h, the driver it was associated with was replaced in 2017 with the nxprtc multi-chip driver. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jun 15 19:07:03 2019 (r349071) +++ head/ObsoleteFiles.inc Sat Jun 15 19:16:02 2019 (r349072) @@ -1560,6 +1560,8 @@ OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat1 OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat3 # 20170802: ksyms(4) ioctl interface was removed OLD_FILES+=usr/include/sys/ksyms.h +# 20170729: the iicbus/pcf8563 driver is replaced with iicbus/nxprtc +OLD_FILES+=usr/include/dev/iicbus/pcf8563reg.h # 20170722: new clang import which bumps version from 4.0.0 to 5.0.0. OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h From owner-svn-src-all@freebsd.org Sat Jun 15 19:43:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39B0815CE6B6; Sat, 15 Jun 2019 19:43:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D006B8997C; Sat, 15 Jun 2019 19:43:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB6563D70; Sat, 15 Jun 2019 19:43:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FJhY80015992; Sat, 15 Jun 2019 19:43:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FJhYCS015990; Sat, 15 Jun 2019 19:43:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151943.x5FJhYCS015990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 19:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349073 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D006B8997C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 19:43:35 -0000 Author: ian Date: Sat Jun 15 19:43:33 2019 New Revision: 349073 URL: https://svnweb.freebsd.org/changeset/base/349073 Log: Do not include pwm.h here, it is purely a userland interface file containing ioctl defintions for the pwmc driver. It is not part of the pwmbus interface. Modified: head/sys/dev/pwm/pwmbus.h head/sys/dev/pwm/pwmbus_if.m Modified: head/sys/dev/pwm/pwmbus.h ============================================================================== --- head/sys/dev/pwm/pwmbus.h Sat Jun 15 19:16:02 2019 (r349072) +++ head/sys/dev/pwm/pwmbus.h Sat Jun 15 19:43:33 2019 (r349073) @@ -31,7 +31,6 @@ #ifndef _PWMBUS_H_ #include -#include struct pwm_channel { device_t dev; Modified: head/sys/dev/pwm/pwmbus_if.m ============================================================================== --- head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 19:16:02 2019 (r349072) +++ head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 19:43:33 2019 (r349073) @@ -48,10 +48,6 @@ CODE { } }; -HEADER { - #include -}; - # # Config the period (Total number of cycle in ns) and # the duty (active number of cycle in ns) From owner-svn-src-all@freebsd.org Sat Jun 15 19:47:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72B4E15CE7E5; Sat, 15 Jun 2019 19:47:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A07789BDB; Sat, 15 Jun 2019 19:47:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8BA03D72; Sat, 15 Jun 2019 19:47:00 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FJl0vE016198; Sat, 15 Jun 2019 19:47:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FJkxeI016189; Sat, 15 Jun 2019 19:46:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906151946.x5FJkxeI016189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 19:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349074 - in head: . etc/mtree include sys/dev/pwm sys/sys usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: . etc/mtree include sys/dev/pwm sys/sys usr.sbin/pwm X-SVN-Commit-Revision: 349074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A07789BDB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 19:47:01 -0000 Author: ian Date: Sat Jun 15 19:46:59 2019 New Revision: 349074 URL: https://svnweb.freebsd.org/changeset/base/349074 Log: Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h. The file contains ioctl definitions and related datatypes that allow userland control of pwm hardware via the pwmc device. The new name and location better reflects its assocation with a single device driver. Added: head/sys/dev/pwm/pwmc.h - copied unchanged from r349073, head/sys/sys/pwm.h Deleted: head/sys/sys/pwm.h Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/dev/pwm/pwmc.c head/usr.sbin/pwm/pwm.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jun 15 19:43:33 2019 (r349073) +++ head/ObsoleteFiles.inc Sat Jun 15 19:46:59 2019 (r349074) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20190615: sys/pwm.h renamed to dev/pwmc.h +OLD_FILES+=usr/include/sys/pwm.h # 20190612: new clang import which bumps version from 8.0.0 to 8.0.1. OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/asan_interface.h Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sat Jun 15 19:43:33 2019 (r349073) +++ head/etc/mtree/BSD.include.dist Sat Jun 15 19:46:59 2019 (r349074) @@ -152,6 +152,8 @@ .. ppbus .. + pwm + .. smbus .. speaker Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Jun 15 19:43:33 2019 (r349073) +++ head/include/Makefile Sat Jun 15 19:46:59 2019 (r349074) @@ -46,8 +46,8 @@ LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ - dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ - dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \ + dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ + dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 19:43:33 2019 (r349073) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 19:46:59 2019 (r349074) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "pwmbus_if.h" #include "pwm_if.h" Copied: head/sys/dev/pwm/pwmc.h (from r349073, head/sys/sys/pwm.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pwm/pwmc.h Sat Jun 15 19:46:59 2019 (r349074, copy of r349073, head/sys/sys/pwm.h) @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * All rights reserved. + * + * 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 _PWM_H_ +#define _PWM_H_ + +#define PWM_POLARITY_INVERTED (1 << 0) + +struct pwm_state { + int channel; + unsigned int period; + unsigned int duty; + uint32_t flags; + bool enable; +}; + +/* + * ioctls + */ + +#define PWMMAXCHANNEL _IOWR('G', 0, int) +#define PWMGETSTATE _IOWR('G', 1, struct pwm_state) +#define PWMSETSTATE _IOWR('G', 2, struct pwm_state) + + +#endif /* _PWM_H_ */ Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Sat Jun 15 19:43:33 2019 (r349073) +++ head/usr.sbin/pwm/pwm.c Sat Jun 15 19:46:59 2019 (r349074) @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include #include From owner-svn-src-all@freebsd.org Sat Jun 15 20:13:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CCDA15CEDEF; Sat, 15 Jun 2019 20:13:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 217C68A887; Sat, 15 Jun 2019 20:13:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF44D42C1; Sat, 15 Jun 2019 20:13:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKDgHs031627; Sat, 15 Jun 2019 20:13:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKDgq1031625; Sat, 15 Jun 2019 20:13:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152013.x5FKDgq1031625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 20:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349075 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 217C68A887 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:13:43 -0000 Author: ian Date: Sat Jun 15 20:13:42 2019 New Revision: 349075 URL: https://svnweb.freebsd.org/changeset/base/349075 Log: Remove pwmbus_attach_bus(), it no longer has any callers. Also remove a couple prototypes for functions that never existed (and never will). Modified: head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmbus.h Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 19:46:59 2019 (r349074) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:13:42 2019 (r349075) @@ -61,35 +61,6 @@ struct pwmbus_softc { int nchannels; }; -device_t -pwmbus_attach_bus(device_t dev) -{ - device_t busdev; -#ifdef FDT - phandle_t node; -#endif - - busdev = device_add_child(dev, "pwmbus", -1); - if (busdev == NULL) { - device_printf(dev, "Cannot add child pwmbus\n"); - return (NULL); - } - if (device_add_child(dev, "pwmc", -1) == NULL) { - device_printf(dev, "Cannot add pwmc\n"); - device_delete_child(dev, busdev); - return (NULL); - } - -#ifdef FDT - node = ofw_bus_get_node(dev); - OF_device_register_xref(OF_xref_from_node(node), dev); -#endif - - bus_generic_attach(dev); - - return (busdev); -} - static int pwmbus_probe(device_t dev) { Modified: head/sys/dev/pwm/pwmbus.h ============================================================================== --- head/sys/dev/pwm/pwmbus.h Sat Jun 15 19:46:59 2019 (r349074) +++ head/sys/dev/pwm/pwmbus.h Sat Jun 15 20:13:42 2019 (r349075) @@ -43,10 +43,6 @@ struct pwm_channel { }; typedef struct pwm_channel *pwm_channel_t; -device_t pwmbus_attach_bus(device_t dev); -int pwmbus_acquire_channel(device_t bus, int channel); -int pwmbus_release_channel(device_t bus, int channel); - int pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, const char *prop_name, int idx, pwm_channel_t *channel); From owner-svn-src-all@freebsd.org Sat Jun 15 20:17:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6933F15CEE82; Sat, 15 Jun 2019 20:17:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B8558A9E9; Sat, 15 Jun 2019 20:17:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2BA342C2; Sat, 15 Jun 2019 20:17:00 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKH0Ch031818; Sat, 15 Jun 2019 20:17:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKH0Oc031817; Sat, 15 Jun 2019 20:17:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152017.x5FKH0Oc031817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 20:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349076 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B8558A9E9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:17:01 -0000 Author: ian Date: Sat Jun 15 20:17:00 2019 New Revision: 349076 URL: https://svnweb.freebsd.org/changeset/base/349076 Log: Use device_delete_children() instead of a locally-rolled copy of it that leaks the device-list memory. Modified: head/sys/dev/pwm/pwmbus.c Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:13:42 2019 (r349075) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:17:00 2019 (r349076) @@ -92,20 +92,12 @@ pwmbus_attach(device_t dev) static int pwmbus_detach(device_t dev) { - device_t *devlist; - int i, rv, ndevs; + int rv; - rv = bus_generic_detach(dev); - if (rv != 0) - return (rv); + if ((rv = bus_generic_detach(dev)) == 0) + rv = device_delete_children(dev); - rv = device_get_children(dev, &devlist, &ndevs); - if (rv != 0) - return (rv); - for (i = 0; i < ndevs; i++) - device_delete_child(dev, devlist[i]); - - return (0); + return (rv); } static int From owner-svn-src-all@freebsd.org Sat Jun 15 20:20:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE44115CEF45; Sat, 15 Jun 2019 20:20:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1128AB82; Sat, 15 Jun 2019 20:20:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68F3742CE; Sat, 15 Jun 2019 20:20:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKKbkJ032017; Sat, 15 Jun 2019 20:20:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKKb2E032016; Sat, 15 Jun 2019 20:20:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152020.x5FKKb2E032016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 20:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349077 - head/sys/arm/ti/am335x X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/ti/am335x X-SVN-Commit-Revision: 349077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E1128AB82 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:20:38 -0000 Author: ian Date: Sat Jun 15 20:20:36 2019 New Revision: 349077 URL: https://svnweb.freebsd.org/changeset/base/349077 Log: Add a missing #include. I suspect this used to get included via some header pollution that was cleaned up recently, and this file got missed in the cleanup because it's not attached to the build unless you specifically request this device in a custom kernel config. Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtpps.c Sat Jun 15 20:17:00 2019 (r349076) +++ head/sys/arm/ti/am335x/am335x_dmtpps.c Sat Jun 15 20:20:36 2019 (r349077) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Sat Jun 15 20:24:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C92C15CF1A1; Sat, 15 Jun 2019 20:24:20 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEF0D8AF84; Sat, 15 Jun 2019 20:24:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B60C34463; Sat, 15 Jun 2019 20:24:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKOJCn036854; Sat, 15 Jun 2019 20:24:19 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKOJru036853; Sat, 15 Jun 2019 20:24:19 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201906152024.x5FKOJru036853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 15 Jun 2019 20:24:19 +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: r349078 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 349078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DEF0D8AF84 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:24:20 -0000 Author: cperciva Date: Sat Jun 15 20:24:19 2019 New Revision: 349078 URL: https://svnweb.freebsd.org/changeset/base/349078 Log: MFC r347370: Bump EC2 AMI filesystem size up to 4000 MB. The latest stable/12 snapshot broke because it ran out of disk space. Modified: stable/12/release/tools/ec2.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Sat Jun 15 20:20:36 2019 (r349077) +++ stable/12/release/tools/ec2.conf Sat Jun 15 20:24:19 2019 (r349078) @@ -19,12 +19,12 @@ fi # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" -# Build with a 3 GB UFS partition; the growfs rc.d script will expand +# Build with a 3.9 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. # Note that if this is set to G, we will end up with an GB disk # image since VMSIZE is the size of the UFS partition, not the disk which # it resides within. -export VMSIZE=3072M +export VMSIZE=4000M # No swap space; the ec2_ephemeralswap rc.d script will allocate swap # space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances From owner-svn-src-all@freebsd.org Sat Jun 15 20:25:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFE2815CF214; Sat, 15 Jun 2019 20:25:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56FF38B0BF; Sat, 15 Jun 2019 20:25:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E0194464; Sat, 15 Jun 2019 20:25:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKPaTU036975; Sat, 15 Jun 2019 20:25:36 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKPar6036974; Sat, 15 Jun 2019 20:25:36 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201906152025.x5FKPar6036974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 15 Jun 2019 20:25: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: r349079 - stable/12/sys/dev/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/sys/dev/pci X-SVN-Commit-Revision: 349079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 56FF38B0BF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:25:37 -0000 Author: cperciva Date: Sat Jun 15 20:25:36 2019 New Revision: 349079 URL: https://svnweb.freebsd.org/changeset/base/349079 Log: MFC r348681: Only respond to the PCIe Attention Button if a device is already plugged in. This unbreaks attaching disks to EC2 "bare metal" instances. Modified: stable/12/sys/dev/pci/pci_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pci_pci.c ============================================================================== --- stable/12/sys/dev/pci/pci_pci.c Sat Jun 15 20:24:19 2019 (r349078) +++ stable/12/sys/dev/pci/pci_pci.c Sat Jun 15 20:25:36 2019 (r349079) @@ -1167,9 +1167,11 @@ pcib_pcie_intr_hotplug(void *arg) { struct pcib_softc *sc; device_t dev; + uint16_t old_slot_sta; sc = arg; dev = sc->dev; + old_slot_sta = sc->pcie_slot_sta; sc->pcie_slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); /* Clear the events just reported. */ @@ -1185,7 +1187,8 @@ pcib_pcie_intr_hotplug(void *arg) "Attention Button Pressed: Detach Cancelled\n"); sc->flags &= ~PCIB_DETACH_PENDING; callout_stop(&sc->pcie_ab_timer); - } else { + } else if (old_slot_sta & PCIEM_SLOT_STA_PDS) { + /* Only initiate detach sequence if device present. */ device_printf(dev, "Attention Button Pressed: Detaching in 5 seconds\n"); sc->flags |= PCIB_DETACH_PENDING; From owner-svn-src-all@freebsd.org Sat Jun 15 20:53:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 969D715CFCC8; Sat, 15 Jun 2019 20:53:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 391C38BEB2; Sat, 15 Jun 2019 20:53:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 274B44960; Sat, 15 Jun 2019 20:53:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKrR40052668; Sat, 15 Jun 2019 20:53:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKrRhp052667; Sat, 15 Jun 2019 20:53:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152053.x5FKrRhp052667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 20:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349080 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 391C38BEB2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:53:27 -0000 Author: ian Date: Sat Jun 15 20:53:26 2019 New Revision: 349080 URL: https://svnweb.freebsd.org/changeset/base/349080 Log: Make pwmbus driver and devclass vars static; they're not mentioned in any header file, so they can't be used outside this file anyway. Modified: head/sys/dev/pwm/pwmbus.c Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:25:36 2019 (r349079) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:53:26 2019 (r349080) @@ -195,12 +195,12 @@ static device_method_t pwmbus_methods[] = { DEVMETHOD_END }; -driver_t pwmbus_driver = { +static driver_t pwmbus_driver = { "pwmbus", pwmbus_methods, sizeof(struct pwmbus_softc), }; -devclass_t pwmbus_devclass; +static devclass_t pwmbus_devclass; EARLY_DRIVER_MODULE(pwmbus, pwm, pwmbus_driver, pwmbus_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); From owner-svn-src-all@freebsd.org Sat Jun 15 20:54:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DBC15CFD2D; Sat, 15 Jun 2019 20:54:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 492AF8BFF6; Sat, 15 Jun 2019 20:54:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3ED724961; Sat, 15 Jun 2019 20:54:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FKsYlM052757; Sat, 15 Jun 2019 20:54:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FKsYUS052756; Sat, 15 Jun 2019 20:54:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152054.x5FKsYUS052756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 20:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349081 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 492AF8BFF6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 20:54:34 -0000 Author: ian Date: Sat Jun 15 20:54:33 2019 New Revision: 349081 URL: https://svnweb.freebsd.org/changeset/base/349081 Log: Unwrap prototype lines so that return type and function name are on the same line. No functional changes. Modified: head/sys/dev/pwm/pwmbus.h Modified: head/sys/dev/pwm/pwmbus.h ============================================================================== --- head/sys/dev/pwm/pwmbus.h Sat Jun 15 20:53:26 2019 (r349080) +++ head/sys/dev/pwm/pwmbus.h Sat Jun 15 20:54:33 2019 (r349081) @@ -43,17 +43,13 @@ struct pwm_channel { }; typedef struct pwm_channel *pwm_channel_t; -int -pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, +int pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, const char *prop_name, int idx, pwm_channel_t *channel); -int -pwm_get_by_ofw_idx(device_t consumer, phandle_t node, int idx, +int pwm_get_by_ofw_idx(device_t consumer, phandle_t node, int idx, pwm_channel_t *out_channel); -int -pwm_get_by_ofw_property(device_t consumer, phandle_t node, +int pwm_get_by_ofw_property(device_t consumer, phandle_t node, const char *prop_name, pwm_channel_t *out_channel); -int -pwm_get_by_ofw_name(device_t consumer, phandle_t node, const char *name, +int pwm_get_by_ofw_name(device_t consumer, phandle_t node, const char *name, pwm_channel_t *out_channel); #endif /* _PWMBUS_H_ */ From owner-svn-src-all@freebsd.org Sat Jun 15 21:19:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAFF815D01B1; Sat, 15 Jun 2019 21:19:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31C4A8C7E6; Sat, 15 Jun 2019 21:19:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E72344CC5; Sat, 15 Jun 2019 21:19:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FLJNSo063364; Sat, 15 Jun 2019 21:19:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FLJNG0063363; Sat, 15 Jun 2019 21:19:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152119.x5FLJNG0063363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 21:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349082 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31C4A8C7E6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 21:19:25 -0000 Author: ian Date: Sat Jun 15 21:19:23 2019 New Revision: 349082 URL: https://svnweb.freebsd.org/changeset/base/349082 Log: Spell unsigned int as u_int and channel as chan; eliminates the need to wrap some long lines. Modified: head/sys/dev/pwm/pwmbus.c Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 20:54:33 2019 (r349081) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:19:23 2019 (r349082) @@ -101,81 +101,81 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t bus, int channel, unsigned int period, unsigned int duty) +pwmbus_channel_config(device_t bus, int chan, u_int period, u_int duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_get_config(device_t bus, int channel, unsigned int *period, unsigned int *duty) +pwmbus_channel_get_config(device_t bus, int chan, u_int *period, u_int *duty) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_CONFIG(sc->dev, channel, period, duty)); + return (PWM_CHANNEL_GET_CONFIG(sc->dev, chan, period, duty)); } static int -pwmbus_channel_set_flags(device_t bus, int channel, uint32_t flags) +pwmbus_channel_set_flags(device_t bus, int chan, uint32_t flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_SET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_SET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_get_flags(device_t bus, int channel, uint32_t *flags) +pwmbus_channel_get_flags(device_t bus, int chan, uint32_t *flags) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_GET_FLAGS(sc->dev, channel, flags)); + return (PWM_CHANNEL_GET_FLAGS(sc->dev, chan, flags)); } static int -pwmbus_channel_enable(device_t bus, int channel, bool enable) +pwmbus_channel_enable(device_t bus, int chan, bool enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_ENABLE(sc->dev, channel, enable)); + return (PWM_CHANNEL_ENABLE(sc->dev, chan, enable)); } static int -pwmbus_channel_is_enabled(device_t bus, int channel, bool *enable) +pwmbus_channel_is_enabled(device_t bus, int chan, bool *enable) { struct pwmbus_softc *sc; sc = device_get_softc(bus); - if (channel > sc->nchannels) + if (chan > sc->nchannels) return (EINVAL); - return (PWM_CHANNEL_IS_ENABLED(sc->dev, channel, enable)); + return (PWM_CHANNEL_IS_ENABLED(sc->dev, chan, enable)); } static device_method_t pwmbus_methods[] = { From owner-svn-src-all@freebsd.org Sat Jun 15 21:31:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EDBF15D040B; Sat, 15 Jun 2019 21:31:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1F1A8CDD6; Sat, 15 Jun 2019 21:31:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5187F4EA8; Sat, 15 Jun 2019 21:31:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FLV52R068651; Sat, 15 Jun 2019 21:31:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FLV524068650; Sat, 15 Jun 2019 21:31:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152131.x5FLV524068650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 21:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349083 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 349083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A1F1A8CDD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 21:31:06 -0000 Author: ian Date: Sat Jun 15 21:31:04 2019 New Revision: 349083 URL: https://svnweb.freebsd.org/changeset/base/349083 Log: Give the aw_pwm driver a module version. Modified: head/sys/arm/allwinner/aw_pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:19:23 2019 (r349082) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:31:04 2019 (r349083) @@ -381,4 +381,5 @@ static driver_t aw_pwm_driver = { static devclass_t aw_pwm_devclass; DRIVER_MODULE(aw_pwm, simplebus, aw_pwm_driver, aw_pwm_devclass, 0, 0); +MODULE_VERSION(aw_pwm, 1); SIMPLEBUS_PNP_INFO(compat_data); From owner-svn-src-all@freebsd.org Sat Jun 15 21:36:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB8515D0622; Sat, 15 Jun 2019 21:36:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 216148D091; Sat, 15 Jun 2019 21:36:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1D2C5022; Sat, 15 Jun 2019 21:36:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FLaFWi073798; Sat, 15 Jun 2019 21:36:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FLaFCV073795; Sat, 15 Jun 2019 21:36:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152136.x5FLaFCV073795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 21:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349084 - in head/sys: arm/allwinner dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/allwinner dev/pwm X-SVN-Commit-Revision: 349084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 216148D091 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 21:36:16 -0000 Author: ian Date: Sat Jun 15 21:36:14 2019 New Revision: 349084 URL: https://svnweb.freebsd.org/changeset/base/349084 Log: Rename the channel_max method to channel_count, because that's what it's returning. (If the channel count is 2, then the max channel number is 1.) Modified: head/sys/arm/allwinner/aw_pwm.c head/sys/dev/pwm/pwm_if.m head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmc.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:36:14 2019 (r349084) @@ -226,7 +226,7 @@ aw_pwm_detach(device_t dev) } static int -aw_pwm_channel_max(device_t dev, int *nchannel) +aw_pwm_channel_count(device_t dev, int *nchannel) { *nchannel = 1; @@ -363,7 +363,7 @@ static device_method_t aw_pwm_methods[] = { /* pwm interface */ DEVMETHOD(pwm_get_bus, aw_pwm_get_bus), - DEVMETHOD(pwm_channel_max, aw_pwm_channel_max), + DEVMETHOD(pwm_channel_count, aw_pwm_channel_count), DEVMETHOD(pwm_channel_config, aw_pwm_channel_config), DEVMETHOD(pwm_channel_get_config, aw_pwm_channel_get_config), DEVMETHOD(pwm_channel_enable, aw_pwm_channel_enable), Modified: head/sys/dev/pwm/pwm_if.m ============================================================================== --- head/sys/dev/pwm/pwm_if.m Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwm_if.m Sat Jun 15 21:36:14 2019 (r349084) @@ -100,7 +100,7 @@ METHOD int channel_is_enabled { # # Get the number of channels # -METHOD int channel_max { +METHOD int channel_count { device_t dev; int *nchannel; }; Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:36:14 2019 (r349084) @@ -78,7 +78,7 @@ pwmbus_attach(device_t dev) sc->busdev = dev; sc->dev = device_get_parent(dev); - if (PWM_CHANNEL_MAX(sc->dev, &sc->nchannels) != 0 || + if (PWM_CHANNEL_COUNT(sc->dev, &sc->nchannels) != 0 || sc->nchannels == 0) return (ENXIO); Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 21:31:04 2019 (r349083) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 21:36:14 2019 (r349084) @@ -67,7 +67,7 @@ pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, switch (cmd) { case PWMMAXCHANNEL: nchannel = -1; - rv = PWM_CHANNEL_MAX(sc->pdev, &nchannel); + rv = PWM_CHANNEL_COUNT(sc->pdev, &nchannel); bcopy(&nchannel, data, sizeof(nchannel)); break; case PWMSETSTATE: From owner-svn-src-all@freebsd.org Sat Jun 15 21:51:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 251A715D0CE4; Sat, 15 Jun 2019 21:51:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEB6D8D8DB; Sat, 15 Jun 2019 21:51:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AA875356; Sat, 15 Jun 2019 21:51:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FLptW6083760; Sat, 15 Jun 2019 21:51:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FLpt71083759; Sat, 15 Jun 2019 21:51:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152151.x5FLpt71083759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 21:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349085 - head/sys/dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/pwm X-SVN-Commit-Revision: 349085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BEB6D8D8DB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 21:51:56 -0000 Author: ian Date: Sat Jun 15 21:51:55 2019 New Revision: 349085 URL: https://svnweb.freebsd.org/changeset/base/349085 Log: Destroy the cdev on device detach. Also, make the driver and devclass static, because nothing outside this file needs them. Modified: head/sys/dev/pwm/pwmc.c Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 21:36:14 2019 (r349084) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 21:51:55 2019 (r349085) @@ -137,6 +137,10 @@ pwmc_attach(device_t dev) static int pwmc_detach(device_t dev) { + struct pwmc_softc *sc; + + sc = device_get_softc(dev); + destroy_dev(sc->pwm_dev); return (0); } @@ -150,12 +154,12 @@ static device_method_t pwmc_methods[] = { DEVMETHOD_END }; -driver_t pwmc_driver = { +static driver_t pwmc_driver = { "pwmc", pwmc_methods, sizeof(struct pwmc_softc), }; -devclass_t pwmc_devclass; +static devclass_t pwmc_devclass; DRIVER_MODULE(pwmc, pwm, pwmc_driver, pwmc_devclass, 0, 0); MODULE_VERSION(pwmc, 1); From owner-svn-src-all@freebsd.org Sat Jun 15 22:25:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5656F15D1431; Sat, 15 Jun 2019 22:25:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9DFD8E664; Sat, 15 Jun 2019 22:25:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C07065880; Sat, 15 Jun 2019 22:25:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FMPe24099891; Sat, 15 Jun 2019 22:25:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FMPd3v099885; Sat, 15 Jun 2019 22:25:39 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152225.x5FMPd3v099885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 22:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349086 - in head/sys: arm/allwinner conf dev/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/allwinner conf dev/pwm X-SVN-Commit-Revision: 349086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E9DFD8E664 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 22:25:41 -0000 Author: ian Date: Sat Jun 15 22:25:39 2019 New Revision: 349086 URL: https://svnweb.freebsd.org/changeset/base/349086 Log: Restructure the pwm device hirearchy and interfaces. The pwm and pwmbus interfaces were nearly identical, this merges them into a single pwmbus interface. The pwmbus driver now implements the pwmbus interface by simply passing all calls through to its parent (the hardware driver). The channel_count method moves from pwm to pwmbus, and the get_bus method is deleted (just no longer needed). The net effect is that the interface for doing pwm stuff is now the same regardless of whether you're a child of pwmbus, or some random driver elsewhere in the hierarchy that is bypassing the pwmbus layer and is talking directly to the hardware driver via cross-hierarchy connections established using fdt data. The pwmc driver is now a child of pwmbus, instead of being its sibling (that's why the get_bus method is no longer needed; pwmc now gets the device_t of the bus using device_get_parent()). Deleted: head/sys/dev/pwm/pwm_if.m Modified: head/sys/arm/allwinner/aw_pwm.c head/sys/conf/files head/sys/dev/pwm/ofw_pwm.c head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmbus.h head/sys/dev/pwm/pwmbus_if.m head/sys/dev/pwm/pwmc.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 22:25:39 2019 (r349086) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include -#include "pwm_if.h" +#include "pwmbus_if.h" #define AW_PWM_CTRL 0x00 #define AW_PWM_CTRL_PRESCALE_MASK 0xF @@ -346,28 +346,18 @@ aw_pwm_channel_is_enabled(device_t dev, int channel, b return (0); } -static device_t -aw_pwm_get_bus(device_t dev) -{ - struct aw_pwm_softc *sc; - - sc = device_get_softc(dev); - - return (sc->busdev); -} static device_method_t aw_pwm_methods[] = { /* Device interface */ DEVMETHOD(device_probe, aw_pwm_probe), DEVMETHOD(device_attach, aw_pwm_attach), DEVMETHOD(device_detach, aw_pwm_detach), - /* pwm interface */ - DEVMETHOD(pwm_get_bus, aw_pwm_get_bus), - DEVMETHOD(pwm_channel_count, aw_pwm_channel_count), - DEVMETHOD(pwm_channel_config, aw_pwm_channel_config), - DEVMETHOD(pwm_channel_get_config, aw_pwm_channel_get_config), - DEVMETHOD(pwm_channel_enable, aw_pwm_channel_enable), - DEVMETHOD(pwm_channel_is_enabled, aw_pwm_channel_is_enabled), + /* pwmbus interface */ + DEVMETHOD(pwmbus_channel_count, aw_pwm_channel_count), + DEVMETHOD(pwmbus_channel_config, aw_pwm_channel_config), + DEVMETHOD(pwmbus_channel_get_config, aw_pwm_channel_get_config), + DEVMETHOD(pwmbus_channel_enable, aw_pwm_channel_enable), + DEVMETHOD(pwmbus_channel_is_enabled, aw_pwm_channel_is_enabled), DEVMETHOD_END }; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/conf/files Sat Jun 15 22:25:39 2019 (r349086) @@ -2702,7 +2702,6 @@ dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci dev/pwm/pwmc.c optional pwm | pwmc dev/pwm/pwmbus.c optional pwm | pwmbus -dev/pwm/pwm_if.m optional pwm | pwmbus dev/pwm/pwmbus_if.m optional pwm | pwmbus dev/pwm/ofw_pwm.c optional pwm fdt | pwmbus fdt dev/quicc/quicc_core.c optional quicc Modified: head/sys/dev/pwm/ofw_pwm.c ============================================================================== --- head/sys/dev/pwm/ofw_pwm.c Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/dev/pwm/ofw_pwm.c Sat Jun 15 22:25:39 2019 (r349086) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include -#include "pwm_if.h" +#include "pwmbus_if.h" int pwm_get_by_ofw_propidx(device_t consumer, phandle_t node, @@ -58,12 +58,6 @@ pwm_get_by_ofw_propidx(device_t consumer, phandle_t no channel.dev = OF_device_from_xref(xref); if (channel.dev == NULL) { - OF_prop_free(cells); - return (ENODEV); - } - - channel.busdev = PWM_GET_BUS(channel.dev); - if (channel.busdev == NULL) { OF_prop_free(cells); return (ENODEV); } Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 22:25:39 2019 (r349086) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include "pwmbus_if.h" -#include "pwm_if.h" struct pwmbus_channel_data { int reserved; @@ -55,8 +54,8 @@ struct pwmbus_channel_data { }; struct pwmbus_softc { - device_t busdev; device_t dev; + device_t parent; int nchannels; }; @@ -75,15 +74,18 @@ pwmbus_attach(device_t dev) struct pwmbus_softc *sc; sc = device_get_softc(dev); - sc->busdev = dev; - sc->dev = device_get_parent(dev); + sc->dev = dev; + sc->parent = device_get_parent(dev); - if (PWM_CHANNEL_COUNT(sc->dev, &sc->nchannels) != 0 || - sc->nchannels == 0) + if (PWMBUS_CHANNEL_COUNT(sc->parent, &sc->nchannels) != 0 || + sc->nchannels == 0) { + device_printf(sc->dev, "No channels on parent %s\n", + device_get_nameunit(sc->parent)); return (ENXIO); + } - if (bootverbose) - device_printf(dev, "Registering %d channel(s)\n", sc->nchannels); + device_add_child(sc->dev, "pwmc", -1); + bus_generic_probe(dev); return (bus_generic_attach(dev)); @@ -101,96 +103,61 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t bus, int chan, u_int period, u_int duty) +pwmbus_channel_config(device_t dev, int chan, u_int period, u_int duty) { - struct pwmbus_softc *sc; - - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_CONFIG(sc->dev, chan, period, duty)); + return (PWMBUS_CHANNEL_CONFIG(device_get_parent(dev), chan, period, duty)); } static int -pwmbus_channel_get_config(device_t bus, int chan, u_int *period, u_int *duty) +pwmbus_channel_get_config(device_t dev, int chan, u_int *period, u_int *duty) { - struct pwmbus_softc *sc; - - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_GET_CONFIG(sc->dev, chan, period, duty)); + return (PWMBUS_CHANNEL_GET_CONFIG(device_get_parent(dev), chan, period, duty)); } static int -pwmbus_channel_set_flags(device_t bus, int chan, uint32_t flags) +pwmbus_channel_get_flags(device_t dev, int chan, uint32_t *flags) { - struct pwmbus_softc *sc; - - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_SET_FLAGS(sc->dev, chan, flags)); + return (PWMBUS_CHANNEL_GET_FLAGS(device_get_parent(dev), chan, flags)); } static int -pwmbus_channel_get_flags(device_t bus, int chan, uint32_t *flags) +pwmbus_channel_enable(device_t dev, int chan, bool enable) { - struct pwmbus_softc *sc; - - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_GET_FLAGS(sc->dev, chan, flags)); + return (PWMBUS_CHANNEL_ENABLE(device_get_parent(dev), chan, enable)); } static int -pwmbus_channel_enable(device_t bus, int chan, bool enable) +pwmbus_channel_set_flags(device_t dev, int chan, uint32_t flags) { - struct pwmbus_softc *sc; - - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_ENABLE(sc->dev, chan, enable)); + return (PWMBUS_CHANNEL_SET_FLAGS(device_get_parent(dev), chan, flags)); } static int -pwmbus_channel_is_enabled(device_t bus, int chan, bool *enable) +pwmbus_channel_is_enabled(device_t dev, int chan, bool *enable) { - struct pwmbus_softc *sc; + return (PWMBUS_CHANNEL_IS_ENABLED(device_get_parent(dev), chan, enable)); +} - sc = device_get_softc(bus); - - if (chan > sc->nchannels) - return (EINVAL); - - return (PWM_CHANNEL_IS_ENABLED(sc->dev, chan, enable)); +static int +pwmbus_channel_count(device_t dev, int *nchannel) +{ + return (PWMBUS_CHANNEL_COUNT(device_get_parent(dev), nchannel)); } static device_method_t pwmbus_methods[] = { /* device_if */ - DEVMETHOD(device_probe, pwmbus_probe), + DEVMETHOD(device_probe, pwmbus_probe), DEVMETHOD(device_attach, pwmbus_attach), DEVMETHOD(device_detach, pwmbus_detach), - /* pwm interface */ - DEVMETHOD(pwmbus_channel_config, pwmbus_channel_config), - DEVMETHOD(pwmbus_channel_get_config, pwmbus_channel_get_config), - DEVMETHOD(pwmbus_channel_set_flags, pwmbus_channel_set_flags), - DEVMETHOD(pwmbus_channel_get_flags, pwmbus_channel_get_flags), - DEVMETHOD(pwmbus_channel_enable, pwmbus_channel_enable), - DEVMETHOD(pwmbus_channel_is_enabled, pwmbus_channel_is_enabled), + /* pwmbus_if */ + DEVMETHOD(pwmbus_channel_count, pwmbus_channel_count), + DEVMETHOD(pwmbus_channel_config, pwmbus_channel_config), + DEVMETHOD(pwmbus_channel_get_config, pwmbus_channel_get_config), + DEVMETHOD(pwmbus_channel_set_flags, pwmbus_channel_set_flags), + DEVMETHOD(pwmbus_channel_get_flags, pwmbus_channel_get_flags), + DEVMETHOD(pwmbus_channel_enable, pwmbus_channel_enable), + DEVMETHOD(pwmbus_channel_is_enabled, pwmbus_channel_is_enabled), DEVMETHOD_END }; Modified: head/sys/dev/pwm/pwmbus.h ============================================================================== --- head/sys/dev/pwm/pwmbus.h Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/dev/pwm/pwmbus.h Sat Jun 15 22:25:39 2019 (r349086) @@ -34,7 +34,6 @@ struct pwm_channel { device_t dev; - device_t busdev; int channel; uint64_t period; uint64_t duty; Modified: head/sys/dev/pwm/pwmbus_if.m ============================================================================== --- head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 22:25:39 2019 (r349086) @@ -105,3 +105,11 @@ METHOD int channel_is_enabled { int channel; bool *enabled; }; + +# +# Get the number of channels +# +METHOD int channel_count { + device_t bus; + int *nchannel; +}; Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 21:51:55 2019 (r349085) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 22:25:39 2019 (r349086) @@ -40,11 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include "pwmbus_if.h" -#include "pwm_if.h" struct pwmc_softc { device_t dev; - device_t pdev; struct cdev *pwm_dev; char name[32]; }; @@ -60,14 +58,12 @@ pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int rv = 0; sc = dev->si_drv1; - bus = PWM_GET_BUS(sc->pdev); - if (bus == NULL) - return (EINVAL); + bus = device_get_parent(sc->dev); switch (cmd) { case PWMMAXCHANNEL: nchannel = -1; - rv = PWM_CHANNEL_COUNT(sc->pdev, &nchannel); + rv = PWMBUS_CHANNEL_COUNT(bus, &nchannel); bcopy(&nchannel, data, sizeof(nchannel)); break; case PWMSETSTATE: @@ -106,7 +102,7 @@ pwmc_probe(device_t dev) { device_set_desc(dev, "PWM Controller"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int @@ -117,7 +113,6 @@ pwmc_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->pdev = device_get_parent(dev); snprintf(sc->name, sizeof(sc->name), "pwmc%d", device_get_unit(dev)); make_dev_args_init(&args); @@ -161,5 +156,6 @@ static driver_t pwmc_driver = { }; static devclass_t pwmc_devclass; -DRIVER_MODULE(pwmc, pwm, pwmc_driver, pwmc_devclass, 0, 0); +DRIVER_MODULE(pwmc, pwmbus, pwmc_driver, pwmc_devclass, 0, 0); +MODULE_DEPEND(pwmc, pwmbus, 1, 1, 1); MODULE_VERSION(pwmc, 1); From owner-svn-src-all@freebsd.org Sat Jun 15 23:00:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15DD815D1D6B; Sat, 15 Jun 2019 23:00:25 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DEEC8F358; Sat, 15 Jun 2019 23:00:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68A0B5D7D; Sat, 15 Jun 2019 23:00:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FN0OK3016048; Sat, 15 Jun 2019 23:00:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FN0Orf016047; Sat, 15 Jun 2019 23:00:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201906152300.x5FN0Orf016047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 15 Jun 2019 23:00: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: r349087 - stable/11/sys/security/audit X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/security/audit X-SVN-Commit-Revision: 349087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7DEEC8F358 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 23:00:25 -0000 Author: asomers Date: Sat Jun 15 23:00:23 2019 New Revision: 349087 URL: https://svnweb.freebsd.org/changeset/base/349087 Log: MFC r335060 audit(4): fix the definition of ARG_TERMID_ADDR Due to a copy/paste error in r168688, ARG_TERMID_ADDR has the same definition as ARG_SADDRUNIX. Fix it. The header change, while publicly visible, is guarded by #ifdef KERNEL, and I can't find any kmod ports that use it. So I'm not bumping __FreeBSD_version. PR: 228820 Submitted by: aniketp Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15702 Modified: stable/11/sys/security/audit/audit_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/security/audit/audit_private.h ============================================================================== --- stable/11/sys/security/audit/audit_private.h Sat Jun 15 22:25:39 2019 (r349086) +++ stable/11/sys/security/audit/audit_private.h Sat Jun 15 23:00:23 2019 (r349087) @@ -263,7 +263,7 @@ struct audit_record { #define ARG_SADDRINET 0x0000000000100000ULL #define ARG_SADDRINET6 0x0000000000200000ULL #define ARG_SADDRUNIX 0x0000000000400000ULL -#define ARG_TERMID_ADDR 0x0000000000400000ULL +#define ARG_TERMID_ADDR 0x0000000000800000ULL #define ARG_UNUSED2 0x0000000001000000ULL #define ARG_UPATH1 0x0000000002000000ULL #define ARG_UPATH2 0x0000000004000000ULL From owner-svn-src-all@freebsd.org Sat Jun 15 23:02:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9543915D1F0A; Sat, 15 Jun 2019 23:02:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38B248F6E4; Sat, 15 Jun 2019 23:02:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13DF55F02; Sat, 15 Jun 2019 23:02:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FN2AWq019243; Sat, 15 Jun 2019 23:02:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FN297n019226; Sat, 15 Jun 2019 23:02:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201906152302.x5FN297n019226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 15 Jun 2019 23:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349088 - in head: sys/arm/allwinner sys/dev/pwm usr.sbin/pwm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: sys/arm/allwinner sys/dev/pwm usr.sbin/pwm X-SVN-Commit-Revision: 349088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38B248F6E4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 23:02:11 -0000 Author: ian Date: Sat Jun 15 23:02:09 2019 New Revision: 349088 URL: https://svnweb.freebsd.org/changeset/base/349088 Log: Make pwm channel numbers unsigned. Modified: head/sys/arm/allwinner/aw_pwm.c head/sys/dev/pwm/pwmbus.c head/sys/dev/pwm/pwmbus.h head/sys/dev/pwm/pwmbus_if.m head/sys/dev/pwm/pwmc.c head/usr.sbin/pwm/pwm.c Modified: head/sys/arm/allwinner/aw_pwm.c ============================================================================== --- head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 23:00:23 2019 (r349087) +++ head/sys/arm/allwinner/aw_pwm.c Sat Jun 15 23:02:09 2019 (r349088) @@ -226,7 +226,7 @@ aw_pwm_detach(device_t dev) } static int -aw_pwm_channel_count(device_t dev, int *nchannel) +aw_pwm_channel_count(device_t dev, u_int *nchannel) { *nchannel = 1; @@ -235,7 +235,7 @@ aw_pwm_channel_count(device_t dev, int *nchannel) } static int -aw_pwm_channel_config(device_t dev, int channel, unsigned int period, unsigned int duty) +aw_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) { struct aw_pwm_softc *sc; uint64_t period_freq, duty_freq; @@ -298,7 +298,7 @@ aw_pwm_channel_config(device_t dev, int channel, unsig } static int -aw_pwm_channel_get_config(device_t dev, int channel, unsigned int *period, unsigned int *duty) +aw_pwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) { struct aw_pwm_softc *sc; @@ -311,7 +311,7 @@ aw_pwm_channel_get_config(device_t dev, int channel, u } static int -aw_pwm_channel_enable(device_t dev, int channel, bool enable) +aw_pwm_channel_enable(device_t dev, u_int channel, bool enable) { struct aw_pwm_softc *sc; uint32_t reg; @@ -335,7 +335,7 @@ aw_pwm_channel_enable(device_t dev, int channel, bool } static int -aw_pwm_channel_is_enabled(device_t dev, int channel, bool *enabled) +aw_pwm_channel_is_enabled(device_t dev, u_int channel, bool *enabled) { struct aw_pwm_softc *sc; Modified: head/sys/dev/pwm/pwmbus.c ============================================================================== --- head/sys/dev/pwm/pwmbus.c Sat Jun 15 23:00:23 2019 (r349087) +++ head/sys/dev/pwm/pwmbus.c Sat Jun 15 23:02:09 2019 (r349088) @@ -57,7 +57,7 @@ struct pwmbus_softc { device_t dev; device_t parent; - int nchannels; + u_int nchannels; }; static int @@ -103,43 +103,43 @@ pwmbus_detach(device_t dev) } static int -pwmbus_channel_config(device_t dev, int chan, u_int period, u_int duty) +pwmbus_channel_config(device_t dev, u_int chan, u_int period, u_int duty) { return (PWMBUS_CHANNEL_CONFIG(device_get_parent(dev), chan, period, duty)); } static int -pwmbus_channel_get_config(device_t dev, int chan, u_int *period, u_int *duty) +pwmbus_channel_get_config(device_t dev, u_int chan, u_int *period, u_int *duty) { return (PWMBUS_CHANNEL_GET_CONFIG(device_get_parent(dev), chan, period, duty)); } static int -pwmbus_channel_get_flags(device_t dev, int chan, uint32_t *flags) +pwmbus_channel_get_flags(device_t dev, u_int chan, uint32_t *flags) { return (PWMBUS_CHANNEL_GET_FLAGS(device_get_parent(dev), chan, flags)); } static int -pwmbus_channel_enable(device_t dev, int chan, bool enable) +pwmbus_channel_enable(device_t dev, u_int chan, bool enable) { return (PWMBUS_CHANNEL_ENABLE(device_get_parent(dev), chan, enable)); } static int -pwmbus_channel_set_flags(device_t dev, int chan, uint32_t flags) +pwmbus_channel_set_flags(device_t dev, u_int chan, uint32_t flags) { return (PWMBUS_CHANNEL_SET_FLAGS(device_get_parent(dev), chan, flags)); } static int -pwmbus_channel_is_enabled(device_t dev, int chan, bool *enable) +pwmbus_channel_is_enabled(device_t dev, u_int chan, bool *enable) { return (PWMBUS_CHANNEL_IS_ENABLED(device_get_parent(dev), chan, enable)); } static int -pwmbus_channel_count(device_t dev, int *nchannel) +pwmbus_channel_count(device_t dev, u_int *nchannel) { return (PWMBUS_CHANNEL_COUNT(device_get_parent(dev), nchannel)); } Modified: head/sys/dev/pwm/pwmbus.h ============================================================================== --- head/sys/dev/pwm/pwmbus.h Sat Jun 15 23:00:23 2019 (r349087) +++ head/sys/dev/pwm/pwmbus.h Sat Jun 15 23:02:09 2019 (r349088) @@ -34,7 +34,7 @@ struct pwm_channel { device_t dev; - int channel; + u_int channel; uint64_t period; uint64_t duty; uint32_t flags; Modified: head/sys/dev/pwm/pwmbus_if.m ============================================================================== --- head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 23:00:23 2019 (r349087) +++ head/sys/dev/pwm/pwmbus_if.m Sat Jun 15 23:02:09 2019 (r349088) @@ -33,14 +33,14 @@ INTERFACE pwmbus; CODE { static int - pwm_default_set_flags(device_t dev, int channel, uint32_t flags) + pwm_default_set_flags(device_t dev, u_int channel, uint32_t flags) { return (EOPNOTSUPP); } static int - pwm_default_get_flags(device_t dev, int channel, uint32_t *flags) + pwm_default_get_flags(device_t dev, u_int channel, uint32_t *flags) { *flags = 0; @@ -54,7 +54,7 @@ CODE { # METHOD int channel_config { device_t bus; - int channel; + u_int channel; unsigned int period; unsigned int duty; }; @@ -65,7 +65,7 @@ METHOD int channel_config { # METHOD int channel_get_config { device_t bus; - int channel; + u_int channel; unsigned int *period; unsigned int *duty; }; @@ -75,7 +75,7 @@ METHOD int channel_get_config { # METHOD int channel_set_flags { device_t bus; - int channel; + u_int channel; uint32_t flags; } DEFAULT pwm_default_set_flags; @@ -84,7 +84,7 @@ METHOD int channel_set_flags { # METHOD int channel_get_flags { device_t dev; - int channel; + u_int channel; uint32_t *flags; } DEFAULT pwm_default_get_flags; @@ -93,7 +93,7 @@ METHOD int channel_get_flags { # METHOD int channel_enable { device_t bus; - int channel; + u_int channel; bool enable; }; @@ -102,7 +102,7 @@ METHOD int channel_enable { # METHOD int channel_is_enabled { device_t bus; - int channel; + u_int channel; bool *enabled; }; @@ -111,5 +111,5 @@ METHOD int channel_is_enabled { # METHOD int channel_count { device_t bus; - int *nchannel; + u_int *nchannel; }; Modified: head/sys/dev/pwm/pwmc.c ============================================================================== --- head/sys/dev/pwm/pwmc.c Sat Jun 15 23:00:23 2019 (r349087) +++ head/sys/dev/pwm/pwmc.c Sat Jun 15 23:02:09 2019 (r349088) @@ -54,7 +54,7 @@ pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, struct pwmc_softc *sc; struct pwm_state state; device_t bus; - int nchannel; + u_int nchannel; int rv = 0; sc = dev->si_drv1; @@ -62,7 +62,7 @@ pwm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, switch (cmd) { case PWMMAXCHANNEL: - nchannel = -1; + nchannel = 0; rv = PWMBUS_CHANNEL_COUNT(bus, &nchannel); bcopy(&nchannel, data, sizeof(nchannel)); break; Modified: head/usr.sbin/pwm/pwm.c ============================================================================== --- head/usr.sbin/pwm/pwm.c Sat Jun 15 23:00:23 2019 (r349087) +++ head/usr.sbin/pwm/pwm.c Sat Jun 15 23:02:09 2019 (r349088) @@ -66,7 +66,7 @@ main(int argc, char *argv[]) { struct pwm_state state; int fd; - int channel, nchannels; + u_int channel, nchannels; int period, duty; int action, ch; cap_rights_t right_ioctl; @@ -75,7 +75,7 @@ main(int argc, char *argv[]) action = 0; fd = -1; - channel = -1; + channel = -1u; period = duty = -1; while ((ch = getopt(argc, argv, "f:c:EDCp:d:")) != -1) { @@ -110,9 +110,9 @@ main(int argc, char *argv[]) usage(); break; case 'c': - if (channel != -1) + if (channel != -1u) usage(); - channel = strtol(optarg, NULL, 10); + channel = strtoul(optarg, NULL, 10); break; case 'f': if ((fd = open(optarg, O_RDWR)) < 0) { From owner-svn-src-all@freebsd.org Sat Jun 15 23:06:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C3D15D1FD1; Sat, 15 Jun 2019 23:06:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB47E8F898; Sat, 15 Jun 2019 23:06:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B913A5F1D; Sat, 15 Jun 2019 23:06:22 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FN6MoM020898; Sat, 15 Jun 2019 23:06:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FN6Mj4020897; Sat, 15 Jun 2019 23:06:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201906152306.x5FN6Mj4020897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 15 Jun 2019 23:06: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: r349089 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 349089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB47E8F898 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 23:06:23 -0000 Author: asomers Date: Sat Jun 15 23:06:22 2019 New Revision: 349089 URL: https://svnweb.freebsd.org/changeset/base/349089 Log: MFC r348113: Update VFS_FHTOVP(9) with the flags argument Revison 222167 added a new argument to VFS_FHTOVP. This revision updates the man page to match. Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20323 Modified: stable/11/share/man/man9/VFS_FHTOVP.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- stable/11/share/man/man9/VFS_FHTOVP.9 Sat Jun 15 23:02:09 2019 (r349088) +++ stable/11/share/man/man9/VFS_FHTOVP.9 Sat Jun 15 23:06:22 2019 (r349089) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2010 +.Dd May 19, 2019 .Dt VFS_FHTOVP 9 .Os .Sh NAME @@ -39,18 +39,26 @@ .In sys/mount.h .In sys/vnode.h .Ft int -.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "struct vnode **vpp" +.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "int flags" "struct vnode **vpp" .Sh DESCRIPTION The .Fn VFS_FHTOVP macro is used by the NFS server to turn an NFS filehandle into a vnode. .Pp The arguments it expects are: -.Bl -tag -width vpp +.Bl -tag -width flags .It Fa mp The file system. .It Fa fhp The filehandle to convert. +.It Fa flags +Additional locking flags to pass through to +.Xr vget 9 . +File systems are allowed to ignore +.Ar flags +and use +.Dv LK_EXCLUSIVE +instead. .It Fa vpp Return parameter for the new locked vnode. .El From owner-svn-src-all@freebsd.org Sat Jun 15 23:11:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A47CA15AD0DC; Sat, 15 Jun 2019 23:11:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48C108FACD; Sat, 15 Jun 2019 23:11:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25596607D; Sat, 15 Jun 2019 23:11:35 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5FNBZJM023677; Sat, 15 Jun 2019 23:11:35 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5FNBZZK023676; Sat, 15 Jun 2019 23:11:35 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201906152311.x5FNBZZK023676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 15 Jun 2019 23:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349090 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 349090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48C108FACD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 23:11:35 -0000 Author: asomers Date: Sat Jun 15 23:11:34 2019 New Revision: 349090 URL: https://svnweb.freebsd.org/changeset/base/349090 Log: MFC r348316: VOP_ADVLOCK.9: fix description of flags * F_RDLCK, F_UNLCK, and F_WRLCK aren't flags. They're stored in the fl.l_type field. * Add F_REMOTE, added in r177633 * Add F_NOINTR, added in r180025 Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man9/VOP_ADVLOCK.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/VOP_ADVLOCK.9 ============================================================================== --- stable/11/share/man/man9/VOP_ADVLOCK.9 Sat Jun 15 23:06:22 2019 (r349089) +++ stable/11/share/man/man9/VOP_ADVLOCK.9 Sat Jun 15 23:11:34 2019 (r349090) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 1999 +.Dd May 27, 2019 .Dt VOP_ADVLOCK 9 .Os .Sh NAME @@ -56,13 +56,7 @@ Description of the lock. .It Fa flags One of more of the following: .Pp -.Bl -tag -width ".Dv F_UNLCK" -offset indent -compact -.It Dv F_RDLCK -Shared or read lock. -.It Dv F_UNLCK -Unlock. -.It Dv F_WRLCK -Exclusive or write lock. +.Bl -tag -width ".Dv F_REMOTE" -offset indent -compact .It Dv F_WAIT Wait until lock is granted. .It Dv F_FLOCK @@ -71,6 +65,10 @@ Use semantics for lock. .It Dv F_POSIX Use POSIX semantics for lock. +.It Dv F_REMOTE +Lock owner is remote NFS client. +.It Dv F_NOINTR +Mask signals while waiting for the lock. .El .El .Pp